Commit fa60aac2 by wangzhihui

Merge branch 'SAAS+V4.56.0-0908' of http://192.168.3.233:8090/saas/mini-program/…

…points-mall into SAAS+V4.56.0-0908
2 parents 32ef5a21 42eb0432
......@@ -63,7 +63,7 @@ Page({
},
goodsActionClick(e) {
let { detailInfo } = this.data
if (e.detail == 'join' && detailInfo.goodsSource == 1) return this.toAddShopCar()
// if (e.detail == 'join' && detailInfo.goodsSource == 1) return this.toAddShopCar()
this.showSkuModal(e.detail)
},
onLoad(options) {
......
......@@ -132,6 +132,7 @@ Page({
// 未开通弹出开通钱包弹窗
this.setData({
showEnableWallet: true,
loginPageFlag: false,
copyWalletObj: {name: r?.data?.staffName || userInfo?.nickName, phone: r?.data?.staffPhone || userInfo?.phone, scoreSource: userInfo?.channelSource}
})
}
......@@ -250,22 +251,22 @@ Page({
scoreSource: userInfo?.channelSource,
merchantId: userInfo?.merchantId
}
if (value.goodsSource == 1) {
if (!value.goodsStock) return wx.p.wxApi.showToast('暂无库存')
cartApi.addToCart(PARAMS).then(res => {
wx.p.wxApi.showToast('加入购物车成功')
})
} else {
// if (value.goodsSource == 1) {
// if (!value.goodsStock) return wx.p.wxApi.showToast('暂无库存')
// cartApi.addToCart(PARAMS).then(res => {
// wx.p.wxApi.showToast('加入购物车成功')
// })
// } else {
// 获取商品详情
this.getDetail(value)
}
// }
},
getDetail(options) {
homeApi.getGoodsDetailInfo({id: options.id, businessType: 1}).then(res => {
res.goodsSource = options.goodsSource
if (res && res.specificationResponses?.length) {
this.toGetSpecString(res, res.startQty)
}
// if (res && res.specificationResponses?.length) {
// this.toGetSpecString(res, res.startQty)
// }
if (res && res.platformGlGoodsSpecifications?.length) {
let item = res.platformGlGoodsSpecifications[0] || {}
res.redeemPoints = item.retailPrice
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!