diff --git a/pages/mine/registerCode.vue b/pages/mine/registerCode.vue index 39265d1..e54ad86 100644 --- a/pages/mine/registerCode.vue +++ b/pages/mine/registerCode.vue @@ -1,7 +1,7 @@ @@ -95,6 +93,7 @@ howMany: 1, projectId: '', phone:'', + projectId:'', projectName:'xxx' }, daitiReceptionobj: {}, @@ -121,27 +120,28 @@ }, methods: { - save() { + save() { if (this.parames.name.length == 0) { - uni.showToast({ + uni.showToast({ icon: "none", title: "姓名不能为空" }) return; } }, - getPhoneNumber(e){ - console.log(e) + getPhoneNumber(e){ this.qrCodeUrl = domain.baseUrl if(e.detail.errMsg=="getPhoneNumber:ok"){ let data = { code:e.detail.code, + appid:uni.getAccountInfoSync().miniProgram.appId, } uni.request({ url:this.qrCodeUrl + '/code/loginSessionKey', method:"GET", data, success:(res)=> { + console.log(res.data.data) let phoneNum = JSON.parse(res.data.data).phone_info.phoneNumber this.parames.phone = phoneNum if(this.parames.phone!=null && this.parames.phone!=""){ @@ -160,14 +160,19 @@ 'Access-Token': uni.getStorageSync('weapp_session_login_data').token }, success: (addres) => { - console.log(addres.data,111) if(addres.data.code == 10000){ uni.reLaunch({ url:'/pages/mine/registerResult' }) + }else{ + uni.showToast({ + icon: "none", + title: addres.data.message + }) } } }) + } } @@ -176,7 +181,6 @@ }else{ return; } - }, changeSex(sex) { this.parames.sex = sex;