Commit a3325348 by 程南

修改商品手机号授权

parent b82e6ee4
...@@ -97,7 +97,11 @@ Component({ ...@@ -97,7 +97,11 @@ Component({
productPrice:{ productPrice:{
type: Number, type: Number,
value: 0 value: 0
} },
currentHasMobile: {
type: Boolean,
type: false
},
}, },
attached () { attached () {
...@@ -146,6 +150,13 @@ Component({ ...@@ -146,6 +150,13 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
//获取手机号回调
getPhoneNumber(res = {}) {
wxService.nextTick(() => {
this.triggerEvent('getMobile', res);
})
},
confirm() { confirm() {
if (this.data.curSpec.length < 1){ if (this.data.curSpec.length < 1){
wx.showToast({ wx.showToast({
......
...@@ -192,6 +192,8 @@ ...@@ -192,6 +192,8 @@
product-stock="{{productInfo.stock}}" product-stock="{{productInfo.stock}}"
currentHasUserInfo="{{currentHasUserInfo}}" currentHasUserInfo="{{currentHasUserInfo}}"
bind:getAuth="_getUserInfo" bind:getAuth="_getUserInfo"
bind:getMobile="userGetMobile"
currentHasMobile="{{currentHasMobile}}"
/> />
<card-modal <card-modal
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.8.2", "libVersion": "2.8.2",
"appid": "wxac09792264c49b5c", "appid": "wxac09792264c49b5c",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E", "projectname": "7.0-%E7%83%AD%E9%A3%8E%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
}, },
......
...@@ -820,7 +820,6 @@ class WXService extends Http { ...@@ -820,7 +820,6 @@ class WXService extends Http {
title: '用户登录中..', title: '用户登录中..',
}); });
_self.getAuthUserInfo(res.detail,'phoneNumber').then(res => { _self.getAuthUserInfo(res.detail,'phoneNumber').then(res => {
console.log(res)
this.setData({ this.setData({
currentHasMobile: true, currentHasMobile: true,
currentHasUserInfo : true, currentHasUserInfo : true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment