Browse Source

12.8 隐藏作者

bding 1 year ago
parent
commit
dd28576157

+ 5 - 0
src/api/modules/rai/YanXuanApi.js

@@ -41,6 +41,11 @@ const YanXuanApi = {
   getYanxuanSpecialFans: (params) => {
   getYanxuanSpecialFans: (params) => {
     return http.get("/cygx/yanxuan_special/special_author_fans_list", params);
     return http.get("/cygx/yanxuan_special/special_author_fans_list", params);
   },
   },
+  // 作者管理栏按钮是否展示接口
+  getYanxuanShowButton: (params) => {
+    return http.get("/cygx/yanxuan_special/show_button", params);
+  },
+  
 };
 };
 
 
 export default YanXuanApi;
 export default YanXuanApi;

+ 1 - 1
src/views/rai_manage/reportManage/components/collectFansDlg.vue

@@ -64,7 +64,7 @@ export default {
               SpecialId: this.collectFansDlgItem.Id,
               SpecialId: this.collectFansDlgItem.Id,
             })
             })
           : await raiInterface.getYanxuanSpecialFans({
           : await raiInterface.getYanxuanSpecialFans({
-              SpecialAuthorId: this.UserId,
+              SpecialAuthorId: this.collectFansDlgItem.Id,
             });
             });
       if (res.Ret === 200) {
       if (res.Ret === 200) {
         this.tableData = res.Data.List || [];
         this.tableData = res.Data.List || [];

+ 19 - 6
src/views/rai_manage/reportManage/yanXuanSpecial.vue

@@ -19,7 +19,7 @@
             <el-option
             <el-option
               v-for="item in [
               v-for="item in [
                 { label: '笔记', value: 1 },
                 { label: '笔记', value: 1 },
-                { label: '观点', value: 0 },
+                { label: '观点', value: 2 },
               ]"
               ]"
               :label="item.label"
               :label="item.label"
               :key="item.value"
               :key="item.value"
@@ -34,7 +34,7 @@
       </template>
       </template>
       <div v-else style="margin-bottom: 20px; display: flex; justify-content: space-between">
       <div v-else style="margin-bottom: 20px; display: flex; justify-content: space-between">
         <div>
         <div>
-          <el-select placeholder="作者状态" clearable v-model="authorStatus" @change="conditionChange">
+          <el-select style="margin-right: 20px" placeholder="作者状态" clearable v-model="authorStatus" @change="conditionChange">
             <el-option
             <el-option
               v-for="item in [
               v-for="item in [
                 { label: '启用', value: 1 },
                 { label: '启用', value: 1 },
@@ -45,7 +45,7 @@
               :value="item.value"
               :value="item.value"
             />
             />
           </el-select>
           </el-select>
-          <el-input @value="authorColumnValueHandler" v-model="authorColumnValue" placeholder="请输入专栏名称" clearable style="display: inline-block; width: 240px">
+          <el-input @input="authorColumnValueHandler" v-model="authorColumnValue" placeholder="请输入专栏名称" clearable style="display: inline-block; width: 240px">
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
           </el-input>
           </el-input>
         </div>
         </div>
@@ -144,13 +144,12 @@ export default {
       collectFansDlgText: "",
       collectFansDlgText: "",
       collectFansDlgItem: {},
       collectFansDlgItem: {},
       addAuthorDlgVisible: false,
       addAuthorDlgVisible: false,
+      topLableList: [],
     };
     };
   },
   },
   computed: {
   computed: {
     // 头部lable
     // 头部lable
-    topLableList() {
-      return TopLableList;
-    },
+
     // 文章的状态
     // 文章的状态
     reportStutsList() {
     reportStutsList() {
       return ReportStutsList;
       return ReportStutsList;
@@ -163,6 +162,7 @@ export default {
     },
     },
   },
   },
   mounted() {
   mounted() {
+    this.getYanxuanShowButton();
     this.getyanxuanReportSpecial();
     this.getyanxuanReportSpecial();
   },
   },
   methods: {
   methods: {
@@ -307,6 +307,19 @@ export default {
       this.page_no = 1;
       this.page_no = 1;
       this.getyanxuanReportSpecial();
       this.getyanxuanReportSpecial();
     },
     },
+    // 隐藏作者按钮
+    async getYanxuanShowButton() {
+      const res = await raiInterface.getYanxuanShowButton();
+      if (res.Ret === 200) {
+        console.log(TopLableList);
+        let { IsShowSpecialAuthor } = res.Data;
+        if (IsShowSpecialAuthor) {
+          this.topLableList = TopLableList;
+        } else {
+          this.topLableList = [TopLableList[0]];
+        }
+      }
+    },
   },
   },
 };
 };
 </script>
 </script>