From 2c08a98f7e85ec7c9376f27a7933e75e44d672f7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 27 八月 2024 15:52:59 +0800
Subject: [PATCH] ll

---
 wechat_jiaxuan/components/disProduct/index.wxml |  104 +++++++++++++++++++++++-----------------------------
 1 files changed, 46 insertions(+), 58 deletions(-)

diff --git a/wechat_jiaxuan/components/disProduct/index.wxml b/wechat_jiaxuan/components/disProduct/index.wxml
index d993b9d..38bb3cc 100644
--- a/wechat_jiaxuan/components/disProduct/index.wxml
+++ b/wechat_jiaxuan/components/disProduct/index.wxml
@@ -1,83 +1,71 @@
 <view class="app">
-  <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px">
+  <view class="home_top">
     <view class="search_wrap">
       <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
-      <input bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储浜у搧鍚嶇О" />
+      <input bindconfirm="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储浜у搧鍚嶇О" />
     </view>
   </view>
-  <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;">
+  <view class="home_content">
     <view class="main_content">
       <scroll-view class="main_left" enable-flex scroll-y>
         <!-- <view class="main_left"> -->
-          <view data-code="{{item.code}}" bindtap="cateClick" wx:for="{{cateList}}" class="item {{ catalogCode == item.code ? 'active' : '' }}">{{ item.name }}</view>
+        <view data-code="{{item.code}}" bindtap="cateClick" wx:for="{{cateList}}" class="item {{ catalogCode == item.code ? 'active' : '' }}">{{ item.name }}</view>
         <!-- </view> -->
       </scroll-view>
       <view class="main_right">
-        <view class="query_wrap">
-          <view class="item" bindtap="changeOne">
-            <view class="name">瑁呬慨椋庢牸</view>
-            <van-icon name="{{ showOne ? 'arrow-up' : 'arrow-down' }}" />
+        <scroll-view class="query_wrap_scroll" scroll-x>
+          <view class="query_wrap">
+            <block wx:for="{{ secondCateList }}">
+              <view class="item" data-index="{{index}}"  bindtap="changeShowParams">
+                <view class="name">{{ item.tempParamName || item.labelName }}</view>
+                <van-icon name="{{ index == activeIndex && !item.openRelLabel && activeParam.length > 0 ? 'arrow-up' : 'arrow-down' }}" />
+              </view>
+              <view wx:if="{{item.relLabel && item.relLabel.labelCode}}" data-type="child" data-index="{{index}}" class="item" bindtap="changeShowParams">
+                <view class="name">{{ item.tempParamRelName || item.relLabel.labelName }}</view>
+                <van-icon name="{{ index == activeIndex && item.openRelLabel && activeParam.length > 0? 'arrow-up' : 'arrow-down' }}" />
+              </view>
+            </block>
           </view>
-          <view class="item" bindtap="changeTwo">
-            <view class="name">绌洪棿鍚嶇О</view>
-            <van-icon name="{{ showTwo ? 'arrow-up' : 'arrow-down' }}" />
-          </view>
-        </view>
-        <view wx:if="{{ showOne }}" class="query_form">
+        </scroll-view>
+        <view wx:if="{{ activeParam.length > 0 }}" class="query_form">
           <view class="list">
-            <view class="item active">涓滆姖鐢佃</view>
-            <view class="item">涓滆姖鍟婄殑鏃舵拻鐨勪唬鐢佃</view>
-            <view class="item">涓滆姖鐢佃</view>
-            <view class="item">涓滆姖鐢佃</view>
-            <view class="item">涓滆姖鐢佃</view>
+            <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ (!secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamIndex === index) || (secondCateList[activeIndex].openRelLabel && secondCateList[activeIndex].tempParamRelIndex === index)  ? 'active' : '' }}">{{ item.labelValueName }}</view>
           </view>
           <view class="btns">
-            <view class="btn" bindtap="changeOne">鍙栨秷</view>
-            <view class="btn sub">纭</view>
+            <view class="btn" bindtap="cancelParam">鍙栨秷</view>
+            <view class="btn sub" bindtap="subParam">纭</view>
           </view>
         </view>
-        <view wx:if="{{ showTwo }}" class="query_form">
-          <view class="list">
-            <view class="item active">瀹滃</view>
-            <view class="item">瀹滃</view>
-            <view class="item">瀹滃</view>
-            <view class="item">瀹滃</view>
-            <view class="item">瀹滃</view>
-          </view>
-          <view class="btns">
-            <view class="btn" bindtap="changeTwo">鍙栨秷</view>
-            <view class="btn sub">纭</view>
-          </view>
-        </view>
-        <view class="status">
-          <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">榛樿</view>
+        <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view>
+        <view wx:if="{{ showTouch }}" animation="{{animationData}}" class="status">
+          <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">榛樿</view>
           <view class="separate"></view>
-          <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
+          <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">鏈�鐑�</view>
           <view class="separate"></view>
-          <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">鏈�鏂�</view>
+          <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">鏈�鏂�</view>
         </view>
-        <scroll-view bindscrolltolower="scrolltolower" scroll-y	enable-passive enable-flex class="goods_list">
-          <!-- <view class="goods_list"> -->
-            <view wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail">
-              <view class="img_wrap">
-                <image src="{{ item.coverImage }}" class="img" mode="widthFix"></image>
-                <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
-              </view>
-              <view class="name">{{ item.title }}</view>
-              <view class="info">
-                <image wx:if="{{ !item.isCollection }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
-                <image wx:else class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
-                <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount || 0 }}</text>
-                <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
-                <text>{{ item.viewCount || 0 }}</text>
-              </view>
+        <scroll-view bindscrolltoupper="bindscrolltoupper" binddragging="touchmove" binddragstart="touchstart" bindscrolltolower="scrolltolower" scroll-y enhanced class="goods_list">
+          <view class="empty"></view>
+          <view wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail">
+            <view class="img_wrap">
+              <image src="{{ item.coverImage }}" class="img" mode="aspectFill"></image>
+              <image wx:if="{{ item.isNew }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
             </view>
-          <!-- </view> -->
+            <view class="name">{{ item.title }}</view>
+            <view class="info">
+              <image wx:if="{{ !item.isCollection }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
+              <image wx:else class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
+              <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount || 0 }}</text>
+              <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
+              <text>{{ math.formarCount(item.viewCount) }}</text>
+            </view>
+          </view>
+          <view wx:if="{{ datalist.length == 0 }}" class="empty_wrap">
+            <image class="default_empty" src="../../static/images/default_empty.png"></image>
+          </view>
         </scroll-view>
       </view>
     </view>
   </view>
-
-
-
-</view>
\ No newline at end of file
+</view>
+<wxs module="math" src="../../utils/math.wxs"></wxs>
\ No newline at end of file

--
Gitblit v1.9.3