diff --git a/app.js b/app.js index 971fb91..9d5f501 100644 --- a/app.js +++ b/app.js @@ -45,7 +45,7 @@ App({ config2: null, //门店配置 code: null, heigth:0, - user_id:6519826,// 3674923,// 4379287,// null,// 5682068, + user_id:null,// 3674923,// 4379287,// null,// 5682068, buy_now:null, picklist:null, //门店列表 wuliuprice: null, //物流价格表 diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js index 94a3d36..b73299f 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.js +++ b/components/diy_goodsGroup/diy_goodsGroup.js @@ -44,6 +44,7 @@ Component({ is_nav:0, nav_list:null, title_index:0, + swiper_hei:0, }, ready: function () {}, @@ -70,16 +71,21 @@ Component({ if(idlist) idlist=ut.sub_last(idlist); nav_list[ij].idlist=idlist; } - this.setData({nav_list:nav_list,is_nav:this.data.object.is_nav}); + this.setData({nav_list:nav_list,is_nav:parseInt(this.data.object.is_nav)}); } - - + // 在组件实例进入页面节点树时执行 this.data.classstyle_id = nav_item.classstyle; this.data.goodscount = this.data.object.goodscount; this.data.wgroup =nav_item.wgroup; - - + + var hei=280; + if(this.data.object.goodstit) hei+=80; + if(this.data.object.goodsprice) hei+=80; + if(this.data.object.goodsnum) hei+=80; + + this.setData({swiper_hei:hei}); + if (nav_item.goodsclass == 1) { this.data.is_recommend = 1 } @@ -203,60 +209,8 @@ Component({ total: res.data.data.total }) th.data.currentPage++; - var now=ut.gettimestamp(); - - goods.forEach(async function (val, ind) { - var item = {}; - var prom_id = null; - console.log(val.goodsid); - //app.request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + val.goods_id, {}).then(res => { - //商品地址 - //var goods = res.data.data; - - item.goods_name = val.goods_name; - item.goods_img = th.data.imghost + val.original_img; - item.market_price = val.market_price; - item.shop_price = val.shop_price; - item.sales_sum = val.sales_sum; - item.goods_id = val.goods_id; - - item.cardprice1 = val.cardprice1; - item.cardprice2 = val.cardprice2; - item.cardprice3 = val.cardprice3; - - prom_id = val.prom_id; - - var prom_type = val.prom_type; //0普通商品 1秒杀 6拼单 - - var url = ""; - if (prom_type == 6) { - url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; - } else if (prom_type == 1) { - url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id; - } - if(url!="") { - await app.request.promiseGet(url, {}).then(res => { - var prom = null - if (res && res.data) prom=res.data.data; - if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time { - //商品地址 - var goods = res.data.data; - - item.goods_name = val.goods_name; - item.goods_img = th.data.imghost + val.original_img; - item.market_price = val.market_price; - item.shop_price = val.shop_price; - item.sales_sum = val.sales_sum; - item.goods_id = val.goods_id; - - item.cardprice1 = val.cardprice1; - item.cardprice2 = val.cardprice2; - item.cardprice3 = val.cardprice3; - - prom_id = val.prom_id; - - var prom_type = res.data.data.prom_type; //0普通商品 1秒杀 6拼单 - - var url = ""; - if (prom_type == 6) { - url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; - } else if (prom_type == 1) { - url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id; - } - - if(url!=null){ - await app.request.promiseGet(url, {}).then(res => { - var prom =null; - if(res && res.data) res.data.data; - if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time { + + item.goods_name = val.goods_name; + item.goods_img = th.data.imghost + val.original_img; + item.market_price = val.market_price; + item.shop_price = val.shop_price; + item.sales_sum = val.sales_sum; + item.goods_id = val.goods_id; + + item.cardprice1 = val.cardprice1; + item.cardprice2 = val.cardprice2; + item.cardprice3 = val.cardprice3; + + prom_id = val.prom_id; + + var prom_type = val.prom_type; //0普通商品 1秒杀 6拼单 + + var url = ""; + if (prom_type == 6) { + url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; + } else if (prom_type == 1) { + url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id; + } + + if(url!=null){ + await getApp().request.promiseGet(url, {}).then(res => { + var prom =null; + if(res && res.data) res.data.data; + if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time - + - - + + + + + + + + + + + + + + + + diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxss b/components/diy_goodsGroup/diy_goodsGroup.wxss index 5a84a92..5f02b12 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.wxss +++ b/components/diy_goodsGroup/diy_goodsGroup.wxss @@ -398,7 +398,7 @@ } .zs_goods_3l { - width: 236rpx; + width: 228rpx; min-height: 300rpx; margin: 0 auto; padding: 2rpx; @@ -419,7 +419,6 @@ .zs_center_3l { width: 100%; - min-height: 200rpx; font-size: 28rpx; color: #333; text-align: left; @@ -575,7 +574,7 @@ .ai-center{align-items: center;} .gr_title_list{ width:95%; margin-left:2.5%} -.gr_title_item{ padding:0 10rpx;flex-shrink: 0;} +.gr_title_item{ padding:0 10rpx;flex-shrink: 0;flex-grow: 1; text-align: center;} .border_zhijiao{ @@ -606,12 +605,10 @@ .s_prom { width: 100%; background-color: white; - min-height: 200rpx; } swiper { display: block; - height: 400rpx; } .right_k { @@ -630,7 +627,6 @@ swiper { .sp { - min-height: 300rpx; width: 100%; background-color: white; padding: 18rpx; @@ -651,8 +647,6 @@ swiper { width: 210rpx; height: 100%; position: relative; - top: -74rpx; - left: 0rpx; } .sp .sp_top .s_top_kill { @@ -689,7 +683,6 @@ swiper { .sp_wz { width: 210rpx; - min-height: 100rpx; } .sp_wz .sp_wzi { @@ -785,3 +778,34 @@ swiper { .t_red{ color:red;} +.sp .sp_top .s_img image.zs_t3_3l{ + width: 56rpx; + height: 56rpx; + position: absolute; + left: 0rpx; + bottom: 10rpx; +} +.sp .sp_top .s_img image.zs_t1_3l{ +width: 56rpx; +height: 56rpx; +position: absolute; +left: 0rpx; +top: 10rpx; +} + +.sp .sp_top .s_img image.zs_t2_3l{ + width: 56rpx; + height: 56rpx; + position: absolute; + right: 0rpx; + top: 10rpx; + +} +.sp .sp_top .s_img image.zs_t4_3l{ + width: 56rpx; + height: 56rpx; + position: absolute; + right: 0rpx; + bottom: 10rpx; + +} \ No newline at end of file diff --git a/components/diy_goodsGroup/g_filter.wxs b/components/diy_goodsGroup/g_filter.wxs index bffffae..6b5e379 100644 --- a/components/diy_goodsGroup/g_filter.wxs +++ b/components/diy_goodsGroup/g_filter.wxs @@ -8,6 +8,8 @@ var get_class = function(column,position) { if(column==3){ return "zs_t"+position+"_3l"; } //----列表的情况----- if(column==4 ){ return "zs_t1_x"+position; } + //--滑动的情况 + if(column==5){ return "zs_t"+position+"_3l"; } } diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index c11299a..d38a490 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -522,42 +522,47 @@ Page({ var arr=new Array(); var dda = e.data.data.pageData; s.setData({brand_list:dda}); - for (var i = 0; i < dda.length; i++) { - //console.log(dda[i].logo) - if(dda[i].logo && dda[i].logo.indexOf("http")<0){ - dda[i].logo = oo.imghost+dda[i].logo; - } - if (arr.length>0){ - var find = 0; - //寻找字母在arr数组中是否存在,不存在就要添加,存在就在要这个数组添加元素 - for (var k = 0; k < arr.length;k++){ - if(dda[i].zm == arr[k].zm){ find=k+1; break;} - } - if (find == 0) { - var item = { zm: dda[i].zm, array: new Array() } - item.array.push(dda[i]); - arr.push(item); - } else{ - arr[find - 1].array.push(dda[i]); - } - }else{ - var item = { zm: dda[i].zm, array: new Array() } - item.array.push(dda[i]); - arr.push(item); - } - } - //进行排序,只有是默认排序的时候,才按首字母排序 - if(parseInt(s.data.is_used_share)==0){ - arr.sort(compare("zm")); - } - for(var i=0;i< arr.length;i++){ - for(var j=0;j0){ + var find = 0; + //寻找字母在arr数组中是否存在,不存在就要添加,存在就在要这个数组添加元素 + for (var k = 0; k < arr.length;k++){ + if(dda[i].zm == arr[k].zm){ find=k+1; break;} + } + if (find == 0) { + var item = { zm: dda[i].zm, array: new Array() } + item.array.push(dda[i]); + arr.push(item); + } else{ + arr[find - 1].array.push(dda[i]); + } + }else{ + var item = { zm: dda[i].zm, array: new Array() } + item.array.push(dda[i]); + arr.push(item); + } + } + if(parseInt(s.data.is_used_share)==0){ + arr.sort(compare("zm")); + }else{ + var ob={array:dda}; + arr.push(ob); + } + + + s.setData({ groups: arr }); //console.log(s.data.groups) } diff --git a/pages/index/index/index.js b/pages/index/index/index.js index adc09aa..bf20a88 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -90,6 +90,12 @@ Page({ th.setData({ is_boot: is_init }); + + if(!is_init){ + th.setData({ + swiperimage: [] + }); + } } }) @@ -408,6 +414,7 @@ Page({ this.setData({ ishow: 1 }); + //---先获取会员--- t.getUserFir(function() { th.is_festival(); @@ -723,6 +730,7 @@ Page({ var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { wx.navigateTo({ + //url: '/pages/togoin/togoin', url: '/pages/getphone/getphone', }) return false; diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml index f467282..22bf8b5 100644 --- a/pages/index/index/index.wxml +++ b/pages/index/index/index.wxml @@ -111,6 +111,7 @@ + @@ -121,6 +122,7 @@ +