This commit is contained in:
wangjinlei
2021-06-24 17:54:50 +08:00
parent 5f9ae607c7
commit a1a4f13258
7 changed files with 113 additions and 10 deletions

View File

@@ -7,8 +7,8 @@ import qs from 'qs'
// axios全局配置
axios.defaults.timeout = 10000 // 超时时间
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' // 配置请求头
axios.defaults.baseURL = 'http://www.tougao.com/'
// axios.defaults.baseURL = '/'
// axios.defaults.baseURL = 'http://www.tougao.com/'
axios.defaults.baseURL = '/'
// 添加响应拦截器,统一处理服务器响应和异常
axios.interceptors.response.use(

View File

@@ -68,7 +68,7 @@ export default {
hasorcie: false,
orcid: '',
orcidLink:
'https://orcid.org/oauth/authorize?client_id=APP-PKF0BGRP6DWM6FUB&response_type=code&scope=/authenticate&redirect_uri=https://submission.tmrjournals.com/orcidLink',
'https://orcid.org/oauth/authorize?client_id=APP-PKF0BGRP6DWM6FUB&response_type=code&scope=/authenticate&redirect_uri=https://submission.tmrjournals.com/orcidBind',
langArr: [
{ value: 'zh', label: '中文' },
{ value: 'en', label: 'English' }

View File

@@ -1,8 +1,8 @@
<script>
// const baseUrl = '/';
// const mediaUrl = 'http://api.tmrjournals.com/public/';
const mediaUrl = 'http://www.tougao.com/';
const baseUrl = 'http://www.tougao.com/';
const baseUrl = '/';
const mediaUrl = 'http://api.tmrjournals.com/public/';
// const mediaUrl = 'http://www.tougao.com/';
// const baseUrl = 'http://www.tougao.com/';
export default {
baseUrl,
mediaUrl

View File

@@ -4,7 +4,7 @@ const en = {
title: 'Submission System',
repassword:'Forgot your password?',
register:'Not registered yet? Register now.',
orcidlogin:'Login with your ORCID iD',
orcidlogin:'Login with your ORCID ID',
login:'Log in',
forgetpwd:'Find Your Password',
screen:'full screen',

View File

@@ -0,0 +1,98 @@
<template>
<div class="login-wrap" v-loading="loading">
</div>
</template>
<script>
export default {
data: function () {
return {
account: localStorage.getItem('ms_username'),
code: this.$route.query.code,
loading: true,
loginForm: {},
};
},
created: function () {
this.initLinkOrcid();
},
methods: {
initLinkOrcid() {
this.$api
.post('api/User/OrcidBinding', { code: this.code })
.then((res) => {
this.$message.success('Bind success');
this.$router.push('/');
})
.catch((err) => {
console.log(err);
});
}
}
};
</script>
<style>
.login-wrap {
position: relative;
width: 100%;
height: 100%;
background-image: url(../../assets/img/login-bg.jpg);
background-size: 100%;
padding-top: 80px;
}
.ms_login,
.ms_link {
width: 400px;
margin: 0 auto;
}
.ms_login .ms-title,
.ms_link .ms-title {
text-align: center;
font-size: 18px;
margin: 20px 0;
color: #fff;
}
.ms_notes {
width: 400px;
margin: 0 auto 60px auto;
padding: 20px 50px;
line-height: 24px;
background: rgba(255, 255, 255, 0.5);
color: #fe7300;
border-radius: 5px;
}
/* .ms_link {}
.ms_link .ms-title {} */
.ms_tab_n {
width: 500px;
margin: 0 auto;
border-radius: 5px;
padding-bottom: 30px;
background: rgba(255, 255, 255, 0.3);
}
.ms_tab_n .el-tabs__nav {
margin-left: 130px;
height: 60px;
padding-top: 25px;
}
.ms_tab_n .el-tabs__item {
font-size: 22px;
padding: 0 40px;
color: #fff;
}
.ms_tab_n .el-tabs__active-bar {
left: -22px;
width: 120px !important;
}
</style>

View File

@@ -186,8 +186,8 @@ export default {
.post('api/User/OrcidLogin', { code: this.code })
.then((res) => {
if (res.data.user == null) {
loginForm.orcid = res.data.orcid;
registerForm.orcid = res.data.orcid;
this.loginForm.orcid = res.data.orcid;
this.registerForm.orcid = res.data.orcid;
this.loading = false;
} else {
this.$message.success('Login success');

View File

@@ -221,6 +221,11 @@ export default new Router({
component:()=>import('../components/page/orcidLink.vue'),
meta:{title:'orcidLink'}
},
{
path:'/orcidBind',
component:()=>import('../components/page/orcidBind.vue'),
meta:{title:'orcidBind'}
},
{
path:'/thanks',
component:()=>import('../components/page/thanks.vue'),