Jelajahi Sumber

🐛修改搜索大小写问题-mobile

shaogen1995 2 tahun lalu
induk
melakukan
e50104a80e

+ 2 - 1
webM/src/views/Layout/index.vue

@@ -338,7 +338,8 @@ export default {
       this.meanPage = false;
     },
     searcBtn() {
-      this.$router.push(`/Layout/Search/${this.txt ? this.txt : "null"}`);
+
+      this.$router.push(`/Layout/Search/${this.txt ? this.txt : "null"}`).catch(()=>{});
       this.searcShow = false;
     },
     menaSonFu(index, path) {

+ 5 - 2
webM/src/views/Search/About.vue

@@ -45,7 +45,10 @@ export default {
       } else {
         let temp = [];
         temp = About.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {
@@ -93,7 +96,7 @@ export default {
       font-size: 16px;
     }
     & > p {
-      color: #6A6A6A;
+      color: #6a6a6a;
       font-size: 14px;
       line-height: 16px;
       display: -webkit-box;

+ 1 - 1
webM/src/views/Search/All.vue

@@ -50,7 +50,7 @@ export default {
       } else {
         let temp = [];
         temp = dataAll.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (v.h3.toLowerCase()).includes(txt.toLowerCase()) || (v.p.toLowerCase()).includes(txt.toLowerCase());
         });
         //
         temp = temp.map((v) => {

+ 4 - 1
webM/src/views/Search/Collections.vue

@@ -50,7 +50,10 @@ export default {
       } else {
         let temp = [];
         temp = Collections.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {

+ 4 - 1
webM/src/views/Search/Employment.vue

@@ -50,7 +50,10 @@ export default {
       } else {
         let temp = [];
         temp = Employment.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {

+ 4 - 1
webM/src/views/Search/Events.vue

@@ -50,7 +50,10 @@ export default {
       } else {
         let temp = [];
         temp = Events.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {

+ 5 - 2
webM/src/views/Search/Exhibitions.vue

@@ -50,7 +50,10 @@ export default {
       } else {
         let temp = [];
         temp = Exhibitions.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {
@@ -114,7 +117,7 @@ export default {
       & > p {
         line-height: 16px;
         font-size: 14px;
-        color: #6A6A6A;
+        color: #6a6a6a;
         display: -webkit-box;
         overflow: hidden;
         white-space: normal !important;

+ 4 - 1
webM/src/views/Search/Join.vue

@@ -50,7 +50,10 @@ export default {
       } else {
         let temp = [];
         temp = Join.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {

+ 6 - 3
webM/src/views/Search/Learn.vue

@@ -3,7 +3,7 @@
   <div class="SearchLearn" v-else>
     <div
       class="row"
-      v-for="(item) in data"
+      v-for="item in data"
       :key="item.id"
       @click="skip(item.path)"
     >
@@ -50,7 +50,10 @@ export default {
       } else {
         let temp = [];
         temp = LearnEngage.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {
@@ -116,7 +119,7 @@ export default {
       & > p {
         line-height: 16px;
         font-size: 14px;
-        color: #6A6A6A;
+        color: #6a6a6a;
         display: -webkit-box;
         overflow: hidden;
         white-space: normal !important;

+ 4 - 1
webM/src/views/Search/Research.vue

@@ -50,7 +50,10 @@ export default {
       } else {
         let temp = [];
         temp = Publications.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {

+ 4 - 1
webM/src/views/Search/Terms.vue

@@ -50,7 +50,10 @@ export default {
       } else {
         let temp = [];
         temp = Terms.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {

+ 5 - 2
webM/src/views/Search/Visit.vue

@@ -45,7 +45,10 @@ export default {
       } else {
         let temp = [];
         temp = Visit.filter((v) => {
-          return v.h3.includes(txt) || v.p.includes(txt);
+          return (
+            v.h3.toLowerCase().includes(txt.toLowerCase()) ||
+            v.p.toLowerCase().includes(txt.toLowerCase())
+          );
         });
         //
         temp = temp.map((v) => {
@@ -93,7 +96,7 @@ export default {
       font-size: 16px;
     }
     & > p {
-      color: #6A6A6A;
+      color: #6a6a6a;
       font-size: 14px;
       line-height: 16px;
       display: -webkit-box;