Forráskód Böngészése

词典取前9条英文热搜词

natasha 1 hónapja
szülő
commit
097baf4e0a

+ 1 - 1
src/components/Header.vue

@@ -118,7 +118,7 @@ export default {
         //   url: "/evaluation",
         // },
         {
-          name: "词典",
+          name: "英文词典",
           url: "/dictionary",
         },
         {

+ 10 - 2
src/views/dictionary/index.vue

@@ -92,13 +92,21 @@ export default {
     },
     // 查询系统搜索关键热词
     getHotWordList() {
+      this.hotSearchList = [];
       let MethodName = "/PaperServer/Client/Dict/QueryHotWordList";
       let data = {
-        limit: 9,
+        limit: 50,
       };
       getLogin(MethodName, data).then((res) => {
         if (res.status === 1) {
-          this.hotSearchList = res.data;
+          const regex =
+            /[\u4e00-\u9fff\u3400-\u4dbf\uf900-\ufaff\u3400-\u4d00]/;
+          res.data.forEach((item) => {
+            if (![...item].some((char) => regex.test(char))) {
+              this.hotSearchList.push(item);
+            }
+          });
+          this.hotSearchList = this.hotSearchList.slice(0, 9);
         }
       });
     },

+ 6 - 1
src/views/reporter/index.vue

@@ -11,6 +11,7 @@
             <span>{{itemo.label}}</span>
         </li>
     </ul> -->
+
     <div class="content-top">
       <img src="../../assets/reporter-logo.png" />
       <el-input placeholder="搜索" v-model="searchInput" maxlength="100">
@@ -109,7 +110,11 @@
               ></svg-icon>
               <span>{{ props.value.comment_count }}</span>
             </div>
-            <el-dropdown trigger="click" @command="handleChange">
+            <el-dropdown
+              trigger="click"
+              @command="handleChange"
+              v-if="userMessage && userMessage.is_org_manager === 'true'"
+            >
               <span class="el-dropdown-link">
                 <img src="../../assets/dropdown-icon.png" />
               </span>