1
This commit is contained in:
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 })
|
||||
.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');
|
||||
|
||||
Reference in New Issue
Block a user