[最新]
This commit is contained in:
@@ -23,7 +23,8 @@ Page({
|
||||
specselectIndex : '',
|
||||
qtyNumber : 1, // 产品数量
|
||||
goodsSize : false,
|
||||
invite : ''
|
||||
invite : '',
|
||||
isParent : false, // 绑定邀请码
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -257,8 +258,16 @@ Page({
|
||||
skuid : sku_id,
|
||||
goodsSize : false
|
||||
})
|
||||
wx.navigateTo({
|
||||
url: '/pages/mall/confirm/confirm?skuId=' + sku_id + '&qty=' + this.data.qtyNumber || 1
|
||||
// 是否有推荐人
|
||||
if(this.data.goodsData.has_parent) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/mall/confirm/confirm?skuId=' + sku_id + '&qty=' + this.data.qtyNumber || 1
|
||||
})
|
||||
return
|
||||
}
|
||||
// 显示绑定手机号弹窗
|
||||
this.setData({
|
||||
isParent: true
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
@@ -309,6 +318,43 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
获取邀请码
|
||||
*/
|
||||
bindinput(e) {
|
||||
this.setData({
|
||||
nameValue: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭绑定邀请码弹窗
|
||||
*/
|
||||
nameCancel() {
|
||||
this.setData({
|
||||
isParent: !this.data.isParent
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 绑定邀请码
|
||||
*/
|
||||
nameTrue() {
|
||||
let {
|
||||
sku_id
|
||||
} = this.data.selectSkusValues;
|
||||
wx.$api.mall.userBind({
|
||||
username: this.data.nameValue
|
||||
}).then(res => {
|
||||
wx.navigateTo({
|
||||
url: '/pages/mall/confirm/confirm?skuId=' + sku_id + '&qty=' + this.data.qtyNumber || 1
|
||||
})
|
||||
this.setData({
|
||||
isParent: false
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 放大轮播相册图片
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user