Browse Source

测试环境跳转问题

kevin 2 years ago
parent
commit
1b9663590c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      pages/main/index/index.vue

+ 4 - 1
pages/main/index/index.vue

@@ -4,7 +4,8 @@
       <el-card style="width: 400px" class="box-card">
         <div slot="header" class="clearfix">
           <span>基本信息</span>
-          <el-button onclick="location.href='https://www.proginn.com/rooter/main'" style="float: right; padding: 3px 0" type="text">跳转至老后台</el-button>
+          <el-button v-if="env=='dev'" onclick="location.href='https://dev.test.proginn.com/rooter/main'" style="float: right; padding: 3px 0" type="text">跳转至老后台</el-button>
+          <el-button v-else onclick="location.href='https://www.proginn.com/rooter/main'" style="float: right; padding: 3px 0" type="text">跳转至老后台</el-button>
         </div>
         <div style="display: flex;justify-content: center;align-items: center">
           <img style="width: 80px;height: 80px;border-radius: 50%" :src="tj_data.icon_url">
@@ -181,6 +182,7 @@
         to_my_total:0,
         pagesize:15,
         size:"90%",
+        env: process.env.NODE_ENV,
       }
     },
     mounted() {
@@ -189,6 +191,7 @@
       {
         this.size="90%";
       }
+      console.log(this.env);
       this.loading=true;
       this.to_my_list();
       this.my_to_list();