更新打包配置
This commit is contained in:
@@ -1,226 +1,226 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe></TopSafe>
|
||||
<Header title="查看合同" />
|
||||
<view class="contract-view">
|
||||
<view class="top-info flex-r-lr">
|
||||
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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 '@/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>
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe></TopSafe>
|
||||
<Header title="查看合同" />
|
||||
<view class="contract-view">
|
||||
<view class="top-info flex-r-lr">
|
||||
<image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/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 '@/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>
|
||||
|
||||
@@ -1,89 +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>
|
||||
<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>
|
||||
|
||||
@@ -1,66 +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>
|
||||
<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>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,215 +1,215 @@
|
||||
<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 '@/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/dongjian/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
|
||||
// 小程序
|
||||
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: signPath, // 跳转到的页面路径 + 参数
|
||||
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>
|
||||
<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 '@/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/dongjian/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
|
||||
// 小程序
|
||||
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: signPath, // 跳转到的页面路径 + 参数
|
||||
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>
|
||||
|
||||
+404
-404
@@ -1,404 +1,404 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe bgColor="#fff"></TopSafe>
|
||||
<Header title="数字积分" bgColor="#fff" />
|
||||
<view class="contract-view">
|
||||
<image src="/static/new/jia_bg.png" class="jia-img">
|
||||
</image>
|
||||
<view class="box-panel">
|
||||
<view class="box-top">
|
||||
<view class="flex-c-lr" style="align-items: center;">
|
||||
<text class="text-40 text-bold text-zu1">{{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-zu1">{{lockedData ? lockedData.spreadLocked : 0}}</text>
|
||||
<text class="text-fu1 text-24 text-w-400">推广锁定量(数字积分)</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-list" style="margin-top:40rpx;">
|
||||
<view class="head-box">
|
||||
<text class="text-zu1 text-28 text-bold">推广解锁</text>
|
||||
<text class="text-fu1 text-24 text-w-400">获得2贡献值解锁1贡献值对应的数字积分直推奖励。</text>
|
||||
<image src="/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-zu1 text-28 text-bold">自购解锁</text>
|
||||
<text class="text-fu1 text-24 text-w-400">您的数字积分奖励将随着推广业绩的提升逐步解锁。</text>
|
||||
<image src="/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">
|
||||
<text class="text-zu1 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-zu1 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天无理由退货。</text>
|
||||
<text class="text-fu text-24 " style="margin-top:24rpx">5.最终解释权归信任桥所有。</text>
|
||||
</view>
|
||||
<!-- (2)转盘抽奖获得 -->
|
||||
|
||||
</view>
|
||||
<!-- <DownPopup :show="true"></DownPopup> -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserInfo } from '@/api/auth.js';
|
||||
import { getVcoinLocked,getVcoinReleaseLog } 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 '@/api/contract.js'
|
||||
import Decimal from 'decimal.js';
|
||||
import func from '@/utils/func.js'
|
||||
|
||||
|
||||
export default {
|
||||
components: { Header, TopSafe, DownPopup },
|
||||
data() {
|
||||
return {
|
||||
lockedData:null,
|
||||
topHead:['解锁数量','解锁时间','触发解锁订单'],
|
||||
bottomHead:['解锁数量','解锁时间'],
|
||||
topList:[],
|
||||
bottomList:[]
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
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/dongjian/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;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
|
||||
.jia-img {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
display: flex;
|
||||
min-height:240rpx;
|
||||
margin-bottom:40rpx;
|
||||
|
||||
}
|
||||
|
||||
.box-panel {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
|
||||
.box-top {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
min-height: 90rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.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:104rpx;
|
||||
height:88rpx;
|
||||
position: absolute;
|
||||
right:24rpx;
|
||||
bottom:0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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>
|
||||
<template>
|
||||
<view class="content">
|
||||
<TopSafe bgColor="#fff"></TopSafe>
|
||||
<Header title="数字积分" bgColor="#fff" />
|
||||
<view class="contract-view">
|
||||
<image src="/static/new/jia_bg.png" class="jia-img">
|
||||
</image>
|
||||
<view class="box-panel">
|
||||
<view class="box-top">
|
||||
<view class="flex-c-lr" style="align-items: center;">
|
||||
<text class="text-40 text-bold text-zu1">{{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-zu1">{{lockedData ? lockedData.spreadLocked : 0}}</text>
|
||||
<text class="text-fu1 text-24 text-w-400">推广锁定量(数字积分)</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-list" style="margin-top:40rpx;">
|
||||
<view class="head-box">
|
||||
<text class="text-zu1 text-28 text-bold">推广解锁</text>
|
||||
<text class="text-fu1 text-24 text-w-400">获得2贡献值解锁1贡献值对应的数字积分直推奖励。</text>
|
||||
<image src="/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-zu1 text-28 text-bold">自购解锁</text>
|
||||
<text class="text-fu1 text-24 text-w-400">您的数字积分奖励将随着推广业绩的提升逐步解锁。</text>
|
||||
<image src="/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">
|
||||
<text class="text-zu1 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-zu1 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天无理由退货。</text>
|
||||
<text class="text-fu text-24 " style="margin-top:24rpx">5.最终解释权归信任桥所有。</text>
|
||||
</view>
|
||||
<!-- (2)转盘抽奖获得 -->
|
||||
|
||||
</view>
|
||||
<!-- <DownPopup :show="true"></DownPopup> -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserInfo } from '@/api/auth.js';
|
||||
import { getVcoinLocked,getVcoinReleaseLog } 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 '@/api/contract.js'
|
||||
import Decimal from 'decimal.js';
|
||||
import func from '@/utils/func.js'
|
||||
|
||||
|
||||
export default {
|
||||
components: { Header, TopSafe, DownPopup },
|
||||
data() {
|
||||
return {
|
||||
lockedData:null,
|
||||
topHead:['解锁数量','解锁时间','触发解锁订单'],
|
||||
bottomHead:['解锁数量','解锁时间'],
|
||||
topList:[],
|
||||
bottomList:[]
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
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/dongjian/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;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
|
||||
.jia-img {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
display: flex;
|
||||
min-height:240rpx;
|
||||
margin-bottom:40rpx;
|
||||
|
||||
}
|
||||
|
||||
.box-panel {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
|
||||
.box-top {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
min-height: 90rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.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:104rpx;
|
||||
height:88rpx;
|
||||
position: absolute;
|
||||
right:24rpx;
|
||||
bottom:0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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>
|
||||
|
||||
@@ -1,257 +1,257 @@
|
||||
<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;
|
||||
.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>
|
||||
<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;
|
||||
.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