Commit da3cde23ef0bad2c0c2b34c351045839e77e3d52
1 parent
650a94a0
商品分类
Showing
3 changed files
with
228 additions
and
49 deletions
pages/goods/categoryList/categoryList.js
| @@ -35,6 +35,9 @@ Page({ | @@ -35,6 +35,9 @@ Page({ | ||
| 35 | index:223, | 35 | index:223, |
| 36 | classify_name:"国家",//项目类型 | 36 | classify_name:"国家",//项目类型 |
| 37 | brand_list:null,//品牌列表 | 37 | brand_list:null,//品牌列表 |
| 38 | + | ||
| 39 | + one_level_classify:[],// 新的版本左边的边分类1级 | ||
| 40 | + ishaf_three:0//判断有没有3级 | ||
| 38 | }, | 41 | }, |
| 39 | onLoad: function(tt) { | 42 | onLoad: function(tt) { |
| 40 | const res = wx.getSystemInfoSync(), | 43 | const res = wx.getSystemInfoSync(), |
| @@ -68,9 +71,9 @@ Page({ | @@ -68,9 +71,9 @@ Page({ | ||
| 68 | this.setData({ | 71 | this.setData({ |
| 69 | lettersPosition: temp | 72 | lettersPosition: temp |
| 70 | }); | 73 | }); |
| 71 | - console.log(this.data.is_used_share,"是什么东西啊"); | 74 | + |
| 72 | if (this.data.is_used_share==0){ | 75 | if (this.data.is_used_share==0){ |
| 73 | - console.log("有进来m"); | 76 | + |
| 74 | this.get_nation(); | 77 | this.get_nation(); |
| 75 | } | 78 | } |
| 76 | 79 | ||
| @@ -78,9 +81,15 @@ Page({ | @@ -78,9 +81,15 @@ Page({ | ||
| 78 | }, | 81 | }, |
| 79 | 82 | ||
| 80 | onShow:function(){ | 83 | onShow:function(){ |
| 84 | + getApp | ||
| 81 | var that=this; | 85 | var that=this; |
| 82 | 86 | ||
| 83 | getApp().getConfig2(function (e) { | 87 | getApp().getConfig2(function (e) { |
| 88 | + var data=e; | ||
| 89 | + var switch_list_data = data.switch_list; | ||
| 90 | + var switch_list = JSON.parse(switch_list_data); | ||
| 91 | + var is_newsgoodstype = switch_list.is_newsgoodstype; | ||
| 92 | + that.setData({ is_used_share :is_newsgoodstype}); | ||
| 84 | if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); } | 93 | if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); } |
| 85 | if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); } | 94 | if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); } |
| 86 | if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); } | 95 | if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); } |
| @@ -115,13 +124,15 @@ Page({ | @@ -115,13 +124,15 @@ Page({ | ||
| 115 | success: function(e) { | 124 | success: function(e) { |
| 116 | var arr=new Array(); | 125 | var arr=new Array(); |
| 117 | var dda = e.data.data.pageData; | 126 | var dda = e.data.data.pageData; |
| 118 | - console.log(dda.length); | 127 | + |
| 128 | + console.log(dda, "所有的数据"); | ||
| 129 | + if (this.data.is_used_share == 0) {//is_used_share控制新旧版本 | ||
| 119 | for(var i=0;i<dda.length;i++){ | 130 | for(var i=0;i<dda.length;i++){ |
| 120 | if (parseInt(dda[i].level)==1){ | 131 | if (parseInt(dda[i].level)==1){ |
| 121 | var item = {items: dda[i], array: new Array()} | 132 | var item = {items: dda[i], array: new Array()} |
| 122 | arr.push(item); | 133 | arr.push(item); |
| 123 | } else if (parseInt(dda[i].level) == 2){ | 134 | } else if (parseInt(dda[i].level) == 2){ |
| 124 | - for (var j = 0; j < arr.length;j++ ){ | 135 | + for (var j = 0; j < arr.length;j++ ){ |
| 125 | if (parseInt(dda[i].parent_id) == parseInt(arr[j].items.id)){ | 136 | if (parseInt(dda[i].parent_id) == parseInt(arr[j].items.id)){ |
| 126 | arr[j].array.push(dda[i]); break; | 137 | arr[j].array.push(dda[i]); break; |
| 127 | } | 138 | } |
| @@ -131,6 +142,50 @@ Page({ | @@ -131,6 +142,50 @@ Page({ | ||
| 131 | } | 142 | } |
| 132 | } | 143 | } |
| 133 | t.setData({ catelist: arr}); | 144 | t.setData({ catelist: arr}); |
| 145 | + }else{ | ||
| 146 | + //新的版本 | ||
| 147 | + for (var i = 0; i < dda.length; i++) { | ||
| 148 | + | ||
| 149 | + | ||
| 150 | + //--要排队的元素--- | ||
| 151 | + var need_to_insert=dda[i]; | ||
| 152 | + | ||
| 153 | + if (parseInt(need_to_insert.level) == 1) { | ||
| 154 | + var item = { items: need_to_insert, array: new Array() }//判断数组的长度看看有没有2级菜单 | ||
| 155 | + arr.push(item); | ||
| 156 | + } else if (parseInt(need_to_insert.level) == 2) { | ||
| 157 | + for (var j = 0; j < arr.length; j++) { | ||
| 158 | + if (parseInt(need_to_insert.parent_id) == parseInt(arr[j].items.id)) { | ||
| 159 | + | ||
| 160 | + var ishaf_two = { items: need_to_insert, arrays: new Array() }; | ||
| 161 | + arr[j].array.push(ishaf_two); arr.ishaf_two = 0; break; | ||
| 162 | + } | ||
| 163 | + } | ||
| 164 | + } else if (parseInt(need_to_insert.level) == 3) {//判断有3级的时候在二级里添加一个数组 | ||
| 165 | + | ||
| 166 | + for (var dd = 0; dd < arr.length; dd++) { | ||
| 167 | + for (var pp = 0; pp < arr[dd].array.length; pp++) { | ||
| 168 | + //--判断二级-- | ||
| 169 | + var two_item = arr[dd].array; | ||
| 170 | + | ||
| 171 | + if (two_item && two_item.length>0){ | ||
| 172 | + | ||
| 173 | + if (parseInt(need_to_insert.parent_id) == parseInt(two_item[pp].items.id)) { | ||
| 174 | + | ||
| 175 | + arr[dd].array[pp].arrays.push(need_to_insert); arr.ishaf_three = 0; break; | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + } | ||
| 181 | + } | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + console.log("现在是1级与2级所有的数据", arr) | ||
| 187 | + t.setData({one_level_classify:arr}); | ||
| 188 | + } | ||
| 134 | } | 189 | } |
| 135 | }); | 190 | }); |
| 136 | }, | 191 | }, |
| @@ -271,7 +326,8 @@ Page({ | @@ -271,7 +326,8 @@ Page({ | ||
| 271 | }, | 326 | }, |
| 272 | success: function (e) { | 327 | success: function (e) { |
| 273 | var dda = e.data.data.pageData; | 328 | var dda = e.data.data.pageData; |
| 274 | - | 329 | + |
| 330 | + | ||
| 275 | s.setData({ nationlist:dda}) | 331 | s.setData({ nationlist:dda}) |
| 276 | } | 332 | } |
| 277 | }); | 333 | }); |
| @@ -368,15 +424,52 @@ Page({ | @@ -368,15 +424,52 @@ Page({ | ||
| 368 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 424 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 369 | 425 | ||
| 370 | }, | 426 | }, |
| 371 | - // 新的版本分类 | 427 | + // 新的版本分类点击一级分类 |
| 372 | click_classify:function(e){ | 428 | click_classify:function(e){ |
| 429 | + this.data.ishaf_three=0; | ||
| 373 | var indexs=e.currentTarget.dataset.index; | 430 | var indexs=e.currentTarget.dataset.index; |
| 374 | var name = e.currentTarget.dataset.name; | 431 | var name = e.currentTarget.dataset.name; |
| 375 | - console.log("获取当前下标",indexs); | ||
| 376 | - this.setData({ select_classify_on: indexs, index: indexs, classify_name:name}); | 432 | + var cid = e.currentTarget.dataset.cid; |
| 433 | + var pid = e.currentTarget.dataset.pid; | ||
| 434 | + var arr = e.currentTarget.dataset.arr; | ||
| 435 | + | ||
| 377 | if (indexs==220){ | 436 | if (indexs==220){ |
| 378 | this.get_brand(); | 437 | this.get_brand(); |
| 379 | } | 438 | } |
| 439 | + | ||
| 440 | + if (arr!="undefined" && arr!=undefined){ | ||
| 441 | + if (arr.length==0){ | ||
| 442 | + var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid + "&pid=" + pid; | ||
| 443 | + wx.navigateTo({ url: lurl }); | ||
| 444 | + return false; | ||
| 445 | + } | ||
| 446 | + if (arr.length != 0){ | ||
| 447 | + | ||
| 448 | + for(var i=0;i<arr.length;i++){ | ||
| 449 | + if(arr[i].arrays.length<0){ | ||
| 450 | + console.log(arr,"二级数据"); | ||
| 451 | + this.setData({select_classify_on: indexs, index: indexs, classify_name: name, goodslist:arr}); | ||
| 452 | + | ||
| 453 | + }else{ | ||
| 454 | + | ||
| 455 | + console.log("aaaaaaaaaaaaaaaaa", arr[i].length); | ||
| 456 | + this.setData({ select_classify_on: indexs, index: indexs, goodslist: arr }); | ||
| 457 | + // if (arr[i].length>0){ | ||
| 458 | + console.log("000000"); | ||
| 459 | + // for (var z = 0;z<arr[i].length;z++){ | ||
| 460 | + // var arr = arr[i]; | ||
| 461 | + // console.log(z,"三级的数据", arr); | ||
| 462 | + // this.setData({ select_classify_on: indexs, index: indexs,goodslist: arr}); | ||
| 463 | + // } | ||
| 464 | + console.log("这是什么东西", this.data.goodslist); | ||
| 465 | + // } | ||
| 466 | + } | ||
| 467 | + // } | ||
| 468 | + } | ||
| 469 | + } | ||
| 470 | + } | ||
| 471 | + | ||
| 472 | + this.setData({ select_classify_on: indexs, index: indexs, classify_name: name }); | ||
| 380 | 473 | ||
| 381 | }, | 474 | }, |
| 382 | // 图片失败 | 475 | // 图片失败 |
| @@ -387,7 +480,33 @@ Page({ | @@ -387,7 +480,33 @@ Page({ | ||
| 387 | var _errObj = {}; | 480 | var _errObj = {}; |
| 388 | _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | 481 | _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; |
| 389 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 482 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 390 | - | 483 | + }, |
| 484 | + //选择更多 | ||
| 485 | + select_more:function(e){ | ||
| 486 | + var cid = e.currentTarget.dataset.cid; | ||
| 487 | + var pid = e.currentTarget.dataset.pid; | ||
| 488 | + console.log("选择更多"+cid); | ||
| 489 | + var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid + "&pid=" + pid; | ||
| 490 | + wx.navigateTo({ url: lurl }); | ||
| 491 | + | ||
| 492 | + }, | ||
| 493 | +//扫一扫 | ||
| 494 | + getScancode:function(){ | ||
| 495 | + var _this = this; | ||
| 496 | + // 允许从相机和相册扫码 | ||
| 497 | + wx.scanCode({ | ||
| 498 | + success: (res) => { | ||
| 499 | + // var result = res.result; | ||
| 500 | + // console.log("扫一扫返回",result); | ||
| 501 | + // wx.navigateTo({ | ||
| 502 | + | ||
| 503 | + // url: "/pages/goods/search/search?s_key=" + result, | ||
| 504 | + // }); | ||
| 505 | + } | ||
| 506 | + }) | ||
| 507 | + }, | ||
| 508 | + onUnload: function () { | ||
| 509 | + this.destroyActivityTimer(); | ||
| 391 | }, | 510 | }, |
| 392 | 511 | ||
| 393 | }); | 512 | }); |
| 394 | \ No newline at end of file | 513 | \ No newline at end of file |
pages/goods/categoryList/categoryList.wxml
| 1 | -<block wx:if="{{is_used_share}}"> | 1 | +<block wx:if="{{is_used_share==0}}"> |
| 2 | <view class='top_view' wx:if="{{is_show_pl || is_show_gb || is_show_pp }}"> | 2 | <view class='top_view' wx:if="{{is_show_pl || is_show_gb || is_show_pp }}"> |
| 3 | <view class="swiper-tab" > | 3 | <view class="swiper-tab" > |
| 4 | <view wx:if="{{is_show_pl}}" class="swiper-tab-item {{currentTab==0?'active':''}}" | 4 | <view wx:if="{{is_show_pl}}" class="swiper-tab-item {{currentTab==0?'active':''}}" |
| @@ -102,9 +102,9 @@ | @@ -102,9 +102,9 @@ | ||
| 102 | </block> | 102 | </block> |
| 103 | <block wx:else> | 103 | <block wx:else> |
| 104 | <!-- 新版分类头部 --> | 104 | <!-- 新版分类头部 --> |
| 105 | -<view class="xc-search-box flex-center white_b" bindtap="goseach"> | ||
| 106 | - <view class="share-height t-c"> | ||
| 107 | - <image class="scanning_black-img"src="../../../images/scanning_black.png"></image> | 105 | +<view class="xc-search-box flex-center white_b"> |
| 106 | + <view class="share-height t-c" bindtap="getScancode" > | ||
| 107 | + <image class="scanning_black-img"src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> | ||
| 108 | <view class="fs24"> | 108 | <view class="fs24"> |
| 109 | 扫一扫 | 109 | 扫一扫 |
| 110 | </view> | 110 | </view> |
| @@ -122,28 +122,41 @@ | @@ -122,28 +122,41 @@ | ||
| 122 | <!-- 分类项目的类型 --> | 122 | <!-- 分类项目的类型 --> |
| 123 | <view class="project_type"> | 123 | <view class="project_type"> |
| 124 | <view class="project_type-frame"> | 124 | <view class="project_type-frame"> |
| 125 | - <view bindtap="click_classify" class="share_type fs32 flex-space-between xc-letter-spacing {{select_classify_on==223?'select_classify':''}}"data-index="223"data-name="国家" wx:if="{{is_country}}"> | ||
| 126 | - <text>国</text><text>家</text> | 125 | + <view wx:if="{{is_show_gb}}"> |
| 126 | + <view bindtap="click_classify" class="share_type fs32 flex-space-between xc-letter-spacing {{select_classify_on==223?'select_classify':''}}"data-index="223"data-name="国家" wx:if="{{is_country}}"> | ||
| 127 | + <text>国</text><text>家</text> | ||
| 128 | + <!-- <view wx:for="{{classify_name}}" wx:for-item="name"wx:for-index="index"> | ||
| 129 | + <view> | ||
| 130 | + {{name}} | ||
| 131 | + </view> | ||
| 132 | + </view> --> | ||
| 133 | + </view> | ||
| 127 | </view> | 134 | </view> |
| 135 | + <view wx:if="{{is_show_pp}}"> | ||
| 128 | <view bindtap="click_classify" class="{{select_classify_on==220?'select_classify':''}} share_type fs32 flex-space-between xc-letter-spacing" wx:if="{{is_brand}}"data-index="220"data-name="品牌"> | 136 | <view bindtap="click_classify" class="{{select_classify_on==220?'select_classify':''}} share_type fs32 flex-space-between xc-letter-spacing" wx:if="{{is_brand}}"data-index="220"data-name="品牌"> |
| 129 | <text>品</text><text>牌</text> | 137 | <text>品</text><text>牌</text> |
| 130 | </view> | 138 | </view> |
| 131 | - <block wx:for="{{name}}" wx:for-item="ittm"wx:for-index="index"> | ||
| 132 | - <view bindtap="click_classify" class="{{select_classify_on==index?'select_classify width80':''}} share_type fs32 t-c {{ittm.names.length==2? 'world_sn':''}} {{select_classify_on==index&&ittm.names.length==2?'text-indent':''}} {{select_classify_on==index&&ittm.names.length==3?'text3':''}}"data-index="{{index}}"data-name="{{ittm.names}}"> | ||
| 133 | - <view class="{{ittm.names.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittm.names.length<4}}"> | ||
| 134 | - <view wx:for="{{ittm.names}}" wx:for-item="names"wx:for-index="index"> | 139 | + </view> |
| 140 | + <view wx:if="{{is_show_pl}}"> | ||
| 141 | + | ||
| 142 | + <view wx:for="{{one_level_classify}}" wx:for-item="ittms" > | ||
| 143 | + <view bindtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} share_type fs32 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.name}}"> | ||
| 144 | + <view class="{{ittms.items.name.length==3?'flex-center-around':'flex-space-between'}}" wx:if="{{ittms.items.name.length<4}}"> | ||
| 145 | + <view wx:for="{{ittms.items.name}}" wx:for-item="name"wx:for-index="index"> | ||
| 135 | <view> | 146 | <view> |
| 136 | - {{names}} | 147 | + {{name}} |
| 137 | </view> | 148 | </view> |
| 138 | </view> | 149 | </view> |
| 139 | 150 | ||
| 140 | </view> | 151 | </view> |
| 141 | - <view wx:else> | ||
| 142 | - {{ittm.names}} | 152 | + <view wx:else class="sort-name"> |
| 153 | + {{ittms.items.name}} | ||
| 143 | </view> | 154 | </view> |
| 144 | </view> | 155 | </view> |
| 145 | - </block> | ||
| 146 | - | 156 | + |
| 157 | + </view> | ||
| 158 | + | ||
| 159 | +</view> | ||
| 147 | </view> | 160 | </view> |
| 148 | 161 | ||
| 149 | </view> | 162 | </view> |
| @@ -152,18 +165,18 @@ | @@ -152,18 +165,18 @@ | ||
| 152 | 165 | ||
| 153 | 166 | ||
| 154 | <!-- 分类项目的内容 --> | 167 | <!-- 分类项目的内容 --> |
| 155 | -<view class="classify_content"> | ||
| 156 | -<view class="classify_name fs32 flex-space-between"> | ||
| 157 | -<view>{{classify_name}}</view> | ||
| 158 | -<view class="flex select_more"> | ||
| 159 | - <view class="red-co fs32">选择更多</view> | ||
| 160 | - <view class="bg_right width_height"></view> | ||
| 161 | -</view> | ||
| 162 | 168 | ||
| 163 | -</view> | 169 | +<view class="classify_content"> |
| 164 | <!-- 国家的样式 --> | 170 | <!-- 国家的样式 --> |
| 165 | <block wx:if="{{select_classify_on==223}}"> | 171 | <block wx:if="{{select_classify_on==223}}"> |
| 166 | - <view class="flex classify_content-frame" > | 172 | +<view class="classify_name fs32 flex-space-between"> |
| 173 | +<view>{{ishaf_three==1?good_list.name:classify_name}}</view> | ||
| 174 | +<!-- <view class="flex select_more" > | ||
| 175 | + | ||
| 176 | + <view class="bg_right width_height"></view> | ||
| 177 | +</view> --> | ||
| 178 | +</view> | ||
| 179 | + <view class=" classify_content-frame flex-space-between" > | ||
| 167 | <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}}" > | 180 | <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}}" > |
| 168 | <image class="country_img" src="{{iurl}}{{bitem.logo}}"></image> | 181 | <image class="country_img" src="{{iurl}}{{bitem.logo}}"></image> |
| 169 | <view class='nation_box abs box'> | 182 | <view class='nation_box abs box'> |
| @@ -174,9 +187,26 @@ | @@ -174,9 +187,26 @@ | ||
| 174 | </view> | 187 | </view> |
| 175 | </view> | 188 | </view> |
| 176 | </view> | 189 | </view> |
| 190 | + | ||
| 191 | +<!-- <view class="classify_content-frame flex-wrap"> | ||
| 192 | + <view class="brand_img_frame t-c ib" data-cid="{{item.items.id}}" data-pid="0"wx:for="{{ishaf_three==1?goodslist.arrays:goodslist}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate"> | ||
| 193 | + <image class="brand_img"src="{{ishaf_three==1?(item.items.icoimg==null?iurl+'/miniapp/images/no_cate_def.png':item.items.icoimg):(item.image==null?iurl+'/miniapp/images/no_cate_def.png':item.image)}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> | ||
| 194 | + <view class="brand_img_name fs24">{{ishaf_three==1?item.name:item.items.name}}</view> | ||
| 195 | + </view> | ||
| 196 | +</view> --> | ||
| 197 | + | ||
| 177 | </block> | 198 | </block> |
| 178 | <!-- 品牌 --> | 199 | <!-- 品牌 --> |
| 179 | <block wx:if="{{select_classify_on==220}}"> | 200 | <block wx:if="{{select_classify_on==220}}"> |
| 201 | + | ||
| 202 | +<view class="classify_name fs32 flex-space-between"> | ||
| 203 | +<view>{{classify_name}}</view> | ||
| 204 | +<!-- <view class="flex select_more" > | ||
| 205 | + | ||
| 206 | + <view class="bg_right width_height"></view> | ||
| 207 | +</view> --> | ||
| 208 | +</view> | ||
| 209 | + | ||
| 180 | <view class="classify_content-frame flex flex-wrap"> | 210 | <view class="classify_content-frame flex flex-wrap"> |
| 181 | 211 | ||
| 182 | <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx"> | 212 | <block wx:for="{{groups}}" wx:for-item="brand_list" wx:for-index="pidx"> |
| @@ -187,22 +217,40 @@ | @@ -187,22 +217,40 @@ | ||
| 187 | <view class="brand_img_name fs24">{{user.name}}</view> | 217 | <view class="brand_img_name fs24">{{user.name}}</view> |
| 188 | </view> | 218 | </view> |
| 189 | </view> | 219 | </view> |
| 220 | + | ||
| 221 | + | ||
| 190 | </block> | 222 | </block> |
| 191 | </view> | 223 | </view> |
| 192 | </block> | 224 | </block> |
| 225 | + | ||
| 226 | + | ||
| 227 | + | ||
| 193 | <!-- 商品 --> | 228 | <!-- 商品 --> |
| 194 | <block wx:if="{{select_classify_on!=220&&select_classify_on!=223}}"> | 229 | <block wx:if="{{select_classify_on!=220&&select_classify_on!=223}}"> |
| 195 | -<view class="classify_content-frame flex flex-wrap"> | ||
| 196 | - | 230 | +<block wx:for="{{goodslist}}"wx:for-item="goods"wx:for-index="inds"> |
| 231 | +<view> | ||
| 197 | 232 | ||
| 198 | - <view class="brand_img_frame t-c"wx:for="{{goodslist}}" wx:for-index="index" wx:for-item="item" > | ||
| 199 | - <image class="brand_img"src="{{item.logo}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> | ||
| 200 | - <view class="brand_img_name fs24">{{item.good_name}}</view> | ||
| 201 | - </view> | ||
| 202 | 233 | ||
| 203 | - | 234 | +<view class="classify_name fs32 flex-space-between"data-pid="0"data-cid="{{goods.items.id}}" bindtap='select_more'> |
| 235 | +<view>{{goods.items.name}}</view> | ||
| 236 | +<view class="flex select_more" > | ||
| 237 | + <view class="red-co fs32" >选择更多</view> | ||
| 238 | + <view class="bg_right width_height"></view> | ||
| 239 | +</view> | ||
| 240 | +</view> | ||
| 204 | 241 | ||
| 242 | + | ||
| 243 | +<block wx:if="{{goods.arrays.length>0}}"> | ||
| 244 | +<view class="classify_content-frame flex-wrap"> | ||
| 245 | + <view class="brand_img_frame t-c ib" data-cid="{{item.items.id}}" data-pid="0"wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate"> | ||
| 246 | + <image class="brand_img"src="{{item.items.icoimg==null?iurl+'/miniapp/images/no_cate_def.png':item.items.icoimg}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> | ||
| 247 | + <view class="brand_img_name fs24">{{item.name}}</view> | ||
| 248 | + </view> | ||
| 205 | </view> | 249 | </view> |
| 250 | +<view class="divider_line"></view> | ||
| 251 | +</block> | ||
| 252 | +</view> | ||
| 253 | +</block> | ||
| 206 | </block> | 254 | </block> |
| 207 | </view> | 255 | </view> |
| 208 | 256 |
pages/goods/categoryList/categoryList.wxss
| @@ -203,17 +203,20 @@ margin-top: 8rpx; | @@ -203,17 +203,20 @@ margin-top: 8rpx; | ||
| 203 | width: 33%; | 203 | width: 33%; |
| 204 | height: 100%; | 204 | height: 100%; |
| 205 | border-right: 1rpx solid #eee; | 205 | border-right: 1rpx solid #eee; |
| 206 | + white-space: nowrap; | ||
| 207 | + | ||
| 206 | } | 208 | } |
| 207 | .share_type{ | 209 | .share_type{ |
| 208 | margin: auto; | 210 | margin: auto; |
| 209 | - width: 60%; | 211 | + width: 58%; |
| 210 | margin-top: 35rpx; | 212 | margin-top: 35rpx; |
| 213 | +overflow: hidden; | ||
| 211 | 214 | ||
| 212 | } | 215 | } |
| 213 | .xc-letter-spacing{ | 216 | .xc-letter-spacing{ |
| 214 | padding-left: 29rpx; | 217 | padding-left: 29rpx; |
| 215 | padding-right: 29rpx; | 218 | padding-right: 29rpx; |
| 216 | -width: 52%; | 219 | +width: 51%; |
| 217 | margin: auto; | 220 | margin: auto; |
| 218 | margin-top: 35rpx; | 221 | margin-top: 35rpx; |
| 219 | 222 | ||
| @@ -222,7 +225,7 @@ margin-top: 35rpx; | @@ -222,7 +225,7 @@ margin-top: 35rpx; | ||
| 222 | .world_sn{ | 225 | .world_sn{ |
| 223 | white-space: nowrap; | 226 | white-space: nowrap; |
| 224 | overflow: hidden; | 227 | overflow: hidden; |
| 225 | -width: 50%; | 228 | +width: 52%; |
| 226 | /* letter-spacing: 60rpx; */ | 229 | /* letter-spacing: 60rpx; */ |
| 227 | margin: auto; | 230 | margin: auto; |
| 228 | margin-top: 35rpx; | 231 | margin-top: 35rpx; |
| @@ -262,8 +265,8 @@ width: 60%; | @@ -262,8 +265,8 @@ width: 60%; | ||
| 262 | width: 90%; | 265 | width: 90%; |
| 263 | margin: auto; | 266 | margin: auto; |
| 264 | flex-wrap:wrap; | 267 | flex-wrap:wrap; |
| 265 | - justify-content:space-between; | ||
| 266 | - height: 90%; | 268 | + max-height: 90%; |
| 269 | + | ||
| 267 | overflow-y:scroll; | 270 | overflow-y:scroll; |
| 268 | overflow: hidden scroll; | 271 | overflow: hidden scroll; |
| 269 | 272 | ||
| @@ -271,7 +274,7 @@ width: 60%; | @@ -271,7 +274,7 @@ width: 60%; | ||
| 271 | .country_img-frame{ | 274 | .country_img-frame{ |
| 272 | width: 48%; | 275 | width: 48%; |
| 273 | height: 140rpx; | 276 | height: 140rpx; |
| 274 | - | 277 | + |
| 275 | } | 278 | } |
| 276 | .country_img{ | 279 | .country_img{ |
| 277 | width: 100%; | 280 | width: 100%; |
| @@ -318,12 +321,13 @@ line-height: 65rpx; | @@ -318,12 +321,13 @@ line-height: 65rpx; | ||
| 318 | width: 30%; | 321 | width: 30%; |
| 319 | height: 220rpx; | 322 | height: 220rpx; |
| 320 | margin-top: 18rpx; | 323 | margin-top: 18rpx; |
| 324 | + margin-right: 15rpx; | ||
| 321 | 325 | ||
| 322 | } | 326 | } |
| 323 | 327 | ||
| 324 | .brand_img{ | 328 | .brand_img{ |
| 325 | width:100%; | 329 | width:100%; |
| 326 | - height: 70%; | 330 | + height: 61.5%; |
| 327 | margin-bottom: 10rpx | 331 | margin-bottom: 10rpx |
| 328 | } | 332 | } |
| 329 | .brand_img-name{ | 333 | .brand_img-name{ |
| @@ -344,6 +348,14 @@ width: 62%; | @@ -344,6 +348,14 @@ width: 62%; | ||
| 344 | line-height: 37rpx; | 348 | line-height: 37rpx; |
| 345 | height: 35rpx; | 349 | height: 35rpx; |
| 346 | margin-top: 24rpx; | 350 | margin-top: 24rpx; |
| 351 | + } | ||
| 352 | + .divider_line{ | ||
| 353 | + width: 100%; | ||
| 354 | + border-bottom: 6rpx solid #eee; | ||
| 355 | + } | ||
| 356 | + .sort-name{ | ||
| 357 | + width: 132rpx; | ||
| 358 | +overflow: hidden; | ||
| 359 | +margin: auto; | ||
| 347 | 360 | ||
| 348 | - | ||
| 349 | - } | ||
| 350 | \ No newline at end of file | 361 | \ No newline at end of file |
| 362 | +} | ||
| 351 | \ No newline at end of file | 363 | \ No newline at end of file |