Browse Source

增加退出按钮,优化外链跳转

master
wen 2 years ago
parent
commit
0f81c211d9
  1. 2
      dist/index.html
  2. 2
      dist/static/css/app.0e0385f0.css
  3. 0
      dist/static/css/chunk-2e716637.d185d2a3.css
  4. 1
      dist/static/css/chunk-fd39e1d2.275fbea1.css
  5. 1
      dist/static/css/chunk-fd39e1d2.5b395f52.css
  6. 1
      dist/static/js/app.1309a4dc.js
  7. 1
      dist/static/js/app.eaeeec51.js
  8. 1
      dist/static/js/chunk-2e716637.7449b031.js
  9. 1
      dist/static/js/chunk-6082a362.15333289.js
  10. 2
      dist/static/js/chunk-6b919d04.52570c32.js
  11. 2
      dist/static/js/chunk-cbc84f7c.5ec0eda8.js
  12. 0
      dist/static/js/chunk-fd39e1d2.8b187221.js
  13. 2
      src/layout/components/Sidebar/Link.vue
  14. 3
      src/layout/components/Sidebar/index.vue
  15. 12
      src/layout/components/Sidebar/leftMenusData.js
  16. 16
      src/layout/index.vue
  17. 13
      src/store/modules/user.js
  18. 5
      src/styles/publics.scss
  19. 8
      src/utils/validate.js
  20. 8
      src/views/systme/switchtheme.vue

2
dist/index.html vendored

File diff suppressed because one or more lines are too long

2
dist/static/css/app.e3ce4bc6.css → dist/static/css/app.0e0385f0.css vendored

File diff suppressed because one or more lines are too long

0
dist/static/css/chunk-6082a362.d185d2a3.css → dist/static/css/chunk-2e716637.d185d2a3.css vendored

