|
@@ -12,6 +12,32 @@
|
|
|
<button class="cu-btn round bg-gray margin-tb-sm lg" style="width: 512rpx;margin-top: 30rpx;"
|
|
|
@tap="toPage">返回</button>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="padding flex flex-direction" v-if="formName=='wxCheckMobileForm'">
|
|
|
+ <button class="cu-btn round bg-themeBtn margin-tb-sm lg" open-type="getPhoneNumber"
|
|
|
+ @getphonenumber="wxMobile">手机号快捷登录</button>
|
|
|
+ <button class="cu-btn round margin-tb-sm lg" @tap="checkMobile" data-formname="editMobileModal">其他手机号绑定</button>
|
|
|
+ <button class="cu-btn round margin-tb-sm lg" @tap="toPage">取消注册登录操作</button>
|
|
|
+ </view>
|
|
|
+ <view class="padding flex flex-direction" v-if="formName=='editMobileModal'">
|
|
|
+ <form>
|
|
|
+ <view class="cu-form-group">
|
|
|
+ <view class="title">手机号码</view>
|
|
|
+ <input type="number" placeholder="请输入手机号..." @input="wxInput" data-val="editmobile"
|
|
|
+ :value="weixinInfo.editmobile"></input>
|
|
|
+ </view>
|
|
|
+ <view class="cu-form-group margin-bottom solids-bottom">
|
|
|
+ <view class="title">验证码</view>
|
|
|
+ <input type="number" placeholder="请输入验证码..." @input="wxInput" data-val="editcode"
|
|
|
+ :value="weixinInfo.editcode"></input>
|
|
|
+ <button class='cu-btn round bg-themeBtn shadow'
|
|
|
+ @click="getSmsCode(weixinInfo.editmobile)">{{smsinfo.text}}</button>
|
|
|
+ </view>
|
|
|
+ </form>
|
|
|
+ <button class="cu-btn round bg-themeBtn margin-tb-sm lg" open-type="getUserInfo"
|
|
|
+ @getuserinfo="editMobile">手机号快捷登录</button>
|
|
|
+ <button class="cu-btn round margin-tb-sm lg" @tap="checkMobile" data-formname="wxCheckMobileForm">返回</button>
|
|
|
+ </view>
|
|
|
|
|
|
</view>
|
|
|
|
|
@@ -328,32 +354,20 @@
|
|
|
uni.getUserProfile({
|
|
|
desc: '获取你的昵称、头像、地区及性别',
|
|
|
success: infoRes => {
|
|
|
- _this.weixinInfo.openid =
|
|
|
- data.openid;
|
|
|
- _this.weixinInfo
|
|
|
- .session_key = data
|
|
|
- .session_key;
|
|
|
- _this.weixinInfo.nickname =
|
|
|
- infoRes.userInfo
|
|
|
- .nickName;
|
|
|
- _this.weixinInfo.avatar =
|
|
|
- infoRes.userInfo
|
|
|
- .avatarUrl;
|
|
|
- _this.formName =
|
|
|
- "wxCheckMobileForm";
|
|
|
+ _this.weixinInfo.openid = data.openid;
|
|
|
+ _this.weixinInfo.session_key = data.session_key;
|
|
|
+ _this.weixinInfo.nickname = infoRes.userInfo.nickName;
|
|
|
+ _this.weixinInfo.avatar = infoRes.userInfo.avatarUrl;
|
|
|
+ _this.formName = "wxCheckMobileForm";
|
|
|
},
|
|
|
fail: res => {
|
|
|
uni.showModal({
|
|
|
title: '警告',
|
|
|
content: '您点击了拒绝授权,将无法正常注册登录,点击确定重新获取授权。',
|
|
|
showCancel: false,
|
|
|
- success: function(
|
|
|
- res) {
|
|
|
- if (res
|
|
|
- .confirm
|
|
|
- ) {
|
|
|
- uni
|
|
|
- .openSetting();
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.openSetting();
|
|
|
}
|
|
|
}
|
|
|
});
|