Explorar el Código

修复搜索数据

bding hace 1 año
padre
commit
a80cef66c1
Se han modificado 1 ficheros con 22 adiciones y 6 borrados
  1. 22 6
      pages-search/components/report.vue

+ 22 - 6
pages-search/components/report.vue

@@ -94,7 +94,7 @@
                 <text @click.stop="themeDetails(item, val)" class="item-industry" v-for="val in item.List" :key="val.IndustrialManagementId"> # {{ val.IndustryName }} </text>
               </block>
               <block v-if="item.SpecialTags.length">
-                <text @click.stop="themeDetails(item, val)" class="item-industry" style="color: #90aeda" v-for="val in item.SpecialTags.split(',')" :key="val"> # {{ val }} </text>
+                <text class="item-industry" style="color: #90aeda" v-for="val in item.SpecialTags.split(',')" :key="val"> # {{ val }} </text>
               </block>
             </view>
           </view>
@@ -168,7 +168,7 @@
 </template>
 
 <script>
-import { Report, Reports } from "@/config/api";
+import { Report, Reports, purchaserApi } from "@/config/api";
 import videoModule from "@/components/videoModule/index";
 import modalDialog from "@/components/modalDialog.vue";
 export default {
@@ -196,6 +196,10 @@ export default {
   methods: {
     //去往文章详情页面
     goDetailReport(item) {
+      if (item.SpecialType > 0) {
+        uni.navigateTo({ url: "/pages-purchaser/noteAndViewpoint/noteAndViewpoint?id=" + item.ArticleId });
+        return;
+      }
       uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId });
     },
     /* 进入详情 校验是否有该品种权限 */
@@ -205,18 +209,30 @@ export default {
       });
     },
     //去往主题详情
-    themeDetails(item) {
+    themeDetails(item, val) {
+      if (item.SpecialType > 0) return;
+      let id = item.IndustrialManagementId > 0 ? item.IndustrialManagementId : val.IndustrialManagementId;
       if (item.Source === 1) {
         //非严选
-        uni.navigateTo({ url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId });
+        uni.navigateTo({ url: "/reportPages/IndustryReport/IndustryReport?id=" + id });
       } else {
         //严选
-        uni.navigateTo({ url: "/reportPages/researchTheme/researchTheme?id=" + item.IndustrialManagementId });
+        uni.navigateTo({ url: "/reportPages/researchTheme/researchTheme?id=" + id });
       }
     },
     //收藏
     async collectClick(item, type) {
-      const res = await Report.collectRpt({ ArticleId: item.ArticleId, PageRouter: this.$store.state.pageRouterReport });
+      //  if () {
+      //   uni.navigateTo({ url: "/pages-purchaser/noteAndViewpoint/noteAndViewpoint?id=" + item.ArticleId });
+      //   return;
+      // }
+      const res =
+        item.SpecialType > 0
+          ? await purchaserApi.yanxuanSpecialCollect({
+              Id: item.ArticleId,
+              Status: item.IsCollect ? 2 : 1,
+            })
+          : await Report.collectRpt({ ArticleId: item.ArticleId, PageRouter: this.$store.state.pageRouterReport });
       if (res.Ret === 200) {
         this.$parent.reportPageData[type].forEach((_) => {
           if (item.ArticleId === _.ArticleId) {