|
|
@ -7,13 +7,13 @@ |
|
|
|
<!-- #ifdef MP-WEIXIN --> |
|
|
|
<view class="btn" @click="getPhoneNumber">手机号快捷登录 <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="hide" v-if="isCheck">手机号</button> </view> |
|
|
|
<!-- #endif --> |
|
|
|
<view class="btn border" @click="$goPage('/pages/userCenter/login/loginByPhone');">手机号登录/注册</view> |
|
|
|
<view class="btn border" @click="$goPage('/pages/userCenter/login/loginByPhone?isCheck='+isCheck);">手机号登录/注册</view> |
|
|
|
</view> |
|
|
|
<view style="margin-top: 40rpx;"> |
|
|
|
<privacyRadion :isCheck="isCheck" @changeRadio="changeRadio"></privacyRadion> |
|
|
|
</view> |
|
|
|
|
|
|
|
<u-popup :show="show" :round="10" mode="center" > |
|
|
|
<!-- <u-popup :show="show" :round="10" mode="center" > |
|
|
|
<view class=""> |
|
|
|
<view class="popupCon"> |
|
|
|
<view class="h1">提 示</view> |
|
|
@ -21,7 +21,7 @@ |
|
|
|
<view class="oneBtn">我知道了</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
</u-popup> --> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -35,13 +35,11 @@ |
|
|
|
return { |
|
|
|
isCheck: false, |
|
|
|
show: false, |
|
|
|
decodePhoneParams: {}, |
|
|
|
imgUrl: imgUrl+'loginTopBg.png', |
|
|
|
backgroundSize: '100% 360rpx', |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
this.getCode() |
|
|
|
// uni.getLocation({ |
|
|
|
// type: 'wgs84', |
|
|
|
// success: function (res) { |
|
|
@ -53,7 +51,6 @@ |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async getPhoneNumber (e) { |
|
|
|
console.log(111) |
|
|
|
if(!this.isCheck) return this.$u.toast('请勾选产品协议与隐私政策'); |
|
|
|
let phoneCode = e.detail.code |
|
|
|
console.log(e.detail.errMsg) // 回调信息(成功失败都会返回) |
|
|
@ -119,18 +116,6 @@ |
|
|
|
// 可以使用 uni.request 或其他 HTTP 库发送请求 |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取code |
|
|
|
getCode() { |
|
|
|
uni.login({ |
|
|
|
provider: 'weixin', |
|
|
|
success: loginRes => { |
|
|
|
this.decodePhoneParams.code = loginRes.code |
|
|
|
console.log('loginRes') |
|
|
|
console.log(loginRes) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 是否选择协议 |
|
|
|
changeRadio(val) { |
|
|
|
this.isCheck = val |
|
|
|