修复bug和更改会员界面

This commit is contained in:
yanran200730
2024-10-30 22:01:46 +08:00
parent e920251718
commit 56ee90ed30
6 changed files with 70 additions and 88 deletions

View File

@@ -57,7 +57,7 @@ export default new Vuex.Store({
state.showTemuAlert = flag
},
setLabelInfo(state, info) {
state.info = info
state.labelInfo = info
}
},
@@ -70,7 +70,7 @@ export default new Vuex.Store({
resolve(res.data)
}
})
// this.getLabelInfo()
store.dispatch('getLabelInfo')
})
},
@@ -78,7 +78,11 @@ export default new Vuex.Store({
return new Promise(resolve => {
request.post('/api/userExtend/getLabelDetail').then(res => {
if (res.code === 0) {
store.commit('setLabelInfo', res.data)
const isExpires = new Date().getTime() > new Date(res.data.expireTime).getTime() || res.data.skuUsed > res.data.skuTotal
store.commit('setLabelInfo', {
...res.data,
isExpires
})
resolve(res.data)
}
})