zhaoxiaohai 3 年之前
父節點
當前提交
eb2587cbed

+ 4 - 0
components/My_VerticalBox/index.js

@@ -6,6 +6,10 @@ Component({
     properties: {
         list: {
             type: Array
+        },
+        pageType: {
+            type: String,
+            value: 'home'
         }
     },
 

+ 9 - 1
components/My_VerticalBox/index.wxml

@@ -1,7 +1,15 @@
-<view class="VerticalBox">
+<view class="VerticalBox" wx:if="{{pageType=='home'}}">
     <view class="VerticalBox-item" wx:for="{{list}}">
         <image class="VerticalBox-image" src="{{item.attinfos[0].fobsurl}}" mode="aspectFill"></image>
         <view class="VerticalBox-title">{{item.fbrand}}</view>
         <view class="VerticalBox-explain">休闲风格</view>
     </view>
+</view>
+
+<view class="VerticalBox zhanhui" wx:else>
+    <view class="VerticalBox-item" wx:for="{{list}}">
+        <image class="VerticalBox-image" src="{{item.attinfos[0].fobsurl}}" mode="aspectFill"></image>
+        <view class="VerticalBox-title">{{item.fprodname}}</view>
+        <view class="VerticalBox-explain">{{item.fprodclassname}}</view>
+    </view>
 </view>

+ 18 - 5
components/My_VerticalBox/index.wxss

@@ -1,5 +1,6 @@
 .VerticalBox {
     display: flex;
+    align-items: flex-start;
     width: 100%;
     height: 100%;
 }
@@ -10,11 +11,7 @@
     text-align: center;
     background: #F6F7F8;
     border-radius: 12rpx;
-    margin-left: 30rpx;
-}
-
-.VerticalBox-item:nth-child(1){
-    margin-left: 0;
+    margin-right: 30rpx;
 }
 
 .VerticalBox-image {
@@ -34,4 +31,20 @@
 .VerticalBox-explain {
     font-size: 24rpx;
     color: #333333;
+}
+
+.zhanhui {
+    flex-wrap: wrap;
+}
+
+.VerticalBox-item {
+    margin-right: 23rpx;
+}
+
+.VerticalBox-item:nth-child(3n) {
+    margin-right: 0 !important;
+}
+
+.VerticalBox-item:nth-child(n+3) {
+    margin-bottom: 10rpx;
 }

+ 1 - 1
pages/tabbar-pages/home/index.wxml

@@ -36,7 +36,7 @@
     </view>
 </My_DisplayBox>
 
-<My_DisplayBox wx:if="{{partnerList.length>=2}}" title="合作商家" bind:getExhibitionTitle="getExhibitionTitle">
+<My_DisplayBox wx:if="{{partnerList.length>=1}}" title="合作商家" bind:getExhibitionTitle="getExhibitionTitle">
     <!-- 标题前图片 -->
     <image slot="display-box-img" class="display-title_image" src="/static/icon-04.png" mode="aspectFit"></image>
     <!-- 轮播 -->

+ 11 - 4
pages/tradeShow/index.js

@@ -14,13 +14,15 @@ Page({
         liveList: [], //云展会直播大厅
         agentList: [], //热门展商
         prodList: [], //热门展品
+        fagentcount: null, //展示商
+        flivecount: null, //正在直播
+        ftotalcustcount: null, //观众总数
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        console.log(options)
         let data = {
             "classname": "publicmethod.live.live",
             "method": "getLiveChannelData",
@@ -38,7 +40,10 @@ Page({
             console.log("直播大厅", res)
             const liveList = handleList.twoDimensionalArr(res.data.tlivelist, 4, 10);
             this.setData({
-                liveList
+                liveList,
+                fagentcount: res.data.fagentcount,
+                flivecount: res.data.flivecount,
+                ftotalcustcount: res.data.ftotalcustcount
             })
         });
         /* 热门展商 */
@@ -67,7 +72,8 @@ Page({
             })
             const prodList = handleList.twoDimensionalArr(res.data, 6, 10);
             this.setData({
-                prodList
+                prodList,
+
             })
         });
 
@@ -79,12 +85,13 @@ Page({
 
 
     },
+    /* 数据展示 */
+
     searchBlur(e) {
         const {
             value
         } = e.detail;
         console.log(value)
-
     },
 
     /**

+ 17 - 13
pages/tradeShow/index.wxml

@@ -5,15 +5,15 @@
 <view class="data-display">
     <view>
         <view class="data-display-title">展示商</view>
-        <view class="data-display-num">1326</view>
+        <view class="data-display-num">{{fagentcount}}</view>
     </view>
     <view>
         <view class="data-display-title">正在直播</view>
-        <view class="data-display-num">1326</view>
+        <view class="data-display-num">{{flivecount}}</view>
     </view>
     <view>
         <view class="data-display-title">观众人数</view>
-        <view class="data-display-num">1326854</view>
+        <view class="data-display-num">{{ftotalcustcount}}</view>
     </view>
 </view>
 
@@ -39,8 +39,11 @@
             <view wx:for="{{item}}" class="exhibition">
                 <image class="exhibition-img" src="{{item.channelcoverimageurl}}" mode="aspectFill"></image>
                 <view class="exhibition-bottom">
-                    <view class="exhibition-bottom-title">{{item.fbrand}}</view>
-                    <view class="exhibition-bottom-data">{{item.fcustcount}}</view>
+                    <view class="exhibition-bottom-title u-line-1">{{item.fbrand}}5555555555555555555555555555555555555555</view>
+                    <view class="exhibition-bottom-data">
+                        <image src="/static/icon-11.png"></image>
+                        <view class="exhibition-bottom-data-text u-line-1">{{item.fcustcount}}</view>
+                    </view>
                 </view>
             </view>
         </swiper-item>
@@ -62,9 +65,12 @@
         <swiper-item wx:for="{{agentList}}" class="exhibition-swiper-item">
             <view wx:for="{{item}}" class="exhibition">
                 <image class="exhibition-img" src="{{item.attinfos[0].fobsurl}}" mode="aspectFill"></image>
+                <view class="showLocation">{{item.flocation}}</view>
                 <view class="exhibition-bottom">
-                    <view class="exhibition-bottom-title">{{item.fbrand}}</view>
-                    <view class="exhibition-bottom-data">{{item.flocationclass}}</view>
+                    <view class="exhibition-bottom-title u-line-1">{{item.fbrand}}</view>
+                    <view class="exhibition-bottom-data">
+                        <view class="exhibition-bottom-data-text u-line-1">{{item.flocationclass}}</view>
+                    </view>
                 </view>
             </view>
         </swiper-item>
@@ -74,11 +80,9 @@
 <My_DisplayBox title="热门商品" isMore="{{false}}">
     <!-- 标题前图片 -->
     <image slot="display-box-img" class="display-title_image" src="/static/icon-04.png" mode="aspectFit"></image>
-    <swiper indicator-active-color="#4DC2D4" indicator-color="#D8D8D8">
-        <My_VerticalBox></My_VerticalBox>
-        <view style="height: 10rpx;"></view>
-        <My_VerticalBox></My_VerticalBox>
-        <view style="height: 10rpx;"></view>
+    <swiper class="show-prod-list" indicator-active-color="#4DC2D4" indicator-color="#D8D8D8" indicator-dots 	snap-to-edge>
+        <swiper-item wx:for="{{prodList}}">
+            <My_VerticalBox list='{{item}}' pageType="zhanhui"></My_VerticalBox>
+        </swiper-item>
     </swiper>
-
 </My_DisplayBox>

+ 40 - 2
pages/tradeShow/index.wxss

@@ -45,6 +45,7 @@
 
 /* 盒子 */
 .exhibition {
+    position: relative;
     display: flex;
     flex-direction: column;
     width: 322rpx;
@@ -57,7 +58,22 @@
     margin-right: 10rpx;
 }
 
-.exhibition:nth-child(2n){
+/* 热门展商门牌号 */
+.showLocation {
+    position: absolute;
+    font-size: 20rpx;
+    color: #FFFFFF;
+    max-width: 120rpx;
+    height: 32rpx;
+    line-height: 32rpx;
+    background: #4DC2D4;
+    border-radius: 10rpx 0px 10rpx 0px;
+    padding: 0 10rpx;
+    top: 0;
+    left: 0;
+}
+
+.exhibition:nth-child(2n) {
     margin-right: 0;
 }
 
@@ -82,11 +98,24 @@
 }
 
 .exhibition-bottom-data {
+    display: flex;
+    align-items: center;
+    text-align: right;
+}
+
+.exhibition-bottom-data-text {
+    max-width: 110rpx;
+    margin-left: 4rpx;
     font-size: 24rpx;
-    font-weight: 500;
+    font-weight: 550;
     color: #4DC2D4;
 }
 
+.exhibition-bottom image {
+    width: 18rpx;
+    height: 18rpx;
+}
+
 /* 分类和搜索盒子 */
 .classify-and-search {
     display: flex;
@@ -134,4 +163,13 @@
 .liveSearch-icon {
     height: 100%;
     margin-left: 10rpx;
+}
+
+/* 热门展品 */
+.show-prod-list {
+    height: 600rpx;
+}
+
+.show-prod-list swiper-item {
+    height: 570rpx !important;
 }

二進制
static/icon-11.png