|
@@ -5,7 +5,7 @@
|
|
|
<view class="vipInfo">
|
|
|
<view class="left">
|
|
|
<view class="ownVip">当前会员:<text>{{setMealName||'普通用户'}}</text></view>
|
|
|
- <view class="endTime">会员到期时间: 2023-10-19 22:25:10</view>
|
|
|
+ <view class="endTime">会员到期时间: {{expireTime||'--'}}</view>
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
<image slot="icon" src="../../static/vipTypology-icon.png" mode="widthFix"></image>
|
|
@@ -20,14 +20,14 @@
|
|
|
<view class="listCard">
|
|
|
<view class="listTitle">激活记录</view>
|
|
|
<view class="listBox" v-if="activationList.length>0">
|
|
|
- <view class="list" v-for="item of 4">
|
|
|
+ <view class="list" v-for="(item,index) in activationList" :key="item.id">
|
|
|
<view class="vipTitle">
|
|
|
- <view class="">尊享会员</view>
|
|
|
+ <view class="">{{item.planningName}}</view>
|
|
|
<view class="">已激活</view>
|
|
|
</view>
|
|
|
<view class="listInfo">
|
|
|
- <view class="">激活码:<text>JTsjTIENS03J35ID</text></view>
|
|
|
- <view class="">激活时间: 2023-10-19 22:25:10</view>
|
|
|
+ <view class="">激活码:<text>{{item.serialNumber}}</text></view>
|
|
|
+ <view class="">激活时间: {{item.useTime}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -40,11 +40,14 @@
|
|
|
|
|
|
<script>
|
|
|
import {mealList} from '@/api/combo.js'
|
|
|
+ import {refreshVip} from '@/api/common.js'
|
|
|
import { selectActivationCode,getActivationList } from '@/api/vipActivation.js'
|
|
|
import { levelImgName } from '@/utils/config.js'
|
|
|
+ import{parseDate} from '@/utils/tool.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ expireTime:'',
|
|
|
redeemload: false,
|
|
|
activationList: [],
|
|
|
list:[],
|
|
@@ -63,14 +66,27 @@
|
|
|
this.vipQuery.phoneNum=this.userInfo.phoneNum
|
|
|
this.mealList()
|
|
|
this.get_activationList()
|
|
|
+ this.get_userinfo()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ // 用户信息
|
|
|
+ get_userinfo(){
|
|
|
+ refreshVip().then(res=>{
|
|
|
+ res.content.map((item)=>{
|
|
|
+ this.expireTime=parseDate(item.expirationTime, '{y}-{m}-{d} {h}:{m}:{s}' )
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 激活列表
|
|
|
get_activationList(){
|
|
|
getActivationList().then(res=>{
|
|
|
if(res.state=='Success'){
|
|
|
- this.activationList=res.content
|
|
|
+ res.content.content.map((item)=>{
|
|
|
+ item.useTime= parseDate(item.useTime,'{y}-{m}-{d} {h}:{m}:{s}')
|
|
|
+ })
|
|
|
+ this.activationList=res.content.content
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -98,6 +114,7 @@
|
|
|
uni.showToast({
|
|
|
title: '激活成功',
|
|
|
});
|
|
|
+ this.vipQuery.activationCode=''
|
|
|
this.get_activationList()
|
|
|
}else{
|
|
|
uni.showToast({
|
|
@@ -107,7 +124,7 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- // 获取套餐列表
|
|
|
+ // 获取套餐类型
|
|
|
mealList(){
|
|
|
mealList({currentPage:1,pageSize:99,status:1}).then(res=>{
|
|
|
if (res.state == 'Success') {
|