tianyunperfect 11 maanden geleden
bovenliggende
commit
d474e99551
1 gewijzigde bestanden met toevoegingen van 7 en 1 verwijderingen
  1. 7 1
      simple-demo/send_memos.html

+ 7 - 1
simple-demo/send_memos.html

@@ -204,7 +204,7 @@
 <!--异步请求示例:requestUtil.sync('https://jsonplaceholder.typicode.com/posts/1', 'post', data, headers) .then(data => console.log(data))-->
 <script>
     if (getQueryString("id") !== "tianyunperfect") {
-        location.href = "http://127.0.0.1";
+        // location.href = "http://127.0.0.1";
     }
     let authStr = "bearer eyJhbGciOiJIUzI1NiIsImtpZCI6InYxIiwidHlwIjoiSldUIn0.eyJuYW1lIjoidGlhbnl1bnBlcmZlY3QiLCJpc3MiOiJtZW1vcyIsInN1YiI6IjEiLCJhdWQiOlsidXNlci5hY2Nlc3MtdG9rZW4iXSwiaWF0IjoxNzA5MTc5NTUyfQ.LFxWB4efya1sL7VoJ42xpXxbAip-udT_Kx2OwZ8Y3-E";
     let myHeaders = {
@@ -237,6 +237,12 @@
         },
         watch: {
             tagChecked: function () {
+                if (!getQueryString("duoxuan")) {
+                    if (this.tagChecked.length > 1) {
+                        // 保留最后一个
+                        this.tagChecked = [this.tagChecked[this.tagChecked.length - 1]];
+                    }
+                }
                 localStorage.setItem('tags', JSON.stringify(this.tagChecked));
                 this.search();
             },