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