jwyu 3 éve
szülő
commit
43e518a54c

+ 11 - 4
pages-activity/detail.vue

@@ -25,7 +25,7 @@
                 <text>{{ info.city }}</text>
             </view>
         </view>
-        <view class="intro-wrap">{{ info.reportName?info.reportName:info.activityName }}</view>
+        <view class="intro-wrap">{{ info.reportName?info.reportName.split('】')[1]:info.activityName }}</view>
         
 
         <!-- 音频 -->
@@ -125,6 +125,7 @@ import {
     apiActivityRegister,
     apiActivityCancelRegister
 } from "@/api/activity";
+import {baseApiUrl} from '@/utils/config.js'
 export default {
     name: "ActivityDetail",
     filters:{
@@ -157,8 +158,14 @@ export default {
         this.getAudios()
     },
     onShareAppMessage() {
-        let title=this.info.reportName||this.info.activityName
-        let imgUrl=this.info.firstActivityTypeId==1?this.globalImgUrls.reportDetailShareImg:this.globalImgUrls.reportDetailShareImgSL
+        let title=''
+        if(this.info.firstActivityTypeId==1){
+            title=this.info.reportName.split('】')[1]||this.info.activityName
+        }else{
+            title=this.info.activityName
+        }
+        
+        let imgUrl=baseApiUrl+'/activity/getActivityShareImg?activity_id='+this.id
 
         return {
             title: title,
@@ -271,7 +278,7 @@ export default {
         // 跳转webview 打开报告
         handleOpenReport() {
             uni.navigateTo({
-                url: "/pages/webView",
+                url: "/pages-activity/reportDetail",
                 success:(res)=>{
                     res.eventChannel.emit('webUrl', { url:  this.info.reportLink})
                 }

+ 1 - 4
pages/webView.vue → pages-activity/reportDetail.vue

@@ -10,6 +10,7 @@ export default {
         }
     },
     onLoad(options){
+
         const eventChannel = this.getOpenerEventChannel()
         eventChannel.on('webUrl', (data)=> {
             this.url=`${data.url}&token=${this.$store.state.user.token}`
@@ -17,7 +18,3 @@ export default {
     }
 }
 </script>
-
-<style>
-
-</style>

+ 11 - 10
pages.json

@@ -36,12 +36,6 @@
 			"style":{
 				"navigationBarTitleText":"绑定联系方式"
 			}
-		},
-		{
-			"path":"pages/webView",
-			"style":{
-				"navigationBarTitleText":"报告详情"
-			}
 		}
 	],
 	"subPackages":[
@@ -52,13 +46,19 @@
 				{
 					"path":"detail",
 					"style":{
-						"navigationBarTitleText":"活动详情"
+						"navigationBarTitleText":"报告及活动详情"
 					}
 				},
 				{
 					"path":"noAuthority",
 					"style":{
-						"navigationBarTitleText":"活动详情"
+						"navigationBarTitleText":"报告及活动详情"
+					}
+				},
+				{
+					"path": "reportDetail",
+					"style":{
+						"navigationBarTitleText": "报告详情"
 					}
 				}
 			]
@@ -126,7 +126,7 @@
 			},
 			{
 				"pagePath": "pages/activity/activity",
-				"text": "活动",
+				"text": "报告及活动",
 				"iconPath": "./static/tabbar/activity.png",
 				"selectedIconPath": "./static/tabbar/activity-s.png"
 			},
@@ -157,7 +157,8 @@
 			"van-tab": "/wxcomponents/vant/tab/index",
   		"van-tabs": "/wxcomponents/vant/tabs/index",
 			"van-count-down": "/wxcomponents/vant/count-down/index",
-			"van-empty": "/wxcomponents/vant/empty/index"
+			"van-empty": "/wxcomponents/vant/empty/index",
+			"van-checkbox": "/wxcomponents/vant/checkbox/index"
 		}
 	}
 }

+ 52 - 4
pages/activity/activity.vue

@@ -15,13 +15,23 @@
                 <view
                     :class="['tab-item', tabActive === '1' && 'tab-active']"
                     data-type="1"
-                    >线上会议</view>
+                    >报告及线上会议</view>
                 <view
                     :class="['tab-item', tabActive === '3' && 'tab-active']"
                     data-type="3"
                     >线下沙龙</view>
             </view>
             <view class="flex status-wrap" @click="statusChange">
+                <van-checkbox 
+                    class="auth-box" 
+                    shape="square" 
+                    :value="onlySeeAuth" 
+                    @change="handleAuthChange"
+                    checked-color="#D5AD79"
+                    icon-size="16px"
+                >
+                    <view class="text">只看有权限</view>
+                </van-checkbox>
                 <view
                     :class="[
                         'status-item',
@@ -123,7 +133,7 @@ import {
     apiActivityRegister,
     apiActivityCancelRegister
 } from '@/api/activity'
-import {apiApplyPermission} from '@/api/user'
+import {apiApplyPermission,apiUserInfo} from '@/api/user'
 export default {
     watch: {
       'pupData.show':{
@@ -139,6 +149,7 @@ export default {
           }
       }
     },
+    
     data() {
         return {
             searchVal: '',
@@ -155,11 +166,13 @@ export default {
                 content:'',//弹窗html字符串
                 type:'',
                 mobile:"",
-            }
+            },
+
+            onlySeeAuth:false,// 是否只看有权限的
         }
     },
     onLoad() {
-        this.getList()
+        this.init()
         this.addEventListenerRemind()
         this.addEventListenerRegister()
     },
@@ -196,6 +209,24 @@ export default {
     },
 
     methods: {
+        async init(){
+            let userInfoRes=this.userInfo
+            if(!this.userInfo.status){
+                const res=await apiUserInfo()
+                if(res.code===200){
+                    userInfoRes=res.data
+                }
+            }
+            if(['正式','试用','永续'].includes(userInfoRes.status)){
+                this.onlySeeAuth=true
+            }
+            this.getList()
+        },
+
+        handleAuthChange(e){
+            this.onlySeeAuth=e.detail
+        },
+
         // 切换tabbar页面时 整个刷新
         allRefresh(){
             this.tabActive= '1'
@@ -510,6 +541,14 @@ export default {
 .status-wrap {
     background-color: $global-bg-color;
     padding: 40rpx 34rpx 20rpx 34rpx;
+    overflow-x: scroll;
+    width: 100%;
+    margin-right: 34rpx;
+    align-items: center;
+    &::-webkit-scrollbar{
+        width: 0;
+        display: none;
+    }
     .status-item {
         font-size: $global-font-size-sm;
         color: #444;
@@ -519,11 +558,20 @@ export default {
         border-radius: 40rpx;
         background-color: #f6f6f6;
         margin-right: 40rpx;
+        height: 60rpx;
     }
     .status-active {
         background: linear-gradient(270deg, #efc896 0%, #d9a35f 100%);
         color: $global-bg-color;
     }
+    .auth-box{
+        margin-right: 40rpx;
+        .text{
+            color: $global-text-color-main;
+            font-size: $global-font-size-sm;
+            width: 120rpx;
+        }
+    }
 }
 
 .list {

+ 2 - 38
store/modules/user.js

@@ -1,5 +1,5 @@
 import { apiUserInfo, apiUserTabBar } from "@/api/user";
-
+import {defaultTabBarListConfig} from '@/utils/config.js'
 const token = uni.getStorageSync("token") || "";
 let lastTabbarList=[]//上次请求的tabbar数据
 const userModules = {
@@ -26,43 +26,7 @@ const userModules = {
 			if(lastTabbarList.toString()===data.toString()) return
 			lastTabbarList=data
 			// 默认的tabbar数据
-			let defaultTabBarList = [
-				{
-					key: "activity",
-					pagePath: "pages/activity/activity",
-					text: "活动",
-					iconPath: "../static/tabbar/activity.png",
-					selectedIconPath: "../static/tabbar/activity-s.png",
-				},
-				{
-					key: "report",
-					pagePath: "pages/report/report",
-					text: "报告",
-					iconPath: "../static/tabbar/report.png",
-					selectedIconPath: "../static/tabbar/report-s.png",
-				},
-				{
-					key: "buy",
-					pagePath: "pages/buy/buy",
-					text: "已购",
-					iconPath: "../static/tabbar/buy.png",
-					selectedIconPath: "../static/tabbar/buy-s.png",
-				},
-				{
-					key: "chart",
-					pagePath: "pages/chart/chart",
-					text: "图库",
-					iconPath: "../static/tabbar/chart.png",
-					selectedIconPath: "../static/tabbar/chart-s.png",
-				},
-				{
-					key: "user",
-					pagePath: "pages/user/user",
-					text: "我的",
-					iconPath: "../static/tabbar/user.png",
-					selectedIconPath: "../static/tabbar/user-s.png",
-				},
-			];
+			let defaultTabBarList = defaultTabBarListConfig;
 			let arr=defaultTabBarList.filter(item=>{
 				if(data.some(e=>e===item.key)){
 					return item

+ 41 - 5
utils/config.js

@@ -11,20 +11,56 @@ if(env.envVersion==='develop'){//开发
     baseApiUrl='https://yanbao.hzinsights.com'
 }
 
-
-
 // 配置图片资源 https://hzstatic.hzinsights.com/static/icon/hzyb/
 const globalImgUrls={
-    reportDetailShareImg:'https://hzstatic.hzinsights.com/static/icon/hzyb/reportdetail_share.png',//电话会分享图片
-    reportDetailShareImgSL:'https://hzstatic.hzinsights.com/static/icon/hzyb/reportdetail_share_sl.png',//线下分享图片
     activityNoAuth:'https://hzstatic.hzinsights.com/static/icon/hzyb/activity_no_auth.png',
     imgSuccess:'https://hzstatic.hzinsights.com/static/icon/hzyb/success_icon.png',
     loginTop:'https://hzstatic.hzinsights.com/static/icon/hzyb/login_top_img.png',
     idCardExp:'https://hzstatic.hzinsights.com/static/icon/hzyb/idcard_exp.jpg'
 }
 
+// 默认tabbar数据
+const defaultTabBarListConfig=[
+    {
+        key: "activity",
+        pagePath: "pages/activity/activity",
+        text: "报告及活动",
+        iconPath: "../static/tabbar/activity.png",
+        selectedIconPath: "../static/tabbar/activity-s.png",
+    },
+    {
+        key: "report",
+        pagePath: "pages/report/report",
+        text: "报告",
+        iconPath: "../static/tabbar/report.png",
+        selectedIconPath: "../static/tabbar/report-s.png",
+    },
+    {
+        key: "buy",
+        pagePath: "pages/buy/buy",
+        text: "已购",
+        iconPath: "../static/tabbar/buy.png",
+        selectedIconPath: "../static/tabbar/buy-s.png",
+    },
+    {
+        key: "chart",
+        pagePath: "pages/chart/chart",
+        text: "图库",
+        iconPath: "../static/tabbar/chart.png",
+        selectedIconPath: "../static/tabbar/chart-s.png",
+    },
+    {
+        key: "user",
+        pagePath: "pages/user/user",
+        text: "我的",
+        iconPath: "../static/tabbar/user.png",
+        selectedIconPath: "../static/tabbar/user-s.png",
+    }
+]
+
 
 module.exports={
     baseApiUrl,
-    globalImgUrls
+    globalImgUrls,
+    defaultTabBarListConfig
 }