|
|
@@ -59,13 +59,14 @@
|
|
|
isLogin: false,
|
|
|
token: '',
|
|
|
look:false,
|
|
|
- isWechat:true,
|
|
|
- phone: '',
|
|
|
- code: '',
|
|
|
- countdown: 60,
|
|
|
- timer: null,
|
|
|
- isSendingCode: false,
|
|
|
- isBinding: false
|
|
|
+ isWechat:true,
|
|
|
+ phone: '',
|
|
|
+ code: '',
|
|
|
+ countdown: 60,
|
|
|
+ timer: null,
|
|
|
+ isSendingCode: false,
|
|
|
+ isBinding: false,
|
|
|
+ query: {}
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -82,6 +83,12 @@
|
|
|
}else {
|
|
|
this.isWechat = navigator.userAgent.toLowerCase().includes('micromessenger');
|
|
|
}
|
|
|
+ if(options.shareType === 'COUPON' && options.shareContentId) {
|
|
|
+ this.query = {
|
|
|
+ shareType: options.shareType,
|
|
|
+ shareContentId: options.shareContentId
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
goPrivacy(){
|
|
|
@@ -99,10 +106,15 @@
|
|
|
},
|
|
|
login() {
|
|
|
if (this.look) {
|
|
|
- let ruri = encodeURIComponent('https://city.baoxianzhanggui.com/fragrance/');
|
|
|
- let appid = 'wx9dc677bd41e82569'
|
|
|
+ let ruri = ''
|
|
|
+ if(this.query.shareType && this.query.shareContentId) {
|
|
|
+ _this.back();
|
|
|
+ } else {
|
|
|
+ ruri = encodeURIComponent('https://city.baoxianzhanggui.com/fragrance/');
|
|
|
+ }
|
|
|
+ let appid = 'wx9dc677bd41e82569'
|
|
|
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${ruri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
title: '请同意《用户协议》和《隐私政策》',
|
|
|
icon: 'none'
|