1
dist/static/css/chunk-fd39e1d2.275fbea1.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:24px;position:relative}.toptitle .erectline{margin:0 18px;display:inline-block;vertical-align:middle;height:40px;width:1px;background-color:#414758}.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-fd39e1d2.5b395f52.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%}.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.1309a4dc.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-2e716637.7449b031.js vendored

@ -0,0 +1 @@ @@ -0,0 +1 @@
(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-6082a362.15333289.js vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6082a362"],{"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)])},a=[],i=(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(i["k"])(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("a7af"),t("2877")),c=Object(u["a"])(r,s,a,!1,null,null,null);n["default"]=c.exports},"665a":function(e,n,t){},"857a":function(e,n,t){var s=t("1d80"),a=/"/g;e.exports=function(e,n,t,i){var l=String(s(e)),o="<"+n;return""!==t&&(o+=" "+t+'="'+String(i).replace(a,"&quot;")+'"'),o+">"+l+"</"+n+">"}},9911:function(e,n,t){"use strict";var s=t("23e7"),a=t("857a"),i=t("af03");s({target:"String",proto:!0,forced:i("link")},{link:function(e){return a(this,"a","href",e)}})},a7af:function(e,n,t){"use strict";t("665a")},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}))}}}]);

2
dist/static/js/chunk-6b919d04.2afa5e4b.js → dist/static/js/chunk-6b919d04.52570c32.js vendored

File diff suppressed because one or more lines are too long

2
dist/static/js/chunk-cbc84f7c.aacabd1a.js → dist/static/js/chunk-cbc84f7c.5ec0eda8.js vendored

File diff suppressed because one or more lines are too long

0
dist/static/js/chunk-fd39e1d2.69d9f534.js → dist/static/js/chunk-fd39e1d2.8b187221.js vendored

2
src/layout/components/Sidebar/Link.vue

@ -28,6 +28,8 @@ export default { @@ -28,6 +28,8 @@ export default {
},
methods: {
linkProps(to) {
// console.log(this.isExternal);
// console.log(to);
if (this.isExternal) {
return {
href: to,

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

@ -16,6 +16,9 @@ @@ -16,6 +16,9 @@
>
<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>
</el-scrollbar>
</div>

12
src/layout/components/Sidebar/leftMenusData.js

@ -67,13 +67,13 @@ var menusdata = [ @@ -67,13 +67,13 @@ var menusdata = [
meta: { title: '皮肤更换', icon: 'tree' }
}
]
},
{
id: '4',
path: '/',
meta: { title: '前端展示页面', icon: 'link' }
}
// {
// id: '4',
// path: '/',
// meta: { title: '前端展示页面', icon: 'link' }
// }
]
export default menusdata

16
src/layout/index.vue

@ -7,13 +7,13 @@ @@ -7,13 +7,13 @@
<span>后台管理系统</span>
</a>
<div class="rightk tpriht">
<a id="dLabel" href="javascript:;" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<a class="avatark" href="javascript:;" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<img class="mailtp verMiddle" src="../common/img/jialuoma.png" alt="图片">
<span class="verMiddle glyphicon glyphicon-menu-down"></span>
</a>
<em class="erectline"></em>
<!-- <a class="Cache tuichu" href="/admin.php/Cache/index.html">清除缓存</a> -->
<!-- <el-button class="quit" id="tuichu" size="mini" round>退出</el-button> -->
<el-button class="quit" @click.native="logout" id="tuichu" size="mini" round>退出</el-button>
</div>
</div>
<div class="content_main">
@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
</template>
<script>
//import { mapGetters } from 'vuex'
import { Navbar, Sidebar, AppMain } from './components'
import ResizeMixin from './mixin/ResizeHandler'
@ -42,6 +43,10 @@ export default { @@ -42,6 +43,10 @@ export default {
},
mixins: [ResizeMixin],
computed: {
// ...mapGetters([
// 'avatar'
// ]),
sidebar() {
return this.$store.state.app.sidebar
},
@ -64,6 +69,11 @@ export default { @@ -64,6 +69,11 @@ export default {
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
},
async logout() {
await this.$store.dispatch('user/logout')
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
}
}
}

13
src/store/modules/user.js

@ -66,15 +66,20 @@ const actions = { @@ -66,15 +66,20 @@ const actions = {
// user logout
logout({ commit, state }) {
//console.log(66);
return new Promise((resolve, reject) => {
logout(state.token).then(() => {
removeToken() // must remove token first
resetRouter()
commit('RESET_STATE')
resolve()
}).catch(error => {
reject(error)
})
// logout(state.token).then(() => {
// removeToken() // must remove token first
// resetRouter()
// commit('RESET_STATE')
// resolve()
// }).catch(error => {
// reject(error)
// })
})
},

5
src/styles/publics.scss

@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
.toptitle .rightk {
float: right;
margin-top: 24px;
margin-top: 18px;
position: relative;
}
@ -47,3 +47,6 @@ @@ -47,3 +47,6 @@
width: 1px;
background-color: #414758;
}
.toptitle .avatark{height:20px;}
.toptitle .avatark>img{width:58px;background-color:#409EFF;border-radius: 50%;}

8
src/utils/validate.js

@ -10,9 +10,13 @@ @@ -10,9 +10,13 @@
* @returns {Boolean}
*/
export function isExternal(path) {
return /^(https?:|mailto:|tel:)/.test(path)
}
return /^(https?:|mailto:|tel:)/.test(path)
// if (path.indexOf('/') != -1) {
// return true;
// }
}
/**
* @param {string} str
* @returns {Boolean}

8
src/views/systme/switchtheme.vue

@ -34,19 +34,19 @@ export default { @@ -34,19 +34,19 @@ export default {
options: [{
value: 'manual',
label: '文档站',
link:'/'
link:'/?'
}, {
value: 'webdirectory',
label: '导航站',
link:'/'
link:'/?'
}, {
value: 'googleimage',
label: '图片站',
link:'/'
link:'/?'
}, {
value: 'videoblog',
label: '视频站',
link:'/'
link:'/?'
}],
skinvalue: '',
skinlabel:'',

Loading…
Cancel
Save