Commit c6302b35 by yuzhenWang

修改申请加盟,客服,一次性code换token,已经发布生产

parent 90c9a0a0
...@@ -120,7 +120,8 @@ ...@@ -120,7 +120,8 @@
restrictedOrCanelContent: '', //禁用/注销展示文本 restrictedOrCanelContent: '', //禁用/注销展示文本
sharePosterObj: { invitationCode: '', inviteUserId: '' }, //通过分享海报进来 sharePosterObj: { invitationCode: '', inviteUserId: '' }, //通过分享海报进来
showVerificationCode: false, //验证码是否展示, showVerificationCode: false, //验证码是否展示,
miniShare:''//是否通过小程序分享邀请加盟进入 miniShare:'',//是否通过小程序分享邀请加盟进入
isInMiniProgram:dataHandling.h5RuntimeEnv()=="wechat-miniprogram"
} }
}, },
...@@ -180,7 +181,11 @@ ...@@ -180,7 +181,11 @@
}, window.location.href); }, window.location.href);
// #endif // #endif
} else { } else {
this.showVerificationCode = true
if(!this.isInMiniProgram){
this.showVerificationCode = true
}
// this.showVerificationCode = true
} }
}, },
...@@ -220,9 +225,9 @@ ...@@ -220,9 +225,9 @@
// uni.setStorageSync('loginType', 'visitor') // uni.setStorageSync('loginType', 'visitor')
// return // return
// } // }
// 之前登录过,但和申请加盟的账号不一致
console.log('走到这了',this.userInfo && (this.userInfo.mobile !== this.form.mobile)); // 没有运行在微信小程序内,才走这段
if (this.userInfo && (this.userInfo.mobile !== this.form.mobile)) { if (!this.isInMiniProgram&&this.userInfo && (this.userInfo.mobile !== this.form.mobile)) {
this.showVerificationCode = true this.showVerificationCode = true
uni.setStorageSync('loginType', 'visitor') uni.setStorageSync('loginType', 'visitor')
this.loginType = 'visitor' this.loginType = 'visitor'
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
<script> <script>
import api from '../../api/api'; import api from '../../api/api';
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import wx from 'weixin-js-sdk'
export default{ export default{
data(){ data(){
...@@ -245,7 +246,17 @@ ...@@ -245,7 +246,17 @@
}); });
// #endif // #endif
// #ifndef MP-WEIXIN // #ifndef MP-WEIXIN
window.open('https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e') // window.open('https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e')
if (uni.getStorageSync('mpCffp') == '1') {
let d = {
corpId: 'ww43cac1cf9dd6a3d0', //企业微信ID
url: 'https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e', //企业微信客户接入链接
}
let p = Object.keys(d).reduce((p, k, i) => p + `${i ? '&' : '?'}${k}=${d[k]}`, '');
wx.miniProgram.reLaunch({ url: `/pages/index/homePage${p}` }); //触发小程序刷新页面获取appId
} else {
window.open('https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e')
}
// #endif // #endif
}, },
goBack() { goBack() {
......
...@@ -98,6 +98,10 @@ ...@@ -98,6 +98,10 @@
visitorUuid:uni.getStorageSync('visitorUuid')?uni.getStorageSync('visitorUuid'):dataHandling.uuid() visitorUuid:uni.getStorageSync('visitorUuid')?uni.getStorageSync('visitorUuid'):dataHandling.uuid()
} }
api.loginVerification(params).then((res) => { api.loginVerification(params).then((res) => {
uni.hideLoading()
// uni.showModal({
// content:`${JSON.stringify(res)}`
// })
if (res['success']) { if (res['success']) {
// 账号禁用用户 // 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){ if(res.data.userIsActive&&res.data.userIsActive==2){
......
...@@ -213,7 +213,8 @@ ...@@ -213,7 +213,8 @@
dataToken: '', dataToken: '',
oldToken: '', //原始用户token oldToken: '', //原始用户token
pollTimer: '', pollTimer: '',
runEnv: dataHandling.h5RuntimeEnv() runEnv: dataHandling.h5RuntimeEnv(),
} }
}, },
computed: { computed: {
...@@ -356,9 +357,10 @@ ...@@ -356,9 +357,10 @@
} }
let _this = this let _this = this
param.isPayOrAuth = 1; param.isPayOrAuth = 1;
uni.showToast({ // uni.showModal({
content:`微信支付:${JSON.stringify(param)}` // content:`微信支付:${JSON.stringify(param)}`
}) // })
// return
api.wxAuthorize(param).then((res) => { api.wxAuthorize(param).then((res) => {
_this.paymentBtnDisabled = false; _this.paymentBtnDisabled = false;
......
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