diff --git a/components/diy_public/diy_public.js b/components/diy_public/diy_public.js index ce4cdce..343b329 100644 --- a/components/diy_public/diy_public.js +++ b/components/diy_public/diy_public.js @@ -3,7 +3,7 @@ // default: e // }; // }(require("../../utils/LoadMore3.js")), -// n = new e.default(), +// n = new e.default(), var t = getApp(), a = t.request, o = t.globalData.setting, @@ -47,6 +47,7 @@ Component({ kttypeArr:['','商家','会员','阶梯'], imgobj:{ '1':"/miniapp/images/component/seckill.png", + '2':"/miniapp/images/component/pingd/pingd.png", '6':"/miniapp/images/component/pingd/pingd.png" }, nav1:'/packageA/pages/goodsInfo/goodsInfo?', @@ -84,13 +85,20 @@ Component({ }, ready: function () { - if (this.data.prom_type==6) { + if (this.data.prom_type==6) { //天天拼单 this.setData({ prom_text:'已团', nav1:'/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?', nav2:'/pages/goods/goodsInfo/goodsInfo?' }) } + if (this.data.prom_type==2) { //团购 + this.setData({ + prom_text:'已团', + nav1:'/pages/goods/goodsInfo/goodsInfo?', + nav2:'/pages/goods/goodsInfo/goodsInfo?' + }) + } var g_id = this.data.object; this.init(g_id); @@ -140,6 +148,12 @@ Component({ +os.stoid+"&goodsidlist="+goodsidlist; } + if (th.data.prom_type==2) { //团购 + gUrl="/api/weshop/goods/groupBuy/getGoodsList?store_id=" + +os.stoid+"&aidlist="+goodsidlist + "&user_id="+user_id; + } + + app.request.promiseGet(gUrl, {}).then(res => { @@ -173,6 +187,16 @@ Component({ user_id:user_id, } } + if (this.data.prom_type==2) { //团购 + gUrl="/api/weshop/goods/groupBuy/page?page=1&pageSize=9" + req={ + store_id:os.stoid, + is_end: 0, + is_show: 1, + user_id:user_id, + timetype: 2, + } + } getApp().request.promiseGet(gUrl, { isShowLoading: 1, data:req } @@ -389,6 +413,10 @@ Component({ if (this.data.prom_type==6) { //天天拼单 url="/pages/activity/pind_list/pind_list" } + if (this.data.prom_type==2) { //团购 + url="/packageC/pages/group_list/group_list"; + } + wx.navigateTo({ url }); diff --git a/components/diy_public/diy_public.wxml b/components/diy_public/diy_public.wxml index 6dce2de..d19ecde 100644 --- a/components/diy_public/diy_public.wxml +++ b/components/diy_public/diy_public.wxml @@ -51,7 +51,7 @@ - {{prom_text}}{{aitem.buy_num}} + {{prom_text}}{{aitem.buy_num}} 还剩余{{aitem.status==2 ? '0' : aitem.residue}} @@ -97,15 +97,17 @@ - {{aitem.goods_name}} + {{aitem.goods_name}} {{aitem.ct_num}}人团 {{kttypeArr[aitem.kttype]}}团 + - {{prom_text}}{{aitem.buy_num}} + {{prom_text}}{{aitem.buy_num}} 还剩余{{aitem.residue}} + @@ -151,7 +153,7 @@ {{aitem.goods_name}} - {{prom_text}}{{aitem.buy_num}} + {{prom_text}}{{aitem.buy_num}} {{aitem.residue}} @@ -202,7 +204,7 @@ {{kttypeArr[aitem.kttype]}}团 --> - {{prom_text}}{{aitem.buy_num}} + {{prom_text}}{{aitem.buy_num}} {{aitem.residue}} @@ -261,7 +263,7 @@ - {{prom_text}}{{aitem.buy_num}} + {{prom_text}}{{aitem.buy_num}} 还剩余{{aitem.status==2 ? '0' : aitem.residue}} @@ -297,13 +299,13 @@ - {{aitem.goods_name}} + {{aitem.goods_name}} {{aitem.ct_num}}人团 {{kttypeArr[aitem.kttype]}}团 - {{prom_text}}{{aitem.buy_num}} + {{prom_text}}{{aitem.buy_num}} 还剩余{{aitem.residue}} @@ -339,13 +341,13 @@ - {{aitem.goods_name}} + {{aitem.goods_name}} {{aitem.ct_num}}人团 {{kttypeArr[aitem.kttype]}}团 - {{prom_text}}{{aitem.buy_num}} + {{prom_text}}{{aitem.buy_num}} 还剩余{{aitem.residue}} @@ -438,7 +440,7 @@ - {{aitem.goods_name}} + {{aitem.goods_name}} {{prom_text}}{{aitem.buy_num}} {{aitem.residue}} diff --git a/components/diy_public/diy_public.wxss b/components/diy_public/diy_public.wxss index 25c399a..abdb465 100644 --- a/components/diy_public/diy_public.wxss +++ b/components/diy_public/diy_public.wxss @@ -545,4 +545,14 @@ swiper { } .lineh24{ line-height: 24rpx !important; + } + .group{ + padding: 10rpx; + background-color:#f23030; + color: #fff; + /* margin-top: 10rpx; */ + line-height: 28rpx; + border-radius: 10rpx; + margin-right: 10rpx; + opacity: .8; } \ No newline at end of file diff --git a/pages/index/index/index.json b/pages/index/index/index.json index 4269168..315564c 100644 --- a/pages/index/index/index.json +++ b/pages/index/index/index.json @@ -9,7 +9,7 @@ "searchbox":"/components/diy_searchbox/diy_searchbox", "shopname": "/components/diy_shopname/diy_shopname", "pingd_buy": "/components/diy_pingd_buy/diy_pingd_buy", - "div_public": "/components/diy_public/diy_public", + "diy_public": "/components/diy_public/diy_public", "title": "/components/diy_title/diy_title", "notice": "/components/diy_notice/diy_notice", "voice": "/components/diy_voice/diy_voice", diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml index 5c9ab1d..28bb6eb 100644 --- a/pages/index/index/index.wxml +++ b/pages/index/index/index.wxml @@ -481,7 +481,7 @@ - + @@ -520,6 +520,9 @@ + + + diff --git a/pages/template/index.wxml b/pages/template/index.wxml index 5ac9144..f5ca734 100644 --- a/pages/template/index.wxml +++ b/pages/template/index.wxml @@ -52,7 +52,7 @@ - + @@ -73,7 +73,9 @@ - + + +