Browse Source

优化登入页面默认显示登入信息,面包屑点击问题等。 优化

master
wen 2 years ago
parent
commit
29dfa0a69f
  1. 2
      dist/index.html
  2. 2
      dist/static/css/app.20bb0413.css
  3. 1
      dist/static/css/chunk-03d6f850.40883d09.css
  4. 0
      dist/static/css/chunk-088a652a.992eb6c3.css
  5. 1
      dist/static/css/chunk-fd39e1d2.5b395f52.css
  6. 1
      dist/static/js/app.0bd9b1d2.js
  7. 1
      dist/static/js/app.eaeeec51.js
  8. 1
      dist/static/js/chunk-03d6f850.6bef400f.js
  9. 1
      dist/static/js/chunk-088a652a.9e877b0e.js
  10. 1
      dist/static/js/chunk-cbc84f7c.5ec0eda8.js
  11. 1
      dist/static/js/chunk-fd39e1d2.8b187221.js
  12. 3
      src/components/Breadcrumb/index.vue
  13. 15
      src/layout/components/Sidebar/index.vue
  14. 8
      src/styles/publics.scss
  15. 4
      src/views/login/index.vue
  16. 4
      src/views/subfile/index.vue

2
dist/index.html vendored

File diff suppressed because one or more lines are too long

2
dist/static/css/app.0e0385f0.css → dist/static/css/app.20bb0413.css vendored

File diff suppressed because one or more lines are too long

1
dist/static/css/chunk-03d6f850.40883d09.css vendored

