Commit f102c94f by 肖康

x

parent dbe2f9d7
......@@ -95,9 +95,9 @@ axios.interceptors.response.use(res => {
//挂载到VUE原型上封装后的http请求
Vue.prototype.$http = http;
//路由页面回跳处理 mate里面参数 back:true 开启登录态回跳
//路由页面回跳处理
router.beforeEach((to, from, next) => {
if (to.path == "/login" || to.path == '/notfound') {
if (to.path == "/login" || to.path == '/notfound' ||to.path == '/bindError') {
next()
} else {
let token = Util.getCookie('token') || '';
......
......@@ -16,6 +16,8 @@ const Goods = resolve => require(['@/views/Goods/goods.vue'], resolve);
const Message = resolve => require(['@/views/Info/message.vue'], resolve);
const Login = resolve => require(['@/views/User/login.vue'], resolve);
const notfound = resolve => require(['@/views/User/notfound.vue'], resolve);
const BindError = resolve => require(['@/views/User/bindError.vue'], resolve);
const routes = [
//首页
......@@ -113,7 +115,7 @@ const routes = [
name: 'Login',
meta: {
title: '猎芯网 - 云芯系统登录',
back: true
},
component:Login
},
......@@ -122,10 +124,20 @@ const routes = [
name: 'notfound',
meta: {
title: '猎芯网',
back: true
},
component:notfound
},
{
path: '/bindError',
name: 'BindError',
meta: {
title: '微信重新绑定',
},
component:BindError
},
/**错误页面重定向到首页**/
{
path: '*',
......
<template>
<div class="bindError">
<div class="fixed-box">
<el-alert :title="text" type="error" :closable="false" center show-icon>
</el-alert>
<a :href="hrefs" class="reloadBind">重新绑定</a>
</div>
</div>
</template>
<script>
import Vue from 'vue';
import {
Button,
Alert
} from 'element-ui'
Vue.use(Button).use(Alert)
export default {
name: "bindError",
data() {
return {
text: "错误提示的文案",
hrefs: "",
};
},
watch: {},
created() {
this.getData();
var code_=this.$route.query.err_type
if(code_==1){
this.text='微信授权失败'
}else if(code_==2){
this.text='云芯token校验失败'
}
else if(code_==3){
this.text='请求access_token失败'
}
else if(code_==4){
this.text='open_id已绑定其他账号,不能重复绑定'
}
else if(code_==5){
this.text='更新绑定关系失败'
}
else if(code_==6){
this.text='添加绑定关系失败'
}
else if(code_==7){
this.text='获取微信信息失败'
}
},
computed: {},
methods: {
getData() {
this.$http('get', "/api/login/getwxqrcode").then(res => {
if (res.err_code === 0) {
this.hrefs = res.data.wx_login_url;
} else {
this.$message(res.err_msg);
}
})
}
}
};
</script>
<style lang="less">
.fixed-box {
position: fixed;
height: 300px;
width: 500px;
border-radius: 6px;
top: 50%;
left: 50%;
margin-left: -250px;
margin-top: -150px;
.reloadBind {
display: block;
margin: 0 auto;
cursor: pointer;
width: 76px;
height: 37px;
line-height: 37px;
background: #1969F9;
border-radius: 2px;
font-size: 14px;
color: #fff;
text-align: center;
border-radius: 3px;
margin-top: 100px;
&:hover {
background: #0050E0;
}
}
}
</style>
\ No newline at end of file
......@@ -6,12 +6,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="http://yunxin.liexindev.net/favicon.ico">
<title>cloudsystem</title>
<link href="http://yunxin.liexindev.net/js/0.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/1.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/10.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/11.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/12.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/13.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/14.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/15.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/16.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/17.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/18.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/19.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/2.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/20.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/21.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/22.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/23.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/24.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/25.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/3.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/4.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/5.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/6.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/7.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/8.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/9.js" rel="prefetch"><link href="http://yunxin.liexindev.net/app.6fc3967792186e42811d.js" rel="preload" as="script"></head>
<link href="http://yunxin.liexindev.net/js/0.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/1.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/10.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/11.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/12.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/13.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/14.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/15.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/16.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/17.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/18.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/19.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/2.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/20.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/21.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/22.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/23.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/24.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/25.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/26.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/27.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/28.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/3.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/4.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/5.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/6.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/7.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/8.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/9.js" rel="prefetch"><link href="http://yunxin.liexindev.net/app.1f5ae2bd129de6314996.js" rel="preload" as="script"></head>
<body>
<noscript>
<strong>网络异常,请稍后加载</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script type="text/javascript" src="http://yunxin.liexindev.net/app.6fc3967792186e42811d.js"></script></body>
<script type="text/javascript" src="http://yunxin.liexindev.net/app.1f5ae2bd129de6314996.js"></script></body>
</html>
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment