|
@@ -71,6 +71,7 @@ export default {
|
|
|
verifyCode:'',//验证码
|
|
|
verifyText:'', //验证码提示
|
|
|
isSend:false,
|
|
|
+ showPopup:false,
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
@@ -161,33 +162,31 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- let codeData = {
|
|
|
- // mobile: this.tel,
|
|
|
- // code: this.verifyCode,
|
|
|
- // verifyType: 1,
|
|
|
+ let codeData = {
|
|
|
+ mobile: this.tel,
|
|
|
+ code: this.verifyCode,
|
|
|
+ verifyType: 1,
|
|
|
|
|
|
// mobile: this.tel,
|
|
|
// type: 'verification.code',
|
|
|
// verifycode: this.verifyCode
|
|
|
|
|
|
- mobile: this.tel,
|
|
|
- leavePhoneCustomerId:this.userId || '',
|
|
|
- code: this.verifyCode,
|
|
|
- houseId:this.houseId,
|
|
|
- source:2,
|
|
|
- fromPlatform:'前测',
|
|
|
- terminal:'7',
|
|
|
- };
|
|
|
- const validateCodeRes = await requestConfig('leavephone', codeData);
|
|
|
- if (validateCodeRes && validateCodeRes.success) { //成功
|
|
|
+ // mobile: this.tel,
|
|
|
+ // leavePhoneCustomerId:this.userId || '',
|
|
|
+ // code: this.verifyCode,
|
|
|
+ // houseId:this.houseId,
|
|
|
+ // source:2,
|
|
|
+ // fromPlatform:'前测',
|
|
|
+ // terminal:'7',
|
|
|
+ };
|
|
|
+ const validateCodeRes = await requestConfig('validate', codeData);
|
|
|
+ if (validateCodeRes && !validateCodeRes.success) { //成功
|
|
|
Toast({
|
|
|
- message: '留电成功',
|
|
|
+ message: '验证码输入错误',
|
|
|
});
|
|
|
return
|
|
|
} else {
|
|
|
- Toast({
|
|
|
- message: '验证码输入错误',
|
|
|
- });
|
|
|
+ this.fakeLeavePhone()
|
|
|
}
|
|
|
this.isSend = false;
|
|
|
},
|
|
@@ -196,31 +195,35 @@ export default {
|
|
|
brandCustomerId: this.userId || '',
|
|
|
brandId: $config.brandId,
|
|
|
mobile: this.tel || '',
|
|
|
- shareRoute: '',
|
|
|
houseId: this.houseId || '',
|
|
|
- attrs: ''
|
|
|
+ source: 2,
|
|
|
+ type: 2,
|
|
|
+ terminal: 7
|
|
|
};
|
|
|
// 获取登录用户的shareToken
|
|
|
- const signres = await requestConfig('generateShareSign', signParam, true);
|
|
|
- if (signres && signres.success && signres.single) {
|
|
|
- let shareToken = signres.single;
|
|
|
- console.log('刷新分享秘钥,当前为:', shareToken)
|
|
|
- let parm = {
|
|
|
- houseId: this.houseId || '',
|
|
|
- scene: "",
|
|
|
- brandCustomerId: this.userId || '',
|
|
|
- brandId: $config.brandId,
|
|
|
- mobile: this.tel || '',
|
|
|
- shareSign: shareToken,
|
|
|
- gdt_vid: "",
|
|
|
- url: window.location.href,
|
|
|
- };
|
|
|
- let result = await requestConfig('authorizedMobile', parm, true);
|
|
|
- if(result && result.success){
|
|
|
- Toast({
|
|
|
- message: '留电成功',
|
|
|
- });
|
|
|
- }
|
|
|
+ const signres = await requestConfig('leavephone', signParam, true);
|
|
|
+ if (signres && signres.success) {
|
|
|
+ // let shareToken = signres.single;
|
|
|
+ // console.log('刷新分享秘钥,当前为:', shareToken)
|
|
|
+ // let parm = {
|
|
|
+ // houseId: this.houseId || '',
|
|
|
+ // scene: "",
|
|
|
+ // brandCustomerId: this.userId || '',
|
|
|
+ // brandId: $config.brandId,
|
|
|
+ // mobile: this.tel || '',
|
|
|
+ // shareSign: shareToken,
|
|
|
+ // gdt_vid: "",
|
|
|
+ // url: window.location.href,
|
|
|
+ // };
|
|
|
+ // let result = await requestConfig('authorizedMobile', parm, true);
|
|
|
+ // if(result && result.success){
|
|
|
+ // Toast({
|
|
|
+ // message: '留电成功',
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ Toast({
|
|
|
+ message: '留电成功',
|
|
|
+ });
|
|
|
this.showUserInput = false;
|
|
|
}
|
|
|
|
|
@@ -269,9 +272,10 @@ export default {
|
|
|
},
|
|
|
share(){
|
|
|
if(window.__wxjs_environment === 'miniprogram'){
|
|
|
- Toast({
|
|
|
- message: '请点击右上角发起分享',
|
|
|
- });
|
|
|
+ // Toast({
|
|
|
+ // message: '请点击右上角发起分享',
|
|
|
+ // });
|
|
|
+ this.showPopup = true;
|
|
|
// wx.miniProgram.navigateTo({url: '/pages/transfer/transfer?event=openCustomerServiceChat&houseId='+this.houseId})
|
|
|
}else{
|
|
|
// window.location.href = shottingImg;
|