1、新增旧货市场

2、新增用户等级
This commit is contained in:
2023-12-10 14:53:07 +08:00
parent a45d185c64
commit 17b2d8f117
112 changed files with 10795 additions and 6362 deletions
+76 -175
View File
@@ -2,27 +2,27 @@
<el-card shadow="never">
<view class="welcome">
尊敬的平台商家您好,目前您是我们平台的
<text>黄金VIP LV1</text>
<text>{{ userLevelStr }} LV{{ userInfo.userGrade + 1 }}</text>
客户,可享受相应会员权益~
</view>
<view class="user-info">
<view class="left">
<view class="member-card">
<view class="card-name">
<text class="name">黄金VIP</text>
<text class="level">LV1</text>
<text class="name">{{ userLevelStr }}</text>
<text class="level">LV{{ userInfo.userGrade + 1 }}</text>
<text class="grade">
当前等级
</text>
</view>
<view class="exp-time">
有效期至:2023-09-18
<view class="exp-time" v-if="userInfo.upgradeExpiredAt">
有效期至:{{ userInfo.upgradeExpiredAt }}
</view>
<view class="progress-box">
<view class="left">
<view class="total-pay">当前交易额</view>
<view class="progress">
<view class="price">60W</view>
<view class="price">{{ userInfo.transactionAmount }}</view>
<view class="desc">还差40W升级LV2</view>
</view>
<view class="progress-line">
@@ -55,136 +55,60 @@
</view>
</view>
</view>
<view class="equity">
<view class="equity" v-if="userInfo.userGrade > -1">
<el-image src="https://oss.wsdns.cn/20231205/5ba845c9570e4fba95516b68ae661056.png"/>
<!-- <i class="el-icon-minus"></i>-->
<!-- <text>可享受一下权益</text>-->
<!-- <i class="el-icon-minus"></i>-->
</view>
<div class="grade-list">
<div class="item">
<div class="item-box" style="background-color: #f7f7f7">
<div class="title">会员等级</div>
<div class="title">平台认证商家</div>
<div class="title">黄金VIP</div>
<div class="title">铂金VIP</div>
<div class="title">钻石VIP</div>
<div class="title">实力厂家</div>
<div class="title">实力商家</div>
<div class="title">实力加工厂</div>
<div class="title" v-for="(item, index) in userLevelList" :key="index">{{ item.name }}</div>
</div>
</div>
<div class="item">
<div class="item-box">
<div class="title">身份图标</div>
<div class="title">
<div class="title" v-for="(item, index) in userLevelList" :key="index">
<el-image class="level"
src="https://oss.wsdns.cn/20231205/cb35648023de4c40a0790c275962222f.png"></el-image>
</div>
<div class="title">
<el-image class="level"
src="https://oss.wsdns.cn/20231205/9816e24079d349068f52ba45c2786fb5.png"></el-image>
</div>
<div class="title">
<el-image class="level"
src="https://oss.wsdns.cn/20231205/11f497e8c11d45bb97b1939ac8ed68a1.png"></el-image>
</div>
<div class="title">
<el-image class="level"
src="https://oss.wsdns.cn/20231205/45ae2b50ca044f208edf2f411ed72da1.png"></el-image>
</div>
<div class="title">
<el-image class="level"
src="https://oss.wsdns.cn/20231205/10ae319c1bb045d3b871046c85f97432.png"></el-image>
</div>
<div class="title">
<el-image class="level"
src="https://oss.wsdns.cn/20231205/cea0d711c9004c57b14aec491e48c3ff.png"></el-image>
</div>
<div class="title">
<el-image class="level"
src="https://oss.wsdns.cn/20231205/a7445b2a6c224aee9115317f29867851.png"></el-image>
:src="item.icon[0]"/>
</div>
</div>
</div>
<div class="item">
<div class="item-box">
<div class="title">认证缴费</div>
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
<div class="title red">去认证<i class="el-icon-arrow-right"></i></div>
<div class="title red" v-for="(item, index) in userLevelList" :key="index">
去认证<i class="el-icon-arrow-right"></i>
</div>
</div>
</div>
<div class="item">
<div class="item-box">
<div class="title">获得身份方式</div>
<div class="title">
<div class="title" v-for="(item, index) in userLevelList" :key="index">
<div class="get-way">
<div>企业平台认证</div>
<div>VIP认证方法</div>
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
<template v-if="parseInt(item.amount) === 0">
<div>企业平台认证</div>
<div>VIP认证方法</div>
<div class="red pointer" @click="showForm('fadada')">去升级<i class="el-icon-arrow-right"></i></div>
</template>
<template v-else>
<div>购买</div>
<div>{{ item.amount }}元/年</div>
<div class="red pointer" @click="showForm('grade')">去升级<i class="el-icon-arrow-right"></i></div>
</template>
</div>
</div>
<div class="title">
<div class="get-way">
<div>购买</div>
<div>999元/年</div>
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
</div>
</div>
<div class="title">
<div class="get-way">
<div>购买</div>
<div>1999元/年</div>
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
</div>
</div>
<div class="title">
<div class="get-way">
<div>购买</div>
<div>5999元/年</div>
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
</div>
</div>
<div class="title">
<div class="get-way">
<div>购买+交易保证金</div>
<div>5999+20000</div>
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
</div>
</div>
<div class="title">
<div class="get-way">
<div>购买+交易保证金</div>
<div>5999+20000</div>
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
</div>
</div>
<div class="title">
<div class="get-way">
<div>购买+交易保证金</div>
<div>5999+20000</div>
<div class="red">去升级<i class="el-icon-arrow-right"></i></div>
</div>
</div>
</div>
</div>
<div class="item">
<div class="item-box">
<div class="title">询报价权益</div>
<div class="title">-</div>
<div class="title">-</div>
<div class="title">-</div>
<div class="title">-</div>
<div class="title">-</div>
<div class="title">-</div>
<div class="title">-</div>
<div class="title" v-for="(item, index) in userLevelList" :key="index">{{
parseInt(item.offerOffRate) === 100 ? '-' : `${parseInt(item.offerOffRate) / 10}折`
}}
</div>
</div>
</div>
</div>
@@ -199,12 +123,12 @@
<div class="title">会员权益</div>
</div>
</div>
<div class="item" v-for="(item, index) in gradeList" :key="index" @click="onChange(index)">
<div class="item" v-for="(item, index) in userPayEnsureList" :key="index" @click="onChange(index)">
<div class="item-box">
<div class="title">2023-01-01</div>
<div class="title">{{ item._add_time_str }}</div>
<div class="title">缴纳保证金</div>
<div class="title">¥20000</div>
<div class="title">钻石VIP LV1</div>
<div class="title">¥{{ item.amount }}</div>
<div class="title">-</div>
</div>
</div>
<view class="paginatio">
@@ -212,7 +136,8 @@
@current-change="search"
background
layout="prev, pager, next"
:total="10">
:page-size="pageSize"
:total="total">
</el-pagination>
</view>
</div>
@@ -290,93 +215,64 @@ export default {
select: 0,
comments: '实现视频并记录存档,收集相关纸质文件'
},
]
],
userLevelList: [],
userLevelStr: '普通用户',
userPayEnsureList: [],
pageSize: 10,
total: 0
}
},
created() {
this.getUserLevelList()
this.getUserPayEnsureList()
},
methods: {
getUserPayEnsureList(pageIndex = 1) {
vk.callFunction({
url: 'client/order/kh/getList',
data: {
pageIndex,
pageSize: this.pageSize
},
success: (res) => {
this.total = res.total
this.userPayEnsureList = res.rows
}
});
},
getUserInfo() {
vk.userCenter.getCurrentUserInfo({
success: (data) => {
if (data.userInfo.businessCard) {
this.form1.data = data.userInfo.businessCard
}
this.userInfo = data.userInfo
// 成功后的逻辑
console.log('用户信息: ', data);
if (data.userInfo.userLevel > -1) {
this.userLevelStr = this.userLevelList.find(level => parseInt(level.level) === parseInt(data.userInfo.userLevel)).name
}
}
});
},
onChange(money) {
this.money = money
},
onPay() {
const requestTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss')
const timestamp = dayjs().format('YYYYMMDDHHmmss')
let data = {
queryUrl: 'https://test-api-open.chinaums.com/v1/netpay/bills/get-qrcode',
timestamp,
nonce: 'rp84ufhfn20yneo3tp',
content: {
requestTimestamp,
mid: '898201612345678',
tid: '88880001',
instMid: 'QRPAYDEFAULT',
totalAmount: 1,
notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
}
}
/**
* 调用函数
*/
sdk.exec(data).then(res => {
const h = this.$createElement;
const result = JSON.parse(res);
if (result.errCode === 'SUCCESS') {
this.showQrcode = true
this.billQRCode = result.billQRCode
// this.$alert('', '请打开手机微信,扫一扫完成支付', {
// confirmButtonText: '确定',
// callback: action => {
// this.$message({
// type: 'success',
// message: `已完成支付`
// });
// }
// });
}
})
},
navTo(url) {
vk.navigateTo(url);
},
showForm(index) {
this.$emit('done', index);
},
search(pageIndex) {
// vk.callFunction({
// url: 'client/spot/goods/pub/getList',
// data: {
// pageIndex: pageIndex,
// pageSize: 20,
// keyword: this.keyword,
// categoryIds: this.checkCategoryList,
// provinceCodes: this.checkProvinceList
// },
// success: (data) => {
// console.log('data: ', data);
// data.rows.forEach(item => {
// try {
// item.addressStr = item.address.province.name + "-" + item.address.city.name + "-" + item.address.area.name
// } catch (err) {
// item.addressStr = ""
// }
// })
// this.goodsData = data
// }
// });
},
getUserLevelList() {
vk.callFunction({
url: 'client/userLevel/pub/getList',
data: {
pageIndex: 1,
pageSize: 200
},
success: (data) => {
this.userLevelList = data.rows
this.getUserInfo()
}
});
}
}
}
</script>
@@ -681,6 +577,11 @@ export default {
font-size: 13px;
line-height: 2em;
}
.level {
width: 80px;
height: 80px;
}
}
.info {