xiebaomin 1 năm trước cách đây
mục cha
commit
e00ec56b7d

+ 1 - 1
pages/login/components/activeTeamCom.vue

@@ -1,6 +1,6 @@
 <template>
     <view class="growth-module">
-        <view v-if="active === 1" class="cell-1" @click="playVideo">
+        <view v-if="active === 2" class="cell-1" @click="playVideo">
             <view class="image">
                 <image :src="module.headAppBanner" mode=""></image>
             </view>

+ 2 - 2
pages/login/components/growthCommunity.vue

@@ -4,7 +4,7 @@
         <view class="negotiation">
             <view class="enterprise">
                 <view class="title">美业企谈</view>
-                <view class="more" @click="handlerMore(1)">更多 ></view>
+                <view class="more" @click="handlerMore(2)">更多 ></view>
                 <view class="container">
                     <scroll-view
                         scroll-x="true"
@@ -35,7 +35,7 @@
             <view class="item-dots"><page-dots :pageAll="videoList.length" :isActive="isVideo" @hanlder-click="hanlderVideoClick" /></view>
             <view class="enterprise">
                 <view class="title">采美资讯</view>
-                <view class="more" @click="handlerMore(2)">更多 ></view>
+                <view class="more" @click="handlerMore(3)">更多 ></view>
                 <view class="container">
                     <scroll-view
                         scroll-x="true"

+ 26 - 12
pages/login/supplier_more.vue

@@ -6,12 +6,12 @@
         </view>
         <view class="container">
             <view class="tabs">
-                <view class="tab" :class="active === i.id ? 'active' : ''" v-for="i in activeTabs" :key="i.id" @click="handlerTabs(i)">
+                <view class="tab" :class="params.type === i.id ? 'active' : ''" v-for="i in activeTabs" :key="i.id" @click="handlerTabs(i)">
                     {{ i.title }}
                 </view>
             </view>
             <view class="growth-module-list">
-                <active-team-com v-for="i in dataList" :key="i.id" :module="i" :active="active" @playVideo="playVideo"/>
+                <active-team-com v-for="i in dataList" :key="i.id" :module="i" :active="params.type" @playVideo="playVideo"/>
             </view>
         </view>
         <cm-video :show="showVideo" @closeClick="closeVideo" :videoObj="videoObj" />
@@ -64,24 +64,36 @@ export default {
             isActive: 6,
             activeTabs: [
                 {
-                    id: 1,
+                    id: 2,
                     title: '美业企谈'
                 },
                 {
-                    id: 2,
+                    id: 3,
                     title: '干货知识'
                 }
             ],
-            active: 1,
             dataList: [],
             showVideo: false,
-            videoObj: {}
+            videoObj: {},
+            params: {
+                pageSize: 10,
+                pageNum: 1,
+                type: 2,
+                source: 2
+            },
+            hasNextPage: false
         }
     },
     onLoad (option) {
         this.handlerInit()
-        this.active = Number(option.active)
-        this.getSupplierLanding(this.active)
+        this.params.type = Number(option.active)
+        this.getSupplierLanding(this.params.type)
+    },
+    onPullDownRefresh() {
+        if (this.hasNextPage) {
+            this.getSupplierLanding(this.params.type)
+        }
+        uni.stopPullDownRefresh()
     },
     methods: {
         // 滚动事件
@@ -96,13 +108,15 @@ export default {
             this.$refs['login-menu'].isActive = 6
         },
         handlerTabs ($event) {
-            this.active = $event.id
-            this.getSupplierLanding(this.active)
+            this.params.type = $event.id
+            this.params.pageNum = 1
+            this.dataList = []
+            this.getSupplierLanding(this.params.type)
         },
         async getSupplierLanding(active) {
             try {
-                const { data } = await this.UserService.supplierLoading({ source: 2 })
-                this.dataList = active === 1 ? data.landing.filter(e => e.type == '2') : data.landing.filter(e => e.type == '3')
+                const { data } = await this.UserService.supplierMoreList(this.params)
+                this.dataList = [...this.dataList, ...data.list]
             } catch (error) {
                 console.log(error)
             }

+ 10 - 0
services/user.service.js

@@ -1013,5 +1013,15 @@ export default class UserService {
             data,
             isLoading: true
         })
+    }
+    /**
+     * 落地页更多列表
+     */
+    supplierMoreList(data = {}) {
+        return this.AjaxService.get({
+            url: '/user/landing/shopTypeInfo',
+            data,
+            isLoading: true
+        })
     }
 }