瀏覽代碼

添加商家区分

dujingxian 4 年之前
父節點
當前提交
3fd7146e33

+ 0 - 58
src/components/HelloWorld.vue

@@ -1,58 +0,0 @@
-<template>
-  <div class="hello">
-    <h1>{{ msg }}</h1>
-    <p>
-      For a guide and recipes on how to configure / customize this project,<br>
-      check out the
-      <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
-    </p>
-    <h3>Installed CLI Plugins</h3>
-    <ul>
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
-    </ul>
-    <h3>Essential Links</h3>
-    <ul>
-      <li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
-      <li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
-      <li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
-      <li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
-      <li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
-    </ul>
-    <h3>Ecosystem</h3>
-    <ul>
-      <li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
-      <li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
-      <li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
-      <li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
-      <li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
-    </ul>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'HelloWorld',
-  props: {
-    msg: String
-  }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped>
-h3 {
-  margin: 40px 0 0;
-}
-ul {
-  list-style-type: none;
-  padding: 0;
-}
-li {
-  display: inline-block;
-  margin: 0 10px;
-}
-a {
-  color: #42b983;
-}
-</style>

+ 4 - 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">{{UserInfo.name}}后台管理系统</span>
             </div>
             </div>
             <div>
             <div>
                 <el-dropdown @command="onUserEdit">
                 <el-dropdown @command="onUserEdit">
@@ -88,6 +88,8 @@ import {
     editPwd
     editPwd
 } from "@/api";
 } from "@/api";
 import { removeUser } from '@/utils/auth'
 import { removeUser } from '@/utils/auth'
+// 商家区分
+import UserInfo from '@/utils/userInfo'
 export default {
 export default {
     name: 'homePage',
     name: 'homePage',
     created() {
     created() {
@@ -113,6 +115,7 @@ export default {
                     trigger: "blur",
                     trigger: "blur",
                 }, ],
                 }, ],
             },
             },
+            UserInfo
         };
         };
     },
     },
     methods: {
     methods: {

+ 8 - 25
src/pages/login.vue

@@ -1,10 +1,11 @@
 <template>
 <template>
-  <!-- <el-container :style="'height:100%;background:url('+LoginBg+');background-size:cover;'"> -->
+  <!-- <el-container :style="'background:url('+LoginBg+');background-size:cover;background-position: center;'"> -->
   <el-container>
   <el-container>
     <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 style="width:400px;height:300px;" shadow="always">
       <el-card style="width:400px;height:300px;" shadow="always">
         <div slot="header" class="clearfix">
         <div slot="header" class="clearfix">
-          <span style="font-size: 18px">欢迎使用椰子充值后台管理系统</span>
+          <!-- <span style="font-size: 18px">欢迎使用椰子充值后台管理系统</span> -->
+          <span style="font-size: 18px">欢迎使用{{UserInfo.name}}后台管理系统</span>
         </div>
         </div>
         <el-row type="flex" justify="center">
         <el-row type="flex" justify="center">
           <div class="login_container">
           <div class="login_container">
@@ -38,12 +39,16 @@
 <script>
 <script>
 // import LoginBg from "@/assets/login.jpg";
 // import LoginBg from "@/assets/login.jpg";
 const LoginBg = require('../assets/login.jpg');
 const LoginBg = require('../assets/login.jpg');
+// 商家区分
+import UserInfo from '@/utils/userInfo'
 import { login } from "@/api";
 import { login } from "@/api";
 import { setUser } from '@/utils/auth'
 import { setUser } from '@/utils/auth'
 export default {
 export default {
+  name: 'login',
   data() {
   data() {
     return {
     return {
       LoginBg,
       LoginBg,
+      UserInfo,
       ruleForm: {
       ruleForm: {
         name: "",
         name: "",
         pwd: "",
         pwd: "",
@@ -56,7 +61,7 @@ export default {
     };
     };
   },
   },
   created() {
   created() {
-    console.log('登录版本1.0');
+    console.log('登录版本2.0');
   },
   },
   methods: {
   methods: {
     onLogin(formName) {
     onLogin(formName) {
@@ -83,28 +88,6 @@ export default {
               this.$router.replace({ path: "/" });
               this.$router.replace({ path: "/" });
             }
             }
           });
           });
-
-          // var data = new URLSearchParams();
-          // data.append('name', this.ruleForm.name);
-          // data.append('password', this.ruleForm.pwd);
-          // this.$axios({
-          //   methods: 'post',
-          //   url: 'http://192.168.1.195/mobile/index.php?act=merchant_login&op=login&client_type=ajax',
-          //   data: {
-          //     name: this.ruleForm.name,
-          //     password: this.ruleForm.pwd
-          //   },
-          //   headers: {
-          //     "Content-Type": "application/x-www-form-urlencoded"
-          //   },
-          //   // data,
-          //   withCredentials: true,
-          //   timeout: 120000,
-          // })
-          // .then((res) => {
-          //   console.log('登录', res);
-          // })
-          
         }
         }
       });
       });
     },
     },

+ 8 - 0
src/pages/subPages/interfaceDoc.vue

@@ -176,6 +176,14 @@ pre {
   line-height: 32px; /*no */
   line-height: 32px; /*no */
   font-size: 16px; /*no */
   font-size: 16px; /*no */
   font-family: "Microsoft YaHei";
   font-family: "Microsoft YaHei";
+  white-space: pre-wrap;       /* css-3 */
+  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;      /* Opera 4-6 */
+  white-space: -o-pre-wrap;    /* Opera 7 */
+  word-wrap: break-word;       /* Internet Explorer 5.5+ */
+  overflow: auto;
+  word-break: break-all;
+  word-wrap: break-word;
 }
 }
 </style>
 </style>
 <style>
 <style>

+ 1 - 0
src/pages/subPages/order.vue

@@ -161,6 +161,7 @@ export default {
     },
     },
     mounted() {
     mounted() {
         this.getOrderList()
         this.getOrderList()
+        this.queryList()
     },
     },
     // 监听器
     // 监听器
     watch: {
     watch: {

+ 9 - 0
src/utils/userInfo.js

@@ -0,0 +1,9 @@
+// const userInfo = {
+//   name: '琳珠网络',
+// }
+
+const userInfo = {
+  name: '椰子充值',
+}
+
+export default userInfo

+ 8 - 4
vue.config.js

@@ -19,8 +19,7 @@ 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: '椰子充值后台管理系统程序'
+            title: '椰子充值后台管理系统程序',
         },
         },
     },
     },
     devServer: {
     devServer: {
@@ -53,6 +52,11 @@ module.exports = {
         //   remUnit: 192
         //   remUnit: 192
           remUnit: 210
           remUnit: 210
         });
         });
-    }
-
+    },
+    // 打包去掉console.log
+    // configureWebpack: (config) => {
+    //     if (process.env.NODE_ENV === 'production') {
+    //      config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
+    //     }
+    // }
 }
 }