Merge branch 'dongjian' into develop

This commit is contained in:
2025-08-13 16:19:55 +08:00
21 changed files with 1261 additions and 244 deletions
+171
View File
@@ -0,0 +1,171 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="查看合同" />
<view class="contract-view">
<view class="top-info flex-r-lr">
<image src="../../static/logo.png"></image>
<view class="right-view">
<text class="text-36 text-zu">消费型合伙人协议</text>
<view class="bottom-panel">
<view class="flex-r-lr mt-24" v-for="(item,index) in dataList" :key="dataList.value">
<text class="text-fu text-24">{{item.text}}</text>
<view class="list-right">
<text class="text-24"
:class="{'text-lu':index == 0,'text-zu':index != 0}">{{item.value}}</text>
</view>
</view>
</view>
</view>
</view>
<text class="text-zu text-32 mt-32" style="margin-left:38rpx">合同签约人信息</text>
<view class="bottom">
<view class="bottom-lsit" v-for="(item,index) in bottomList" :key="item.value">
<text class="text-24 text-fu" style="min-width:184rpx;display: inline-block;">{{item.text}}</text>
<text class="text-24 text-zu">{{item.value}}</text>
</view>
</view>
<view class="bottom-btn">
<view class="right-btn flex-c" @click="onOpen">
<text class="text-white text-32">下载合同</text>
</view>
</view>
</view>
</view>
</template>
<script>
import { getUserInfo } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import ContractItem from './components/contract-item.vue'
import { getContractList } from '@/api/contract.js'
import func from '@/utils/func.js';
export default {
components: { Header,TopSafe,ContractItem },
data() {
return {
dataList:[
{text:'合同状态',value:'签约完成'},
{text:'合同编号',value:'69485222011627525'},
{text:'发起方',value:'信任桥(深圳)网络科技有限公司'},
{text:'发起时间',value:'2025-08-11 12:00:00'},
{text:'完成结束时间',value:'2025-08-11 12:00:00'},
],
bottomList:[
{text:'签约人',value:'信任桥会员 章三'},
{text:'状态',value:'已签署'},
{text:'时间',value:'2025-08-11 12:00:00'},
],
obj:null
};
},
onLoad(option) {
this.init();
},
methods: {
init(){
this.isSignContract()
},
isSignContract(){
getContractList().then(res=>{
if(res.bizcode == 100){
this.obj = JSON.parse(JSON.stringify(res.data[0]));
this.obj.time = func.formatDate(new Date(res.data[0].signatureTime),2);
this.obj.details.startTime = func.formatDate(new Date(res.data[0].details.startTime),2);
this.obj.details.endTime = func.formatDate(new Date(res.data[0].details.endTime),2);
this.dataList[2].value = this.obj.flowId;
this.dataList[3].value = this.obj.details.startTime;
this.dataList[4].value = this.obj.details.endTime;
this.bottomList[0].value = this.obj.signatureName;
this.bottomList[2].value = this.obj.time;
}else{
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
}
})
},
onOpen(){
window.open(this.obj.contractName)
}
}
}
</script>
<style lang="scss" scoped>
.contract-view{
width:100%;
height:calc(100% - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
overflow-y: auto;
// padding: 0 32rpx;
box-sizing: border-box;
position: relative;
.bottom-btn{
width:100%;
display: flex;
position: absolute;
bottom:80rpx;
flex-direction: row;
justify-content: center;
.left-btn{
width:48%;
background: #E4D6FD;
border-radius: 8rpx;
}
.right-btn{
width:calc(100% - 60rpx);
height:88rpx;
background: linear-gradient( 270deg, #B164FB 0%, #7934F6 100%);
border-radius: 8rpx;
}
}
.bottom{
display: flex;
padding: 40rpx 46rpx;
box-sizing: border-box;
flex-direction: column;
justify-content: space-between;
margin-top:24rpx;
background-color: #fff;
width:100%;
min-height:216rpx;
}
.top-info{
width:100%;
min-height:440rpx;
padding: 68rpx 32rpx 64rpx;
box-sizing: border-box;
background-color: #fff;
.right-view{
height:100%;
flex:1;
flex-direction: column;
display: flex;
margin-left:46rpx;
.bottom-panel{
width:100%;
flex:1;
display: flex;
flex-direction: column;
.list-right{
width:238rpx;
margin-left:40rpx;
display: flex;
}
}
}
image{
width:200rpx;
height:260rpx;
}
}
}
</style>
@@ -0,0 +1,89 @@
<template>
<view class="contract-item-view" >
<view class="item-top-view flex-r-lr">
<text class="text-fu text-24">发起方:信任桥(深圳)网络科技有限公司</text>
<view class="right-box flex-c" :style="{
background:type?'rgba(0,167,118,0.1)':'rgba(102,102,102,0.1)'
}">
<text class="text-20 text-fu"
:class="{'text-lu':type}">{{type ? '已签署' : '未签署'}}</text>
</view>
</view>
<text class="text-36 text-zu mt-32">消费型合伙人协议</text>
<view class="flex-r-lr mt-48">
<text class="text-fu text-24" >{{text}}</text>
<text class="text-20 text-fu" >{{time}}</text>
</view>
<view class="flex-r-e mt-32">
<view class="item-btn-view flex-c" @click="onBtn" :class="{'b-w':type,'b-g':!type}">
<text class="text-28" :class="{'text-white':!type,'text-zi':type}">{{type ? '查看' : '去签署'}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
props:{
type:{
type:Boolean,
default:false
},
text:{
type:String,
default:''
},
time:{
type:String,
default:''
}
},
mounted(){
},
methods: {
onBtn(){
this.$emit('click');
}
}
}
</script>
<style lang="scss" scoped>
.b-w{
border-width: 1rpx !important;
}
.b-g{
background:linear-gradient( 270deg, #B164FB 0%, #7934F6 100%);
}
.contract-item-view{
width:100%;
min-height:304rpx;
display: flex;
flex-direction: column;
padding: 24rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 24rpx;
.item-btn-view{
padding: 0 38rpx;
min-height:52rpx;
box-sizing: border-box;
border-radius: 26rpx;
border:0 solid #7934F6;
}
.item-top-view{
height:40rpx;
min-height:40rpx;
.right-box{
padding: 0 16rpx;
box-sizing: border-box;
border-radius: 8rpx;
background: rgba(102,102,102,0.1);
}
}
}
</style>
+91
View File
@@ -0,0 +1,91 @@
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="我的合同" />
<view class="contract-view">
<ContractItem :type="obj && obj.state"
:text="obj && obj.signatureName"
:time="obj && obj.time"
class="mt-24" @click="onBtn"></ContractItem>
</view>
<DownPopup></DownPopup>
</view>
</template>
<script>
import { getUserInfo } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import ContractItem from './components/contract-item.vue'
import DownPopup from '@/components/common/down-popup.vue';
import { getContractList,signContract } from '@/api/contract.js'
import func from '@/utils/func.js';
export default {
components: { Header,TopSafe,ContractItem,DownPopup },
data() {
return {
type:false,
obj:null
};
},
onShow() {
this.init();
},
methods: {
init(){
// this.isSignContract()
this.getSignContract()
},
isSignContract(){
signContract().then(res=>{
if(res.bizcode == 100){
this.type = res.data;
}else{
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
}
})
},
getSignContract(){
getContractList().then(res=>{
if(res.bizcode == 100){
this.obj = res.data[0];
this.obj.time = func.formatDate(new Date(res.data[0].signatureTime),3)
}else{
this.$refs.uToastRef.show({
type: 'error',
message: res.msg,
});
}
})
},
onBtn(){
if(this.type){
//查看
uni.navigateTo({
url:`/pages/contract/check`
})
}else{
//去签署
}
}
}
}
</script>
<style lang="scss" scoped>
.contract-view{
width:100%;
height:calc(100% - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
}
</style>
+1 -1
View File
@@ -424,7 +424,7 @@ export default {
},
jumpSearch() {
uni.navigateTo({
url: '/pages/other_package/search/search',
url: '/pages/shop/search',
})
},
/**
@@ -63,6 +63,11 @@
<view>关于我们</view>
<up-image src="/static/common/right.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
</view>
<view class="header_fg"></view>
<view class="item_comm" @click="jumpInfo('contract')">
<view>我的合同</view>
<up-image src="/static/common/right.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
</view>
</view>
<view class="login_out_warp" @click="loginOutFun">
@@ -135,6 +140,10 @@ export default {
uni.navigateTo({
url: '/pages/mine_package/mine_product_agreement/mine_product_agreement'
})
}else if(type === 'contract'){
uni.navigateTo({
url:'/pages/contract/index'
})
}
},
// 跳转到交易密码
+3 -3
View File
@@ -25,7 +25,7 @@
</view>
</view>
<!-- 历史搜索 -->
<view class="search_history" v-if="!poductList || poductList.length === 0">
<!-- <view class="search_history" v-if="!poductList || poductList.length === 0">
<view class="search_history_title">
<view>猜你喜欢</view>
<up-image src="/static/common/delete.png" width="20" height="20" bgColor="#f1f6ff00" @click="isShowSearch = true;"></up-image>
@@ -39,9 +39,9 @@
<view class="not_order_warp_img"><up-image src="/static/common/not_search.png" width="100" height="100" bgColor="#f1f6ff00"></up-image></view>
<view class="not_order_msg_warp">暂无搜索记录</view>
</view>
</view>
</view> -->
<!-- 搜索出内容 -->
<view v-else class="poduct_list">
<view class="poduct_list">
<view class="poduct_search_warp">
<view>综合</view>
<view>销量</view>
+66
View File
@@ -0,0 +1,66 @@
<template>
<view class="shop-item-view" @click="onJump">
<view class="top-img-view flex-r-lr">
<image :src="obj.url"></image>
</view>
<view class="bottom-shop-view">
<text class="text-28 text-zu text-overflow1">{{obj.title}}</text>
<text class="text-28" style="color:#FF4242">
¥{{obj.adPrice}}
<text class="text-24 text-fu text-d" style="margin-left:12rpx">
¥{{obj.price}}
</text>
</text>
</view>
</view>
</template>
<script>
export default {
props:{
obj:{
type:Object,
default:null
},
},
mounted(){
},
methods: {
onJump(){
this.$emit('click');
}
}
}
</script>
<style lang="scss" scoped>
.shop-item-view{
width:332rpx;
height:498rpx;
min-height:498rpx;
display: flex;
flex-direction: column;
border-radius: 24rpx;
overflow: hidden;
background-color: #fff;
.bottom-shop-view{
width:100%;
padding: 16rpx 24rpx 0;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.top-img-view{
width:332rpx;
height:332rpx;
min-height:332rpx;
image{
width:100%;
height:100%;
}
}
}
</style>
+231
View File
@@ -0,0 +1,231 @@
<template>
<view class="content">
<TopSafe bgColor="rgba(0,0,0,0)"></TopSafe>
<view class="search-view">
<view class="head-view">
<u-icon size="30rpx" name="arrow-left" color="#333"></u-icon>
<u-input class="input-view wx-width" v-model="searchInput"></u-input>
<view class="search-btn flex-c" @click="onSearch">
<text class="text-32 text-zu">搜索</text>
</view>
</view>
<view class="top-view mt-24">
<view class="flex-r-lr">
<text class="text-32 text-bold text-zu">搜索历史</text>
<u-icon size="40rpx" name="trash" @click="isDel = !isDel" color="#333"></u-icon>
</view>
<view class="history-view" v-if="historyList.length">
<view class="history-box flex-c mt-24 mr-32" v-for="(item,index) in historyList" :key="item">
<text class="text-24 text-fu line-h" @click="onText(item)" >{{item}}</text>
<u-icon size="32rpx" class="close-pos" v-if="isDel" @click="onDel(index)"
name="close-circle" color="#333"></u-icon>
</view>
</view>
<view class="history-on-data flex-c" v-else>
<text class="text-40 text-bold">暂无历史记录</text>
</view>
</view>
<view class="bottom-view">
<view class="bottom-head">
<text class="text-32 text-bold text-zu">商品展示</text>
</view>
<view class="bottom-scroll" v-if="dataList.length">
<ShopItem :obj="item" class="mt-24" @click="onJump(item)"
v-for="(item,index) in dataList" :key="item.id"></ShopItem>
</view>
<view class="bottom-scroll-no " v-else>
<text class="text-48 text-bold" style="margin-top:200rpx">暂无数据</text>
</view>
</view>
</view>
<DownPopup></DownPopup>
</view>
</template>
<script>
import { getUserInfo } from '@/api/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import DownPopup from '@/components/common/down-popup.vue';
import { searchList } from '@/api/product.js'
import ShopItem from './components/shop-item.vue'
import func from '@/utils/func.js';
export default {
components: { Header,TopSafe,DownPopup,ShopItem },
data() {
return {
searchInput:'',
historyList:[],
isDel:false,
dataList:[],
};
},
onShow() {
this.init();
},
methods: {
init(){
// this.isSignContract()
// this.getSignContract()
let arr = uni.getStorageSync('history') || '';
if(arr){
this.historyList = arr.split(',');
}else{
this.historyList = [];
}
},
onJump(item){
uni.navigateTo({
url: '/pages/other_package/productInfo/productInfo?id='+item.id,
})
},
onSearch(){
if(!this.searchInput){
return;
}
this.onAdd();
let params = {
keyword:this.searchInput
}
searchList(params).then((res)=>{
this.dataList = res.data;
console.log('res',res)
})
},
onDel(index){
this.historyList.splice(index,1);
this.onSave()
},
onAdd(){
if(this.searchInput){
let bool = false;
this.historyList.forEach(item=>{
if(item == this.searchInput){
bool = true;
}
})
if(!bool){
this.historyList.unshift(this.searchInput);
if(this.historyList.length > 15){
this.historyList.pop();
}
this.onSave();
}
}
},
onText(item){
this.searchInput = item;
},
onSave(){
if(this.historyList.length){
uni.setStorageSync('history',this.historyList.join(','));
}else{
uni.setStorageSync('history','');
}
}
}
}
</script>
<style lang="scss" scoped>
.search-view{
width:100%;
height:calc(100% - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
.top-view{
width:100%;
min-height:300rpx;
display: flex;
flex-direction: column;
padding: 0 32rpx;
box-sizing: border-box;
overflow-y: auto;
.history-on-data{
width:100%;
height:100%;
}
.history-view{
width:100%;
display: flex;
flex-wrap: wrap;
.history-box{
position: relative;
padding: 8rpx 12rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 8rpx;
.close-pos{
right:-20rpx;
position: absolute;
top:-40%;
}
}
}
}
.bottom-view{
width:100%;
flex:1;
display: flex;
flex-direction: column;
padding: 0 32rpx;
box-sizing: border-box;
.bottom-head{
height:50rpx;
display: flex;
}
.bottom-scroll{
width:100%;
height:calc(100vh - 50rpx - 324rpx - 4rpx - 88rpx - var(--status-bar-height));
overflow-y: auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.bottom-scroll-no{
width:100%;
display: flex;
flex-direction: column;
align-items: center;
}
}
.head-view{
width:100%;
height:88rpx;
display: flex;
flex-direction: row;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
.search-btn{
width:120rpx;
}
.input-view{
height:72rpx;
box-sizing: border-box;
padding: 0 30rpx !important;
border-radius: 36rpx;
margin-left:12rpx;
border-color:#7934F6 !important;
}
/* #ifdef MP-WEIXIN */
.wx-width{
width:350rpx !important;
flex:none;
}
/* #endif */
}
}
</style>
+2 -5
View File
@@ -128,12 +128,9 @@ export default {
}
},
jumpSearch(item) {
let path = "/pages/other_package/search/search";
if (item && Object.keys(item).length !== 0) {
path = path + "?keyword=" + item.name;
}
uni.navigateTo({
url: path,
url: '/pages/shop/search',
})
},
// 查询分类