Commit 972be5f7 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 30bde367
......@@ -60,6 +60,7 @@
sourceType: '',
slotParam: '',
vipList: [],
localToken: '',
appName: '河狸小故事',
isVip: false
}
......@@ -69,8 +70,26 @@
},
onShow(options) {
this.ttLoging()
this.isVipStatus()
},
methods: {
isVipStatus() {
if (this.sourceType == 'android' && this.localToken) {
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
if (data.expireTime > 0) {
that.isVip = true
} else {
that.isVip = false
}
}
});
}
},
ttLoging() {
var that = this;
var obj = wx.getLaunchOptionsSync()
......@@ -111,6 +130,7 @@
data
}) => {
app.globalData.userId = data.idcode;
that.localToken = data.token;
saveToken(data.token)
// saveToken(
// 'A5CFAE67AF32E71D10CA6127546E82C20A8DE7C0EAAA5697BEEC2AC2E333F9945F433703067DF5142735505C42F58997'
......@@ -119,12 +139,7 @@
// that.handlePay()
if (data.activiteFlag == 101) {
if (data.expireTime > 0) {
that.isVip = true
} else {
that.isVip = false
that.handlePay()
}
} else {
setTimeout(() => {
redirectTo('home?activiteFlag=' + data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment