瀏覽代碼

temp save

liujq 4 年之前
父節點
當前提交
5b8c8b84c2
共有 4 個文件被更改,包括 23 次插入23 次删除
  1. 11 11
      src/router/index.js
  2. 1 1
      src/settings.js
  3. 9 9
      src/views/login/index.vue
  4. 2 2
      src/views/user/components/popup/IndexEdit.vue

+ 11 - 11
src/router/index.js

@@ -104,17 +104,17 @@ export const moreRoutes = [
       meta: { title: '洪楼News', icon: 'dashboard', affix: true }
     }]
   },
-  {
-    path: '/user',
-    component: Layout,
-    redirect: '/user/index',
-    children: [{
-      path: 'index',
-      name: 'UserIndex',
-      component: () => import('@/views/user/index'),
-      meta: { title: '用户管理', icon: 'dashboard', affix: true }
-    }]
-  },
+  // {
+  //   path: '/user',
+  //   component: Layout,
+  //   redirect: '/user/index',
+  //   children: [{
+  //     path: 'index',
+  //     name: 'UserIndex',
+  //     component: () => import('@/views/user/index'),
+  //     meta: { title: '用户管理', icon: 'dashboard', affix: true }
+  //   }]
+  // },
 ]
 export const constantRoutes = [
   {

+ 1 - 1
src/settings.js

@@ -1,6 +1,6 @@
 module.exports = {
 
-  title: '房票管理系统',
+  title: '洪楼Pro管理系统',
 
   /**
    * @type {boolean} true | false

+ 9 - 9
src/views/login/index.vue

@@ -3,7 +3,7 @@
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
 
       <div class="title-container">
-        <h3 class="title">房票管理系统</h3>
+        <h3 class="title">洪楼Pro管理系统</h3>
       </div>
 
       <el-form-item prop="username">
@@ -13,7 +13,7 @@
         <el-input
           ref="username"
           v-model="loginForm.username"
-          placeholder="Username"
+          placeholder="请输入账号"
           name="username"
           type="text"
           tabindex="1"
@@ -30,7 +30,7 @@
           ref="password"
           v-model="loginForm.password"
           :type="passwordType"
-          placeholder="Password"
+          placeholder="请输入密码"
           name="password"
           tabindex="2"
           auto-complete="on"
@@ -59,23 +59,23 @@ export default {
   name: 'Login',
   data() {
     const validateUsername = (rule, value, callback) => {
-      if (!validUsername(value)) {
-        callback(new Error('Please enter the correct user name'))
+      if (value.length < 4) {
+        callback(new Error('账户名有误'))
       } else {
         callback()
       }
     }
     const validatePassword = (rule, value, callback) => {
-      if (value.length < 6) {
-        callback(new Error('The password can not be less than 6 digits'))
+      if (value.length < 4) {
+        callback(new Error('密码有误'))
       } else {
         callback()
       }
     }
     return {
       loginForm: {
-        username: 'admin',
-        password: '123456'
+        username: '',
+        password: ''
       },
       loginRules: {
         username: [{ required: true, trigger: 'blur', validator: validateUsername }],

+ 2 - 2
src/views/user/components/popup/IndexEdit.vue

@@ -47,12 +47,12 @@ export default {
   methods: {
     getDef() {
       const params = { ...this.curObj }
-      console.log(params)
-      params.avatar = `${params.domain}${params.avatar}?url=${params.avatar}`
+      if (params.avatar) params.avatar = `${params.domain}${params.avatar}?url=${params.avatar}`
       const disabled = false
       this.formData = [
         { label: '账号', key: 'username', rules: 1 },
         { label: '昵称', key: 'nickname', rules: 1 },
+        { label: '密码', key: 'password', rules: 1 },
         { label: '邮箱', key: 'email' },
         { label: '头像', key: 'avatar', type: 'upload' },
       ]