panhui hace 3 años
padre
commit
08c7cfe358
Se han modificado 2 ficheros con 16 adiciones y 8 borrados
  1. 1 1
      .env.development
  2. 15 7
      src/views/Discover.vue

+ 1 - 1
.env.development

@@ -1,4 +1,4 @@
-VUE_APP_BASE_URL=https://www.raex.vip/
+VUE_APP_BASE_URL=https://test.raex.vip/
 NODE_ENV=development
 VUE_APP_PUBLIC_PATH=/
 ASSETS_PATH=raex

+ 15 - 7
src/views/Discover.vue

@@ -89,13 +89,7 @@
                     <img class="grid-img" src="@assets/discover/info_icon_lvzhougongyi.png" />
                 </template>
             </van-grid-item>
-            <van-grid-item
-                text="拍卖中心"
-                :to="{
-                    path: '/auction'
-                }"
-                v-if="!$store.state.review"
-            >
+            <van-grid-item text="拍卖中心" @click="goAuction" v-if="!$store.state.review">
                 <template v-slot:icon>
                     <img class="grid-img" src="@assets/info_icon_paimaixilie.png" />
                 </template>
@@ -386,6 +380,20 @@ export default {
                 .catch(() => {
                     this.wait();
                 });
+        },
+        goAuction() {
+            this.$http
+                .get('/sysConfig/get/auction_show')
+                .then(res => {
+                    if (res.value === true || res.value === '1') {
+                        this.$router.push('/auction');
+                    } else {
+                        return Promise.reject();
+                    }
+                })
+                .catch(() => {
+                    this.wait();
+                });
         }
     },
     activated() {