@ -0,0 +1 @@ @@ -0,0 +1 @@
.toptitle{color:#fff;height:91px;padding:0 6% 0 36px;z-index:1002;background-color:#2b3245;position:fixed;top:0;left:0;right:0;overflow:hidden}.toptitle .leftk{float:left;margin-top:16px;height:60px}.toptitle .leftk>img{vertical-align:middle;display:inline-block;max-width:100%;height:100%;background-color:#fff;border-radius:50%}.toptitle .leftk>i{vertical-align:middle;color:#fff;font-size:30px;margin:6px 0 0 15px}.toptitle .rightk{float:right;margin-top:18px;position:relative}.toptitle .erectline{margin:0 18px;display:inline-block;vertical-align:middle;height:40px;width:1px;background-color:#414758}.toptitle .avatark{height:20px}.toptitle .avatark>img{width:58px;background-color:#409eff;border-radius:50%}.svg-icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#000;height:47px;caret-color:#3c3535}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#3c3535!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container{min-height:100%;width:100%;background-color:#fff;overflow:hidden}.login-container .bt_login{width:100%;margin:0 0 16px 0}.login-container .bt_rest{margin:0}.login-container .login-form{position:relative;width:520px;max-width:100%;padding:0 32px 0 32px;margin:160px auto 0 auto;overflow:hidden}.login-container .svg-container{padding:6px 5px 6px 15px;color:#000;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container{position:relative}.login-container .title-container .title{font-size:26px;color:#000;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd{position:absolute;right:10px;top:7px;font-size:16px;color:#000;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.login-container .captcha_k{display:-webkit-box;display:-ms-flexbox;display:flex}.login-container .captcha_k .captcha_main{width:100px;height:54px;margin:0 0 0 15px}.login-container .captcha_k .captcha_img{border-radius:6px;display:block;max-width:100%;height:100%;cursor:pointer}.login-container .captcha_k>.el-form-item{-webkit-box-flex:1;-ms-flex:1;flex:1}

0
dist/static/css/chunk-cbc84f7c.992eb6c3.css → dist/static/css/chunk-088a652a.992eb6c3.css vendored

1
dist/static/css/chunk-fd39e1d2.5b395f52.css vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
.toptitle{color:#fff;height:91px;padding:0 6% 0 36px;z-index:1002;background-color:#2b3245;position:fixed;top:0;left:0;right:0;overflow:hidden}.toptitle .leftk{float:left;margin-top:16px;height:60px}.toptitle .leftk>img{vertical-align:middle;display:inline-block;max-width:100%;height:100%;background-color:#fff;border-radius:50%}.toptitle .leftk>i{vertical-align:middle;color:#fff;font-size:30px;margin:6px 0 0 15px}.toptitle .rightk{float:right;margin-top:18px;position:relative}.toptitle .erectline{margin:0 18px;display:inline-block;vertical-align:middle;height:40px;width:1px;background-color:#414758}.toptitle .avatark{height:20px}.toptitle .avatark>img{width:58px;background-color:#409eff;border-radius:50%}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#000;height:47px;caret-color:#3c3535}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#3c3535!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container{min-height:100%;width:100%;background-color:#fff;overflow:hidden}.login-container .bt_login{width:100%;margin:0 0 16px 0}.login-container .bt_rest{margin:0}.login-container .login-form{position:relative;width:520px;max-width:100%;padding:0 32px 0 32px;margin:160px auto 0 auto;overflow:hidden}.login-container .svg-container{padding:6px 5px 6px 15px;color:#000;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container{position:relative}.login-container .title-container .title{font-size:26px;color:#000;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd{position:absolute;right:10px;top:7px;font-size:16px;color:#000;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.login-container .captcha_k{display:-webkit-box;display:-ms-flexbox;display:flex}.login-container .captcha_k .captcha_main{width:100px;height:54px;margin:0 0 0 15px}.login-container .captcha_k .captcha_img{border-radius:6px;display:block;max-width:100%;height:100%;cursor:pointer}.login-container .captcha_k>.el-form-item{-webkit-box-flex:1;-ms-flex:1;flex:1}

1
dist/static/js/app.0bd9b1d2.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/app.eaeeec51.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-03d6f850.6bef400f.js vendored

@ -0,0 +1 @@ @@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-03d6f850"],{"1fb3":function(e,t,a){},"3c85":function(e,t,a){"use strict";a("ed46")},5625:function(e,t,a){"use strict";a("1fb3")},"9ed6":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"login-container"},[e._m(0),a("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,"auto-complete":"on","label-position":"left"}},[a("div",{staticClass:"title-container"},[a("h3",{staticClass:"title"},[e._v("系统登入")])]),a("el-form-item",{attrs:{prop:"username"}},[a("span",{staticClass:"svg-container"},[a("svg-icon",{attrs:{"icon-class":"user"}})],1),a("el-input",{ref:"username",attrs:{placeholder:"用户名",name:"用户名",type:"text",tabindex:"1","auto-complete":"on"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1),a("el-form-item",{attrs:{prop:"password"}},[a("span",{staticClass:"svg-container"},[a("svg-icon",{attrs:{"icon-class":"password"}})],1),a("el-input",{key:e.passwordType,ref:"password",attrs:{type:e.passwordType,placeholder:"密码",name:"密码",tabindex:"2","auto-complete":"on"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}}),a("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[a("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1),a("div",{staticClass:"captcha_k"},[a("el-form-item",{attrs:{prop:"captcha"}},[a("span",{staticClass:"svg-container"},[a("svg-icon",{attrs:{"icon-class":"example"}})],1),a("el-input",{ref:"captcha",attrs:{placeholder:"验证码",name:"用户名",type:"text",tabindex:"3","auto-complete":"on"},model:{value:e.loginForm.captcha,callback:function(t){e.$set(e.loginForm,"captcha",t)},expression:"loginForm.captcha"}})],1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.captcha_loading,expression:"captcha_loading"}],staticClass:"captcha_main",on:{click:e.getcaptcha}},[e.captcha_loading?e._e():a("img",{staticClass:"captcha_img",attrs:{src:e.captchaimg,alt:"验证码"}})])],1),a("el-button",{staticClass:"bt_login",attrs:{loading:e.loading,type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin(t)}}},[e._v("登入")]),a("el-button",{staticClass:"bt_rest bt_login",on:{click:function(t){return e.resetForm("loginForm")}}},[e._v("重置")])],1)],1)},o=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"toptitle clearfix"},[s("a",{staticClass:"leftk",attrs:{href:"javascript:;"}},[s("img",{attrs:{src:a("7b07"),alt:"图片"}}),s("em",{staticClass:"erectline"}),s("span",[e._v("后台管理系统")])])])}],r=a("c24f"),n={created:function(){this.getcaptcha()},data:function(){var e=function(e,t,a){t.length<3?a(new Error("请输入正确的用户名")):a()},t=function(e,t,a){t.length<6?a(new Error("请输入正确的密码")):a()},a=function(e,t,a){t.length<5?a(new Error("请输入正确的验证码")):a()};return{loading:!1,captcha_loading:!0,passwordType:"password",redirect:void 0,loginForm:{username:"filesite",password:"88888888",captcha:""},captchaimg:"",loginRules:{username:[{required:!0,trigger:"blur",validator:e}],password:[{required:!0,trigger:"blur",validator:t}],captcha:[{required:!0,trigger:"blur",validator:a}]}}},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},methods:{getcaptcha:function(){var e=this;this.captcha_loading=!0,Object(r["a"])().then((function(t){var a=t.data;e.captchaimg=a.data,e.captcha_loading=!1}))},showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="text":this.passwordType="password",this.$nextTick((function(){e.$refs.password.focus()}))},handleLogin:function(){var e=this;this.$refs.loginForm.validate((function(t){if(!t)return console.log("error submit!!"),!1;e.loading=!0;var a=e;e.$store.dispatch("user/login",e.loginForm).then((function(t){console.log(t);var a=t.data;1==a.code?(e.$router.push({path:e.redirect||"/filemange/index"}),e.$message({showClose:!0,message:a.msg,type:"success"})):0==a.code&&e.$message({showClose:!0,message:a.err,type:"error"}),e.loading=!1})).catch((function(t){t.response?a.$message({showClose:!0,message:t.response.data.err,type:"error"}):t.request?a.$message({showClose:!0,message:t.request,type:"error"}):a.$message({showClose:!0,message:t.message,type:"error"}),e.loading=!1}))}))},resetForm:function(e){this.$refs[e].resetFields()}}},i=n,c=(a("5625"),a("3c85"),a("2877")),l=Object(c["a"])(i,s,o,!1,null,null,null);t["default"]=l.exports},ed46:function(e,t,a){}}]);

