Commit b0255891052d7e29ef30d1258dc497ee87cf2988

Authored by 前端开发-罗建龙
1 parent f89865a6

团购

components/diy_public/diy_public.js
@@ -84,13 +84,20 @@ Component({ @@ -84,13 +84,20 @@ Component({
84 }, 84 },
85 85
86 ready: function () { 86 ready: function () {
87 - if (this.data.prom_type==6) { 87 + if (this.data.prom_type==6) { //天天拼单
88 this.setData({ 88 this.setData({
89 prom_text:'已团', 89 prom_text:'已团',
90 nav1:'/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?', 90 nav1:'/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?',
91 nav2:'/pages/goods/goodsInfo/goodsInfo?' 91 nav2:'/pages/goods/goodsInfo/goodsInfo?'
92 }) 92 })
93 } 93 }
  94 + if (this.data.prom_type==2) { //团购
  95 + this.setData({
  96 + prom_text:'已团',
  97 + nav1:'/pages/goods/goodsInfo/goodsInfo?',
  98 + nav2:'/pages/goods/goodsInfo/goodsInfo?'
  99 + })
  100 + }
94 var g_id = this.data.object; 101 var g_id = this.data.object;
95 102
96 this.init(g_id); 103 this.init(g_id);
@@ -140,6 +147,12 @@ Component({ @@ -140,6 +147,12 @@ Component({
140 +os.stoid+"&goodsidlist="+goodsidlist; 147 +os.stoid+"&goodsidlist="+goodsidlist;
141 } 148 }
142 149
  150 + if (th.data.prom_type==2) { //团购
  151 + gUrl="/api/weshop/goods/groupBuy/getGoodsList?store_id="
  152 + +os.stoid+"&aidlist="+goodsidlist + "&user_id="+user_id;
  153 + }
  154 +
  155 +
143 156
144 app.request.promiseGet(gUrl, {}).then(res => { 157 app.request.promiseGet(gUrl, {}).then(res => {
145 158
@@ -173,6 +186,16 @@ Component({ @@ -173,6 +186,16 @@ Component({
173 user_id:user_id, 186 user_id:user_id,
174 } 187 }
175 } 188 }
  189 + if (this.data.prom_type==2) { //团购
  190 + gUrl="/api/weshop/goods/groupBuy/page?page=1&pageSize=9"
  191 + req={
  192 + store_id:os.stoid,
  193 + is_end: 0,
  194 + is_show: 1,
  195 + user_id:user_id,
  196 + timetype: 2,
  197 + }
  198 + }
176 199
177 getApp().request.promiseGet(gUrl, 200 getApp().request.promiseGet(gUrl,
178 { isShowLoading: 1, data:req } 201 { isShowLoading: 1, data:req }
@@ -389,6 +412,10 @@ Component({ @@ -389,6 +412,10 @@ Component({
389 if (this.data.prom_type==6) { //天天拼单 412 if (this.data.prom_type==6) { //天天拼单
390 url="/pages/activity/pind_list/pind_list" 413 url="/pages/activity/pind_list/pind_list"
391 } 414 }
  415 + if (this.data.prom_type==2) { //团购
  416 + url="/packageC/pages/group_list/group_list";
  417 + }
  418 +
392 wx.navigateTo({ 419 wx.navigateTo({
393 url 420 url
394 }); 421 });
pages/template/index.wxml
@@ -73,7 +73,9 @@ @@ -73,7 +73,9 @@
73 <block wx:if="{{item.ename=='groupbuy'}}"> 73 <block wx:if="{{item.ename=='groupbuy'}}">
74 <groupbuy object="{{item.content}}"></groupbuy> 74 <groupbuy object="{{item.content}}"></groupbuy>
75 </block> 75 </block>
76 - 76 + <block wx:if="{{item.ename=='groupbuyNew'}}">
  77 + <diy_public object="{{item.content}}" prom_type="2"></diy_public>
  78 + </block>
77 </view> 79 </view>
78 </block> 80 </block>
79 </view> 81 </view>