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

feat:新增证书查询

上级 ade18ec8
差异被折叠。
......@@ -78,11 +78,12 @@
"bootstrap": "^4.5.3",
"core-js": "^3.8.0",
"cross-env": "^7.0.2",
"element-ui": "^2.14.1",
"element-ui": "^2.15.6",
"jquery": "^3.5.1",
"js-cookie": "^2.2.1",
"js-md5": "^0.7.3",
"lodash": "^4.17.20",
"print-js": "^1.6.0",
"qrcode.vue": "^1.7.0",
"swiper": "^6.3.5",
"viewerjs": "^1.9.0",
......
......@@ -15,4 +15,5 @@ export default class ArticleAction {
checkPay (id) { return articleApi.checkPay(id).then(res => res) }
payEnd (obj) { return articleApi.payEnd(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 {
// 获取文章
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/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, {})
// 发送验证码
......@@ -26,9 +26,11 @@ export default class ScoreAPI extends BaseAPI {
// 下单
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)
// 更新用户信息
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 {
/* 获取用户信息 */
isLogin() {
return cAction.loginAction.getInfo()
return cAction.loginAction
.getInfo()
.then(res => {
if (res.code === 0) {
window.G.UserInfo = res.data
......
......@@ -4,7 +4,7 @@
<div class="colors"></div>
<div class="header-mian">
<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">
<p>1+X金融产品数字化营销职业技能等级证书</p>
</div>
......@@ -27,7 +27,7 @@
</router-link>
<div class="item-child">
<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>
</div>
</template>
......@@ -153,10 +153,10 @@ export default {
options: {
baseUrl: webConf.url,
register: {
data:{
data: {
username: `ezijing-${new Date().getTime()}`
},
fields: ['account', 'code', 'password'],
fields: ['account', 'code', 'password']
},
login: {
account: {
......@@ -174,11 +174,11 @@ export default {
return this.$refs.passport
},
isClassShow() {
return (item) => {
return item => {
return this.$route.path === item.path
? 'active'
: item.children
? ((_this) => {
? (_this => {
const isPath = item.children.path.find(item => {
return item === _this.$route.path
})
......@@ -228,10 +228,15 @@ export default {
this.passport.logout()
this.isLogin = false
window.G.UserInfo = {}
// window.sessionStorage.userInfo = JSON.stringify({})
if (this.$route.path !== '/index') {
window.sessionStorage.userInfo = {}
this.user = {}
this.$router.push('/')
} else {
window.sessionStorage.userInfo = {}
this.user = {}
this.$router.go(0)
// window.location.href = window.location.href
// this.$router.push('/')
}
},
onReady(isLogin, user = {}) {
// this.isLogin = isLogin
......@@ -247,6 +252,7 @@ export default {
// window.G.UserInfo = user
// this.$router.go(0)
this.$router.push('/my')
window.location.reload()
})
}
}
......@@ -254,23 +260,23 @@ export default {
</script>
<style lang="scss" scoped>
.home-head{
img{
.home-head {
img {
width: 100%;
display: block;
// height: 240px;
}
}
.nav-box{
.nav-box {
position: relative;
height: 70px;
background: #A81A42;
background: #a81a42;
}
.app-header{
.app-header {
// position: relative;
// height: 70px;
// background: #A81A42;
.colors{
.colors {
background: #fff;
width: 50%;
height: 100%;
......@@ -278,29 +284,29 @@ export default {
top: 0;
left: 0;
}
.header-mian{
.header-mian {
width: 1200px;
margin: 0 auto;
height: 100%;
display: flex;
align-items: center;
.login{
.login {
margin-left: auto;
color: #fff;
cursor: pointer;
.login-name{
.login-name {
display: flex;
.name{
.name {
width: 100px;
overflow: hidden;
text-overflow:ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right;
margin-right: 10px;
}
}
}
.logo-box{
.logo-box {
cursor: pointer;
position: relative;
z-index: 1;
......@@ -310,12 +316,12 @@ export default {
// justify-content: center;
height: 100%;
background: #fff;
img{
img {
width: 119px;
height: 40px;
margin-right: 40px;
}
.logo-text{
.logo-text {
text-align: center;
font-size: 18px;
color: #444;
......@@ -323,50 +329,50 @@ export default {
line-height: 25px;
}
}
.nav-box{
.nav-box {
position: relative;
z-index: 9;
background: #A81A42;
background: #a81a42;
padding-left: 60px;
display: flex;
align-items: center;
li{
li {
font-size: 14px;
color: #FFFFFF;
color: #ffffff;
margin-right: 36px;
position: relative;
span{
span {
position: relative;
z-index: 99;
}
&.active{
&.active {
font-weight: bold;
}
&:hover{
.item-child{
&:hover {
.item-child {
display: block;
}
}
.item-child{
.item-child {
display: none;
width: 128px;
position: absolute;
top:0;
top: 0;
left: 50%;
transform: translateX(-50%);
z-index: 9;
padding-top: 26px;
.li{
.li {
width: 100%;
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;
line-height: 44px;
color: #fff;
background: #A81A42;
background: #a81a42;
font-weight: normal !important;
cursor: pointer;
&:nth-child(1){
&:nth-child(1) {
border: none;
}
}
......
......@@ -3,21 +3,20 @@ import VuePassport from '@ezijing/vue-passport'
import '@ezijing/vue-passport/dist/vue-passport.css'
import VueForm from '@ezijing/vue-form'
import '@ezijing/vue-form/dist/vue-form.css'
import Element from 'element-ui' // 引入 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 store from './store'
import App from './app.vue'
import Calendar from 'vue-mobile-calendar'
Vue.use(Calendar)
// import cTool from '@tool'
/* 引入 md5 */
import md5 from 'js-md5'
/* 定义全局变量 */
import BeforeRouter from './components/before'
Vue.use(Element)
Vue.use(Calendar)
Vue.use(ElementUI)
Vue.use(VueForm)
Vue.use(VuePassport)
/* 设置全局变量 */
......
......@@ -33,17 +33,17 @@
</div>
</template>
<script>
export default {
export default {
data() {
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}$/;
if(!reg.test(value)){
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)) {
return callback(new Error())
}
}
const checkCodeId = (rule, value, callback) => {
const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if(!reg.test(value)){
const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
if (!reg.test(value)) {
return callback(new Error())
}
}
......@@ -79,12 +79,8 @@
code: ''
},
rules: {
name: [
{ required: true, message: '请输入姓名', trigger: 'blur' }
],
region: [
{ required: true, message: '请选择学校', trigger: 'change' }
],
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' }
......@@ -106,51 +102,51 @@
{ validator: validatePass2, trigger: 'blur' }
]
}
};
}
},
methods: {
isRules(n) {
console.log(n)
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
this.$refs[formName].validate(valid => {
if (valid) {
alert('submit!');
alert('submit!')
} else {
console.log('error submit!!');
return false;
console.log('error submit!!')
return false
}
});
})
},
resetForm(formName) {
this.$refs[formName].resetFields();
}
this.$refs[formName].resetFields()
}
}
}
</script>
<style lang="scss" scoped>
.reg-form-box{
.reg-form-box {
width: 380px;
margin: 0 auto;
padding: 24px 0;
.width100{
.width100 {
width: 100%;
}
}
::v-deep{
.forms{
::v-deep {
.forms {
i {
font-size: 20px;
}
input{
input {
border-radius: 4px;
}
}
}
.sub-btn{
.sub-btn {
width: 270px;
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;
}
</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 [
{ path: '/hall', component: () => import('@/pages/hall/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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论