Procházet zdrojové kódy

1、资源商城、技能培训、咨询服务:一级筛选滑动优化,空数据优化,分类筛选弹窗优化;2、完成咨询服务列表;

huan-jie před 4 roky
rodič
revize
ab6a0eabfb

+ 22 - 0
assets/css/common.css

@@ -275,3 +275,25 @@ img {
   border:1px solid #ddd
 }
 
+/* common empty */
+.result-empty-wrapper {
+  width: 100%;
+  height: 320px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  background: #ffffff;
+}
+.result-empty-wrapper img {
+  width: 154px;
+  height: 154px;
+}
+.result-empty-wrapper span {
+  margin-top: -20px;
+  height: 20px;
+  line-height: 20px;
+  font-size: 14px;
+  font-family: PingFangSC, PingFangSC-Regular;
+  color: #999999;
+}

+ 200 - 69
assets/css/consult/list.scss

@@ -229,6 +229,7 @@
                 }
                 .consult-info {
                     width: 100%;
+                    max-height: 47px;
                     margin-top: 24px;
                     overflow: hidden;
                     .consult-info-item {
@@ -291,33 +292,125 @@
     // min-height: 100vh;
     display: flex;
     flex-direction: column;
-    .filter-wrapper {
+    .consult-category {
         position: fixed;
         width: 100%;
-        height: 45px;
-        background: #ffffff;
-        box-shadow: 0px 6px 16px 0px rgba(6,10,28,0.06);
+        height: 87px;
         z-index: 11;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        span {
-            height: 18px;
-            line-height: 18px;
-            font-size: 13px;
-            font-family: PingFangSC, PingFangSC-Regular;
-            font-weight: 400;
-            color: #222222;
+        .consult-category-one {
+            position: relative;
+            width: 100%;
+            height: 45px;
+            background: #ffffff;
+            overflow: hidden;
+            .category-scroller {
+                width: calc(100% - 64px);
+                overflow-x: scroll;
+                overflow-y: hidden;
+                -webkit-overflow-scrolling: touch;
+                display: flex;
+                &::-webkit-scrollbar {
+                    display: none;
+                }
+            }
+            .consult-category-one-item {
+                position: relative;
+                flex-shrink: 0;
+                width: 76px;
+                height: 45px;
+                line-height: 45px;
+                font-size: 16px;
+                font-family: PingFangSC, PingFangSC-Regular;
+                font-weight: 400;
+                color: #666666;
+                font-size: 15px;
+                text-align: center;
+                &.active {
+                    font-family: PingFangSC, PingFangSC-Semibold;
+                    font-weight: 600;
+                    color: #222222;
+                    &:after {
+                        position: absolute;
+                        content: " ";
+                        bottom: 0;
+                        left: calc(50% - 7.5px);
+                        width: 15px;
+                        height: 3px;
+                        background: #308eff;
+                        border-radius: 2px;
+                    }
+                }
+            }
+            .filter-wrapper {
+                position: absolute;
+                top: 0;
+                right: 0;
+                width: 64px;
+                height: 45px;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                z-index: 12;
+                background: #ffffff;
+                img {
+                    width: 24px;
+                    height: 24px;
+                }
+            }
+            .filter-bg {
+                position: absolute;
+                width: 11px;
+                height: 29px;
+                right: 59px;
+                top: 8px;
+                opacity: 0.1;
+                background: #000000;
+                border-radius: 6px;
+                filter: blur(4px);
+                z-index: 11;
+            }
         }
-        img {
-            width: 10px;
-            height: 9px;
+        .consult-category-two {
+            position: relative;
+            width: 100%;
+            height: 42px;
+            background: #ffffff;
+            .consult-category-two-wrapper {
+                position: relative;
+                width: 100%;
+                height: 42px;
+                padding: 0 20px;
+                overflow-x: scroll;
+                overflow-y: hidden;
+                -webkit-overflow-scrolling: touch;
+                display: flex;
+                &::-webkit-scrollbar {
+                    display: none;
+                }
+                .consult-category-two-item {
+                    position: relative;
+                    flex-shrink: 0;
+                    height: 42px;
+                    line-height: 42px;
+                    margin-right: 20px;
+                    font-size: 14px;
+                    font-family: PingFangSC, PingFangSC-Regular;
+                    font-weight: 400;
+                    color: #666666;
+                    &:last-child {
+                        margin-right: 0;
+                    }
+                    &.active {
+                        color: #308eff;
+                    }
+                }
+            }
         }
     }
     .consult-list {
         width: 100%;
         height: 100vh;
-        padding-top: 45px;
+        padding-top: 87px;
         padding-bottom: 34px;
         overflow-x: hidden;
         overflow-y: auto;
@@ -330,8 +423,10 @@
             height: auto;
             overflow: visible;
             .consult-item {
+                position: relative;
                 width: calc(100% - 20px);
-                height: 290px;
+                height: 210px;
+                padding: 13px 10px 16px;
                 margin: 10px auto 0;
                 background: #ffffff;
                 overflow: hidden;
@@ -339,68 +434,104 @@
                 box-shadow: 0px 6px 16px 0px rgba(6,10,28,0.06); 
                 display: flex;
                 flex-direction: column;
-                .cover {
-                    width: 100%;
-                    height: 175px;
-                    overflow: hidden;
-                    object-fit: scale-down;
-                }
-                .owner-wrapper {
+                .owner-content {
                     width: 100%;
-                    height: 22px;
-                    margin-top: 10px;
-                    padding: 0 10px;
+                    height: 90px;
                     display: flex;
-                    align-items: center;
                     .avatar {
-                        width: 22px;
-                        height: 22px;
-                        overflow: hidden;
-                        border-radius: 50%;
+                        flex-shrink: 0;
+                        width: 90px;
+                        height: 90px;
+                        border-radius: 6px;
                     }
-                    .nickname {
-                        line-height: 22px;
-                        margin-left: 6px;
-                        font-size: 14px;
-                        font-family: PingFangSC, PingFangSC-Regular;
-                        font-weight: 400;
-                        color: #666666;
+                    .owner-info {
+                        margin-left: 11px;
+                        flex: 1;
+                        .nickname {
+                            width: 100%;
+                            height: 25px;
+                            line-height: 25px;
+                            font-size: 18px;
+                            font-family: PingFangSC, PingFangSC-Semibold;
+                            font-weight: 600;
+                            color: #222222;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;
+                        }
+                        .company {
+                            width: 100%;
+                            height: 16px;
+                            line-height: 16px;
+                            margin-top: 2px;
+                            font-size: 11px;
+                            font-family: PingFangSC, PingFangSC-Regular;
+                            font-weight: 400;
+                            color: #999999;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;
+                        }
+                        .price {
+                            height: 18px;
+                            line-height: 18px;
+                            margin-top: 6px;
+                            font-size: 14px;
+                            font-family: PingFangSC, PingFangSC-Semibold;
+                            font-weight: 600;
+                            color: #ff6600;
+                            span {
+                                margin-left: 2px;
+                                line-height: 18px;
+                                font-size: 12px;
+                                font-family: PingFangSC, PingFangSC-Regular;
+                                font-weight: 400;
+                                color: #999999;
+                            }
+                        }
                     }
                 }
-                .title {
+                .consult-info {
                     width: 100%;
-                    height: 20px;
-                    margin-top: 12px;
-                    padding: 0 12px;
-                    line-height: 20px;
-                    font-size: 15px;
-                    font-family: PingFangSC, PingFangSC-Medium;
-                    font-weight: 500;
-                    color: #333333;
+                    max-height: 43px;
+                    margin-top: 16px;
                     overflow: hidden;
-                    text-overflow: ellipsis;
-                    white-space: nowrap;
+                    .consult-info-item {
+                        width: 100%;
+                        height: 18px;
+                        line-height: 18px;
+                        margin-bottom: 7px;
+                        font-size: 13px;
+                        font-family: PingFangSC, PingFangSC-Medium;
+                        font-weight: 500;
+                        color: #333333;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                        &:nth-last-child(1) {
+                            margin-bottom: 0;
+                        }
+                    }
                 }
-                .price-wrapper {
-                    width: 100%;
-                    height: 20px;
-                    margin-top: 16px;
-                    padding: 0 12px;
+                .stats-info {
+                    position: absolute;
+                    bottom: 16px;
+                    left: 10px;
                     display: flex;
                     align-items: center;
-                    justify-content: space-between;
-                    .price-text {
-                        line-height: 20px;
-                        font-size: 19px;
-                        font-family: DINAlternate, DINAlternate-Bold;
-                        font-weight: 700;
-                        color: #ff6600;
+                    height: 17px;
+                    line-height: 17px;
+                    font-size: 12px;
+                    font-family: PingFangSC, PingFangSC-Regular;
+                    color: #999999;
+                    .num, .rate {
+                        color: #308eff;
                     }
-                    .right-info {
-                        font-size: 14px;
-                        font-family: PingFangSC, PingFangSC-Regular;
-                        font-weight: 400;
-                        color: #999999;
+                    .line {
+                        width: 1px;
+                        height: 13px;
+                        margin: 0 15px;
+                        background: rgba(151,151,151,0.6);
                     }
                 }
             }

+ 10 - 7
assets/css/skill/list.scss

@@ -261,14 +261,17 @@
             position: relative;
             width: 100%;
             height: 45px;
-            padding-right: 64px;
             background: #ffffff;
-            overflow-x: scroll;
-            overflow-y: hidden;
-            -webkit-overflow-scrolling: touch;
-            display: flex;
-            &::-webkit-scrollbar {
-                display: none;
+            overflow: hidden;
+            .category-scroller {
+                width: calc(100% - 64px);
+                overflow-x: scroll;
+                overflow-y: hidden;
+                -webkit-overflow-scrolling: touch;
+                display: flex;
+                &::-webkit-scrollbar {
+                    display: none;
+                }
             }
             .skill-category-one-item {
                 position: relative;

+ 10 - 7
assets/css/work_down/index.scss

@@ -301,14 +301,17 @@
             position: relative;
             width: 100%;
             height: 45px;
-            padding-right: 64px;
             background: #ffffff;
-            overflow-x: scroll;
-            overflow-y: hidden;
-            -webkit-overflow-scrolling: touch;
-            display: flex;
-            &::-webkit-scrollbar {
-                display: none;
+            overflow: hidden;
+            .category-scroller {
+                width: calc(100% - 64px);
+                overflow-x: scroll;
+                overflow-y: hidden;
+                -webkit-overflow-scrolling: touch;
+                display: flex;
+                &::-webkit-scrollbar {
+                    display: none;
+                }
             }
             .works-category-one-item {
                 position: relative;

+ 16 - 5
components/consult/dealSeoList.js

@@ -113,7 +113,7 @@ export default class DealSeoData {
             sale_zx_open: 1,
             cate_id_two_zx: this.pagination.selectedCateIdTwo || ''
         }
-
+        // todo:接口地址测试
         let res = await this.$axios.$post('https://dev.test.proginn.com/api/user_list/list', data)
         let consultList = []
 
@@ -121,6 +121,15 @@ export default class DealSeoData {
         if (Number(res.status) === 1) {
             consultList = res.data.list || []
             consultList = consultList.map(item => {
+                let zxRating = item.zx_rating || ''
+                let zxRatingText = ''
+                if (zxRating >= 0.7) {
+                    zxRatingText = '高'
+                } else if (zxRating >= 0.3) {
+                    zxRatingText = '一般'
+                } else {
+                    zxRatingText = '较慢'
+                }
                 return {
                     uid: item.uid || '',
                     nickname: item.nickname || '',
@@ -129,8 +138,9 @@ export default class DealSeoData {
                     company: item.company || '',
                     title: item.title || '',
                     saleList: item.sale_list || [],
-                    zxTotalNum: item.zx_total_num || '',
-                    zxRating: item.zx_rating || ''
+                    zxTotalNum: item.zx_total_num || 0,
+                    zxRating: item.zx_rating || '',
+                    zxPriceMin: item.zx_price_min || '0.00'
                 }
             })
             // consultList.forEach((item) => {
@@ -143,7 +153,8 @@ export default class DealSeoData {
             this.pagination.pageCount = res.data.pages
             // this.pagination.pagesize = res.data.page_size || 9
 
-            if (this.pagination.page * this.pagination.pagesize >= this.pagination.total) {
+            // 当前页码 大于等于 页面总数:已加载所有数据
+            if (this.pagination.page >= this.pagination.pageCount) {
                 this.pagination.noMore = true
             } else {
                 this.pagination.noMore = false
@@ -155,7 +166,7 @@ export default class DealSeoData {
   
     dealThisMeta() {
         let head = {
-            title: "技能培训列表",
+            title: "咨询服务列表",
             keyword: "",
             description: "",
             h1: "",

+ 2 - 2
components/skill/dealSeoList.js

@@ -119,8 +119,8 @@ export default class DealSeoData {
                 imageList.splice(0, 1)
                 item.imageList = imageList
             })
-            this.pagination.total = res.data.total
-            this.pagination.pagesize = res.data.page_size || 9
+            this.pagination.total = Number(res.data.total)
+            this.pagination.pagesize = Number(res.data.page_size) || 9
 
             if (this.pagination.page * this.pagination.pagesize >= this.pagination.total) {
                 this.pagination.noMore = true

+ 166 - 43
pages/frontend/consult/list.vue

@@ -49,18 +49,18 @@
                 </div>
             </div>
             <div class="consult-content">
-                <div class="consult-list-wrapper">
+                <div class="consult-list-wrapper" v-if="consultList.length">
                     <a
                         class="consult-item"
                         v-for="item in consultList"
                         :key="item.uid"
-                        href="">
+                        :href="`/frontend/consult/detail/${item.uid}`">
                         <div class="owner-info">
                             <img :src="item.avatar" class="avatar" alt="avatar">
                             <div class="owner-content">
                                 <div class="nickname">{{ item.nickname }}</div>
                                 <div class="company">{{ item.company }} {{ item.title }}</div>
-                                <div class="price">¥<span>起</span></div>
+                                <div class="price">¥{{ item.zxPriceMin }}<span>起</span></div>
                             </div>
                         </div>
                         <div class="consult-info">
@@ -72,28 +72,82 @@
                             </div>
                         </div>
                         <div class="stats-info">
-                            <div><span class="num">{{ item.zxTotalNum }}</span> 人咨询过</div>
-                            <div class="line"></div>
-                            <div>响应率:<span class="rate">高</span></div>
+                            <div v-if="item.zxTotalNum"><span class="num">{{ item.zxTotalNum }}</span> 人咨询过</div>
+                            <div v-if="item.zxTotalNum && item.zxRating" class="line"></div>
+                            <div v-if="item.zxRating">响应率:<span class="rate">高</span></div>
                         </div>
                     </a>
                 </div>
-                <div class="pagination-wrapper" v-if="pagination.total > pagination.pagesize">
+                <div class="result-empty-wrapper" v-else>
+                    <img src="@/assets/img/common/empty@2x.png" alt="empty">
+                    <span>暂无搜索内容</span>
+                </div>
+                <div class="pagination-wrapper" v-if="pagination.pageCount > 1">
                     <el-pagination
                         background
                         layout="prev, pager, next"
                         :current-page="pagination.page"
-                        :total="pagination.total"
-                        :page-size="pagination.pagesize"
+                        :page-count="pagination.pageCount"
                         @current-change="handlePageChange">
                     </el-pagination>
                 </div>
             </div>
         </div>
         <div class="consult-wrapper-mobile" v-else>
-            <div class="filter-wrapper" @click="handleClickFilter">
-                <span>筛选</span>
-                <img src="@/assets/img/skill/arrow-down@2x.png" alt="arrow">
+            <div class="consult-category">
+                <div class="consult-category-one">
+                    <div class="category-scroller">
+                        <div
+                            class="consult-category-one-item"
+                            :class="!pagination.selectedCateIdOne ? 'active' : ''"
+                            @click="handleClickCategoryOne(0)">
+                            全部
+                        </div>
+                        <div
+                            class="consult-category-one-item"
+                            :class="pagination.selectedCateIdOne == category.value ? 'active' : ''"
+                            v-for="(category) in consultCate"
+                            :key="`category-one-${category.value}`"
+                            @click="handleClickCategoryOne(category.value)">
+                            {{ category.label }}
+                        </div>
+                    </div>
+                    <!-- filter -->
+                    <div class="filter-bg"></div>
+                    <div class="filter-wrapper" @click="handleShowCategoryDrawer">
+                        <img src="@/assets/img/works/filter-icon@2x.png" alt="filter">
+                    </div>
+                </div>
+                <div class="consult-category-two">
+                    <!-- 全部二级分类 -->
+                    <div
+                        class="consult-category-two-wrapper"
+                        v-show="!pagination.selectedCateIdOne">
+                        <div
+                            class="consult-category-two-item"
+                            :class="pagination.selectedCateIdTwo == category.value ? 'active' : ''"
+                            v-for="category in consultCateAll"
+                            :key="`category-all-${category.value}`"
+                            @click="handleClickCategoryTwo(category.value)">
+                            {{ category.label }}
+                        </div>
+                    </div>
+                    <!-- 接口返回的二级分类 -->
+                    <div
+                        class="consult-category-two-wrapper"
+                        v-for="(category) in consultCate"
+                        :key="`category-two-wrapper-${category.value}`"
+                        v-show="pagination.selectedCateIdOne === category.value">
+                        <div
+                            class="consult-category-two-item"
+                            :class="pagination.selectedCateIdTwo == categoryChild.value ? 'active' : ''"
+                            v-for="categoryChild in category.children"
+                            :key="`category-two-${categoryChild.value}`"
+                            @click="handleClickCategoryTwo(categoryChild.value)">
+                            {{ categoryChild.label }}
+                        </div>
+                    </div>
+                </div>
             </div>
             <div class="consult-list" :class="showWxHeader ? 'consult-list__showWxHeader' : ''">
                 <ul
@@ -101,24 +155,40 @@
                     v-infinite-scroll="handleLoadMoreConsult"
                     :infinite-scroll-disabled="pagination.noMore"
                     :infinite-scroll-immediate="false">
-                    <a
+                    <div
                         class="consult-item"
                         v-for="item in consultList"
-                        :key="item.sale_id"
-                        :href="`/frontend/consult/detail/${item.sale_id}`">
-                        <img class="cover" :src="item.coverImage" alt="consultCover,cover">
-                        <div class="owner-wrapper">
-                            <img class="avatar" :src="item.user.icon_url" alt="avatar">
-                            <div class="nickname">{{ item.user.nickname }}</div>
+                        :key="item.uid"
+                        @click="handleClickConsultItem(item.uid)">
+                        <div class="owner-content">
+                            <img class="avatar" :src="item.avatar" alt="avatar">
+                            <div class="owner-info">
+                                <div class="nickname">{{ item.nickname }}</div>
+                                <div class="company">{{ item.company }} {{ item.title }}</div>
+                                <div class="price">¥{{ item.zxPriceMin }}<span>起</span></div>
+                            </div>
+                        </div>
+                        <div class="consult-info">
+                            <div
+                                class="consult-info-item"
+                                v-for="(consultItem, index) in item.saleList"
+                                :key="index">
+                                · {{ consultItem.title }}
+                            </div>
                         </div>
-                        <div class="title">{{ item.title }}</div>
-                        <div class="price-wrapper">
-                            <div class="price-text">¥{{ item.price }}</div>
-                            <div class="right-info">{{ item.buy_num }}人已学习</div>
+                        <div class="stats-info">
+                            <div v-if="item.zxTotalNum"><span class="num">{{ item.zxTotalNum }}</span> 人咨询过</div>
+                            <div v-if="item.zxTotalNum && item.zxRating" class="line"></div>
+                            <div v-if="item.zxRating">响应率:<span class="rate">高</span></div>
                         </div>
-                    </a>
+                    </div>
+                    <!-- 空数据 -->
+                    <div class="result-empty-wrapper" v-if="!consultList.length && !pagination.loading">
+                        <img src="@/assets/img/common/empty@2x.png" alt="empty">
+                        <span>暂无搜索内容</span>
+                    </div>
                     <p v-if="pagination.loading" class="consult-list-tips">加载中...</p>
-                    <p v-if="pagination.noMore" class="consult-list-tips">没有更多了</p>
+                    <p v-if="consultList.length && pagination.noMore" class="consult-list-tips">没有更多了</p>
                 </ul>
             </div>
             <!-- 弹出的分类选择 -->
@@ -257,25 +327,39 @@ export default {
         _getConsultList () {
             const self = this
             const data = {
-                type: 1,
                 page: this.pagination.page,
-                page_size: this.pagination.pagesize,
-                cate_id: this.pagination.selectedCateIdTwo,
-                status: 2,
-                owner_type: 1
+                sale_zx_open: 1,
+                cate_id_two_zx: this.pagination.selectedCateIdTwo || ''
             }
 
             this.pagination.loading = true
             this.pagination.noMore = false
 
-            this.$axios.$post('/api/sale/saleList', data).then(res => {
+            this.$axios.$post('https://dev.test.proginn.com/api/user_list/list', data).then(res => {
                 if (Number(res.status) === 1) {
                     let consultList = res.data.list || []
-                    consultList.forEach((item) => {
-                        let imageList = item.image.split(',')
-                        item.coverImage = imageList[0] || ''
-                        imageList.splice(0, 1)
-                        item.imageList = imageList
+                    consultList = consultList.map(item => {
+                        let zxRating = item.zx_rating || ''
+                        let zxRatingText = ''
+                        if (zxRating >= 0.7) {
+                            zxRatingText = '高'
+                        } else if (zxRating >= 0.3) {
+                            zxRatingText = '一般'
+                        } else {
+                            zxRatingText = '较慢'
+                        }
+                        return {
+                            uid: item.uid || '',
+                            nickname: item.nickname || '',
+                            avatar: item.icon_url || '',
+                            lineStatus: item.lineStatus || '',
+                            company: item.company || '',
+                            title: item.title || '',
+                            saleList: item.sale_list || [],
+                            zxTotalNum: item.zx_total_num || 0,
+                            zxRating: item.zx_rating || '',
+                            zxPriceMin: item.zx_price_min || '0.00'
+                        }
                     })
 
                     if (self.mobile) {
@@ -284,15 +368,17 @@ export default {
                         self.consultList = consultList
                     }
 
-                    self.pagination.total = res.data.total
-                    self.pagination.pagesize = res.data.page_size || 9
-                    if (self.pagination.page * self.pagination.pagesize >= self.pagination.total) {
-                        console.log('noMore true', self.pagination)
-                        self.pagination.noMore = true
+                    this.pagination.total = res.data.total
+                    this.pagination.pageCount = res.data.pages
+                    // 当前页码 大于等于 页面总数:已加载所有数据
+                    if (this.pagination.page >= this.pagination.pageCount) {
+                        this.pagination.noMore = true
                     } else {
-                        console.log('noMore false', self.pagination)
-                        self.pagination.noMore = false
+                        this.pagination.noMore = false
                     }
+                } else {
+                    // 查询错误时
+                    this.pagination.noMore = true
                 }
             }).then(() => {
                 self.pagination.loading = false
@@ -329,10 +415,30 @@ export default {
          * 点击 mobile 分类 drawer 一级分类
          */
         handleClickDrawerCategoryOne (id) {
+            console.log(id)
+            if (id === 0) {
+                this.showCategoryDrawer = false
+                return
+            }
             if (id !== this.currentDrawerCategoryIndex) {
                 this.currentDrawerCategoryIndex = id
             }
         },
+        /** 点击二级分类时:移动端 */
+        handleClickCategoryTwo (id) {
+            if (this.pagination.selectedCateIdTwo === id) {
+                this.pagination.selectedCateIdTwo = ''
+                this.currentDrawerCategoryId = ''
+            } else {
+                this.pagination.selectedCateIdTwo = id
+                this.currentDrawerCategoryId = id
+            }
+            this.pagination.page = 1
+            this.consultList = []
+            window.scroll({ top: 0 })
+
+            this._getConsultList()
+        },
         /**
          * 点击 mobile 分类 drawer 二级分类
          */
@@ -349,6 +455,23 @@ export default {
             window.scroll({ top: 0 })
 
             this._getConsultList()
+        },
+        /** 点击筛选时 */
+        handleShowCategoryDrawer () {
+            this.showCategoryDrawer = true
+        },
+        /**
+         * 点击 mobile 的一项咨询服务时
+         */
+        handleClickConsultItem (uid) {
+            if (this.deviceType.android || this.deviceType.ios) {
+                // 端跳转
+                let jumpUrl = `${this.baseUrl}/frontend/consult/detail/${uid}`
+                location.href = `proginn://webview?url=${jumpUrl}`
+            } else {
+                // web 跳转
+                location.href = `/frontend/consult/detail/${uid}`
+            }
         }
     }
 }

+ 30 - 15
pages/frontend/skill/list.vue

@@ -49,7 +49,7 @@
                 </div>
             </div>
             <div class="skill-content">
-                <div class="skill-list-wrapper">
+                <div class="skill-list-wrapper" v-if="skillList.length">
                     <div
                         class="skill-item"
                         v-for="item in skillList"
@@ -68,6 +68,10 @@
                         </div>
                     </div>
                 </div>
+                <div class="result-empty-wrapper" v-else>
+                    <img src="@/assets/img/common/empty@2x.png" alt="empty">
+                    <span>暂无搜索内容</span>
+                </div>
                 <div class="pagination-wrapper" v-if="pagination.total > pagination.pagesize">
                     <el-pagination
                         background
@@ -83,19 +87,21 @@
         <div class="skill-wrapper-mobile" v-else>
             <div class="skill-category">
                 <div class="skill-category-one">
-                    <div
-                        class="skill-category-one-item"
-                        :class="!pagination.selectedCateIdOne ? 'active' : ''"
-                        @click="handleClickCategoryOne(0)">
-                        全部
-                    </div>
-                    <div
-                        class="skill-category-one-item"
-                        :class="pagination.selectedCateIdOne == category.value ? 'active' : ''"
-                        v-for="(category) in skillCate"
-                        :key="`category-one-${category.value}`"
-                        @click="handleClickCategoryOne(category.value)">
-                        {{ category.label }}
+                    <div class="category-scroller">
+                        <div
+                            class="skill-category-one-item"
+                            :class="!pagination.selectedCateIdOne ? 'active' : ''"
+                            @click="handleClickCategoryOne(0)">
+                            全部
+                        </div>
+                        <div
+                            class="skill-category-one-item"
+                            :class="pagination.selectedCateIdOne == category.value ? 'active' : ''"
+                            v-for="(category) in skillCate"
+                            :key="`category-one-${category.value}`"
+                            @click="handleClickCategoryOne(category.value)">
+                            {{ category.label }}
+                        </div>
                     </div>
                     <!-- filter -->
                     <div class="filter-bg"></div>
@@ -156,8 +162,13 @@
                             <div class="right-info">{{ item.buy_num }}人已学习</div>
                         </div>
                     </div>
+                    <!-- 空数据 -->
+                    <div class="result-empty-wrapper" v-if="!skillList.length && !pagination.loading">
+                        <img src="@/assets/img/common/empty@2x.png" alt="empty">
+                        <span>暂无搜索内容</span>
+                    </div>
                     <p v-if="pagination.loading" class="skill-list-tips">加载中...</p>
-                    <p v-if="pagination.noMore" class="skill-list-tips">没有更多了</p>
+                    <p v-if="skillList.length && pagination.noMore" class="skill-list-tips">没有更多了</p>
                 </ul>
             </div>
             <!-- 弹出的分类选择 -->
@@ -383,6 +394,10 @@ export default {
          * 点击 mobile 分类 drawer 一级分类
          */
         handleClickDrawerCategoryOne (id) {
+            if (id === 0) {
+                this.showCategoryDrawer = false
+                return
+            }
             if (id !== this.currentDrawerCategoryIndex) {
                 this.currentDrawerCategoryIndex = id
             }

+ 26 - 15
pages/work_down/index.vue

@@ -58,7 +58,7 @@
                     </div>
                 </div>
             </div>
-            <div class="works-list" v-loading="loadingWorksList">
+            <div class="works-list" v-if="worksList.length" v-loading="loadingWorksList">
                 <div
                     class="works-item"
                     v-for="works in worksList"
@@ -90,6 +90,10 @@
                     </a>
                 </div>
             </div>
+            <div class="result-empty-wrapper" v-else>
+                    <img src="@/assets/img/common/empty@2x.png" alt="empty">
+                    <span>暂无搜索内容</span>
+                </div>
             <div class="pagination-wrapper" v-if="pagination.total > pagination.pagesize">
                 <el-pagination
                     background
@@ -104,19 +108,21 @@
         <div class="works-wrapper-mobile" v-else>
             <div class="works-category">
                 <div class="works-category-one">
-                    <div
-                        class="works-category-one-item"
-                        :class="currentCategoryIndex === 0 ? 'active' : ''"
-                        @click="handleClickCategoryOne(0)">
-                        全部
-                    </div>
-                    <div
-                        class="works-category-one-item"
-                        :class="currentCategoryIndex === index + 1 ? 'active' : ''"
-                        v-for="(category, index) in categoryList"
-                        :key="`category-one-${category.category_id}`"
-                        @click="handleClickCategoryOne(index + 1)">
-                        {{ category.name }}
+                    <div class="category-scroller">
+                        <div
+                            class="works-category-one-item"
+                            :class="currentCategoryIndex === 0 ? 'active' : ''"
+                            @click="handleClickCategoryOne(0)">
+                            全部
+                        </div>
+                        <div
+                            class="works-category-one-item"
+                            :class="currentCategoryIndex === index + 1 ? 'active' : ''"
+                            v-for="(category, index) in categoryList"
+                            :key="`category-one-${category.category_id}`"
+                            @click="handleClickCategoryOne(index + 1)">
+                            {{ category.name }}
+                        </div>
                     </div>
                     <!-- filter -->
                     <div class="filter-bg"></div>
@@ -178,8 +184,13 @@
                             </div>
                         </div>
                     </div>
+                    <!-- 空数据 -->
+                    <div class="result-empty-wrapper" v-if="!worksList.length && !pagination.loading">
+                        <img src="@/assets/img/common/empty@2x.png" alt="empty">
+                        <span>暂无搜索内容</span>
+                    </div>
                     <p v-if="pagination.loading" class="works-list-tips">加载中...</p>
-                    <p v-if="pagination.noMore && !firstLoad" class="works-list-tips">没有更多了</p>
+                    <p v-if="worksList.length && pagination.noMore && !firstLoad" class="works-list-tips">没有更多了</p>
                 </ul>
             </div>
             <!-- 弹出的分类选择 -->