dusenyao 3 роки тому
батько
коміт
944d03de07

BIN
src/assets/pay/active.png


BIN
src/assets/pay/shouxinyi.png


+ 8 - 4
src/layouts/components/LayoutHeader.vue

@@ -220,10 +220,14 @@ export default {
       });
     }
     this.getLangList();
-    setInterval(() => {
-      IsExistMyMessage_NotRead().then(({ is_exist }) => {
-        this.isNotRead = JSON.parse(is_exist);
-      });
+    let interval = setInterval(() => {
+      IsExistMyMessage_NotRead()
+        .then(({ is_exist }) => {
+          this.isNotRead = JSON.parse(is_exist);
+        })
+        .catch(() => {
+          clearInterval(interval);
+        });
     }, 10000);
   },
   methods: {

+ 10 - 1
src/views/course_details/index.vue

@@ -81,7 +81,11 @@
                     <span class="price_1" v-text="changePrice('1', item.book_price)"></span>
                     <span class="price_2" v-text="changePrice('2', item.book_price)"></span>
                   </span>
-                  <button v-if="!readonly" :class="['get', is_buy ? 'acquired' : '']">
+                  <button
+                    v-if="!readonly"
+                    :class="['get', is_buy ? 'acquired' : '']"
+                    @click="goBook"
+                  >
                     {{ is_buy ? '已' : '' }}购买
                   </button>
                 </div>
@@ -393,6 +397,11 @@ export default {
     SelectShowEvent(num) {
       this.SelectShow = num;
     },
+    goBook() {
+      if (!this.is_buy) {
+        window.location.href = `/GCLS-Book/#/EnterSys`;
+      }
+    },
     // 处理价格
     changePrice(type, item) {
       if (item) {