提交 63425f38 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 持续优化

上级 fdd0191e
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "client-dist"],
"vueCompilerOptions": {
"target": 2.7
}
}
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"@ezijing/vue-passport": "^1.0.3", "@ezijing/vue-passport": "^1.0.3",
"axios": "^1.5.0", "axios": "^1.5.0",
"element-ui": "^2.15.14", "element-ui": "^2.15.14",
"file-saver": "^2.0.5",
"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",
...@@ -1827,6 +1828,11 @@ ...@@ -1827,6 +1828,11 @@
"node": "^10.12.0 || >=12.0.0" "node": "^10.12.0 || >=12.0.0"
} }
}, },
"node_modules/file-saver": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
"integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
},
"node_modules/fill-range": { "node_modules/fill-range": {
"version": "7.1.1", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
...@@ -5225,6 +5231,11 @@ ...@@ -5225,6 +5231,11 @@
"flat-cache": "^3.0.4" "flat-cache": "^3.0.4"
} }
}, },
"file-saver": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
"integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
},
"fill-range": { "fill-range": {
"version": "7.1.1", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"@ezijing/vue-passport": "^1.0.3", "@ezijing/vue-passport": "^1.0.3",
"axios": "^1.5.0", "axios": "^1.5.0",
"element-ui": "^2.15.14", "element-ui": "^2.15.14",
"file-saver": "^2.0.5",
"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",
......
import { loginApi } from '@api'
// import tools from '@tool'
// import hmacSHA256 from 'crypto-js/hmac-sha256'
// import Base64 from 'crypto-js/enc-base64'
export default class LoginAction {
/**
* 当前登录用户,检测是否该系统有权限
*/
getInfo () { return loginApi.getInfo().then(res => res) }
/**
* 调用登录接口
*/
userLogin (obj) {
return loginApi.userLogin(obj).then(res => {
// /* 设置cookie */
// let expires = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000)
// // 翻转、加盐、base64
// const salt = '0ZSGxuBkSJS5'
// let sup = res.ticket.split('').reverse().join('')
// let rad = Math.random()
// let token = salt + sup + rad
// sup = new Buffer(token).toString('base64') // eslint-disable-line
// // yii格式加密 hmac sha256
// let serialize = `a:2:{i:0;s:4:"_SUP";i:1;s:${sup.length}:"${sup}";}`
// let hamc = Base64.stringify(hmacSHA256(serialize, 'VzpR5JMDNqUsOZ0IFQARNLU9_0KLr9UC'))
// sup = encodeURIComponent(hamc + serialize)
// // 设置到cookie
// let opts = { path: '/', domain: '.ezijing.com', expires: expires }
// tools.cookies.setCookie('_SUP', sup, opts)
// result.data.uid = result.data.sso_id
// callback(res) // 可以不使用callback 因为使用then
return res
})
}
/**
* 调用退出登录接口
*/
outLogin () {
return loginApi.outLogin().then(res => {
if (res.status === 200) {
// tools.cookies.clearCookie('_SUP', { path: '/', domain: '.ezijing.com', expires: '' })
return 'login-3'
} else {
return 'nologin-2'
}
})
}
/**
* 调用获取验证码
*/
sendCode (obj) { return loginApi.sendCode(obj).then(res => res) }
/**
* 调用验证码登录
*/
codeLogin (obj) {
return loginApi.codeLogin(obj).then(res => {
// /* 设置cookie */
// let expires = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000)
// // 翻转、加盐、base64
// const salt = '0ZSGxuBkSJS5'
// let sup = res.ticket.split('').reverse().join('')
// let rad = Math.random()
// let token = salt + sup + rad
// sup = new Buffer(token).toString('base64') // eslint-disable-line
// // yii格式加密 hmac sha256
// let serialize = `a:2:{i:0;s:4:"_SUP";i:1;s:${sup.length}:"${sup}";}`
// let hamc = Base64.stringify(hmacSHA256(serialize, 'VzpR5JMDNqUsOZ0IFQARNLU9_0KLr9UC'))
// sup = encodeURIComponent(hamc + serialize)
// // 设置到cookie
// let opts = { path: '/', domain: '.ezijing.com', expires: expires }
// tools.cookies.setCookie('_SUP', sup, opts)
// result.data.uid = result.data.sso_id
// callback(res) // 可以不使用callback 因为使用then
return res
})
}
/**
* 调用发送重置密码验证码
*/
sendResetPwdCode (obj) { return loginApi.sendResetPwdCode(obj).then(res => res) }
/**
* 调用重置密码验证码确认
*/
validateCode (obj) { return loginApi.validateCode(obj).then(res => res) }
/**
* 调用重置密码
*/
resetPwd (obj) { return loginApi.resetPwd(obj).then(res => res) }
/**
* 调用个人信心 - 修改密码
*/
updatePwd (obj) { return loginApi.updatePwd(obj).then(res => res) }
/**
* 调用个人信息 - 上传头像
*/
updatePic (obj) { return loginApi.updatePic(obj).then(res => res) }
}
const axios = require('axios')
// axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded';
// axios.defaults.withCredentials = true
const ax = axios.create({
withCredentials: false
})
// login
export function queryInformation(param) {
return axios({
method: 'GET',
// url: host.main + path.queryInformation,
url: '/api/zws/v1/enrollment/submissions',
params: {
project_id: 1000,
name: 'hhahah'
}
})
.then(function(response) {
console.log(response)
})
.catch(function(error) {
console.log(error)
})
}
export function introduction(params) {
// 获取所有介绍内容
return ax({
method: 'GET',
url: '/api/zws/v1/cms/projects/1000/contents/' + params.tag
})
.then(function(response) {
params.cb(response.data[0].content)
})
.catch(function(error) {
console.log(error)
})
}
export function getNews(params) {
// 获取所有新闻消息
return ax({
method: 'GET',
// url: host.main + path.news,
url: '/api/zws/v1/cms/news',
params: {
project_id: 1000
}
})
.then(function(response) {
params.cb(response.data)
})
.catch(function(error) {
console.log(error)
})
}
// import LoginAction from './LoginAction'
import ArticleAction from './ArticleAction' import ArticleAction from './ArticleAction'
// let loginAction = new LoginAction()
let articleAction = new ArticleAction() let articleAction = new ArticleAction()
const cAction = { const cAction = {
// loginAction,
articleAction articleAction
} }
......
import httpRequest from '@/utils/httpRequest'
// 获取用户信息
export function getUser() {
return httpRequest.get('/api/passport/account/get-user-info')
}
// 退出登录
export function logout() {
return httpRequest.get('/api/passport/rest/logout')
}
// 获取oss token
export function getToken() {
return httpRequest.get('/api/usercenter/aliyun/assume-role')
}
// 获取oss signature
export function getSignature() {
return httpRequest.get('/api/usercenter/aliyun/get-signature')
}
// 图片上传
export function uploadFile(data) {
return httpRequest.post('https://webapp-pub.oss-cn-beijing.aliyuncs.com', data, {
withCredentials: false,
headers: { 'Content-Type': 'multipart/form-data' },
})
}
import BaseAPI from './base_api'
export default class ScoreAPI extends BaseAPI {
/**
* zws项目内容获取
*/
getContent = name =>
this.get(
`/api/zws/v1/cms/projects/1000/contents/${encodeURIComponent(decodeURIComponent(name))}?sites=sofia.ezijing.com`,
{}
)
/**
* zws新闻/消息获取
*/
getNews = (obj = {}) => this.get('/api/zws/v1/cms/news', obj, {})
/**
* 获取当前状态值
* project_id [int] 项目id
*/
getStatus = (obj = {}) => this.get('/api/zws/v1/enrollment/submissions', obj, {})
/**
* 获取测评系统测试地址
*/
getexamTestUrl = () => this.get('/api/usercenter/v1/evaluation/get-address', {}, {})
}
export default class GlobalVariable {
/* 初始化函数,传入整个Vue对象 */
init(Vue, obj) {
this.setInitSiderbarVar(Vue, obj)
this.setInitUserInfo(Vue)
}
/**
* 定义siderbar 初始变量
* 目的:刷新页面时,定位siderbar位置
*/
setInitSiderbarVar(Vue, obj) {
let _$ = Vue.prototype.$GlobalVariable
if (/^\/app\//g.test(obj.to.path)) {
_$['siderbar'] = {
defaultPath: (obj && obj.to && obj.to.path) || ''
}
}
}
/**
* 定义 UserInfo 初始化用户信息,判断是否登录等
*/
setInitUserInfo(Vue) {
let _$ = Vue.prototype.$GlobalVariable
if (!_$.UserInfo) {
_$.UserInfo = {}
}
}
}
import GlobalVariable from './globalVariable'
import LoginInfo from './loginInfo'
let globalVariable = new GlobalVariable()
let loginInfo = new LoginInfo()
export default {
globalVariable,
loginInfo
}
import cAction from '@action'
import { Message } from 'element-ui'
export default class Before {
constructor(opt) {
this.opt = opt || {}
}
async update(to, from, next) {
if (to.meta && to.meta.userRole) {
const isLogin = await this.isLogin()
if (isLogin) {
next()
} else {
next({ path: '/login' })
}
} else {
next()
}
}
/* 获取用户信息 */
isLogin() {
return cAction.loginAction
.getInfo()
.then(res => {
if (res.code === 0) {
window.G.UserInfo = res.data
return true
} else {
return false
}
})
.catch(res => {
Message({ type: 'error', message: res.message })
return false
})
}
}
...@@ -5,32 +5,27 @@ ...@@ -5,32 +5,27 @@
<el-breadcrumb-item v-if="item.path" :key="index" :to="{ path: item.path }">{{ item.name }}</el-breadcrumb-item> <el-breadcrumb-item v-if="item.path" :key="index" :to="{ path: item.path }">{{ item.name }}</el-breadcrumb-item>
<el-breadcrumb-item v-else :key="index">{{ item.name }}</el-breadcrumb-item> <el-breadcrumb-item v-else :key="index">{{ item.name }}</el-breadcrumb-item>
</template> </template>
<!-- <el-breadcrumb-item><a href="/">活动管理</a></el-breadcrumb-item>
<el-breadcrumb-item>活动列表</el-breadcrumb-item>
<el-breadcrumb-item>活动详情</el-breadcrumb-item> -->
</el-breadcrumb> </el-breadcrumb>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
data: { data: { type: Array },
type: Array },
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep{ ::v-deep {
.el-breadcrumb{ .el-breadcrumb {
.el-breadcrumb__item{ .el-breadcrumb__item {
span{ span {
color: #666; color: #666;
font-weight: normal; font-weight: normal;
} }
&:last-child{ &:last-child {
span{ span {
color: #AF1B40; color: #af1b40;
} }
} }
} }
......
<template>
<el-button v-bind="$attrs" :disabled="currentDisabled" @click="start">{{ curretnValue }}</el-button>
</template>
<script>
export default {
name: 'Countdown',
props: {
step: { type: Number, default: 1000 },
disabled: { type: Boolean, default: false },
seconds: { type: Number, default: 60 },
defaultValue: { type: String, default: '获取验证码' }
},
data() {
return {
currentDisabled: false,
currentSeconds: 0,
timer: null
}
},
watch: {
disabled: {
immediate: true,
handler(value) {
this.currentDisabled = value
}
}
},
computed: {
curretnValue() {
const longTime = this.seconds - this.currentSeconds
return longTime < this.seconds ? `${longTime}秒后重发` : this.defaultValue
}
},
methods: {
genTimer() {
this.clearTimer()
this.timer = setInterval(() => {
this.currentSeconds++
if (this.currentSeconds === this.seconds) {
this.stop()
}
}, this.step)
},
clearTimer() {
this.timer && clearInterval(this.timer)
},
start() {
this.currentDisabled = true
this.genTimer()
this.$emit('start')
},
stop() {
this.clearTimer()
this.currentSeconds = 0
this.currentDisabled = false
this.$emit('stop')
}
}
}
</script>
<template> <template>
<div> <div>
<div class="home-head"> <div class="home-head">
<h1 v-if="$route.path !== '/news'"> <h1 v-if="$route.path !== '/news'">教育部第四批1+X培训评价机构<br />金融产品数字化营销职业技能等级证书</h1>
教育部第四批1+X培训评价机构<br /> <img src="https://webapp-pub.ezijing.com/project/x-new/banner.png" />
金融产品数字化营销职业技能等级证书 <swiper ref="mySwiper" :options="swiperOptions" class="item-swiper" v-if="false">
</h1>
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/banner.png" />
<!-- <swiper ref="mySwiper" :options="swiperOptions" class="item-swiper">
<swiper-slide v-for="(item, index) in swiperList" :key="index"> <swiper-slide v-for="(item, index) in swiperList" :key="index">
<a :href="item.url" target="_blank"> <a :href="item.url" target="_blank">
<img :src="item.image_info.full_path" alt="" /> <img :src="item.image_info.full_path" />
</a> </a>
</swiper-slide> </swiper-slide>
</swiper> --> </swiper>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { swiper, swiperSlide, directive } from 'vue-awesome-swiper' import { swiper, swiperSlide, directive } from 'vue-awesome-swiper'
import 'swiper/swiper-bundle.css' import 'swiper/swiper-bundle.css'
import action from '@action'
export default { export default {
components: { components: { swiper, swiperSlide },
swiper,
swiperSlide
},
directives: { directives: {
swiper: directive swiper: directive,
}, },
data() { data() {
const _this = this const _this = this
return { return {
articleClassify: '',
swiperList: [], swiperList: [],
swiperOptions: { swiperOptions: {
on: { on: {
slideChangeTransitionStart: function() { slideChangeTransitionStart: function () {
_this.swiperIndex = this.activeIndex _this.swiperIndex = this.activeIndex
} },
}, },
observer: true, //修改swiper自己或子元素时,自动初始化swiper observer: true, //修改swiper自己或子元素时,自动初始化swiper
observeParents: true, //修改swiper的父元素时,自动初始化swiper observeParents: true, //修改swiper的父元素时,自动初始化swiper
// loop:true, // loop:true,
autoplay: { autoplay: {
delay: 2000, delay: 2000,
disableOnInteraction: false disableOnInteraction: false,
}
}
}
}, },
created() {
// action.articleAction.getAllClassify({ tag: 'carousel-category' }).then(response => {
// const findId = response.data[0].children.find(item => {
// return item.display_name === '轮播1'
// })
// action.articleAction.getBanner({ category_id: findId.id }).then(res => {
// this.swiperList = res.data
// })
// })
}, },
mounted() { }
// if (!Object.keys(this.$store.state.classify).length) {
// setTimeout(() => {
// this.articleClassify = this.$store.state.classify
// this.newsList()
// }, 2000)
// } else {
// const findId = this.articleClassify[0].children.find(item => {
// return item.display_name === (this.newsTabIndex ? '工作动态' : '新闻动态')
// })
// console.log(this.articleClassify[0].children, '123321')
// // action.articleAction.getArticle({ category_id: findId ? findId.id : 23 }).then(res => {
// // this.list = res.data.list
// // this.swiperList = []
// // res.data.list.map((item, index) => {
// // if (index <= 4) {
// // this.swiperList.push({
// // url: item.cover_pc_url,
// // content: item.title,
// // id: item.id
// // })
// // }
// // })
// // // loading.close()
// // })
// }
}, },
computed: { computed: {
swiper() { swiper() {
return this.$refs.mySwiper.$swiper return this.$refs.mySwiper.$swiper
} },
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -4,10 +4,7 @@ ...@@ -4,10 +4,7 @@
<div class="inner"> <div class="inner">
<div class="left"> <div class="left">
<!-- <h3>友情链接</h3> --> <!-- <h3>友情链接</h3> -->
<img <img src="https://zws-imgs-pub.ezijing.com/static/ezijing/logo/ezijing-logo-white.svg" class="logo" />
src="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/ezijing/logo/ezijing-logo-white.svg"
class="logo"
/>
<ul class="menu"> <ul class="menu">
<li v-for="item in menuList" :key="item.href"> <li v-for="item in menuList" :key="item.href">
<a :href="item.href" target="_blank">{{ item.title }}</a> <a :href="item.href" target="_blank">{{ item.title }}</a>
...@@ -35,47 +32,33 @@ ...@@ -35,47 +32,33 @@
</div> </div>
</div> </div>
</div> </div>
<div class="copyright" style="height: 40px;line-height: 40px;color: #666;background: #eaebec;"> <div class="copyright" style="height: 40px; line-height: 40px; color: #666; background: #eaebec">
<div class="inner" style="max-width: 1200px;width: 100%;justify-content: center;display: flex;"> <div class="inner" style="max-width: 1200px; width: 100%; justify-content: center; display: flex">
<p style="font-size: 12px;"> <p style="font-size: 12px">
Copyright © 2017 Zijing Education. All rights reserved. 清控紫荆(北京)教育科技股份有限公司 Copyright © 2017 Zijing Education. All rights reserved. 清控紫荆(北京)教育科技股份有限公司
</p> </p>
<a <a
target="_blank" target="_blank"
href="https://tsm.miit.gov.cn/dxxzsp/" href="https://tsm.miit.gov.cn/dxxzsp/"
style="color: #666;text-decoration:none;margin-left: 10px;" style="color: #666; text-decoration: none; margin-left: 10px">
> <p style="font-size: 12px">京ICP证150431号</p>
<p style="font-size: 12px;">京ICP证150431号</p>
</a> </a>
<a <a
target="_blank" target="_blank"
class="record" class="record"
href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802023681" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802023681"
style=" style="color: #666; text-decoration: none; align-items: center; display: flex; margin-right: 5px">
color: #666;
text-decoration:none;
align-items: center;
display: flex;
margin-right: 5px;"
>
<img <img
src="https://zws-imgs-pub.ezijing.com/e0a0ec47dfdfc1e0797b1d5254021d00.png" src="https://zws-imgs-pub.ezijing.com/e0a0ec47dfdfc1e0797b1d5254021d00.png"
alt="" alt=""
style=" style="width: 20px; height: 20px; margin: 0 6px; display: block" />
width: 20px; <p style="font-size: 12px">安备 11010802023681号</p>
height: 20px;
margin: 0 6px;
display: block;
"
/>
<p style="font-size: 12px;">安备 11010802023681号</p>
</a> </a>
<a <a
target="_blank" target="_blank"
href="https://beian.miit.gov.cn/#/Integrated/index" href="https://beian.miit.gov.cn/#/Integrated/index"
style="color: #666;text-decoration:none;" style="color: #666; text-decoration: none">
> <p style="font-size: 12px">京ICP备15016866号-1</p>
<p style="font-size: 12px;">京ICP备15016866号-1</p>
</a> </a>
</div> </div>
</div> </div>
...@@ -89,12 +72,12 @@ export default { ...@@ -89,12 +72,12 @@ export default {
menuList: [ menuList: [
{ title: '紫荆教育官网', href: 'https://www.ezijing.com/' }, { title: '紫荆教育官网', href: 'https://www.ezijing.com/' },
{ title: '职业技能等级证书信息管理服务平台', href: 'https://vslc.ncb.edu.cn' }, { title: '职业技能等级证书信息管理服务平台', href: 'https://vslc.ncb.edu.cn' },
{ title: '职业教育国家学分银行', href: 'https://www.ncb.edu.cn/home' } { title: '职业教育国家学分银行', href: 'https://www.ncb.edu.cn/home' },
// { title: '美国西部院校教育联盟认证(WASC)', href: 'https://www.wscuc.org/institutions/sofia-university/' }, // { title: '美国西部院校教育联盟认证(WASC)', href: 'https://www.wscuc.org/institutions/sofia-university/' },
// { title: '紫荆教育', href: 'https://www.ezijing.com/' } // { title: '紫荆教育', href: 'https://www.ezijing.com/' }
] ],
}
} }
},
} }
</script> </script>
......
...@@ -5,10 +5,7 @@ ...@@ -5,10 +5,7 @@
<div class="head-top-content"> <div class="head-top-content">
<div class="max-width-content"> <div class="max-width-content">
<div class="logo-box"> <div class="logo-box">
<img <img src="https://webapp-pub.ezijing.com/project/x-new/logo%20(1).png" @click="goPage('/')" />
src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/logo%20(1).png"
@click="goPage('/')"
/>
</div> </div>
<div class="login"> <div class="login">
<template v-if="Object.values(user).length"> <template v-if="Object.values(user).length">
...@@ -27,13 +24,11 @@ ...@@ -27,13 +24,11 @@
</div> </div>
<div class="head-nav-content max-width-content"> <div class="head-nav-content max-width-content">
<ul :class="{ 'nav-item-box': true }"> <ul :class="{ 'nav-item-box': true }">
<template v-for="(item, index) in navData"> <li v-for="(item, index) in navData" :key="index">
<li>
<div :class="getNameActive(item)"> <div :class="getNameActive(item)">
<router-link :to="item.path"> <div v-html="item.name"></div></router-link> <router-link :to="item.path"> <div v-html="item.name"></div></router-link>
</div> </div>
</li> </li>
</template>
</ul> </ul>
</div> </div>
</div> </div>
...@@ -41,38 +36,16 @@ ...@@ -41,38 +36,16 @@
</div> </div>
</template> </template>
<script> <script>
import login from './login.vue'
export default { export default {
components: {
login
},
data() { data() {
return { return {
navData: [ navData: [
{ { name: '首页', path: '/index' },
name: '首页', { name: '通知公告', path: '/news' },
path: '/index' { name: '1+X认证实训平台', path: 'product' },
}, { name: '师资培训', path: '/teacher' },
{ { name: '教科研服务', path: '/service' },
name: '通知公告', { name: '认证中心', path: '/attestation' },
path: '/news'
},
{
name: '1+X认证实训平台',
path: 'product'
},
{
name: '师资培训',
path: '/teacher'
},
{
name: '教科研服务',
path: '/service'
},
{
name: '认证中心',
path: '/attestation'
}
], ],
time: null, time: null,
isEn: false, isEn: false,
...@@ -82,19 +55,15 @@ export default { ...@@ -82,19 +55,15 @@ export default {
baseUrl: import.meta.env.VITE_API_BASE_URL, baseUrl: import.meta.env.VITE_API_BASE_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: { onSuccess: this.loginSuccess },
onSuccess: this.loginSuccess phone: { onSuccess: this.loginSuccess },
},
}, },
phone: {
onSuccess: this.loginSuccess
}
}
}
} }
}, },
mounted() {}, mounted() {},
...@@ -115,7 +84,6 @@ export default { ...@@ -115,7 +84,6 @@ export default {
handleLogout() { handleLogout() {
this.passport.logout() this.passport.logout()
this.isLogin = false this.isLogin = false
window.G.UserInfo = {}
if (this.$route.path !== '/index') { if (this.$route.path !== '/index') {
window.sessionStorage.userInfo = {} window.sessionStorage.userInfo = {}
this.user = {} this.user = {}
...@@ -129,7 +97,6 @@ export default { ...@@ -129,7 +97,6 @@ export default {
onReady(isLogin, user = {}) { onReady(isLogin, user = {}) {
// this.isLogin = isLogin // this.isLogin = isLogin
this.user = user this.user = user
window.G.UserInfo = user
window.sessionStorage.userInfo = JSON.stringify(user) window.sessionStorage.userInfo = JSON.stringify(user)
}, },
loginSuccess(data) { loginSuccess(data) {
...@@ -137,8 +104,6 @@ export default { ...@@ -137,8 +104,6 @@ export default {
window.sessionStorage.userInfo = JSON.stringify(user) window.sessionStorage.userInfo = JSON.stringify(user)
this.isLogin = isLogin this.isLogin = isLogin
this.user = user this.user = user
// window.G.UserInfo = user
// this.$router.go(0)
this.$router.push('/my') this.$router.push('/my')
window.location.reload() window.location.reload()
}) })
...@@ -157,36 +122,36 @@ export default { ...@@ -157,36 +122,36 @@ export default {
} }
} }
} }
} },
}, },
computed: { computed: {
passport() { passport() {
return this.$refs.passport return this.$refs.passport
}, },
getNameActive() { getNameActive() {
return item => { return (item) => {
const currentPath = this.$route.path const currentPath = this.$route.path
if (currentPath.includes(item.path)) { if (currentPath.includes(item.path)) {
return 'name active' return 'name active'
} else { } else {
let className = 'name' let className = 'name'
if (item.childern) { if (item.childern) {
item.childern.map(cData => { item.childern.map((cData) => {
cData.path === currentPath && (className = 'name active') cData.path === currentPath && (className = 'name active')
}) })
} }
return className return className
} }
} }
} },
}, },
watch: { watch: {
$route(route) { $route(route) {
if (route.query.register) { if (route.query.register) {
this.handleRegister() this.handleRegister()
} }
} },
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<div class="app-layout"> <div class="app-layout">
<app-header /> <app-header />
<app-main /> <div class="app-main">
<router-view />
</div>
<app-footer v-if="hasFooter" /> <app-footer v-if="hasFooter" />
</div> </div>
</template> </template>
<script> <script>
import AppHeader from './header.vue' import AppHeader from './header.vue'
import AppMain from './main.vue'
import AppFooter from './footer.vue' import AppFooter from './footer.vue'
export default { export default {
props: { props: {
hasFooter: { type: Boolean, default: true } hasFooter: { type: Boolean, default: true },
}, },
components: { AppHeader, AppMain, AppFooter } components: { AppHeader, AppFooter },
} }
</script> </script>
<template>
<div class="login-box">
<div class="login-card-mian">
<div class="title">账号登录</div>
<ul>
<li>
<el-select v-model="value" placeholder="请选择学校" class="forms">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
<i slot="prefix" class="el-input__icon el-icon-office-building"></i>
</el-select>
</li>
<li>
<el-input
class="forms"
placeholder="请输入账号"
prefix-icon="el-icon-user"
v-model="input2">
</el-input>
</li>
<li>
<el-input
class="forms"
placeholder="请输入密码"
prefix-icon="el-icon-lock"
show-password
v-model="input3">
</el-input>
</li>
</ul>
<div class="login-btn">登录</div>
<div class="register-btn" @click="$emit('reg')">注册</div>
</div>
<div class="mask" @click="closeMask"></div>
</div>
</template>
<script>
export default {
data() {
return{
value: '',
input2: '',
input3: '',
options: []
}
},
methods: {
closeMask() {
this.$emit('closeMask', false)
}
}
}
</script>
<style lang="scss" scoped>
.login-box{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba($color: #000000, $alpha: 0.5);
z-index: 999;
.mask{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9;
}
.login-card-mian{
z-index: 99;
box-sizing: border-box;
padding: 24px;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
width: 328px;
background: #FFFFFF;
box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.3);
border-radius: 4px;
.title{
font-size: 18px;
color: #AF1B40;
line-height: 25px;
margin-bottom: 24px;
}
ul{
li{
margin-bottom: 24px;
.forms{
width: 100%;
}
}
}
.login-btn{
text-align: center;
line-height: 40px;
background: linear-gradient(315deg, rgba(225, 47, 116, 0.83) 0%, #C01540 100%);
border-radius: 4px;
font-size: 14px;
font-weight: bold;
color: #FFFFFF;
cursor: pointer;
}
.register-btn{
margin-top: 4px;
text-align: right;
font-size: 14px;
color: #999999;
line-height: 20px;
cursor: pointer;
}
}
}
::v-deep{
.forms{
i {
font-size: 20px;
}
input{
border-radius: 4px;
}
}
}
</style>
<template>
<div class="app-main">
<router-view />
</div>
</template>
<template>
<div>
<div class="home-head">
<swiper ref="mySwiper" :options="swiperOptions" class="item-swiper">
<swiper-slide v-for="(item, index) in swiperList" :key="index">
<!-- <router-link :to="`/news/detail?id=${item.id}&type=home`"> -->
<img :src="item" alt="" />
<!-- </router-link> -->
</swiper-slide>
</swiper>
</div>
</div>
</template>
<script>
import { swiper, swiperSlide, directive } from 'vue-awesome-swiper'
export default {
components: {
swiper,
swiperSlide
},
directives: {
swiper: directive
},
data() {
const _this = this
return {
swiperList: ['https://zws-imgs-pub.ezijing.com/static/public/207624366f389d544153d41deadf7351.png', 'https://zws-imgs-pub.ezijing.com/static/public/98a552eee2302afb96b02f16ba8d8b3a.png'],
swiperOptions: {
on: {
slideChangeTransitionStart: function() {
_this.swiperIndex = this.activeIndex
}
},
observer:true,//修改swiper自己或子元素时,自动初始化swiper
observeParents:true,//修改swiper的父元素时,自动初始化swiper
loop:true,
autoplay: {
delay: 2000,
disableOnInteraction: false
}
}
}
},
computed: {
swiper() {
return this.$refs.mySwiper.$swiper
}
}
}
</script>
<style lang="scss" scoped>
.home-head{
img{
width: 100%;
display: block;
}
}
</style>
...@@ -5,20 +5,19 @@ ...@@ -5,20 +5,19 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.no-data-box{ .no-data-box {
width: 200px; width: 200px;
margin: 0 auto; margin: 0 auto;
.icon{ .icon {
width: 200px; width: 200px;
height: 171px; height: 171px;
background: url(https://zws-imgs-pub.ezijing.com/static/public/61ec7327f046bab48226ac43c4fbd4d8.png); background: url(https://zws-imgs-pub.ezijing.com/static/public/61ec7327f046bab48226ac43c4fbd4d8.png);
background-size: 100% 100%; background-size: 100% 100%;
} }
.txt{ .txt {
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
color: #666666; color: #666666;
......
import Vue from 'vue' // 引入vue框架 import Vue from 'vue'
import VuePassport from '@ezijing/vue-passport' import VuePassport from '@ezijing/vue-passport'
import '@ezijing/vue-passport/dist/vue-passport.css' import '@ezijing/vue-passport/dist/vue-passport.css'
import './style.scss' // 定义 element-ui主题色 + 公共样式
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css' // 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'
// import cTool from '@tool' import './style.scss'
/* 定义全局变量 */
import BeforeRouter from './components/before'
Vue.use(Calendar) Vue.use(Calendar)
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(VuePassport) Vue.use(VuePassport)
/* 设置全局变量 */
window.G = Vue.prototype.$GlobalVariable = {
VERSION: 'PC-1.5.6'
}
/* 导航守卫 */
router.beforeEach(async (to, from, next) => {
/* 设置 全局变量 */
BeforeRouter.globalVariable.init(Vue, { to, from, next })
if (to.meta.requiredLogin) {
const isLogin = await BeforeRouter.loginInfo.isLogin(Vue)
isLogin ? next() : next({ path: '/index', query: { needLogin: Date.now() } })
} else {
next()
}
})
/**
* 定义全局变量 - 用作全局事件发布订阅
* 使用 vue自带事件 $emit 和 $on 进行发布订阅
*/
Vue.prototype.VueEvent = new Vue()
// /* 定义全局 jquery 变量 */
// Vue.prototype.jq = $
new Vue({ new Vue({
store, store,
router, router,
render: h => h(App) render: (h) => h(App),
}).$mount('#app') }).$mount('#app')
<template> <template>
<div> <div>
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/query-banner.png" class="banner" /> <img src="https://webapp-pub.ezijing.com/project/x-new/query-banner.png" class="banner" />
<section class="section"> <section class="section">
<h1 class="pt-100">认证报名</h1> <h1 class="pt-100">认证报名</h1>
<h2>1、报名条件</h2> <h2>1、报名条件</h2>
<p style="margin: 20px 0;">遵纪守法并具备以下各等级证书条件之一者,可申请参加相应等级证书考试:</p> <p style="margin: 20px 0">遵纪守法并具备以下各等级证书条件之一者,可申请参加相应等级证书考试:</p>
<h3>初级</h3> <h3>初级</h3>
<p> <p>
(1)中职及以上学历层次财经商贸大类等相关专业毕业生(含在校生)。<br /> (1)中职及以上学历层次财经商贸大类等相关专业毕业生(含在校生)。<br />
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
(3)专科学历毕业 (3)专科学历毕业
</p> </p>
<h2>2、报名方式</h2> <h2>2、报名方式</h2>
<p style="margin-top: 20px;"> <p style="margin-top: 20px">
(1) 在校学生:咨询学校所在院系教研室,由院系项目办统一报名。<br /> (1) 在校学生:咨询学校所在院系教研室,由院系项目办统一报名。<br />
(2) 社会人员:在报名前请拨打010-62799201,由工作人员安排就近考核站点进行报名。<br /> (2) 社会人员:在报名前请拨打010-62799201,由工作人员安排就近考核站点进行报名。<br />
(3)具体报考信息以紫荆教育实际发布公告通知为准;<br /> (3)具体报考信息以紫荆教育实际发布公告通知为准;<br />
...@@ -31,9 +31,7 @@ ...@@ -31,9 +31,7 @@
</section> </section>
<div class="practice-box"> <div class="practice-box">
<div class="pra-title">认证练习</div> <div class="pra-title">认证练习</div>
<div class="pra-tips"> <div class="pra-tips">全真模拟题库、实训练习系统</div>
全真模拟题库、实训练习系统
</div>
<a href="https://login.ezijing.com/xlearn/login" target="_blank"> <a href="https://login.ezijing.com/xlearn/login" target="_blank">
<div class="pra-btn">立即练习</div> <div class="pra-btn">立即练习</div>
</a> </a>
...@@ -41,8 +39,8 @@ ...@@ -41,8 +39,8 @@
<section class="section"> <section class="section">
<h1 class="pt-80">证书查询</h1> <h1 class="pt-80">证书查询</h1>
<p class="zs-tips">成绩和证书查询入口https://vslc.ncb.edu.cn/gateway/Querydata</p> <p class="zs-tips">成绩和证书查询入口https://vslc.ncb.edu.cn/gateway/Querydata</p>
<div class="cert-box" style="margin-bottom: 100px;"> <div class="cert-box" style="margin-bottom: 100px">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/query-img1.png" /> <img src="https://webapp-pub.ezijing.com/project/x-new/query-img1.png" />
</div> </div>
</section> </section>
</div> </div>
...@@ -54,7 +52,7 @@ export default { ...@@ -54,7 +52,7 @@ export default {
return {} return {}
}, },
mounted() {}, mounted() {},
methods: {} methods: {},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<div class="hall-box"> <div class="hall-box">
<headBanner></headBanner> <headBanner />
<div class="home-office-hall content-max-width"> <div class="home-office-hall content-max-width">
<div class="title">办事大厅</div> <div class="title">办事大厅</div>
<div class="office-mian"> <div class="office-mian">
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
v-for="(item, index) in offsetBtn" v-for="(item, index) in offsetBtn"
:class="offsetTabIndex == index && 'active'" :class="offsetTabIndex == index && 'active'"
:key="index" :key="index"
@click="offsetTab(index)" @click="offsetTab(index)">
>
{{ item }} {{ item }}
</li> </li>
</ul> </ul>
...@@ -119,7 +118,7 @@ export default { ...@@ -119,7 +118,7 @@ export default {
headBanner, headBanner,
studentHelp, studentHelp,
teacherHelp, teacherHelp,
schoolHelp schoolHelp,
}, },
data() { data() {
return { return {
...@@ -132,43 +131,43 @@ export default { ...@@ -132,43 +131,43 @@ export default {
text: '注册账号', text: '注册账号',
path: '/register', path: '/register',
textActive: '注册后方可报名', textActive: '注册后方可报名',
pathType: 3 pathType: 3,
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/5c7db419e6af3214fa53b1d4920cf7b5.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/5c7db419e6af3214fa53b1d4920cf7b5.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/76256d877bd6787af42d2f6010108a8b.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/76256d877bd6787af42d2f6010108a8b.png',
text: '考生报名', text: '考生报名',
path: '/hall?role=0&point=5', path: '/hall?role=0&point=5',
textActive: '可选择学校统一报名或在对应的考点报名' textActive: '可选择学校统一报名或在对应的考点报名',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/b5a6b0bf40f24545fd10cbf315e5839c.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/b5a6b0bf40f24545fd10cbf315e5839c.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/556e2554d2545d3d3a726dbcbaf20494.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/556e2554d2545d3d3a726dbcbaf20494.png',
text: '学习课程', text: '学习课程',
path: '/hall?role=0&point=1', path: '/hall?role=0&point=1',
textActive: '进入学习系统学习' textActive: '进入学习系统学习',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/9c4d618281f12680a367d212545cf041.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/9c4d618281f12680a367d212545cf041.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/53dd24cbf9c4c1a6ed078ab3b6049e95.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/53dd24cbf9c4c1a6ed078ab3b6049e95.png',
text: '参加考试', text: '参加考试',
path: '/hall?role=0&point=2', path: '/hall?role=0&point=2',
textActive: '关注考点和考场安排,准备考试材料' textActive: '关注考点和考场安排,准备考试材料',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/6bf9fedcbff1d13de413667b33787db3.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/6bf9fedcbff1d13de413667b33787db3.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/3639914b6dbe79d4b2e745159fd49230.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/3639914b6dbe79d4b2e745159fd49230.png',
text: '成绩查询', text: '成绩查询',
path: '/hall?role=0&point=3', path: '/hall?role=0&point=3',
textActive: '进入成绩查询系统' textActive: '进入成绩查询系统',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/1e6d8f785a106b17eb698d1d563ff479.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/1e6d8f785a106b17eb698d1d563ff479.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/e3088887b1e2fc9711c7ad692e2e53cd.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/e3088887b1e2fc9711c7ad692e2e53cd.png',
text: '证书查询', text: '证书查询',
path: '/hall?role=0&point=4', path: '/hall?role=0&point=4',
textActive: '进入证书查询系统' textActive: '进入证书查询系统',
} },
], ],
teacherNav: [ teacherNav: [
{ {
...@@ -177,21 +176,21 @@ export default { ...@@ -177,21 +176,21 @@ export default {
text: '注册账号', text: '注册账号',
path: '/register', path: '/register',
pathType: 3, pathType: 3,
textActive: '注册后方可报名' textActive: '注册后方可报名',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/284f07548eb240cc384a102f1b7efdda.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/284f07548eb240cc384a102f1b7efdda.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/0c9823481d85f209b4a498945f31ea83.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/0c9823481d85f209b4a498945f31ea83.png',
text: '师资培训报名', text: '师资培训报名',
path: '/hall?role=1&point=t0', path: '/hall?role=1&point=t0',
textActive: '提交报名资料,等待审核通知和培训通知' textActive: '提交报名资料,等待审核通知和培训通知',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/b278993ee5c29349ff83d1d9b4b596c9.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/b278993ee5c29349ff83d1d9b4b596c9.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/8d24a5c20a8ab87d26db73ccfacd2fba.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/8d24a5c20a8ab87d26db73ccfacd2fba.png',
text: '师资学习平台', text: '师资学习平台',
path: '/hall?role=1&point=t1', path: '/hall?role=1&point=t1',
textActive: '提供师资培训资料,辅助老师学习' textActive: '提供师资培训资料,辅助老师学习',
}, },
// { // {
// icon: 'https://zws-imgs-pub.ezijing.com/static/public/6f9583c270a3302a352ae9bbba64099d.png', // icon: 'https://zws-imgs-pub.ezijing.com/static/public/6f9583c270a3302a352ae9bbba64099d.png',
...@@ -205,14 +204,14 @@ export default { ...@@ -205,14 +204,14 @@ export default {
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/130affba0b6cefd278c31ddfab74acfc.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/130affba0b6cefd278c31ddfab74acfc.png',
text: '授权师资名单', text: '授权师资名单',
path: '/hall?role=1&point=t2', path: '/hall?role=1&point=t2',
textActive: '授予培训资格证书老师名单' textActive: '授予培训资格证书老师名单',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/70c3defef24fd1438ada43b3e1ccff87.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/70c3defef24fd1438ada43b3e1ccff87.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/fe6b2d4c31d7f6369468c675d5876671.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/fe6b2d4c31d7f6369468c675d5876671.png',
text: '开班授课', text: '开班授课',
path: '/hall?role=1&point=t3', path: '/hall?role=1&point=t3',
textActive: '进入学习平台' textActive: '进入学习平台',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/1e6d8f785a106b17eb698d1d563ff479.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/1e6d8f785a106b17eb698d1d563ff479.png',
...@@ -220,8 +219,8 @@ export default { ...@@ -220,8 +219,8 @@ export default {
text: '证书查询', text: '证书查询',
path: this.isLogin ? this.queryCard() : '/hall?role=1&point=t4', path: this.isLogin ? this.queryCard() : '/hall?role=1&point=t4',
pathType: 4, pathType: 4,
textActive: '进入证书查询系统' textActive: '进入证书查询系统',
} },
], ],
schoolNav: [ schoolNav: [
{ {
...@@ -230,21 +229,21 @@ export default { ...@@ -230,21 +229,21 @@ export default {
text: '注册账号', text: '注册账号',
path: '/register', path: '/register',
pathType: 3, pathType: 3,
textActive: '注册后方可申报' textActive: '注册后方可申报',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/1dc324792168ee1e6a07b5975e6e3d8b.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/1dc324792168ee1e6a07b5975e6e3d8b.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/02e1e75b3aed4a92f3038589091be1f2.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/02e1e75b3aed4a92f3038589091be1f2.png',
text: '试点申报', text: '试点申报',
path: '/hall?role=2&point=s5', path: '/hall?role=2&point=s5',
textActive: '提交报名资料,等待审核通知' textActive: '提交报名资料,等待审核通知',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/17e3d75022ee88d4661bff4ca61f0966.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/17e3d75022ee88d4661bff4ca61f0966.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/073a7d9317d0ff8d8876c4ce53d15bc2.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/073a7d9317d0ff8d8876c4ce53d15bc2.png',
text: '考点申报', text: '考点申报',
path: '/hall?role=2&point=s1', path: '/hall?role=2&point=s1',
textActive: '提交资料,等待审核通知' textActive: '提交资料,等待审核通知',
}, },
// { // {
// icon: 'https://zws-imgs-pub.ezijing.com/static/public/ea6a2917391444208d9084c3205227b2.png', // icon: 'https://zws-imgs-pub.ezijing.com/static/public/ea6a2917391444208d9084c3205227b2.png',
...@@ -258,43 +257,43 @@ export default { ...@@ -258,43 +257,43 @@ export default {
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/901044f1465a5497fef8135f9e2ce4ff.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/901044f1465a5497fef8135f9e2ce4ff.png',
text: '统一实施教学', text: '统一实施教学',
path: '/hall?role=2&point=s3', path: '/hall?role=2&point=s3',
textActive: '发通知组织统一上课' textActive: '发通知组织统一上课',
}, },
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/1505fd4535d858b4939e46f2534bfcaf.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/1505fd4535d858b4939e46f2534bfcaf.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/3c3d204e15a400a7f74b4a9dad44cd55.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/3c3d204e15a400a7f74b4a9dad44cd55.png',
text: '批量报名考试', text: '批量报名考试',
path: '/hall?role=2&point=s4', path: '/hall?role=2&point=s4',
textActive: '统计学员后统一报名' textActive: '统计学员后统一报名',
} },
], ],
isLogin: false, isLogin: false,
options: { options: {
baseUrl: import.meta.env.VITE_API_BASE_URL, baseUrl: import.meta.env.VITE_API_BASE_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: {
onSuccess: this.loginSuccess onSuccess: this.loginSuccess,
}, },
phone: { phone: {
onSuccess: this.loginSuccess onSuccess: this.loginSuccess,
} },
} },
} },
} }
}, },
computed: { computed: {
passport() { passport() {
return this.$refs.passport return this.$refs.passport
} },
}, },
created() { created() {
action.articleAction.getUserInfo().then(res => { action.articleAction.getUserInfo().then((res) => {
if (res && res.code === 0) { if (res && res.code === 0) {
window.sessionStorage.userInfo = JSON.stringify(res.data) window.sessionStorage.userInfo = JSON.stringify(res.data)
this.isLogin = true this.isLogin = true
...@@ -316,7 +315,6 @@ export default { ...@@ -316,7 +315,6 @@ export default {
}, },
onReady(isLogin, user = {}) { onReady(isLogin, user = {}) {
this.user = user this.user = user
window.G.UserInfo = user
window.sessionStorage.userInfo = JSON.stringify(user) window.sessionStorage.userInfo = JSON.stringify(user)
}, },
queryCard() { queryCard() {
...@@ -328,13 +326,15 @@ export default { ...@@ -328,13 +326,15 @@ export default {
}, },
register() { register() {
this.$router.push({ this.$router.push({
query: Object.assign(this.$route.query, { register: this.$route.query.register ? this.$route.query.register++ : 1 }) query: Object.assign(this.$route.query, {
register: this.$route.query.register ? this.$route.query.register++ : 1,
}),
}) })
}, },
offsetTab(n) { offsetTab(n) {
this.offsetTabIndex = n this.offsetTabIndex = n
this.$router.push({ this.$router.push({
query: Object.assign({}, { role: n }) query: Object.assign({}, { role: n }),
}) })
}, },
goPage(path, n) { goPage(path, n) {
...@@ -342,20 +342,20 @@ export default { ...@@ -342,20 +342,20 @@ export default {
window.open(path) window.open(path)
} else { } else {
this.$router.push({ this.$router.push({
path: path path: path,
}) })
this.$refs.help.pointScroll() this.$refs.help.pointScroll()
} }
} },
}, },
watch: { watch: {
$route: { $route: {
handler: function(val, oldVal) { handler: function (val, oldVal) {
this.offsetTabIndex = this.$route.query.role || 0 this.offsetTabIndex = this.$route.query.role || 0
}, },
deep: true deep: true,
} },
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
差异被折叠。
<template> <template>
<div> <div>
<div class="home-box" v-if="cardListMap && cardListMap.length > 0"> <div class="home-box" v-if="cardListMap && cardListMap.length > 0">
<!-- <headBanner></headBanner> -->
<div> <div>
<div v-for="(item, index) in cardListMap" :key="index" class="home-box-content"> <div v-for="(item, index) in cardListMap" :key="index" class="home-box-content">
<div class="home-box-content-btn"> <div class="home-box-content-btn">
...@@ -27,24 +26,25 @@ ...@@ -27,24 +26,25 @@
<script> <script>
import printJS from 'print-js' import printJS from 'print-js'
import action from '@action' import action from '@action'
import downloadIamge from '@tool/downloadPng' import { saveAs } from 'file-saver'
export default { export default {
data() { data() {
return { return {
exportPDFtitle: '结业证书', exportPDFtitle: '结业证书',
cardList: [] cardList: [],
} }
}, },
computed: { computed: {
cardListMap() { cardListMap() {
return this.cardList?.filter(item => item.status === 2) return this.cardList?.filter((item) => item.status === 2)
} },
}, },
methods: { methods: {
// 获取证书列表 // 获取证书列表
handleGetCard() { handleGetCard() {
const params = { project_prefix: 'x1' } const params = { project_prefix: 'x1' }
action.articleAction.getCard(params).then(res => { action.articleAction.getCard(params).then((res) => {
this.cardList = res.data?.list this.cardList = res.data?.list
}) })
}, },
...@@ -54,14 +54,13 @@ export default { ...@@ -54,14 +54,13 @@ export default {
}, },
// 下载 // 下载
handleDownload(item) { handleDownload(item) {
downloadIamge(item.download_info.url, item.download_info.filename) saveAs(item.download_info.url, item.download_info.filename)
// window.open(item.download_info.url, '_blank') },
}
}, },
mounted() { mounted() {
// 获取证书 // 获取证书
this.handleGetCard() this.handleGetCard()
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -45,14 +45,14 @@ export default { ...@@ -45,14 +45,14 @@ export default {
form: { form: {
name: '', name: '',
phone: '', phone: '',
project_id: 1000 project_id: 1000,
} },
} }
}, },
mounted() {}, mounted() {},
methods: { methods: {
submit() { submit() {
const findNull = Object.values(this.form).findIndex(item => { const findNull = Object.values(this.form).findIndex((item) => {
return item === '' return item === ''
}) })
if (findNull !== -1) { if (findNull !== -1) {
...@@ -67,19 +67,19 @@ export default { ...@@ -67,19 +67,19 @@ export default {
} }
this.form = Object.assign(this.form, { comment: `#咨询产品:${this.f1};#院校名称:${this.f2};#院系:${this.f3}` }) this.form = Object.assign(this.form, { comment: `#咨询产品:${this.f1};#院校名称:${this.f2};#院系:${this.f3}` })
postNes(this.form) postNes(this.form)
.then(res => { .then((res) => {
if (res && res.status === 200) { if (res && res.status === 200) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '提交成功' message: '提交成功',
}) })
} else { } else {
this.$message.error('提交失败') this.$message.error('提交失败')
} }
}) })
.catch(() => {}) .catch(() => {})
} },
} },
} }
</script> </script>
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
width: 1200px; width: 1200px;
height: 500px; height: 500px;
margin: 0 auto 40px; margin: 0 auto 40px;
background: url(https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/exed/home-ssfc-bg.png); background: url(https://webapp-pub.ezijing.com/project/exed/home-ssfc-bg.png);
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
<template> <template>
<div class="product-box"> <div class="product-box">
<img class="banner" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/pro-banner.png" /> <img class="banner" src="https://webapp-pub.ezijing.com/project/x-new/pro-banner.png" />
<section class="section"> <section class="section">
<!-- 实训平台介绍 --> <!-- 实训平台介绍 -->
<h1 class="pt-100">1+X金融产品数字化营销实训平台介绍</h1> <h1 class="pt-100">1+X金融产品数字化营销实训平台介绍</h1>
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
</div> </div>
<!-- 核心模块 --> <!-- 核心模块 -->
<h1 class="pt-80">核心模块</h1> <h1 class="pt-80">核心模块</h1>
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/pro-img1.png" class="describe-img" /> <img src="https://webapp-pub.ezijing.com/project/x-new/pro-img1.png" class="describe-img" />
<h1 class="pt-80">案例资源</h1> <h1 class="pt-80">案例资源</h1>
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/pro-img2.png" class="describe-img" /> <img src="https://webapp-pub.ezijing.com/project/x-new/pro-img2.png" class="describe-img" />
<p class="js"> <p class="js">
金融产品数字营销实验室目前配备<span>6</span>个案例,<span>6</span>篇案例原文、<span>34</span>份案例指导书、<span>33</span>套教学PPT、<span>80</span>个教学视频。 金融产品数字营销实验室目前配备<span>6</span>个案例,<span>6</span>篇案例原文、<span>34</span>份案例指导书、<span>33</span>套教学PPT、<span>80</span>个教学视频。
</p> </p>
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
v-for="(item, index) in tabList" v-for="(item, index) in tabList"
:class="{ 'is-active': index === tabActive }" :class="{ 'is-active': index === tabActive }"
:key="index" :key="index"
@mouseover="tabActive = index" @mouseover="tabActive = index">
>
{{ item.title }} {{ item.title }}
</li> </li>
</ul> </ul>
...@@ -45,7 +44,7 @@ ...@@ -45,7 +44,7 @@
</li> </li>
</ul> </ul>
<!-- 增值服务 --> <!-- 增值服务 -->
<h3 class="section-subtitle" style="padding-top: 50px;">增值服务</h3> <h3 class="section-subtitle" style="padding-top: 50px">增值服务</h3>
<ul class="zz-list"> <ul class="zz-list">
<li v-for="item in zzfwList" :key="item">{{ item }}</li> <li v-for="item in zzfwList" :key="item">{{ item }}</li>
</ul> </ul>
...@@ -58,7 +57,7 @@ ...@@ -58,7 +57,7 @@
import presence from './components/presence.vue' import presence from './components/presence.vue'
export default { export default {
components: { components: {
presence presence,
}, },
data() { data() {
return { return {
...@@ -68,23 +67,23 @@ export default { ...@@ -68,23 +67,23 @@ export default {
{ {
icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_1.png', icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_1.png',
title: '产品服务', title: '产品服务',
desc: '产品安装服务<br/>产品配置调试服务<br/>产品免费升级服务<br/>……' desc: '产品安装服务<br/>产品配置调试服务<br/>产品免费升级服务<br/>……',
}, },
{ {
icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_2.png', icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_2.png',
title: '资源服务', title: '资源服务',
desc: '配套课程资源<br/>课程资源免费更新服务<br/>行业案例免费升级服务<br/>……' desc: '配套课程资源<br/>课程资源免费更新服务<br/>行业案例免费升级服务<br/>……',
}, },
{ {
icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_3.png', icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_3.png',
title: '培训服务', title: '培训服务',
desc: '产品使用培训<br/>产品维护培训<br/>……' desc: '产品使用培训<br/>产品维护培训<br/>……',
}, },
{ {
icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_4.png', icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_4.png',
title: '产品技术支持', title: '产品技术支持',
desc: '产品功能与性能巡检<br/>产品使用分析与建议<br/>产品在线技术支持<br/>产品电话技术支持<br/>……' desc: '产品功能与性能巡检<br/>产品使用分析与建议<br/>产品在线技术支持<br/>产品电话技术支持<br/>……',
} },
], ],
// 增值服务 // 增值服务
zzfwList: ['顶层设计服务', '师资培训服务', '行业讲座服务', '科研服务', '教学服务'], zzfwList: ['顶层设计服务', '师资培训服务', '行业讲座服务', '科研服务', '教学服务'],
...@@ -95,36 +94,36 @@ export default { ...@@ -95,36 +94,36 @@ export default {
children: [ children: [
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_1_1.png', 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_1_1.png',
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_1_2.png', 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_1_2.png',
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_1_3.png' 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_1_3.png',
] ],
}, },
{ {
title: '案例指导书', title: '案例指导书',
children: [ children: [
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_2_1.png', 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_2_1.png',
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_2_2.png', 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_2_2.png',
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_2_3.png' 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_2_3.png',
] ],
}, },
{ {
title: '教学PPT', title: '教学PPT',
children: [ children: [
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_3_1.png', 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_3_1.png',
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_3_2.png' 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_3_2.png',
] ],
}, },
{ {
title: '操作视频', title: '操作视频',
children: [ children: [
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_4_1.png', 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_4_1.png',
'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_4_2.png' 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/alzy_4_2.png',
] ],
} },
] ],
} }
}, },
mounted() {}, mounted() {},
methods: {} methods: {},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<div> <div>
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/ser-banner.png" class="banner" /> <img src="https://webapp-pub.ezijing.com/project/x-new/ser-banner.png" class="banner" />
<section class="section"> <section class="section">
<h1 class="pt-100">教材中心</h1> <h1 class="pt-100">教材中心</h1>
<p class="describe"> <p class="describe">
...@@ -13,10 +13,9 @@ ...@@ -13,10 +13,9 @@
项目测评:依据金融产品数字化营销职业技能等级标准实务考核要求,设计重要知识点测评试题,方便学生及时检验项目实务知识学习效果。 项目测评:依据金融产品数字化营销职业技能等级标准实务考核要求,设计重要知识点测评试题,方便学生及时检验项目实务知识学习效果。
</p> </p>
<img <img
src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/ser-img1.png" src="https://webapp-pub.ezijing.com/project/x-new/ser-img1.png"
style="display: block; width: 908px; margin: 0 auto 80px;" style="display: block; width: 908px; margin: 0 auto 80px" />
/> <img src="https://webapp-pub.ezijing.com/project/x-new/ser-img2.png" />
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/ser-img2.png" />
<h1 class="pt-80">课程中心</h1> <h1 class="pt-80">课程中心</h1>
<p class="describe"> <p class="describe">
信息化、数字化教学资源是促进书证融通的重要因素之一,紫荆教育信息化、数字化资源立足“辅教辅学”的功能定位,遵循“一体化设计、结构化课程、颗粒化资源”的建构逻辑完成资源整合,通过提供教学视频、PPT、课程大纲、题库、试卷、实践案例等,使教师教学准备工作更加便利化,帮助教师“好上课”; 信息化、数字化教学资源是促进书证融通的重要因素之一,紫荆教育信息化、数字化资源立足“辅教辅学”的功能定位,遵循“一体化设计、结构化课程、颗粒化资源”的建构逻辑完成资源整合,通过提供教学视频、PPT、课程大纲、题库、试卷、实践案例等,使教师教学准备工作更加便利化,帮助教师“好上课”;
...@@ -55,7 +54,7 @@ ...@@ -55,7 +54,7 @@
</p> </p>
<div class="card-center"> <div class="card-center">
<div class="card-center_item"> <div class="card-center_item">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/ser-img3.png" /> <img src="https://webapp-pub.ezijing.com/project/x-new/ser-img3.png" />
<div class="item-con"> <div class="item-con">
<h2>创新训练项目</h2> <h2>创新训练项目</h2>
<p> <p>
...@@ -66,17 +65,12 @@ ...@@ -66,17 +65,12 @@
<div class="card-center_item"> <div class="card-center_item">
<div class="item-con"> <div class="item-con">
<h2>创业训练项目</h2> <h2>创业训练项目</h2>
<p> <p>在校生团队在导师指导下,完成商业计划书编制、可行性研究、企业模拟运行、创业报告撰写等工作。</p>
在校生团队在导师指导下,完成商业计划书编制、可行性研究、企业模拟运行、创业报告撰写等工作。
</p>
</div> </div>
<img <img style="margin-top: 53px" src="https://webapp-pub.ezijing.com/project/x-new/ser-img4.png" />
style="margin-top: 53px;"
src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/ser-img4.png"
/>
</div> </div>
<div class="card-center_item"> <div class="card-center_item">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/ser-img5.png" /> <img src="https://webapp-pub.ezijing.com/project/x-new/ser-img5.png" />
<div class="item-con"> <div class="item-con">
<h2>创业实践项目</h2> <h2>创业实践项目</h2>
<p> <p>
...@@ -89,10 +83,7 @@ ...@@ -89,10 +83,7 @@
<p class="describe"> <p class="describe">
在科研创新方面紫荆教育和学校共同成立“科研创新”专家组,由教科研专家、行业/企业资深人士、学校骨干教师等组成,专门承接教育科研项目的选题、申报,研究与实施等。 在科研创新方面紫荆教育和学校共同成立“科研创新”专家组,由教科研专家、行业/企业资深人士、学校骨干教师等组成,专门承接教育科研项目的选题、申报,研究与实施等。
</p> </p>
<img <img style="margin-bottom: 100px" src="https://webapp-pub.ezijing.com/project/x-new/ser-foot.png" />
style="margin-bottom: 100px;"
src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/ser-foot.png"
/>
</section> </section>
</div> </div>
</template> </template>
...@@ -102,7 +93,7 @@ export default { ...@@ -102,7 +93,7 @@ export default {
data() { data() {
return {} return {}
}, },
methods: {} methods: {},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
return { return {
articleClassify: this.$store.state.classify, articleClassify: this.$store.state.classify,
list: [], list: [],
newsTabIndex: 1 newsTabIndex: 1,
} }
}, },
mounted() { mounted() {
...@@ -47,12 +47,11 @@ export default { ...@@ -47,12 +47,11 @@ export default {
}, 2000) }, 2000)
} else { } else {
console.log(this.articleClassify, 'this.articleClassify') console.log(this.articleClassify, 'this.articleClassify')
const findId = this.articleClassify[0].children.find(item => { const findId = this.articleClassify[0].children.find((item) => {
return item.display_name === (this.newsTabIndex ? '工作动态' : '新闻动态') return item.display_name === (this.newsTabIndex ? '工作动态' : '新闻动态')
}) })
action.articleAction.getArticle({ category_id: findId ? findId.id : 23 }).then(res => { action.articleAction.getArticle({ category_id: findId ? findId.id : 23 }).then((res) => {
this.list = res.data.list this.list = res.data.list
console.log(this.list, 'this.list')
}) })
} }
}, },
...@@ -60,11 +59,11 @@ export default { ...@@ -60,11 +59,11 @@ export default {
this.$router.push({ this.$router.push({
path: '/news', path: '/news',
query: { query: {
type: this.newsTabIndex type: this.newsTabIndex,
} },
}) })
} },
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -11,8 +11,7 @@ export default [ ...@@ -11,8 +11,7 @@ export default [
qq: '461760646', qq: '461760646',
contact: '王老师', contact: '王老师',
contact_number: '18500913837', contact_number: '18500913837',
desc: desc: '贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
'贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
content: `<table border="1" cellpadding="10" cellspacing="0" style="width: 700px;"> content: `<table border="1" cellpadding="10" cellspacing="0" style="width: 700px;">
<tbody> <tbody>
<tr> <tr>
...@@ -157,7 +156,7 @@ export default [ ...@@ -157,7 +156,7 @@ export default [
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`,
}, },
{ {
id: '2022002', id: '2022002',
...@@ -171,8 +170,7 @@ export default [ ...@@ -171,8 +170,7 @@ export default [
qq: '722810013', qq: '722810013',
contact: '王老师', contact: '王老师',
contact_number: '18500913837', contact_number: '18500913837',
desc: desc: '贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
'贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
content: ` content: `
<table border="1" cellpadding="10" cellspacing="0" style="width: 700px;"> <table border="1" cellpadding="10" cellspacing="0" style="width: 700px;">
<tbody> <tbody>
...@@ -231,7 +229,7 @@ export default [ ...@@ -231,7 +229,7 @@ export default [
<td>Q&A</td> <td>Q&A</td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`,
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -239,7 +237,7 @@ export default [ ...@@ -239,7 +237,7 @@ export default [
time: '待定', time: '待定',
count: '待定', count: '待定',
activeIndex: 2, activeIndex: 2,
id: '202202222' id: '202202222',
}, },
{ {
id: '2022001', id: '2022001',
...@@ -255,7 +253,7 @@ export default [ ...@@ -255,7 +253,7 @@ export default [
contact_number: '18500913837', contact_number: '18500913837',
content: `<p>1. 职业技能等级标准解读(中级)</p> content: `<p>1. 职业技能等级标准解读(中级)</p>
<p>2.证书教学/实训平台/考核标准介绍</p> <p>2.证书教学/实训平台/考核标准介绍</p>
<p>3.金融产品数字化营销中级内容串讲</p>` <p>3.金融产品数字化营销中级内容串讲</p>`,
}, },
{ {
id: '202202', id: '202202',
...@@ -346,7 +344,7 @@ export default [ ...@@ -346,7 +344,7 @@ export default [
<td>在线课程考试</td> <td>在线课程考试</td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`,
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -425,7 +423,7 @@ export default [ ...@@ -425,7 +423,7 @@ export default [
<td>在线课程考试</td> <td>在线课程考试</td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`,
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -433,7 +431,7 @@ export default [ ...@@ -433,7 +431,7 @@ export default [
time: '10月30日-10月31日', time: '10月30日-10月31日',
count: 100, count: 100,
activeIndex: 3, activeIndex: 3,
id: '6' id: '6',
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -441,7 +439,7 @@ export default [ ...@@ -441,7 +439,7 @@ export default [
time: '7月5日-7月9日', time: '7月5日-7月9日',
count: 100, count: 100,
activeIndex: 3, activeIndex: 3,
id: '3' id: '3',
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -449,7 +447,7 @@ export default [ ...@@ -449,7 +447,7 @@ export default [
time: '6月27日-6月30日', time: '6月27日-6月30日',
count: 100, count: 100,
activeIndex: 3, activeIndex: 3,
id: '2' id: '2',
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -457,6 +455,6 @@ export default [ ...@@ -457,6 +455,6 @@ export default [
time: '4月23日-4月25日', time: '4月23日-4月25日',
count: 100, count: 100,
activeIndex: 3, activeIndex: 3,
id: '1' id: '1',
} },
] ]
<template> <template>
<div> <div>
<img class="banner" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-banner.png" /> <img class="banner" src="https://webapp-pub.ezijing.com/project/x-new/train-banner.png" />
<section class="section"> <section class="section">
<h1 class="pt-80">师资培训公告</h1> <h1 class="pt-80">师资培训公告</h1>
<notice></notice> <notice></notice>
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<div class="item-txt">{{ item.text }}</div> <div class="item-txt">{{ item.text }}</div>
</div> </div>
</div> </div>
<h2 class="pt-80" id="md1" style="text-align: center;">师资培训报名</h2> <h2 class="pt-80" id="md1" style="text-align: center">师资培训报名</h2>
<h3 style="margin-top: 50px;">一、培训目标</h3> <h3 style="margin-top: 50px">一、培训目标</h3>
<p class="des"> <p class="des">
培训按照“专业设置与行业需求对接、课程内容与职业标准对接、教学过程与工作过程对接”的目标进行课程设计,着重老师的思维转换训练,从工作场景倒推知识架构,和老师共同完成角色转换。计划培养300名“双师型”教师。 培训按照“专业设置与行业需求对接、课程内容与职业标准对接、教学过程与工作过程对接”的目标进行课程设计,着重老师的思维转换训练,从工作场景倒推知识架构,和老师共同完成角色转换。计划培养300名“双师型”教师。
</p> </p>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div class="pt-box"> <div class="pt-box">
<h2 id="md2">师资学习平台</h2> <h2 id="md2">师资学习平台</h2>
<div class="flex"> <div class="flex">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-dn.png" /> <img src="https://webapp-pub.ezijing.com/project/x-new/train-dn.png" />
<div class="pt-right"> <div class="pt-right">
<div class="txt"> <div class="txt">
紫荆教育为师生精心打造综合一体化学习平台,可实现考核体系的标准化,数据资源的统一化,师资学习的多元化,以及学习管理的系统化,最终形成学、练、训、考、评、管一体的数字化营销学习平台。 紫荆教育为师生精心打造综合一体化学习平台,可实现考核体系的标准化,数据资源的统一化,师资学习的多元化,以及学习管理的系统化,最终形成学、练、训、考、评、管一体的数字化营销学习平台。
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<router-link to="/news"> <router-link to="/news">
<div class="new-item_btn">查看更多</div> <div class="new-item_btn">查看更多</div>
</router-link> </router-link>
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-r1.png" /> <img src="https://webapp-pub.ezijing.com/project/x-new/train-r1.png" />
</div> </div>
<div class="new-list_item"> <div class="new-list_item">
<div class="new-item_title"> <div class="new-item_title">
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<router-link to="/news"> <router-link to="/news">
<div class="new-item_btn">查看更多</div> <div class="new-item_btn">查看更多</div>
</router-link> </router-link>
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-r2.png" /> <img src="https://webapp-pub.ezijing.com/project/x-new/train-r2.png" />
</div> </div>
<div class="new-list_item"> <div class="new-list_item">
<div class="new-item_title"> <div class="new-item_title">
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<router-link to="/news"> <router-link to="/news">
<div class="new-item_btn">查看更多</div> <div class="new-item_btn">查看更多</div>
</router-link> </router-link>
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-r3.png" /> <img src="https://webapp-pub.ezijing.com/project/x-new/train-r3.png" />
</div> </div>
</div> </div>
</section> </section>
...@@ -112,54 +112,54 @@ ...@@ -112,54 +112,54 @@
import notice from './components/notice.vue' import notice from './components/notice.vue'
export default { export default {
components: { components: {
notice notice,
}, },
data() { data() {
return { return {
navList: [ navList: [
{ {
icon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-icon1.png', icon: 'https://webapp-pub.ezijing.com/project/x-new/train-icon1.png',
aIcon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-icon-a1.png', aIcon: 'https://webapp-pub.ezijing.com/project/x-new/train-icon-a1.png',
text: '注册账号', text: '注册账号',
isRegister: true isRegister: true,
}, },
{ {
icon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-icon2.png', icon: 'https://webapp-pub.ezijing.com/project/x-new/train-icon2.png',
aIcon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-icon-a2.png', aIcon: 'https://webapp-pub.ezijing.com/project/x-new/train-icon-a2.png',
text: '师资培训报名', text: '师资培训报名',
id: 'md1' id: 'md1',
}, },
{ {
icon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-icon3.png', icon: 'https://webapp-pub.ezijing.com/project/x-new/train-icon3.png',
aIcon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-icon-a3.png', aIcon: 'https://webapp-pub.ezijing.com/project/x-new/train-icon-a3.png',
text: '师资学习平台', text: '师资学习平台',
id: 'md2' id: 'md2',
}, },
{ {
icon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-icon4.png', icon: 'https://webapp-pub.ezijing.com/project/x-new/train-icon4.png',
aIcon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/project/x-new/train-icon-a4.png', aIcon: 'https://webapp-pub.ezijing.com/project/x-new/train-icon-a4.png',
text: '证书查询', text: '证书查询',
path: '/queryCard' path: '/queryCard',
} },
], ],
isLogin: false, isLogin: false,
options: { options: {
baseUrl: import.meta.env.VITE_API_BASE_URL, baseUrl: import.meta.env.VITE_API_BASE_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: {
onSuccess: this.loginSuccess onSuccess: this.loginSuccess,
}, },
phone: { phone: {
onSuccess: this.loginSuccess onSuccess: this.loginSuccess,
} },
} },
} },
} }
}, },
mounted() {}, mounted() {},
...@@ -170,13 +170,13 @@ export default { ...@@ -170,13 +170,13 @@ export default {
return false return false
} }
if (n.id) { if (n.id) {
const element = document.getElementById(n.id); const element = document.getElementById(n.id)
if (element) { if (element) {
const offsetTop = element.getBoundingClientRect().top + window.scrollY; const offsetTop = element.getBoundingClientRect().top + window.scrollY
window.scrollTo({ window.scrollTo({
top: offsetTop, top: offsetTop,
behavior: 'smooth' behavior: 'smooth',
}); })
} }
return false return false
} }
...@@ -186,7 +186,6 @@ export default { ...@@ -186,7 +186,6 @@ export default {
}, },
onReady(isLogin, user = {}) { onReady(isLogin, user = {}) {
this.user = user this.user = user
window.G.UserInfo = user
window.sessionStorage.userInfo = JSON.stringify(user) window.sessionStorage.userInfo = JSON.stringify(user)
}, },
loginSuccess(data) { loginSuccess(data) {
...@@ -197,13 +196,13 @@ export default { ...@@ -197,13 +196,13 @@ export default {
this.$router.push('/my') this.$router.push('/my')
}) })
window.location.reload() window.location.reload()
} },
}, },
computed: { computed: {
passport() { passport() {
return this.$refs.passport return this.$refs.passport
} },
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -122,7 +122,7 @@ export default [ ...@@ -122,7 +122,7 @@ export default [
<td>理论+操作</td> <td>理论+操作</td>
<td>1+X运营经理</td> <td>1+X运营经理</td>
</tr> </tr>
</table>` </table>`,
}, },
{ {
id: '202302', id: '202302',
...@@ -136,8 +136,7 @@ export default [ ...@@ -136,8 +136,7 @@ export default [
qq: '461760646', qq: '461760646',
contact: '王老师', contact: '王老师',
contact_number: '18500913837', contact_number: '18500913837',
desc: desc: '贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
'贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
content: `<table border="1" cellpadding="10" cellspacing="0" style="width: 700px;"> content: `<table border="1" cellpadding="10" cellspacing="0" style="width: 700px;">
<tbody> <tbody>
<tr> <tr>
...@@ -287,7 +286,7 @@ export default [ ...@@ -287,7 +286,7 @@ export default [
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`,
}, },
{ {
id: '202301', id: '202301',
...@@ -301,8 +300,7 @@ export default [ ...@@ -301,8 +300,7 @@ export default [
qq: '461760646', qq: '461760646',
contact: '王老师', contact: '王老师',
contact_number: '18500913837', contact_number: '18500913837',
desc: desc: '贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
'贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
content: `<table border="1" cellpadding="10" cellspacing="0" style="width: 700px;"> content: `<table border="1" cellpadding="10" cellspacing="0" style="width: 700px;">
<tbody> <tbody>
<tr> <tr>
...@@ -447,7 +445,7 @@ export default [ ...@@ -447,7 +445,7 @@ export default [
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`,
}, },
{ {
id: '2022002', id: '2022002',
...@@ -461,8 +459,7 @@ export default [ ...@@ -461,8 +459,7 @@ export default [
qq: '722810013', qq: '722810013',
contact: '王老师', contact: '王老师',
contact_number: '18500913837', contact_number: '18500913837',
desc: desc: '贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
'贯彻落实教育部等四部门印发《关于在院校实施“1+X学历证书+若干职业技能等级证书”制度试点方案》要求,保障“金融产品数字化营销职业技能等级证书“试点工作的有效开展,分享1+X试点实践经验,促进院校教学和培训工作有序落地。',
content: ` content: `
<table border="1" cellpadding="10" cellspacing="0" style="width: 700px;"> <table border="1" cellpadding="10" cellspacing="0" style="width: 700px;">
<tbody> <tbody>
...@@ -521,7 +518,7 @@ export default [ ...@@ -521,7 +518,7 @@ export default [
<td>Q&A</td> <td>Q&A</td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`,
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -529,7 +526,7 @@ export default [ ...@@ -529,7 +526,7 @@ export default [
time: '待定', time: '待定',
count: '待定', count: '待定',
activeIndex: 3, activeIndex: 3,
id: '202202222' id: '202202222',
}, },
{ {
id: '2022001', id: '2022001',
...@@ -545,7 +542,7 @@ export default [ ...@@ -545,7 +542,7 @@ export default [
contact_number: '18500913837', contact_number: '18500913837',
content: `<p>1. 职业技能等级标准解读(中级)</p> content: `<p>1. 职业技能等级标准解读(中级)</p>
<p>2.证书教学/实训平台/考核标准介绍</p> <p>2.证书教学/实训平台/考核标准介绍</p>
<p>3.金融产品数字化营销中级内容串讲</p>` <p>3.金融产品数字化营销中级内容串讲</p>`,
}, },
{ {
id: '202202', id: '202202',
...@@ -636,7 +633,7 @@ export default [ ...@@ -636,7 +633,7 @@ export default [
<td>在线课程考试</td> <td>在线课程考试</td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`,
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -715,7 +712,7 @@ export default [ ...@@ -715,7 +712,7 @@ export default [
<td>在线课程考试</td> <td>在线课程考试</td>
</tr> </tr>
</tbody> </tbody>
</table>` </table>`,
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -723,7 +720,7 @@ export default [ ...@@ -723,7 +720,7 @@ export default [
time: '10月30日-10月31日', time: '10月30日-10月31日',
count: 100, count: 100,
activeIndex: 3, activeIndex: 3,
id: '6' id: '6',
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -731,7 +728,7 @@ export default [ ...@@ -731,7 +728,7 @@ export default [
time: '7月5日-7月9日', time: '7月5日-7月9日',
count: 100, count: 100,
activeIndex: 3, activeIndex: 3,
id: '3' id: '3',
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -739,7 +736,7 @@ export default [ ...@@ -739,7 +736,7 @@ export default [
time: '6月27日-6月30日', time: '6月27日-6月30日',
count: 100, count: 100,
activeIndex: 3, activeIndex: 3,
id: '2' id: '2',
}, },
{ {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
...@@ -747,6 +744,6 @@ export default [ ...@@ -747,6 +744,6 @@ export default [
time: '4月23日-4月25日', time: '4月23日-4月25日',
count: 100, count: 100,
activeIndex: 3, activeIndex: 3,
id: '1' id: '1',
} },
] ]
...@@ -172,7 +172,7 @@ import action from '@action' ...@@ -172,7 +172,7 @@ import action from '@action'
// import { updateUserInfo } from '@/api/common' // import { updateUserInfo } from '@/api/common'
import breadcrumb from '@/components/breadcrumb.vue' import breadcrumb from '@/components/breadcrumb.vue'
import payPop from './components/payPop.vue' import payPop from './components/payPop.vue'
import nations from '@/tool/nations' import nations from '@/utils/nations'
const IDCARD_REG = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/ const IDCARD_REG = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/
const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/ const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
const EMAIL_REG = /^[A-Za-z0-9]+([_\.\\-][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/ const EMAIL_REG = /^[A-Za-z0-9]+([_\.\\-][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
......
...@@ -6,26 +6,21 @@ Vue.use(Vuex) ...@@ -6,26 +6,21 @@ Vue.use(Vuex)
const store = new Vuex.Store({ const store = new Vuex.Store({
state: { state: {
classify: {} classify: {},
}, },
getters: {}, getters: {},
mutations: { mutations: {
setClassify(state, classify) { setClassify(state, classify) {
state.classify = classify state.classify = classify
}
}, },
actions: {
logout() {
return logout().then(() => {
window.location.href = '/'
})
}, },
actions: {
getClassify({ commit }) { getClassify({ commit }) {
action.articleAction.getAllClassify().then(response => { action.articleAction.getAllClassify().then((response) => {
commit('setClassify', response.data) commit('setClassify', response.data)
}) })
} },
} },
}) })
export default store export default store
store.dispatch('getClassify') store.dispatch('getClassify')
export default class ConvertTime {
/**
* 工具方法 - 播放时间 转化 h:m:s
* @param {[string]} duration 时间戳
*/
durationToTimeString (duration) {
let h = Math.floor(duration / 3600)
let m = Math.floor((duration - h * 3600) / 60)
let s = (duration - h * 3600 - m * 60) % 60
function tenify (a) {
return a >= 10 ? a : '0' + a
}
let to = { h: tenify(h), m: tenify(m), s: tenify(s) }
let format = 'h:m:s'
return format.replace(/h|m|s/g, k => to[k]).replace(/^00:/, '')
}
}
export default class Cookies {
/*
name: cookies的名字,也是cookies的唯一标识,通过他来获取和设置cookies
value:cookies的值,也就是cookies的内容,这是cookies有用的内容
Domain:cookies所属的域
Path: cookies所属的路径,他是属于某个路径的,/代表根路径
expires:cookies的到期时间,如果为0则永不过期
http: 如果打钩则通过脚本无法获取,可以防止xss攻击
secure:https连接才会传送该cookies,增强了安全性
sameSite:可选值Strict 和 Lax,Strict 严格模式,不能被第三方网站获取,Lax:宽松模式,可以被第三方获取
*/
/* 如果 http 打钩,则 这边的 脚本函数将全部失效,而线上就是这么做的 */
/**
* 设置 Cookies,用于客户端
* @param {[string]} cName 要设置cookie的key值
* @param {[string]} cValue 要设置cookie的value值
* @param {[object]} obj 要设置cookie的其他值
* @param {[object]} obj.path 路径
* @param {[object]} obj.domain 域名
* @param {[object]} obj.expires 过期时间
*/
setCookie (cName, cValue, obj) {
let d = new Date()
if (obj.expires) {
d.setTime(d.getTime() + ((obj.expires || 0) * 24 * 60 * 60 * 1000))
obj.expires = d.toUTCString()
}
let str = ''
for (let key in obj) {
str += '; ' + key + '=' + obj[key]
}
document.cookie = cName + '=' + cValue + str
}
/**
* 获取指定cookie,用于客户端
* @param {[string]} cName 要获取cookie的key值
*/
getCookie (cName) {
let key = cName + '='
let ca = document.cookie.split(';')
for (let i = 0; i < ca.length; i++) {
let c = ca[i]
while (c.charAt(0) === ' ') c = c.substring(1)
if (c.indexOf(key) !== -1) {
return c.substring(key.length, c.length)
}
}
return ''
}
/**
* 获取全cookie,用于客户端
*/
getAllCookies () {
return document.cookie
}
/**
* 清除cookie,用于客户端
* 需要path 和 domain 唯一确定 一个 cookie
* @param {[string]} cName 要清除cookie的key值
* @param {[object]} obj.path 路径
* @param {[object]} obj.domain 域名
* @param {[object]} obj.expires 过期时间
*/
clearCookie (cName, obj) {
let exp = new Date() // 获取客户端本地当前系统时间
// 将exp设置为客户端本地时间1分钟以前,将exp赋值给cookie作为过期时间后,就表示该cookie已经过期了, 那么浏览器就会将其立刻删除掉
exp.setTime(exp.getTime() - 60 * 1000)
obj.expires = exp.toUTCString()
let str = ''
for (let key in obj) {
str += '; ' + key + '=' + obj[key]
}
document.cookie = cName + '=' + str
}
}
function downloadIamge(imgsrc, name) {
// 下载图片地址和图片名
var image = new Image()
// 解决跨域 Canvas 污染问题
image.setAttribute('crossOrigin', 'anonymous')
image.onload = function() {
const canvas = document.createElement('canvas')
canvas.width = image.width
canvas.height = image.height
const context = canvas.getContext('2d')
context.drawImage(image, 0, 0, image.width, image.height)
const url = canvas.toDataURL('image/png') // 得到图片的base64编码数据
const a = document.createElement('a') // 生成一个a元素
const event = new MouseEvent('click') // 创建一个单击事件
a.download = name || 'photo' // 设置图片名称
a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event) // 触发a的单击事件
}
image.src = imgsrc
}
export default downloadIamge
import Cookies from './cookies'
import ConvertTime from './convert_time'
import Other from './other'
let cookies = new Cookies()
let convertTime = new ConvertTime()
let other = new Other()
export default {
cookies,
convertTime,
other
}
export default class Other {
/**
* 获取idt
*/
getIdt () {
let cookieName = '_idt'
// 尝试从cookie获取
let idt = /_idt=/.test(document.cookie) && document.cookie.replace(/.*_idt=([^;]+).*/, '$1')
if (!idt) {
idt = (new Date()).getTime().toString(36) + Math.random().toString(32) + Math.random().toString(32)
let d = new Date()
d.setMonth(d.getMonth() + 6)
document.cookie = cookieName + '=' + idt + ';path=/;domain=.ezijing.com;expires=' + d.toGMTString()
}
return idt
}
}
...@@ -7,30 +7,28 @@ const httpRequest = axios.create({ ...@@ -7,30 +7,28 @@ const httpRequest = axios.create({
timeout: 60000, timeout: 60000,
withCredentials: true, withCredentials: true,
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded' 'Content-Type': 'application/x-www-form-urlencoded',
} },
}) })
// 请求拦截 // 请求拦截
httpRequest.interceptors.request.use( httpRequest.interceptors.request.use(
function(config) { function (config) {
if (config.url.includes('/api/cms')) { if (config.url.includes('/api/cms')) {
const defaultParams = { const defaultParams = {
timestamp: parseInt(Date.now() / 1000), timestamp: parseInt(Date.now() / 1000),
nonce: Math.random() nonce: Math.random().toString(36).slice(-8),
.toString(36)
.slice(-8)
} }
// 接口请求参数 // 接口请求参数
let params = config.params || config.data let params = config.params || config.data
// 排序 // 排序
function alphabeticalSort(a, b) { const alphabeticalSort = (a, b) => {
return a.localeCompare(b) return a.localeCompare(b)
} }
params = Object.assign({}, defaultParams, params) params = Object.assign({}, defaultParams, params)
const str = qs.stringify(Object.assign({}, params, { salt: 'n7xAav2tSjn9Ysnr' }), { sort: alphabeticalSort }) const str = qs.stringify(Object.assign({}, params, { salt: 'n7xAav2tSjn9Ysnr' }), { sort: alphabeticalSort })
const strs = qs.parse(str) const strs = qs.parse(str)
Object.keys(strs).map(item => { Object.keys(strs).map((item) => {
strs[item] = Array.isArray(strs[item]) ? JSON.stringify(strs[item]) : strs[item] strs[item] = Array.isArray(strs[item]) ? JSON.stringify(strs[item]) : strs[item]
}) })
params.signature = 'UG7wBenexQhiuD2wpCwuxkU0jqcj006d' params.signature = 'UG7wBenexQhiuD2wpCwuxkU0jqcj006d'
...@@ -52,14 +50,14 @@ httpRequest.interceptors.request.use( ...@@ -52,14 +50,14 @@ httpRequest.interceptors.request.use(
} }
return config return config
}, },
function(error) { function (error) {
return Promise.reject(error) return Promise.reject(error)
} }
) )
// 响应拦截 // 响应拦截
httpRequest.interceptors.response.use( httpRequest.interceptors.response.use(
function(response) { function (response) {
const { data } = response const { data } = response
// zws // zws
if (parseInt(data.code)) { if (parseInt(data.code)) {
...@@ -77,7 +75,7 @@ httpRequest.interceptors.response.use( ...@@ -77,7 +75,7 @@ httpRequest.interceptors.response.use(
} }
return data return data
}, },
function(error) { function (error) {
if (error.response) { if (error.response) {
const { message } = error.response.data const { message } = error.response.data
Message.error(message || error.response.data) Message.error(message || error.response.data)
......
...@@ -7,21 +7,20 @@ export default defineConfig({ ...@@ -7,21 +7,20 @@ export default defineConfig({
plugins: [vue(), mkcert()], plugins: [vue(), mkcert()],
server: { server: {
open: true, open: true,
host: 'dev.ezijing.com' host: 'dev.ezijing.com',
}, },
build: { build: {
outDir: 'client-dist' outDir: 'client-dist',
}, },
resolve: { resolve: {
alias: [ alias: [
{ find: '@', replacement: path.resolve(__dirname, 'src') }, { find: '@', replacement: path.resolve(__dirname, 'src') },
{ find: '@action', replacement: path.resolve(__dirname, 'src/action') }, { find: '@action', replacement: path.resolve(__dirname, 'src/action') },
{ find: '@api', replacement: path.resolve(__dirname, 'src/api') }, { find: '@api', replacement: path.resolve(__dirname, 'src/api') },
{ find: '@tool', replacement: path.resolve(__dirname, 'src/tool') }, ],
]
}, },
css: { css: {
// 禁用SASS警告提醒 // 禁用SASS警告提醒
preprocessorOptions: { scss: { quietDeps: true, charset: false } } preprocessorOptions: { scss: { quietDeps: true, charset: false } },
} },
}) })
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论