Browse Source

优化面包屑不跟随滚动条固定,整合部分有相似之处的代码。 优化未登入跳转登入页,登入后跟随后端接口退出登入状态

master
wen 2 years ago
parent
commit
f04c296047
  1. 2
      dist/index.html
  2. 1
      dist/static/css/app.20bb0413.css
  3. 1
      dist/static/css/app.75fcd5fc.css
  4. 1
      dist/static/css/chunk-03d6f850.40883d09.css
  5. 1
      dist/static/css/chunk-131916dc.fd921d20.css
  6. 0
      dist/static/css/chunk-755f3784.d185d2a3.css
  7. 0
      dist/static/css/chunk-764328cf.f4754777.css
  8. 0
      dist/static/css/chunk-b179bd6e.992eb6c3.css
  9. 2
      dist/static/css/chunk-libs.5833bdfc.css
  10. 1
      dist/static/js/app.0bd9b1d2.js
  11. 1
      dist/static/js/app.ffc0875a.js
  12. 1
      dist/static/js/chunk-03d6f850.6bef400f.js
  13. 1
      dist/static/js/chunk-088a652a.9e877b0e.js
  14. 1
      dist/static/js/chunk-131916dc.2ae837a0.js
  15. 1
      dist/static/js/chunk-2e716637.7449b031.js
  16. 1
      dist/static/js/chunk-6b919d04.52570c32.js
  17. 1
      dist/static/js/chunk-755f3784.5612e2a1.js
  18. 1
      dist/static/js/chunk-764328cf.c445aef3.js
  19. 1
      dist/static/js/chunk-b179bd6e.19f8c2a3.js
  20. 2
      public/index.html
  21. 20
      src/api/user.js
  22. 4
      src/components/Breadcrumb/index.vue
  23. 11
      src/layout/components/AppMain.vue
  24. 10
      src/layout/index.vue
  25. 15
      src/permission.js
  26. 34
      src/store/modules/user.js
  27. 1
      src/styles/element-ui.scss
  28. 7
      src/styles/index.scss
  29. 12
      src/styles/publics.scss
  30. 2
      src/styles/sidebar.scss
  31. 45
      src/views/filemange/index.vue
  32. 14
      src/views/login/index.vue
  33. 62
      src/views/subfile/index.vue
  34. 10
      src/views/systme/switchtheme.vue

2
dist/index.html vendored

File diff suppressed because one or more lines are too long

1
dist/static/css/app.20bb0413.css vendored

File diff suppressed because one or more lines are too long

1
dist/static/css/app.75fcd5fc.css vendored

File diff suppressed because one or more lines are too long

1
dist/static/css/chunk-03d6f850.40883d09.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%}.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}

1
dist/static/css/chunk-131916dc.fd921d20.css vendored