1
dist/static/js/chunk-088a652a.9e877b0e.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-cbc84f7c.5ec0eda8.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-fd39e1d2.8b187221.js vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fd39e1d2"],{"543f":function(e,t,a){},"6a54":function(e,t,a){"use strict";a("8939")},8939:function(e,t,a){},"8f4b":function(e,t,a){"use strict";a("543f")},"9ed6":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"login-container"},[e._m(0),a("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,"auto-complete":"on","label-position":"left"}},[a("div",{staticClass:"title-container"},[a("h3",{staticClass:"title"},[e._v("系统登入")])]),a("el-form-item",{attrs:{prop:"username"}},[a("span",{staticClass:"svg-container"},[a("svg-icon",{attrs:{"icon-class":"user"}})],1),a("el-input",{ref:"username",attrs:{placeholder:"用户名",name:"用户名",type:"text",tabindex:"1","auto-complete":"on"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1),a("el-form-item",{attrs:{prop:"password"}},[a("span",{staticClass:"svg-container"},[a("svg-icon",{attrs:{"icon-class":"password"}})],1),a("el-input",{key:e.passwordType,ref:"password",attrs:{type:e.passwordType,placeholder:"密码",name:"密码",tabindex:"2","auto-complete":"on"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}}),a("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[a("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1),a("div",{staticClass:"captcha_k"},[a("el-form-item",{attrs:{prop:"captcha"}},[a("span",{staticClass:"svg-container"},[a("svg-icon",{attrs:{"icon-class":"example"}})],1),a("el-input",{ref:"captcha",attrs:{placeholder:"验证码",name:"用户名",type:"text",tabindex:"3","auto-complete":"on"},model:{value:e.loginForm.captcha,callback:function(t){e.$set(e.loginForm,"captcha",t)},expression:"loginForm.captcha"}})],1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.captcha_loading,expression:"captcha_loading"}],staticClass:"captcha_main",on:{click:e.getcaptcha}},[e.captcha_loading?e._e():a("img",{staticClass:"captcha_img",attrs:{src:e.captchaimg,alt:"验证码"}})])],1),a("el-button",{staticClass:"bt_login",attrs:{loading:e.loading,type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin(t)}}},[e._v("登入")]),a("el-button",{staticClass:"bt_rest bt_login",on:{click:function(t){return e.resetForm("loginForm")}}},[e._v("重置")])],1)],1)},o=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"toptitle clearfix"},[s("a",{staticClass:"leftk",attrs:{href:"javascript:;"}},[s("img",{attrs:{src:a("7b07"),alt:"图片"}}),s("em",{staticClass:"erectline"}),s("span",[e._v("后台管理系统")])])])}],r=a("c24f"),n={created:function(){this.getcaptcha()},data:function(){var e=function(e,t,a){t.length<3?a(new Error("请输入正确的用户名")):a()},t=function(e,t,a){t.length<6?a(new Error("请输入正确的密码")):a()},a=function(e,t,a){t.length<5?a(new Error("请输入正确的验证码")):a()};return{loading:!1,captcha_loading:!0,passwordType:"password",redirect:void 0,loginForm:{username:"",password:"",captcha:""},captchaimg:"",loginRules:{username:[{required:!0,trigger:"blur",validator:e}],password:[{required:!0,trigger:"blur",validator:t}],captcha:[{required:!0,trigger:"blur",validator:a}]}}},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},methods:{getcaptcha:function(){var e=this;this.captcha_loading=!0,Object(r["a"])().then((function(t){var a=t.data;e.captchaimg=a.data,e.captcha_loading=!1}))},showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="text":this.passwordType="password",this.$nextTick((function(){e.$refs.password.focus()}))},handleLogin:function(){var e=this;this.$refs.loginForm.validate((function(t){if(!t)return console.log("error submit!!"),!1;e.loading=!0;var a=e;e.$store.dispatch("user/login",e.loginForm).then((function(t){console.log(t);var a=t.data;1==a.code?(e.$router.push({path:e.redirect||"/filemange/index"}),e.$message({showClose:!0,message:a.msg,type:"success"})):0==a.code&&e.$message({showClose:!0,message:a.err,type:"error"}),e.loading=!1})).catch((function(t){t.response?a.$message({showClose:!0,message:t.response.data.err,type:"error"}):t.request?a.$message({showClose:!0,message:t.request,type:"error"}):a.$message({showClose:!0,message:t.message,type:"error"}),e.loading=!1}))}))},resetForm:function(e){this.$refs[e].resetFields()}}},i=n,c=(a("8f4b"),a("6a54"),a("2877")),l=Object(c["a"])(i,s,o,!1,null,null,null);t["default"]=l.exports}}]);

