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