提交 30508f54 authored 作者: 王鹏飞's avatar 王鹏飞

增加学员须知

上级 314a761d
...@@ -44,4 +44,12 @@ export default class OtherAction extends BaseACTION { ...@@ -44,4 +44,12 @@ export default class OtherAction extends BaseACTION {
* 修改用户信息 * 修改用户信息
*/ */
updateUser (obj) { return Other.updateUser(obj).then(res => res) } updateUser (obj) { return Other.updateUser(obj).then(res => res) }
/**
* 签名
*/
createSign (obj) { return Other.createSign(obj).then(res => res) }
/**
* 获取签名文档
*/
getSignDocument (obj) { return Other.getSignDocument(obj).then(res => res) }
} }
...@@ -10,14 +10,13 @@ export default class OtherAPI extends BaseAPI { ...@@ -10,14 +10,13 @@ export default class OtherAPI extends BaseAPI {
/** /**
* 获取我的消息信息 * 获取我的消息信息
*/ */
getMyMsg = (obj) => this.get('/api/lms/v2/education/message/my', obj, {}) getMyMsg = obj => this.get('/api/lms/v2/education/message/my', obj, {})
/** /**
* 标记已读未读 * 标记已读未读
*/ */
setMyMsg = (rid) => this.post(`/api/lms/v2/education/message/${rid}`, {}) setMyMsg = rid => this.post(`/api/lms/v2/education/message/${rid}`, {})
getNavMsg = (rid) => getNavMsg = rid => this.get(`/api/lms/v2/education/message/num?v=${new Date().getTime()}`, {})
this.get(`/api/lms/v2/education/message/num?v=${new Date().getTime()}`, {})
/** /**
* 调用退出登录 * 调用退出登录
...@@ -40,11 +39,9 @@ export default class OtherAPI extends BaseAPI { ...@@ -40,11 +39,9 @@ export default class OtherAPI extends BaseAPI {
* @param {[string]} obj.service 这里 一直是定值 h5.ezijing.com * @param {[string]} obj.service 这里 一直是定值 h5.ezijing.com
*/ */
updatePwd = (obj = {}) => updatePwd = (obj = {}) =>
this.post( this.post('/api/usercenter/user/change-pwd-by-cookie', _.assignIn(obj, { service: 'h5.ezijing.com' }), {
'/api/usercenter/user/change-pwd-by-cookie', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
_.assignIn(obj, { service: 'h5.ezijing.com' }), })
{ headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }
)
/** /**
* 个人信息 - 上传头像 * 个人信息 - 上传头像
...@@ -53,4 +50,14 @@ export default class OtherAPI extends BaseAPI { ...@@ -53,4 +50,14 @@ export default class OtherAPI extends BaseAPI {
this.post('/api/usercenter/user/update-user', obj, { this.post('/api/usercenter/user/update-user', obj, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' } headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
}) })
/**
* 签名
*/
createSign = () => this.post('/api/usercenter/v1/sign/sign')
/**
* 获取签名文档
*/
getSignDocument = (obj = {}) => this.get('/api/usercenter/v1/sign/document', obj)
} }
...@@ -5,12 +5,38 @@ ...@@ -5,12 +5,38 @@
<div class="text-title" @click="setStatus">{{ $t('components.learnSysLayout.navigation.title') }}</div> <div class="text-title" @click="setStatus">{{ $t('components.learnSysLayout.navigation.title') }}</div>
</div> </div>
<div class="nav-right"> <div class="nav-right">
<div class="nav-a">
<a :href="documentUrl" target="_blank">查看学员手册</a>
<a href="https://library.ciis.edu" target="_blank">电子图书馆</a>
</div>
<div class="notify" @click="goNotify()"> <div class="notify" @click="goNotify()">
{{ $t('components.learnSysLayout.navigation.tip') }} {{ $t('components.learnSysLayout.navigation.tip') }}
<div class="num" v-if="this.$store.getters.myMsg != 0">{{ this.$store.getters.myMsg }}</div> <div class="num" v-if="this.$store.getters.myMsg != 0">{{ this.$store.getters.myMsg }}</div>
</div> </div>
<language-switch /> <language-switch />
</div> </div>
<el-dialog
title="学员须知"
width="460px"
:visible.sync="dialogVisible"
:center="true"
:append-to-body="true"
@close="handleClose"
>
<div class="sign">
<p>
使用学习平台前,请认真阅读<a
href="https://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/pc/ciis/CIIS%E5%AD%A6%E7%94%9F%E6%89%8B%E5%86%8C.pdf"
target="_blank"
>《紫荆教育-CIIS应用心理学硕士项目学员手册》</a
>内容,并同意遵守其中的各项要求。
</p>
<el-checkbox v-model="checked">我已阅读并同意</el-checkbox>
</div>
<template #footer>
<el-button type="primary" :disabled="!checked" @click="handlePrimary">确 定</el-button>
</template>
</el-dialog>
</div> </div>
</template> </template>
...@@ -22,7 +48,11 @@ export default { ...@@ -22,7 +48,11 @@ export default {
components: { LanguageSwitch }, components: { LanguageSwitch },
data() { data() {
return { return {
num: this.$store.getters.myMsg num: this.$store.getters.myMsg,
dialogVisible: false,
checked: false,
sign: {},
documentUrl: ''
} }
}, },
mounted() { mounted() {
...@@ -46,7 +76,61 @@ export default { ...@@ -46,7 +76,61 @@ export default {
this.status = true this.status = true
} }
this.$root.$emit('updateStatus', this.status) this.$root.$emit('updateStatus', this.status)
},
createSign() {
cAction.Other.createSign().then(response => {
const { code, data } = response
if (code === 1) {
this.sign = data
this.getSignDocument(data.flowid).then(() => {
if (!this.documentUrl) {
this.dialogVisible = true
}
})
} else {
this.$message({ type: 'error', message: '处理签名失败' })
}
})
},
getSignDocument(flowid) {
return cAction.Other.getSignDocument({ flowid }).then(response => {
const { code, data } = response
if (code === 1) {
this.documentUrl = data.url
}
return response
})
},
handlePrimary() {
this.getSignDocument(this.sign.flowid).then(response => {
if (this.documentUrl) {
this.dialogVisible = false
} else {
this.newWindowPreview(this.sign.shortUrl)
}
})
},
handleClose() {
this.getSignDocument(this.sign.flowid).then(response => {
if (this.documentUrl) {
this.dialogVisible = false
} else {
window.location.href = webConf.others.loginUrl
}
})
},
// 新窗口预览
newWindowPreview(url) {
const a = document.createElement('a')
a.href = url
a.target = '_blank'
document.body.appendChild(a)
a.click()
a.remove()
} }
},
beforeMount() {
this.createSign()
} }
} }
</script> </script>
...@@ -116,4 +200,15 @@ export default { ...@@ -116,4 +200,15 @@ export default {
} }
} }
} }
.sign {
p {
text-indent: 2em;
line-height: 24px;
}
}
.nav-a {
a {
margin: 0 10px;
}
}
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论