会员卡页面
This commit is contained in:
@@ -43,31 +43,20 @@
|
||||
<view class="subtitle">
|
||||
<u-notice-bar :text="cardText" icon="" bgColor="" duration="3000" color="#fcc692" direction="column">
|
||||
</u-notice-bar>
|
||||
</view>
|
||||
<view class="btn" @click="openVip" v-if="userInfo.identity.length === 0">开通</view>
|
||||
</view>
|
||||
<!-- v-if="userInfo.identity.length === 0" -->
|
||||
<view class="btn" @click="openVip">开通</view>
|
||||
</view>
|
||||
|
||||
<!-- 健康数据 -->
|
||||
<view class="health-flex" v-if="userInfo.has_record">
|
||||
<view class="health-flex-item">
|
||||
<view class="title">
|
||||
共力值
|
||||
<image class="icon" src="@/static/user/icon_04.png" mode="widthFix" />
|
||||
</view>
|
||||
<view class="num">
|
||||
{{ userInfo.record.fat.fat }}
|
||||
</view>
|
||||
<view class="hith">{{ userInfo.record.fat.text }}</view>
|
||||
<view class="health-flex">
|
||||
<view class="health-flex-item" @click="onBtn('AccountIntegral', {})">
|
||||
<view class="title">共力值</view>
|
||||
<view class="num">0.00</view>
|
||||
</view>
|
||||
<view class="health-flex-item">
|
||||
<view class="title">
|
||||
DT积分
|
||||
<image class="icon" src="@/static/user/icon_05.png" mode="widthFix" />
|
||||
</view>
|
||||
<view class="num">
|
||||
{{ userInfo.record.weight.weight }}
|
||||
</view>
|
||||
<view class="hith">{{ userInfo.record.weight.text }}</view>
|
||||
<view class="health-flex-item" @click="onBtn('AccountDt', {})">
|
||||
<view class="title">DT积分</view>
|
||||
<view class="num">0.00</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单 -->
|
||||
@@ -182,50 +171,7 @@
|
||||
},
|
||||
// 开通会员
|
||||
openVip() {
|
||||
if (this.isLogin()) {
|
||||
uni.showActionSheet({
|
||||
itemList: ['我是新用户', '我是老用户'],
|
||||
success: res => {
|
||||
switch (res.tapIndex) {
|
||||
case 0:
|
||||
uni.showModal({
|
||||
title: '开通提示',
|
||||
content: '平台新用户完成首笔订单,即可获赠ZH健康会员',
|
||||
showCancel: false,
|
||||
cancelText: '去完成',
|
||||
success: res => {
|
||||
console.log(res);
|
||||
this.$Router.pushTab({
|
||||
name: 'Store'
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
uni.showToast({
|
||||
title: '老用户渠道暂未开放',
|
||||
icon: 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 开通钱包
|
||||
onWallet() {
|
||||
if (this.isLogin()) {
|
||||
if (this.userInfo.is_wallet) this.$Router.push({
|
||||
name: 'WalletProperty'
|
||||
});
|
||||
else this.$Router.push({
|
||||
name: 'WalletAdd'
|
||||
});
|
||||
}
|
||||
},
|
||||
// 个人档案
|
||||
onFiles() {
|
||||
console.log("登录")
|
||||
this.$Router.push({name: 'Vip'})
|
||||
},
|
||||
// 按钮导航
|
||||
onBtn(name, params) {
|
||||
@@ -448,7 +394,6 @@
|
||||
border-radius: $radius;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
|
||||
.title {
|
||||
font-size: $title-size-lg;
|
||||
|
||||
@@ -460,22 +405,15 @@
|
||||
margin-bottom: 2rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.num {
|
||||
font-weight: bold;
|
||||
font-size: $title-size + 10;
|
||||
padding: $padding/3 0;
|
||||
|
||||
padding: $padding/3 0 0;
|
||||
text {
|
||||
font-size: 70%;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.hith {
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user