增加VIP会员

This commit is contained in:
唐明明
2024-04-09 17:29:23 +08:00
parent e520ff11d2
commit 70c5d15d44
16 changed files with 852 additions and 139 deletions

View File

@@ -14,9 +14,10 @@
{{userData.nickname}} <image v-if="userData.certification" class="userTop-icon" src="@/static/imgs/user_attestation.png"></image>
</view>
<view class="userTop-identity-tips">
普通用户 <image class="userTop-arrow" src="@/static/imgs/use_arrow.png"></image>
{{userData.identity.name}}<image class="userTop-arrow" src="@/static/imgs/use_arrow.png"></image>
</view>
</view>
</view>
<view class="user-vip" @click="$Router.push({name: 'vip'})">{{!userData.identity.can_open_vip && !userData.identity.can_renew_vip ? '会员权益': ''}}{{userData.identity.can_open_vip ? '开通会员': ''}}{{userData.identity.can_renew_vip ? '开通会员': ''}}</view>
</view>
<view class="userTop-height" v-else @click="$Router.push({name: 'Login'})">
<view class="userTop-head">
@@ -135,7 +136,16 @@
<view class="board-number">{{userData.business_orders_count.diff_count}}</view>
</view>
</view>
</view>
</view>
<view class="block-flex" v-if="userData.salesman" @click="onCallPhone(userData.salesman.username)">
<view class="block-flex-title">业务联系人</view>
<view>{{userData.salesman.nickname || '-'}}</view>
</view>
<!-- v-if="userData.identity.id > 1" -->
<view class="block-flex" @click="$Router.push({name: 'Tema'})">
<view class="block-flex-title">我的推荐</view>
<u-icon name="arrow-right"></u-icon>
</view>
<view class="tool">
<view class="tool-title">
其他工具
@@ -206,7 +216,12 @@
data() {
return {
userLogin : false, //登录状态
userData : {}, //用户数据
userData : {
identity: {
can_open_vip : false,
can_renew_vip : false
}
}, //用户数据
synthesisAll : '', // 综法数量
listArr : [], // 文章列表
page : {}, // 分页信息
@@ -231,7 +246,7 @@
methods:{
// 用户信息
userInfo() {
userIndex().then(res => {
userIndex().then(res => {
this.userData = res
}).catch(err => {
uni.showToast({
@@ -239,14 +254,19 @@
icon: "none"
})
})
},
// 拨打电话
onCallPhone(e){
wx.makePhoneCall({
phoneNumber: e,
fail: () => {}
})
},
// 综法订单数据数量
synthesisInfo() {
synthesisCount({channel: 'self'}).then(res => {
console.log(res)
this.synthesisAll = res
}).catch(err => {
uni.showToast({
@@ -281,7 +301,12 @@
}
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
.block-flex{
display: flex; color: gray; font-size: 32rpx; align-items: center; justify-content: space-between; padding: 20rpx 30rpx; line-height: 60rpx;
&-title{ color: #333; }
}
.userTop {
position: relative;
width: 100%;
@@ -300,7 +325,10 @@
padding: $padding;
box-sizing: border-box;
.userTop-height {
height: 110rpx;
height: 110rpx;
display: flex;
align-items: center;
flex-wrap: wrap;
.userTop-head {
width: 110rpx;
height: 110rpx;
@@ -317,7 +345,7 @@
}
}
.userTop-text {
width: calc(100% - 150rpx);
width: calc(100% - 310rpx);
float: left;
margin-left: 30rpx;
padding-top: $padding - 20;
@@ -354,7 +382,18 @@
margin-left: 4rpx;
}
}
}
}
.user-vip{
background: $mian-color;
color: white;
position: relative;
z-index: 1;
width: 170rpx;
font-size: 28rpx;
line-height: 70rpx;
border-radius: 35rpx;
text-align: center;
}
}
.userTop-see {
margin: 0 -10rpx;