|
| xqd
@@ -201,7 +201,6 @@ function reStart(dontReset) {
|
|
|
title: '暂无详情',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
- reStart()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
| xqd
@@ -468,13 +467,14 @@ function handleHomepageEvents(x, y) {
|
|
|
confirmHold: true,
|
|
|
confirmType: 'done',
|
|
|
success: function () {
|
|
|
- wx.onKeyboardConfirm(((res) => {
|
|
|
+ wx.onKeyboardConfirm(function handleKeyboardConfirm(res) {
|
|
|
+ wx.offKeyboardConfirm(handleKeyboardConfirm)
|
|
|
wx.hideKeyboard({})
|
|
|
if (res.value && res.value !== KeyWord) {
|
|
|
KeyWord = res.value
|
|
|
search(KeyWord)
|
|
|
}
|
|
|
- }))
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
}
|
|
| xqd
@@ -497,11 +497,12 @@ function handleHomepageEvents(x, y) {
|
|
|
confirmHold: true,
|
|
|
confirmType: 'done',
|
|
|
success: function () {
|
|
|
- wx.onKeyboardConfirm(((res) => {
|
|
|
+ wx.onKeyboardConfirm(function handleKeyboardConfirm(res) {
|
|
|
+ wx.offKeyboardConfirm(handleKeyboardConfirm)
|
|
|
pricein = res.value
|
|
|
priceModal.updatePrice(pricein)
|
|
|
wx.hideKeyboard({})
|
|
|
- }))
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
})
|
|
| xqd
@@ -550,7 +551,7 @@ function handleProductHomepageEvents(x, y) {
|
|
|
} else if (i === 1) {//分享好友
|
|
|
wx.shareAppMessage({
|
|
|
//title: '经销商id:' + agent_id,
|
|
|
- query: 'agent_id=' + agent_id
|
|
|
+ query: 'agent_id=' + agent_id + '&product_id=' + GoodsDetail.id
|
|
|
})
|
|
|
|
|
|
} else if (i === 2) {//联系商家
|
|
| xqd
@@ -638,11 +639,12 @@ function handleSetPriceModalEvents(x, y) {
|
|
|
confirmHold: true,
|
|
|
confirmType: 'done',
|
|
|
success: function () {
|
|
|
- wx.onKeyboardConfirm(((res) => {
|
|
|
+ wx.onKeyboardConfirm(function handleKeyboardConfirm(res) {
|
|
|
+ wx.offKeyboardConfirm(handleKeyboardConfirm)
|
|
|
pricein = res.value
|
|
|
priceModal.updatePrice(pricein)
|
|
|
wx.hideKeyboard({})
|
|
|
- }))
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
} else if (x >= SetPriceBtnArea[1].startX
|
|
| xqd
@@ -665,6 +667,7 @@ function handleSetPriceModalEvents(x, y) {
|
|
|
},
|
|
|
method: 'GET',
|
|
|
success: function () {
|
|
|
+ wx.hideLoading()
|
|
|
wx.showToast({
|
|
|
title: GoodsSource[flag4].name + '价格已更新为' + pricein,
|
|
|
icon: 'none',
|
|
| xqd
@@ -910,7 +913,15 @@ function callback3(res) {
|
|
|
console.log(GoodsSource)
|
|
|
|
|
|
isLoading = false
|
|
|
- reStart()
|
|
|
+
|
|
|
+ reStart().then(() => {
|
|
|
+ let launchOption = wx.getLaunchOptionsSync()
|
|
|
+ if (typeof launchOption.query.product_id !== 'undefined') {
|
|
|
+ console.log("by share", launchOption)
|
|
|
+ current_page = page.product_homepage
|
|
|
+ getGoodsDetail(callback4, launchOption.query.prouct_id)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
function getGoodsDetail(callback4, GoodsSource) {
|
|
|
//如果所点击的区域没有商品展示,那么不进入详情界面
|
|
| xqd
@@ -924,7 +935,7 @@ function getGoodsDetail(callback4, GoodsSource) {
|
|
|
data: {
|
|
|
store_id: 1,
|
|
|
agent_id: agent_id,
|
|
|
- goods_id: GoodsSource[flag3].id,
|
|
|
+ goods_id: Array.isArray(GoodsSource) ? GoodsSource[flag3].id : GoodsSource,
|
|
|
user_id: user_id
|
|
|
},
|
|
|
method: 'GET',
|