@ -0,0 +1 @@ @@ -0,0 +1 @@
.toptitle{color:#fff;height:91px;padding:0 6% 0 36px;z-index:2005;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;height:40px;width:1px;background-color:#414758}.toptitle .avatark,.toptitle .erectline{display:inline-block;vertical-align:middle}.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}

0
dist/static/css/chunk-2e716637.d185d2a3.css → dist/static/css/chunk-755f3784.d185d2a3.css vendored

0
dist/static/css/chunk-6b919d04.f4754777.css → dist/static/css/chunk-764328cf.f4754777.css vendored

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

2
dist/static/css/chunk-libs.b57e4bfb.css → dist/static/css/chunk-libs.5833bdfc.css vendored

@ -1 +1 @@ @@ -1 +1 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;-webkit-box-shadow:0 0 10px #29d,0 0 5px #29d;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translateY(-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;-webkit-box-sizing:border-box;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:6000;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;-webkit-box-shadow:0 0 10px #29d,0 0 5px #29d;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translateY(-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;-webkit-box-sizing:border-box;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}

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

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

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

@ -1 +0,0 @@ @@ -1 +0,0 @@
(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-131916dc.2ae837a0.js vendored

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

1
dist/static/js/chunk-2e716637.7449b031.js vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2e716637"],{"1e39":function(e,n,t){"use strict";t.r(n);var s=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"seitchtheme_m"},[t("h5",[e._v("更换皮肤以查看不同皮肤的前端网站")]),t("div",[t("span",[e._v("更换皮肤:")]),t("el-select",{attrs:{placeholder:"请选择皮肤"},on:{change:e.selectbian},model:{value:e.skinvalue,callback:function(n){e.skinvalue=n},expression:"skinvalue"}},e._l(e.options,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),t("div",{staticClass:"Submit1"},[t("el-button",{attrs:{loading:e.skinloading,type:"primary"},on:{click:e.skinSubmit}},[e._v("提交")]),e.skinAsk?t("a",{staticClass:"to_front_web",attrs:{target:"_blank",href:e.skinLink}},[t("el-button",{attrs:{type:"success",round:""}},[e._v("查看"+e._s(e.skinlabel)+"站点")])],1):e._e()],1)],1)])},i=[],a=(t("d3b7"),t("159b"),t("9911"),t("c24f")),l=t("4a9d"),o={data:function(){return{options:[{value:"manual",label:"文档站",link:"/?"},{value:"webdirectory",label:"导航站",link:"/?"},{value:"googleimage",label:"图片站",link:"/?"},{value:"videoblog",label:"视频站",link:"/?"}],skinvalue:"",skinlabel:"",skinLink:"",skinAsk:!1,skinloading:!1,skinForm:{theme:""}}},created:function(){},methods:{skinSubmit:function(){var e=this,n=this;this.skinloading=!0,this.skinForm.theme=this.skinvalue,Object(a["j"])(this.skinForm).then((function(t){var s=t.data;1==s.code?(n.$message({showClose:!0,message:s.msg,type:"success"}),e.skinAsk=!0,l["a"].$emit("mkdirSuccess")):n.$message({showClose:!0,message:s.err,type:"error"}),e.skinloading=!1})).catch((function(t){e.skinloading=!1,t.response||t.request,n.$message({showClose:!0,message:t.response.data.err,type:"error"})}))},selectbian:function(e){var n=this;this.options.forEach((function(t){t.value==e&&(n.skinlabel=t.label,n.skinLink=t.link+Math.round(1e3*Math.random()))})),this.skinAsk=!1}}},r=o,u=(t("bbc9"),t("2877")),c=Object(u["a"])(r,s,i,!1,null,null,null);n["default"]=c.exports},"857a":function(e,n,t){var s=t("1d80"),i=/"/g;e.exports=function(e,n,t,a){var l=String(s(e)),o="<"+n;return""!==t&&(o+=" "+t+'="'+String(a).replace(i,"&quot;")+'"'),o+">"+l+"</"+n+">"}},9566:function(e,n,t){},9911:function(e,n,t){"use strict";var s=t("23e7"),i=t("857a"),a=t("af03");s({target:"String",proto:!0,forced:a("link")},{link:function(e){return i(this,"a","href",e)}})},af03:function(e,n,t){var s=t("d039");e.exports=function(e){return s((function(){var n=""[e]('"');return n!==n.toLowerCase()||n.split('"').length>3}))}},bbc9:function(e,n,t){"use strict";t("9566")}}]);

1
dist/static/js/chunk-6b919d04.52570c32.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-755f3784.5612e2a1.js vendored

