|
|
@@ -554,7 +554,7 @@ export default {
|
|
|
} else {
|
|
|
this.checkCertification = -1
|
|
|
}
|
|
|
- this.isVip = res.data.isVip
|
|
|
+ // this.isVip = res.data.isVip
|
|
|
this.shopStatus = res.data.shopStatus
|
|
|
this.$queue.setData('avatar', res.data.avatar ? res.data.avatar : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png')
|
|
|
this.$queue.setData('userId', res.data.userId)
|
|
|
@@ -563,6 +563,24 @@ export default {
|
|
|
this.$queue.setData('userName', res.data.userName ? res.data.userName : res.data.nickName)
|
|
|
this.avatar = res.data.avatar ? res.data.avatar : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'
|
|
|
this.userName = res.data.userName ? res.data.userName : res.data.nickName
|
|
|
+
|
|
|
+ const vip=res.data.isVip==1?true:false
|
|
|
+
|
|
|
+ // 2. 解析为时间戳(毫秒)
|
|
|
+ const expireTimestamp = new Date(res.data.vipExpirationTime).getTime();
|
|
|
+ // 获取当前时间的时间戳
|
|
|
+ const currentTimestamp = new Date().getTime();
|
|
|
+ if(vip==true){
|
|
|
+ // 3. 比较:当前时间 > 有效期 → 已过期
|
|
|
+ if (currentTimestamp > expireTimestamp) {
|
|
|
+ this.isVip = false
|
|
|
+ // 这里写过期后的逻辑(比如提示用户、跳转页面等)
|
|
|
+ } else {
|
|
|
+ this.isVip = true
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.isVip = false
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|