bding 1 year ago
parent
commit
1bb7b5953b
2 changed files with 38 additions and 28 deletions
  1. 35 24
      pageMy/myCollection/myCollection.vue
  2. 3 4
      pages-purchaser/columnDetail/columnDetail.vue

+ 35 - 24
pageMy/myCollection/myCollection.vue

@@ -27,15 +27,16 @@
               <text> {{ item.NickName }}</text>
             </view>
           </blok>
-          <view class="item-title" :class="item.CategoryId==0?'yan-xuan-tag':''" @click="goDetailReport(item)">
-							{{item.Title}}
-							<text @click.stop="themeDetails(item, val)" class="item-industry" v-for="val in item.List" :key="val.IndustrialManagementId">
-							  # {{ val.IndustryName }}
-							</text>
+          <view class="item-title" :class="item.CategoryId == 0 ? 'yan-xuan-tag' : ''" @click="goDetailReport(item)">
+            {{ item.Title }}
+            <block v-if="item.SpecialTags && item.IsSpecial == 1">
+              <text style="color: #90aeda" v-for="it in item.SpecialTags.split(',')" class="item-industry" :key="it">#{{ it }}</text>
+            </block>
+            <text @click.stop="themeDetails(item, val)" class="item-industry" v-for="val in item.List" :key="val.IndustrialManagementId"> # {{ val.IndustryName }} </text>
           </view>
           <view class="item-more">
             <text>{{ item.PublishDate }}</text>
-            <view class="pv-ollect" v-if="item.Source == 2">
+            <view class="pv-ollect" v-if="item.Source == 2 || item.IsSpecial == 1">
               <view>
                 <image class="pv" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
                 {{ item.Pv }}
@@ -61,7 +62,7 @@
 </template>
 
 <script>
-import { Mine, Report, Home, User, Chart } from "@/config/api.js";
+import { Mine, Report, Home, User, Chart,purchaserApi  } from "@/config/api.js";
 import RoadshowItem from "@/components/ItemComponent/roadshowItem.vue";
 import freeCharge from "@/components/freeCharge";
 import ChartItem from "@/components/ItemComponent/chartItem.vue";
@@ -147,6 +148,10 @@ export default {
     },
     // 去往文章详情页面
     goDetailReport(item) {
+      if (item.IsSpecial == 1) {
+        uni.navigateTo({ url: "/pages-purchaser/noteAndViewpoint/noteAndViewpoint?id=" + item.ArticleId });
+        return;
+      }
       if (item.IsRoadShow) {
         //跳转路演精华
         uni.navigateTo({
@@ -170,7 +175,13 @@ export default {
 
     // 收藏
     async collectClick(item) {
-      const res = await Report.collectRpt({ ArticleId: item.ArticleId });
+      const res =
+        item.IsSpecial == 1
+          ? await purchaserApi.yanxuanSpecialCollect({
+              Id: item.ArticleId,
+              Status: item.IsCollect ? 2 : 1,
+            })
+          : await Report.collectRpt({ ArticleId: item.ArticleId });
       if (res.Ret === 200) {
         item.IsCollect = !item.IsCollect;
         item.IsCollect
@@ -312,28 +323,28 @@ export default {
       padding: 35rpx 20rpx 0;
       .item-title {
         font-weight: 500;
-				position: relative;
+        position: relative;
         .item-industry {
-					text-indent: 0;
+          text-indent: 0;
           margin-left: 10rpx;
           color: #3385ff;
           display: inline-block;
         }
       }
-			.yan-xuan-tag{
-				text-indent: 82rpx;
-				&::before {
-				  content: "";
-				  position: absolute;
-				  top: 5rpx;
-					background-image: url(https://hzstatic.hzinsights.com/cygx/icon/Research_normal.png);
-					background-size: 100% 100%;
-					background-repeat: no-repeat;
-				  left: 0;
-				  width: 73rpx;
-				  height: 30rpx;
-				}
-			}
+      .yan-xuan-tag {
+        text-indent: 82rpx;
+        &::before {
+          content: "";
+          position: absolute;
+          top: 5rpx;
+          background-image: url(https://hzstatic.hzinsights.com/cygx/icon/Research_normal.png);
+          background-size: 100% 100%;
+          background-repeat: no-repeat;
+          left: 0;
+          width: 73rpx;
+          height: 30rpx;
+        }
+      }
       .item-user {
         display: flex;
         align-items: center;

+ 3 - 4
pages-purchaser/columnDetail/columnDetail.vue

@@ -15,7 +15,7 @@
             <view class="img-box">
               <image :src="authorDetail.HeadImg"></image>
             </view>
-            <view class="set-btn" @click="followAuthor">{{ authorDetail.Status == 1 ? "取消关注" : "+ 关注" }}</view>
+            <view class="set-btn" @click="followAuthor">{{ authorDetail.IsFollow == 1 ? "取消关注" : "+ 关注" }}</view>
           </view>
           <view class="name-box" :style="{ color: scrollTopNumber == 0 ? '#fff' : '#333' }">
             <text>{{ authorDetail.SpecialName }}</text>
@@ -92,14 +92,13 @@ export default {
     },
     // 点击关注作者
     async followAuthor() {
-      let Status = this.authorDetail.Status == 1 ? 2 : 1;
+      let Status = this.authorDetail.IsFollow == 1 ? 2 : 1;
       const res = await purchaserApi.yanxuanSpecialFollow({
         FollowUserId: this.authorDetail.UserId,
         Status,
       });
       if (res.Ret === 200) {
-        console.log(res);
-        this.authorDetail.Status = Status;
+        this.authorDetail.IsFollow = Status;
       }
     },
     // 左上角的返回按钮