lrf402788946 4 years ago
parent
commit
1e498cd9a1
2 changed files with 9 additions and 8 deletions
  1. 2 2
      components/qrcode.vue
  2. 7 6
      layout/admin/navBar/default-select.vue

+ 2 - 2
components/qrcode.vue

@@ -31,7 +31,7 @@ export default {
       if (!this.exchange) return;
       //二维码地址应该是变量,不过这里需要处理
       let uri = `${this.config.weixin.baseUrl}${this.uri}`;
-      console.log(uri);
+      // console.log(uri);
       // if (uri.startsWith('/')) {
       //   uri = `${location.protocol}//${location.host}${uri}`;
       // }
@@ -41,7 +41,7 @@ export default {
         [`/exchange/${this.exchange}/${this.qrcode}`]: this.onMessage,
       });
       console.log(`/exchange/${this.exchange}/${this.qrcode}`);
-      console.log(uri);
+      // console.log(uri);
     },
     onMessage(message) {
       console.log('receive a message: ', message.body);

+ 7 - 6
layout/admin/navBar/default-select.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="default-select">
-    <el-row type="flex" align="middle" justify="start" class="user-menu" v-loading="loading">
+    <el-row type="flex" align="middle" justify="start" class="user-menu" v-if="user" v-loading="loading">
       <el-col :span="15" v-loading="!topOptions">
         当前默认:
         <span>
@@ -120,10 +120,10 @@ export default {
           ['asc']
         );
         this.$set(this, `termList`, tlist);
-        if (termid) this.initClass('init');
+        if (termid) this.initClass();
       }
     },
-    async initClass(type) {
+    async initClass() {
       const { termid, classid, planid } = this.topOptions;
       let res;
       // 检查身份
@@ -141,7 +141,6 @@ export default {
       }
       // 检查是否是初始化,如果是初始化(由上级来),需要检查classid是不是在这里,不在就清除掉
       const r = this.classList.find(f => f._id === classid);
-      console.log(r);
       if (!r) this.toClear('classid');
       if (this.needInit) {
         this.checkToday();
@@ -160,8 +159,9 @@ export default {
       }
       sessionStorage.setItem('needInit', false);
     },
-    toClear(type) {
-      this.topOptions.classid = undefined;
+    toClear() {
+      this.$set(this.topOptions, `classid`, undefined);
+
       // this.$set(this, `topOptions`, _.omit(this.topOptions, type));
     },
     // setVuexOpt() {
@@ -177,6 +177,7 @@ export default {
     topOptions: {
       deep: true,
       handler(val, oval) {
+        console.log(val, oval);
         this.changeOpt(val);
       },
     },