更新:谷歌支付、积分列表
This commit is contained in:
@@ -26,18 +26,22 @@
|
||||
<view class="vip-card-title">{{ $t('user.vip') }}</view>
|
||||
<view class="vip-card-content">
|
||||
<view class="vip-item-list">
|
||||
<view v-if="vipInfo.length > 0" v-for="vip in vipInfo">{{ vipTypeDict[vip.type] }}(有效期到 {{ parseTime(vip.endTime, '{y}-{m}-{d}') }})</view>
|
||||
<view v-if="vipInfo.length > 0" v-for="vip in vipInfo">{{ vipTypeDict[vip.type] }}(有效期到
|
||||
{{ parseTime(vip.endTime, '{y}-{m}-{d}') }})</view>
|
||||
<view v-else>办理课程VIP,畅享更多权益</view>
|
||||
</view>
|
||||
<wd-button v-if="vipInfo.length > 0" plain type="primary" size="small" @click="goSubscribe">{{ $t('vip.renewal') }}</wd-button>
|
||||
<wd-button v-if="vipInfo.length > 0" plain type="primary" size="small"
|
||||
@click="goSubscribe">{{ $t('vip.renewal') }}</wd-button>
|
||||
<wd-button v-else plain type="primary" size="small" @click="goSubscribe">{{ $t('vip.openVip') }}</wd-button>
|
||||
</view>
|
||||
<view class="vip-card-content">
|
||||
<view class="vip-item-list">
|
||||
<view v-if="vipInfoEbook.length > 0" v-for="vip in vipInfoEbook">电子书VIP{{ vipTypeDict[vip.type] }}(有效期到 {{ parseTime(vip.endTime, '{y}-{m}-{d}') }})</view>
|
||||
<view v-if="vipInfoEbook.length > 0" v-for="vip in vipInfoEbook">电子书VIP{{ vipTypeDict[vip.type] }}(有效期到
|
||||
{{ parseTime(vip.endTime, '{y}-{m}-{d}') }})</view>
|
||||
<view v-else>办理电子书VIP,畅享更多权益</view>
|
||||
</view>
|
||||
<wd-button v-if="!vipInfoEbook.length" plain type="primary" size="small" @click="goSubscribe">{{ $t('vip.openVip') }}</wd-button>
|
||||
<wd-button v-if="!vipInfoEbook.length" plain type="primary" size="small"
|
||||
@click="goSubscribe">{{ $t('vip.openVip') }}</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -50,14 +54,14 @@
|
||||
<view class="assets_row">{{ t('global.coin') }}</view>
|
||||
<view>{{userInfo.peanutCoin ?? 1}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view @click="goPointsList">
|
||||
<view class="assets_row">积分</view>
|
||||
<view>{{userInfo.jf ?? 1}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<!-- <view>
|
||||
<view class="assets_row">优惠卷</view>
|
||||
<view>0</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="chong_btn" @click="goRecharge">充 值</view>
|
||||
<!-- <text class="wallet_title">{{$t('my.coin')}}<uni-icons type="help" size="19" color="#666"></uni-icons></text>
|
||||
@@ -86,6 +90,7 @@
|
||||
import { getNotchHeight } from '@/utils/system'
|
||||
import { parseTime } from '@/utils/index'
|
||||
import { t } from '@/utils/i18n'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const sysStore = useSysStore()
|
||||
@@ -99,7 +104,7 @@
|
||||
// VIP信息
|
||||
const vipInfo = computed(() => userStore.userVips)
|
||||
const vipInfoEbook = computed(() => userStore.userEbookVip)
|
||||
|
||||
|
||||
// VIP类型字典
|
||||
const vipTypeDict = sysStore.vipTypeDict
|
||||
|
||||
@@ -212,7 +217,7 @@
|
||||
url: '/pages/user/recharge/index'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 跳转虚拟币页面
|
||||
*/
|
||||
@@ -221,12 +226,22 @@
|
||||
url: '/pages/user/virtual/index'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 跳转积分列表
|
||||
*/
|
||||
const goPointsList = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/points/index'
|
||||
})
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
getData()
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
getPlatform()
|
||||
getData()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -306,14 +321,14 @@
|
||||
border-radius: 15rpx;
|
||||
padding: 26rpx 30rpx 10rpx;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
||||
|
||||
|
||||
.vip-card-title {
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.vip-card-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -323,6 +338,7 @@
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.vip-item-list {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
@@ -412,7 +428,7 @@
|
||||
flex: 1;
|
||||
justify-content: space-around;
|
||||
text-align: center;
|
||||
transform:translateX(-20px);
|
||||
transform: translateX(-20px);
|
||||
|
||||
.assets_row {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
Reference in New Issue
Block a user