|
|
@ -23,7 +23,7 @@ |
|
|
|
<view class="options"> |
|
|
|
<!-- 通用模拟登录 --> |
|
|
|
<button> |
|
|
|
<text class="icon icon-phone">模拟快捷登录</text> |
|
|
|
<text class="icon icon-phone" @tap="onGetphonenumberSimple">模拟快捷登录</text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -50,10 +50,16 @@ const onGetphonenumber: UniHelper.ButtonOnGetphonenumber = async (ev) => { |
|
|
|
const encryptedData = ev.detail.encryptedData! |
|
|
|
const iv = ev.detail.iv! |
|
|
|
// 登录请求 |
|
|
|
await postLoginWxMinAPI({ code, encryptedData, iv }) |
|
|
|
const res = await postLoginWxMinAPI({ code, encryptedData, iv }) |
|
|
|
// 成功提示 |
|
|
|
uni.showToast({ icon: 'none', title: '登录成功' }) |
|
|
|
} |
|
|
|
|
|
|
|
// 模拟手机号码快捷登录(开发练习) |
|
|
|
const onGetphonenumberSimple = async () => { |
|
|
|
const res = await postLoginWxMinSimpleAPI('18730880302') |
|
|
|
uni.showToast({ icon: 'none', title: '登录成功' }) |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|