xiongzhu 3 лет назад
Родитель
Сommit
39c91c13bd
3 измененных файлов с 14 добавлено и 13 удалено
  1. 1 1
      src/components/phoneCode.vue
  2. 4 3
      src/mixins/search.js
  3. 9 9
      src/views/product/SearchCorpse.vue

+ 1 - 1
src/components/phoneCode.vue

@@ -29,7 +29,7 @@ export default {
             code: ''
         };
     },
-    computed:{
+    computed: {
         ...mapState(['theme'])
     },
     watch: {

+ 4 - 3
src/mixins/search.js

@@ -16,8 +16,9 @@ export default {
     },
     methods: {
         getHistory() {
-            let historys = window.localStorage.getItem('ninthHistory') ?
-                window.localStorage.getItem('ninthHistory').split(',') : [];
+            let historys = window.localStorage.getItem('ninthHistory')
+                ? window.localStorage.getItem('ninthHistory').split(',')
+                : [];
             this.historys = historys;
         },
         addHistory(val) {
@@ -63,4 +64,4 @@ export default {
             }
         }
     }
-};
+};

+ 9 - 9
src/views/product/SearchCorpse.vue

@@ -246,7 +246,7 @@ export default {
             banners: [],
             classification: '',
             displayInformation: {},
-            rarityLabel: "",
+            rarityLabel: ''
         };
     },
     // watch: {
@@ -315,11 +315,11 @@ export default {
             this.$http
                 .get('/rarityLabel/label/' + search)
                 .then(res => {
-                    this.selectOptions = Object.values(res)
-                    if(Object.values(res).length > 0){
+                    this.selectOptions = Object.values(res);
+                    if (Object.values(res).length > 0) {
                         this.classification = true;
-                        this.rarityLabel = Object.values(res)[0].value
-                    }else{
+                        this.rarityLabel = Object.values(res)[0].value;
+                    } else {
                         this.classification = false;
                     }
                     this.getData(true);
@@ -418,10 +418,10 @@ export default {
                 this.getData(true);
             });
         },
-        changeTabOne(info){
-            this.rarityLabel = info.title
+        changeTabOne(info) {
+            this.rarityLabel = info.title;
             this.getData(true);
-            console.log("fdf",info)
+            console.log('fdf', info);
         },
         beforeData() {
             let sort = this.sort + ',' + this.sortDes;
@@ -979,4 +979,4 @@ export default {
     margin-right: 0px !important;
     // flex-grow: 1 !important;
 }
-</style>
+</style>