|
@@ -2,7 +2,8 @@
|
|
|
<div id="app">
|
|
|
<div class="main-content">
|
|
|
<img src="../assets/tmd_logo.png" class="logo animated fadeIn" />
|
|
|
- <Button type="primary" size="large" class="btn-login animated fadeIn" @click="login" v-show="!isLogin">登录</Button>
|
|
|
+ <Button type="primary" size="large" class="btn-login animated fadeIn" @click="handleLogin('login')" v-show="!isLogin">登录</Button>
|
|
|
+ <Button type="primary" size="large" class="btn-login animated fadeIn" @click="handleLogin('regist')" v-show="!isLogin">注册</Button>
|
|
|
<p v-show="isLogin" class="suc-text">欢迎登录醍摩豆 , {{username}}</p>
|
|
|
<div v-show="isLogin" class="overlay-wrap center animated fadeIn">
|
|
|
<div class="main-btn centerCol" @click="sa">
|
|
@@ -37,14 +38,24 @@
|
|
|
this.$router.replace('/Syllabus')
|
|
|
},
|
|
|
//访问TW登录并回调
|
|
|
- login() {
|
|
|
+ handleLogin(types) {
|
|
|
+ console.log(types);
|
|
|
let that = this;
|
|
|
- that.$api.getLoginLink({ date: "151615156" }).then(res => {
|
|
|
+ that.$api.getLoginLink({ date: "151615156",type:types }).then(res => {
|
|
|
let loginUrl = res.result.data;
|
|
|
let callback = window.location.href;
|
|
|
window.location.href = loginUrl + callback;
|
|
|
})
|
|
|
},
|
|
|
+ //访问TW注册并回调
|
|
|
+ //handleRegister() {
|
|
|
+ // let that = this;
|
|
|
+ // that.$api.getLoginLink({ date: "151615156",type:"regist" }).then(res => {
|
|
|
+ // let loginUrl = res.result.data;
|
|
|
+ // let callback = window.location.href;
|
|
|
+ // window.location.href = loginUrl + callback;
|
|
|
+ // })
|
|
|
+ //},
|
|
|
//获取URL地址的指定参数
|
|
|
getParamAsCH(paramName) {
|
|
|
var paramValue = "";
|
|
@@ -164,6 +175,7 @@
|
|
|
|
|
|
.btn-login {
|
|
|
width: 150px;
|
|
|
+ margin-top:15px;
|
|
|
background-color: #a0a1a275 !important;
|
|
|
border-color: #87888a !important;
|
|
|
}
|