Commit 3f9d0c377be6f708f844a4265ec7d683c5c1a17e

Authored by WXD-SEASON\season
2 parents e49b076a a37de3e5

Merge branch 'dev_oa_fu7' into qa

pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -75,7 +75,9 @@ Page({
75 75 canvasHidden:true,
76 76  
77 77 screenWidth: 0,
78   - submit:0
  78 + submit:0,
  79 +
  80 + is_detail:1 //是详情页面的购买
79 81 },
80 82 onLoad: function (options) {
81 83  
... ...
pages/giftpack/public/buy_com.js
... ... @@ -202,6 +202,7 @@ module.exports = {
202 202  
203 203 //-- 统一购买 --
204 204 buy_libao:function (th) {
  205 + var _that=this;
205 206 if(th.data.sele_g.is_pickup){
206 207 if(!th.data.def_pick_store || (th.data.def_pick_store && !th.data.def_pick_store.pickup_id)){
207 208 getApp().my_warnning("请先选择门店", 1, th);
... ... @@ -249,13 +250,21 @@ module.exports = {
249 250 getApp().request.json_post(url, json,
250 251 function (res) {
251 252 if (res.data.code == 0 && res.data.data) {
  253 +
  254 +
  255 +
  256 +
252 257 switch(that.data.buyType){
253 258 case 1://立即兑换
  259 + var order_sn = res.data.data;
  260 +
254 261 th.setData({submit:0})
255 262 getApp().my_warnning("兑换成功!", 1, th);
256 263 th.closeSpecModal();
  264 + _that.go_detail(id,order_sn,th);
257 265 break;
258 266 case 2://立即购买
  267 +
259 268 var order_sn = res.data.data.orderSn;
260 269  
261 270 var money=that.data.payMoney;
... ... @@ -276,9 +285,12 @@ module.exports = {
276 285  
277 286 break;
278 287 case 3://立即领取
  288 +
  289 + var order_sn = res.data.data;
279 290 th.setData({submit:0})
280 291 getApp().my_warnning("领取成功!", 1, th);
281 292 th.closeSpecModal();
  293 + _that.go_detail(id,order_sn,th);
282 294 break;
283 295 }
284 296  
... ... @@ -291,7 +303,15 @@ module.exports = {
291 303 th.setData({submit:0})
292 304 }
293 305 )
  306 + },
  307 +
  308 + //-- 跳转到商品使用页面 --
  309 + go_detail(id,orderSn,th){
  310 + //不是详情页面,就不跳转了
  311 + if(!th.data.is_detail) return false;
294 312  
  313 + var url='/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId='+id+'&orderSn='+orderSn;
  314 + getApp().goto(url);
295 315 },
296 316  
297 317 //------------处理门店---------------
... ...
pages/user/plus/plus.js
... ... @@ -42,6 +42,9 @@ Page({
42 42 focus:false,
43 43 is_select: false, //是否选择营业员过
44 44 is_buy_card_id:"",//是否是链接直接过来购买的卡号id
  45 +
  46 + is_fir_open:0 //防止多次打开
  47 +
45 48 },
46 49 swiperChange: function (e) {
47 50 var currentId = e.detail.current;
... ... @@ -280,7 +283,7 @@ Page({
280 283 is_plusCard: parr,
281 284 is_show: 1
282 285 })
283   - if(th.data.is_buy_card_id){
  286 + if(th.data.is_buy_card_id && !th.data.is_fir_open){
284 287 let i = parr.findIndex(item=>item.CardId==th.data.is_buy_card_id)
285 288 if(i>-1){
286 289 // th.setData({
... ... @@ -294,6 +297,7 @@ Page({
294 297 }
295 298  
296 299 setTimeout(function (){
  300 + th.data.is_fir_open=1; //保证不多次打开
297 301 th.Opening(e)
298 302 },1000)
299 303  
... ...