Commit 2bc07acea6175b4ea7b2f38ae93f2adc5eac4a4e

Authored by yvan.ni
1 parent bf48a0f6

商品分组的自定义组件的修改

components/diy_goodsGroup/diy_goodsGroup.js
@@ -90,6 +90,9 @@ Component({ @@ -90,6 +90,9 @@ Component({
90 index = 0, 90 index = 0,
91 gdata = []; 91 gdata = [];
92 92
  93 + //--初始化卡类--
  94 + th.card_init();
  95 +
93 classstyle_id = classstyle_id + ""; 96 classstyle_id = classstyle_id + "";
94 switch (classstyle_id) { 97 switch (classstyle_id) {
95 case "1": 98 case "1":
@@ -135,7 +138,7 @@ Component({ @@ -135,7 +138,7 @@ Component({
135 var prom = res.data.data; 138 var prom = res.data.data;
136 var now=ut.gettimestamp(); 139 var now=ut.gettimestamp();
137 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) { 140 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) {
138 - item.shop_price = res.data.data.price; 141 + item.prom_price = res.data.data.price;
139 } 142 }
140 th.data.requestData.push(item); 143 th.data.requestData.push(item);
141 th.setData({ 144 th.setData({
@@ -200,7 +203,7 @@ Component({ @@ -200,7 +203,7 @@ Component({
200 await app.request.promiseGet(url, {}).then(res => { 203 await app.request.promiseGet(url, {}).then(res => {
201 var prom = res.data.data; 204 var prom = res.data.data;
202 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) { 205 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) {
203 - item.shop_price = res.data.data.price; 206 + item.prom_price = res.data.data.price;
204 } 207 }
205 th.data.requestData.push(item); 208 th.data.requestData.push(item);
206 th.setData({ 209 th.setData({
@@ -268,7 +271,7 @@ Component({ @@ -268,7 +271,7 @@ Component({
268 await app.request.promiseGet(url, {}).then(res => { 271 await app.request.promiseGet(url, {}).then(res => {
269 var prom = res.data.data; 272 var prom = res.data.data;
270 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) { 273 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) {
271 - item.shop_price = res.data.data.price; 274 + item.prom_price = res.data.data.price;
272 } 275 }
273 th.data.requestData.push(item); 276 th.data.requestData.push(item);
274 th.setData({ 277 th.setData({
@@ -304,7 +307,7 @@ Component({ @@ -304,7 +307,7 @@ Component({
304 }, 307 },
305 308
306 //---卡的初始化---- 309 //---卡的初始化----
307 - card_init: function(func) { 310 + card_init: function() {
308 var th = this; 311 var th = this;
309 getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { 312 getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, {
310 success: function(e) { 313 success: function(e) {
@@ -343,11 +346,9 @@ Component({ @@ -343,11 +346,9 @@ Component({
343 card_list: ob.card_list 346 card_list: ob.card_list
344 }); 347 });
345 } 348 }
346 - //---回调----  
347 - if(func) func() 349 +
348 } 350 }
349 - //---回调----  
350 - if(func) func() 351 +
351 }, 500) 352 }, 500)
352 }) 353 })
353 354