Browse Source

更新自定义配置

gang.huang 2 years ago
parent
commit
a3c6fef8e0

+ 12 - 0
.env

@@ -0,0 +1,12 @@
+# 环境
+NODE_ENV = "production"
+# 公司名称
+VUE_APP_COMPANY = "椰子"
+# 服务器地址
+VUE_APP_HOST = "https://co-data.zylife.co"
+# 账号
+VUE_APP_ACCOUNT = "91160078801200002500" 
+# 银行
+VUE_APP_BANKNAME = "上海浦东发展银行北京亚运村支行"
+#开户名
+VUE_APP_ACCOUNTNAME = "北京椰子电子商务有限责任公司"

+ 1 - 1
src/api/index.js

@@ -107,7 +107,7 @@ let requestLoading = (url, method, params) => {
 // const Prefix = 'http://dd.guozipay.com/mchsrv/index.php?';
 // const Prefix = 'http://dd.guozipay.com/mchsrv/index.php?';
 
 
 // const Prefix = 'http://192.168.1.218/mchsrv/index.php?';
 // const Prefix = 'http://192.168.1.218/mchsrv/index.php?';
-const Prefix = 'https://admin.xyzshops.cn/mchsrv/index.php?';
+const Prefix = `${process.env.VUE_APP_HOST}/mchsrv/index.php?`;
 // const Prefix = 'https://test.xyzshops.cn/mchsrv/index.php?';
 // const Prefix = 'https://test.xyzshops.cn/mchsrv/index.php?';
 
 
 // 椰子临时线上地址
 // 椰子临时线上地址

+ 3 - 1
src/pages/index.vue

@@ -3,7 +3,7 @@
     <el-header style="background-color:#545c64">
     <el-header style="background-color:#545c64">
         <el-row type="flex" style="height:100%;" justify="space-between" align="middle">
         <el-row type="flex" style="height:100%;" justify="space-between" align="middle">
             <div style="color:#fff">
             <div style="color:#fff">
-                <span class="title" style="font-size: 18px">椰子充值后台管理系统</span>
+                <span class="title" style="font-size: 18px">{{processEnv.VUE_APP_COMPANY}}充值后台管理系统</span>
             </div>
             </div>
             <div>
             <div>
                 <el-dropdown @command="onUserEdit">
                 <el-dropdown @command="onUserEdit">
@@ -92,6 +92,7 @@ export default {
     name: 'homePage',
     name: 'homePage',
     created() {
     created() {
         this.curPath = this.$route.name;
         this.curPath = this.$route.name;
+        this.processEnv = process.env;
     },
     },
     data() {
     data() {
         return {
         return {
@@ -113,6 +114,7 @@ export default {
                     trigger: "blur",
                     trigger: "blur",
                 }, ],
                 }, ],
             },
             },
+            processEnv:{}
         };
         };
     },
     },
     methods: {
     methods: {

+ 3 - 1
src/pages/login.vue

@@ -4,7 +4,7 @@
     <el-row type="flex" style="width:100%;height:100%;" justify="center" align="middle">
     <el-row type="flex" style="width:100%;height:100%;" justify="center" align="middle">
       <el-card shadow="always">
       <el-card shadow="always">
         <div slot="header" class="clearfix">
         <div slot="header" class="clearfix">
-          <span style="font-size: 18px">欢迎使用椰子充值后台管理系统</span>
+          <span style="font-size: 18px">欢迎使用{{processEnv.VUE_APP_COMPANY}}充值后台管理系统</span>
         </div>
         </div>
         <el-row type="flex" justify="center">
         <el-row type="flex" justify="center">
           <div class="login_container">
           <div class="login_container">
@@ -54,10 +54,12 @@ export default {
         pwd: [{ required: true, message: "请输入密码", trigger: "blur" }],
         pwd: [{ required: true, message: "请输入密码", trigger: "blur" }],
       },
       },
       labelPosition: "right",
       labelPosition: "right",
+      processEnv:{}
     };
     };
   },
   },
   created() {
   created() {
     console.log('登录版本2.0');
     console.log('登录版本2.0');
+    this.processEnv = process.env;
   },
   },
   methods: {
   methods: {
     /* 判断PC或移动端 */
     /* 判断PC或移动端 */

+ 4 - 2
src/pages/phoneIndex.vue

@@ -4,7 +4,7 @@
       <el-container style="height:100%">
       <el-container style="height:100%">
         <el-header style="height:120px;padding:0">
         <el-header style="height:120px;padding:0">
           <div class="hdTop">
           <div class="hdTop">
-            椰子充值后台管理系统
+            {{processEnv.VUE_APP_COMPANY}}充值后台管理系统
           </div>
           </div>
           <div class="hdBottom">
           <div class="hdBottom">
             <div @click="isCollapse=!isCollapse">
             <div @click="isCollapse=!isCollapse">
@@ -112,6 +112,7 @@ export default {
     name: 'phoneIndex',
     name: 'phoneIndex',
     created() {
     created() {
         this.phoneCurPath = this.$route.name;
         this.phoneCurPath = this.$route.name;
+        this.processEnv = process.env;
     },
     },
     data() {
     data() {
         return {
         return {
@@ -135,7 +136,8 @@ export default {
             // 手机---------
             // 手机---------
             phoneCurPath: '',
             phoneCurPath: '',
             // 导航
             // 导航
-            isCollapse: false
+            isCollapse: false,
+            processEnv:{}
         };
         };
     },
     },
     methods: {
     methods: {

+ 5 - 3
src/pages/phoneSubPages/phoneBalance.vue

@@ -5,13 +5,13 @@
         <el-col :span="24">
         <el-col :span="24">
             <el-form >
             <el-form >
                 <el-form-item label="银行账号:">
                 <el-form-item label="银行账号:">
-                  91160078801200002500 
+                 {{processEnv.VUE_APP_ACCOUNT}}
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="开户银行:">
                 <el-form-item label="开户银行:">
-                  上海浦东发展银行北京亚运村支行
+                 {{processEnv.VUE_APP_BANKNAME}}
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="开户名:">
                 <el-form-item label="开户名:">
-                  北京椰子电子商务有限责任公司
+                 {{processEnv.VUE_APP_ACCOUNTNAME}}
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="备注:">
                 <el-form-item label="备注:">
                     代收款/代付款
                     代收款/代付款
@@ -295,6 +295,7 @@ export default {
             credit_bonus: '',
             credit_bonus: '',
             // 欠款总额
             // 欠款总额
             debt: '',
             debt: '',
+            processEnv: {}
         };
         };
     },
     },
     mounted() {
     mounted() {
@@ -302,6 +303,7 @@ export default {
     created () {
     created () {
         this.getVoucherList()
         this.getVoucherList()
         this.getUserInfo()
         this.getUserInfo()
+        this.processEnv =process.env
     },
     },
     computed: {
     computed: {
         cWarningList() {
         cWarningList() {

+ 5 - 3
src/pages/phoneSubPages/phoneOrder.vue

@@ -10,7 +10,7 @@
             size="small"></el-input>
             size="small"></el-input>
         <el-input
         <el-input
             style="width:200px;margin-bottom:10px;margin-right: 10px;"
             style="width:200px;margin-bottom:10px;margin-right: 10px;"
-            placeholder="请输入椰子单号"
+            :placeholder="`请输入${processEnv.VUE_APP_COMPANY}单号`"
             v-model.trim="order_sn"
             v-model.trim="order_sn"
             clearable
             clearable
             size="small"></el-input>
             size="small"></el-input>
@@ -109,7 +109,7 @@
             </template>
             </template>
         </el-table-column>
         </el-table-column>
         <!-- <el-table-column align="center" prop="official_sn" label="批次号"></el-table-column> -->
         <!-- <el-table-column align="center" prop="official_sn" label="批次号"></el-table-column> -->
-        <el-table-column align="center" prop="order_sn" width="185" label="椰子单号"></el-table-column>
+        <el-table-column align="center" prop="order_sn" width="185" :label="processEnv.VUE_APP_COMPANY + '单号'"></el-table-column>
         <el-table-column align="center" prop="official_sn" width="250" label="官方流水号">
         <el-table-column align="center" prop="official_sn" width="250" label="官方流水号">
             <template slot-scope="{row}">
             <template slot-scope="{row}">
                 {{row.official_sn ? row.official_sn : '无'}}
                 {{row.official_sn ? row.official_sn : '无'}}
@@ -175,11 +175,13 @@ export default {
             // 充值质量
             // 充值质量
             quality: '',
             quality: '',
             // 充值质量-常量
             // 充值质量-常量
-            qualityCon
+            qualityCon,
+            processEnv:{}
         };
         };
     },
     },
     created () {
     created () {
         this.fetchData()
         this.fetchData()
+        this.processEnv = process.env;
     },
     },
     mounted() {
     mounted() {
         this.getOrderList()
         this.getOrderList()

+ 5 - 3
src/pages/subPages/balance.vue

@@ -5,13 +5,13 @@
         <el-col :span="10">
         <el-col :span="10">
             <el-form >
             <el-form >
                 <el-form-item label="银行账号:">
                 <el-form-item label="银行账号:">
-                   91160078801200002500 
+                    {{processEnv.VUE_APP_ACCOUNT}}
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="开户银行:">
                 <el-form-item label="开户银行:">
-                    上海浦东发展银行北京亚运村支行
+                    {{processEnv.VUE_APP_BANKNAME}}
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="开户名:">
                 <el-form-item label="开户名:">
-                    北京椰子电子商务有限责任公司
+                    {{processEnv.VUE_APP_ACCOUNTNAME}}
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="备注:">
                 <el-form-item label="备注:">
                     代收款/代付款
                     代收款/代付款
@@ -283,6 +283,7 @@ export default {
             credit_bonus: '',
             credit_bonus: '',
             // 欠款总额
             // 欠款总额
             debt: '',
             debt: '',
+            processEnv: {}
         };
         };
     },
     },
     mounted() {
     mounted() {
@@ -290,6 +291,7 @@ export default {
     created () {
     created () {
         this.getVoucherList()
         this.getVoucherList()
         this.getUserInfo()
         this.getUserInfo()
+        this.processEnv = process.env
     },
     },
     computed: {
     computed: {
         cWarningList() {
         cWarningList() {

+ 5 - 3
src/pages/subPages/order.vue

@@ -11,7 +11,7 @@
             clearable></el-input>
             clearable></el-input>
         <el-input
         <el-input
             style="width:200px;margin-bottom:20px;margin-right: 10px;"
             style="width:200px;margin-bottom:20px;margin-right: 10px;"
-            placeholder="请输入椰子单号"
+            :placeholder="'请输入'+processEnv.VUE_APP_COMPANY+'单号'"
             v-model.trim="order_sn"
             v-model.trim="order_sn"
             clearable></el-input>
             clearable></el-input>
         <el-input
         <el-input
@@ -103,7 +103,7 @@
             </template>
             </template>
         </el-table-column>
         </el-table-column>
         <!-- <el-table-column align="center" prop="official_sn" label="批次号"></el-table-column> -->
         <!-- <el-table-column align="center" prop="official_sn" label="批次号"></el-table-column> -->
-        <el-table-column align="right" prop="order_sn" width="185" label="椰子单号"></el-table-column>
+        <el-table-column align="right" prop="order_sn" width="185" :label="processEnv.VUE_APP_COMPANY + '单号'"></el-table-column>
         <el-table-column prop="official_sn" width="280" label="官方流水号">
         <el-table-column prop="official_sn" width="280" label="官方流水号">
             <template slot-scope="{row}">
             <template slot-scope="{row}">
                 {{row.official_sn ? row.official_sn : '无'}}
                 {{row.official_sn ? row.official_sn : '无'}}
@@ -201,11 +201,13 @@ export default {
             quality: '',
             quality: '',
             // 充值质量-常量
             // 充值质量-常量
             qualityCon,
             qualityCon,
-            str: ''
+            str: '',
+            processEnv:{}
         };
         };
     },
     },
     created () {
     created () {
         this.fetchData()
         this.fetchData()
+        this.processEnv = process.env;
     },
     },
     mounted() {
     mounted() {
         this.getOrderList()
         this.getOrderList()

+ 2 - 2
vue.config.js

@@ -27,13 +27,13 @@ module.exports = {
             // 在 dist/index.html 的输出
             // 在 dist/index.html 的输出
             filename: 'index.html',
             filename: 'index.html',
             // 当使用 title 选项时,template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
             // 当使用 title 选项时,template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
-            title: '椰子充值后台管理系统程序',
+            title: `${process.env.VUE_APP_COMPANY}充值后台管理系统程序`,
         },
         },
     },
     },
     devServer: {
     devServer: {
         open: true,
         open: true,
         // host: 'localhost',
         // host: 'localhost',
-        host: '192.168.1.6',
+        host: 'localhost',
         port: 3333,
         port: 3333,
         https: false,
         https: false,
         //以上的ip和端口是我们本机的;下面为需要跨域的
         //以上的ip和端口是我们本机的;下面为需要跨域的