提交 ef6a35b3 authored 作者: matian's avatar matian

feat:新增证书查询

上级 ade18ec8
差异被折叠。
...@@ -78,11 +78,12 @@ ...@@ -78,11 +78,12 @@
"bootstrap": "^4.5.3", "bootstrap": "^4.5.3",
"core-js": "^3.8.0", "core-js": "^3.8.0",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"element-ui": "^2.14.1", "element-ui": "^2.15.6",
"jquery": "^3.5.1", "jquery": "^3.5.1",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"lodash": "^4.17.20", "lodash": "^4.17.20",
"print-js": "^1.6.0",
"qrcode.vue": "^1.7.0", "qrcode.vue": "^1.7.0",
"swiper": "^6.3.5", "swiper": "^6.3.5",
"viewerjs": "^1.9.0", "viewerjs": "^1.9.0",
......
...@@ -15,4 +15,5 @@ export default class ArticleAction { ...@@ -15,4 +15,5 @@ export default class ArticleAction {
checkPay (id) { return articleApi.checkPay(id).then(res => res) } checkPay (id) { return articleApi.checkPay(id).then(res => res) }
payEnd (obj) { return articleApi.payEnd(obj).then(res => res) } payEnd (obj) { return articleApi.payEnd(obj).then(res => res) }
updateUserInfo (obj) { return articleApi.updateUserInfo(obj).then(res => res) } updateUserInfo (obj) { return articleApi.updateUserInfo(obj).then(res => res) }
getCard (obj) { return articleApi.getCard(obj).then(res => res) }
} }
...@@ -6,9 +6,9 @@ export default class ScoreAPI extends BaseAPI { ...@@ -6,9 +6,9 @@ export default class ScoreAPI extends BaseAPI {
// 获取文章 // 获取文章
getArticle = (obj = {}) => this.get('/api/microservices/api/article/list', obj, {}) getArticle = (obj = {}) => this.get('/api/microservices/api/article/list', obj, {})
// 获取文章详情 // 获取文章详情
getArticleDetail = (id) => this.get(`/api/microservices/api/article/${id}/info`) getArticleDetail = id => this.get(`/api/microservices/api/article/${id}/info`)
// formCommit = (data) => this.post('/api/microservices/api/form/commit', data) // formCommit = (data) => this.post('/api/microservices/api/form/commit', data)
formCommit = (data) => this.post('/api/microservices/api/v3/apply/teacher-form', data) formCommit = data => this.post('/api/microservices/api/v3/apply/teacher-form', data)
// 获取轮播 // 获取轮播
getBanner = (obj = {}) => this.get('/api/microservices/api/carousel/list', obj, {}) getBanner = (obj = {}) => this.get('/api/microservices/api/carousel/list', obj, {})
// 发送验证码 // 发送验证码
...@@ -26,9 +26,11 @@ export default class ScoreAPI extends BaseAPI { ...@@ -26,9 +26,11 @@ export default class ScoreAPI extends BaseAPI {
// 下单 // 下单
getOrder = (obj = {}) => this.post('/api/microservices/api/v3/apply/unified-order', obj) getOrder = (obj = {}) => this.post('/api/microservices/api/v3/apply/unified-order', obj)
// 查看订单状态 // 查看订单状态
checkPay = (id) => this.get(`/api/pay/v1/order/status/${id}`) checkPay = id => this.get(`/api/pay/v1/order/status/${id}`)
// 支付完成通知 // 支付完成通知
payEnd = (obj = {}) => this.post('/api/microservices/api/v3/apply/pay-end', obj) payEnd = (obj = {}) => this.post('/api/microservices/api/v3/apply/pay-end', obj)
// 更新用户信息 // 更新用户信息
updateUserInfo = (obj = {}) => this.post('/api/usercenter/user/update-user', obj) updateUserInfo = (obj = {}) => this.post('/api/usercenter/user/update-user', obj)
// 获取证书
getCard = (obj = {}) => this.get('/api/cert/api/v1/cert/detail', obj, {})
} }
...@@ -22,7 +22,8 @@ export default class Before { ...@@ -22,7 +22,8 @@ export default class Before {
/* 获取用户信息 */ /* 获取用户信息 */
isLogin() { isLogin() {
return cAction.loginAction.getInfo() return cAction.loginAction
.getInfo()
.then(res => { .then(res => {
if (res.code === 0) { if (res.code === 0) {
window.G.UserInfo = res.data window.G.UserInfo = res.data
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="colors"></div> <div class="colors"></div>
<div class="header-mian"> <div class="header-mian">
<div class="logo-box" @click="$router.push({ path: '/' })"> <div class="logo-box" @click="$router.push({ path: '/' })">
<img src="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/ezijing/logo/ezijing-logo.svg" alt=""> <img src="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/ezijing/logo/ezijing-logo.svg" alt="" />
<div class="logo-text"> <div class="logo-text">
<p>1+X金融产品数字化营销职业技能等级证书</p> <p>1+X金融产品数字化营销职业技能等级证书</p>
</div> </div>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</router-link> </router-link>
<div class="item-child"> <div class="item-child">
<template v-for="(chi, index2) in item.itemChi"> <template v-for="(chi, index2) in item.itemChi">
<div class="li" :key="'chi'+index2" @click="goPage(chi.path, chi.type)">{{ chi.title }}</div> <div class="li" :key="'chi' + index2" @click="goPage(chi.path, chi.type)">{{ chi.title }}</div>
</template> </template>
</div> </div>
</template> </template>
...@@ -153,10 +153,10 @@ export default { ...@@ -153,10 +153,10 @@ export default {
options: { options: {
baseUrl: webConf.url, baseUrl: webConf.url,
register: { register: {
data:{ data: {
username: `ezijing-${new Date().getTime()}` username: `ezijing-${new Date().getTime()}`
}, },
fields: ['account', 'code', 'password'], fields: ['account', 'code', 'password']
}, },
login: { login: {
account: { account: {
...@@ -171,20 +171,20 @@ export default { ...@@ -171,20 +171,20 @@ export default {
}, },
computed: { computed: {
passport() { passport() {
return this.$refs.passport return this.$refs.passport
}, },
isClassShow() { isClassShow() {
return (item) => { return item => {
return this.$route.path === item.path return this.$route.path === item.path
? 'active' ? 'active'
: item.children : item.children
? ((_this) => { ? (_this => {
const isPath = item.children.path.find(item => { const isPath = item.children.path.find(item => {
return item === _this.$route.path return item === _this.$route.path
}) })
return isPath && 'active' return isPath && 'active'
})(this) })(this)
: '' : ''
} }
} }
}, },
...@@ -195,7 +195,7 @@ export default { ...@@ -195,7 +195,7 @@ export default {
} }
} }
}, },
mounted() { mounted() {
// this.loginSuccess() // this.loginSuccess()
// console.log(JSON.parse(window.sessionStorage.userInfo)) // console.log(JSON.parse(window.sessionStorage.userInfo))
this.user = JSON.parse(window.sessionStorage.userInfo) this.user = JSON.parse(window.sessionStorage.userInfo)
...@@ -228,10 +228,15 @@ export default { ...@@ -228,10 +228,15 @@ export default {
this.passport.logout() this.passport.logout()
this.isLogin = false this.isLogin = false
window.G.UserInfo = {} window.G.UserInfo = {}
// window.sessionStorage.userInfo = JSON.stringify({}) if (this.$route.path !== '/index') {
this.$router.go(0) window.sessionStorage.userInfo = {}
// window.location.href = window.location.href this.user = {}
// this.$router.push('/') this.$router.push('/')
} else {
window.sessionStorage.userInfo = {}
this.user = {}
this.$router.go(0)
}
}, },
onReady(isLogin, user = {}) { onReady(isLogin, user = {}) {
// this.isLogin = isLogin // this.isLogin = isLogin
...@@ -247,6 +252,7 @@ export default { ...@@ -247,6 +252,7 @@ export default {
// window.G.UserInfo = user // window.G.UserInfo = user
// this.$router.go(0) // this.$router.go(0)
this.$router.push('/my') this.$router.push('/my')
window.location.reload()
}) })
} }
} }
...@@ -254,23 +260,23 @@ export default { ...@@ -254,23 +260,23 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.home-head{ .home-head {
img{ img {
width: 100%; width: 100%;
display: block; display: block;
// height: 240px; // height: 240px;
} }
} }
.nav-box{ .nav-box {
position: relative; position: relative;
height: 70px; height: 70px;
background: #A81A42; background: #a81a42;
} }
.app-header{ .app-header {
// position: relative; // position: relative;
// height: 70px; // height: 70px;
// background: #A81A42; // background: #A81A42;
.colors{ .colors {
background: #fff; background: #fff;
width: 50%; width: 50%;
height: 100%; height: 100%;
...@@ -278,29 +284,29 @@ export default { ...@@ -278,29 +284,29 @@ export default {
top: 0; top: 0;
left: 0; left: 0;
} }
.header-mian{ .header-mian {
width: 1200px; width: 1200px;
margin: 0 auto; margin: 0 auto;
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
.login{ .login {
margin-left: auto; margin-left: auto;
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
.login-name{ .login-name {
display: flex; display: flex;
.name{ .name {
width: 100px; width: 100px;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
text-align: right; text-align: right;
margin-right: 10px; margin-right: 10px;
} }
} }
} }
.logo-box{ .logo-box {
cursor: pointer; cursor: pointer;
position: relative; position: relative;
z-index: 1; z-index: 1;
...@@ -310,12 +316,12 @@ export default { ...@@ -310,12 +316,12 @@ export default {
// justify-content: center; // justify-content: center;
height: 100%; height: 100%;
background: #fff; background: #fff;
img{ img {
width: 119px; width: 119px;
height: 40px; height: 40px;
margin-right: 40px; margin-right: 40px;
} }
.logo-text{ .logo-text {
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
color: #444; color: #444;
...@@ -323,50 +329,50 @@ export default { ...@@ -323,50 +329,50 @@ export default {
line-height: 25px; line-height: 25px;
} }
} }
.nav-box{ .nav-box {
position: relative; position: relative;
z-index: 9; z-index: 9;
background: #A81A42; background: #a81a42;
padding-left: 60px; padding-left: 60px;
display: flex; display: flex;
align-items: center; align-items: center;
li{ li {
font-size: 14px; font-size: 14px;
color: #FFFFFF; color: #ffffff;
margin-right: 36px; margin-right: 36px;
position: relative; position: relative;
span{ span {
position: relative; position: relative;
z-index: 99; z-index: 99;
} }
&.active{ &.active {
font-weight: bold; font-weight: bold;
} }
&:hover{ &:hover {
.item-child{ .item-child {
display: block; display: block;
} }
} }
.item-child{ .item-child {
display: none; display: none;
width: 128px; width: 128px;
position: absolute; position: absolute;
top:0; top: 0;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
z-index: 9; z-index: 9;
padding-top: 26px; padding-top: 26px;
.li{ .li {
width: 100%; width: 100%;
height: 44px; height: 44px;
border-top: 1px solid rgba(221,221,221,0.2); border-top: 1px solid rgba(221, 221, 221, 0.2);
text-align: center; text-align: center;
line-height: 44px; line-height: 44px;
color: #fff; color: #fff;
background: #A81A42; background: #a81a42;
font-weight: normal !important; font-weight: normal !important;
cursor: pointer; cursor: pointer;
&:nth-child(1){ &:nth-child(1) {
border: none; border: none;
} }
} }
......
...@@ -3,21 +3,20 @@ import VuePassport from '@ezijing/vue-passport' ...@@ -3,21 +3,20 @@ import VuePassport from '@ezijing/vue-passport'
import '@ezijing/vue-passport/dist/vue-passport.css' import '@ezijing/vue-passport/dist/vue-passport.css'
import VueForm from '@ezijing/vue-form' import VueForm from '@ezijing/vue-form'
import '@ezijing/vue-form/dist/vue-form.css' import '@ezijing/vue-form/dist/vue-form.css'
import Element from 'element-ui' // 引入 element-ui 框架
import './style.scss' // 定义 element-ui主题色 + 公共样式 import './style.scss' // 定义 element-ui主题色 + 公共样式
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import router from './router' // router定义 import router from './router' // router定义
import store from './store' import store from './store'
import App from './app.vue' import App from './app.vue'
import Calendar from 'vue-mobile-calendar' import Calendar from 'vue-mobile-calendar'
Vue.use(Calendar)
// import cTool from '@tool' // import cTool from '@tool'
/* 引入 md5 */ /* 引入 md5 */
import md5 from 'js-md5' import md5 from 'js-md5'
/* 定义全局变量 */ /* 定义全局变量 */
import BeforeRouter from './components/before' import BeforeRouter from './components/before'
Vue.use(Calendar)
Vue.use(Element) Vue.use(ElementUI)
Vue.use(VueForm) Vue.use(VueForm)
Vue.use(VuePassport) Vue.use(VuePassport)
/* 设置全局变量 */ /* 设置全局变量 */
......
...@@ -33,124 +33,120 @@ ...@@ -33,124 +33,120 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
const checkPhone = (rule, value, callback) => { const checkPhone = (rule, value, callback) => {
const reg = /^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\d{8}$/; const reg = /^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\d{8}$/
if(!reg.test(value)){ if (!reg.test(value)) {
return callback(new Error()) return callback(new Error())
}
} }
const checkCodeId = (rule, value, callback) => { }
const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; const checkCodeId = (rule, value, callback) => {
if(!reg.test(value)){ const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
return callback(new Error()) if (!reg.test(value)) {
} return callback(new Error())
} }
const validatePass = (rule, value, callback) => { }
if (value === '') { const validatePass = (rule, value, callback) => {
callback(new Error('请输入密码!')) if (value === '') {
} else { callback(new Error('请输入密码!'))
if (this.ruleForm.checkPass !== '') { } else {
this.$refs.ruleForm.validateField('checkPass') if (this.ruleForm.checkPass !== '') {
} this.$refs.ruleForm.validateField('checkPass')
callback()
} }
callback()
} }
const validatePass2 = (rule, value, callback) => { }
if (value === '') { const validatePass2 = (rule, value, callback) => {
callback(new Error('请再次输入密码')) if (value === '') {
} else if (value !== this.ruleForm.pass) { callback(new Error('请再次输入密码'))
callback(new Error('两次输入密码不一致!')) } else if (value !== this.ruleForm.pass) {
} else { callback(new Error('两次输入密码不一致!'))
callback() } else {
} callback()
} }
return { }
ruleForm: { return {
name: '', ruleForm: {
region: '', name: '',
phone: '', region: '',
codeId: '', phone: '',
delivery: false, codeId: '',
type: [], delivery: false,
checkPass: '', type: [],
pass: '', checkPass: '',
code: '' pass: '',
}, code: ''
rules: {
name: [
{ required: true, message: '请输入姓名', trigger: 'blur' }
],
region: [
{ required: true, message: '请选择学校', trigger: 'change' }
],
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{ required: true, message: '手机号不正确', validator: checkPhone, trigger: 'blur' }
],
code: [
{ required: true, message: '请输入验证码', trigger: 'blur' },
{ validator: validatePass, trigger: 'blur' }
],
codeId: [
{ required: true, message: '请输入身份证号', trigger: 'blur' },
{ required: true, message: '身份证号不正确', validator: checkCodeId, trigger: 'blur' }
],
pass: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{ validator: validatePass, trigger: 'blur' }
],
checkPass: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{ validator: validatePass2, trigger: 'blur' }
]
}
};
},
methods: {
isRules(n) {
console.log(n)
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!');
} else {
console.log('error submit!!');
return false;
}
});
}, },
resetForm(formName) { rules: {
this.$refs[formName].resetFields(); name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
region: [{ required: true, message: '请选择学校', trigger: 'change' }],
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{ required: true, message: '手机号不正确', validator: checkPhone, trigger: 'blur' }
],
code: [
{ required: true, message: '请输入验证码', trigger: 'blur' },
{ validator: validatePass, trigger: 'blur' }
],
codeId: [
{ required: true, message: '请输入身份证号', trigger: 'blur' },
{ required: true, message: '身份证号不正确', validator: checkCodeId, trigger: 'blur' }
],
pass: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{ validator: validatePass, trigger: 'blur' }
],
checkPass: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{ validator: validatePass2, trigger: 'blur' }
]
} }
} }
},
methods: {
isRules(n) {
console.log(n)
},
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
alert('submit!')
} else {
console.log('error submit!!')
return false
}
})
},
resetForm(formName) {
this.$refs[formName].resetFields()
}
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.reg-form-box{ .reg-form-box {
width: 380px; width: 380px;
margin: 0 auto; margin: 0 auto;
padding: 24px 0; padding: 24px 0;
.width100{ .width100 {
width: 100%; width: 100%;
} }
} }
::v-deep{ ::v-deep {
.forms{ .forms {
i { i {
font-size: 20px; font-size: 20px;
} }
input{ input {
border-radius: 4px; border-radius: 4px;
} }
} }
} }
.sub-btn{ .sub-btn {
width: 270px; width: 270px;
height: 40px; height: 40px;
background: linear-gradient(315deg, rgba(225, 47, 116, 0.83) 0%, #C01540 100%); background: linear-gradient(315deg, rgba(225, 47, 116, 0.83) 0%, #c01540 100%);
border-radius: 4px; border-radius: 4px;
} }
</style> </style>
差异被折叠。
差异被折叠。
<template>
<div>
<div class="home-box" v-if="cardListMap.length > 0">
<!-- <haedBanner></haedBanner> -->
<div>
<div v-for="(item, index) in cardListMap" :key="index" class="home-box-content">
<div class="home-box-content-btn">
<el-button round class="btn" @click="handlePrint(item)">打印</el-button>
<a :href="item.download_info.url" :download="item.download_info.filename" target="_blank"
><el-button round class="btn">下载</el-button></a
>
<!-- <el-button round class="btn" @click="handleDownload(item)">下载</el-button> -->
</div>
<div class="home-box-content-list">
<img class="home-box-content-img" :src="item.download_info.url" alt="" />
</div>
</div>
</div>
</div>
<div class="home-box-else" v-else>
<!-- 暂无信息 -->
<el-result title="暂无信息" icon="info" class="el-result"> </el-result>
</div>
</div>
</template>
<script>
import printJS from 'print-js'
import action from '@action'
export default {
data() {
return {
exportPDFtitle: '结业证书',
cardList: []
}
},
computed: {
cardListMap() {
return this.cardList.filter(item => item.status === 2)
}
},
methods: {
// 获取证书列表
handleGetCard() {
const params = { project_prefix: 'x1' }
action.articleAction.getCard(params).then(res => {
this.cardList = res.data.list
})
},
// 打印
handlePrint(item) {
printJS(item.download_info.url, 'image')
}
// 下载
// handleDownload(item) {
// window.open(item.download_info.url, '_blank')
// }
},
mounted() {
// 获取证书
this.handleGetCard()
}
}
</script>
<style lang="scss" scoped>
.content-max-width {
width: 1200px;
margin: 0 auto;
overflow: scroll;
height: 100vh;
}
.home-box {
width: 1100px;
// background: #f8f8f8;
margin: 100px auto;
text-align: center;
.home-box-content {
display: flex;
justify-content: center;
align-items: flex-end;
flex-direction: column;
padding: 20px 0 20px 0;
.home-box-content-btn {
align-self: flex-end;
.btn {
background: #a81a42;
color: #fff;
width: 150px;
height: 50px;
}
}
.home-box-content-list {
width: 1100px;
margin-top: 20px;
.home-box-content-img {
width: 100%;
display: block;
}
}
}
}
.home-box-else {
width: 1200px;
height: calc(100vh - 300px);
margin: auto;
text-align: center;
position: relative;
.el-result {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
</style>
...@@ -35,7 +35,8 @@ export default [ ...@@ -35,7 +35,8 @@ export default [
{ path: '/hall', component: () => import('@/pages/hall/index.vue') }, { path: '/hall', component: () => import('@/pages/hall/index.vue') },
// 教学服务 // 教学服务
{ path: '/service', component: () => import('@/pages/service/index.vue') }, { path: '/service', component: () => import('@/pages/service/index.vue') },
{ path: '/introduce', component: () => import('@/pages/home/newIntroduce.vue') } { path: '/introduce', component: () => import('@/pages/home/newIntroduce.vue') },
{ path: '/queryCard', component: () => import('@/pages/home/queryCard.vue') }
] ]
}, },
// 考核站点详情 // 考核站点详情
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论