feat:性能优化
This commit is contained in:
@@ -0,0 +1,687 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe bgColor="#fff"></TopSafe>
|
||||
<Header title="数字积分" bgColor="#fff" />
|
||||
<view class="contract-view" :style="{
|
||||
'overflow-y': curTab == 0 ? 'auto' : 'hidden'
|
||||
}">
|
||||
<image src="https://static.tbmall.xin/static/new/jia_bg.png" class="jia-img">
|
||||
</image>
|
||||
<view class="box-panel" style="padding:0;margin-bottom:30rpx;">
|
||||
<view class="box-top">
|
||||
<view class="flex-c-lr" style="align-items: center;">
|
||||
<text class="text-40 text-bold text-gray">{{ lockedData ? lockedData.selfBuyLocked : 0 }}</text>
|
||||
<text class="text-fu1 text-24 text-w-400">自购锁定量(数字积分)</text>
|
||||
</view>
|
||||
<view class="flex-c-lr" style="align-items: center;">
|
||||
<text class="text-40 text-bold text-gray">{{ lockedData ? lockedData.spreadLocked : 0 }}</text>
|
||||
<text class="text-fu1 text-24 text-w-400">推广锁定量(数字积分)</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tab-view">
|
||||
<view class="tab-list" @click="onTab(index)" v-for="(item, index) in tabList" :key="index">
|
||||
<text class="text-32" :style="{ color: index == curTab ? '#7934F6' : '#666666' }">{{ item }}</text>
|
||||
<view class="tab-line" v-if="index == curTab"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-panel" v-if="curTab == 0">
|
||||
<view class="box-list">
|
||||
<view class="head-box">
|
||||
<text class="text-gray text-28 text-bold">推广解锁</text>
|
||||
<text class="text-fu1 text-24 text-w-400">获得2贡献值解锁1贡献值对应的数字积分直推奖励。</text>
|
||||
<image src="https://static.tbmall.xin/static/new/jia_icon.png" class="icon-img" mode=""></image>
|
||||
</view>
|
||||
<view class="box-li">
|
||||
<view class="box-biao">
|
||||
<view class="box-head">
|
||||
<view class="box-head-view" v-for="(item, index) in topHead" :key="item" :style="{
|
||||
borderRightWidth: index == 2 ? 0 : '1rpx'
|
||||
}">
|
||||
<text class="text-fu text-24">{{ item }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-all-view">
|
||||
<view class="list-view" v-for="(item, index) in topList" :key="index">
|
||||
<view class="list-view-box">
|
||||
<text class="text-fu text-24 text-bold">{{ item.amount }}</text>
|
||||
</view>
|
||||
<view class="list-view-box">
|
||||
<text class="text-fu text-24 text-bold">{{ item.time }}</text>
|
||||
</view>
|
||||
<view class="list-view-box" style="borderRightWidth:0">
|
||||
<text class="text-fu text-24 text-bold">{{ item.source }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="box-list" style="margin-top:24rpx;">
|
||||
<view class="head-box">
|
||||
<text class="text-gray text-28 text-bold">自购解锁</text>
|
||||
<text class="text-fu1 text-24 text-w-400">您的数字积分奖励将随着推广业绩的提升逐步解锁。</text>
|
||||
<image src="https://static.tbmall.xin/static/new/jia_icon.png" class="icon-img" mode=""></image>
|
||||
</view>
|
||||
<view class="box-li">
|
||||
<view class="box-biao">
|
||||
<view class="box-head">
|
||||
<view class="box-head-view" v-for="(item, index) in bottomHead" :key="item" :style="{
|
||||
borderRightWidth: index == 1 ? 0 : '1rpx'
|
||||
}">
|
||||
<text class="text-fu text-24">{{ item }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-all-view">
|
||||
<view class="list-view" v-for="(item, index) in bottomList" :key="index">
|
||||
<view class="list-view-box">
|
||||
<text class="text-fu text-24 text-bold">{{ item.amount }}</text>
|
||||
</view>
|
||||
<view class="list-view-box" style="borderRightWidth:0">
|
||||
<text class="text-fu text-24 text-bold">{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-panel mt-32 mb-32" v-if="curTab == 0">
|
||||
<text class="text-gray text-28 text-bold" style="font-weight: bold;">数字积分获取说明</text>
|
||||
<text class="text-fu text-24"
|
||||
style="margin-top:24rpx">1.商城优选区消费1:1获得贡献值,每消费1元获得1贡献值,次日根据当日商城营收占比获得数字积分。</text>
|
||||
<text class="text-fu text-24 " style="margin-top:24rpx">2.直推用户消费10:1获得贡献值,直推用户优选区每消费10元您将获得1积分。</text>
|
||||
<text class="text-fu text-24 " style="margin-top:24rpx">3.积分获得后均为锁定状态。</text>
|
||||
<text class="text-gray text-28 text-bold" style="margin-top:48rpx">数字积分解锁说明</text>
|
||||
<text class="text-fu text-24 " style="margin-top:24rpx">1.您本人在商城消费获得的积分,每日按1‰自然解锁。</text>
|
||||
<text class="text-fu text-24 " style="margin-top:24rpx">2.直推用户消费获得的贡献值5:1解锁您本人消费获得的数字积分。</text>
|
||||
<text class="text-fu text-24 "
|
||||
style="margin-top:24rpx">3.直推获得的奖励,根据您在商城的消费获得的贡献值2:1进行解锁,每获得2贡献值解锁1积分。</text>
|
||||
<text class="text-fu text-24 "
|
||||
style="margin-top:24rpx">4.直推获得的奖励有效期7日,7日未解锁的部分将自动归属于上级,上级获得该奖励后也为锁定状态有效期7日,7日未解锁的部分将自动销毁</text>
|
||||
<text class="text-fu text-24 "
|
||||
style="margin-top:24rpx">5.若发生退货退款等因素,信任桥将回收各部分奖励,若数字积分已兑换,则不符合7天无理由退货。</text>
|
||||
<text class="text-fu text-24 " style="margin-top:24rpx">6.最终解释权归信任桥所有。</text>
|
||||
</view>
|
||||
<!-- (2)转盘抽奖获得 -->
|
||||
<view class="tab-two-panel" v-if="curTab == 1">
|
||||
<mescroll-uni ref="mescrollRef" @down="downCallback" @up="upCallback" :up="upOption" :down="downOption"
|
||||
@init="mescrollInit" :fixed="false">
|
||||
<view class="mescrollUniView">
|
||||
<view class="dai-list-view" v-for="(item, index) in daiList" :key="index">
|
||||
<view class="dai-top">
|
||||
<view class="time-view">
|
||||
<text class="text-zu text-24" style="margin-right:12rpx">距销毁</text>
|
||||
<u-count-down :time="item.time" format="HH:mm:ss" autoStart millisecond
|
||||
@finish="onFinish" :ref="'time' + item.refId" @change="onChange($event, index)">
|
||||
<view class="time-panel">
|
||||
<view class="time__custom">
|
||||
<text class="text-24" style="color:#FE2E2E">{{
|
||||
item.timeData.days > 10 ? item.timeData.days : '0' + item.timeData.days}}</text>
|
||||
</view>
|
||||
<text class="text-zu text-24" style="margin:0 10rpx">天</text>
|
||||
<view class="time__custom">
|
||||
<text class="text-24" style="color:#FE2E2E">{{
|
||||
item.timeData.hours > 10 ? item.timeData.hours : '0' + item.timeData.hours}}</text>
|
||||
</view>
|
||||
<text class="text-24" style="margin:0 10rpx">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="text-24" style="color:#FE2E2E">{{ item.timeData.minutes
|
||||
}}</text>
|
||||
</view>
|
||||
<text class="text-24" style="margin:0 10rpx">:</text>
|
||||
<view class="time__custom">
|
||||
<text class="text-24" style="color:#FE2E2E">{{ item.timeData.seconds
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-count-down>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="dai-mid" style="margin-top:40rpx;">
|
||||
<text class="text-32 text-fu1">下级:</text>
|
||||
<text class="text-32 text-gray">{{ item.lowerLevelPhone }}</text>
|
||||
</view>
|
||||
<view class="dai-mid" style="margin-top:32rpx;">
|
||||
<text class="text-32 text-fu1">积分奖励总量:</text>
|
||||
<text class="text-32 text-gray">{{ item.expendAmount }}</text>
|
||||
</view>
|
||||
<view class="dai-progress" style="margin-top:40rpx;">
|
||||
<u-line-progress :percentage="item.unlockRatio" activeColor="#7934F6" height="16rpx"
|
||||
:showText="true"></u-line-progress>
|
||||
</view>
|
||||
<view class="dai-bottom">
|
||||
<text class="text-24 text-fu1">0</text>
|
||||
<text class="text-24 text-fu1">{{ item.Tbclockacmont }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <DownPopup :show="true"></DownPopup> -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserInfo } from '@/api/auth.js';
|
||||
import { getVcoinLocked, getVcoinReleaseLog, getUserExpendTbcList } from '@/api/finance.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 { quickens } from '@/pages/rwa_package/api/contract.js'
|
||||
import Decimal from 'decimal.js';
|
||||
import func from '@/utils/func.js'
|
||||
|
||||
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
|
||||
import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue";
|
||||
|
||||
|
||||
export default {
|
||||
mixins: [MescrollMixin],
|
||||
components: { Header, TopSafe, DownPopup, MescrollUni },
|
||||
data() {
|
||||
return {
|
||||
lockedData: null,
|
||||
topHead: ['解锁数量', '解锁时间', '触发解锁订单'],
|
||||
bottomHead: ['解锁数量', '解锁时间'],
|
||||
topList: [],
|
||||
bottomList: [],
|
||||
tabList: ['已解锁', '待解锁'],
|
||||
curTab: 0,
|
||||
daiList: [],
|
||||
upOption: {
|
||||
auto: false,
|
||||
page: {
|
||||
size: 10, // 每页数据的数量,默认10
|
||||
},
|
||||
noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
|
||||
empty: {
|
||||
tip: `空空如也`,
|
||||
},
|
||||
textColor: "#333",
|
||||
bgColor: "rgba(0,0,0,0)",
|
||||
},
|
||||
downOption: {
|
||||
auto: false,
|
||||
textColor: "#333",
|
||||
bgColor: "rgba(0,0,0,0)",
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
onChange(e, index) {
|
||||
this.daiList[index].timeData = e;
|
||||
|
||||
console.log('e', e)
|
||||
|
||||
},
|
||||
onFinish() {
|
||||
this.downCallback();
|
||||
},
|
||||
mescrollInit(mescroll) {
|
||||
this.mescroll = mescroll;
|
||||
},
|
||||
upCallback(page) {
|
||||
let pageNum = page.num;
|
||||
let pageSize = page.size;
|
||||
|
||||
let params = {
|
||||
status: 0,
|
||||
page: page.num,
|
||||
pageSize: page.size,
|
||||
};
|
||||
getUserExpendTbcList(params).then(res => {
|
||||
let curPageLen = '';
|
||||
if (res.data.entitys) {
|
||||
curPageLen = res.data.entitys.length;
|
||||
if (page.num === 1) this.daiList = [];
|
||||
this.daiList = this.daiList.concat(res.data.entitys);
|
||||
this.daiList.forEach(item => {
|
||||
item.time = item.endDate - item.date;
|
||||
item.timeData = {};
|
||||
})
|
||||
console.log('daiList', this.daiList)
|
||||
} else {
|
||||
curPageLen = 0;
|
||||
}
|
||||
|
||||
this.mescroll.endBySize(curPageLen, res.data.totalCount);
|
||||
})
|
||||
|
||||
},
|
||||
downCallback() {
|
||||
this.$nextTick(function () {
|
||||
this.mescroll && this.mescroll.resetUpScroll();
|
||||
});
|
||||
},
|
||||
onTab(index) {
|
||||
if (this.curTab != index) {
|
||||
this.curTab = index;
|
||||
if (this.curTab == 0) {
|
||||
this.daiList = [];
|
||||
} else {
|
||||
this.downCallback();
|
||||
}
|
||||
}
|
||||
},
|
||||
onJump(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/other_package/productInfo/productInfo?id=${item.refId}`
|
||||
})
|
||||
},
|
||||
init() {
|
||||
// this.isSignContract()
|
||||
this.vcoinLocked();
|
||||
this.vcoinReleaseLog(1);
|
||||
this.vcoinReleaseLog(2);
|
||||
// this.getQuichens()
|
||||
},
|
||||
vcoinLocked() {
|
||||
getVcoinLocked().then(res => {
|
||||
if (res.bizcode == 100) {
|
||||
this.lockedData = res.data;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
vcoinReleaseLog(val) {
|
||||
let params = {
|
||||
page: 1,
|
||||
pageSize: 10000,
|
||||
type: val
|
||||
}
|
||||
getVcoinReleaseLog(params).then(res => {
|
||||
if (res.bizcode == 100) {
|
||||
if (val == 1) {
|
||||
this.topList = res.data.entitys || [];
|
||||
} else {
|
||||
this.bottomList = res.data.entitys || [];
|
||||
}
|
||||
this.topList.forEach(item => {
|
||||
item.time = func.formatDate(new Date(item.ctdate), 4);
|
||||
})
|
||||
this.bottomList.forEach(item => {
|
||||
item.time = func.formatDate(new Date(item.ctdate), 4);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getQuichens() {
|
||||
let params = {
|
||||
page: 1,
|
||||
pageSize: 1000
|
||||
}
|
||||
quickens(params).then(res => {
|
||||
if (res.bizcode == 100) {
|
||||
// this.type = res.data;
|
||||
this.tList[0].text = res.data.vcoinsLock;
|
||||
this.tList[1].text = res.data.quickenBalance;
|
||||
this.topList[0].value = res.data.quickenTotal;
|
||||
this.topList[1].value = res.data.quickenValue;
|
||||
this.topList[2].value = res.data.quickenBalance;
|
||||
this.tableList = res.data.quickenDetail;
|
||||
this.tableList.forEach(item => {
|
||||
const ratio = new Decimal(item.quickenRate);
|
||||
item.one = ratio.times(100).toNumber() + '%';
|
||||
item.two = new Decimal(item.quickenValue);
|
||||
item.three = func.formatDate(new Date(item.ctdate), 3)
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onBtn() {
|
||||
if (this.type) {
|
||||
//查看
|
||||
uni.navigateTo({
|
||||
url: `/pages/rwa_package/insights/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;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
|
||||
.jia-img {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
display: flex;
|
||||
min-height: 240rpx;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tab-two-panel {
|
||||
width: 100%;
|
||||
height: calc(100% - 240rpx - 40rpx - 120rpx - 80rpx - 48rpx);
|
||||
min-height: calc(100% - 240rpx - 40rpx - 120rpx - 80rpx - 48rpx);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.mescrollUniView {
|
||||
width: calc(100vw - 64rpx);
|
||||
height: calc(100% - 240rpx - 40rpx - 120rpx - 80rpx - 48rpx);
|
||||
min-height: calc(100% - 240rpx - 40rpx - 120rpx - 80rpx - 48rpx);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.dai-list-view {
|
||||
width: 100%;
|
||||
height: 344rpx;
|
||||
min-height: 344rpx;
|
||||
margin-bottom: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16rpx;
|
||||
border: 2rpx solid #EAEAEA;
|
||||
|
||||
.dai-bottom {
|
||||
width: 100%;
|
||||
margin-top: 12rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.dai-progress {
|
||||
width: 100%;
|
||||
height: 16rpx;
|
||||
min-height: 16rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.time-view {
|
||||
width: 100%;
|
||||
height: 40rpx;
|
||||
min-height: 40rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
.time-panel {
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
.time__custom {
|
||||
width: 48rpx;
|
||||
height: 40rpx;
|
||||
background-color: rgba(254, 46, 46, 0.10);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dai-mid {
|
||||
width: 100%;
|
||||
height: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.dai-top {
|
||||
width: 100%;
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: cneter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-panel {
|
||||
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.box-top {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
min-height: 90rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tab-view {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
min-height: 80rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 2rpx solid #D0D7DE;
|
||||
box-sizing: border-box;
|
||||
margin-top: 48rpx;
|
||||
|
||||
.tab-list {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
|
||||
.tab-line {
|
||||
width: 48rpx;
|
||||
background-color: #7934F6;
|
||||
height: 4rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.box-list {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding: 24rpx 0 4rpx;
|
||||
box-sizing: border-box;
|
||||
background: rgba(121, 52, 246, 0.08);
|
||||
border-radius: 12rpx;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.box-li {
|
||||
width: calc(100% - 8rpx);
|
||||
height: 386rpx;
|
||||
min-height: 396rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 16rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.box-biao {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
border: 1rpx solid #eaeaea;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.list-all-view {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
|
||||
.list-view {
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
min-height: 64rpx;
|
||||
|
||||
.list-view-box {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-right: 1rpx solid #EAEAEA;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1rpx solid #EAEAEA;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.box-head {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
min-height: 80rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.box-head-view {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-right: 1rpx solid #EAEAEA;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1rpx solid #EAEAEA;
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.head-box {
|
||||
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
min-height: 88rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.icon-img {
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: -8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-view {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.table-list {
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
min-height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1rpx solid #EAEAEA;
|
||||
|
||||
.list-box {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.table-head {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
min-height: 80rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
|
||||
.head-box {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
background-color: #FAF8FE;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.border-lr {
|
||||
border-left: 1rpx solid #EAEAEA;
|
||||
border-right: 1rpx solid #EAEAEA;
|
||||
}
|
||||
|
||||
.border-left-1 {
|
||||
border-bottom-left-radius: 16rpx;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe></TopSafe>
|
||||
<Header title="查看合同" />
|
||||
<view class="contract-view">
|
||||
<view class="top-info flex-r-lr">
|
||||
<image src="https://static.tbmall.xin/static/new/he.png"></image>
|
||||
<view class="right-view">
|
||||
<text class="text-36 text-zu">{{ obj.contractName }}</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>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</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, fileUrls } from '@/pages/rwa_package/api/contract.js'
|
||||
import func from '@/utils/func.js';
|
||||
|
||||
export default {
|
||||
components: { Header, TopSafe, ContractItem },
|
||||
data() {
|
||||
return {
|
||||
dataList: [
|
||||
{ text: '合同状态', value: '签约完成' },
|
||||
{ text: '合同编号', value: '' },
|
||||
{ text: '发起方', value: '信任桥(深圳)网络科技有限公司' },
|
||||
{ text: '发起时间', value: '' },
|
||||
{ text: '完成时间', value: '' },
|
||||
],
|
||||
bottomList: [
|
||||
{ text: '签约人', value: '信任桥会员 章三' },
|
||||
{ text: '状态', value: '已签署' },
|
||||
{ text: '时间', value: '2025-08-11 12:00:00' },
|
||||
],
|
||||
obj: null,
|
||||
url: ''
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.isSignContract()
|
||||
},
|
||||
getfileUrls() {
|
||||
let params = {
|
||||
businessType: 'FLOW',
|
||||
businessIds: [this.obj.flowId]
|
||||
}
|
||||
fileUrls(params).then(res => {
|
||||
if (res.bizcode == 100) {
|
||||
this.url = res.data.fileUrls[0].url;
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
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[0].value = this.obj.state ? '已签署' : '未签署';
|
||||
this.dataList[1].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[1].value = this.obj.state ? '已签署' : '未签署';
|
||||
this.bottomList[2].value = this.obj.time;
|
||||
this.getfileUrls();
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
onOpen() {
|
||||
// #ifdef APP-PLUS
|
||||
uni.downloadFile({
|
||||
url: this.url,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.saveFile({
|
||||
tempFilePath: res.tempFilePath,
|
||||
success: (res) => {
|
||||
uni.openDocument({
|
||||
filePath: res.savedFilePath,
|
||||
success: (res) => {
|
||||
console.log('打开文档成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
window.open(this.url, '_blank')
|
||||
// #endif
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</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: 255rpx;
|
||||
margin-left: 25rpx;
|
||||
word-break: break-all;
|
||||
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>
|
||||
@@ -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.price}}
|
||||
<text class="text-24 text-fu text-d" style="margin-left:12rpx">
|
||||
¥{{obj.adPrice}}
|
||||
</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>
|
||||
@@ -0,0 +1,737 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe></TopSafe>
|
||||
<Header :isMid="true" >
|
||||
<template v-slot:mid>
|
||||
<view class="top-view">
|
||||
<view class="top-box-view flex-c" :style="{
|
||||
background:topSelect == index ? '#7934F6' : 'rgba(0,0,0,0)'
|
||||
}"
|
||||
v-for="(item,index) in topList" :key="index" @click="onTop(index)">
|
||||
<text class="text-28 " :style="{
|
||||
color:topSelect == index ? '#fff' : '#333'
|
||||
}">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</Header>
|
||||
<view class="top-line"></view>
|
||||
<scroll-view scroll-y="true" class="contract-view" v-if="topSelect == 0">
|
||||
<view class="top-head">
|
||||
<text class="text-32 text-gray text-bold">股权分布</text>
|
||||
<text class="text-28 text-fu">51%的股权回馈消费者(免费赠予)。<text v-if="currentUserData?.isNewUser">股权以积分形式发放</text></text>
|
||||
</view>
|
||||
<view class="tu-view">
|
||||
<!-- <view class="tu-box"> -->
|
||||
<qiun-data-charts
|
||||
type="ring"
|
||||
canvasId="four_one"
|
||||
:canvas2d="isCanvas2d"
|
||||
:resshow="delayload"
|
||||
:opts="oneOps"
|
||||
:inScrollView="true"
|
||||
:chartData="oneData"/>
|
||||
|
||||
</view>
|
||||
<view class="top-line" v-if="currentUserData?.isNewUser"></view>
|
||||
<view class="top-head" v-if="currentUserData?.isNewUser">
|
||||
<text class="text-32 text-gray text-bold">股权赠予计划</text>
|
||||
<text class="text-28 text-fu">51%的股权分五期赠送,前4期每期10%,第五期11%其他分配则为:投资机构,基金会,活动激励,运营团队,推广奖励的集合。</text>
|
||||
</view>
|
||||
<view class="tu-view" v-if="currentUserData?.isNewUser">
|
||||
<qiun-data-charts
|
||||
type="ring"
|
||||
canvasId="four_two"
|
||||
:canvas2d="isCanvas2d"
|
||||
:resshow="delayload"
|
||||
:opts="twoOps"
|
||||
:inScrollView="true"
|
||||
:chartData="twoData"/>
|
||||
</view>
|
||||
<view class="bottom-view" v-if="currentUserData?.isNewUser">
|
||||
<text class="text-32 text-gray text-bold">免费赠予详细规则</text>
|
||||
<view class="bottom-head">
|
||||
<view class="head-one">
|
||||
<text class="text-24 text-fu">期数</text>
|
||||
</view>
|
||||
<view class="head-two">
|
||||
<text class="text-24 text-fu">赠予规则</text>
|
||||
</view>
|
||||
<view class="head-three">
|
||||
<text class="text-24 text-fu">开启下一期规则</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-value-view">
|
||||
<view class="bottom-value-view-row" v-for="(item,index) in oneList" :key="index">
|
||||
<view class="head-one-one" :style="{'border-radius':index == 4 ? '0 0 0 16rpx' : 0,}">
|
||||
<text class="text-24 text-fu">{{item.one}}</text>
|
||||
</view>
|
||||
<view class="head-two-two">
|
||||
<text class="text-24 text-fu">{{item.two}}</text>
|
||||
</view>
|
||||
<view class="head-three-three"
|
||||
:style="{'border-radius':index == 4 ? '0 0 16rpx 0' : 0,'border-left-color':index == 0 ? '#eaeaea' : 'rgba(0,0,0,0)'}">
|
||||
<text class="text-24 text-fu">{{item.three}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view scroll-y="true" class="contract-view" v-if="topSelect == 1 && curData">
|
||||
<view class="two-top-tab-view">
|
||||
<view v-for="(item,index) in twoTopList" @click="onTwoTop(index)" :key="index" class="two-top-list">
|
||||
<text class="text-28 " :style="{
|
||||
color:index == curTopTwo ? '#7934f6' : '#666'
|
||||
}">{{item}}</text>
|
||||
<view class="two-top-line" v-if="index == curTopTwo"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top-head-1">
|
||||
<text class="text-32 text-gray text-bold">总营收</text>
|
||||
<text class="text-48 text-gray text-bold">¥
|
||||
<text class="text-64 text-gray ">{{curData.totalProfitSharing || 0}}</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="top-head-1" v-if="curTopTwo == 1">
|
||||
<text class="text-32 text-gray text-bold">利润</text>
|
||||
<text class="text-48 text-gray text-bold">¥
|
||||
<text class="text-64 text-gray ">{{curData.profitAmount || 0}}</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="top-line"></view>
|
||||
<view class="top-head">
|
||||
<text class="text-32 text-gray text-bold">商城分配数据</text>
|
||||
</view>
|
||||
<view class="tu-view">
|
||||
<qiun-data-charts
|
||||
v-if="threeData.series.length"
|
||||
type="ring"
|
||||
canvasId="four_three"
|
||||
:canvas2d="isCanvas2d"
|
||||
:resshow="delayload"
|
||||
:opts="threeOps"
|
||||
:inScrollView="true"
|
||||
:chartData="threeData"/>
|
||||
</view>
|
||||
<view class="bottom-view">
|
||||
<text class="text-32 text-gray text-bold">分配明细数据</text>
|
||||
<view class="bottom-head">
|
||||
<view class="head-one" style="width:278rpx">
|
||||
<text class="text-24 text-fu">名称</text>
|
||||
</view>
|
||||
<view class="head-two" style="width:234rpx">
|
||||
<text class="text-24 text-fu">金额</text>
|
||||
</view>
|
||||
<view class="head-three">
|
||||
<text class="text-24 text-fu">占比</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-value-view">
|
||||
<view class="bottom-value-view-row" v-for="(item,index) in threeData.series" :key="index">
|
||||
<view class="head-one-one" style="width:278rpx" :style="{'border-radius':index == 4 ? '0 0 0 16rpx' : 0,}">
|
||||
<text class="text-24 text-fu">{{item.name}}</text>
|
||||
<u-icon v-if="item.tips" name="question-circle" style="margin-left:12rpx;" color="#333" size="14" @click="onTips(item.tips)" ></u-icon>
|
||||
</view>
|
||||
<view class="head-two-two" style="width:234rpx">
|
||||
<text class="text-24 text-fu">{{item.amount}}</text>
|
||||
</view>
|
||||
<view class="head-three-three"
|
||||
:style="{'border-radius':index == 4 ? '0 0 16rpx 0' : 0}">
|
||||
<text class="text-24 text-fu">{{item.data}}%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top-line" style="margin-top:20rpx;"></view>
|
||||
<view class="top-head">
|
||||
<text class="text-32 text-gray text-bold">商城营收数据</text>
|
||||
</view>
|
||||
<view class="tab-view-one">
|
||||
<view v-for="(item,index) in tabOne" :key="index" @click="onOne(index)" :style="{
|
||||
background:index == curOne ? 'rgba(121, 52, 246, 0.1)' : '#F5F5F5'
|
||||
}">
|
||||
<text class="text-24 text-zi" :style="{color:index == curOne ? '#7934F6' : '#999'}">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tu-view-one" style="margin-top:32rpx">
|
||||
<!-- <view class="charts-box">
|
||||
<qiun-data-charts
|
||||
type="line"
|
||||
canvasId="scrolllineid"
|
||||
:opts="{enableScroll:true,xAxis:{scrollShow:true,itemCount:4,disableGrid:true}}"
|
||||
:chartData="fourData"
|
||||
:ontouch="true"
|
||||
:canvas2d="true"
|
||||
/>
|
||||
</view> -->
|
||||
<qiun-data-charts
|
||||
type="area" :ontouch="true" :canvas2d="isCanvas2d" canvasId="scrolllineid"
|
||||
:inScrollView="true"
|
||||
:opts="fourOps" :chartData="fourData"/>
|
||||
</view>
|
||||
<view class="tab-view-two">
|
||||
<view class="tab-view-two-two" v-for="(item,index) in tabTwo" :key="index" @click="onTwo(index)" >
|
||||
<text class="text-32 text-zi" style="font-weight: 500;" :style="{color:index == curTwo ? '#7934F6' : '#999'}">{{item}}</text>
|
||||
<view class="line-view" v-if="index == curTwo"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top-head">
|
||||
<text class="text-32 text-gray text-bold">已分配总额:{{fiveTotal}}</text>
|
||||
</view>
|
||||
<view class="tu-view-one" style="margin:32rpx 0">
|
||||
<qiun-data-charts type="area" :ontouch="true" :canvas2d="isCanvas2d" canvasId="scrolllineid1"
|
||||
:inScrollView="true"
|
||||
:opts="fourOps" :chartData="fiveData"/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/common/header.vue';
|
||||
import TopSafe from '@/components/common/top-safe.nvue'
|
||||
import { getProfitSharingData } from '@/api/finance.js'
|
||||
import qiunDataCharts from "@/pages/rwa_package/components/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue"
|
||||
|
||||
import { getUserInfo } from '@/api/auth.js';
|
||||
export default {
|
||||
components: { Header,TopSafe,qiunDataCharts },
|
||||
data() {
|
||||
return {
|
||||
isCanvas2d: false,
|
||||
topSelect:0,
|
||||
twoTopList:['优选区','平价区'],
|
||||
curTopTwo:0,
|
||||
topList:[
|
||||
'股权架构','营收数据'
|
||||
],
|
||||
tabOne:['每日','每月'],
|
||||
curOne:0,
|
||||
tabTwo:['数字积分','利润共享计划'],
|
||||
// tabTwo:["利润共享计划"],
|
||||
curTwo:0,
|
||||
delayload: false,
|
||||
oneList:[
|
||||
{one:'第一期',two:'商城优选区消费1:1获得贡献值,每消费1元获得1贡献值,次日根据当日商城营收占比获得数字积分直推用户消费10:1获得贡献值,直推用户优选区每消费10元您将获得1积分',three:'4000万数字积分分配完成则开启第2期'},
|
||||
{one:'第二期',two:'待定,敬请期待',three:''},
|
||||
{one:'第三期',two:'待定,敬请期待',three:''},
|
||||
{one:'第四期',two:'待定,敬请期待',three:''},
|
||||
{one:'第五期',two:'待定,敬请期待',three:''},
|
||||
],
|
||||
oneOps:{
|
||||
label:{show:false},
|
||||
legend:{show:false},
|
||||
title:{name: '100%',fontSize:16,color:'#333',},
|
||||
subtitle: {name: '股权分布',fontSize:12,color:'#666',},
|
||||
extra: {
|
||||
ring: {
|
||||
ringWidth: 60,
|
||||
},
|
||||
}
|
||||
},
|
||||
oneData:{
|
||||
series:[
|
||||
{"name": "免费赠予消费者","data": 51,"color":"#7934F6",top:'108rpx',left:'32rpx'},
|
||||
{"name": "投资机构","data": 9,"color":"#AF39C4",top:0,right:'32rpx'},
|
||||
{"name": "基金会","data": 10,"color":"#0370FF",top:'108rpx',right:'32rpx'},
|
||||
{"name": "活动激励","data": 10,"color":"#00A6CC",top:'208rpx',right:'32rpx'},
|
||||
{"name": "运营团队","data": 10,"color":"#FFA700",top:'314rpx',right:'32rpx'},
|
||||
{"name": "推广奖励","data": 10,"color":"#00A776",top:'402rpx',right:'32rpx'},
|
||||
]
|
||||
},
|
||||
twoOps:{
|
||||
legend:{show:false},
|
||||
title:{name: '100%',fontSize:16,color:'#333',},
|
||||
subtitle: {name: '五期分配比例',fontSize:12,color:'#666',},
|
||||
|
||||
extra: {
|
||||
ring: {
|
||||
ringWidth: 60,
|
||||
},
|
||||
}
|
||||
},
|
||||
twoData:{
|
||||
series:[
|
||||
{"name": "其他分配集合","data": 49,"color":"#7934F6"},
|
||||
{"name": "第一期","data": 10,"color":"#AF39C4"},
|
||||
{"name": "第二期","data": 10,"color":"#0370FF"},
|
||||
{"name": "第三期","data": 10,"color":"#00A6CC"},
|
||||
{"name": "第四期","data": 10,"color":"#FFA700"},
|
||||
{"name": "第五期","data": 11,"color":"#00A776"},
|
||||
|
||||
]
|
||||
},
|
||||
threeData:{
|
||||
series:[]
|
||||
},
|
||||
threeOps:{
|
||||
legend:{show:false},
|
||||
title:{name: '100%',fontSize:16,color:'#333',},
|
||||
subtitle: {name: '分配分布',fontSize:12,color:'#666',},
|
||||
|
||||
extra: {
|
||||
ring: {
|
||||
ringWidth: 60,
|
||||
},
|
||||
}
|
||||
},
|
||||
fourData:{
|
||||
categories: [1,2,3,4,2,3,4,2,3,4,2,3,4,2,3,4,2,3,4,2,3,4,2,3,4],
|
||||
series: [{
|
||||
|
||||
name: "",
|
||||
data:['1','2','3','4','5','2','3','4','5','2','3','4','5','2','3','4','5','2','3','4','5','2','3','4','5']
|
||||
}]
|
||||
},
|
||||
fiveData:{
|
||||
categories: [1,2,3,4],
|
||||
series: [{
|
||||
|
||||
name: "",
|
||||
data:[]
|
||||
}],
|
||||
},
|
||||
fourOps:{
|
||||
color: ["#7632FF","#7632FF","#B039C2"],
|
||||
padding: [15,15,0,15],
|
||||
enableScroll: true,
|
||||
legend: {show:false},
|
||||
xAxis: {
|
||||
scrollShow:true,
|
||||
itemCount:4,
|
||||
disableGrid: true,
|
||||
scrollAlign:'right'
|
||||
},
|
||||
|
||||
yAxis: {
|
||||
gridType: "dash",
|
||||
dashLength: 2,
|
||||
},
|
||||
extra: {
|
||||
area: {
|
||||
type: "straight",
|
||||
opacity: 0.2,
|
||||
addLine: true,
|
||||
width: 2,
|
||||
gradient: false,
|
||||
activeType: "hollow"
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
curData:null,
|
||||
fiveTotal:0,
|
||||
currentUserData:{}
|
||||
};
|
||||
},
|
||||
onReady(){
|
||||
// this.initTwo();
|
||||
this.getUserInfo();
|
||||
},
|
||||
onLoad() {
|
||||
// setTimeout(()=>{
|
||||
// this.init()
|
||||
// },500)
|
||||
this.profitSharingData();
|
||||
},
|
||||
methods: {
|
||||
// 查询用户等级
|
||||
async getUserInfo() {
|
||||
const result = await getUserInfo();
|
||||
if (result && result.bizcode === 100) {
|
||||
|
||||
this.currentUserData = result.data || {};
|
||||
if(!this.currentUserData?.isNewUser){
|
||||
this.tabTwo = this.tabTwo.filter((item) => item !== '数字积分');
|
||||
}
|
||||
}
|
||||
},
|
||||
onTwoTop(index){
|
||||
if(this.curTopTwo !== index){
|
||||
this.curTopTwo = index;
|
||||
this.profitSharingData();
|
||||
}
|
||||
},
|
||||
onTips(text){
|
||||
this.$refs.uToastRef.show({
|
||||
message: text,
|
||||
});
|
||||
},
|
||||
onTop(index){
|
||||
if(this.topSelect !== index){
|
||||
this.topSelect = index;
|
||||
}
|
||||
},
|
||||
onOne(index){
|
||||
if(this.curOne !== index){
|
||||
this.curOne = index;
|
||||
this.getFour();
|
||||
}
|
||||
},
|
||||
onTwo(index){
|
||||
if(!this.currentUserData?.isNewUser){
|
||||
this.curTwo = 1;
|
||||
this.getFive();
|
||||
}else{
|
||||
if(this.curTwo !== index){
|
||||
this.curTwo = index;
|
||||
this.getFive();
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
getFive(){
|
||||
this.fiveData.categories = [];
|
||||
this.fiveData.series[0].data = [];
|
||||
this.fiveData.series[0].name = '';
|
||||
if(this.curTwo == 0){
|
||||
this.fiveTotal = this.curData.profitSharingTbcBonus.tbcTotal;
|
||||
let arr = this.curData.profitSharingTbcBonus.tbcList;
|
||||
if(arr){
|
||||
arr.forEach((item,index)=>{
|
||||
this.fiveData.categories.push(item.key);
|
||||
this.fiveData.series[0].data.push(item.amount);
|
||||
})
|
||||
}
|
||||
|
||||
}else{
|
||||
this.fiveTotal = this.curData.profitSharingTbcBonus.bonusTotal;
|
||||
let arr = this.curData.profitSharingTbcBonus.bonusList;
|
||||
let max = 0;
|
||||
if(arr){
|
||||
arr.forEach((item,index)=>{
|
||||
if(max < item.amount){
|
||||
max = item.amount;
|
||||
}
|
||||
this.fiveData.categories.push(item.key);
|
||||
this.fiveData.series[0].data.push(item.amount);
|
||||
})
|
||||
}
|
||||
|
||||
if(max != 0){
|
||||
max = max / 1000;
|
||||
}
|
||||
// this.fourOps.yAxis.data.max =
|
||||
}
|
||||
},
|
||||
getFour(){
|
||||
this.fourData.categories = [];
|
||||
this.fourData.series[0].data = [];
|
||||
this.fourData.series[0].name = '';
|
||||
if(this.curOne == 0){
|
||||
console.log('dayList',this.curData.profitSharingStat.dayList)
|
||||
let arr = this.curData.profitSharingStat.dayList;
|
||||
if(arr){
|
||||
arr.forEach((item,index)=>{
|
||||
this.fourData.categories.push(item.key);
|
||||
this.fourData.series[0].data.push(item.amount);
|
||||
})
|
||||
}
|
||||
|
||||
}else{
|
||||
let arr = this.curData.profitSharingStat.monthList;
|
||||
if(arr){
|
||||
arr.forEach((item,index)=>{
|
||||
this.fourData.categories.push(item.key);
|
||||
this.fourData.series[0].data.push(item.amount);
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
profitSharingData(){
|
||||
getProfitSharingData({type:this.curTopTwo + 1}).then(res=>{
|
||||
if (res.bizcode == 100) {
|
||||
this.curData = res.data;
|
||||
if(this.curData){
|
||||
this.threeData.series = [];
|
||||
for(let key in this.curData.profitSharingDetail){
|
||||
let arr = this.curData.profitSharingDetail[key]['name'].split('(');
|
||||
console.log('arr',arr)
|
||||
this.curData.profitSharingDetail[key]['name'] = arr[0];
|
||||
if(arr.length > 1){
|
||||
let str = arr[1];
|
||||
str = str.slice(0, str.length - 1);
|
||||
this.curData.profitSharingDetail[key]['tips'] = str;
|
||||
}else{
|
||||
this.curData.profitSharingDetail[key]['tips'] = '';
|
||||
}
|
||||
|
||||
this.curData.profitSharingDetail[key]['data'] = this.curData.profitSharingDetail[key]['percent'];
|
||||
this.threeData.series.push(this.curData.profitSharingDetail[key])
|
||||
}
|
||||
|
||||
this.getFour();
|
||||
this.getFive();
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.top-view{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height:72rpx;
|
||||
background-color: #eee;
|
||||
border-radius: 36rpx;
|
||||
.top-box-view{
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
height:100%;
|
||||
border-radius: 36rpx;
|
||||
|
||||
}
|
||||
}
|
||||
.top-line{
|
||||
width:100%;
|
||||
height:12rpx;
|
||||
min-height:12rpx;
|
||||
display: flex;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.two-top-tab-view{
|
||||
width:100%;
|
||||
height:88rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
min-height:88rpx;
|
||||
border-bottom:1rpx solid #D0D7DE;
|
||||
box-sizing: border-box;
|
||||
padding: 24rpx 32rpx 0;
|
||||
.two-top-list{
|
||||
height:100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-right:64rpx;
|
||||
.two-top-line{
|
||||
width:48rpx;
|
||||
height:4rpx;
|
||||
display: flex;
|
||||
background: #7934F6;
|
||||
}
|
||||
}
|
||||
}
|
||||
.contract-view{
|
||||
width:100%;
|
||||
height:calc(100% - 88rpx - 12rpx - var(--status-bar-height));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
.top-head-1{
|
||||
width:100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 40rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.tab-view-two{
|
||||
width:100%;
|
||||
height:54rpx;
|
||||
min-height:54rpx;
|
||||
margin-top:32rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding:0 32rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1rpx solid #eaeaea;
|
||||
.tab-view-two-two{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
justify-content: space-between;
|
||||
margin-right:48rpx;
|
||||
height:54rpx;
|
||||
min-height:54rpx;
|
||||
.line-view{
|
||||
width:48rpx;
|
||||
height:4rpx;
|
||||
min-height:4rpx;
|
||||
background-color: #7934F6;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tab-view-one{
|
||||
width:100%;
|
||||
height:48rpx;
|
||||
min-height:48rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding:0 32rpx;
|
||||
box-sizing: border-box;
|
||||
view{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding:0 32rpx;
|
||||
box-sizing: border-box;
|
||||
height:48rpx;
|
||||
border-radius: 24rpx;
|
||||
margin-right:24rpx;
|
||||
}
|
||||
}
|
||||
.top-head{
|
||||
width:100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 36rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
}
|
||||
.tu-view-one{
|
||||
display: flex;
|
||||
width:100%;
|
||||
min-height:400rpx;
|
||||
padding: 0 32rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
.tu-view{
|
||||
display: flex;
|
||||
width:100%;
|
||||
min-height:calc(100vw - 64rpx);
|
||||
padding: 0 32rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.tu-box{
|
||||
width:calc(100% - 100rpx);
|
||||
min-height:calc(100% - 200rpx);
|
||||
}
|
||||
.zi-box{
|
||||
position: absolute;
|
||||
left:32rpx;
|
||||
top:0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
.bottom-view{
|
||||
width:100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom:20rpx;
|
||||
.bottom-value-view{
|
||||
width:100%;
|
||||
border-radius: 0 0 16rpx 16rpx;
|
||||
flex-direction: column;
|
||||
// border-bottom:1rpx solid #eaeaea;
|
||||
// border-left:1rpx solid #eaeaea;
|
||||
// border-right:1rpx solid #eaeaea;
|
||||
display: flex;
|
||||
.bottom-value-view-row{
|
||||
width:100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.head-one-one{
|
||||
width:134rpx;
|
||||
height:100%;
|
||||
border-right:1rpx solid #eaeaea;
|
||||
border-left:1rpx solid #eaeaea;
|
||||
border-bottom:1rpx solid #eaeaea;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.head-two-two{
|
||||
width:318rpx;
|
||||
height:100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
border-bottom:1rpx solid #eaeaea;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.head-three-three{
|
||||
flex:1;
|
||||
padding: 20rpx;
|
||||
height:100%;
|
||||
border-left:1rpx solid #eaeaea;
|
||||
border-right:1rpx solid #eaeaea;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom:1rpx solid #eaeaea;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.bottom-head{
|
||||
width:100%;
|
||||
margin-top:28rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height:80rpx;
|
||||
min-height:80rpx;
|
||||
align-items: cneter;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
background-color: #F8F8F8;
|
||||
border:1rpx solid #F8F8F8;
|
||||
.head-one{
|
||||
width:134rpx;
|
||||
height:100%;
|
||||
border-right:1rpx solid #eaeaea;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.head-two{
|
||||
width:318rpx;
|
||||
max-height:318rpx;
|
||||
height:100%;
|
||||
border-right:1rpx solid #eaeaea;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.head-three{
|
||||
flex:1;
|
||||
height:100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe></TopSafe>
|
||||
<Header title="我的合同" />
|
||||
<view class="contract-view">
|
||||
<ContractItem :type="type" :text="obj && obj.signatureName" :time="obj && obj.time" class="mt-24" @click="onBtn">
|
||||
</ContractItem>
|
||||
</view>
|
||||
<u-modal :show="tipsShow" :showCancelButton="true" confirmText="去认证" @cancel="onTipsCancel" @confirm="onConfirm"
|
||||
confirmColor="#7934F6" title="提示" content='签署合同需要进行实名认证,请先完成实名认证'></u-modal>
|
||||
<DownPopup :show="downShow" @ok="onSignContract" @cancel="onCancel" />
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
<!-- 腾讯电子签H5 → 集成到UniApp -->
|
||||
<web-view v-if="signUrl" :src="signUrl" @message="handleMessage"></web-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 DownPopup from '@/components/common/down-popup.vue';
|
||||
import { getContractList, isSignContract, } from '@/pages/rwa_package/api/contract.js'
|
||||
import { getSignUrl, getMiniProgramSignUrl, signContract } from '@/api/order.js';
|
||||
import func from '@/utils/func.js';
|
||||
|
||||
export default {
|
||||
components: { Header, TopSafe, ContractItem, DownPopup },
|
||||
data() {
|
||||
return {
|
||||
type: false,
|
||||
obj: null,
|
||||
flowId: null,
|
||||
signUrl: null,
|
||||
downShow: false,
|
||||
tipsShow: false,
|
||||
userInfo: null
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
onLoad() {
|
||||
this.init();
|
||||
this.userinfo();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.isSignContract()
|
||||
|
||||
},
|
||||
userinfo() {
|
||||
getUserInfo().then(res => {
|
||||
if (res.bizcode == 100) {
|
||||
this.userInfo = res.data;
|
||||
}
|
||||
console.log('res', res)
|
||||
})
|
||||
},
|
||||
onConfirm() {
|
||||
this.onTipsCancel();
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine_package/mine_authentication/mine_authentication'
|
||||
})
|
||||
},
|
||||
onTipsCancel() {
|
||||
this.tipsShow = false;
|
||||
},
|
||||
onCancel() {
|
||||
this.downShow = false;
|
||||
},
|
||||
isSignContract() {
|
||||
isSignContract().then(res => {
|
||||
if (res.bizcode == 100) {
|
||||
this.type = res.data;
|
||||
if (this.type) {
|
||||
this.getSignContract()
|
||||
}
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
getSignContract() {
|
||||
getContractList().then(res => {
|
||||
if (res.bizcode == 100 && res.data.length) {
|
||||
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/rwa_package/insights/check`
|
||||
})
|
||||
} else {
|
||||
//去签署
|
||||
this.downShow = true;
|
||||
}
|
||||
},
|
||||
// 发起合同签章
|
||||
async onSignContract() {
|
||||
if (this.userInfo.certStatus == 0) {
|
||||
this.downShow = false;
|
||||
this.tipsShow = true;
|
||||
return;
|
||||
} else if (this.userInfo.certStatus == 1) {
|
||||
this.downShow = false;
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'success',
|
||||
message: '请耐心等待审核通过',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const { bizcode, data } = await signContract();
|
||||
if (bizcode === 100) {
|
||||
this.flowId = data.flowId;
|
||||
|
||||
if (this.flowId)
|
||||
// #ifdef APP-PLUS || WEB
|
||||
this.onGetSignUrl(this.flowId);
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
// 小程序
|
||||
uni.showModal({
|
||||
title: "请复制链接前往APP签署合同?",
|
||||
content: `APP下载地址:https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/document/android/trustbridge.apk`,
|
||||
confirmText: "复制链接",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
copyData('https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/document/android/trustbridge.apk');
|
||||
}
|
||||
},
|
||||
});
|
||||
// this.onGetMiniProgramSignUrl(this.flowId)
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
|
||||
// 获取H5签署链接
|
||||
async onGetSignUrl(flowId) {
|
||||
const params = {
|
||||
// 需要的参数
|
||||
flowId: flowId,
|
||||
}
|
||||
const { bizcode, data } = await getSignUrl(params);
|
||||
if (bizcode === 100) {
|
||||
this.downShow = false;
|
||||
this.signUrl = data.flowApproverUrlInfos[0].longUrl;
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "获取签署链接失败,请稍后再试",
|
||||
});
|
||||
return null;
|
||||
}
|
||||
},
|
||||
// 获取跳转至腾讯电子签小程序的签署链接
|
||||
async onGetMiniProgramSignUrl(flowId) {
|
||||
const params = {
|
||||
flowId: flowId,
|
||||
// endPoint: 'HTTP_SHORT_URL'
|
||||
}
|
||||
const { bizcode, data } = await getMiniProgramSignUrl(params);
|
||||
if (bizcode === 100) {
|
||||
console.log("", data);
|
||||
this.openTencentESign(data.schemeUrl);
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "获取签署链接失败,请稍后再试",
|
||||
});
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
// 电子签的回调地址
|
||||
handleMessage(e) {
|
||||
const data = e.detail;
|
||||
console.log('电子签的回调地址', e);
|
||||
},
|
||||
// 小程序签名
|
||||
openTencentESign(signPath) {
|
||||
// 这个链接需要后端调用腾讯电子签 API 获取
|
||||
uni.navigateToMiniProgram({
|
||||
appId: 'wxa023b292fd19d41d', // 腾讯电子签官方小程序的 appId
|
||||
path:"pages/home/home", // 跳转到的页面路径 + 参数
|
||||
extraData: {}, // 如果需要传额外参数
|
||||
envVersion: 'release', // 小程序版本 release / trial / develop
|
||||
success(res) {
|
||||
console.log('跳转成功', res)
|
||||
},
|
||||
fail(err) {
|
||||
console.error('跳转失败', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe bgColor="#fff"></TopSafe>
|
||||
<view class="search-view">
|
||||
<view class="head-view">
|
||||
<u-icon size="30rpx" name="arrow-left" @click="onBack" color="#333"></u-icon>
|
||||
<view class="search-box">
|
||||
<input class="input-view wx-width" v-model="searchInput"></input>
|
||||
<!-- <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-white">搜索</text>
|
||||
</view>
|
||||
</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,
|
||||
})
|
||||
},
|
||||
onBack() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
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: 150rpx;
|
||||
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 22rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #7932FE;
|
||||
|
||||
.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: 118rpx;
|
||||
min-height: 118rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
/* #ifdef MP-WEIXIN */
|
||||
padding-top: 80rpx !important;
|
||||
height: auto !important;
|
||||
min-height: calc(118rpx + 80rpx) !important;
|
||||
/* #endif */
|
||||
|
||||
.search-box {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
min-height: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: 16rpx;
|
||||
border: 2rpx solid #7932FE;
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
width: 156rpx;
|
||||
height: 100%;
|
||||
border-radius: 16rpx;
|
||||
background: linear-gradient(270deg, #B164FB 0%, #7934F6 100%);
|
||||
}
|
||||
|
||||
.input-view {
|
||||
height: 72rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 30rpx !important;
|
||||
border-radius: 36rpx;
|
||||
margin-left: 12rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* #ifdef MP-WEIXIN */
|
||||
.wx-width {
|
||||
width: 350rpx !important;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user