3
src/components/Breadcrumb/index.vue

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item) in levelList2" :key="item.path">
<!-- <span v-if="" class="no-redirect">{{ item.meta.title }}</span> -->
<a :href="'/#'+item.path">{{ item.meta.title }}</a>
<a :href="'#'+item.path">{{ item.meta.title }}</a>
</el-breadcrumb-item>
</transition-group>
<!-- <el-breadcrumb-item :to="{ path: '/filemange/index' }">首页</el-breadcrumb-item>
@ -83,6 +83,7 @@ export default { @@ -83,6 +83,7 @@ export default {
currentid = thisURl.split('?id=')[1]
this.levelList2 = this.getBread(currentid, this.extractChild);
this.levelList2.reverse(); //
console.log(this.levelList2);
//levelList2.
} else {

15
src/layout/components/Sidebar/index.vue

@ -16,9 +16,8 @@ @@ -16,9 +16,8 @@
>
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu>
<!-- 单独新开窗口跳转链接 -->
<div><a href="/" target="_blank" class="router-link-active"><li role="menuitem" tabindex="-1" class="el-menu-item submenu-title-noDropdown" style="padding-left: 20px; color: rgb(191, 203, 217); background-color: rgb(43, 50, 69);"><svg data-v-c8a70580="" aria-hidden="true" class="svg-icon" data-v-31ea41b3=""><use data-v-c8a70580="" xlink:href="#icon-link"></use></svg><span data-v-31ea41b3="">前端展示页面</span></li></a></div>
<!-- 单独新开窗口跳转 -->
<div><a href="/" target="_blank" class="router-link-active"><li role="menuitem" tabindex="-1" class="el-menu-item submenu-title-noDropdown" style="padding-left: 20px; color: rgb(191, 203, 217); background-color: rgb(43, 50, 69);"><svg aria-hidden="true" class="svg-icon"><use xlink:href="#icon-link"></use></svg><span>前端展示页面</span></li></a></div>
</el-scrollbar>
</div>
@ -171,3 +170,13 @@ export default { @@ -171,3 +170,13 @@ export default {
}
}
</script>
<style>
.svg-icon{
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</style>

8
src/styles/publics.scss

@ -50,3 +50,11 @@ @@ -50,3 +50,11 @@
.toptitle .avatark{height:20px;}
.toptitle .avatark>img{width:58px;background-color:#409EFF;border-radius: 50%;}
.svg-icon{
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}

4
src/views/login/index.vue

@ -119,8 +119,8 @@ export default { @@ -119,8 +119,8 @@ export default {
passwordType: 'password',
redirect: undefined,
loginForm: {
username: '',
password: '',
username: 'filesite',
password: '88888888',
captcha: ''
},
captchaimg: '', //

4
src/views/subfile/index.vue

@ -189,7 +189,7 @@ @@ -189,7 +189,7 @@
:on-preview="handlePictureCardPreview"
:disabled="false"
:file-list="uploadFilelist"
accept=".jpg, .jpeg, .png, .gif"
accept=".jpg, .jpeg, .png, .gif, webp"
:auto-upload="false">
<i slot="default" class="el-icon-plus"></i>
<span class="addimgtext">添加照片</span>
@ -197,7 +197,7 @@ @@ -197,7 +197,7 @@
<div class="request_main">
<el-button type="success" :loading="uploadLoad" @click="UploadRequest()">开始上传<i class="el-icon-upload el-icon--right"></i></el-button>
</div>
<div class="el-upload__tip">只能上传.jpg, .jpeg, .png, .gif文件且不超过5MB</div>
<div class="el-upload__tip">只能上传.jpg, .jpeg, .png, .gifwebp文件且不超过5MB</div>
<el-dialog :modal="false" :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="图片">
</el-dialog>

Loading…
Cancel
Save