jwyu 3 年之前
父節點
當前提交
14ac52c3be
共有 4 個文件被更改,包括 67 次插入25 次删除
  1. 39 20
      pages-chart/allTypes.vue
  2. 1 1
      pages-chart/chartDetail.vue
  3. 10 4
      pages/chart/chart.vue
  4. 17 0
      pages/chart/component/noAuth.vue

+ 39 - 20
pages-chart/allTypes.vue

@@ -1,6 +1,6 @@
 <template>
     <view class="chart-alltype-page">
-        <van-sticky style="background: #fff">
+        <van-sticky style="background: #fff;width:100%">
             <van-search
                 shape="round"
                 :value="searchVal"
@@ -8,6 +8,7 @@
                 @change="searchValChange"
                 @search="onSearch"
                 @clear="onClearSearch"
+                style="width:100%"
             />
         </van-sticky>
         <view class="list-wrap">
@@ -62,6 +63,21 @@ export default {
     this.getList()
   },
   methods: {
+    // 搜索关键词变化
+    searchValChange(e){
+      this.searchVal=e.detail
+    },
+
+    onSearch(){
+      this.getList()
+    },
+
+    onClearSearch(){
+      this.searchVal=''
+      this.getList()
+    },
+
+
     change(e){
       this.active=e.detail
     },
@@ -91,26 +107,29 @@ export default {
 </script>
 
 <style lang="scss">
-.chart-alltype-page{
-  .van-cell__title, .van-cell__value{
-    flex: none !important;
-  }
-  .van-cell:after{
-    border: none !important;
-  }
-  .van-collapse-item__content{
-    padding: 0;
-  }
-  .van-cell__title{
-    font-size: 16px;
-    font-weight: bold;
-  }
-  .van-hairline--top:after{
-    border-top-width: 0 !important;
-  }
-  .self-wrap{
-    margin-top: 60rpx;
+.chart-alltype-page{  
+  .list-wrap{
+    .van-cell__title, .van-cell__value{
+      flex: none !important;
+    }
+    .van-cell:after{
+      border: none !important;
+    }
+    .van-collapse-item__content{
+      padding: 0;
+    }
+    .van-cell__title{
+      font-size: 16px;
+      font-weight: bold;
+    }
+    .van-hairline--top:after{
+      border-top-width: 0 !important;
+    }
+    .self-wrap{
+      margin-top: 60rpx;
+    }
   }
+  
   .list{
     .item{
       &:first-child{

+ 1 - 1
pages-chart/chartDetail.vue

@@ -11,7 +11,7 @@ export default {
         }
     },
     onLoad(options) {
-        this.url=`${h5BaseUrl}/hzyb/chart/detail?ChartInfoId=${options.chartInfoId}&token=${this.$store.state.user.token}`
+        this.url=`${h5BaseUrl}/hzyb/chart/detail?ChartInfoId=${options.chartInfoId}&token=${this.$store.state.user.token}&searchVal=${options.searchVal}&MyChartId=${options.MyChartId}&MyChartClassifyId=${options.MyChartClassifyId}`
     }
 }
 </script>

+ 10 - 4
pages/chart/chart.vue

@@ -2,7 +2,7 @@
     <page-meta :page-style="showFilter? 'overflow: hidden;' : ''" :scroll-top="pageMetaScrollTop" />
     <view class="chart-page" v-if="hasAuth">
       <van-sticky style="background: #fff">
-        <view class="flex search-wrap" id="search-wrap">
+        <view class="flex search-wrap">
             <van-search
                 shape="round"
                 :value="searchVal"
@@ -25,7 +25,7 @@
           :src="globalImgUrls.chartEmpty"
           mode="widthFix"
         />
-        <view>暂时找不到对应图,试试别的搜索词吧~</view>
+        <view>暂时找不到对应图,试试别的{{searchVal?'搜索词':'分类'}}吧~</view>
       </view>
       <view class="chart-list-wrap" v-else>
         <drag
@@ -157,7 +157,6 @@ export default {
           ClassifyId:this.selectClassifyId,
           Keywords:this.searchVal
         })
-        // console.log(res);
         if(res.code===200){
           this.hasAuth=true
           if(res.data){
@@ -215,7 +214,7 @@ export default {
       chartClick(e){
         console.log(e.detail.data);
         uni.navigateTo({
-          url:'/pages-chart/chartDetail?chartInfoId='+e.detail.data.ChartInfoId
+          url:`/pages-chart/chartDetail?chartInfoId=${e.detail.data.ChartInfoId}&searchVal=${this.searchVal}&MyChartId=${e.detail.data.MyChartId}&MyChartClassifyId=${this.selectClassifyId}`
         })
       },
 
@@ -298,6 +297,13 @@ export default {
 
       // 确认搜索 搜索图表下的都不允许拖动排序
       onSearch(){
+        if(!this.searchVal){
+          uni.showToast({
+            title:"请输入搜索关键词",
+            icon:'none'
+          })
+          return
+        }
         this.initPage()
         this.isPublic=true
         this.getList()

+ 17 - 0
pages/chart/component/noAuth.vue

@@ -8,6 +8,19 @@
             <!-- <view>{{info.name}}:{{info.mobile}}</view> -->
             <view class="global-btn-yellow-change btn" style="margin-top:30px" @click="handleCall">联系销售</view>
         </block>
+
+        <block v-if="authType==2">
+            <view style="margin-bottom:15px">您的权限已到期,暂时无法查看图库</view>
+            <view>若想继续查看请联系对口销售</view>
+            <!-- <view>{{info.name}}:{{info.mobile}}</view> -->
+            <view class="global-btn-yellow-change btn" style="margin-top:30px" @click="handleCall">联系销售</view>
+        </block>
+
+        <block v-if="authType==3">
+            <view style="margin-bottom:15px">您暂无权限查看图库</view>
+            <view>若想查看可以申请开通</view>
+            <view class="global-btn-yellow-change btn" style="margin-top:30px" @click="handleApply">立即申请</view>
+        </block>
         
   </view>
 </template>
@@ -44,6 +57,10 @@ export default {
                 success: (result) => {},
                 fail: (error) => {}
             })
+        },
+
+        handleApply(){
+            uni.navigateTo({ url: '/pages-applyPermission/applyPermission' })
         }
     }
 }