Commit d398beb748ef022827f37517210534ba8743952f
1 parent
9bb19c17
OA单 小程序商城里的分类,拉到最下面的时候,商品还没看完就跳到下一个分类去了
Showing
3 changed files
with
1369 additions
and
1278 deletions
pages/goods/categoryList/categoryList.js
| @@ -5,21 +5,26 @@ var i = function (i) { | @@ -5,21 +5,26 @@ var i = function (i) { | ||
| 5 | }; | 5 | }; |
| 6 | }(require("../../../utils/LoadMore.js")), a = new i.default(), ut = require("../../../utils/util.js"); | 6 | }(require("../../../utils/LoadMore.js")), a = new i.default(), ut = require("../../../utils/util.js"); |
| 7 | //t = i,e = t | 7 | //t = i,e = t |
| 8 | +var nextTimeOff=null | ||
| 8 | Page({ | 9 | Page({ |
| 9 | data: { | 10 | data: { |
| 10 | - is_date:true, | 11 | + is_date: true, |
| 11 | scrollHeight: 0, | 12 | scrollHeight: 0, |
| 12 | - currentTab:-1, | ||
| 13 | - abc:0, | ||
| 14 | - windowHeight:0, | 13 | + currentTab: -1, |
| 14 | + abc: 0, | ||
| 15 | + windowHeight: 0, | ||
| 15 | windowWidth: 0, | 16 | windowWidth: 0, |
| 16 | - eachLetterHeight:0, | ||
| 17 | - lettersPosition:0, | ||
| 18 | - catelist:null, //分类读取 | 17 | + eachLetterHeight: 0, |
| 18 | + lettersPosition: 0, | ||
| 19 | + catelist: null, //分类读取 | ||
| 19 | nationlist: null,//国家读取 | 20 | nationlist: null,//国家读取 |
| 20 | groups: null, //品牌读取 | 21 | groups: null, //品牌读取 |
| 21 | iurl: oo.imghost,//图片地址 | 22 | iurl: oo.imghost,//图片地址 |
| 22 | - | 23 | + nextShow:false, //是否跳转下个类型 |
| 24 | + nextShow2:false, //是否跳转下个类型 | ||
| 25 | + toupper:true, | ||
| 26 | + sClientY:0, //滑动初始值 | ||
| 27 | + eClientY:0, //滑动终值 | ||
| 23 | // 当前选择的导航字母 | 28 | // 当前选择的导航字母 |
| 24 | selected: 0, | 29 | selected: 0, |
| 25 | // 选择字母视图滚动的位置id | 30 | // 选择字母视图滚动的位置id |
| @@ -27,55 +32,55 @@ Page({ | @@ -27,55 +32,55 @@ Page({ | ||
| 27 | // 导航字母 | 32 | // 导航字母 |
| 28 | letters: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', | 33 | letters: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', |
| 29 | 'U', 'V', 'W', 'X', 'Y', 'Z'], | 34 | 'U', 'V', 'W', 'X', 'Y', 'Z'], |
| 30 | - //控制新旧分类版本 | ||
| 31 | - is_used_share:0, | 35 | + //控制新旧分类版本 |
| 36 | + is_used_share: 0, | ||
| 32 | //国家的控制属性 | 37 | //国家的控制属性 |
| 33 | - is_country:1, | 38 | + is_country: 1, |
| 34 | //品牌的控制属性 | 39 | //品牌的控制属性 |
| 35 | - is_brand:1, | 40 | + is_brand: 1, |
| 36 | //选择分类的控制属性 | 41 | //选择分类的控制属性 |
| 37 | - select_classify_on:223, | ||
| 38 | - index:223, | ||
| 39 | - classify_name:"国家",//项目类型 | ||
| 40 | - brand_list:null,//品牌列表 | ||
| 41 | - | ||
| 42 | - one_level_classify:[],// 新的版本左边的边分类1级 | ||
| 43 | - is_level_three:0,//判断有没有3级 | ||
| 44 | - cat_id:0, | 42 | + select_classify_on: 223, |
| 43 | + index: 223, | ||
| 44 | + classify_name: "国家",//项目类型 | ||
| 45 | + brand_list: null,//品牌列表 | ||
| 46 | + | ||
| 47 | + one_level_classify: [],// 新的版本左边的边分类1级 | ||
| 48 | + is_level_three: 0,//判断有没有3级 | ||
| 49 | + cat_id: 0, | ||
| 45 | pl_timer: null,//只有品类的定时器 | 50 | pl_timer: null,//只有品类的定时器 |
| 46 | - is_pl_time:0, | ||
| 47 | - requestData:null, //风格三的商品数据列表 分页 | ||
| 48 | - stylePage:1, //商品列表分页标识 | 51 | + is_pl_time: 0, |
| 52 | + requestData: null, //风格三的商品数据列表 分页 | ||
| 53 | + stylePage: 1, //商品列表分页标识 | ||
| 49 | 54 | ||
| 50 | //风格三使用 | 55 | //风格三使用 |
| 51 | url: t.globalData.setting.imghost, | 56 | url: t.globalData.setting.imghost, |
| 52 | currentPage: 1, | 57 | currentPage: 1, |
| 53 | allData: null, | 58 | allData: null, |
| 54 | openFilterModal: !1, | 59 | openFilterModal: !1, |
| 55 | - baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=sort&orderType=asc&page=1&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1", | 60 | + baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=sort&orderType=asc&page=1&is_mainshow=1&isonsale=1&store_id=" + oo.stoid + "&is_recommend=1", |
| 56 | requestUrl: "", | 61 | requestUrl: "", |
| 57 | tabname: "goods_id", //排序的字段 | 62 | tabname: "goods_id", //排序的字段 |
| 58 | adname: "desc", //升降的字段 | 63 | adname: "desc", //升降的字段 |
| 59 | is_new: 0, | 64 | is_new: 0, |
| 60 | is_hot: 0, | 65 | is_hot: 0, |
| 61 | - msgStatus:false, //页面显示暂无数据状态 | 66 | + msgStatus: false, //页面显示暂无数据状态 |
| 62 | countDownNum: 3, | 67 | countDownNum: 3, |
| 63 | timer: null, //定时器 | 68 | timer: null, //定时器 |
| 64 | - lastMsg:false, | ||
| 65 | - toView:"", | ||
| 66 | - is_show_class:false,//是否添加新样式 | ||
| 67 | - status_show:0, | 69 | + lastMsg: false, |
| 70 | + toView: "", | ||
| 71 | + is_show_class: false,//是否添加新样式 | ||
| 72 | + status_show: 0, | ||
| 68 | currentTab: 0, //预设当前项的值 | 73 | currentTab: 0, //预设当前项的值 |
| 69 | - | ||
| 70 | - load:0, | 74 | + |
| 75 | + load: 0, | ||
| 71 | xmlist: null, | 76 | xmlist: null, |
| 72 | - | 77 | + |
| 73 | 78 | ||
| 74 | }, | 79 | }, |
| 75 | 80 | ||
| 76 | 81 | ||
| 77 | //判断当前滚动超过一屏时,设置tab标题滚动条。 | 82 | //判断当前滚动超过一屏时,设置tab标题滚动条。 |
| 78 | - checkCor: function() { | 83 | + checkCor: function () { |
| 79 | let that = this; | 84 | let that = this; |
| 80 | //这里计算按照实际情况进行修改,动态数据要进行动态分析 | 85 | //这里计算按照实际情况进行修改,动态数据要进行动态分析 |
| 81 | //思路:窗体高度/单个分类高度 200rpx 转px计算 =>得到一屏幕所显示的个数,结合后台传回分类总数进行计算 | 86 | //思路:窗体高度/单个分类高度 200rpx 转px计算 =>得到一屏幕所显示的个数,结合后台传回分类总数进行计算 |
| @@ -92,413 +97,418 @@ Page({ | @@ -92,413 +97,418 @@ Page({ | ||
| 92 | }, | 97 | }, |
| 93 | 98 | ||
| 94 | 99 | ||
| 95 | - onLoad: function(tt) { | ||
| 96 | - var that = this; | ||
| 97 | - var first_leader=tt.first_leader; | ||
| 98 | - if(first_leader){ | ||
| 99 | - //-- user_id代过来免登录 -- | ||
| 100 | - getApp().globalData.first_leader=first_leader; | ||
| 101 | - } | 100 | + onLoad: function (tt) { |
| 101 | + // wx.createSelectorQuery().select('#sview').boundingClientRect(function(rect){ | ||
| 102 | + // console.log('显示下滑区域'); | ||
| 103 | + // console.log(rect); | ||
| 104 | + // }).exec() | ||
| 102 | 105 | ||
| 103 | - if(tt.type) this.data.type= parseInt(tt.type); | ||
| 104 | - that.get_brand(); | ||
| 105 | - | ||
| 106 | - clearInterval(that.data.timer); | ||
| 107 | - that.setData({ countDownNum: 3, stylePage: 1 }); | 106 | + var that = this; |
| 107 | + var first_leader = tt.first_leader; | ||
| 108 | + if (first_leader) { | ||
| 109 | + //-- user_id代过来免登录 -- | ||
| 110 | + getApp().globalData.first_leader = first_leader; | ||
| 111 | + } | ||
| 108 | 112 | ||
| 109 | - const res = wx.getSystemInfoSync(), | ||
| 110 | - letters = this.data.letters; | ||
| 111 | - this.setData({ | ||
| 112 | - abc: t.globalData.heigth-88-88-16, | ||
| 113 | - windowHeight: res.windowHeight, | ||
| 114 | - windowWidth: res.windowWidth, | ||
| 115 | - | ||
| 116 | - }); | 113 | + if (tt.type) this.data.type = parseInt(tt.type); |
| 114 | + that.get_brand(); | ||
| 117 | 115 | ||
| 118 | - var bli = res.windowWidth/750; | ||
| 119 | - //--------第一个字母距离顶部高度,单位使用的是rpx,须除以bli------ | ||
| 120 | - //才能与touch事件中的数值相加减,css中定义nav高度为94%,所以 *0.94 | ||
| 121 | - const eachLetterHeight = 35.4*bli, | ||
| 122 | - comTop = (88+88) * bli, | ||
| 123 | - temp = []; | 116 | + clearInterval(that.data.timer); |
| 117 | + that.setData({ countDownNum: 3, stylePage: 1 }); | ||
| 124 | 118 | ||
| 125 | - this.setData({ | ||
| 126 | - eachLetterHeight: eachLetterHeight | ||
| 127 | - }); | ||
| 128 | - //---------求各字母距离设备左上角所处位置--------- | ||
| 129 | - for (let i = 0, len = letters.length; i < len; i++) { | ||
| 130 | - const x = (this.data.windowWidth - (30 + 50)) * bli, | ||
| 131 | - y = comTop + (i * eachLetterHeight); | ||
| 132 | - temp.push([x, y]); | 119 | + const res = wx.getSystemInfoSync(), |
| 120 | + letters = this.data.letters; | ||
| 121 | + this.setData({ | ||
| 122 | + abc: t.globalData.heigth - 88 - 88 - 16, | ||
| 123 | + windowHeight: res.windowHeight, | ||
| 124 | + windowWidth: res.windowWidth, | ||
| 125 | + | ||
| 126 | + }); | ||
| 127 | + | ||
| 128 | + var bli = res.windowWidth / 750; | ||
| 129 | + //--------第一个字母距离顶部高度,单位使用的是rpx,须除以bli------ | ||
| 130 | + //才能与touch事件中的数值相加减,css中定义nav高度为94%,所以 *0.94 | ||
| 131 | + const eachLetterHeight = 35.4 * bli, | ||
| 132 | + comTop = (88 + 88) * bli, | ||
| 133 | + temp = []; | ||
| 134 | + | ||
| 135 | + this.setData({ | ||
| 136 | + eachLetterHeight: eachLetterHeight | ||
| 137 | + }); | ||
| 138 | + //---------求各字母距离设备左上角所处位置--------- | ||
| 139 | + for (let i = 0, len = letters.length; i < len; i++) { | ||
| 140 | + const x = (this.data.windowWidth - (30 + 50)) * bli, | ||
| 141 | + y = comTop + (i * eachLetterHeight); | ||
| 142 | + temp.push([x, y]); | ||
| 143 | + } | ||
| 144 | + this.setData({ | ||
| 145 | + lettersPosition: temp | ||
| 146 | + }); | ||
| 147 | + | ||
| 148 | + if (this.data.is_used_share == 0) { | ||
| 149 | + this.get_nation(); | ||
| 150 | + this.getServiceCategory(); | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + //风格三 | ||
| 154 | + //t = i,e = t | ||
| 155 | + var th = this; | ||
| 156 | + a.init(this, "", "requestData"); | ||
| 157 | + var url = this.data.baseUrl; | ||
| 158 | + this.data.is_new = i.is_new; | ||
| 159 | + this.data.is_hot = i.is_hot; | ||
| 160 | + if (0 != this.data.cat_id) { | ||
| 161 | + url += "&cat_id=" + this.data.cat_id; | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + // this.requestGoodsList(url); | ||
| 165 | + getApp().getConfig2(function (rs) { | ||
| 166 | + //计算等级价相关 | ||
| 167 | + var swithc_list = rs.switch_list; | ||
| 168 | + var sw_arr = JSON.parse(swithc_list); | ||
| 169 | + //---如果后台又开等级卡的开关--- | ||
| 170 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
| 171 | + th.setData({ rank_switch: true }); | ||
| 172 | + var user = getApp().globalData.userInfo; | ||
| 173 | + var ti = setInterval(function () { | ||
| 174 | + if (!user) return false; | ||
| 175 | + clearInterval(ti); | ||
| 176 | + //---回调卡的列表--- | ||
| 177 | + th.getPlusCardType(function (ob) { | ||
| 178 | + th.setData({ card_list: ob.card_list }); | ||
| 179 | + if (user.card_field && user['card_expiredate']) { | ||
| 180 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 181 | + var end = new Date(str); | ||
| 182 | + end = Date.parse(end) / 1000; | ||
| 183 | + var now = ut.gettimestamp(); | ||
| 184 | + | ||
| 185 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
| 186 | + if (user.card_field && now < end) { | ||
| 187 | + var card_name = ob.name_map.get(user.card_field); | ||
| 188 | + //if (card_name.length > 4) card_name = card_name.substring(0, 4); | ||
| 189 | + th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list }); | ||
| 190 | + } | ||
| 191 | + } | ||
| 192 | + }) | ||
| 193 | + }, 500) | ||
| 133 | } | 194 | } |
| 134 | - this.setData({ | ||
| 135 | - lettersPosition: temp | 195 | + }); |
| 196 | + }, | ||
| 197 | + onShow: function () { | ||
| 198 | + getApp().check_can_share(); | ||
| 199 | + | ||
| 200 | + if (typeof this.getTabBar === 'function' && this.getTabBar()) { | ||
| 201 | + var index = getApp().getPageIndex(this); | ||
| 202 | + this.getTabBar().setData({ | ||
| 203 | + active: index //数字是当前页面在tabbar的索引 | ||
| 136 | }); | 204 | }); |
| 137 | - | ||
| 138 | - if (this.data.is_used_share==0){ | ||
| 139 | - this.get_nation(); | ||
| 140 | - this.getServiceCategory(); | 205 | + getApp().requestCardNum(this); |
| 206 | + } | ||
| 207 | + | ||
| 208 | + | ||
| 209 | + var that = this; | ||
| 210 | + //调用底部导航 | ||
| 211 | + //t.editTabBar(that,getApp().globalData.setting.stoid,getApp().globalData.url); | ||
| 212 | + //this.requestFirstCategoris(); | ||
| 213 | + setTimeout(function () { | ||
| 214 | + //if (getApp().globalData.user_id) getApp().requestCardNum(that); | ||
| 215 | + }, 500) | ||
| 216 | + | ||
| 217 | + if (this.data.load) return false; | ||
| 218 | + | ||
| 219 | + getApp().getConfig2(function (e) { | ||
| 220 | + console.log('card------------>>>>', e); | ||
| 221 | + var data = e; | ||
| 222 | + var switch_list_data = data.switch_list; | ||
| 223 | + var switch_list = JSON.parse(switch_list_data); | ||
| 224 | + var is_newsgoodstype = switch_list.is_newsgoodstype; | ||
| 225 | + if (is_newsgoodstype == undefined) { | ||
| 226 | + is_newsgoodstype = 0; | ||
| 141 | } | 227 | } |
| 142 | - | ||
| 143 | - //风格三 | ||
| 144 | - //t = i,e = t | ||
| 145 | - var th = this; | ||
| 146 | - a.init(this, "", "requestData"); | ||
| 147 | - var url = this.data.baseUrl; | ||
| 148 | - this.data.is_new = i.is_new; | ||
| 149 | - this.data.is_hot = i.is_hot; | ||
| 150 | - if (0 != this.data.cat_id) { | ||
| 151 | - url += "&cat_id=" + this.data.cat_id; | 228 | + that.setData({ is_used_share: is_newsgoodstype }); |
| 229 | + if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); } | ||
| 230 | + if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); } | ||
| 231 | + if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); } | ||
| 232 | + if (e.categoryset.indexOf("," + 4 + ",") != -1) { that.setData({ is_show_xm: 1 }); } | ||
| 233 | + that.setData({ store_config: e, is_do: 1 }); | ||
| 234 | + | ||
| 235 | + //---有勾品类--- | ||
| 236 | + if (that.data.is_show_pl) { | ||
| 237 | + that.requestFirstCategoris(); | ||
| 152 | } | 238 | } |
| 153 | - | ||
| 154 | - // this.requestGoodsList(url); | ||
| 155 | - getApp().getConfig2(function (rs) { | ||
| 156 | - //计算等级价相关 | ||
| 157 | - var swithc_list = rs.switch_list; | ||
| 158 | - var sw_arr = JSON.parse(swithc_list); | ||
| 159 | - //---如果后台又开等级卡的开关--- | ||
| 160 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
| 161 | - th.setData({ rank_switch: true }); | ||
| 162 | - var user = getApp().globalData.userInfo; | ||
| 163 | - var ti = setInterval(function () { | ||
| 164 | - if (!user) return false; | ||
| 165 | - clearInterval(ti); | ||
| 166 | - //---回调卡的列表--- | ||
| 167 | - th.getPlusCardType(function (ob) { | ||
| 168 | - th.setData({ card_list: ob.card_list }); | ||
| 169 | - if (user.card_field && user['card_expiredate']) { | ||
| 170 | - var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 171 | - var end = new Date(str); | ||
| 172 | - end = Date.parse(end) / 1000; | ||
| 173 | - var now = ut.gettimestamp(); | ||
| 174 | - | ||
| 175 | - //--- 判断是等级会员,且在有效期范围内 --- | ||
| 176 | - if (user.card_field && now < end) { | ||
| 177 | - var card_name = ob.name_map.get(user.card_field); | ||
| 178 | - //if (card_name.length > 4) card_name = card_name.substring(0, 4); | ||
| 179 | - th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list }); | ||
| 180 | - } | 239 | + if (that.data.is_show_xm != 1 && that.data.is_show_gb != 1 && that.data.is_show_pp != 1 && that.data.is_show_pl) { |
| 240 | + that.data.pl_timer = setInterval(function () { | ||
| 241 | + if (that.data.one_level_classify.length > 0) { | ||
| 242 | + var item = that.data.one_level_classify[0], arr = item.array; | ||
| 243 | + //----如果有下级的时候----- | ||
| 244 | + if (item.array && item.array.length > 0) { | ||
| 245 | + var is_lev_thr = 0 | ||
| 246 | + for (var i = 0; i < arr.length; i++) { | ||
| 247 | + if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; } | ||
| 181 | } | 248 | } |
| 182 | - }) | ||
| 183 | - }, 500) | ||
| 184 | - } | ||
| 185 | - }); | ||
| 186 | - }, | ||
| 187 | - onShow:function(){ | ||
| 188 | - getApp().check_can_share(); | ||
| 189 | - | ||
| 190 | - if (typeof this.getTabBar === 'function' && this.getTabBar()) { | ||
| 191 | - var index=getApp().getPageIndex(this); | ||
| 192 | - this.getTabBar().setData({ | ||
| 193 | - active: index //数字是当前页面在tabbar的索引 | ||
| 194 | - }); | ||
| 195 | - getApp().requestCardNum(this); | ||
| 196 | - } | ||
| 197 | - | ||
| 198 | - | ||
| 199 | - var that=this; | ||
| 200 | - //调用底部导航 | ||
| 201 | - //t.editTabBar(that,getApp().globalData.setting.stoid,getApp().globalData.url); | ||
| 202 | - //this.requestFirstCategoris(); | ||
| 203 | - setTimeout(function () { | ||
| 204 | - //if (getApp().globalData.user_id) getApp().requestCardNum(that); | ||
| 205 | - },500) | ||
| 206 | - | ||
| 207 | - if(this.data.load) return false; | ||
| 208 | - | ||
| 209 | - getApp().getConfig2(function (e) { | ||
| 210 | - console.log('card------------>>>>', e); | ||
| 211 | - var data=e; | ||
| 212 | - var switch_list_data = data.switch_list; | ||
| 213 | - var switch_list = JSON.parse(switch_list_data); | ||
| 214 | - var is_newsgoodstype = switch_list.is_newsgoodstype; | ||
| 215 | - if (is_newsgoodstype==undefined) | ||
| 216 | - { | ||
| 217 | - is_newsgoodstype=0; | ||
| 218 | - } | ||
| 219 | - that.setData({ is_used_share :is_newsgoodstype}); | ||
| 220 | - if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); } | ||
| 221 | - if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); } | ||
| 222 | - if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); } | ||
| 223 | - if (e.categoryset.indexOf("," + 4 + ",") != -1) { that.setData({ is_show_xm: 1 }); } | ||
| 224 | - that.setData({ store_config: e,is_do:1 }); | ||
| 225 | - | ||
| 226 | - //---有勾品类--- | ||
| 227 | - if (that.data.is_show_pl){ | ||
| 228 | - that.requestFirstCategoris(); | ||
| 229 | - } | ||
| 230 | - if (that.data.is_show_xm != 1 && that.data.is_show_gb != 1 && that.data.is_show_pp != 1 && that.data.is_show_pl){ | ||
| 231 | - that.data.pl_timer = setInterval(function () { | ||
| 232 | - if (that.data.one_level_classify.length>0){ | ||
| 233 | - var item=that.data.one_level_classify[0],arr=item.array; | ||
| 234 | - //----如果有下级的时候----- | ||
| 235 | - if(item.array && item.array.length>0){ | ||
| 236 | - var is_lev_thr=0 | ||
| 237 | - for(var i=0;i<arr.length;i++){ | ||
| 238 | - if (arr[i].arrays.length>0) {is_lev_thr=1;break; } | ||
| 239 | - } | ||
| 240 | - that.setData({ is_level_three: is_lev_thr }); | ||
| 241 | - if (is_lev_thr!=1) { | ||
| 242 | - that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name,cat_id: item.items.id,goodslist: item.array }); | ||
| 243 | - console.log("id:="+item.items.id) | ||
| 244 | - that.style(that.data.stylePage,that.data.cat_id); | ||
| 245 | - } else { | ||
| 246 | - that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name,cat_id: item.items.id,goodslist: arr }); | ||
| 247 | - console.log("id:="+item.items.id) | ||
| 248 | - that.style(that.data.stylePage,that.data.cat_id); | ||
| 249 | - } | ||
| 250 | - } | ||
| 251 | - else{ | ||
| 252 | - that.setData({ select_classify_on: 0, index: 0, goodslist: null,classify_name:item.items.name,is_level_three: 0}); | ||
| 253 | - } | ||
| 254 | - clearInterval(that.data.pl_timer); | ||
| 255 | - } | ||
| 256 | - },1000); | ||
| 257 | - | ||
| 258 | - } else if (that.data.is_show_gb != 1 && that.data.is_show_pp ){ | ||
| 259 | - that.setData({ select_classify_on: 220, classify_name: "品牌" }); | ||
| 260 | - } | ||
| 261 | - | ||
| 262 | - | ||
| 263 | - var one_level_classify = that.data.one_level_classify; | ||
| 264 | - | ||
| 265 | - if (that.data.is_show_pl) that.setData({ currentTab: 0 }); | ||
| 266 | - else if (that.data.is_show_gb){ that.setData({ currentTab: 1 });that.get_nation(); } | ||
| 267 | - else if (that.data.is_show_pp) {that.setData({ currentTab: 2 });that.get_brand(); } | ||
| 268 | - else if (that.data.is_show_xm) {that.setData({ currentTab: 3 });that.getServiceCategory(); } | ||
| 269 | - | ||
| 270 | - | ||
| 271 | - var t_type=that.data.type; | ||
| 272 | - //----求传参过来的控制----- | ||
| 273 | - if (t_type == 1 && that.data.is_show_gb ) { | ||
| 274 | - that.setData({ currentTab: 1,select_classify_on:223 }); | ||
| 275 | - that.get_nation(); | ||
| 276 | - } else if (t_type == 2 && that.data.is_show_pp ) { | ||
| 277 | - that.setData({ currentTab: 2,select_classify_on:220}); | ||
| 278 | - that.get_brand(); | ||
| 279 | - } else if (t_type == 3 && that.data.is_show_xm ) { | ||
| 280 | - that.setData({ currentTab: 3,select_classify_on:221 }); | ||
| 281 | - that.getServiceCategory(); | ||
| 282 | - } else if (that.data.is_show_pl) { | ||
| 283 | - that.setData({ currentTab: 0,select_classify_on:0 }); | ||
| 284 | - } | ||
| 285 | - // 获取默认选中的第一个 | ||
| 286 | - if(that.data.is_show_gb && that.data.select_classify_on == 223){ | ||
| 287 | - that.setData({ status_show: 1 }); | ||
| 288 | - }else if(that.data.is_show_pp && that.data.select_classify_on == 220){ | ||
| 289 | - that.setData({ status_show: 2 }); | 249 | + that.setData({ is_level_three: is_lev_thr }); |
| 250 | + if (is_lev_thr != 1) { | ||
| 251 | + that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name, cat_id: item.items.id, goodslist: item.array }); | ||
| 252 | + console.log("id:=" + item.items.id) | ||
| 253 | + that.style(that.data.stylePage, that.data.cat_id); | ||
| 254 | + } else { | ||
| 255 | + that.setData({ select_classify_on: 0, index: 0, classify_name: item.items.name, cat_id: item.items.id, goodslist: arr }); | ||
| 256 | + console.log("id:=" + item.items.id) | ||
| 257 | + that.style(that.data.stylePage, that.data.cat_id); | ||
| 258 | + } | ||
| 259 | + } | ||
| 260 | + else { | ||
| 261 | + that.setData({ select_classify_on: 0, index: 0, goodslist: null, classify_name: item.items.name, is_level_three: 0 }); | ||
| 262 | + } | ||
| 263 | + clearInterval(that.data.pl_timer); | ||
| 264 | + } | ||
| 265 | + }, 1000); | ||
| 266 | + | ||
| 267 | + } else if (that.data.is_show_gb != 1 && that.data.is_show_pp) { | ||
| 268 | + that.setData({ select_classify_on: 220, classify_name: "品牌" }); | ||
| 269 | + } | ||
| 270 | + | ||
| 271 | + | ||
| 272 | + var one_level_classify = that.data.one_level_classify; | ||
| 273 | + | ||
| 274 | + if (that.data.is_show_pl) that.setData({ currentTab: 0 }); | ||
| 275 | + else if (that.data.is_show_gb) { that.setData({ currentTab: 1 }); that.get_nation(); } | ||
| 276 | + else if (that.data.is_show_pp) { that.setData({ currentTab: 2 }); that.get_brand(); } | ||
| 277 | + else if (that.data.is_show_xm) { that.setData({ currentTab: 3 }); that.getServiceCategory(); } | ||
| 278 | + | ||
| 279 | + | ||
| 280 | + var t_type = that.data.type; | ||
| 281 | + //----求传参过来的控制----- | ||
| 282 | + if (t_type == 1 && that.data.is_show_gb) { | ||
| 283 | + that.setData({ currentTab: 1, select_classify_on: 223 }); | ||
| 284 | + that.get_nation(); | ||
| 285 | + } else if (t_type == 2 && that.data.is_show_pp) { | ||
| 286 | + that.setData({ currentTab: 2, select_classify_on: 220 }); | ||
| 287 | + that.get_brand(); | ||
| 288 | + } else if (t_type == 3 && that.data.is_show_xm) { | ||
| 289 | + that.setData({ currentTab: 3, select_classify_on: 221 }); | ||
| 290 | + that.getServiceCategory(); | ||
| 291 | + } else if (that.data.is_show_pl) { | ||
| 292 | + that.setData({ currentTab: 0, select_classify_on: 0 }); | ||
| 293 | + } | ||
| 294 | + // 获取默认选中的第一个 | ||
| 295 | + if (that.data.is_show_gb && that.data.select_classify_on == 223) { | ||
| 296 | + that.setData({ status_show: 1 }); | ||
| 297 | + } else if (that.data.is_show_pp && that.data.select_classify_on == 220) { | ||
| 298 | + that.setData({ status_show: 2 }); | ||
| 299 | + } | ||
| 300 | + | ||
| 301 | + that.data.load = 1; | ||
| 302 | + }) | ||
| 303 | + | ||
| 304 | + }, | ||
| 305 | + | ||
| 306 | + //---------------分类请求接口,数据进行拼装------------------ | ||
| 307 | + requestFirstCategoris: function () { | ||
| 308 | + var t = this; | ||
| 309 | + e.get("/api/weshop/goodscategory/page", { | ||
| 310 | + data: { store_id: oo.stoid, pageSize: 6600, is_show: 1 }, | ||
| 311 | + success: function (e) { | ||
| 312 | + var arr = new Array(); | ||
| 313 | + var dda = e.data.data.pageData; | ||
| 314 | + if (dda != null && dda != "" && dda != undefined) { | ||
| 315 | + t.setData({ is_pl_time: 1 }); | ||
| 290 | } | 316 | } |
| 291 | - | ||
| 292 | - that.data.load=1; | ||
| 293 | - }) | ||
| 294 | - | ||
| 295 | - }, | ||
| 296 | - | ||
| 297 | - //---------------分类请求接口,数据进行拼装------------------ | ||
| 298 | - requestFirstCategoris: function() { | ||
| 299 | - var t = this; | ||
| 300 | - e.get("/api/weshop/goodscategory/page", { | ||
| 301 | - data: { store_id: oo.stoid,pageSize:6600,is_show:1}, | ||
| 302 | - success: function(e) { | ||
| 303 | - var arr=new Array(); | ||
| 304 | - var dda = e.data.data.pageData; | ||
| 305 | - if (dda != null && dda !=""&&dda!=undefined){ | ||
| 306 | - t.setData({is_pl_time:1}); | 317 | + |
| 318 | + if (t.data.is_used_share == 0) {//is_used_share控制新旧版本 | ||
| 319 | + for (var i = 0; i < dda.length; i++) { | ||
| 320 | + if (parseInt(dda[i].level) == 1) { | ||
| 321 | + var item = { items: dda[i], array: new Array() } | ||
| 322 | + arr.push(item); | ||
| 323 | + } else if (parseInt(dda[i].level) == 2) { | ||
| 324 | + for (var j = 0; j < arr.length; j++) { | ||
| 325 | + if (parseInt(dda[i].parent_id) == parseInt(arr[j].items.id)) { | ||
| 326 | + arr[j].array.push(dda[i]); break; | ||
| 327 | + } | ||
| 307 | } | 328 | } |
| 308 | - | ||
| 309 | - if (t.data.is_used_share == 0) {//is_used_share控制新旧版本 | ||
| 310 | - for(var i=0;i<dda.length;i++){ | ||
| 311 | - if (parseInt(dda[i].level)==1){ | ||
| 312 | - var item = {items: dda[i], array: new Array()} | ||
| 313 | - arr.push(item); | ||
| 314 | - } else if (parseInt(dda[i].level) == 2){ | ||
| 315 | - for (var j = 0; j < arr.length;j++ ){ | ||
| 316 | - if (parseInt(dda[i].parent_id) == parseInt(arr[j].items.id)){ | ||
| 317 | - arr[j].array.push(dda[i]); break; | ||
| 318 | - } | ||
| 319 | - } | ||
| 320 | - }else{ | ||
| 321 | - continue; | ||
| 322 | - } | 329 | + } else { |
| 330 | + continue; | ||
| 331 | + } | ||
| 332 | + } | ||
| 333 | + t.setData({ catelist: arr }); | ||
| 334 | + } else if (t.data.is_used_share == 1 || t.data.is_used_share == 2) { | ||
| 335 | + | ||
| 336 | + //---------新的版本---------------- | ||
| 337 | + for (var i = 0; i < dda.length; i++) { | ||
| 338 | + //--要排队的元素--- | ||
| 339 | + var need_to_insert = dda[i]; | ||
| 340 | + if (parseInt(need_to_insert.level) == 1) { | ||
| 341 | + var item = { items: need_to_insert, array: new Array() }//判断数组的长度看看有没有2级菜单 | ||
| 342 | + arr.push(item); | ||
| 343 | + } else if (parseInt(need_to_insert.level) == 2) { | ||
| 344 | + | ||
| 345 | + for (var j = 0; j < arr.length; j++) { | ||
| 346 | + | ||
| 347 | + | ||
| 348 | + if (parseInt(need_to_insert.parent_id) == parseInt(arr[j].items.id)) { | ||
| 349 | + | ||
| 350 | + var ishaf_two = { items: need_to_insert, arrays: new Array() }; | ||
| 351 | + arr[j].array.push(ishaf_two); arr.ishaf_two = 0; | ||
| 323 | } | 352 | } |
| 324 | - t.setData({ catelist: arr}); | ||
| 325 | - } else if (t.data.is_used_share == 1 || t.data.is_used_share == 2){ | ||
| 326 | - | ||
| 327 | - //---------新的版本---------------- | ||
| 328 | - for (var i = 0; i < dda.length; i++) { | ||
| 329 | - //--要排队的元素--- | ||
| 330 | - var need_to_insert=dda[i]; | ||
| 331 | - if (parseInt(need_to_insert.level) == 1) { | ||
| 332 | - var item = { items: need_to_insert, array: new Array() }//判断数组的长度看看有没有2级菜单 | ||
| 333 | - arr.push(item); | ||
| 334 | - } else if (parseInt(need_to_insert.level) == 2) { | ||
| 335 | - | ||
| 336 | - for (var j = 0; j < arr.length; j++) { | ||
| 337 | - | ||
| 338 | - | ||
| 339 | - if (parseInt(need_to_insert.parent_id) == parseInt(arr[j].items.id)) { | ||
| 340 | - | ||
| 341 | - var ishaf_two = { items: need_to_insert, arrays: new Array() }; | ||
| 342 | - arr[j].array.push(ishaf_two); arr.ishaf_two = 0; | ||
| 343 | - } | ||
| 344 | - } | ||
| 345 | - } else if (parseInt(need_to_insert.level) == 3) {//判断有3级的时候在二级里添加一个数组 | ||
| 346 | - | ||
| 347 | - for (var dd = 0; dd < arr.length; dd++) { | ||
| 348 | - for (var pp = 0; pp < arr[dd].array.length; pp++) { | ||
| 349 | - //--判断二级-- | ||
| 350 | - var two_item = arr[dd].array; | ||
| 351 | - | ||
| 352 | - if (two_item && two_item.length>0){ | ||
| 353 | - | ||
| 354 | - if (parseInt(need_to_insert.parent_id) == parseInt(two_item[pp].items.id)) { | ||
| 355 | - | ||
| 356 | - arr[dd].array[pp].arrays.push(need_to_insert); arr.ishaf_three = 0; break; | ||
| 357 | - } | ||
| 358 | - } | 353 | + } |
| 354 | + } else if (parseInt(need_to_insert.level) == 3) {//判断有3级的时候在二级里添加一个数组 | ||
| 355 | + | ||
| 356 | + for (var dd = 0; dd < arr.length; dd++) { | ||
| 357 | + for (var pp = 0; pp < arr[dd].array.length; pp++) { | ||
| 358 | + //--判断二级-- | ||
| 359 | + var two_item = arr[dd].array; | ||
| 360 | + | ||
| 361 | + if (two_item && two_item.length > 0) { | ||
| 362 | + | ||
| 363 | + if (parseInt(need_to_insert.parent_id) == parseInt(two_item[pp].items.id)) { | ||
| 364 | + | ||
| 365 | + arr[dd].array[pp].arrays.push(need_to_insert); arr.ishaf_three = 0; break; | ||
| 359 | } | 366 | } |
| 360 | } | 367 | } |
| 361 | } | 368 | } |
| 362 | } | 369 | } |
| 363 | - for(var i=0;i<arr.length;i++){ | ||
| 364 | - arr[i]['items']['is_show_class'] = false; | ||
| 365 | - var mobile_name = arr[i]['items']['name'] | ||
| 366 | - //if(mobile_name.length > 4){ | ||
| 367 | - //arr[i]['items']['name'] = mobile_name.substring(0, 4) | ||
| 368 | - //} | ||
| 369 | - } | ||
| 370 | - if(t.data.is_show_pl==1 && t.data.is_show_pp != 1 && t.data.is_show_gb != 1){ | ||
| 371 | - arr[0]['items']['is_show_class'] = true; | ||
| 372 | - } | ||
| 373 | - //console.log(arr) | ||
| 374 | - t.setData({one_level_classify:arr}); | ||
| 375 | - if(t.data.select_classify_on==0){ | ||
| 376 | - var item=arr[0]; | 370 | + } |
| 371 | + } | ||
| 372 | + for (var i = 0; i < arr.length; i++) { | ||
| 373 | + arr[i]['items']['is_show_class'] = false; | ||
| 374 | + var mobile_name = arr[i]['items']['name'] | ||
| 375 | + //if(mobile_name.length > 4){ | ||
| 376 | + //arr[i]['items']['name'] = mobile_name.substring(0, 4) | ||
| 377 | + //} | ||
| 378 | + } | ||
| 379 | + if (t.data.is_show_pl == 1 && t.data.is_show_pp != 1 && t.data.is_show_gb != 1) { | ||
| 380 | + arr[0]['items']['is_show_class'] = true; | ||
| 381 | + } | ||
| 382 | + //console.log(arr) | ||
| 383 | + t.setData({ one_level_classify: arr }); | ||
| 384 | + if (t.data.select_classify_on == 0) { | ||
| 385 | + var item = arr[0]; | ||
| 377 | 386 | ||
| 378 | - var name = item.items.name; | ||
| 379 | - var cid = item.items.id; | ||
| 380 | - var arr = item.array; | 387 | + var name = item.items.name; |
| 388 | + var cid = item.items.id; | ||
| 389 | + var arr = item.array; | ||
| 381 | 390 | ||
| 382 | - console.log("11111",item); | 391 | + console.log("11111", item); |
| 383 | 392 | ||
| 384 | 393 | ||
| 385 | - if (arr.length == 0) { | ||
| 386 | - t.setData({ | ||
| 387 | - select_classify_on: 0, index: 0, classify_name: name, cat_id: cid, | ||
| 388 | - goodslist: null, is_level_three: 0 | ||
| 389 | - }); | 394 | + if (arr.length == 0) { |
| 395 | + t.setData({ | ||
| 396 | + select_classify_on: 0, index: 0, classify_name: name, cat_id: cid, | ||
| 397 | + goodslist: null, is_level_three: 0 | ||
| 398 | + }); | ||
| 390 | 399 | ||
| 391 | - if(t.data.is_used_share == 2) | ||
| 392 | - t.style(t.data.stylePage, cid) | 400 | + if (t.data.is_used_share == 2) |
| 401 | + t.style(t.data.stylePage, cid) | ||
| 393 | 402 | ||
| 394 | - return false; | ||
| 395 | - } | ||
| 396 | - if (arr.length != 0) { | ||
| 397 | - var is_lev_thr = 0 | ||
| 398 | - for (var i = 0; i < arr.length; i++) { | ||
| 399 | - if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; } | ||
| 400 | - } | ||
| 401 | - t.setData({ is_level_three: is_lev_thr }); | ||
| 402 | - | ||
| 403 | - if (this.data.is_level_three != 1) { | ||
| 404 | - t.setData({ index: 0, classify_name: name, goodslist: arr }); | ||
| 405 | - } else { | ||
| 406 | - t.setData({ index: 0, goodslist: arr }); | ||
| 407 | - } | ||
| 408 | - } | 403 | + return false; |
| 404 | + } | ||
| 405 | + if (arr.length != 0) { | ||
| 406 | + var is_lev_thr = 0 | ||
| 407 | + for (var i = 0; i < arr.length; i++) { | ||
| 408 | + if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; } | ||
| 409 | + } | ||
| 410 | + t.setData({ is_level_three: is_lev_thr }); | ||
| 409 | 411 | ||
| 410 | - t.style(t.data.stylePage, cid) | 412 | + if (this.data.is_level_three != 1) { |
| 413 | + t.setData({ index: 0, classify_name: name, goodslist: arr }); | ||
| 414 | + } else { | ||
| 415 | + t.setData({ index: 0, goodslist: arr }); | ||
| 416 | + } | ||
| 417 | + } | ||
| 411 | 418 | ||
| 412 | - } | 419 | + t.style(t.data.stylePage, cid) |
| 413 | 420 | ||
| 414 | - } | ||
| 415 | - } | ||
| 416 | - }); | ||
| 417 | - }, | ||
| 418 | - | ||
| 419 | - requestCategories: function(t) { | ||
| 420 | - var s = this; | ||
| 421 | - e.get("/api/goods/goodsSecAndThirdCategoryList", { | ||
| 422 | - data: { | ||
| 423 | - parent_id: t | ||
| 424 | - }, | ||
| 425 | - success: function(e) { | ||
| 426 | - s.setData({ | ||
| 427 | - categories: e.data.result, | ||
| 428 | - currentCategoryId: t | ||
| 429 | - }); | ||
| 430 | - } | ||
| 431 | - }); | ||
| 432 | - }, | 421 | + } |
| 433 | 422 | ||
| 434 | - switchFirstCategory: function(t) { | ||
| 435 | - this.requestCategories(t.currentTarget.dataset.id); | ||
| 436 | - }, | 423 | + } |
| 424 | + } | ||
| 425 | + }); | ||
| 426 | + }, | ||
| 437 | 427 | ||
| 438 | - //-----------滑动切换---------- | ||
| 439 | - swiperTab: function (e) { | ||
| 440 | - var that = this; | ||
| 441 | - if (e.detail.source == "touch") { | ||
| 442 | - this.setData({ | ||
| 443 | - currentTab: e.detail.current, | 428 | + requestCategories: function (t) { |
| 429 | + var s = this; | ||
| 430 | + e.get("/api/goods/goodsSecAndThirdCategoryList", { | ||
| 431 | + data: { | ||
| 432 | + parent_id: t | ||
| 433 | + }, | ||
| 434 | + success: function (e) { | ||
| 435 | + s.setData({ | ||
| 436 | + categories: e.data.result, | ||
| 437 | + currentCategoryId: t | ||
| 444 | }); | 438 | }); |
| 445 | } | 439 | } |
| 440 | + }); | ||
| 441 | + }, | ||
| 446 | 442 | ||
| 447 | - //获取国别 | ||
| 448 | - if (e.detail.current == 1 && that.data.nationlist == null) { | ||
| 449 | - that.get_nation(); | ||
| 450 | - } | ||
| 451 | - //获取品牌 | ||
| 452 | - if (e.detail.current == 2 && that.data.groups == null) { | ||
| 453 | - that.get_brand(); | ||
| 454 | - } | 443 | + switchFirstCategory: function (t) { |
| 444 | + this.requestCategories(t.currentTarget.dataset.id); | ||
| 445 | + }, | ||
| 455 | 446 | ||
| 456 | - //获取服务卡项 | ||
| 457 | - if (e.detail.current == 3 && that.data.xmlist == null) { | ||
| 458 | - that.getServiceCategory(); | ||
| 459 | - } | 447 | + //-----------滑动切换---------- |
| 448 | + swiperTab: function (e) { | ||
| 449 | + var that = this; | ||
| 450 | + if (e.detail.source == "touch") { | ||
| 451 | + this.setData({ | ||
| 452 | + currentTab: e.detail.current, | ||
| 453 | + }); | ||
| 454 | + } | ||
| 460 | 455 | ||
| 456 | + //获取国别 | ||
| 457 | + if (e.detail.current == 1 && that.data.nationlist == null) { | ||
| 458 | + that.get_nation(); | ||
| 459 | + } | ||
| 460 | + //获取品牌 | ||
| 461 | + if (e.detail.current == 2 && that.data.groups == null) { | ||
| 462 | + that.get_brand(); | ||
| 463 | + } | ||
| 461 | 464 | ||
| 462 | - }, | ||
| 463 | - //-----------点击切换----------- | ||
| 464 | - clickTab: function (e) { | ||
| 465 | - var that = this; | ||
| 466 | - if (this.data.currentTab === e.target.dataset.current) { | ||
| 467 | - return false; | ||
| 468 | - } else { | ||
| 469 | - that.setData({ | ||
| 470 | - currentTab: e.target.dataset.current | ||
| 471 | - }) | ||
| 472 | - } | ||
| 473 | - //获取国别 | ||
| 474 | - if (e.detail.current == 1 && that.data.nationlist == null) { | ||
| 475 | - that.get_nation(); | ||
| 476 | - } | 465 | + //获取服务卡项 |
| 466 | + if (e.detail.current == 3 && that.data.xmlist == null) { | ||
| 467 | + that.getServiceCategory(); | ||
| 468 | + } | ||
| 477 | 469 | ||
| 478 | - //获取品牌 | ||
| 479 | - if (e.detail.current == 2 && that.data.groups == null) { | ||
| 480 | - that.get_brand(); | ||
| 481 | - } | ||
| 482 | 470 | ||
| 483 | - //获取服务卡项 | ||
| 484 | - if (e.detail.current == 3 && that.data.xmlist == null) { | ||
| 485 | - that.getServiceCategory(); | ||
| 486 | - } | 471 | + }, |
| 472 | + //-----------点击切换----------- | ||
| 473 | + clickTab: function (e) { | ||
| 474 | + var that = this; | ||
| 475 | + if (this.data.currentTab === e.target.dataset.current) { | ||
| 476 | + return false; | ||
| 477 | + } else { | ||
| 478 | + that.setData({ | ||
| 479 | + currentTab: e.target.dataset.current | ||
| 480 | + }) | ||
| 481 | + } | ||
| 482 | + //获取国别 | ||
| 483 | + if (e.detail.current == 1 && that.data.nationlist == null) { | ||
| 484 | + that.get_nation(); | ||
| 485 | + } | ||
| 487 | 486 | ||
| 488 | - }, | 487 | + //获取品牌 |
| 488 | + if (e.detail.current == 2 && that.data.groups == null) { | ||
| 489 | + that.get_brand(); | ||
| 490 | + } | ||
| 491 | + | ||
| 492 | + //获取服务卡项 | ||
| 493 | + if (e.detail.current == 3 && that.data.xmlist == null) { | ||
| 494 | + that.getServiceCategory(); | ||
| 495 | + } | ||
| 496 | + | ||
| 497 | + }, | ||
| 489 | 498 | ||
| 490 | tabLetter(e) { | 499 | tabLetter(e) { |
| 491 | - const index = e.currentTarget.dataset.index; | ||
| 492 | - this.setData({ | ||
| 493 | - selected: index, | ||
| 494 | - scrollIntoView: index | ||
| 495 | - }) | ||
| 496 | - this.cleanAcitvedStatus(); | 500 | + const index = e.currentTarget.dataset.index; |
| 501 | + this.setData({ | ||
| 502 | + selected: index, | ||
| 503 | + scrollIntoView: index | ||
| 504 | + }) | ||
| 505 | + this.cleanAcitvedStatus(); | ||
| 497 | }, | 506 | }, |
| 498 | //-------------------清除字母选中状态--------------- | 507 | //-------------------清除字母选中状态--------------- |
| 499 | cleanAcitvedStatus() { | 508 | cleanAcitvedStatus() { |
| 500 | setTimeout(() => { | 509 | setTimeout(() => { |
| 501 | - this.setData({selected: 0}) }, 500); | 510 | + this.setData({ selected: 0 }) |
| 511 | + }, 500); | ||
| 502 | }, | 512 | }, |
| 503 | 513 | ||
| 504 | //------------手指滑动------------------ | 514 | //------------手指滑动------------------ |
| @@ -530,19 +540,19 @@ Page({ | @@ -530,19 +540,19 @@ Page({ | ||
| 530 | }, | 540 | }, |
| 531 | 541 | ||
| 532 | //跳转到分类的商品列表 | 542 | //跳转到分类的商品列表 |
| 533 | - go_cate:function(t){ | ||
| 534 | - var cid= t.currentTarget.dataset.cid; | ||
| 535 | - var pid = t.currentTarget.dataset.pid; | ||
| 536 | - var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid; | ||
| 537 | - lurl+="&pid="+pid; | ||
| 538 | - wx.navigateTo({ url: lurl}); | 543 | + go_cate: function (t) { |
| 544 | + var cid = t.currentTarget.dataset.cid; | ||
| 545 | + var pid = t.currentTarget.dataset.pid; | ||
| 546 | + var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid; | ||
| 547 | + lurl += "&pid=" + pid; | ||
| 548 | + wx.navigateTo({ url: lurl }); | ||
| 539 | }, | 549 | }, |
| 540 | 550 | ||
| 541 | //跳转到品牌的商品列表 | 551 | //跳转到品牌的商品列表 |
| 542 | go_brand: function (t) { | 552 | go_brand: function (t) { |
| 543 | var cid = t.currentTarget.dataset.bid; | 553 | var cid = t.currentTarget.dataset.bid; |
| 544 | var lurl = "/pages/goods/goodsList/goodsList?brand_id=" + cid; | 554 | var lurl = "/pages/goods/goodsList/goodsList?brand_id=" + cid; |
| 545 | - wx.navigateTo({ url: lurl}); | 555 | + wx.navigateTo({ url: lurl }); |
| 546 | }, | 556 | }, |
| 547 | 557 | ||
| 548 | //跳转到国别的商品列表 | 558 | //跳转到国别的商品列表 |
| @@ -551,24 +561,24 @@ Page({ | @@ -551,24 +561,24 @@ Page({ | ||
| 551 | var lurl = "/pages/goods/goodsList/goodsList?nation_id=" + cid; | 561 | var lurl = "/pages/goods/goodsList/goodsList?nation_id=" + cid; |
| 552 | wx.navigateTo({ url: lurl }); | 562 | wx.navigateTo({ url: lurl }); |
| 553 | }, | 563 | }, |
| 554 | - | 564 | + |
| 555 | //获取国别 | 565 | //获取国别 |
| 556 | - get_nation:function() { | 566 | + get_nation: function () { |
| 557 | var s = this; | 567 | var s = this; |
| 558 | e.get("/api/weshop/nation/page", { | 568 | e.get("/api/weshop/nation/page", { |
| 559 | data: { | 569 | data: { |
| 560 | is_hot: 1, | 570 | is_hot: 1, |
| 561 | - store_id:oo.stoid, | ||
| 562 | - pageSize:300, | 571 | + store_id: oo.stoid, |
| 572 | + pageSize: 300, | ||
| 563 | }, | 573 | }, |
| 564 | success: function (e) { | 574 | success: function (e) { |
| 565 | var dda = e.data.data.pageData; | 575 | var dda = e.data.data.pageData; |
| 566 | - s.setData({ nationlist:dda}) | 576 | + s.setData({ nationlist: dda }) |
| 567 | } | 577 | } |
| 568 | }); | 578 | }); |
| 569 | }, | 579 | }, |
| 570 | 580 | ||
| 571 | - //获取品牌 | 581 | + //获取品牌 |
| 572 | get_brand: function () { | 582 | get_brand: function () { |
| 573 | var compare = function (prop) { | 583 | var compare = function (prop) { |
| 574 | return function (obj1, obj2) { | 584 | return function (obj1, obj2) { |
| @@ -576,8 +586,10 @@ Page({ | @@ -576,8 +586,10 @@ Page({ | ||
| 576 | if (!isNaN(Number(val1)) && !isNaN(Number(val2))) { | 586 | if (!isNaN(Number(val1)) && !isNaN(Number(val2))) { |
| 577 | val1 = Number(val1); val2 = Number(val2); | 587 | val1 = Number(val1); val2 = Number(val2); |
| 578 | } | 588 | } |
| 579 | - if (val1 < val2) { return -1; | ||
| 580 | - } else if (val1 > val2) { return 1; | 589 | + if (val1 < val2) { |
| 590 | + return -1; | ||
| 591 | + } else if (val1 > val2) { | ||
| 592 | + return 1; | ||
| 581 | } else { return 0; } | 593 | } else { return 0; } |
| 582 | } | 594 | } |
| 583 | } | 595 | } |
| @@ -590,77 +602,77 @@ Page({ | @@ -590,77 +602,77 @@ Page({ | ||
| 590 | pageSize: 10000, | 602 | pageSize: 10000, |
| 591 | }, | 603 | }, |
| 592 | success: function (e) { | 604 | success: function (e) { |
| 593 | - var arr=new Array(); | ||
| 594 | - var dda = e.data.data.pageData; | ||
| 595 | - s.setData({brand_list:dda}); | ||
| 596 | - | ||
| 597 | - | ||
| 598 | - for (var i = 0; i < dda.length; i++) { | ||
| 599 | - //console.log(dda[i].logo) | ||
| 600 | - if(dda[i].logo==""){ | ||
| 601 | - dda[i].logo= s.data.iurl+"/miniapp/images/no_brand_def.jpg"; | ||
| 602 | - }else if(dda[i].logo && dda[i].logo.indexOf("http")<0){ | ||
| 603 | - dda[i].logo = oo.imghost+dda[i].logo; | ||
| 604 | - } | ||
| 605 | - | ||
| 606 | - //进行排序,只有是默认排序的时候,才按首字母排序 | ||
| 607 | - // if(parseInt(s.data.is_used_share)!=0) continue; | ||
| 608 | - | ||
| 609 | - if (arr.length>0){ | ||
| 610 | - var find = 0; | ||
| 611 | - //寻找字母在arr数组中是否存在,不存在就要添加,存在就在要这个数组添加元素 | ||
| 612 | - for (var k = 0; k < arr.length;k++){ | ||
| 613 | - if(dda[i].zm == arr[k].zm){ find=k+1; break;} | ||
| 614 | - } | ||
| 615 | - if (find == 0) { | ||
| 616 | - var item = { zm: dda[i].zm, array: new Array() } | ||
| 617 | - item.array.push(dda[i]); | ||
| 618 | - arr.push(item); | ||
| 619 | - } else{ | ||
| 620 | - arr[find - 1].array.push(dda[i]); | ||
| 621 | - } | ||
| 622 | - }else{ | ||
| 623 | - var item = { zm: dda[i].zm, array: new Array() } | ||
| 624 | - item.array.push(dda[i]); | ||
| 625 | - arr.push(item); | ||
| 626 | - } | ||
| 627 | - } | ||
| 628 | - // if(parseInt(s.data.is_used_share)==0){ | ||
| 629 | - // arr.sort(compare("zm")); | ||
| 630 | - // }else{ | ||
| 631 | - // var ob={array:dda}; | ||
| 632 | - // arr.push(ob); | ||
| 633 | - // } | ||
| 634 | - | ||
| 635 | - arr.sort(compare("zm")); | ||
| 636 | - | ||
| 637 | - s.setData({ groups: arr }); | ||
| 638 | - //console.log(s.data.groups) | 605 | + var arr = new Array(); |
| 606 | + var dda = e.data.data.pageData; | ||
| 607 | + s.setData({ brand_list: dda }); | ||
| 608 | + | ||
| 609 | + | ||
| 610 | + for (var i = 0; i < dda.length; i++) { | ||
| 611 | + //console.log(dda[i].logo) | ||
| 612 | + if (dda[i].logo == "") { | ||
| 613 | + dda[i].logo = s.data.iurl + "/miniapp/images/no_brand_def.jpg"; | ||
| 614 | + } else if (dda[i].logo && dda[i].logo.indexOf("http") < 0) { | ||
| 615 | + dda[i].logo = oo.imghost + dda[i].logo; | ||
| 616 | + } | ||
| 617 | + | ||
| 618 | + //进行排序,只有是默认排序的时候,才按首字母排序 | ||
| 619 | + // if(parseInt(s.data.is_used_share)!=0) continue; | ||
| 620 | + | ||
| 621 | + if (arr.length > 0) { | ||
| 622 | + var find = 0; | ||
| 623 | + //寻找字母在arr数组中是否存在,不存在就要添加,存在就在要这个数组添加元素 | ||
| 624 | + for (var k = 0; k < arr.length; k++) { | ||
| 625 | + if (dda[i].zm == arr[k].zm) { find = k + 1; break; } | ||
| 626 | + } | ||
| 627 | + if (find == 0) { | ||
| 628 | + var item = { zm: dda[i].zm, array: new Array() } | ||
| 629 | + item.array.push(dda[i]); | ||
| 630 | + arr.push(item); | ||
| 631 | + } else { | ||
| 632 | + arr[find - 1].array.push(dda[i]); | ||
| 633 | + } | ||
| 634 | + } else { | ||
| 635 | + var item = { zm: dda[i].zm, array: new Array() } | ||
| 636 | + item.array.push(dda[i]); | ||
| 637 | + arr.push(item); | ||
| 638 | + } | ||
| 639 | + } | ||
| 640 | + // if(parseInt(s.data.is_used_share)==0){ | ||
| 641 | + // arr.sort(compare("zm")); | ||
| 642 | + // }else{ | ||
| 643 | + // var ob={array:dda}; | ||
| 644 | + // arr.push(ob); | ||
| 645 | + // } | ||
| 646 | + | ||
| 647 | + arr.sort(compare("zm")); | ||
| 648 | + | ||
| 649 | + s.setData({ groups: arr }); | ||
| 650 | + //console.log(s.data.groups) | ||
| 639 | } | 651 | } |
| 640 | }); | 652 | }); |
| 641 | }, | 653 | }, |
| 642 | 654 | ||
| 643 | 655 | ||
| 644 | // 获取服务卡项分类 | 656 | // 获取服务卡项分类 |
| 645 | - getServiceCategory: function() { | 657 | + getServiceCategory: function () { |
| 646 | var s = this; | 658 | var s = this; |
| 647 | e.get("/api/weshop/serviceCategory/page", { | 659 | e.get("/api/weshop/serviceCategory/page", { |
| 648 | data: { | 660 | data: { |
| 649 | is_show: 1, | 661 | is_show: 1, |
| 650 | - store_id:oo.stoid, | ||
| 651 | - pageSize: 1000, | 662 | + store_id: oo.stoid, |
| 663 | + pageSize: 1000, | ||
| 652 | }, | 664 | }, |
| 653 | success: function (e) { | 665 | success: function (e) { |
| 654 | var dda = e.data.data.pageData; | 666 | var dda = e.data.data.pageData; |
| 655 | - s.setData({ | ||
| 656 | - xmlist:dda, | ||
| 657 | - }); | 667 | + s.setData({ |
| 668 | + xmlist: dda, | ||
| 669 | + }); | ||
| 658 | } | 670 | } |
| 659 | }); | 671 | }); |
| 660 | }, | 672 | }, |
| 661 | 673 | ||
| 662 | - | ||
| 663 | - goServiceCategoryList: function(t) { | 674 | + |
| 675 | + goServiceCategoryList: function (t) { | ||
| 664 | var cid = t.currentTarget.dataset.cid; | 676 | var cid = t.currentTarget.dataset.cid; |
| 665 | var lurl = "/packageA/pages/cardList/cardList?cat_id=" + cid; | 677 | var lurl = "/packageA/pages/cardList/cardList?cat_id=" + cid; |
| 666 | wx.navigateTo({ url: lurl }); | 678 | wx.navigateTo({ url: lurl }); |
| @@ -668,45 +680,45 @@ Page({ | @@ -668,45 +680,45 @@ Page({ | ||
| 668 | 680 | ||
| 669 | //---------分享配置-------- | 681 | //---------分享配置-------- |
| 670 | onShareAppMessage: function (e) { | 682 | onShareAppMessage: function (e) { |
| 671 | - getApp().globalData.no_clear=1; | ||
| 672 | - var url="pages/goods/categoryList/categoryList"; | ||
| 673 | - var userInfo=getApp().globalData.userInfo; | ||
| 674 | - //是分销商才带 | ||
| 675 | - if(userInfo){ | ||
| 676 | - url+="?first_leader="+userInfo.user_id; | ||
| 677 | - } | ||
| 678 | - console.log("--分类分享---分享--"); | ||
| 679 | - console.log(url); | ||
| 680 | - | 683 | + getApp().globalData.no_clear = 1; |
| 684 | + var url = "pages/goods/categoryList/categoryList"; | ||
| 685 | + var userInfo = getApp().globalData.userInfo; | ||
| 686 | + //是分销商才带 | ||
| 687 | + if (userInfo) { | ||
| 688 | + url += "?first_leader=" + userInfo.user_id; | ||
| 689 | + } | ||
| 690 | + console.log("--分类分享---分享--"); | ||
| 691 | + console.log(url); | ||
| 692 | + | ||
| 681 | return { | 693 | return { |
| 682 | - title: "商品分类", | ||
| 683 | - path:url, | 694 | + title: "商品分类", |
| 695 | + path: url, | ||
| 684 | } | 696 | } |
| 685 | }, | 697 | }, |
| 686 | //图片失败,默认图片 | 698 | //图片失败,默认图片 |
| 687 | - bind_bnerr: function (e) { | 699 | + bind_bnerr: function (e) { |
| 688 | var _errImg = e.target.dataset.errorimg; | 700 | var _errImg = e.target.dataset.errorimg; |
| 689 | var _errObj = {}; | 701 | var _errObj = {}; |
| 690 | - _errObj[_errImg] = this.data.iurl+"/miniapp/images/default_g_img.gif"; | 702 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; |
| 691 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 703 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 692 | }, | 704 | }, |
| 693 | - //图片失败,默认图片 | ||
| 694 | - bind_bnerr_pp: function (e) { | ||
| 695 | - var list = this.data.groups | ||
| 696 | - var _errImg = e.target.dataset.errorimg; | ||
| 697 | - var idx = e.target.dataset.idx; | ||
| 698 | - var pix = e.target.dataset.pix; | ||
| 699 | - | ||
| 700 | - }, | ||
| 701 | - //商品图片失败,默认图片 | 705 | + //图片失败,默认图片 |
| 706 | + bind_bnerr_pp: function (e) { | ||
| 707 | + var list = this.data.groups | ||
| 708 | + var _errImg = e.target.dataset.errorimg; | ||
| 709 | + var idx = e.target.dataset.idx; | ||
| 710 | + var pix = e.target.dataset.pix; | ||
| 711 | + | ||
| 712 | + }, | ||
| 713 | + //商品图片失败,默认图片 | ||
| 702 | goods_bnerr: function (e) { | 714 | goods_bnerr: function (e) { |
| 703 | - var _errImg = e.target.dataset.err; | 715 | + var _errImg = e.target.dataset.err; |
| 704 | var _errObj = {}; | 716 | var _errObj = {}; |
| 705 | _errObj[_errImg] = this.data.iurl + "/miniapp/images/no_cate_def.png"; | 717 | _errObj[_errImg] = this.data.iurl + "/miniapp/images/no_cate_def.png"; |
| 706 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 718 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 707 | }, | 719 | }, |
| 708 | 720 | ||
| 709 | - goseach:function(){ | 721 | + goseach: function () { |
| 710 | wx.navigateTo({ | 722 | wx.navigateTo({ |
| 711 | url: "/pages/goods/search/search" | 723 | url: "/pages/goods/search/search" |
| 712 | }); | 724 | }); |
| @@ -714,106 +726,108 @@ Page({ | @@ -714,106 +726,108 @@ Page({ | ||
| 714 | 726 | ||
| 715 | //图片失败,默认图片 | 727 | //图片失败,默认图片 |
| 716 | bind_bnerr2: function (e) { | 728 | bind_bnerr2: function (e) { |
| 717 | - var _errImg = e.target.dataset.errorimg; | ||
| 718 | - var _errObj = {}; | ||
| 719 | - _errObj[_errImg] = "/public/images/category.png"; | ||
| 720 | - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 721 | - | 729 | + var _errImg = e.target.dataset.errorimg; |
| 730 | + var _errObj = {}; | ||
| 731 | + _errObj[_errImg] = "/public/images/category.png"; | ||
| 732 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 733 | + | ||
| 722 | }, | 734 | }, |
| 723 | 735 | ||
| 724 | 736 | ||
| 725 | - //图片失败,默认图片 | ||
| 726 | - bind_bnerr_t3: function (e) { | ||
| 727 | - var _errImg = e.target.dataset.errorimg; | ||
| 728 | - var _errObj = {}; | ||
| 729 | - _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | ||
| 730 | - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 737 | + //图片失败,默认图片 |
| 738 | + bind_bnerr_t3: function (e) { | ||
| 739 | + var _errImg = e.target.dataset.errorimg; | ||
| 740 | + var _errObj = {}; | ||
| 741 | + _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | ||
| 742 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 731 | 743 | ||
| 732 | - }, | 744 | + }, |
| 733 | 745 | ||
| 734 | 746 | ||
| 735 | 747 | ||
| 736 | // 新的版本分类点击一级分类 | 748 | // 新的版本分类点击一级分类 |
| 737 | - click_classify:function(e){ | ||
| 738 | - // 在风格三的时候,才会有current | ||
| 739 | - clearInterval(this.data.timer); | ||
| 740 | - | ||
| 741 | - let cur = e.currentTarget.dataset.current; | ||
| 742 | - if(cur) { | 749 | + click_classify: function (e) { |
| 750 | + // 在风格三的时候,才会有current | ||
| 751 | + clearInterval(this.data.timer); | ||
| 752 | + this.setData({ | ||
| 753 | + toupper:true | ||
| 754 | + }) | ||
| 755 | + let cur = e.currentTarget.dataset.current; | ||
| 756 | + if (cur) { | ||
| 743 | if (this.data.currentTab == cur) { | 757 | if (this.data.currentTab == cur) { |
| 744 | - if (this.data.select_classify_on != 220 && this.data.select_classify_on != 221 && this.data.select_classify_on != 223) { | ||
| 745 | - return false; | ||
| 746 | - } else if (cur != 0) { | ||
| 747 | - return false; | ||
| 748 | - } | 758 | + if (this.data.select_classify_on != 220 && this.data.select_classify_on != 221 && this.data.select_classify_on != 223) { |
| 759 | + return false; | ||
| 760 | + } else if (cur != 0) { | ||
| 761 | + return false; | ||
| 762 | + } | ||
| 749 | } else { | 763 | } else { |
| 750 | - wx.pageScrollTo({ | ||
| 751 | - scrollTop: 0 | ||
| 752 | - }) | ||
| 753 | - this.setData({ | ||
| 754 | - currentTab: cur, | ||
| 755 | - select_classify_on: cur | ||
| 756 | - }) | ||
| 757 | - this.checkCor(); | 764 | + wx.pageScrollTo({ |
| 765 | + scrollTop: 0 | ||
| 766 | + }) | ||
| 767 | + this.setData({ | ||
| 768 | + currentTab: cur, | ||
| 769 | + select_classify_on: cur | ||
| 770 | + }) | ||
| 771 | + this.checkCor(); | ||
| 758 | } | 772 | } |
| 759 | - } | ||
| 760 | - this.setData({ | ||
| 761 | - countDownNum: 3, | ||
| 762 | - }); | ||
| 763 | - | ||
| 764 | - var arr2 = this.data.one_level_classify | ||
| 765 | - for(var i=0;i<arr2.length;i++){ | ||
| 766 | - if(i == e.currentTarget.dataset.index){ | ||
| 767 | - arr2[i]['items']['is_show_class'] = true | ||
| 768 | - }else{ | ||
| 769 | - arr2[i]['items']['is_show_class'] = false | ||
| 770 | - } | ||
| 771 | - } | ||
| 772 | - this.setData({ one_level_classify: arr2}); | ||
| 773 | - //this.data.one_level_classify[e.currentTarget.dataset.index]['items']['is_show_class'] = true | ||
| 774 | - // console.log(e.currentTarget.dataset.index) | ||
| 775 | - clearInterval(this.data.timer); | ||
| 776 | - this.setData({ countDownNum: 3, stylePage: 1, scrollTop: 0}); | ||
| 777 | - this.data.ishaf_three = 0; | ||
| 778 | - var indexs = e.currentTarget.dataset.index; | ||
| 779 | - var name = e.currentTarget.dataset.name; | ||
| 780 | - var cid = e.currentTarget.dataset.cid; | ||
| 781 | - var pid = e.currentTarget.dataset.pid; | ||
| 782 | - var arr = e.currentTarget.dataset.arr; | ||
| 783 | - console.log("cid:=" + name) | ||
| 784 | - if (indexs == 220) { this.get_brand(); } | ||
| 785 | - //==2的时候 请求数据为商品,不为分类 | ||
| 786 | - if (this.data.is_used_share == 2) { | ||
| 787 | - this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid,lastMsg: false, }); | ||
| 788 | - console.log("edqdqw:="+this.data.select_classify_on) | ||
| 789 | - this.style(this.data.stylePage, cid) | ||
| 790 | - }else{ | ||
| 791 | - if (arr != "undefined" && arr != undefined) { | ||
| 792 | - if (arr.length == 0) { | ||
| 793 | - this.setData({ | ||
| 794 | - select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid, | ||
| 795 | - goodslist: null, is_level_three: 0 | ||
| 796 | - }); | ||
| 797 | - return false; | ||
| 798 | - } | ||
| 799 | - if (arr.length != 0) { | ||
| 800 | - var is_lev_thr = 0 | ||
| 801 | - for (var i = 0; i < arr.length; i++) { | ||
| 802 | - if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; } | ||
| 803 | - } | ||
| 804 | - this.setData({ is_level_three: is_lev_thr }); | ||
| 805 | - | ||
| 806 | - if (this.data.is_level_three != 1) { | ||
| 807 | - this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, goodslist: arr }); | ||
| 808 | - } else { | ||
| 809 | - this.setData({ select_classify_on: indexs, index: indexs, goodslist: arr }); | 773 | + } |
| 774 | + this.setData({ | ||
| 775 | + countDownNum: 3, | ||
| 776 | + }); | ||
| 777 | + | ||
| 778 | + var arr2 = this.data.one_level_classify | ||
| 779 | + for (var i = 0; i < arr2.length; i++) { | ||
| 780 | + if (i == e.currentTarget.dataset.index) { | ||
| 781 | + arr2[i]['items']['is_show_class'] = true | ||
| 782 | + } else { | ||
| 783 | + arr2[i]['items']['is_show_class'] = false | ||
| 784 | + } | ||
| 785 | + } | ||
| 786 | + this.setData({ one_level_classify: arr2 }); | ||
| 787 | + //this.data.one_level_classify[e.currentTarget.dataset.index]['items']['is_show_class'] = true | ||
| 788 | + // console.log(e.currentTarget.dataset.index) | ||
| 789 | + clearInterval(this.data.timer); | ||
| 790 | + this.setData({ countDownNum: 3, stylePage: 1, scrollTop: 0 }); | ||
| 791 | + this.data.ishaf_three = 0; | ||
| 792 | + var indexs = e.currentTarget.dataset.index; | ||
| 793 | + var name = e.currentTarget.dataset.name; | ||
| 794 | + var cid = e.currentTarget.dataset.cid; | ||
| 795 | + var pid = e.currentTarget.dataset.pid; | ||
| 796 | + var arr = e.currentTarget.dataset.arr; | ||
| 797 | + console.log("cid:=" + name) | ||
| 798 | + if (indexs == 220) { this.get_brand(); } | ||
| 799 | + //==2的时候 请求数据为商品,不为分类 | ||
| 800 | + if (this.data.is_used_share == 2) { | ||
| 801 | + this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid, lastMsg: false, }); | ||
| 802 | + console.log("edqdqw:=" + this.data.select_classify_on) | ||
| 803 | + this.style(this.data.stylePage, cid) | ||
| 804 | + } else { | ||
| 805 | + if (arr != "undefined" && arr != undefined) { | ||
| 806 | + if (arr.length == 0) { | ||
| 807 | + this.setData({ | ||
| 808 | + select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid, | ||
| 809 | + goodslist: null, is_level_three: 0 | ||
| 810 | + }); | ||
| 811 | + return false; | ||
| 812 | + } | ||
| 813 | + if (arr.length != 0) { | ||
| 814 | + var is_lev_thr = 0 | ||
| 815 | + for (var i = 0; i < arr.length; i++) { | ||
| 816 | + if (arr[i].arrays.length > 0) { is_lev_thr = 1; break; } | ||
| 817 | + } | ||
| 818 | + this.setData({ is_level_three: is_lev_thr }); | ||
| 819 | + | ||
| 820 | + if (this.data.is_level_three != 1) { | ||
| 821 | + this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, goodslist: arr }); | ||
| 822 | + } else { | ||
| 823 | + this.setData({ select_classify_on: indexs, index: indexs, goodslist: arr }); | ||
| 824 | + } | ||
| 810 | } | 825 | } |
| 811 | - } | ||
| 812 | - } | ||
| 813 | - this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid, stylePage: 1,lastMsg: false,}); | ||
| 814 | - } | ||
| 815 | - | ||
| 816 | - }, | 826 | + } |
| 827 | + this.setData({ select_classify_on: indexs, index: indexs, classify_name: name, cat_id: cid, stylePage: 1, lastMsg: false, }); | ||
| 828 | + } | ||
| 829 | + | ||
| 830 | + }, | ||
| 817 | 831 | ||
| 818 | 832 | ||
| 819 | //图片失败 | 833 | //图片失败 |
| @@ -825,34 +839,34 @@ Page({ | @@ -825,34 +839,34 @@ Page({ | ||
| 825 | _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | 839 | _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; |
| 826 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 840 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 827 | }, | 841 | }, |
| 828 | - | ||
| 829 | - | 842 | + |
| 843 | + | ||
| 830 | //选择更多 | 844 | //选择更多 |
| 831 | - select_more:function(e){ | 845 | + select_more: function (e) { |
| 832 | var cid = e.currentTarget.dataset.cid; | 846 | var cid = e.currentTarget.dataset.cid; |
| 833 | var pid = e.currentTarget.dataset.pid; | 847 | var pid = e.currentTarget.dataset.pid; |
| 834 | var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid + "&pid=" + pid; | 848 | var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid + "&pid=" + pid; |
| 835 | wx.navigateTo({ url: lurl }); | 849 | wx.navigateTo({ url: lurl }); |
| 836 | - | 850 | + |
| 837 | }, | 851 | }, |
| 838 | - | ||
| 839 | - | ||
| 840 | -//扫一扫 | ||
| 841 | - getScancode:function(){ | ||
| 842 | - var _this = this; | ||
| 843 | - getApp().globalData.no_clear=1; | 852 | + |
| 853 | + | ||
| 854 | + //扫一扫 | ||
| 855 | + getScancode: function () { | ||
| 856 | + var _this = this; | ||
| 857 | + getApp().globalData.no_clear = 1; | ||
| 844 | // 允许从相机和相册扫码 | 858 | // 允许从相机和相册扫码 |
| 845 | wx.scanCode({ | 859 | wx.scanCode({ |
| 846 | success: (res) => { | 860 | success: (res) => { |
| 847 | - var result = res.result; | ||
| 848 | - wx.navigateTo({ | ||
| 849 | - url: "/pages/goods/search/search?s_key="+result, | ||
| 850 | - }); | 861 | + var result = res.result; |
| 862 | + wx.navigateTo({ | ||
| 863 | + url: "/pages/goods/search/search?s_key=" + result, | ||
| 864 | + }); | ||
| 851 | } | 865 | } |
| 852 | }) | 866 | }) |
| 853 | }, | 867 | }, |
| 854 | - | ||
| 855 | - | 868 | + |
| 869 | + | ||
| 856 | onUnload: function () { | 870 | onUnload: function () { |
| 857 | //this.destroyActivityTimer(); | 871 | //this.destroyActivityTimer(); |
| 858 | }, | 872 | }, |
| @@ -882,30 +896,93 @@ Page({ | @@ -882,30 +896,93 @@ Page({ | ||
| 882 | console.log(data.data.data.pageData) | 896 | console.log(data.data.data.pageData) |
| 883 | that.setData({ | 897 | that.setData({ |
| 884 | requestData: data.data.data.pageData, | 898 | requestData: data.data.data.pageData, |
| 885 | - is_go: 1 | 899 | + is_go: 1 |
| 886 | }); | 900 | }); |
| 887 | that.setData({ is_go: 1 }); | 901 | that.setData({ is_go: 1 }); |
| 888 | - that.data.stylePage++ , null == that.data.allData && (that.data.allData = Object.assign({}, data.data.data.pageData)), | 902 | + that.data.stylePage++, null == that.data.allData && (that.data.allData = Object.assign({}, data.data.data.pageData)), |
| 889 | wx.stopPullDownRefresh(); | 903 | wx.stopPullDownRefresh(); |
| 890 | } | 904 | } |
| 891 | }); | 905 | }); |
| 892 | 906 | ||
| 893 | }, | 907 | }, |
| 894 | 908 | ||
| 895 | - | 909 | + |
| 896 | // 左侧更新 | 910 | // 左侧更新 |
| 897 | scrollLower: function (data) { | 911 | scrollLower: function (data) { |
| 898 | - if(this.data.is_no_more) return false; | 912 | + if (this.data.is_no_more) return false; |
| 899 | var that = this; | 913 | var that = this; |
| 900 | clearInterval(that.data.timer); | 914 | clearInterval(that.data.timer); |
| 901 | that.setData({ | 915 | that.setData({ |
| 902 | stylePage: that.data.stylePage + 1, | 916 | stylePage: that.data.stylePage + 1, |
| 903 | countDownNum: 3, | 917 | countDownNum: 3, |
| 904 | lastMsg: false, | 918 | lastMsg: false, |
| 905 | - }); | ||
| 906 | - that.style(that.data.stylePage, that.data.cat_id); | 919 | + }); |
| 920 | + if (nextTimeOff) { | ||
| 921 | + clearTimeout(nextTimeOff) | ||
| 922 | + } | ||
| 923 | + nextTimeOff = setTimeout(()=>{ | ||
| 924 | + that.style(that.data.stylePage, that.data.cat_id); | ||
| 925 | + },1000) | ||
| 926 | + }, | ||
| 927 | + scrolltoupper(){ | ||
| 928 | + console.log('到顶部--------'); | ||
| 929 | + this.setData({ | ||
| 930 | + toupper:true | ||
| 931 | + }) | ||
| 932 | + }, | ||
| 933 | + bScroll(even){ | ||
| 934 | + console.log('滑动开始'); | ||
| 935 | + console.log(even); | ||
| 936 | + this.setData({ | ||
| 937 | + sClientY:even.changedTouches.length>0 ? even.changedTouches[0].clientY : 0 | ||
| 938 | + }) | ||
| 939 | + }, | ||
| 940 | + btouMove(even){ | ||
| 941 | + console.log('滑动结束'); | ||
| 942 | + console.log(even); | ||
| 943 | + let eClientY = even.changedTouches.length>0 ? even.changedTouches[0].clientY : 0 | ||
| 944 | + let sClientY = this.data.sClientY | ||
| 945 | + console.log(eClientY - sClientY); | ||
| 946 | + if (eClientY - sClientY > 0) { | ||
| 947 | + console.log('下滑'); | ||
| 948 | + if (this.data.toupper) { | ||
| 949 | + this.setData({msgStatus:false,is_no_more:false}) | ||
| 950 | + clearInterval(this.data.timer); | ||
| 951 | + this.nextCategory(true) | ||
| 952 | + }else{ | ||
| 953 | + this.disNexCat() | ||
| 954 | + } | ||
| 955 | + }else{ | ||
| 956 | + console.log('上滑'); | ||
| 957 | + this.setData({ | ||
| 958 | + toupper:false | ||
| 959 | + }) | ||
| 960 | + this.disNexCat() | ||
| 961 | + } | ||
| 962 | + }, | ||
| 963 | + disNexCat(){ | ||
| 964 | + let that = this | ||
| 965 | + const { windowHeight } = wx.getSystemInfoSync() | ||
| 966 | + wx.createSelectorQuery().select('#sview').boundingClientRect(function(rect){ | ||
| 967 | + if (rect) { | ||
| 968 | + const { top,height } = rect | ||
| 969 | + if ((top < windowHeight) && (top + height >0) ) { | ||
| 970 | + let nextShow2 = that.data.nextShow2 | ||
| 971 | + if (nextShow2) { | ||
| 972 | + that.nextCategory() | ||
| 973 | + }else{ | ||
| 974 | + that.setData({ | ||
| 975 | + nextShow2:true | ||
| 976 | + }) | ||
| 977 | + } | ||
| 978 | + }else{ | ||
| 979 | + that.setData({ | ||
| 980 | + nextShow2:false | ||
| 981 | + }) | ||
| 982 | + } | ||
| 983 | + } | ||
| 984 | + }).exec() | ||
| 907 | }, | 985 | }, |
| 908 | - | ||
| 909 | //页面版面风格三的时候请求推荐商品 返回 | 986 | //页面版面风格三的时候请求推荐商品 返回 |
| 910 | style: function (page, cid) { | 987 | style: function (page, cid) { |
| 911 | console.log("page:=" + page) | 988 | console.log("page:=" + page) |
| @@ -913,26 +990,28 @@ Page({ | @@ -913,26 +990,28 @@ Page({ | ||
| 913 | e.get("/api/weshop/goods/page?1=1", { | 990 | e.get("/api/weshop/goods/page?1=1", { |
| 914 | data: { page: page, cat_id: cid, parent_id: 0, orderField: 'sort', orderType: 'asc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 }, | 991 | data: { page: page, cat_id: cid, parent_id: 0, orderField: 'sort', orderType: 'asc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 }, |
| 915 | success: function (e) { | 992 | success: function (e) { |
| 993 | + console.log('上拉加载。。。。。。。。。'); | ||
| 916 | console.log(e.data.data.pageData) | 994 | console.log(e.data.data.pageData) |
| 917 | 995 | ||
| 918 | if (e.data.data.pageData.length > 0) { | 996 | if (e.data.data.pageData.length > 0) { |
| 997 | + clearInterval(s.data.timer); | ||
| 919 | s.setData({ | 998 | s.setData({ |
| 920 | - msgStatus: false,is_no_more:0 | 999 | + msgStatus: false, is_no_more: 0,nextShow:false,nextShow2:false |
| 921 | }); | 1000 | }); |
| 922 | //如果有数据 判断分页为第一页的时候直接渲染数据 | 1001 | //如果有数据 判断分页为第一页的时候直接渲染数据 |
| 923 | if (page > 1) { | 1002 | if (page > 1) { |
| 924 | //如果分页不是在第一页 那么就把返回的数据追加到原有数据后面 | 1003 | //如果分页不是在第一页 那么就把返回的数据追加到原有数据后面 |
| 925 | var arr = s.data.requestData | 1004 | var arr = s.data.requestData |
| 926 | - | ||
| 927 | - for (var i = 0; i < e.data.data.pageData.length;i++){ | 1005 | + |
| 1006 | + for (var i = 0; i < e.data.data.pageData.length; i++) { | ||
| 928 | arr.push(e.data.data.pageData[i]); | 1007 | arr.push(e.data.data.pageData[i]); |
| 929 | } | 1008 | } |
| 930 | - | 1009 | + |
| 931 | s.setData({ | 1010 | s.setData({ |
| 932 | requestData: arr | 1011 | requestData: arr |
| 933 | }); | 1012 | }); |
| 934 | - | ||
| 935 | - }else{ | 1013 | + |
| 1014 | + } else { | ||
| 936 | s.setData({ | 1015 | s.setData({ |
| 937 | requestData: e.data.data.pageData | 1016 | requestData: e.data.data.pageData |
| 938 | }); | 1017 | }); |
| @@ -940,39 +1019,24 @@ Page({ | @@ -940,39 +1019,24 @@ Page({ | ||
| 940 | wx.pageScrollTo({ | 1019 | wx.pageScrollTo({ |
| 941 | scrollTop: 0 | 1020 | scrollTop: 0 |
| 942 | }) | 1021 | }) |
| 943 | - } | 1022 | + } |
| 944 | } | 1023 | } |
| 945 | 1024 | ||
| 946 | - s.setData({ | ||
| 947 | - dataLength: s.data.requestData.length, | ||
| 948 | - }); | ||
| 949 | - | 1025 | + s.setData({ |
| 1026 | + dataLength: s.data.requestData.length, | ||
| 1027 | + }); | ||
| 1028 | + | ||
| 950 | } else { | 1029 | } else { |
| 951 | //没有数据页面显示暂无数据 | 1030 | //没有数据页面显示暂无数据 |
| 952 | if (page != 1) { | 1031 | if (page != 1) { |
| 953 | - var dataArray = s.data.one_level_classify | ||
| 954 | - var index = s.data.index | ||
| 955 | - dataArray[index]['items']['is_show_class'] = false | ||
| 956 | - //没有下一个类别的时候 | ||
| 957 | - if(index+1>=dataArray.length){ | ||
| 958 | - s.setData({is_no_more:1}); | ||
| 959 | - }else{ | ||
| 960 | - dataArray[index+1]['items']['is_show_class'] = true | ||
| 961 | - console.log(dataArray[index + 1]['items']) | ||
| 962 | - s.setData({ | ||
| 963 | - msgStatus: true, | ||
| 964 | - stylePage: 1, | ||
| 965 | - index: index + 1, | ||
| 966 | - select_classify_on: index + 1, | ||
| 967 | - cat_id: dataArray[index + 1]['items']['id'], | ||
| 968 | - classify_name: dataArray[index + 1]['items']['name'], | ||
| 969 | - one_level_classify: dataArray, | ||
| 970 | - is_no_more:0 | ||
| 971 | - }); | ||
| 972 | - s.style(s.data.stylePage, dataArray[index + 1]['items']['id']) | ||
| 973 | - } | ||
| 974 | - | ||
| 975 | - }else{ | 1032 | + let nextShow = s.data.nextShow |
| 1033 | + | ||
| 1034 | + if (!nextShow) { | ||
| 1035 | + s.setData({ | ||
| 1036 | + nextShow:true | ||
| 1037 | + }) | ||
| 1038 | + } | ||
| 1039 | + } else { | ||
| 976 | //没有数据而且是第一页的时候 | 1040 | //没有数据而且是第一页的时候 |
| 977 | s.setData({ | 1041 | s.setData({ |
| 978 | stylePage: 1, | 1042 | stylePage: 1, |
| @@ -982,9 +1046,10 @@ Page({ | @@ -982,9 +1046,10 @@ Page({ | ||
| 982 | msgStatus: true, | 1046 | msgStatus: true, |
| 983 | countDownNum: countDownNum, | 1047 | countDownNum: countDownNum, |
| 984 | requestData: [], | 1048 | requestData: [], |
| 985 | - is_no_more:0, | 1049 | + is_no_more: 0, |
| 986 | }); | 1050 | }); |
| 987 | - s.data.timer=setInterval(function () { | 1051 | + clearInterval(s.data.timer); |
| 1052 | + s.data.timer = setInterval(function () { | ||
| 988 | if (countDownNum == 0) { | 1053 | if (countDownNum == 0) { |
| 989 | clearInterval(s.data.timer); | 1054 | clearInterval(s.data.timer); |
| 990 | //关闭定时器之后,可作其他处理 | 1055 | //关闭定时器之后,可作其他处理 |
| @@ -997,50 +1062,82 @@ Page({ | @@ -997,50 +1062,82 @@ Page({ | ||
| 997 | var dataArray = s.data.one_level_classify | 1062 | var dataArray = s.data.one_level_classify |
| 998 | var index = s.data.index | 1063 | var index = s.data.index |
| 999 | console.log(dataArray[index + 1]) | 1064 | console.log(dataArray[index + 1]) |
| 1000 | - if (dataArray[index + 1] == undefined || dataArray[index + 1] == "undefined"){ | 1065 | + if (dataArray[index + 1] == undefined || dataArray[index + 1] == "undefined") { |
| 1001 | console.log("dataArray[index + 1] = undefined") | 1066 | console.log("dataArray[index + 1] = undefined") |
| 1002 | s.setData({ | 1067 | s.setData({ |
| 1003 | stylePage: 1, | 1068 | stylePage: 1, |
| 1004 | msgStatus: true, | 1069 | msgStatus: true, |
| 1005 | lastMsg: true | 1070 | lastMsg: true |
| 1006 | }); | 1071 | }); |
| 1007 | - }else{ | 1072 | + } else { |
| 1008 | dataArray[index]['items']['is_show_class'] = false | 1073 | dataArray[index]['items']['is_show_class'] = false |
| 1009 | - dataArray[index+1]['items']['is_show_class'] = true | 1074 | + dataArray[index + 1]['items']['is_show_class'] = true |
| 1010 | s.setData({ | 1075 | s.setData({ |
| 1011 | stylePage: 1, | 1076 | stylePage: 1, |
| 1012 | index: index + 1, | 1077 | index: index + 1, |
| 1013 | select_classify_on: index + 1, | 1078 | select_classify_on: index + 1, |
| 1014 | cat_id: dataArray[index + 1]['items']['id'], | 1079 | cat_id: dataArray[index + 1]['items']['id'], |
| 1015 | classify_name: dataArray[index + 1]['items']['name'], | 1080 | classify_name: dataArray[index + 1]['items']['name'], |
| 1016 | - one_level_classify:dataArray | 1081 | + one_level_classify: dataArray |
| 1017 | }); | 1082 | }); |
| 1018 | s.style(s.data.stylePage, dataArray[index + 1]['items']['id']); | 1083 | s.style(s.data.stylePage, dataArray[index + 1]['items']['id']); |
| 1019 | } | 1084 | } |
| 1020 | - | 1085 | + |
| 1021 | } | 1086 | } |
| 1022 | countDownNum--; | 1087 | countDownNum--; |
| 1023 | s.setData({ | 1088 | s.setData({ |
| 1024 | countDownNum: countDownNum | 1089 | countDownNum: countDownNum |
| 1025 | }) | 1090 | }) |
| 1026 | var arr2 = s.data.one_level_classify | 1091 | var arr2 = s.data.one_level_classify |
| 1027 | - for(var i=0;i<arr2.length;i++){ | ||
| 1028 | - if(i == s.data.index){ | ||
| 1029 | - arr2[i]['items']['is_show_class'] = true | ||
| 1030 | - }else{ | ||
| 1031 | - arr2[i]['items']['is_show_class'] = false | 1092 | + for (var i = 0; i < arr2.length; i++) { |
| 1093 | + if (i == s.data.index) { | ||
| 1094 | + arr2[i]['items']['is_show_class'] = true | ||
| 1095 | + } else { | ||
| 1096 | + arr2[i]['items']['is_show_class'] = false | ||
| 1032 | } | 1097 | } |
| 1033 | } | 1098 | } |
| 1034 | - s.setData({ one_level_classify: arr2}); | 1099 | + s.setData({ one_level_classify: arr2 }); |
| 1035 | }, 1000) | 1100 | }, 1000) |
| 1036 | } | 1101 | } |
| 1037 | - | ||
| 1038 | - | 1102 | + |
| 1103 | + | ||
| 1039 | } | 1104 | } |
| 1040 | } | 1105 | } |
| 1041 | }); | 1106 | }); |
| 1042 | }, | 1107 | }, |
| 1043 | - | 1108 | + //下一个品类 |
| 1109 | + nextCategory(up=false){ | ||
| 1110 | + console.log('跳转下一个页面'); | ||
| 1111 | + clearInterval(this.data.timer); | ||
| 1112 | + this.setData({ | ||
| 1113 | + nextShow:false | ||
| 1114 | + }) | ||
| 1115 | + var dataArray = this.data.one_level_classify | ||
| 1116 | + var index = this.data.index | ||
| 1117 | + let s = 1 | ||
| 1118 | + if (up) { | ||
| 1119 | + s = -1 | ||
| 1120 | + } | ||
| 1121 | + dataArray[index]['items']['is_show_class'] = false | ||
| 1122 | + //没有下一个类别的时候 | ||
| 1123 | + if (index + s >= dataArray.length || index+s < 0) { | ||
| 1124 | + this.setData({ is_no_more: 1 }); | ||
| 1125 | + } else { | ||
| 1126 | + dataArray[index + s]['items']['is_show_class'] = true | ||
| 1127 | + console.log(dataArray[index + s]['items']) | ||
| 1128 | + this.setData({ | ||
| 1129 | + msgStatus: false, | ||
| 1130 | + stylePage: 1, | ||
| 1131 | + index: index + s, | ||
| 1132 | + select_classify_on: index + s, | ||
| 1133 | + cat_id: dataArray[index + s]['items']['id'], | ||
| 1134 | + classify_name: dataArray[index + s]['items']['name'], | ||
| 1135 | + one_level_classify: dataArray, | ||
| 1136 | + is_no_more: 0 | ||
| 1137 | + }); | ||
| 1138 | + this.style(this.data.stylePage, dataArray[index + 1]['items']['id']) | ||
| 1139 | + } | ||
| 1140 | + }, | ||
| 1044 | 1141 | ||
| 1045 | openFilterModal: function () { | 1142 | openFilterModal: function () { |
| 1046 | this.setData({ | 1143 | this.setData({ |
| @@ -1090,28 +1187,28 @@ Page({ | @@ -1090,28 +1187,28 @@ Page({ | ||
| 1090 | func(ob); | 1187 | func(ob); |
| 1091 | }) | 1188 | }) |
| 1092 | }, | 1189 | }, |
| 1093 | - | 1190 | + |
| 1094 | //导航跳转 | 1191 | //导航跳转 |
| 1095 | - nav_goto:function(e){ | ||
| 1096 | - var url=e.currentTarget.dataset.url; | ||
| 1097 | - if(!url || url=='') return; | ||
| 1098 | - if(url[0]!='/') url='/'+url; | ||
| 1099 | - getApp().goto(url); | ||
| 1100 | - }, | ||
| 1101 | - | ||
| 1102 | - onShareTimeline(){ | ||
| 1103 | - getApp().globalData.no_clear=1; | ||
| 1104 | - var store_name=getApp().globalData.config?getApp().globalData.config.store_name:''; | ||
| 1105 | - if(!store_name) | ||
| 1106 | - store_name=getApp().globalData.setting.appName; | ||
| 1107 | - | ||
| 1108 | - var user_id=getApp().globalData.user_id; | ||
| 1109 | - if(!user_id) user_id=0; | ||
| 1110 | - | ||
| 1111 | - return { | ||
| 1112 | - title:'商品分类-'+store_name, | ||
| 1113 | - query: "first_leader=" + user_id | ||
| 1114 | - } | 1192 | + nav_goto: function (e) { |
| 1193 | + var url = e.currentTarget.dataset.url; | ||
| 1194 | + if (!url || url == '') return; | ||
| 1195 | + if (url[0] != '/') url = '/' + url; | ||
| 1196 | + getApp().goto(url); | ||
| 1197 | + }, | ||
| 1198 | + | ||
| 1199 | + onShareTimeline() { | ||
| 1200 | + getApp().globalData.no_clear = 1; | ||
| 1201 | + var store_name = getApp().globalData.config ? getApp().globalData.config.store_name : ''; | ||
| 1202 | + if (!store_name) | ||
| 1203 | + store_name = getApp().globalData.setting.appName; | ||
| 1204 | + | ||
| 1205 | + var user_id = getApp().globalData.user_id; | ||
| 1206 | + if (!user_id) user_id = 0; | ||
| 1207 | + | ||
| 1208 | + return { | ||
| 1209 | + title: '商品分类-' + store_name, | ||
| 1210 | + query: "first_leader=" + user_id | ||
| 1115 | } | 1211 | } |
| 1212 | + } | ||
| 1116 | 1213 | ||
| 1117 | }); | 1214 | }); |
| 1118 | \ No newline at end of file | 1215 | \ No newline at end of file |
pages/goods/categoryList/categoryList.wxml
| @@ -5,231 +5,219 @@ | @@ -5,231 +5,219 @@ | ||
| 5 | <!-- 风格1 --> | 5 | <!-- 风格1 --> |
| 6 | <block wx:if="{{is_used_share==0}}"> | 6 | <block wx:if="{{is_used_share==0}}"> |
| 7 | <view class='top_view' wx:if="{{is_show_pl || is_show_gb || is_show_pp }}"> | 7 | <view class='top_view' wx:if="{{is_show_pl || is_show_gb || is_show_pp }}"> |
| 8 | - <view class="swiper-tab" > | ||
| 9 | - <view wx:if="{{is_show_pl}}" class="swiper-tab-item {{currentTab==0?'active':''}}" | ||
| 10 | - data-current="0" bindtap="clickTab">分类</view> | ||
| 11 | - <view wx:if="{{is_show_gb}}" class="swiper-tab-item {{currentTab==1?'active':''}}" | ||
| 12 | - data-current="1" bindtap="clickTab">国家</view> | ||
| 13 | - <view wx:if="{{is_show_pp}}" class="swiper-tab-item {{currentTab==2?'active':''}}" | ||
| 14 | - data-current="2" bindtap="clickTab">品牌</view> | ||
| 15 | - <view wx:if="{{is_show_xm}}" class="swiper-tab-item {{currentTab==3?'active':''}}" | ||
| 16 | - data-current="3" bindtap="clickTab">项目</view> | ||
| 17 | - </view> | 8 | + <view class="swiper-tab"> |
| 9 | + <view wx:if="{{is_show_pl}}" class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">分类</view> | ||
| 10 | + <view wx:if="{{is_show_gb}}" class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">国家</view> | ||
| 11 | + <view wx:if="{{is_show_pp}}" class="swiper-tab-item {{currentTab==2?'active':''}}" data-current="2" bindtap="clickTab">品牌</view> | ||
| 12 | + <view wx:if="{{is_show_xm}}" class="swiper-tab-item {{currentTab==3?'active':''}}" data-current="3" bindtap="clickTab">项目</view> | ||
| 13 | + </view> | ||
| 18 | </view> | 14 | </view> |
| 19 | - <view class="search-box " bindtap="goseach"> | ||
| 20 | - <view class="search-inner"> | ||
| 21 | - <view class="search-img"> | ||
| 22 | - <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> | ||
| 23 | - </view> | ||
| 24 | - <input bindfocus="goseach" class="search-cont" placeholder="寻找好口碑" type="text"></input> | ||
| 25 | - </view> | 15 | + <view class="search-box " bindtap="goseach"> |
| 16 | + <view class="search-inner"> | ||
| 17 | + <view class="search-img"> | ||
| 18 | + <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> | ||
| 19 | + </view> | ||
| 20 | + <input bindfocus="goseach" class="search-cont" placeholder="寻找好口碑" type="text"></input> | ||
| 21 | + </view> | ||
| 26 | </view> | 22 | </view> |
| 27 | <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> | 23 | <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> |
| 28 | - <swiper current="{{currentTab}}" duration="300" bindanimationfinish="swiperTab" style="height:{{abc}}rpx;margin-bottom:120rpx"> | 24 | + <swiper current="{{currentTab}}" duration="300" bindanimationfinish="swiperTab" style="height:{{abc}}rpx;margin-bottom:120rpx"> |
| 29 | <!--------分类----------> | 25 | <!--------分类----------> |
| 30 | - <swiper-item > | ||
| 31 | - <scroll-view scroll-y="true" class="fenlei-list" | ||
| 32 | - scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;" > | ||
| 33 | - <block wx:for="{{catelist}}" wx:for-item="fitem" > | ||
| 34 | - <view class='f_item'> | ||
| 35 | - <view class="pic_view" bindtap="go_cate" data-cid="{{fitem.items.id}}" data-pid="0"><image class='fl_img' src='{{iurl}}{{fitem.items.image}}' binderror="bind_bnerr2" data-errorimg="catelist[{{index}}].items.image"></image> | ||
| 36 | - <view class='over_view'></view> | ||
| 37 | - <text class='f_item_over_t'>{{fitem.items.name}}</text></view> | ||
| 38 | - <view class='fenlei_text_v'> | ||
| 39 | - <view class='f_text' wx:for="{{fitem.array}}" wx:for-item="item" | ||
| 40 | - bindtap="go_cate" data-cid="{{item.id}}" data-pid="{{item.parent_id}}">{{item.name}}</view> | ||
| 41 | - </view> | ||
| 42 | - </view> | ||
| 43 | - </block> | ||
| 44 | - </scroll-view> | 26 | + <swiper-item> |
| 27 | + <scroll-view scroll-y="true" class="fenlei-list" scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;"> | ||
| 28 | + <block wx:for="{{catelist}}" wx:for-item="fitem"> | ||
| 29 | + <view class='f_item'> | ||
| 30 | + <view class="pic_view" bindtap="go_cate" data-cid="{{fitem.items.id}}" data-pid="0"> | ||
| 31 | + <image class='fl_img' src='{{iurl}}{{fitem.items.image}}' binderror="bind_bnerr2" data-errorimg="catelist[{{index}}].items.image"></image> | ||
| 32 | + <view class='over_view'></view> | ||
| 33 | + <text class='f_item_over_t'>{{fitem.items.name}}</text> | ||
| 34 | + </view> | ||
| 35 | + <view class='fenlei_text_v'> | ||
| 36 | + <view class='f_text' wx:for="{{fitem.array}}" wx:for-item="item" bindtap="go_cate" data-cid="{{item.id}}" data-pid="{{item.parent_id}}">{{item.name}}</view> | ||
| 37 | + </view> | ||
| 38 | + </view> | ||
| 39 | + </block> | ||
| 40 | + </scroll-view> | ||
| 45 | </swiper-item> | 41 | </swiper-item> |
| 46 | <!-------国别----------> | 42 | <!-------国别----------> |
| 47 | <swiper-item> | 43 | <swiper-item> |
| 48 | - <scroll-view scroll-y="true" class="fenlei-list" | ||
| 49 | - scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;" > | ||
| 50 | - <view class='f_item' | ||
| 51 | - bindtap="go_nation" data-nid="{{bitem.id}}" | ||
| 52 | - wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx"> | ||
| 53 | - <view> | ||
| 54 | - <image wx:if="{{bitem.imgtype==1}}" class='n_img' src='{{bitem.logo}}'></image> | ||
| 55 | - <image wx:else class='n_img' src='{{iurl}}{{bitem.logo}}'></image> | ||
| 56 | - | ||
| 57 | - <view class='nation_box'> | ||
| 58 | - <view class='nt_1'><text class="nt_1_t">{{bitem.name}}</text></view> | ||
| 59 | - <view class='nt_2'>{{bitem.enname}}</view> | ||
| 60 | - </view> | ||
| 61 | - </view> | ||
| 62 | - </view> | ||
| 63 | - </scroll-view> | 44 | + <scroll-view scroll-y="true" class="fenlei-list" scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;"> |
| 45 | + <view class='f_item' bindtap="go_nation" data-nid="{{bitem.id}}" wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx"> | ||
| 46 | + <view> | ||
| 47 | + <image wx:if="{{bitem.imgtype==1}}" class='n_img' src='{{bitem.logo}}'></image> | ||
| 48 | + <image wx:else class='n_img' src='{{iurl}}{{bitem.logo}}'></image> | ||
| 49 | + | ||
| 50 | + <view class='nation_box'> | ||
| 51 | + <view class='nt_1'><text class="nt_1_t">{{bitem.name}}</text></view> | ||
| 52 | + <view class='nt_2'>{{bitem.enname}}</view> | ||
| 53 | + </view> | ||
| 54 | + </view> | ||
| 55 | + </view> | ||
| 56 | + </scroll-view> | ||
| 64 | </swiper-item> | 57 | </swiper-item> |
| 65 | <!-- 品牌 --> | 58 | <!-- 品牌 --> |
| 66 | <swiper-item> | 59 | <swiper-item> |
| 67 | - <scroll-view scroll-y="true" class="fenlei-list" | ||
| 68 | - style="height: {{abc}}rpx;" scroll-into-view="{{scrollIntoView}}"> | ||
| 69 | - <block wx:for="{{groups}}" wx:for-item="group" wx:for-index="pidx"> | ||
| 70 | - <view > | ||
| 71 | - <view id="{{group.zm}}" class="group-name">{{group.zm}}</view> | ||
| 72 | - <view class="group-users"> | ||
| 73 | - <view wx:for="{{group.array}}" bindtap="go_brand" data-bid="{{user.id}}" | ||
| 74 | - wx:for-item="user" wx:for-index="idx" class="user box box-lr"> | ||
| 75 | - <image class="user-avatar-img" src="{{user.logo}}" | ||
| 76 | - data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" | ||
| 77 | - binderror="bind_bnerr"></image> | ||
| 78 | - </view> | ||
| 79 | - </view> | ||
| 80 | - </view> | ||
| 81 | - </block> | ||
| 82 | - </scroll-view> | ||
| 83 | - | ||
| 84 | - <view class="nav box box-tb my-nav" catchtouchmove="touchmove" catchtouchend="touchend" > | ||
| 85 | -<!-- <image src="/images/up.png" style="width:36rpx;height:36rpx;margin-right:10rpx;"></image> --> | ||
| 86 | - <!-- <icon color="icon-close" color="#000" size="30" type="icon-shangjiantou" style=""></icon> --> | ||
| 87 | - <view class="iconfont icon-shangjiantou"></view> | ||
| 88 | - <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}" | ||
| 89 | - class="flex box box-align-center box-pack-center letter"> | ||
| 90 | - <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text> | 60 | + <scroll-view scroll-y="true" class="fenlei-list" style="height: {{abc}}rpx;" scroll-into-view="{{scrollIntoView}}"> |
| 61 | + <block wx:for="{{groups}}" wx:for-item="group" wx:for-index="pidx"> | ||
| 62 | + <view> | ||
| 63 | + <view id="{{group.zm}}" class="group-name">{{group.zm}}</view> | ||
| 64 | + <view class="group-users"> | ||
| 65 | + <view wx:for="{{group.array}}" bindtap="go_brand" data-bid="{{user.id}}" wx:for-item="user" wx:for-index="idx" class="user box box-lr"> | ||
| 66 | + <image class="user-avatar-img" src="{{user.logo}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr"></image> | ||
| 67 | + </view> | ||
| 91 | </view> | 68 | </view> |
| 92 | </view> | 69 | </view> |
| 70 | + </block> | ||
| 71 | + </scroll-view> | ||
| 72 | + | ||
| 73 | + <view class="nav box box-tb my-nav" catchtouchmove="touchmove" catchtouchend="touchend"> | ||
| 74 | + <!-- <image src="/images/up.png" style="width:36rpx;height:36rpx;margin-right:10rpx;"></image> --> | ||
| 75 | + <!-- <icon color="icon-close" color="#000" size="30" type="icon-shangjiantou" style=""></icon> --> | ||
| 76 | + <view class="iconfont icon-shangjiantou"></view> | ||
| 77 | + <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}" class="flex box box-align-center box-pack-center letter"> | ||
| 78 | + <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text> | ||
| 79 | + </view> | ||
| 80 | + </view> | ||
| 93 | </swiper-item> | 81 | </swiper-item> |
| 94 | - <!-------项目----------> | ||
| 95 | - <swiper-item wx:if="{{is_show_xm}}"> | ||
| 96 | - <scroll-view scroll-y="true" class="fenlei-list" | ||
| 97 | - scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;" > | ||
| 98 | - <block wx:if="{{xmlist && xmlist.length != 0}}"> | ||
| 99 | - <block wx:for="{{xmlist}}" wx:for-item="fitem" > | ||
| 100 | - <view class='f_item'> | ||
| 101 | - <view class="pic_view" bindtap="goServiceCategoryList" data-cid="{{fitem.id}}" data-pid="0"> | ||
| 102 | - | ||
| 103 | - <image wx:if="{{fitem.showImgType==1}}" binderror="bind_bnerr2" class='fl_img' data-errorimg="xmlist[{{index}}].showImg" src='{{fitem.showImg}}'></image> | ||
| 104 | - <image wx:else class='fl_img' binderror="bind_bnerr2" data-errorimg="xmlist[{{index}}].showImg" src='{{iurl}}{{fitem.showImg}}'></image> | ||
| 105 | - | ||
| 106 | - <view class='over_view'></view> | ||
| 107 | - <text class='f_item_over_t'>{{fitem.name}}</text></view> | ||
| 108 | - <view class='fenlei_text_v'> | ||
| 109 | - <view class='f_text' wx:for="{{fitem.array}}" wx:for-item="item" bindtap="goServiceCategoryList" data-cid="{{item.id}}" data-pid="{{item.parent_id}}">{{item.name}}</view> | ||
| 110 | - </view> | ||
| 111 | - </view> | ||
| 112 | - </block> | ||
| 113 | - </block> | ||
| 114 | - | ||
| 115 | - | ||
| 116 | - <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view> | ||
| 117 | - </scroll-view> | ||
| 118 | - </swiper-item> | ||
| 119 | - </swiper> | ||
| 120 | - <view class="no-data" wx:if="{{!is_date}}"> | 82 | + <!-------项目----------> |
| 83 | + <swiper-item wx:if="{{is_show_xm}}"> | ||
| 84 | + <scroll-view scroll-y="true" class="fenlei-list" scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;"> | ||
| 85 | + <block wx:if="{{xmlist && xmlist.length != 0}}"> | ||
| 86 | + <block wx:for="{{xmlist}}" wx:for-item="fitem"> | ||
| 87 | + <view class='f_item'> | ||
| 88 | + <view class="pic_view" bindtap="goServiceCategoryList" data-cid="{{fitem.id}}" data-pid="0"> | ||
| 89 | + | ||
| 90 | + <image wx:if="{{fitem.showImgType==1}}" binderror="bind_bnerr2" class='fl_img' data-errorimg="xmlist[{{index}}].showImg" src='{{fitem.showImg}}'></image> | ||
| 91 | + <image wx:else class='fl_img' binderror="bind_bnerr2" data-errorimg="xmlist[{{index}}].showImg" src='{{iurl}}{{fitem.showImg}}'></image> | ||
| 92 | + | ||
| 93 | + <view class='over_view'></view> | ||
| 94 | + <text class='f_item_over_t'>{{fitem.name}}</text> | ||
| 95 | + </view> | ||
| 96 | + <view class='fenlei_text_v'> | ||
| 97 | + <view class='f_text' wx:for="{{fitem.array}}" wx:for-item="item" bindtap="goServiceCategoryList" data-cid="{{item.id}}" data-pid="{{item.parent_id}}">{{item.name}}</view> | ||
| 98 | + </view> | ||
| 99 | + </view> | ||
| 100 | + </block> | ||
| 101 | + </block> | ||
| 102 | + | ||
| 103 | + | ||
| 104 | + <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view> | ||
| 105 | + </scroll-view> | ||
| 106 | + </swiper-item> | ||
| 107 | + </swiper> | ||
| 108 | + <view class="no-data" wx:if="{{!is_date}}"> | ||
| 121 | <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> | 109 | <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> |
| 122 | <view class="no-data-title">暂无分类</view> | 110 | <view class="no-data-title">暂无分类</view> |
| 123 | <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> | 111 | <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> |
| 124 | - </view> | 112 | + </view> |
| 125 | </block> | 113 | </block> |
| 126 | <block wx:elif="{{is_do}}"> | 114 | <block wx:elif="{{is_do}}"> |
| 127 | - <view class="no-data" > | 115 | + <view class="no-data"> |
| 128 | <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> | 116 | <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> |
| 129 | <view class="no-data-title">商家暂未设置分类</view> | 117 | <view class="no-data-title">商家暂未设置分类</view> |
| 130 | <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> | 118 | <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> |
| 131 | - </view> | 119 | + </view> |
| 132 | </block> | 120 | </block> |
| 133 | </block> | 121 | </block> |
| 134 | <!-- 风格2 --> | 122 | <!-- 风格2 --> |
| 135 | <block wx:elif="{{is_used_share == 1}}"> | 123 | <block wx:elif="{{is_used_share == 1}}"> |
| 136 | - <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> | ||
| 137 | - <!-- 新版分类头部 --> | ||
| 138 | - <view class="xc-search-box flex jc_sb ai-center" style="position:fixed;top:0;z-index:99"> | ||
| 139 | - <!-- <view class="xc-search-inner "> | 124 | + <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> |
| 125 | + <!-- 新版分类头部 --> | ||
| 126 | + <view class="xc-search-box flex jc_sb ai-center" style="position:fixed;top:0;z-index:99"> | ||
| 127 | + <!-- <view class="xc-search-inner "> | ||
| 140 | <view class="search-img left"> | 128 | <view class="search-img left"> |
| 141 | <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> | 129 | <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> |
| 142 | </view> | 130 | </view> |
| 143 | <input bindfocus="goseach" class="search-cont" placeholder="搜索店铺商品" type="text"></input> | 131 | <input bindfocus="goseach" class="search-cont" placeholder="搜索店铺商品" type="text"></input> |
| 144 | </view> --> | 132 | </view> --> |
| 145 | - <!-- 搜索框 --> | ||
| 146 | - <view class="search-container f1"> | ||
| 147 | - <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</view> | ||
| 148 | - </view> | ||
| 149 | - <view class="pdl30" bindtap="getScancode" > | ||
| 150 | - <image class="scanning_black-img"src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> | ||
| 151 | - <!-- <view class="fs24">扫一扫</view> --> | ||
| 152 | - </view> | ||
| 153 | - | ||
| 154 | - </view> | ||
| 155 | - | ||
| 156 | - | ||
| 157 | - <!-- 分类项目内容 22 --> | ||
| 158 | - <view class="flex project_height" style="height:100%;box-sizing:border-box;padding-bottom:100rpx;padding-top:108rpx;" id="two_type"> | ||
| 159 | - <!-- 分类项目的类型 --> | ||
| 160 | - <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;"> | ||
| 161 | - <view class="project_type-frame" style="margin-bottom:120rpx;"> | ||
| 162 | - <view wx:if="{{is_show_gb}}" class="{{status_show == 1?'':''}}"> | ||
| 163 | - <!-- <view style="{{status_show == 1?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 164 | - <view bindtap="click_classify" style="{{status_show == 1?'margin-top:0':'margin-top:40rpx'}}" class="fs30 {{select_classify_on==223?'select_classify':''}}" data-index="223" data-name="国家" wx:if="{{is_country}}"> | ||
| 165 | - | ||
| 166 | - <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">国家</view> --> | ||
| 167 | - <view class="tab-bar-item sort-name ellipsis-1" style="">国家</view> | ||
| 168 | - | ||
| 169 | - </view> | ||
| 170 | - </view> | ||
| 171 | - | ||
| 172 | - <view wx:if="{{is_show_pp}}"> | ||
| 173 | - <!-- <view style="{{status_show == 2?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 174 | - <view bindtap="click_classify" class="{{select_classify_on==220?'select_classify':''}} fs30" wx:if="{{is_brand}}" data-index="220" data-name="品牌"> | ||
| 175 | - | ||
| 176 | - <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">品牌</view> --> | ||
| 177 | - <view class="tab-bar-item sort-name ellipsis-1" style="">品牌</view> | ||
| 178 | - </view> | 133 | + <!-- 搜索框 --> |
| 134 | + <view class="search-container f1"> | ||
| 135 | + <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</view> | ||
| 136 | + </view> | ||
| 137 | + <view class="pdl30" bindtap="getScancode"> | ||
| 138 | + <image class="scanning_black-img" src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> | ||
| 139 | + <!-- <view class="fs24">扫一扫</view> --> | ||
| 140 | + </view> | ||
| 141 | + | ||
| 142 | + </view> | ||
| 143 | + | ||
| 144 | + | ||
| 145 | + <!-- 分类项目内容 22 --> | ||
| 146 | + <view class="flex project_height" style="height:100%;box-sizing:border-box;padding-bottom:100rpx;padding-top:108rpx;" id="two_type"> | ||
| 147 | + <!-- 分类项目的类型 --> | ||
| 148 | + <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;"> | ||
| 149 | + <view class="project_type-frame" style="margin-bottom:120rpx;"> | ||
| 150 | + <view wx:if="{{is_show_gb}}" class="{{status_show == 1?'':''}}"> | ||
| 151 | + <!-- <view style="{{status_show == 1?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 152 | + <view bindtap="click_classify" style="{{status_show == 1?'margin-top:0':'margin-top:40rpx'}}" class="fs30 {{select_classify_on==223?'select_classify':''}}" data-index="223" data-name="国家" wx:if="{{is_country}}"> | ||
| 153 | + | ||
| 154 | + <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">国家</view> --> | ||
| 155 | + <view class="tab-bar-item sort-name ellipsis-1" style="">国家</view> | ||
| 156 | + | ||
| 157 | + </view> | ||
| 158 | + </view> | ||
| 159 | + | ||
| 160 | + <view wx:if="{{is_show_pp}}"> | ||
| 161 | + <!-- <view style="{{status_show == 2?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 162 | + <view bindtap="click_classify" class="{{select_classify_on==220?'select_classify':''}} fs30" wx:if="{{is_brand}}" data-index="220" data-name="品牌"> | ||
| 163 | + | ||
| 164 | + <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">品牌</view> --> | ||
| 165 | + <view class="tab-bar-item sort-name ellipsis-1" style="">品牌</view> | ||
| 166 | + </view> | ||
| 167 | + </view> | ||
| 168 | + | ||
| 169 | + <!-- 项目 --> | ||
| 170 | + <view wx:if="{{is_show_xm}}"> | ||
| 171 | + <view bindtap="click_classify" class="fs30 {{select_classify_on==221?'select_classify':''}}" data-index="221" data-name="项目"> | ||
| 172 | + <view class="tab-bar-item sort-name ellipsis-1">项目</view> | ||
| 173 | + </view> | ||
| 174 | + </view> | ||
| 175 | + | ||
| 176 | + | ||
| 177 | + <!-- 品类 --> | ||
| 178 | + <view wx:if="{{is_show_pl}}"> | ||
| 179 | + <view wx:for="{{one_level_classify}}" wx:for-item="ittms"> | ||
| 180 | + <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> | ||
| 181 | + <!-- 添加左边红色条 --> | ||
| 182 | + <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 183 | + <view bindtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} fs30 t-c {{select_classify_on==index&&ittms.items.name.length==2?'':''}} {{select_classify_on==index&&ittms.items.name.length==3?'':''}}" data-index="{{index}}" data-name="{{ittms.items.mobile_name}}"> | ||
| 184 | + <view class="tab-bar-item sort-name ellipsis-1">{{ittms.items.name}}</view> | ||
| 185 | + </view> | ||
| 179 | </view> | 186 | </view> |
| 180 | - | ||
| 181 | - <!-- 项目 --> | ||
| 182 | - <view wx:if="{{is_show_xm}}"> | ||
| 183 | - <view bindtap="click_classify" class="fs30 {{select_classify_on==221?'select_classify':''}}" data-index="221" data-name="项目"> | ||
| 184 | - <view class="tab-bar-item sort-name ellipsis-1">项目</view> | ||
| 185 | - </view> | ||
| 186 | - </view> | ||
| 187 | - | ||
| 188 | - | ||
| 189 | - <!-- 品类 --> | ||
| 190 | - <view wx:if="{{is_show_pl}}"> | ||
| 191 | - <view wx:for="{{one_level_classify}}" wx:for-item="ittms"> | ||
| 192 | - <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> | ||
| 193 | - <!-- 添加左边红色条 --> | ||
| 194 | - <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 195 | - <view bindtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} fs30 t-c {{select_classify_on==index&&ittms.items.name.length==2?'':''}} {{select_classify_on==index&&ittms.items.name.length==3?'':''}}" data-index="{{index}}" data-name="{{ittms.items.mobile_name}}"> | ||
| 196 | - <view class="tab-bar-item sort-name ellipsis-1">{{ittms.items.name}}</view> | ||
| 197 | - </view> | ||
| 198 | - </view> | ||
| 199 | - </view> | ||
| 200 | - </view> | ||
| 201 | - | 187 | + </view> |
| 202 | </view> | 188 | </view> |
| 203 | 189 | ||
| 204 | </view> | 190 | </view> |
| 205 | - <!-- 分类项目的内容 --> | ||
| 206 | - <view class="classify_content" style="padding-left:196rpx;"> | 191 | + |
| 192 | + </view> | ||
| 193 | + <!-- 分类项目的内容 --> | ||
| 194 | + <view class="classify_content" style="padding-left:196rpx;"> | ||
| 207 | <!-- 国家的样式 --> | 195 | <!-- 国家的样式 --> |
| 208 | <block wx:if="{{select_classify_on==223&&is_show_gb}}"> | 196 | <block wx:if="{{select_classify_on==223&&is_show_gb}}"> |
| 209 | - <view class="classify_name fs28 flex-space-between"> | ||
| 210 | - <view>{{ishaf_three==1?good_list.name:classify_name}}</view> | 197 | + <view class="classify_name fs28 flex-space-between"> |
| 198 | + <view>{{ishaf_three==1?good_list.name:classify_name}}</view> | ||
| 211 | 199 | ||
| 212 | - </view> | ||
| 213 | - <view class=" classify_content-frame flex-space-between " > | ||
| 214 | - <view bindtap="go_nation" class="country_img-frame rel outer_location"wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}" > | ||
| 215 | - <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image> | ||
| 216 | - <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image> | ||
| 217 | - | ||
| 218 | - <view class='nation_box abs box'> | ||
| 219 | - <view class='nt_1 t-c line-height' style="height:50rpx"> | ||
| 220 | - <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text> | ||
| 221 | - </view> | ||
| 222 | - <view class='nt_2 t-c line-height fs24' style="line-height: 50rpx"> | ||
| 223 | - <text class="nation_y_name ellipsis-1 nt_1_t height fs24">{{bitem.enname}}</text> | ||
| 224 | - </view> | ||
| 225 | - </view> | ||
| 226 | - <!--<view class='nation_box abs box' style="top:20rpx">--> | ||
| 227 | - <!--</view>--> | ||
| 228 | - </view> | ||
| 229 | - </view> | 200 | + </view> |
| 201 | + <view class=" classify_content-frame flex-space-between "> | ||
| 202 | + <view bindtap="go_nation" class="country_img-frame rel outer_location" wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}"> | ||
| 203 | + <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image> | ||
| 204 | + <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image> | ||
| 205 | + | ||
| 206 | + <view class='nation_box abs box'> | ||
| 207 | + <view class='nt_1 t-c line-height' style="height:50rpx"> | ||
| 208 | + <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text> | ||
| 209 | + </view> | ||
| 210 | + <view class='nt_2 t-c line-height fs24' style="line-height: 50rpx"> | ||
| 211 | + <text class="nation_y_name ellipsis-1 nt_1_t height fs24">{{bitem.enname}}</text> | ||
| 212 | + </view> | ||
| 213 | + </view> | ||
| 214 | + <!--<view class='nation_box abs box' style="top:20rpx">--> | ||
| 215 | + <!--</view>--> | ||
| 216 | + </view> | ||
| 217 | + </view> | ||
| 230 | </block> | 218 | </block> |
| 231 | <!-- 品牌 --> | 219 | <!-- 品牌 --> |
| 232 | -<!-- <block wx:if="{{select_classify_on==220&&is_show_pp}}"> | 220 | + <!-- <block wx:if="{{select_classify_on==220&&is_show_pp}}"> |
| 233 | 221 | ||
| 234 | <view class="classify_name fs28 flex-space-between"> | 222 | <view class="classify_name fs28 flex-space-between"> |
| 235 | <view>{{classify_name}}</view> | 223 | <view>{{classify_name}}</view> |
| @@ -250,136 +238,134 @@ | @@ -250,136 +238,134 @@ | ||
| 250 | </block> | 238 | </block> |
| 251 | </view> | 239 | </view> |
| 252 | </block> --> | 240 | </block> --> |
| 253 | - <block wx:if="{{select_classify_on==220&&is_show_pp}}"> | ||
| 254 | - <scroll-view scroll-y="true" class="fenlei-list" | ||
| 255 | - style="height: 100%;padding-bottom:100rpx;" scroll-into-view="{{scrollIntoView}}"> | ||
| 256 | - <view class="classify_name fs28 flex-space-between"> | ||
| 257 | - <view>{{classify_name}}</view> | ||
| 258 | - </view> | ||
| 259 | - <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx"> | ||
| 260 | - <view id="{{brand_list.zm}}" class="group-name">{{brand_list.zm}}</view> | ||
| 261 | - <view class="classify_content-frame flex flex-wrap"> | ||
| 262 | - <view class="brand_img_frame "wx:for="{{brand_list.array}}" wx:for-item="user" wx:for-index="idx" bindtap="go_brand" data-bid="{{user.id}}" > | ||
| 263 | - <view class="t-c"> | ||
| 264 | - <image class="brand_img" src="{{user.logo}}" data-pix="{{pidx}}" data-idx="{{idx}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr_pp"></image> | ||
| 265 | - <view class="brand_img_name ellipsis-1 fs24">{{user.name}}</view> | ||
| 266 | - </view> | ||
| 267 | - </view> | ||
| 268 | - </view> | ||
| 269 | - </block> | ||
| 270 | - </scroll-view> | ||
| 271 | - <view class="nav box box-tb my-nav" style="top:140rpx;" catchtouchmove="touchmove" catchtouchend="touchend" > | ||
| 272 | - <view class="iconfont icon-shangjiantou"></view> | ||
| 273 | - <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}" | ||
| 274 | - class="flex box box-align-center box-pack-center letter"> | ||
| 275 | - <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text> | ||
| 276 | - </view> | ||
| 277 | - </view> | ||
| 278 | - </block> | ||
| 279 | - | ||
| 280 | - | ||
| 281 | - | ||
| 282 | - | ||
| 283 | - <!-- 卡项 --> | ||
| 284 | - <!-- <block wx:if="{{select_classify_on==220&&is_show_xm}}"> --> | ||
| 285 | - <block wx:if="{{select_classify_on==221&&is_show_xm}}"> | ||
| 286 | - <block wx:if="{{xmlist && xmlist.length != 0}}"> | ||
| 287 | - <view class="classify_name fs28 flex-space-between"> | ||
| 288 | - <view>{{classify_name}}</view> | ||
| 289 | - </view> | ||
| 290 | - | ||
| 291 | - <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;"> | ||
| 292 | - <block wx:for="{{xmlist}}"> | ||
| 293 | - <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}" > | ||
| 294 | - <view class="t-c"> | ||
| 295 | - <image wx:if="{{item.ico}}" class="brand_img" src="{{item.ico}}" mode="heightFix"></image> | ||
| 296 | - <image wx:else class="brand_img" src="{{iurl + '/miniapp/images/no_cate_def.png'}}" mode="heightFix"></image> | ||
| 297 | - <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view> | ||
| 298 | - </view> | ||
| 299 | - </view> | ||
| 300 | - </block> | ||
| 301 | - </view> | ||
| 302 | - </block> | ||
| 303 | - | ||
| 304 | - <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view> | ||
| 305 | - </block> | ||
| 306 | - | ||
| 307 | - <!-- 品类--> | ||
| 308 | - <block wx:if="{{is_show_pl&&select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223}}"> | ||
| 309 | - <block wx:if="{{select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}"> | ||
| 310 | - <!-- <block wx:if="{{select_classify_on == 0&&is_level_three!=1}}"> --> | ||
| 311 | - <view class="my-container"> | ||
| 312 | - <view class="classify_name fs28 flex-space-between ai-center" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more'> | ||
| 313 | - <view class="classify_title ellipsis-1">{{classify_name}}</view> | ||
| 314 | - <view class="flex select_more ai-center" > | ||
| 315 | - <view class="red-co fs24" >更多</view> | ||
| 316 | - <view class="bg_right width_height" style="margin-top: 0;"></view> | 241 | + <block wx:if="{{select_classify_on==220&&is_show_pp}}"> |
| 242 | + <scroll-view scroll-y="true" class="fenlei-list" style="height: 100%;padding-bottom:100rpx;" scroll-into-view="{{scrollIntoView}}"> | ||
| 243 | + <view class="classify_name fs28 flex-space-between"> | ||
| 244 | + <view>{{classify_name}}</view> | ||
| 245 | + </view> | ||
| 246 | + <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx"> | ||
| 247 | + <view id="{{brand_list.zm}}" class="group-name">{{brand_list.zm}}</view> | ||
| 248 | + <view class="classify_content-frame flex flex-wrap"> | ||
| 249 | + <view class="brand_img_frame " wx:for="{{brand_list.array}}" wx:for-item="user" wx:for-index="idx" bindtap="go_brand" data-bid="{{user.id}}"> | ||
| 250 | + <view class="t-c"> | ||
| 251 | + <image class="brand_img" src="{{user.logo}}" data-pix="{{pidx}}" data-idx="{{idx}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr_pp"></image> | ||
| 252 | + <view class="brand_img_name ellipsis-1 fs24">{{user.name}}</view> | ||
| 253 | + </view> | ||
| 254 | + </view> | ||
| 317 | </view> | 255 | </view> |
| 256 | + </block> | ||
| 257 | + </scroll-view> | ||
| 258 | + <view class="nav box box-tb my-nav" style="top:140rpx;" catchtouchmove="touchmove" catchtouchend="touchend"> | ||
| 259 | + <view class="iconfont icon-shangjiantou"></view> | ||
| 260 | + <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}" class="flex box box-align-center box-pack-center letter"> | ||
| 261 | + <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text> | ||
| 318 | </view> | 262 | </view> |
| 319 | - <!-- 显示2级列表 --> | ||
| 320 | - <view class="classify_content-frame flex-wrap"> | ||
| 321 | - <block wx:if="{{goodslist && goodslist.length>0}}"> | ||
| 322 | - <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="indx"> | ||
| 323 | - <view class="type_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="{{goods.items.parent_id}}" bindtap="go_cate"> | ||
| 324 | - <image class=" type_img" src="{{goods.items.icoimg==null||goods.items.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':goods.items.icoimg}}" binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> | ||
| 325 | - <view class="brand_img_name fs24 ellipsis-1 pdh10">{{goods.items.name}}</view> | ||
| 326 | - </view> | ||
| 327 | - </block> | ||
| 328 | - </block> | ||
| 329 | - <block wx:else> | ||
| 330 | - <view class="no_child_lev fs28">该类别无子级</view> | ||
| 331 | - </block> | ||
| 332 | - </view> | 263 | + </view> |
| 264 | + </block> | ||
| 265 | + | ||
| 266 | + | ||
| 333 | 267 | ||
| 268 | + | ||
| 269 | + <!-- 卡项 --> | ||
| 270 | + <!-- <block wx:if="{{select_classify_on==220&&is_show_xm}}"> --> | ||
| 271 | + <block wx:if="{{select_classify_on==221&&is_show_xm}}"> | ||
| 272 | + <block wx:if="{{xmlist && xmlist.length != 0}}"> | ||
| 273 | + <view class="classify_name fs28 flex-space-between"> | ||
| 274 | + <view>{{classify_name}}</view> | ||
| 334 | </view> | 275 | </view> |
| 276 | + | ||
| 277 | + <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;"> | ||
| 278 | + <block wx:for="{{xmlist}}"> | ||
| 279 | + <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}"> | ||
| 280 | + <view class="t-c"> | ||
| 281 | + <image wx:if="{{item.ico}}" class="brand_img" src="{{item.ico}}" mode="heightFix"></image> | ||
| 282 | + <image wx:else class="brand_img" src="{{iurl + '/miniapp/images/no_cate_def.png'}}" mode="heightFix"></image> | ||
| 283 | + <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view> | ||
| 284 | + </view> | ||
| 285 | + </view> | ||
| 286 | + </block> | ||
| 287 | + </view> | ||
| 288 | + </block> | ||
| 289 | + | ||
| 290 | + <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view> | ||
| 335 | </block> | 291 | </block> |
| 336 | 292 | ||
| 337 | - <!-- 商品 含有3级的--> | ||
| 338 | - <block wx:if="{{select_classify_on!=220&&select_classify_on!=221&&select_classify_on!=223&&is_level_three==1}}"> | ||
| 339 | - <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="inds"> | ||
| 340 | - <view> | 293 | + <!-- 品类--> |
| 294 | + <block wx:if="{{is_show_pl&&select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223}}"> | ||
| 295 | + <block wx:if="{{select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}"> | ||
| 296 | + <!-- <block wx:if="{{select_classify_on == 0&&is_level_three!=1}}"> --> | ||
| 297 | + <view class="my-container"> | ||
| 298 | + <view class="classify_name fs28 flex-space-between ai-center" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more'> | ||
| 299 | + <view class="classify_title ellipsis-1">{{classify_name}}</view> | ||
| 300 | + <view class="flex select_more ai-center"> | ||
| 301 | + <view class="red-co fs24">更多</view> | ||
| 302 | + <view class="bg_right width_height" style="margin-top: 0;"></view> | ||
| 303 | + </view> | ||
| 304 | + </view> | ||
| 305 | + <!-- 显示2级列表 --> | ||
| 306 | + <view class="classify_content-frame flex-wrap"> | ||
| 307 | + <block wx:if="{{goodslist && goodslist.length>0}}"> | ||
| 308 | + <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="indx"> | ||
| 309 | + <view class="type_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="{{goods.items.parent_id}}" bindtap="go_cate"> | ||
| 310 | + <image class=" type_img" src="{{goods.items.icoimg==null||goods.items.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':goods.items.icoimg}}" binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> | ||
| 311 | + <view class="brand_img_name fs24 ellipsis-1 pdh10">{{goods.items.name}}</view> | ||
| 312 | + </view> | ||
| 313 | + </block> | ||
| 314 | + </block> | ||
| 315 | + <block wx:else> | ||
| 316 | + <view class="no_child_lev fs28">该类别无子级</view> | ||
| 317 | + </block> | ||
| 318 | + </view> | ||
| 319 | + | ||
| 320 | + </view> | ||
| 321 | + </block> | ||
| 341 | 322 | ||
| 342 | - <view class="classify_name fs28 flex-space-between ai-center"data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'> | 323 | + <!-- 商品 含有3级的--> |
| 324 | + <block wx:if="{{select_classify_on!=220&&select_classify_on!=221&&select_classify_on!=223&&is_level_three==1}}"> | ||
| 325 | + <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="inds"> | ||
| 326 | + <view> | ||
| 343 | 327 | ||
| 344 | - <view class="classify_title ellipsis-1">{{goods.items.name}}</view> | ||
| 345 | - <view class="flex select_more ai-center" > | ||
| 346 | - <view class="red-co fs24" >更多</view> | 328 | + <view class="classify_name fs28 flex-space-between ai-center" data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'> |
| 329 | + | ||
| 330 | + <view class="classify_title ellipsis-1">{{goods.items.name}}</view> | ||
| 331 | + <view class="flex select_more ai-center"> | ||
| 332 | + <view class="red-co fs24">更多</view> | ||
| 347 | <view class="bg_right width_height" style="margin-top: 0;"></view> | 333 | <view class="bg_right width_height" style="margin-top: 0;"></view> |
| 348 | - </view> | ||
| 349 | - </view> | 334 | + </view> |
| 335 | + </view> | ||
| 350 | 336 | ||
| 351 | - <block wx:if="{{goods.arrays.length>0}}"> | ||
| 352 | - <view class="classify_content-frame flex-wrap"> | ||
| 353 | - <view class="type_img_frame t-c ib" data-cid="{{item.id}}" data-pid="three" wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate"> | ||
| 354 | - <image class=" type_img"src="{{item.icoimg==null||item.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':item.icoimg}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> | ||
| 355 | - <view class="brand_img_name fs24 ellipsis-1 pdh10">{{item.name}}</view> | ||
| 356 | - </view> | ||
| 357 | - </view> | ||
| 358 | - <!-- <view class="divider_line"></view> --> | ||
| 359 | - </block> | 337 | + <block wx:if="{{goods.arrays.length>0}}"> |
| 338 | + <view class="classify_content-frame flex-wrap"> | ||
| 339 | + <view class="type_img_frame t-c ib" data-cid="{{item.id}}" data-pid="three" wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate"> | ||
| 340 | + <image class=" type_img" src="{{item.icoimg==null||item.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':item.icoimg}}" binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> | ||
| 341 | + <view class="brand_img_name fs24 ellipsis-1 pdh10">{{item.name}}</view> | ||
| 342 | + </view> | ||
| 343 | + </view> | ||
| 344 | + <!-- <view class="divider_line"></view> --> | ||
| 345 | + </block> | ||
| 360 | 346 | ||
| 361 | - </view> | ||
| 362 | - </block> | ||
| 363 | - </block> | 347 | + </view> |
| 348 | + </block> | ||
| 349 | + </block> | ||
| 364 | </block> | 350 | </block> |
| 365 | - </view> | ||
| 366 | - </view> | ||
| 367 | - </block> | ||
| 368 | - <block wx:elif="{{is_do}}"> | ||
| 369 | - <view class="no-data" > | ||
| 370 | - <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> | ||
| 371 | - <view class="no-data-title">商家暂未设置分类</view> | ||
| 372 | - <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> | ||
| 373 | - </view> | ||
| 374 | - </block> | 351 | + </view> |
| 352 | + </view> | ||
| 353 | + </block> | ||
| 354 | + <block wx:elif="{{is_do}}"> | ||
| 355 | + <view class="no-data"> | ||
| 356 | + <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> | ||
| 357 | + <view class="no-data-title">商家暂未设置分类</view> | ||
| 358 | + <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> | ||
| 359 | + </view> | ||
| 360 | + </block> | ||
| 375 | 361 | ||
| 376 | </block> | 362 | </block> |
| 377 | <!-- 风格3 --> | 363 | <!-- 风格3 --> |
| 378 | <block wx:elif="{{is_used_share == 2}}"> | 364 | <block wx:elif="{{is_used_share == 2}}"> |
| 379 | - <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> | ||
| 380 | - <!-- 头部 --> | ||
| 381 | - <view class="xc-search-box flex-center white_b" id="navbar" style="position:fixed;top:0;z-index:99"> | ||
| 382 | - <!-- <view class="share-height t-c" bindtap="getScancode" > | 365 | + <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> |
| 366 | + <!-- 头部 --> | ||
| 367 | + <view class="xc-search-box flex-center white_b" id="navbar" style="position:fixed;top:0;z-index:99"> | ||
| 368 | + <!-- <view class="share-height t-c" bindtap="getScancode" > | ||
| 383 | <image class="scanning_black-img"src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> | 369 | <image class="scanning_black-img"src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> |
| 384 | <view class="fs24"> | 370 | <view class="fs24"> |
| 385 | 扫一扫 | 371 | 扫一扫 |
| @@ -391,50 +377,50 @@ | @@ -391,50 +377,50 @@ | ||
| 391 | </view> | 377 | </view> |
| 392 | <input bindfocus="goseach" class="search-cont" placeholder="请输入您所搜索的商品" type="text"></input> | 378 | <input bindfocus="goseach" class="search-cont" placeholder="请输入您所搜索的商品" type="text"></input> |
| 393 | </view> --> | 379 | </view> --> |
| 394 | - | ||
| 395 | - <!-- 搜索框 --> | ||
| 396 | - <view class="search-container f1"> | ||
| 397 | - <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</view> | ||
| 398 | - </view> | ||
| 399 | - <view class="pdl30" bindtap="getScancode" > | ||
| 400 | - <image class="scanning_black-img"src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> | ||
| 401 | - <!-- <view class="fs24">扫一扫</view> --> | ||
| 402 | - </view> | 380 | + |
| 381 | + <!-- 搜索框 --> | ||
| 382 | + <view class="search-container f1"> | ||
| 383 | + <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>搜索店铺商品</view> | ||
| 403 | </view> | 384 | </view> |
| 404 | - <!-- /头部 --> | ||
| 405 | - <!-- 分类项目内容 --> | ||
| 406 | - <view class="flex project_height" style=""> | ||
| 407 | - <!-- 分类项目的类型 --> | ||
| 408 | - <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;" id="thress_type3"> | ||
| 409 | - <view class="project_type-frame" style="margin-bottom:120rpx;"> | ||
| 410 | - <view wx:if="{{is_show_gb}}"> | ||
| 411 | - <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==223 ? 'active' : ''}}" data-index="223" data-name="国家" wx:if="{{is_country}}" data-current="223"> | ||
| 412 | - <text style="">国家</text> | ||
| 413 | - </view> | ||
| 414 | - </view> | ||
| 415 | - | ||
| 416 | - <view wx:if="{{is_show_pp}}"> | ||
| 417 | - <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==220 ? 'active' : ''}}" wx:if="{{is_brand}}" data-index="220" data-name="品牌" data-current="220"> | ||
| 418 | - <text style="">品牌</text> | ||
| 419 | - </view> | ||
| 420 | - </view> | ||
| 421 | - | ||
| 422 | - | ||
| 423 | - <!-- 卡项 --> | ||
| 424 | - <view wx:if="{{is_show_xm}}"> | ||
| 425 | - <view bindtap="click_classify" class="tab-bar-item {{select_classify_on == 221 ? 'active' : ''}}" data-index="221" data-name="项目" data-current="221"> | ||
| 426 | - <text>项目</text> | ||
| 427 | - </view> | ||
| 428 | - </view> | ||
| 429 | - | ||
| 430 | - | ||
| 431 | - | ||
| 432 | - <view wx:if="{{is_show_pl}}"> | ||
| 433 | - <!-- <view wx:for="{{one_level_classify}}" wx:for-item="ittms" class="class_set_height"> --> | ||
| 434 | - <!-- <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> --> | ||
| 435 | - <!-- 添加左边红色条 --> | ||
| 436 | - <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 437 | - <!-- <view bindtap="click_classify" style="{{status_show == 0 && ittms == 0 ?'margin-top:0':'margin-top:0rpx'}}" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} share_type fs30 t-c {{ittms.items.name.length==2? 'world_sn':''}} {{select_classify_on==index&&ittms.items.name.length==2?'text-indent':''}} {{select_classify_on==index&&ittms.items.name.length==3?'text3':''}}"data-index="{{index}}"data-name="{{ittms.items.mobile_name}}"> | 385 | + <view class="pdl30" bindtap="getScancode"> |
| 386 | + <image class="scanning_black-img" src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> | ||
| 387 | + <!-- <view class="fs24">扫一扫</view> --> | ||
| 388 | + </view> | ||
| 389 | + </view> | ||
| 390 | + <!-- /头部 --> | ||
| 391 | + <!-- 分类项目内容 --> | ||
| 392 | + <view class="flex project_height" style=""> | ||
| 393 | + <!-- 分类项目的类型 --> | ||
| 394 | + <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;" id="thress_type3"> | ||
| 395 | + <view class="project_type-frame" style="margin-bottom:120rpx;"> | ||
| 396 | + <view wx:if="{{is_show_gb}}"> | ||
| 397 | + <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==223 ? 'active' : ''}}" data-index="223" data-name="国家" wx:if="{{is_country}}" data-current="223"> | ||
| 398 | + <text style="">国家</text> | ||
| 399 | + </view> | ||
| 400 | + </view> | ||
| 401 | + | ||
| 402 | + <view wx:if="{{is_show_pp}}"> | ||
| 403 | + <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==220 ? 'active' : ''}}" wx:if="{{is_brand}}" data-index="220" data-name="品牌" data-current="220"> | ||
| 404 | + <text style="">品牌</text> | ||
| 405 | + </view> | ||
| 406 | + </view> | ||
| 407 | + | ||
| 408 | + | ||
| 409 | + <!-- 卡项 --> | ||
| 410 | + <view wx:if="{{is_show_xm}}"> | ||
| 411 | + <view bindtap="click_classify" class="tab-bar-item {{select_classify_on == 221 ? 'active' : ''}}" data-index="221" data-name="项目" data-current="221"> | ||
| 412 | + <text>项目</text> | ||
| 413 | + </view> | ||
| 414 | + </view> | ||
| 415 | + | ||
| 416 | + | ||
| 417 | + | ||
| 418 | + <view wx:if="{{is_show_pl}}"> | ||
| 419 | + <!-- <view wx:for="{{one_level_classify}}" wx:for-item="ittms" class="class_set_height"> --> | ||
| 420 | + <!-- <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> --> | ||
| 421 | + <!-- 添加左边红色条 --> | ||
| 422 | + <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 423 | + <!-- <view bindtap="click_classify" style="{{status_show == 0 && ittms == 0 ?'margin-top:0':'margin-top:0rpx'}}" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} share_type fs30 t-c {{ittms.items.name.length==2? 'world_sn':''}} {{select_classify_on==index&&ittms.items.name.length==2?'text-indent':''}} {{select_classify_on==index&&ittms.items.name.length==3?'text3':''}}"data-index="{{index}}"data-name="{{ittms.items.mobile_name}}"> | ||
| 438 | <view class="{{ittms.items.name.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittms.items.name.length<4}}"> | 424 | <view class="{{ittms.items.name.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittms.items.name.length<4}}"> |
| 439 | <view wx:for="{{ittms.items.name}}" wx:for-item="name"wx:for-index="index"> | 425 | <view wx:for="{{ittms.items.name}}" wx:for-item="name"wx:for-index="index"> |
| 440 | <view> | 426 | <view> |
| @@ -444,11 +430,11 @@ | @@ -444,11 +430,11 @@ | ||
| 444 | </view> | 430 | </view> |
| 445 | <view wx:else class="sort-name ellipsis-1">{{ittms.items.name}}</view> | 431 | <view wx:else class="sort-name ellipsis-1">{{ittms.items.name}}</view> |
| 446 | </view> --> | 432 | </view> --> |
| 447 | - <!-- </view> --> | ||
| 448 | - <scroll-view scroll-y scroll-with-animation class="tab-view" scroll-top="{{scrollTop}}" style="height:88%"> | ||
| 449 | - <view wx:for="{{one_level_classify}}" wx:for-item="ittms" wx:key="{{index}}" class="tab-bar-item {{select_classify_on==index ? 'active' : ''}}" data-current="{{index}}" catchtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" data-index="{{index}}"data-name="{{ittms.items.mobile_name}}"> | ||
| 450 | - <text>{{ittms.items.name}}</text> | ||
| 451 | - <!-- <view class="{{ittms.items.name.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittms.items.name.length<4}}"> | 433 | + <!-- </view> --> |
| 434 | + <scroll-view scroll-y scroll-with-animation class="tab-view" scroll-top="{{scrollTop}}" style="height:88%"> | ||
| 435 | + <view wx:for="{{one_level_classify}}" wx:for-item="ittms" wx:key="{{index}}" class="tab-bar-item {{select_classify_on==index ? 'active' : ''}}" data-current="{{index}}" catchtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" data-index="{{index}}" data-name="{{ittms.items.mobile_name}}"> | ||
| 436 | + <text>{{ittms.items.name}}</text> | ||
| 437 | + <!-- <view class="{{ittms.items.name.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittms.items.name.length<4}}"> | ||
| 452 | <view wx:for="{{ittms.items.name}}" wx:for-item="name"wx:for-index="index"> | 438 | <view wx:for="{{ittms.items.name}}" wx:for-item="name"wx:for-index="index"> |
| 453 | <text> | 439 | <text> |
| 454 | {{name}} | 440 | {{name}} |
| @@ -456,45 +442,45 @@ | @@ -456,45 +442,45 @@ | ||
| 456 | </view> | 442 | </view> |
| 457 | </view> | 443 | </view> |
| 458 | <text wx:else class="sort-name ellipsis-1">{{ittms.items.name}}</text> --> | 444 | <text wx:else class="sort-name ellipsis-1">{{ittms.items.name}}</text> --> |
| 459 | - </view> | ||
| 460 | - </scroll-view> | ||
| 461 | - | ||
| 462 | - <!-- </view> --> | ||
| 463 | </view> | 445 | </view> |
| 464 | - | ||
| 465 | - | ||
| 466 | - | ||
| 467 | - </view> | ||
| 468 | - </view> | ||
| 469 | - <!-- 分类项目的内容 --> | ||
| 470 | - <view class="classify_content" style="padding-left:26%;padding-top:108rpx;box-sizing: border-box;"> | 446 | + </scroll-view> |
| 447 | + | ||
| 448 | + <!-- </view> --> | ||
| 449 | + </view> | ||
| 450 | + | ||
| 451 | + | ||
| 452 | + | ||
| 453 | + </view> | ||
| 454 | + </view> | ||
| 455 | + <!-- 分类项目的内容 --> | ||
| 456 | + <view class="classify_content" style="padding-left:26%;padding-top:108rpx;box-sizing: border-box;" bindtouchstart="bScroll" bindtouchend="btouMove"> | ||
| 471 | <!-- 国家的样式 --> | 457 | <!-- 国家的样式 --> |
| 472 | <block wx:if="{{select_classify_on==223&&is_show_gb}}"> | 458 | <block wx:if="{{select_classify_on==223&&is_show_gb}}"> |
| 473 | - <view class="classify_name fs28 flex-space-between"> | ||
| 474 | - <view>{{ishaf_three==1?good_list.name:classify_name}}</view> | 459 | + <view class="classify_name fs28 flex-space-between"> |
| 460 | + <view>{{ishaf_three==1?good_list.name:classify_name}}</view> | ||
| 475 | 461 | ||
| 476 | - </view> | ||
| 477 | - <view class=" classify_content-frame flex-space-between " > | ||
| 478 | - <view bindtap="go_nation" class="country_img-frame rel outer_location"wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}" > | ||
| 479 | - <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image> | ||
| 480 | - <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image> | ||
| 481 | - <view class='nation_box abs box'> | ||
| 482 | - <view class='nt_1 t-c line-height' style="height:50rpx"> | ||
| 483 | - <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text> | ||
| 484 | - </view> | ||
| 485 | - <view class='nt_2 t-c line-height fs24' style="line-height: 50rpx"> | ||
| 486 | - <text class="nation_y_name ellipsis-1 nt_1_t height fs24">{{bitem.enname}}</text> | ||
| 487 | - </view> | ||
| 488 | - </view> | ||
| 489 | - <!--<view class='nation_box abs box' style="top:20rpx">--> | ||
| 490 | - <!--</view>--> | ||
| 491 | - </view> | ||
| 492 | - </view> | 462 | + </view> |
| 463 | + <view class=" classify_content-frame flex-space-between "> | ||
| 464 | + <view bindtap="go_nation" class="country_img-frame rel outer_location" wx:for="{{nationlist}}" wx:for-item="bitem" wx:for-index="pidx" data-nid="{{bitem.id}}"> | ||
| 465 | + <image wx:if="{{bitem.imgtype==1}}" class="country_img" src="{{bitem.logo}}"></image> | ||
| 466 | + <image wx:else class="country_img" src="{{iurl}}{{bitem.logo}}"></image> | ||
| 467 | + <view class='nation_box abs box'> | ||
| 468 | + <view class='nt_1 t-c line-height' style="height:50rpx"> | ||
| 469 | + <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text> | ||
| 470 | + </view> | ||
| 471 | + <view class='nt_2 t-c line-height fs24' style="line-height: 50rpx"> | ||
| 472 | + <text class="nation_y_name ellipsis-1 nt_1_t height fs24">{{bitem.enname}}</text> | ||
| 473 | + </view> | ||
| 474 | + </view> | ||
| 475 | + <!--<view class='nation_box abs box' style="top:20rpx">--> | ||
| 476 | + <!--</view>--> | ||
| 477 | + </view> | ||
| 478 | + </view> | ||
| 493 | </block> | 479 | </block> |
| 494 | - | ||
| 495 | - | 480 | + |
| 481 | + | ||
| 496 | <!-- 品牌 --> | 482 | <!-- 品牌 --> |
| 497 | -<!-- <block wx:if="{{select_classify_on==220&&is_show_pp}}"> | 483 | + <!-- <block wx:if="{{select_classify_on==220&&is_show_pp}}"> |
| 498 | 484 | ||
| 499 | <view class="classify_name fs28 flex-space-between"> | 485 | <view class="classify_name fs28 flex-space-between"> |
| 500 | <view>{{classify_name}}</view> | 486 | <view>{{classify_name}}</view> |
| @@ -513,237 +499,239 @@ | @@ -513,237 +499,239 @@ | ||
| 513 | </block> | 499 | </block> |
| 514 | </view> | 500 | </view> |
| 515 | </block> --> | 501 | </block> --> |
| 516 | - | ||
| 517 | - <!-- 品牌 --> | ||
| 518 | - <block wx:if="{{select_classify_on==220&&is_show_pp}}"> | ||
| 519 | - <scroll-view scroll-y="true" class="fenlei-list" | ||
| 520 | - style="height: 100%;padding-bottom:100rpx;" scroll-into-view="{{scrollIntoView}}"> | ||
| 521 | - <view class="classify_name fs28 flex-space-between"> | ||
| 522 | - <view>{{classify_name}}</view> | ||
| 523 | - </view> | ||
| 524 | - <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx"> | ||
| 525 | - <view id="{{brand_list.zm}}" class="group-name">{{brand_list.zm}}</view> | ||
| 526 | - <view class="classify_content-frame flex flex-wrap"> | ||
| 527 | - <view class="brand_img_frame "wx:for="{{brand_list.array}}" wx:for-item="user" wx:for-index="idx" bindtap="go_brand" data-bid="{{user.id}}" > | ||
| 528 | - <view class="t-c"> | ||
| 529 | - <image class="brand_img" src="{{user.logo}}" data-pix="{{pidx}}" data-idx="{{idx}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr_pp"></image> | ||
| 530 | - <view class="brand_img_name ellipsis-1 fs24">{{user.name}}</view> | ||
| 531 | - </view> | ||
| 532 | - </view> | ||
| 533 | - </view> | ||
| 534 | - </block> | ||
| 535 | - </scroll-view> | ||
| 536 | - <view class="nav box box-tb my-nav" style="top:140rpx;" catchtouchmove="touchmove" catchtouchend="touchend" > | ||
| 537 | - <!-- <image src="/images/up.png" style="width:36rpx;height:36rpx;margin-right:10rpx;"></image> --> | ||
| 538 | - <view class="iconfont icon-shangjiantou"></view> | ||
| 539 | - <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}" | ||
| 540 | - class="flex box box-align-center box-pack-center letter"> | ||
| 541 | - <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text> | ||
| 542 | - </view> | ||
| 543 | - </view> | ||
| 544 | - </block> | ||
| 545 | - | ||
| 546 | - | ||
| 547 | - | ||
| 548 | - | ||
| 549 | - <!-- 卡项 --> | ||
| 550 | - <block wx:if="{{select_classify_on==221&&is_show_xm}}"> | ||
| 551 | - <block wx:if="{{xmlist && xmlist.length != 0}}"> | ||
| 552 | - <view class="classify_name fs28 flex-space-between"> | ||
| 553 | - <view>{{classify_name}}</view> | ||
| 554 | - </view> | ||
| 555 | - | ||
| 556 | - <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;"> | ||
| 557 | - <block wx:for="{{xmlist}}"> | ||
| 558 | - <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}"> | ||
| 559 | - <view class="t-c"> | ||
| 560 | - <image wx:if="{{item.ico}}" class="brand_img" src="{{item.ico}}" mode="heightFix"></image> | ||
| 561 | - <image wx:else class="brand_img" src="{{iurl + '/miniapp/images/no_cate_def.png'}}" mode="heightFix"></image> | ||
| 562 | - <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view> | ||
| 563 | - </view> | ||
| 564 | - </view> | ||
| 565 | - </block> | ||
| 566 | - </view> | ||
| 567 | - </block> | ||
| 568 | - | ||
| 569 | - <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view> | ||
| 570 | - | ||
| 571 | - </block> | ||
| 572 | - | ||
| 573 | - | 502 | + |
| 503 | + <!-- 品牌 --> | ||
| 504 | + <block wx:if="{{select_classify_on==220&&is_show_pp}}"> | ||
| 505 | + <scroll-view scroll-y="true" class="fenlei-list" style="height: 100%;padding-bottom:100rpx;" scroll-into-view="{{scrollIntoView}}"> | ||
| 506 | + <view class="classify_name fs28 flex-space-between"> | ||
| 507 | + <view>{{classify_name}}</view> | ||
| 508 | + </view> | ||
| 509 | + <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx"> | ||
| 510 | + <view id="{{brand_list.zm}}" class="group-name">{{brand_list.zm}}</view> | ||
| 511 | + <view class="classify_content-frame flex flex-wrap"> | ||
| 512 | + <view class="brand_img_frame " wx:for="{{brand_list.array}}" wx:for-item="user" wx:for-index="idx" bindtap="go_brand" data-bid="{{user.id}}"> | ||
| 513 | + <view class="t-c"> | ||
| 514 | + <image class="brand_img" src="{{user.logo}}" data-pix="{{pidx}}" data-idx="{{idx}}" data-errorimg="groups[{{pidx}}].array[{{idx}}].logo" binderror="bind_bnerr_pp"></image> | ||
| 515 | + <view class="brand_img_name ellipsis-1 fs24">{{user.name}}</view> | ||
| 516 | + </view> | ||
| 517 | + </view> | ||
| 518 | + </view> | ||
| 519 | + </block> | ||
| 520 | + </scroll-view> | ||
| 521 | + <view class="nav box box-tb my-nav" style="top:140rpx;" catchtouchmove="touchmove" catchtouchend="touchend"> | ||
| 522 | + <!-- <image src="/images/up.png" style="width:36rpx;height:36rpx;margin-right:10rpx;"></image> --> | ||
| 523 | + <view class="iconfont icon-shangjiantou"></view> | ||
| 524 | + <view bindtap="tabLetter" data-index="{{item.zm}}" wx:for="{{groups}}" class="flex box box-align-center box-pack-center letter"> | ||
| 525 | + <text class="letter-text {{selected == item.zm ? 'letter-actived' : ''}}" wx:if="{{item.zm}}">{{item.zm}}</text> | ||
| 526 | + </view> | ||
| 527 | + </view> | ||
| 528 | + </block> | ||
| 529 | + | ||
| 530 | + | ||
| 531 | + | ||
| 532 | + | ||
| 533 | + <!-- 卡项 --> | ||
| 534 | + <block wx:if="{{select_classify_on==221&&is_show_xm}}"> | ||
| 535 | + <block wx:if="{{xmlist && xmlist.length != 0}}"> | ||
| 536 | + <view class="classify_name fs28 flex-space-between"> | ||
| 537 | + <view>{{classify_name}}</view> | ||
| 538 | + </view> | ||
| 539 | + | ||
| 540 | + <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;"> | ||
| 541 | + <block wx:for="{{xmlist}}"> | ||
| 542 | + <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}"> | ||
| 543 | + <view class="t-c"> | ||
| 544 | + <image wx:if="{{item.ico}}" class="brand_img" src="{{item.ico}}" mode="heightFix"></image> | ||
| 545 | + <image wx:else class="brand_img" src="{{iurl + '/miniapp/images/no_cate_def.png'}}" mode="heightFix"></image> | ||
| 546 | + <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view> | ||
| 547 | + </view> | ||
| 548 | + </view> | ||
| 549 | + </block> | ||
| 550 | + </view> | ||
| 551 | + </block> | ||
| 552 | + | ||
| 553 | + <view wx:else class="t-c fs28 c-9 pdt50">暂无项目</view> | ||
| 554 | + | ||
| 555 | + </block> | ||
| 556 | + | ||
| 557 | + | ||
| 574 | <!-- 品类--> | 558 | <!-- 品类--> |
| 575 | - <!-- <block wx:if="{{select_classify_on==0&&is_show_pl}}"> --> | ||
| 576 | - <block wx:if="{{is_show_pl&&select_classify_on!=220&&select_classify_on!=223&&select_classify_on!=221}}"> | ||
| 577 | - <!-- <block wx:if="{{select_classify_on!=220&&select_classify_on!=223}}"> --> | 559 | + <!-- <block wx:if="{{select_classify_on==0&&is_show_pl}}"> --> |
| 560 | + <block wx:if="{{is_show_pl&&select_classify_on!=220&&select_classify_on!=223&&select_classify_on!=221}}" > | ||
| 561 | + <!-- <block wx:if="{{select_classify_on!=220&&select_classify_on!=223}}"> --> | ||
| 578 | <block wx:if="{{select_classify_on!=220&&select_classify_on!=223&&select_classify_on!=221}}"> | 562 | <block wx:if="{{select_classify_on!=220&&select_classify_on!=223&&select_classify_on!=221}}"> |
| 579 | - <view style="width:100%;height:100%;position: relative;"> | ||
| 580 | - <view class="classify_name fs28 flex ai-center flex-space-between" id="header" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more' style="box-sizing:border-box;position:fixed;z-index: 999;width:74%;background-color:#ffffff;padding:0 20rpx;"> | ||
| 581 | - <view class="classify_title ellipsis-1">{{classify_name}}</view> | ||
| 582 | - <view class="flex select_more ai-center" > | ||
| 583 | - <view class="red-co fs24" >更多</view> | ||
| 584 | - <view class="bg_right width_height" style="margin-top: 0;"></view> | ||
| 585 | - </view> | 563 | + <view style="width:100%;height:100%;position: relative;"> |
| 564 | + <view class="classify_name fs28 flex ai-center flex-space-between" id="header" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more' style="box-sizing:border-box;position:fixed;z-index: 999;width:74%;background-color:#ffffff;padding:0 20rpx;"> | ||
| 565 | + <view class="classify_title ellipsis-1">{{classify_name}}</view> | ||
| 566 | + <view class="flex select_more ai-center"> | ||
| 567 | + <view class="red-co fs24">更多</view> | ||
| 568 | + <view class="bg_right width_height" style="margin-top: 0;"></view> | ||
| 586 | </view> | 569 | </view> |
| 587 | - <!-- 显示商品列表开始 --> | ||
| 588 | - <!-- <view class="classify_content-frame flex-wrap" style="width:100%;overflow:hidden;heigth:100%;"> --> | ||
| 589 | - | ||
| 590 | - <!-- <view class="null" style="width:100%;margin-top:70rpx;"></view> --> | ||
| 591 | - <scroll-view scroll-y scroll-top="{{scrollTop}}" bindscrolltolower='scrollLower' style="height:{{windowHeight}};position:absolute;margin-top:70rpx;top:0;bottom:0;left:0;width:100%;margin-bottom: 80rpx;"> | 570 | + </view> |
| 571 | + <!-- 显示商品列表开始 --> | ||
| 572 | + <!-- <view class="classify_content-frame flex-wrap" style="width:100%;overflow:hidden;heigth:100%;"> --> | ||
| 573 | + | ||
| 574 | + <!-- <view class="null" style="width:100%;margin-top:70rpx;"></view> --> | ||
| 575 | + <scroll-view scroll-y scroll-top="{{scrollTop}}" bindscrolltolower='scrollLower' bindscrolltoupper='scrolltoupper' style="height:{{windowHeight}};position:absolute;margin-top:70rpx;top:0;bottom:0;left:0;width:100%;"> | ||
| 592 | <view class="null" style="width:100%;height:1px;"></view> | 576 | <view class="null" style="width:100%;height:1px;"></view> |
| 593 | <!-- goodslist --> | 577 | <!-- goodslist --> |
| 594 | - <view class="choice_list" style="height:{{msgStatus != true?'100%':''}}"> | ||
| 595 | - | ||
| 596 | - <navigator class="choice_item" style="margin-bottom:{{dataLength -1 == index?'100px':'0'}}" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" data-id="{{index}}" wx:key="{{index}}"> | ||
| 597 | - <view class="img-wrap"> | ||
| 598 | - <image src="{{url+item.original_img}}" binderror="bind_bnerr_t3" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image> | 578 | + <view class="choice_list" style="height:{{msgStatus != true?'100%':''}}"> |
| 579 | + | ||
| 580 | + <navigator class="choice_item" style="margin-bottom:{{dataLength -1 == index?'50px':'0'}}" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" data-id="{{index}}" wx:key="{{index}}"> | ||
| 581 | + <view class="img-wrap"> | ||
| 582 | + <image src="{{url+item.original_img}}" binderror="bind_bnerr_t3" data-url="{{url+item.original_img}}" lazy-load="true" data-errorimg="requestData[{{index}}].original_img"></image> | ||
| 583 | + </view> | ||
| 584 | + <view class="item-cont"> | ||
| 585 | + <view class="title">{{item.goods_name}}</view> | ||
| 586 | + <!-- 判断是否有活动价 --> | ||
| 587 | + <block wx:if="{{item.prom_price>0 || item.prom_integral}}"> | ||
| 588 | + <view class="flex ai-center"> | ||
| 589 | + <!-- 活动价 --> | ||
| 590 | + <view class="price"> | ||
| 591 | + <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | ||
| 592 | + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 593 | + <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text> | ||
| 594 | + </view> | ||
| 595 | + <!-- <view class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>--> | ||
| 596 | + </view> | ||
| 597 | + | ||
| 598 | + <view class="comment"> | ||
| 599 | + | ||
| 600 | + <view class="fs22 pdt10 t-r"> | ||
| 601 | + <span>评论{{item.comment_count}}</span> | ||
| 602 | + <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 603 | + </view> | ||
| 604 | + </view> | ||
| 605 | + </block> | ||
| 606 | + <block wx:else> | ||
| 607 | + | ||
| 608 | + <!-- 商品价格,先判断下是后又等级价--> | ||
| 609 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | ||
| 610 | + | ||
| 611 | + | ||
| 612 | + <!-- 当会员是等级卡的时候 --> | ||
| 613 | + <block wx:if="{{card_field}}"> | ||
| 614 | + <!-- 等级价>0 --> | ||
| 615 | + <block wx:if="{{item[card_field]>0}}"> | ||
| 616 | + <view class="flex ai_and"> | ||
| 617 | + <view class="price rmb">{{item[card_field]}}</view> | ||
| 618 | + <view class="card_bg ellipsis-1"> | ||
| 619 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 620 | + <view class="card_name">{{card_name}}</view> | ||
| 621 | + </view> | ||
| 599 | </view> | 622 | </view> |
| 600 | - <view class="item-cont"> | ||
| 601 | - <view class="title">{{item.goods_name}}</view> | ||
| 602 | - <!-- 判断是否有活动价 --> | ||
| 603 | - <block wx:if="{{item.prom_price>0 || item.prom_integral}}"> | ||
| 604 | - <view class="flex ai-center"> | ||
| 605 | - <!-- 活动价 --> | ||
| 606 | - <view class="price"> | ||
| 607 | - <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | ||
| 608 | - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ||
| 609 | - <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text> | ||
| 610 | - </view> | ||
| 611 | -<!-- <view class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>--> | ||
| 612 | - </view> | ||
| 613 | - | ||
| 614 | - <view class="comment"> | ||
| 615 | - | ||
| 616 | - <view class="fs22 pdt10 t-r"> | ||
| 617 | - <span>评论{{item.comment_count}}</span> | ||
| 618 | - <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 619 | - </view> | ||
| 620 | - </view> | ||
| 621 | - </block> | ||
| 622 | - <block wx:else> | ||
| 623 | - | ||
| 624 | - <!-- 商品价格,先判断下是后又等级价--> | ||
| 625 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | ||
| 626 | - | ||
| 627 | - | ||
| 628 | - <!-- 当会员是等级卡的时候 --> | ||
| 629 | - <block wx:if="{{card_field}}"> | ||
| 630 | - <!-- 等级价>0 --> | ||
| 631 | - <block wx:if="{{item[card_field]>0}}"> | ||
| 632 | - <view class="flex ai_and"> | ||
| 633 | - <view class="price rmb">{{item[card_field]}}</view> | ||
| 634 | - <view class="card_bg ellipsis-1"> | ||
| 635 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 636 | - <view class="card_name">{{card_name}}</view> | ||
| 637 | - </view> | ||
| 638 | - </view> | ||
| 639 | - <view class="comment flex jc_sb"> | ||
| 640 | -<!-- <view class="word-line xc-ash rmb fs24">{{item.market_price}}</view>--> | ||
| 641 | - <view class="fs22 pdt10 t-r"> | ||
| 642 | - <span>评论{{item.comment_count}}</span> | ||
| 643 | - <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 644 | - </view> | ||
| 645 | - </view> | ||
| 646 | - </block> | ||
| 647 | - <block wx:else> | ||
| 648 | - <view class="flex ai-center"> | ||
| 649 | - <view class="price rmb">{{item.shop_price}}</view> | ||
| 650 | -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | ||
| 651 | - </view> | ||
| 652 | - | ||
| 653 | - <view class="comment"> | ||
| 654 | - <view class="fs22 pdt10 t-r"> | ||
| 655 | - <span>评论{{item.comment_count}}</span> | ||
| 656 | - <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 657 | - </view> | ||
| 658 | - </view> | ||
| 659 | - </block> | ||
| 660 | - </block> | ||
| 661 | - <block wx:else> | ||
| 662 | - | ||
| 663 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 664 | - <view class="flex ai-center"> | ||
| 665 | - <view class="price rmb">{{item.shop_price}}</view> | ||
| 666 | -<!-- <view class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>--> | ||
| 667 | - </view> | ||
| 668 | - <view class="comment"> | ||
| 669 | - <view class="flex ai-center"> | ||
| 670 | - <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view> | ||
| 671 | - <view class="card_bg ellipsis-1"> | ||
| 672 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 673 | - <view class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</view> | ||
| 674 | - </view> | ||
| 675 | - </view> | ||
| 676 | - </view> | ||
| 677 | - | ||
| 678 | - <view class="fs22 t-r" style="color:#999;"> | ||
| 679 | - <span>评论{{item.comment_count}}</span> | ||
| 680 | - <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 681 | - </view> | ||
| 682 | - | ||
| 683 | - | ||
| 684 | - </block> | ||
| 685 | - <block wx:else> | ||
| 686 | - <view class="flex ai-center"> | ||
| 687 | - <view class="price rmb">{{item.shop_price}}</view> | ||
| 688 | -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | ||
| 689 | - </view> | ||
| 690 | - <!-- <view class="price">¥{{item.shop_price}}</view> --> | ||
| 691 | - <view class="comment"> | ||
| 692 | - <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> --> | ||
| 693 | - <view class="fs22 pdt10 t-r"> | ||
| 694 | - <span>评论{{item.comment_count}}</span> | ||
| 695 | - <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 696 | - </view> | ||
| 697 | - </view> | ||
| 698 | - </block> | ||
| 699 | - </block> | ||
| 700 | - </block> | ||
| 701 | - <block wx:else> | ||
| 702 | - <view class="flex ai-center"> | ||
| 703 | - <view class="price rmb">{{item.shop_price}}</view> | ||
| 704 | -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | ||
| 705 | - </view> | ||
| 706 | - <!-- <view class="price">¥{{item.shop_price}}</view> --> | ||
| 707 | - <view class="comment"> | ||
| 708 | - <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> --> | ||
| 709 | - <view class="fs22 pdt10 t-r"> | ||
| 710 | - <span>评论{{item.comment_count}}</span> | ||
| 711 | - <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 712 | - </view> | ||
| 713 | - </view> | ||
| 714 | - </block> | ||
| 715 | - </block> | 623 | + <view class="comment flex jc_sb"> |
| 624 | + <!-- <view class="word-line xc-ash rmb fs24">{{item.market_price}}</view>--> | ||
| 625 | + <view class="fs22 pdt10 t-r"> | ||
| 626 | + <span>评论{{item.comment_count}}</span> | ||
| 627 | + <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 716 | </view> | 628 | </view> |
| 717 | - </navigator> | ||
| 718 | - <!-- 暂无更多 --> | ||
| 719 | - <view style="height: 30rpx;line-height: 30rpx;margin-top: 20rpx;font-size: 25rpx; text-align: center;" | ||
| 720 | - wx:if="{{is_no_more}}">暂无更多</view> | ||
| 721 | - </view> | ||
| 722 | - <view class="no-data" wx:if="{{msgStatus == true}}"> | ||
| 723 | - <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> --> | 629 | + </view> |
| 630 | + </block> | ||
| 631 | + <block wx:else> | ||
| 632 | + <view class="flex ai-center"> | ||
| 633 | + <view class="price rmb">{{item.shop_price}}</view> | ||
| 634 | + <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | ||
| 635 | + </view> | ||
| 636 | + | ||
| 637 | + <view class="comment"> | ||
| 638 | + <view class="fs22 pdt10 t-r"> | ||
| 639 | + <span>评论{{item.comment_count}}</span> | ||
| 640 | + <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 641 | + </view> | ||
| 642 | + </view> | ||
| 643 | + </block> | ||
| 644 | + </block> | ||
| 645 | + <block wx:else> | ||
| 646 | + | ||
| 647 | + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
| 648 | + <view class="flex ai-center"> | ||
| 649 | + <view class="price rmb">{{item.shop_price}}</view> | ||
| 650 | + <!-- <view class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>--> | ||
| 651 | + </view> | ||
| 652 | + <view class="comment"> | ||
| 653 | + <view class="flex ai-center"> | ||
| 654 | + <view class="rmb">{{g_filter.get_card_price(item,card_list,0)}}</view> | ||
| 655 | + <view class="card_bg ellipsis-1"> | ||
| 656 | + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
| 657 | + <view class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</view> | ||
| 658 | + </view> | ||
| 659 | + </view> | ||
| 660 | + </view> | ||
| 661 | + | ||
| 662 | + <view class="fs22 t-r" style="color:#999;"> | ||
| 663 | + <span>评论{{item.comment_count}}</span> | ||
| 664 | + <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 665 | + </view> | ||
| 666 | + | ||
| 724 | 667 | ||
| 725 | - <view wx:if="{{msgStatus == true && lastMsg == false}}" class="no-data-title" style="text-align:center;margin-top:100px"> | ||
| 726 | - <view style="color:#444;line-height:30px;">该类别暂无推荐商品</view><view style="color:#444;line-height:30px;"> {{countDownNum}} 秒后自动跳到下一个类别</view> </view> | ||
| 727 | - <view wx:elif="{{lastMsg == true && msgStatus == true}}" class="no-data-title" style="text-align:center;margin-top:100px">该类别暂无推荐商品</view> | ||
| 728 | - <!-- <navigator class="lookat" url="/pages/index/index/index"> 去逛逛 </navigator> --> | 668 | + </block> |
| 669 | + <block wx:else> | ||
| 670 | + <view class="flex ai-center"> | ||
| 671 | + <view class="price rmb">{{item.shop_price}}</view> | ||
| 672 | + <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | ||
| 673 | + </view> | ||
| 674 | + <!-- <view class="price">¥{{item.shop_price}}</view> --> | ||
| 675 | + <view class="comment"> | ||
| 676 | + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> --> | ||
| 677 | + <view class="fs22 pdt10 t-r"> | ||
| 678 | + <span>评论{{item.comment_count}}</span> | ||
| 679 | + <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 680 | + </view> | ||
| 681 | + </view> | ||
| 682 | + </block> | ||
| 683 | + </block> | ||
| 684 | + </block> | ||
| 685 | + <block wx:else> | ||
| 686 | + <view class="flex ai-center"> | ||
| 687 | + <view class="price rmb">{{item.shop_price}}</view> | ||
| 688 | + <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | ||
| 689 | + </view> | ||
| 690 | + <!-- <view class="price">¥{{item.shop_price}}</view> --> | ||
| 691 | + <view class="comment"> | ||
| 692 | + <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> --> | ||
| 693 | + <view class="fs22 pdt10 t-r"> | ||
| 694 | + <span>评论{{item.comment_count}}</span> | ||
| 695 | + <span class="pdl30">已售{{item.sales_sum}}</span> | ||
| 696 | + </view> | ||
| 697 | + </view> | ||
| 698 | + </block> | ||
| 699 | + </block> | ||
| 729 | </view> | 700 | </view> |
| 730 | - | ||
| 731 | - | ||
| 732 | - </scroll-view> | ||
| 733 | - <!-- /goodslist --> | ||
| 734 | - </view> | ||
| 735 | - <!-- 商品列表结束 --> | ||
| 736 | - | 701 | + </navigator> |
| 702 | + <!-- 暂无更多 --> | ||
| 703 | + <view style="height: 30rpx;line-height: 30rpx;margin-top: 20rpx;font-size: 25rpx; text-align: center;" wx:if="{{is_no_more}}">暂无更多</view> | ||
| 704 | + <view id="sview" style="height: 420rpx;width: 100%;text-align: center;font-size: 18rpx;" wx:if="{{nextShow}}"> | ||
| 705 | + <text >上滑查看下一个分类</text> | ||
| 706 | + </view> | ||
| 707 | + </view> | ||
| 708 | + <view class="no-data" wx:if="{{msgStatus == true}}"> | ||
| 709 | + <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> --> | ||
| 710 | + | ||
| 711 | + <view wx:if="{{msgStatus == true && lastMsg == false}}" class="no-data-title" style="text-align:center;margin-top:100px"> | ||
| 712 | + <view style="color:#444;line-height:30px;">该类别暂无推荐商品</view> | ||
| 713 | + <view style="color:#444;line-height:30px;"> {{countDownNum}} 秒后自动跳到下一个类别</view> | ||
| 714 | + </view> | ||
| 715 | + <view wx:elif="{{lastMsg == true && msgStatus == true}}" class="no-data-title" style="text-align:center;margin-top:100px">该类别暂无推荐商品</view> | ||
| 716 | + <!-- <navigator class="lookat" url="/pages/index/index/index"> 去逛逛 </navigator> --> | ||
| 717 | + </view> | ||
| 718 | + | ||
| 719 | + | ||
| 720 | + </scroll-view> | ||
| 721 | + <!-- /goodslist --> | ||
| 722 | + </view> | ||
| 723 | + <!-- 商品列表结束 --> | ||
| 724 | + | ||
| 737 | </block> | 725 | </block> |
| 738 | </block> | 726 | </block> |
| 739 | - </view> | ||
| 740 | - </view> | ||
| 741 | - </block> | ||
| 742 | - <block wx:elif="{{is_do}}"> | ||
| 743 | - <view class="no-data" > | ||
| 744 | - <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> | ||
| 745 | - <view class="no-data-title">商家暂未设置分类</view> | ||
| 746 | - <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> | ||
| 747 | - </view> | ||
| 748 | - </block> | ||
| 749 | -</block> | 727 | + </view> |
| 728 | + </view> | ||
| 729 | + </block> | ||
| 730 | + <block wx:elif="{{is_do}}"> | ||
| 731 | + <view class="no-data"> | ||
| 732 | + <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> | ||
| 733 | + <view class="no-data-title">商家暂未设置分类</view> | ||
| 734 | + <navigator class="lookat" url="/pages/index/index/index">去逛逛</navigator> | ||
| 735 | + </view> | ||
| 736 | + </block> | ||
| 737 | +</block> | ||
| 750 | \ No newline at end of file | 738 | \ No newline at end of file |
pages/user/assistance/task_assistance.wxml
| @@ -59,6 +59,12 @@ | @@ -59,6 +59,12 @@ | ||
| 59 | style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};"> | 59 | style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};"> |
| 60 | 好友拆一拆 | 60 | 好友拆一拆 |
| 61 | </view> | 61 | </view> |
| 62 | + <!-- 任务超时失效 --> | ||
| 63 | + <!-- <view wx:if="{{is_user_task!=null&&is_user_task.status==0}}"> | ||
| 64 | + <text>距离失效</text> | ||
| 65 | + <view><text>15</text>:<text>45</text>:<text>10</text></view> | ||
| 66 | + </view> --> | ||
| 67 | + | ||
| 62 | <view wx:if="{{is_user_task!=null&&is_user_task.status==1}}" class="task_clike fs40 t-c flex-center" data-libaoid="{{is_user_task.helpListGiftBagId}}"data-taskingid="{{is_user_task.id}}" bindtap="redeem_now" | 68 | <view wx:if="{{is_user_task!=null&&is_user_task.status==1}}" class="task_clike fs40 t-c flex-center" data-libaoid="{{is_user_task.helpListGiftBagId}}"data-taskingid="{{is_user_task.id}}" bindtap="redeem_now" |
| 63 | style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};"> | 69 | style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};"> |
| 64 | 立即兑换 | 70 | 立即兑换 |