@ -0,0 +1 @@ @@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-755f3784"],{"1e39":function(n,e,t){"use strict";t.r(e);var i=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",{staticClass:"seitchtheme_m"},[t("h5",[n._v("更换皮肤以查看不同皮肤的前端网站")]),t("div",[t("span",[n._v("更换皮肤:")]),t("el-select",{attrs:{placeholder:"请选择皮肤"},on:{change:n.selectbian},model:{value:n.skinvalue,callback:function(e){n.skinvalue=e},expression:"skinvalue"}},n._l(n.options,(function(n){return t("el-option",{key:n.value,attrs:{label:n.label,value:n.value}})})),1),t("div",{staticClass:"Submit1"},[t("el-button",{attrs:{loading:n.skinloading,type:"primary"},on:{click:n.skinSubmit}},[n._v("提交")]),n.skinAsk?t("a",{staticClass:"to_front_web",attrs:{target:"_blank",href:n.skinLink}},[t("el-button",{attrs:{type:"success",round:""}},[n._v("查看"+n._s(n.skinlabel)+"站点")])],1):n._e()],1)],1)])},s=[],a=(t("d3b7"),t("159b"),t("9911"),t("c24f")),l=t("4a9d"),o={data:function(){return{options:[{value:"manual",label:"文档站",link:"/?"},{value:"webdirectory",label:"导航站",link:"/?"},{value:"googleimage",label:"图片站",link:"/?"},{value:"videoblog",label:"视频站",link:"/?"}],skinvalue:"",skinlabel:"",skinLink:"",skinAsk:!1,skinloading:!1,skinForm:{theme:""}}},created:function(){},methods:{skinSubmit:function(){var n=this,e=this;this.skinloading=!0,this.skinForm.theme=this.skinvalue,Object(a["j"])(this.skinForm).then((function(t){var i=t.data;1==i.code?(e.$message({showClose:!0,message:i.msg,type:"success"}),n.skinAsk=!0,l["a"].$emit("mkdirSuccess")):e.$message({showClose:!0,message:i.err,type:"error"}),n.skinloading=!1})).catch((function(e){n.skinloading=!1,Object(a["h"])(n,e)}))},selectbian:function(n){var e=this;this.options.forEach((function(t){t.value==n&&(e.skinlabel=t.label,e.skinLink=t.link+Math.round(1e3*Math.random()))})),this.skinAsk=!1}}},r=o,u=(t("5129"),t("2877")),c=Object(u["a"])(r,i,s,!1,null,null,null);e["default"]=c.exports},5129:function(n,e,t){"use strict";t("97b4")},"857a":function(n,e,t){var i=t("1d80"),s=/"/g;n.exports=function(n,e,t,a){var l=String(i(n)),o="<"+e;return""!==t&&(o+=" "+t+'="'+String(a).replace(s,"&quot;")+'"'),o+">"+l+"</"+e+">"}},"97b4":function(n,e,t){},9911:function(n,e,t){"use strict";var i=t("23e7"),s=t("857a"),a=t("af03");i({target:"String",proto:!0,forced:a("link")},{link:function(n){return s(this,"a","href",n)}})},af03:function(n,e,t){var i=t("d039");n.exports=function(n){return i((function(){var e=""[n]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}}}]);

1
dist/static/js/chunk-764328cf.c445aef3.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-b179bd6e.19f8c2a3.js vendored

File diff suppressed because one or more lines are too long

2
public/index.html

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<link rel="icon" href="<%= BASE_URL %>jialuoma2.ico">
<!-- <title><%= webpackConfig.name %></title> -->
<title>嘉洛马 — 文件后台管理系统</title>
<link rel="stylesheet" type="text/css" href="loadhead.css">
<!-- <link rel="stylesheet" type="text/css" href="loadhead.css"> -->
</head>
<body>
<noscript>

20
src/api/user.js

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
import request from '@/utils/request'
import { removeToken } from '@/utils/auth'
// 验证码接口
export function captcha(datas) {
return request({
url: '/api/captcha',
@ -8,6 +10,24 @@ export function captcha(datas) { @@ -8,6 +10,24 @@ export function captcha(datas) {
})
}
// 请求出错处理
export function requesterr(thiss, err) {
if (err.response) {
thiss.$message({ showClose: true, message: err.response.data.err, type: 'error' });
} else if (err.request) {
thiss.$message({ showClose: true, message: err.request, type: 'error' });
} else {
thiss.$message({ showClose: true, message: err.message, type: 'error' });
}
if (err.response && err.response.status == 401) {
removeToken()
thiss.$router.push(`/login?redirect=${thiss.$route.fullPath}`)
}
}
// 登入接口
export function login(datas) {
return request({
url: '/api/login',

4
src/components/Breadcrumb/index.vue

@ -14,8 +14,6 @@ @@ -14,8 +14,6 @@
<a :href="'#'+item.path">{{ item.meta.title }}</a>
</el-breadcrumb-item>
</transition-group>
<!-- <el-breadcrumb-item :to="{ path: '/filemange/index' }">首页</el-breadcrumb-item>
<el-breadcrumb-item><a href="/">活动管理</a></el-breadcrumb-item> -->
</el-breadcrumb>
</template>
@ -83,7 +81,7 @@ export default { @@ -83,7 +81,7 @@ export default {
currentid = thisURl.split('?id=')[1]
this.levelList2 = this.getBread(currentid, this.extractChild);
this.levelList2.reverse(); //
console.log(this.levelList2);
//console.log(this.levelList2);
//levelList2.
} else {

11
src/layout/components/AppMain.vue

@ -17,7 +17,9 @@ export default { @@ -17,7 +17,9 @@ export default {
}
</script>
<style scoped>
<style lang="scss">
// fix css style bug in open el-dialog
.app-main {
/*50 = navbar */
/* min-height: calc(100vh - 50px); */
@ -25,17 +27,16 @@ export default { @@ -25,17 +27,16 @@ export default {
width: 100%;
position: relative;
overflow: hidden;
.el-loading-mask{z-index:100;}
}
.fixed-header+.app-main {
padding-top: 50px;
}
</style>
<style lang="scss">
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
.fixed-header {
padding-right: 15px;
}
}
</style>

10
src/layout/index.vue

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" />
<div class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<div :class="{'fixed-header':fixedHeader}" class="navbar_main">
<navbar />
</div>
<app-main />
@ -101,7 +101,7 @@ export default { @@ -101,7 +101,7 @@ export default {
top: 0;
height: 100%;
position: absolute;
z-index: 999;
z-index: 2001;
}
.fixed-header {
@ -121,5 +121,9 @@ export default { @@ -121,5 +121,9 @@ export default {
width: 100%;
}
.content_main{padding-top:91px;}
.content_main{padding-top:141px;}
.navbar_main{width:100%;position:fixed;top:91px;z-index:300;}
</style>

15
src/permission.js

@ -14,18 +14,23 @@ const whiteList = ['/login'] // no redirect whitelist @@ -14,18 +14,23 @@ const whiteList = ['/login'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
// start progress bar
NProgress.start()
//console.log(0)
// set page title
document.title = getPageTitle(to.meta.title)
next()
//console.log(hasToken);
//next()
// determine whether the user has logged in
const hasToken = getToken()
if (hasToken) {
// console.log(1)
// console.log(to.path)
if (to.path === '/login') {
// if is logged in, redirect to the home page
next({ path: '/' })
NProgress.done()
}else{
next()
}
// else {
// const hasGetUserInfo = store.getters.name
@ -48,11 +53,13 @@ router.beforeEach(async(to, from, next) => { @@ -48,11 +53,13 @@ router.beforeEach(async(to, from, next) => {
// }
} else {
/* has no token*/
//console.log(to.path)
if (whiteList.indexOf(to.path) !== -1) {
//console.log(2)
// in the free login whitelist, go directly
next()
} else {
//console.log(3)
// other pages that do not have permission to access are redirected to the login page.
next(`/login?redirect=${to.path}`)
NProgress.done()

34
src/store/modules/user.js

@ -33,7 +33,7 @@ const actions = { @@ -33,7 +33,7 @@ const actions = {
const { username, password, captcha} = userInfo
return new Promise((resolve, reject) => {
login({ username: username.trim(), password: password, captcha: captcha}).then(response => {
const { data } = 1
const data = 1;
commit('SET_TOKEN', data)
setToken(data)
resolve(response)
@ -44,25 +44,25 @@ const actions = { @@ -44,25 +44,25 @@ const actions = {
},
// get user info
getInfo({ commit, state }) {
return new Promise((resolve, reject) => {
getInfo(state.token).then(response => {
const { data } = response
// getInfo({ commit, state }) {
// return new Promise((resolve, reject) => {
// getInfo(state.token).then(response => {
// const { data } = response
if (!data) {
return reject('Verification failed, please Login again.')
}
// if (!data) {
// return reject('Verification failed, please Login again.')
// }
const { name, avatar } = data
// const { name, avatar } = data
commit('SET_NAME', name)
commit('SET_AVATAR', avatar)
resolve(data)
}).catch(error => {
reject(error)
})
})
},
// commit('SET_NAME', name)
// commit('SET_AVATAR', avatar)
// resolve(data)
// }).catch(error => {
// reject(error)
// })
// })
// },
// user logout
logout({ commit, state }) {

1
src/styles/element-ui.scss

@ -49,3 +49,4 @@ @@ -49,3 +49,4 @@
}
.el-submenu__title i{color:#FFF;}
.el-message{z-index:6000 !important;}

7
src/styles/index.scss

@ -11,7 +11,10 @@ @@ -11,7 +11,10 @@
// text-rendering: optimizeLegibility;
// font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
// }
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,select,p,blockquote,th,td{margin:0;padding:0;font-weight:inherit;}
.vercenter{text-align:center !important;}
.verleft{text-align:left !important;}
.textright{text-align:right !important;}
label {
font-weight: 700;
}
@ -59,7 +62,9 @@ div:focus { @@ -59,7 +62,9 @@ div:focus {
}
}
// main-container global css
.app-container {
padding: 20px;
}
// nprogress

12
src/styles/publics.scss

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
color: #FFF;
height: 91px;
padding: 0 6% 0 36px;
z-index: 1002;
z-index: 2005;
background-color: #2b3245;
position: fixed;
top: 0;
@ -48,13 +48,5 @@ @@ -48,13 +48,5 @@
background-color: #414758;
}
.toptitle .avatark{height:20px;}
.toptitle .avatark{display:inline-block;vertical-align:middle;}
.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;
}

2
src/styles/sidebar.scss

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
top: 91px;
bottom: 0;
left: 0;
z-index: 1888;
z-index: 2002;
overflow: hidden;
.el_submenu_link{width:76%;height:56px;z-index:100;position:absolute;left:0;top:0;bottom:0;right:10%;}

45
src/views/filemange/index.vue

@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
<script>
//import { mapGetters } from 'vuex'
import { mirlist, mkdir, rmdirs, deletefile, renamefile, movefiledir} from '@/api/user'
import {requesterr, mirlist, mkdir, rmdirs, deletefile, renamefile, movefiledir} from '@/api/user'
import EventBus from '@/utils/EventBus.js'
export default {
@ -185,14 +185,7 @@ methods: { @@ -185,14 +185,7 @@ methods: {
}
this.subloading = false;
}).catch(error => {
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.message, type: 'error'});
}
requesterr(this, error);
this.subloading = false;
});
},
@ -248,14 +241,8 @@ methods: { @@ -248,14 +241,8 @@ methods: {
this.dirbox = false;
}).catch(error => {
//console.log(0);
if (error.response) {
thiss.mkdirloadings = false;
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.message, type: 'error'});
}
this.mkdirloadings = false;
requesterr(this, error);
});
},
@ -279,13 +266,7 @@ methods: { @@ -279,13 +266,7 @@ methods: {
this.subloading = false;
//this.dirbox = false;
}).catch(error => {
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
requesterr(this, error);
this.subloading = false;
});
},
@ -316,13 +297,7 @@ methods: { @@ -316,13 +297,7 @@ methods: {
this.movebox = false;
}).catch(error => {
this.subloading = false;
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
requesterr(this, error);
});
},
@ -356,13 +331,7 @@ methods: { @@ -356,13 +331,7 @@ methods: {
this.renamebox = false;
}).catch(error => {
this.subloading = false;
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
requesterr(this, error);
});
},

14
src/views/login/index.vue

@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
//import { validUsername } from '@/utils/validate'
//import axios from 'axios'
//import { setToken } from '@/utils/auth' // set token from cookie
import { captcha, login } from '@/api/user'
import {requesterr, captcha, login } from '@/api/user'
export default {
created: function () {
@ -171,7 +171,7 @@ export default { @@ -171,7 +171,7 @@ export default {
this.loading = true
let thiss = this;
this.$store.dispatch('user/login', this.loginForm).then(response => {
console.log(response);
//console.log(response);
let datamain = response.data;
if (datamain.code == 1) {
//console.log(datamain);
@ -184,14 +184,8 @@ export default { @@ -184,14 +184,8 @@ export default {
this.loading = false
}).catch((error) => {
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.request,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.message,type: 'error'});
}
this.loading = false
requesterr(this, error);
this.loading = false;
})
// login(this.loginForm).then(response => {
// let datamain = response.data;

62
src/views/subfile/index.vue

@ -208,7 +208,7 @@ @@ -208,7 +208,7 @@
<script>
import EventBus from '@/utils/EventBus.js'
import { mirlist, mkdir, uploadrequest, rmdirs, deletefile, renamefile, movefiledir} from '@/api/user'
import {requesterr, mirlist, mkdir, uploadrequest, rmdirs, deletefile, renamefile, movefiledir} from '@/api/user'
//import defaultSettings from '@/settings.js'
export default {
@ -433,14 +433,8 @@ export default { @@ -433,14 +433,8 @@ export default {
}
this.uploadLoad = false;
}).catch(error => {
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
this.uploadLoad = false;
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
requesterr(this, error);
this.uploadLoad = false;
});
},
@ -487,13 +481,7 @@ export default { @@ -487,13 +481,7 @@ export default {
this.subloading = false;
}
}).catch(error => {
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.message,type: 'error'});
}
requesterr(this, error);
this.subloading = false;
});
@ -548,14 +536,8 @@ export default { @@ -548,14 +536,8 @@ export default {
this.mkdirloadings = false;
this.dirbox = false;
}).catch(error => {
if (error.response) {
thiss.mkdirloadings = false;
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
this.mkdirloadings = false;
requesterr(this, error);
});
},
@ -579,13 +561,7 @@ export default { @@ -579,13 +561,7 @@ export default {
this.subloading = false;
//this.dirbox = false;
}).catch(error => {
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
requesterr(this, error);
this.subloading = false;
});
},
@ -611,13 +587,7 @@ export default { @@ -611,13 +587,7 @@ export default {
//this.dirbox = false;
}).catch(error => {
this.subloading = false;
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
requesterr(this, error);
});
},
@ -651,13 +621,7 @@ export default { @@ -651,13 +621,7 @@ export default {
this.renamebox = false;
}).catch(error => {
this.subloading = false;
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
requesterr(this, error);
});
},
@ -686,13 +650,7 @@ export default { @@ -686,13 +650,7 @@ export default {
this.movebox = false;
}).catch(error => {
this.subloading = false;
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
requesterr(this, error);
});
},

10
src/views/systme/switchtheme.vue

@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
<script>
//console.log(process.env.VUE_APP_BASE_API);
import { switchthemeApi} from '@/api/user'
import {requesterr, switchthemeApi} from '@/api/user'
import EventBus from '@/utils/EventBus.js'
export default {
@ -86,13 +86,7 @@ export default { @@ -86,13 +86,7 @@ export default {
}).catch(error => {
this.skinloading = false;
if (error.response) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else if (error.request) {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
} else {
thiss.$message({showClose: true,message: error.response.data.err,type: 'error'});
}
requesterr(this, error);
});
},

Loading…
Cancel
Save