You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
901 B
53 lines
901 B
|
2 months ago
|
<template>
|
||
|
|
<view>
|
||
|
|
<view style="background: #ff0000; color: white; padding: 30px;">
|
||
|
|
我是配送组件,当前显示正常 ✅
|
||
|
|
</view>
|
||
|
|
<view style="margin-top: 200px;">
|
||
|
|
<button type="primary" @getphonenumber="ceshi" open-type="getPhoneNumber">
|
||
|
|
获取手机号
|
||
|
|
</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
|
||
|
|
}
|
||
|
|
},
|
||
|
|
props:{
|
||
|
|
|
||
|
|
},
|
||
|
|
watch: {
|
||
|
|
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
ceshi(e) {
|
||
|
|
console.log("11111111",e)
|
||
|
|
if (e.detail.code) {
|
||
|
|
// 将 code 发送给后端
|
||
|
|
this.tui.request("/social/wechat/getPhone", "POST", {
|
||
|
|
code:e.detail.code
|
||
|
|
}, false, true).then((res) => {
|
||
|
|
if (res.code == 200) {
|
||
|
|
|
||
|
|
} else {
|
||
|
|
this.tui.toast(res.message)
|
||
|
|
}
|
||
|
|
|
||
|
|
})
|
||
|
|
} else {
|
||
|
|
// 用户拒绝授权
|
||
|
|
console.log('用户取消授权');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style>
|
||
|
|
|
||
|
|
</style>
|