Commit 2b5540b21485d3e5f41ae91175fcc11793868543

Authored by yvan.ni
1 parent f68e6e28

礼包的优化

pages/giftpack/giftpacklist/giftpacklist.js
@@ -179,7 +179,7 @@ Page({ @@ -179,7 +179,7 @@ Page({
179 } 179 }
180 this.init(); 180 this.init();
181 }) 181 })
182 - th.setData({ submit:0}) 182 + this.setData({ submit:0})
183 }, 183 },
184 GetBuyPrice: function (e) { 184 GetBuyPrice: function (e) {
185 var that = this.data; 185 var that = this.data;
@@ -190,9 +190,6 @@ Page({ @@ -190,9 +190,6 @@ Page({
190 return false; 190 return false;
191 } 191 }
192 192
193 - if(th.data.submit) return false;  
194 - th.setData({submit:1})  
195 -  
196 193
197 this.data.payMoney = th.data.sele_g.payMoney; 194 this.data.payMoney = th.data.sele_g.payMoney;
198 th.setData({buyType: 2}) 195 th.setData({buyType: 2})
@@ -201,6 +198,7 @@ Page({ @@ -201,6 +198,7 @@ Page({
201 openSpecModal: 1 198 openSpecModal: 1
202 }) 199 })
203 } else { 200 } else {
  201 +
204 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 202 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
205 my_confirm.open( 203 my_confirm.open(
206 "是否确定购买该礼包", 204 "是否确定购买该礼包",
@@ -210,6 +208,7 @@ Page({ @@ -210,6 +208,7 @@ Page({
210 my_confirm.open_cancel(0); 208 my_confirm.open_cancel(0);
211 }, 209 },
212 function () { 210 function () {
  211 +
213 my_confirm.open_cancel(0); 212 my_confirm.open_cancel(0);
214 com.buy_libao(th) 213 com.buy_libao(th)
215 } 214 }
pages/giftpack/public/buy_com.js
@@ -214,7 +214,9 @@ module.exports = { @@ -214,7 +214,9 @@ module.exports = {
214 } 214 }
215 } 215 }
216 216
  217 + if(th.data.submit) return false;
217 th.setData({submit:1}) 218 th.setData({submit:1})
  219 +
218 var id=th.data.sele_g.lbId; 220 var id=th.data.sele_g.lbId;
219 var that=th; 221 var that=th;
220 var json = { 222 var json = {