Commit 74bec2b7 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent d324ce2d
......@@ -60,7 +60,6 @@
sourceType: '',
slotParam: '',
vipList: [],
localToken: '',
appName: '河狸小故事',
isVip: false
}
......@@ -70,25 +69,23 @@
},
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) {
this.isVip = true
} else {
this.isVip = false
}
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
if (data.expireTime > 0) {
this.isVip = true
} else {
this.isVip = false
}
});
}
}
});
},
ttLoging() {
var that = this;
......@@ -130,7 +127,6 @@
data
}) => {
app.globalData.userId = data.idcode;
that.localToken = data.token;
saveToken(data.token)
// saveToken(
// 'A5CFAE67AF32E71D10CA6127546E82C20A8DE7C0EAAA5697BEEC2AC2E333F9945F433703067DF5142735505C42F58997'
......@@ -203,7 +199,11 @@
appId: "wxbd687630cd02ce1d",
path: 'pages/index/index',
extraData: wxData.params,
success(res) {},
success(res) {
setTimeout(() => {
that.isVipStatus()
}, 1000);
},
fail(res) {
// 未成功跳转到签约小程序
// console.log("wxSign fail=", res);
......
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