wangjiahai 1 year ago
parent
commit
e82ad85297
  1. 61
      pages/login/login.vue

61
pages/login/login.vue

@ -17,11 +17,13 @@
contentrefresh: "获取信息中,请稍后",
contentnomore: "没有更多数据了"
},
shareUrl: ''
//
middleware: null
}
},
onLoad(options) {
//
if (options != undefined && options.data != undefined) {
let shareData;
try {
@ -30,8 +32,7 @@
} catch (e) {
shareData = JSON.parse(decodeURIComponent(options.data))
}
if (this.stringIsNotEmpty(shareData.url))
this.shareUrl = shareData.url
this.middleware = shareData
}
this.getWxCode()
@ -80,15 +81,61 @@
uni.setStorageSync("satoken", res.data.data.token)
console.log("人员sid", res.data.data.sid);
console.log("token", res.data.data.token);
if (_this.stringIsNotEmpty(_this.shareUrl)) {
uni.reLaunch({
url: _this.shareUrl
});
if (_this.middleware != null) {
//
if ('share' == _this.middleware.functionName) {
uni.reLaunch({
url: _this.middleware.url
});
} else if ('bindCard' == _this.middleware
.functionName) {
_this.middleware.params.customerSid = res.data.data
.sid
_this.$api.pickUpCardBind(_this.middleware.params)
.then((resp) => {
uni.reLaunch({
url: _this.middleware.url
});
}).catch(e => {
uni.showModal({
title: '提示',
content: '绑卡时发生错误',
showCancel: false,
success: function(res) {
uni.switchTab({
url: '/pages/home/pickUpCard'
})
}
});
})
} else {
uni.showModal({
title: '提示',
content: '版本过低',
showCancel: false,
success: function(res) {
uni.switchTab({
url: '/pages/home/pickUpCard'
})
}
});
}
} else {
uni.switchTab({
url: '/pages/home/pickUpCard'
})
}
if (_this.stringIsNotEmpty(_this.shareUrl)) {
} else {
}
}
} else {
_this.status = 'more'

Loading…
Cancel
Save