|
|
|
@ -6,6 +6,8 @@ |
|
|
|
|
授权并登录</view> |
|
|
|
|
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16" v-if="!user.phone && user" |
|
|
|
|
open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">授权手机号</button> |
|
|
|
|
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16" v-if="user.phone && user" |
|
|
|
|
@click="reqmessage">授权获取消息通知</button> |
|
|
|
|
<!-- #endif --> |
|
|
|
|
<!-- #ifdef H5 --> |
|
|
|
|
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16" |
|
|
|
@ -55,9 +57,7 @@ |
|
|
|
|
key: "token", |
|
|
|
|
data: res.return_data.uniqueCode |
|
|
|
|
}) |
|
|
|
|
if (res.return_data.object.highUser.phone) { |
|
|
|
|
uni.navigateBack({}) |
|
|
|
|
} |
|
|
|
|
if (res.return_data.object.highUser.phone) {} |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.return_msg |
|
|
|
@ -74,6 +74,18 @@ |
|
|
|
|
}) |
|
|
|
|
that.isShowAuth = false |
|
|
|
|
}, |
|
|
|
|
//获取订阅号授权 |
|
|
|
|
reqmessage() { |
|
|
|
|
uni.requestSubscribeMessage({ |
|
|
|
|
tmplIds: ['oUvaCPeeOg4wH6HTvCcSabU6FnzXUXOBXsqBYAPOV-U'], |
|
|
|
|
success(res) { |
|
|
|
|
uni.navigateBack({}) |
|
|
|
|
}, |
|
|
|
|
fail: (res) => { |
|
|
|
|
uni.navigateBack({}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 微信获取手机号 |
|
|
|
|
getPhoneNumber(PhoneNumber) { |
|
|
|
|
let params = { |
|
|
|
|