1
This commit is contained in:
@@ -7,8 +7,8 @@ import qs from 'qs'
|
|||||||
// axios全局配置
|
// axios全局配置
|
||||||
axios.defaults.timeout = 10000 // 超时时间
|
axios.defaults.timeout = 10000 // 超时时间
|
||||||
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' // 配置请求头
|
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' // 配置请求头
|
||||||
axios.defaults.baseURL = 'http://www.tougao.com/'
|
// axios.defaults.baseURL = 'http://www.tougao.com/'
|
||||||
// axios.defaults.baseURL = '/'
|
axios.defaults.baseURL = '/'
|
||||||
|
|
||||||
// 添加响应拦截器,统一处理服务器响应和异常
|
// 添加响应拦截器,统一处理服务器响应和异常
|
||||||
axios.interceptors.response.use(
|
axios.interceptors.response.use(
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export default {
|
|||||||
hasorcie: false,
|
hasorcie: false,
|
||||||
orcid: '',
|
orcid: '',
|
||||||
orcidLink:
|
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: [
|
langArr: [
|
||||||
{ value: 'zh', label: '中文' },
|
{ value: 'zh', label: '中文' },
|
||||||
{ value: 'en', label: 'English' }
|
{ value: 'en', label: 'English' }
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
// const baseUrl = '/';
|
const baseUrl = '/';
|
||||||
// const mediaUrl = 'http://api.tmrjournals.com/public/';
|
const mediaUrl = 'http://api.tmrjournals.com/public/';
|
||||||
const mediaUrl = 'http://www.tougao.com/';
|
// const mediaUrl = 'http://www.tougao.com/';
|
||||||
const baseUrl = 'http://www.tougao.com/';
|
// const baseUrl = 'http://www.tougao.com/';
|
||||||
export default {
|
export default {
|
||||||
baseUrl,
|
baseUrl,
|
||||||
mediaUrl
|
mediaUrl
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ const en = {
|
|||||||
title: 'Submission System',
|
title: 'Submission System',
|
||||||
repassword:'Forgot your password?',
|
repassword:'Forgot your password?',
|
||||||
register:'Not registered yet? Register now.',
|
register:'Not registered yet? Register now.',
|
||||||
orcidlogin:'Login with your ORCID iD',
|
orcidlogin:'Login with your ORCID ID',
|
||||||
login:'Log in',
|
login:'Log in',
|
||||||
forgetpwd:'Find Your Password',
|
forgetpwd:'Find Your Password',
|
||||||
screen:'full screen',
|
screen:'full screen',
|
||||||
|
|||||||
98
src/components/page/orcidBind.vue
Normal file
98
src/components/page/orcidBind.vue
Normal 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>
|
||||||
@@ -186,8 +186,8 @@ export default {
|
|||||||
.post('api/User/OrcidLogin', { code: this.code })
|
.post('api/User/OrcidLogin', { code: this.code })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.user == null) {
|
if (res.data.user == null) {
|
||||||
loginForm.orcid = res.data.orcid;
|
this.loginForm.orcid = res.data.orcid;
|
||||||
registerForm.orcid = res.data.orcid;
|
this.registerForm.orcid = res.data.orcid;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
} else {
|
} else {
|
||||||
this.$message.success('Login success');
|
this.$message.success('Login success');
|
||||||
|
|||||||
@@ -221,6 +221,11 @@ export default new Router({
|
|||||||
component:()=>import('../components/page/orcidLink.vue'),
|
component:()=>import('../components/page/orcidLink.vue'),
|
||||||
meta:{title:'orcidLink'}
|
meta:{title:'orcidLink'}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path:'/orcidBind',
|
||||||
|
component:()=>import('../components/page/orcidBind.vue'),
|
||||||
|
meta:{title:'orcidBind'}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path:'/thanks',
|
path:'/thanks',
|
||||||
component:()=>import('../components/page/thanks.vue'),
|
component:()=>import('../components/page/thanks.vue'),
|
||||||
|
|||||||
Reference in New Issue
Block a user