change config
This commit is contained in:
@@ -67,7 +67,7 @@ const Form2 = resolve => require(['../views/example/form2'], resolve);
|
||||
Vue.use(Router);
|
||||
|
||||
export default new Router({
|
||||
mode: 'history',
|
||||
// mode: 'history', //后端支持可开
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: [
|
||||
{ path: '/login', component: Login, hidden: true },
|
||||
|
@@ -2,17 +2,23 @@
|
||||
<div class="components-container">
|
||||
<div class='component-item'>
|
||||
<MDinput name="name" v-model="title" required :maxlength="100">
|
||||
标题
|
||||
标题
|
||||
</MDinput>
|
||||
<code class='code-part'>Material Design 的input</code>
|
||||
</div>
|
||||
|
||||
<div class='component-item'>
|
||||
<PanThumb image='https://wpimg.wallstcn.com/577965b9-bb9e-4e02-9f0c-095b41417191'>
|
||||
<PanThumb image='https://wpimg.wallstcn.com/577965b9-bb9e-4e02-9f0c-095b41417191'>
|
||||
上海花裤衩
|
||||
</PanThumb>
|
||||
<code class='code-part'>图片hover效果</code>
|
||||
</PanThumb>
|
||||
<code class='code-part'>图片hover效果</code>
|
||||
</div>
|
||||
|
||||
<div class='component-item'>
|
||||
<el-button v-waves type="primary">水波纹效果</el-button>
|
||||
<code class='code-part'>水波纹 v-directive</code>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@@ -97,29 +97,29 @@
|
||||
});
|
||||
},
|
||||
afterQRScan() {
|
||||
const hash = window.location.hash.slice(1);
|
||||
const hashObj = getQueryObject(hash);
|
||||
const originUrl = window.location.origin;
|
||||
history.replaceState({}, '', originUrl);
|
||||
const codeMap = {
|
||||
wechat: 'code',
|
||||
tencent: 'code'
|
||||
};
|
||||
const codeName = hashObj[codeMap[this.auth_type]];
|
||||
if (!codeName) {
|
||||
alert('第三方登录失败');
|
||||
} else {
|
||||
this.$store.dispatch('LoginByThirdparty', codeName).then(() => {
|
||||
this.$router.push({ path: '/' });
|
||||
});
|
||||
}
|
||||
// const hash = window.location.hash.slice(1);
|
||||
// const hashObj = getQueryObject(hash);
|
||||
// const originUrl = window.location.origin;
|
||||
// history.replaceState({}, '', originUrl);
|
||||
// const codeMap = {
|
||||
// wechat: 'code',
|
||||
// tencent: 'code'
|
||||
// };
|
||||
// const codeName = hashObj[codeMap[this.auth_type]];
|
||||
// if (!codeName) {
|
||||
// alert('第三方登录失败');
|
||||
// } else {
|
||||
// this.$store.dispatch('LoginByThirdparty', codeName).then(() => {
|
||||
// this.$router.push({ path: '/' });
|
||||
// });
|
||||
// }
|
||||
}
|
||||
},
|
||||
created() {
|
||||
window.addEventListener('hashchange', this.afterQRScan);
|
||||
// window.addEventListener('hashchange', this.afterQRScan);
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('hashchange', this.afterQRScan);
|
||||
// window.removeEventListener('hashchange', this.afterQRScan);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user