diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxml b/components/diy_goodsGroup/diy_goodsGroup.wxml index 1f378f9..24dd633 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.wxml +++ b/components/diy_goodsGroup/diy_goodsGroup.wxml @@ -11,17 +11,17 @@ - 全部 - {{item.title}} + 全部 + {{item.title}} - {{item.title}} + {{item.title}} - + {{item.title}} @@ -50,7 +50,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -139,7 +139,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -235,7 +235,7 @@ - + @@ -413,7 +413,7 @@ - + @@ -459,7 +459,7 @@ - + diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxss b/components/diy_goodsGroup/diy_goodsGroup.wxss index b808bea..9a6cc20 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.wxss +++ b/components/diy_goodsGroup/diy_goodsGroup.wxss @@ -1025,6 +1025,7 @@ top: 10rpx; .boxsha{ /* box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); */ /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */ + background-color: #fff; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 3px 10px 0 rgba(0, 0, 0, 0.19); } .but_radius85{ @@ -1151,7 +1152,7 @@ top: 10rpx; font-size: 28rpx; font-weight: bold; overflow-x: auto; - margin-bottom: 20rpx; + /* margin-bottom: 20rpx; */ /* min-width: 25%; */ } @@ -1188,7 +1189,7 @@ top: 10rpx; } .tab_action{ background-color: #f23030; - color: #fff; + color: #fff !important; border: none !important; opacity: .8; /* border-color: #f23030 !important; */ diff --git a/packageA/pages/distribution/shop/shop.js b/packageA/pages/distribution/shop/shop.js index 7383117..02fecd0 100644 --- a/packageA/pages/distribution/shop/shop.js +++ b/packageA/pages/distribution/shop/shop.js @@ -33,6 +33,7 @@ Page({ isAll: true, is_no_plus:1, default_img: '/miniapp/images/default_g_img.gif', + is_distribut:0, //是否是分销 }, /** @@ -190,8 +191,8 @@ Page({ var th = this; //更新一下会员的信息 if (getApp().globalData.user_id) { - if (!getApp().globalData.userInfo['is_distribut']) { - th.setData({ ishidden_comise: 1 }) + if (getApp().globalData.userInfo['is_distribut']) { + th.setData({ is_distribut: 1 }) } getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { isShowLoading: false, diff --git a/packageA/pages/distribution/shop/shop.wxml b/packageA/pages/distribution/shop/shop.wxml index 469b618..1fa8aac 100644 --- a/packageA/pages/distribution/shop/shop.wxml +++ b/packageA/pages/distribution/shop/shop.wxml @@ -207,9 +207,9 @@ - diff --git a/packageA/pages/profile/profile.js b/packageA/pages/profile/profile.js index e0b63cf..31caaab 100644 --- a/packageA/pages/profile/profile.js +++ b/packageA/pages/profile/profile.js @@ -1159,22 +1159,43 @@ Page({ console.log(e); let b = this.getInput(e); let reg=/^[0-9\-]*$/ + // let reg=/^\d{4}-\d{1,2}-\d{1,2}$/ if (!(reg.test(b))){ return this.data.oldbirthday } + let length = b.length; let oldBirtthDayLength=this.data.oldBirtthDayLength if (length > oldBirtthDayLength) { + if (b.length==4) { b+='-' } + if (b.length==6 && b[5] >1) { + console.log(b[5]); + return this.data.oldbirthday + } + if (b.length==7) { - b+='-' + if (b[6]=='-') { + let lb = b.split(''); + lb.splice(5, 0, 0); + b = lb.join(''); + }else{ + b+='-' + } + + } + + if (b.length==10) { + let a=b[8]+b[9]; + if (a*1>31) { + return this.data.oldbirthday + } } - // if (b.length==6 && b[5] >1) { - // console.log(b[5]); - // } + + } this.setData({ datet: b, diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index df45ee2..844176f 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -75,8 +75,8 @@ Page({ load: 0, xmlist: null, - is_retail_price:0 //是否显示零售价 - + is_retail_price:0, //是否显示零售价 + banner: null, //分类广告 }, @@ -173,7 +173,7 @@ Page({ if (0 != this.data.cat_id) { url += "&cat_id=" + this.data.cat_id; } - + // this.requestGoodsList(url); getApp().getConfig2(function (rs) { //计算等级价相关 @@ -202,9 +202,9 @@ Page({ //调用底部导航 //t.editTabBar(that,getApp().globalData.setting.stoid,getApp().globalData.url); //this.requestFirstCategoris(); - setTimeout(function () { + // setTimeout(function () { //if (getApp().globalData.user_id) getApp().requestCardNum(that); - }, 500) + // }, 500) if (this.data.load) return false; @@ -228,11 +228,17 @@ Page({ if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); } if (e.categoryset.indexOf("," + 4 + ",") != -1) { that.setData({ is_show_xm: 1 }); } that.setData({ store_config: e, is_do: 1 }); - + //请求自定义分类数据 + // that.requestFirstCategoris_diy() //---有勾品类--- if (that.data.is_show_pl) { - that.requestFirstCategoris(); + if (is_newsgoodstype==1) { //如果是风格2,则请求自定义分类 + that.requestFirstCategoris_diy(); + }else{ + that.requestFirstCategoris(); + } } + if (that.data.is_show_xm != 1 && that.data.is_show_gb != 1 && that.data.is_show_pp != 1 && that.data.is_show_pl) { that.data.pl_timer = setInterval(function () { if (that.data.one_level_classify.length > 0) { @@ -300,17 +306,159 @@ Page({ }, + + //---------------自定义分类请求接口,数据进行拼装------------------ + requestFirstCategoris_diy: function () { + var t = this; + let that=this; + e.get("/api/weshop/customizeCategory/page", { + data: { store_id: oo.stoid, pageSize: 6600, is_show: 1 }, + success: function (e) { + + if (e.data.code !=0) { + that.requestFirstCategoris(); + return + } + var arr = new Array(); + var dda = e.data.data.pageData; + if (dda != null && dda != "" && dda != undefined) { + t.setData({ is_pl_time: 1 }); + } + + if (t.data.is_used_share == 0) {//is_used_share控制新旧版本 + for (var i = 0; i < dda.length; i++) { + if (parseInt(dda[i].level) == 1) { + var item = { items: dda[i], array: new Array(),diy_class:1 } //增加一个diy_class 标识表示为自定义分类 + arr.push(item); + } else if (parseInt(dda[i].level) == 2) { + for (var j = 0; j < arr.length; j++) { + if (parseInt(dda[i].parent_id) == parseInt(arr[j].items.id)) { + arr[j].array.push(dda[i]); break; + } + } + } else { + continue; + } + } + t.setData({ catelist: arr }); + } else if (t.data.is_used_share == 1 || t.data.is_used_share == 2) { + + //---------新的版本---------------- + for (var i = 0; i < dda.length; i++) { + //--要排队的元素--- + var need_to_insert = dda[i]; + if (parseInt(need_to_insert.level) == 1) { + //判断数组的长度看看有没有2级菜单 + var item = { items: need_to_insert, array: new Array(),diy_class:1 } //增加一个diy_class 标识表示为自定义分类 + arr.push(item); + } else if (parseInt(need_to_insert.level) == 2) { + + for (var j = 0; j < arr.length; j++) { + + + if (parseInt(need_to_insert.parent_id) == parseInt(arr[j].items.id)) { + + var ishaf_two = { items: need_to_insert, arrays: new Array(),diy_class:1 }; + arr[j].array.push(ishaf_two); arr.ishaf_two = 0; + } + } + } else if (parseInt(need_to_insert.level) == 3) {//判断有3级的时候在二级里添加一个数组 + + for (var dd = 0; dd < arr.length; dd++) { + for (var pp = 0; pp < arr[dd].array.length; pp++) { + //--判断二级-- + var two_item = arr[dd].array; + + if (two_item && two_item.length > 0) { + + if (parseInt(need_to_insert.parent_id) == parseInt(two_item[pp].items.id)) { + + arr[dd].array[pp].arrays.push(need_to_insert); arr.ishaf_three = 0; break; + } + } + } + } + } + } + for (var i = 0; i < arr.length; i++) { + arr[i]['items']['is_show_class'] = false; + var mobile_name = arr[i]['items']['name'] + //if(mobile_name.length > 4){ + //arr[i]['items']['name'] = mobile_name.substring(0, 4) + //} + } + if (t.data.is_show_pl == 1 && t.data.is_show_pp != 1 && t.data.is_show_gb != 1) { + arr[0]['items']['is_show_class'] = true; + } + //console.log(arr) + t.setData({ one_level_classify: arr }); + //---有勾品类--- + // if (that.data.is_show_pl) { + that.requestFirstCategoris(); + // } + if (t.data.select_classify_on == 0) { + var item = arr[0]; + + var name = item.items.name; + var cid = item.items.id; + var arr = item.array; + + console.log("11111", item); + console.log(arr.length); + + if (arr.length == 0) { + t.setData({ + select_classify_on: 0, index: 0, classify_name: name, cat_id: cid, + goodslist: null, is_level_three: 0 + }); + + if (t.data.is_used_share == 2) + t.style(t.data.stylePage, cid) + + return false; + } + if (arr.length != 0) { + var is_lev_thr = 0 + for (var i = 0; i < arr.length; i++) { + if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; } + } + t.setData({ is_level_three: is_lev_thr ,cat_id:cid}); + + if (this.data.is_level_three != 1) { + t.setData({ index: 0, classify_name: name, goodslist: arr }); + // t.setData({ index: 0, classify_name: name }); + } else { + // t.setData({ index: 0}); + t.setData({ index: 0, goodslist: arr }); + } + } + + if (t.data.is_used_share == 2){ + t.style(t.data.stylePage, cid) + } + + } + + } + } + }); + }, + //---------------分类请求接口,数据进行拼装------------------ requestFirstCategoris: function () { + var t = this; e.get("/api/weshop/goodscategory/page", { data: { store_id: oo.stoid, pageSize: 6600, is_show: 1 }, success: function (e) { + if (e.data.code !=0) { + return + } var arr = new Array(); var dda = e.data.data.pageData; if (dda != null && dda != "" && dda != undefined) { t.setData({ is_pl_time: 1 }); - } + } if (t.data.is_used_share == 0) {//is_used_share控制新旧版本 for (var i = 0; i < dda.length; i++) { @@ -377,46 +525,53 @@ Page({ arr[0]['items']['is_show_class'] = true; } //console.log(arr) - t.setData({ one_level_classify: arr }); - if (t.data.select_classify_on == 0) { - var item = arr[0]; - - var name = item.items.name; - var cid = item.items.id; - var arr = item.array; - - console.log("11111", item); - console.log(arr.length); - - if (arr.length == 0) { - t.setData({ - select_classify_on: 0, index: 0, classify_name: name, cat_id: cid, - goodslist: null, is_level_three: 0 - }); - - if (t.data.is_used_share == 2) - t.style(t.data.stylePage, cid) - - return false; - } - if (arr.length != 0) { - var is_lev_thr = 0 - for (var i = 0; i < arr.length; i++) { - if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; } + if (t.data.one_level_classify.length>0) { + let one_level_classify = t.data.one_level_classify; + one_level_classify.push(...arr) + t.setData({ one_level_classify: one_level_classify }); + }else{ + t.setData({ one_level_classify: arr }); + if (t.data.select_classify_on == 0) { + var item = arr[0]; + + var name = item.items.name; + var cid = item.items.id; + var arr = item.array; + + console.log("11111", item); + console.log(arr.length); + + if (arr.length == 0) { + t.setData({ + select_classify_on: 0, index: 0, classify_name: name, cat_id: cid, + goodslist: null, is_level_three: 0 + }); + + if (t.data.is_used_share == 2) + t.style(t.data.stylePage, cid) + + return false; + } + if (arr.length != 0) { + var is_lev_thr = 0 + for (var i = 0; i < arr.length; i++) { + if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; } + } + t.setData({ is_level_three: is_lev_thr ,cat_id:cid}); + + if (this.data.is_level_three != 1) { + t.setData({ index: 0, classify_name: name, goodslist: arr }); + } else { + t.setData({ index: 0, goodslist: arr }); + } } - t.setData({ is_level_three: is_lev_thr ,cat_id:cid}); + if (t.data.is_used_share == 2){ - if (this.data.is_level_three != 1) { - t.setData({ index: 0, classify_name: name, goodslist: arr }); - } else { - t.setData({ index: 0, goodslist: arr }); + t.style(t.data.stylePage, cid) } + } - - t.style(t.data.stylePage, cid) - } - } } }); @@ -842,6 +997,14 @@ Page({ } this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid, stylePage: 1, lastMsg: false, }); } + //==1的时候,样式2的时候分类广告切换 + if (this.data.is_used_share==1) { + let banner=null; + + this.setData({ + banner + }) + } }, @@ -906,6 +1069,7 @@ Page({ requestGoodsList: function (t) { var that = this; that.data.requestUrl = t; + console.error(666666); e.get("/api/weshop/goods/page?1=1", { data: { page: that.data.stylePage, cat_id: that.data.cat_id, parent_id: 0, orderField: 'sort', orderType: 'asc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 }, success: function (data) { @@ -1202,7 +1366,12 @@ Page({ resetData: function () { a.resetConfig(), this.data.requestData = null, this.data.currentPage = 1; }, - + go_ad: function (e) { + var url = e.currentTarget.dataset.url; + if (!url || url == '') return; + if (url[0] != '/') url = '/' + url; + getApp().goto(url); + }, //---回复最初的设置--- restoreData: function () { this.setData({ diff --git a/pages/goods/categoryList/categoryList.wxml b/pages/goods/categoryList/categoryList.wxml index 5c9ea8e..954d239 100644 --- a/pages/goods/categoryList/categoryList.wxml +++ b/pages/goods/categoryList/categoryList.wxml @@ -296,11 +296,19 @@ - + + + + + + + + + - + {{classify_name}} - + 更多 @@ -332,10 +340,10 @@ - + {{goods.items.name}} - + 更多 @@ -343,7 +351,7 @@ - + {{item.name}} @@ -357,7 +365,7 @@ - + {{item.items.name}} diff --git a/pages/goods/categoryList/categoryList.wxss b/pages/goods/categoryList/categoryList.wxss index b18a19c..50f938d 100644 --- a/pages/goods/categoryList/categoryList.wxss +++ b/pages/goods/categoryList/categoryList.wxss @@ -194,7 +194,7 @@ line-height: 50rpx; z-index: 10; background: #fff; /* border-top: 4rpx solid #eee; */ - border-bottom: 1rpx solid #f4f4f4; + /* border-bottom: 1rpx solid #f4f4f4; */ padding: 20rpx; } diff --git a/pages/template/index.js b/pages/template/index.js index b59c8de..0e3929d 100644 --- a/pages/template/index.js +++ b/pages/template/index.js @@ -27,6 +27,7 @@ Page({ // nav_bg_color:'#e823e8', //导航按钮颜色 //---------------- is_show_top: 0, //是否置顶显示 + is_fixed_nav:0,//是否显示固定底部导航 }, onLoad: function (e) { @@ -192,7 +193,8 @@ Page({ share_title: temp_data.page_title, template_arr: t_arr, isTemplate: 1, - bgcolor_t: temp_data.bkcolor + bgcolor_t: temp_data.bkcolor, + is_fixed_nav:temp_data.is_fixed_nav }); setTimeout(() => { th.newGoodsGroup() diff --git a/pages/template/index.json b/pages/template/index.json index 1ff9072..531a4b1 100644 --- a/pages/template/index.json +++ b/pages/template/index.json @@ -26,6 +26,7 @@ "scan": "/components/diy_scan/diy_scan", "floatingWindow": "/components/diy_floatingWindow/diy_floatingWindow", "floatingBox": "/components/diy_floatingBox/diy_floatingBox", + "div_tab_bar": "/custom-tab-bar/index", "presell": "/components/diy_pregoods/diy_pregoods" }, "enablePullDownRefresh": false, diff --git a/pages/template/index.wxml b/pages/template/index.wxml index ae345ff..866859b 100644 --- a/pages/template/index.wxml +++ b/pages/template/index.wxml @@ -180,7 +180,8 @@ - + +