Commit b1cd4dcec32221519b8a7a8369091924df89501b
Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa
Showing
2 changed files
with
30 additions
and
4 deletions
pages/cart/cart/ladder_calculate.js
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -261,7 +261,11 @@ Page({ |
261 | 261 | hiddenCS: true, |
262 | 262 | |
263 | 263 | is_retail_price: 0, |
264 | - is_no_new:1 | |
264 | + is_no_new:1, | |
265 | + base_nor:0, | |
266 | + base_nor_prom_type:0, | |
267 | + base_nor_prom_id:0, | |
268 | + base_nor_goods_id:0, | |
265 | 269 | }, |
266 | 270 | |
267 | 271 | //------初始化加载---------- |
... | ... | @@ -276,7 +280,7 @@ Page({ |
276 | 280 | prom_type = t.prom_type || 0, |
277 | 281 | prom_id = t.prom_id || 0; //活动ID |
278 | 282 | |
279 | - var share_openid = t.share_openid; | |
283 | + var share_openid = t.share_openid; | |
280 | 284 | |
281 | 285 | |
282 | 286 | self = this; |
... | ... | @@ -355,7 +359,14 @@ Page({ |
355 | 359 | if (prom_type) { |
356 | 360 | this.data.prom_type = prom_type; |
357 | 361 | this.data.prom_id = prom_id; |
362 | + | |
363 | + //-- 基础的活动类型 -- | |
364 | + this.data.base_nor_prom_type=prom_type; | |
365 | + this.data.base_nor_prom_id=prom_id; | |
366 | + | |
358 | 367 | } |
368 | + this.data.base_nor_goods_id=gid; | |
369 | + | |
359 | 370 | ee.setData({ |
360 | 371 | gid: gid |
361 | 372 | }); |
... | ... | @@ -3180,8 +3191,9 @@ Page({ |
3180 | 3191 | var nor = e.currentTarget.dataset.nor; |
3181 | 3192 | |
3182 | 3193 | var sku_g = this.data.sku_g; |
3183 | - if (nor) { | |
3194 | + if (nor || this.data.base_nor) { | |
3184 | 3195 | sku_g = this.data.sku_g_pt; |
3196 | + this.data.base_nor=nor || this.data.base_nor; | |
3185 | 3197 | } |
3186 | 3198 | |
3187 | 3199 | //that.data.change=1; |
... | ... | @@ -3276,6 +3288,18 @@ Page({ |
3276 | 3288 | var prom = null, |
3277 | 3289 | goodsinfo = this.data.sele_g, |
3278 | 3290 | th = this; |
3291 | + | |
3292 | + //如果是普通购买的时候,要返回原先 | |
3293 | + if(goodsinfo.goods_id==this.data.base_nor_goods_id){ | |
3294 | + goodsinfo.prom_type=this.data.base_nor_prom_type; | |
3295 | + goodsinfo.prom_id=this.data.base_nor_prom_id; | |
3296 | + | |
3297 | + this.setData({ | |
3298 | + prom_type:this.data.base_nor_prom_type, | |
3299 | + prom_id:this.data.base_nor_prom_id, | |
3300 | + }) | |
3301 | + } | |
3302 | + | |
3279 | 3303 | var user_id = getApp().globalData.user_id; |
3280 | 3304 | if (!user_id) user_id = 0; |
3281 | 3305 | if (goodsinfo.prom_type == 1) { |
... | ... | @@ -7489,7 +7513,7 @@ Page({ |
7489 | 7513 | //-- 判断会员能不能参与阶梯促销 -- |
7490 | 7514 | await getApp().request.promiseGet("/api/weshop/prom/ladderForm/getNew/" + os.stoid + "/" + user_id + "/" + act_id, {}).then(res => { |
7491 | 7515 | |
7492 | - | |
7516 | + | |
7493 | 7517 | if (res.data.code == 0 && res.data.data) { |
7494 | 7518 | var prom_content = ""; |
7495 | 7519 | //暂定优惠促销还不能重叠 | ... | ... |