提交 67df180b authored 作者: matian's avatar matian

新增终身学习

上级 ac864630
projectId=6800242743894343680
baseURL=https://project-api.ezijing.com
loginURL=https://login.ezijing.com/auth
\ No newline at end of file
projectId=6800242743894343680
baseURL=https://project-api.ezijing.com
loginURL=https://login.ezijing.com/auth
\ No newline at end of file
projectId=6800242743894343680
baseURL=https://project-api2.ezijing.com
loginURL=https://login2.ezijing.com/auth
\ No newline at end of file
...@@ -57,7 +57,7 @@ typings/ ...@@ -57,7 +57,7 @@ typings/
.yarn-integrity .yarn-integrity
# dotenv environment variables file # dotenv environment variables file
.env # .env
# parcel-bundler cache (https://parceljs.org/) # parcel-bundler cache (https://parceljs.org/)
.cache .cache
......
...@@ -44,3 +44,15 @@ export function getArticleList(params) { ...@@ -44,3 +44,15 @@ export function getArticleList(params) {
export function getImgTextList(params) { export function getImgTextList(params) {
return httpRequest.get('/api/cms/api/v1/img-text', { params }) return httpRequest.get('/api/cms/api/v1/img-text', { params })
} }
/**
* 获取用户信息
*/
export function getUser(params = { learning_info: 1 }) {
return httpRequest.get('/api/usercenter/v2/frontend/user/get-user-info', { params })
}
/**
* 退出登录
*/
export function logout() {
return httpRequest.get('/api/passport/rest/logout')
}
...@@ -2,6 +2,22 @@ ...@@ -2,6 +2,22 @@
<nav class="app-menu"> <nav class="app-menu">
<ul> <ul>
<tree-item :item="item" v-for="(item, index) in list" :key="index" class="first"></tree-item> <tree-item :item="item" v-for="(item, index) in list" :key="index" class="first"></tree-item>
<template>
<client-only>
<div class="login_con">
<div class="user" v-if="user.id">
<span>{{ user.realname || user.nickname }}</span
><em>|</em><span class="logout" @click="logout">退出</span>
</div>
<div class="login-btn-box" v-else>
<div class="login"><a :href="loginURL" :key="loginURL">登录</a></div>
<div class="register">
<a :href="registerURL">注册</a>
</div>
</div>
</div>
</client-only>
</template>
<div class="tool-box" @click="switchLocale"> <div class="tool-box" @click="switchLocale">
<div class="item"> <div class="item">
<div class="icon"></div> <div class="icon"></div>
...@@ -16,6 +32,23 @@ ...@@ -16,6 +32,23 @@
import TreeItem from '@/components/TreeItem' import TreeItem from '@/components/TreeItem'
export default { export default {
components: { TreeItem }, components: { TreeItem },
computed: {
user() {
return this.$store.state.user || {}
},
loginURL() {
return process.client
? `${process.env.loginURL}/login/index?redirect_uri=${encodeURIComponent(
location.origin + this.$route.fullPath
)}`
: ''
},
registerURL() {
return process.client
? `${process.env.loginURL}/register?redirect_uri=${encodeURIComponent(location.origin + this.$route.fullPath)}`
: ''
}
},
data() { data() {
return { return {
list: [ list: [
...@@ -211,7 +244,13 @@ export default { ...@@ -211,7 +244,13 @@ export default {
const lang = this.$store.state.locale === 'zh-CN' ? 'en-US' : 'zh-CN' const lang = this.$store.state.locale === 'zh-CN' ? 'en-US' : 'zh-CN'
this.$cookies.set('lang', lang, { domain: 'ezijing.com' }) this.$cookies.set('lang', lang, { domain: 'ezijing.com' })
process.client && location.reload() process.client && location.reload()
},
logout() {
this.$store.dispatch('logout')
} }
},
mounted() {
this.$store.dispatch('checkLogin')
} }
} }
</script> </script>
...@@ -256,4 +295,45 @@ export default { ...@@ -256,4 +295,45 @@ export default {
} }
} }
} }
.login_con {
margin-top: 0.5rem;
padding-left: 1rem;
.user {
margin-left: auto;
font-size: 0.07rem;
em {
font-size: 0.07rem;
font-style: normal;
padding: 0 0.07rem;
}
.logout {
cursor: pointer;
}
}
.login-btn-box {
margin-left: auto;
display: flex;
div {
width: 0.72rem;
height: 0.24rem;
box-sizing: border-box;
text-align: center;
line-height: 0.24rem;
font-size: 0.08rem;
border-radius: 6px;
margin-left: 0.1rem;
cursor: pointer;
}
.login {
background: #aa1941;
color: #fff;
cursor: pointer;
}
.register {
color: #333333;
border: 1px solid #eaeaea;
cursor: pointer;
}
}
}
</style> </style>
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAn0EINdIXTDCzmR7J5FOjOV+PbXt7GNO6fanoCGe2O0CPRlNf
2Ea/wv6SlRtJPd0ohmnKqZdUbBpAsiV4ggOdOqeEB6utVYQ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QWdyZWVtZW50IGxvY2F0ZWQgYXQgaHR0cHM6Ly93
d3cuZGlnaWNlcnQuY29tL3JwYS11YTANBgkqhkiG9w0BAQsFAAOCAQEAE+8lW5Yw
IuiRsHn4gYRRVbLmIypWwYH74lIXnQiALeUsUkWfW7KA0ARF1el3YaTAg8/r6zyX
eZTdlhndxKOKvO5N+rnHWJB6a3fJURn6e0I+rDzKV1Zacv2Vx/ZHLZmza/bp4Azi
BrDOiPlW/Ktj6ALQzAgq70Oytk9htLupBWPuplJDdyhGqb9RfQvWc1Fa1HwXdBQi
oJPibfMaYkHMY3pTbOv2rzMKEoZwHDHqyC73RI9JgqqiXHw0rIL8A1uL3IrymXEr
mycTqbSozQwiiEfb+cxzY82YaNzaLpJyIst0T2QmdDDngmyd2LEmm4NKeXRrcFRh
XDDFfpIn93B7JA==
-----END CERTIFICATE-----
let config = {} // let config = {}
if (process.env.NODE_ENV === 'production') { // if (process.env.NODE_ENV === 'production') {
config = { // config = {
server: { port: 2047, host: '0.0.0.0', timing: false } // server: { port: 2047, host: '0.0.0.0', timing: false }
} // }
} // }
import path from 'path'
import fs from 'fs'
export default { export default {
...config, env: process.env,
env: { server: { port: 2048, host: '0.0.0.0' },
projectId: '6800242743894343680', ...(process.env.NODE_ENV === 'development' && {
baseURL: 'https://project-api.ezijing.com' server: {
}, host: 'dev.ezijing.com',
axios: { https: {
baseURL: 'https://project-api.ezijing.com' key: fs.readFileSync(path.resolve(__dirname, 'dev.ezijing.com.key')),
}, cert: fs.readFileSync(path.resolve(__dirname, 'dev.ezijing.com.pem'))
}
}
}),
// Global page headers: https://go.nuxtjs.dev/config-head // Global page headers: https://go.nuxtjs.dev/config-head
head: { head: {
title: '清控紫荆教育--在线学位,国际留学,数字经济产业学院', title: '清控紫荆教育--在线学位,国际留学,数字经济产业学院',
......
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
"cookie-universal-nuxt": "^2.1.4", "cookie-universal-nuxt": "^2.1.4",
"core-js": "^3.11.0", "core-js": "^3.11.0",
"element-ui": "^2.15.8", "element-ui": "^2.15.8",
"fs": "*",
"nuxt": "^2.15.3", "nuxt": "^2.15.3",
"path": "^0.12.7",
"qs": "^6.10.1", "qs": "^6.10.1",
"swiper": "^5.4.5", "swiper": "^5.4.5",
"vant": "^2.12.15", "vant": "^2.12.15",
...@@ -5666,6 +5668,11 @@ ...@@ -5666,6 +5668,11 @@
"readable-stream": "^2.0.0" "readable-stream": "^2.0.0"
} }
}, },
"node_modules/fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
"integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
},
"node_modules/fs-extra": { "node_modules/fs-extra": {
"version": "9.1.0", "version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
...@@ -8444,6 +8451,15 @@ ...@@ -8444,6 +8451,15 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/path": {
"version": "0.12.7",
"resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
"integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
"dependencies": {
"process": "^0.11.1",
"util": "^0.10.3"
}
},
"node_modules/path-browserify": { "node_modules/path-browserify": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
...@@ -8492,6 +8508,19 @@ ...@@ -8492,6 +8508,19 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/path/node_modules/inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"node_modules/path/node_modules/util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
"dependencies": {
"inherits": "2.0.3"
}
},
"node_modules/pbkdf2": { "node_modules/pbkdf2": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
...@@ -18201,6 +18230,11 @@ ...@@ -18201,6 +18230,11 @@
"readable-stream": "^2.0.0" "readable-stream": "^2.0.0"
} }
}, },
"fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
"integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
},
"fs-extra": { "fs-extra": {
"version": "9.1.0", "version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
...@@ -20335,6 +20369,30 @@ ...@@ -20335,6 +20369,30 @@
"resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
"integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
}, },
"path": {
"version": "0.12.7",
"resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
"integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
"requires": {
"process": "^0.11.1",
"util": "^0.10.3"
},
"dependencies": {
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
"requires": {
"inherits": "2.0.3"
}
}
}
},
"path-browserify": { "path-browserify": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
......
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
"cookie-universal-nuxt": "^2.1.4", "cookie-universal-nuxt": "^2.1.4",
"core-js": "^3.11.0", "core-js": "^3.11.0",
"element-ui": "^2.15.8", "element-ui": "^2.15.8",
"fs": "*",
"nuxt": "^2.15.3", "nuxt": "^2.15.3",
"path": "^0.12.7",
"qs": "^6.10.1", "qs": "^6.10.1",
"swiper": "^5.4.5", "swiper": "^5.4.5",
"vant": "^2.12.15", "vant": "^2.12.15",
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<div> <div>
<div class="banner"> <div class="banner">
<div v-if="roadList && roadList.length"> <div v-if="roadList && roadList.length">
<div v-for="(item, index) in roadList" :key="index" class="roadList"> <div v-for="(item, index) in list" :key="index" class="roadList">
<el-popover <el-popover
title="我的项目" title="我的项目"
width="146"
trigger="click" trigger="click"
popper-class="popover" popper-class="popover"
:placement="item.position" :placement="item.position"
v-model="item.isShow" v-model="item.isShow"
visible-arrow="true" visible-arrow="true"
@show="handleShow(item)"
> >
<div> <div>
<!-- 我的项目 --> <!-- 我的项目 -->
...@@ -37,7 +37,9 @@ ...@@ -37,7 +37,9 @@
<div> <div>
<!-- 我的项目 --> <!-- 我的项目 -->
<div v-for="(it, indexItem) in itemRoad.itemList" :key="indexItem" class="project_name"> <div v-for="(it, indexItem) in itemRoad.itemList" :key="indexItem" class="project_name">
<AppLink :data="it">
{{ it.name }} {{ it.name }}
</AppLink>
</div> </div>
</div> </div>
<div slot="reference" class="homeList_con_item"> <div slot="reference" class="homeList_con_item">
...@@ -49,60 +51,86 @@ ...@@ -49,60 +51,86 @@
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<div class="content_top"> <ProjectCard
<div class="top_title"> title="在线国际学位"
在线国际学位 :list="internationalDegreeProjectList"
</div> baseUrl="/internationalDegree"
<div class="top_more">查看更多+</div> ></ProjectCard>
</div> <ProjectCard title="留学中学" :list="studyAbroadProjectList" baseUrl="/studyAbroad"></ProjectCard>
<div class="content_bottom">
<img src="https://webapp-pub.ezijing.com/www/h5/lifeLearning/img1.png" alt="" />
<img src="https://webapp-pub.ezijing.com/www/h5/lifeLearning/img2.png" alt="" />
<img src="https://webapp-pub.ezijing.com/www/h5/lifeLearning/img3.png" alt="" />
</div>
</div>
<div class="content content1">
<div class="content_top">
<div class="top_title">
留学中心
</div>
<div class="top_more">查看更多+</div>
</div>
<div class="content_bottom">
<img src="https://webapp-pub.ezijing.com/www/h5/lifeLearning/img4.png" alt="" />
<img src="https://webapp-pub.ezijing.com/www/h5/lifeLearning/img5.png" alt="" />
<img src="https://webapp-pub.ezijing.com/www/h5/lifeLearning/img6.png" alt="" />
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { roadMapList, homeList } from '@/utils/roadMap.js' import { roadMapList, homeList } from './roadMap'
import AppLink from '@/components/Link.vue' import AppLink from '@/components/Link.vue'
import ProjectCard from '@/components/ProjectCard.vue'
export default { export default {
components: { AppLink }, components: { AppLink, ProjectCard },
date() { computed: {
learning() {
return this.$store.state.user.learning_info.filter(item => item.status === '1')
},
list() {
if (this.learning.length) {
this.roadList.forEach(item => {
console.log(item, '000')
if (item.projectList.find(it => it.tenant === this.learning[0].tenant)) {
item.isShow = true
item.project_name = '我的项目:'
item.projectList = item.projectList.filter(it => it.tenant === this.learning[0].tenant)
}
})
return this.roadList
} else {
return this.roadList
}
}
},
data() {
return { return {
roadList: [], roadList: roadMapList,
homeList: [] homeList: homeList,
internationalDegreeProjectList: [
{
imgUrl: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/img1.png',
href: 'https://kelley.ezijing.com/'
},
{
imgUrl: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/img2.png',
href: 'https://ciis.ezijing.com/'
},
{
imgUrl: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/img3.png',
href: 'https://marywood.ezijing.com/'
} }
],
// 热门专业
studyAbroadProjectList: [
{
imgUrl: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/img4.png',
href: 'https://cbu-plus.ezijing.com/'
}, },
created() { {
this.roadList = roadMapList imgUrl: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/img5.png',
this.homeList = homeList href: 'https://marywood-plus.ezijing.com/'
console.log(this.roadList)
}, },
mounted() { {
this.$nextTick(() => { imgUrl: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/img6.png',
this.roadList.map(item => { href: 'https://sbu-plus.ezijing.com/'
console.log(item.title, 'title') }
if (item.title === '职业教育') { ]
item.isShow = true }
},
methods: {
handleShow(val) {
this.list.map(item => {
if (item.title !== val.title) {
item.isShow = false
} }
}) })
}) }
} }
} }
</script> </script>
...@@ -110,6 +138,8 @@ export default { ...@@ -110,6 +138,8 @@ export default {
<style lang="scss"> <style lang="scss">
.el-popover.popover { .el-popover.popover {
background: rgba(255, 255, 255, 0.39); background: rgba(255, 255, 255, 0.39);
border-radius: 0.1rem;
padding: 0.13rem 0 0.2rem 0.13rem;
.el-popover__title { .el-popover__title {
font-weight: 400; font-weight: 400;
...@@ -123,7 +153,7 @@ export default { ...@@ -123,7 +153,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
.line { .line {
width: 1.41rem; width: 90%;
border: 1px dashed #ccc; border: 1px dashed #ccc;
margin: 0.1rem 0 0.1rem 0; margin: 0.1rem 0 0.1rem 0;
} }
...@@ -132,7 +162,6 @@ export default { ...@@ -132,7 +162,6 @@ export default {
width: 100%; width: 100%;
height: 6.31rem; height: 6.31rem;
background: url(https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/h5/lifeLearning/banner.png); background: url(https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/h5/lifeLearning/banner.png);
// background-color: #ccc;
background-size: 100% 100%; background-size: 100% 100%;
position: relative; position: relative;
.roadList { .roadList {
...@@ -147,6 +176,7 @@ export default { ...@@ -147,6 +176,7 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
cursor: pointer;
} }
.title { .title {
font-size: 0.14rem; font-size: 0.14rem;
...@@ -232,6 +262,8 @@ export default { ...@@ -232,6 +262,8 @@ export default {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
cursor: pointer;
.title { .title {
font-size: 0.14rem; font-size: 0.14rem;
font-weight: 500; font-weight: 500;
......
import Vue from 'vue'
import { Notify } from 'vant'
//挂载到Vue全局对象上
Vue.prototype.$notify = Notify
export const roadMapList = [ export const roadMapList = [
{ {
project_name: '项目名称:',
position: 'left', position: 'left',
isShow: false, isShow: false,
icon: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/icon5.png',
icon: 'https://webapp-pub.ezijing.com/www/pc/lifeLearning/icon5.png',
title: '博士', title: '博士',
projectList: [ projectList: [
{ {
tenant: 'cbu-plus',
name: '工商管理博士DBA', name: '工商管理博士DBA',
href: '' href: 'https://cbu-plus.ezijing.com'
} }
], ],
checkList: [ checkList: [
...@@ -19,96 +27,112 @@ export const roadMapList = [ ...@@ -19,96 +27,112 @@ export const roadMapList = [
] ]
}, },
{ {
position: 'right', project_name: '项目名称:',
position: 'right-start',
isShow: false, isShow: false,
icon: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/icon4.png',
icon: 'https://webapp-pub.ezijing.com/www/pc/lifeLearning/icon4.png',
title: '硕士', title: '硕士',
projectList: [ projectList: [
{ {
tenant: 'kelley',
name: '金融硕士MSF', name: '金融硕士MSF',
href: '' href: 'https://kelley.ezijing.com'
}, },
{ {
tenant: 'campbellsville',
name: '教育学硕士MED', name: '教育学硕士MED',
href: '' href: 'https://cu.ezijing.com'
}, },
{ {
tenant: 'ciis',
name: '应用心理学MAP', name: '应用心理学MAP',
href: '' href: 'https://ciis.ezijing.com'
} }
], ],
checkList: [ checkList: [
{ {
name: '在线国际学位', name: '在线国际学位',
href: '' path: '/internationalDegree'
}, },
{ {
tenant: 'cbu-plus',
name: '工商管理博士DBA', name: '工商管理博士DBA',
href: '' href: 'https://cbu-plus.ezijing.com'
} }
] ]
}, },
{ {
position: 'right-end', project_name: '项目名称:',
isShow: false,
icon: 'https://webapp-pub.ezijing.com/www/pc/lifeLearning/icon3.png', position: 'right-start',
isShow: false,
icon: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/icon3.png',
title: '在线国际学位', title: '在线国际学位',
projectList: [ projectList: [
{ {
tenant: 'marywood',
name: '数字领导力方向MBA', name: '数字领导力方向MBA',
href: '' href: 'https://marywood.ezijing.com'
}, },
{ {
tenant: 'seg',
name: '酒店和旅游方向MBA', name: '酒店和旅游方向MBA',
href: '' href: 'https://shms.ezijing.com'
}, },
{ {
tenant: 'caas',
name: '餐饮管理方向MBA', name: '餐饮管理方向MBA',
href: '' href: 'https://caas.ezijing.com'
} }
], ],
checkList: [ checkList: [
{ {
tenant: 'cbu-plus',
name: '工商管理博士DBA', name: '工商管理博士DBA',
href: '' href: 'https://cbu-plus.ezijing.com'
} }
] ]
}, },
{ {
project_name: '项目名称:',
isShow: false, isShow: false,
position: 'right', position: 'left-end',
icon: 'https://webapp-pub.ezijing.com/www/pc/lifeLearning/icon2.png', icon: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/icon2.png',
title: '本科', title: '本科',
projectList: [ projectList: [
{ {
tenant: '',
name: '紫荆数字经济产业学院', name: '紫荆数字经济产业学院',
href: '' href: ''
}, },
{ {
tenant: '',
name: '国际大一(1+3)即将推出', name: '国际大一(1+3)即将推出',
href: '' onClick() {
Notify({ type: 'primary', message: '即将推出' })
}
} }
], ],
checkList: [ checkList: [
{ {
name: '在线国际学位', name: '在线国际学位',
href: '' path: '/internationalDegree'
}, },
{ {
name: '硕士(国际留学)', name: '硕士(国际留学)',
href: '' path: '/studyAbroad'
} }
] ]
}, },
{ {
project_name: '项目名称:',
isShow: false, isShow: false,
position: 'left', position: 'right',
icon: 'https://webapp-pub.ezijing.com/www/pc/lifeLearning/icon1.png', icon: 'https://webapp-pub.ezijing.com/www/h5/lifeLearning/icon1.png',
title: '职业教育', title: '职业教育',
projectList: [ projectList: [
{ {
tenant: '',
name: '紫荆数字经济产业学院', name: '紫荆数字经济产业学院',
href: 'https://www.baidu.com/' href: 'https://www.baidu.com/'
} }
...@@ -116,11 +140,11 @@ export const roadMapList = [ ...@@ -116,11 +140,11 @@ export const roadMapList = [
checkList: [ checkList: [
{ {
name: '在线国际学位', name: '在线国际学位',
href: '' path: '/internationalDegree'
}, },
{ {
name: '硕士(国际留学)', name: '硕士(国际留学)',
href: '' path: '/studyAbroad'
} }
] ]
} }
...@@ -128,39 +152,41 @@ export const roadMapList = [ ...@@ -128,39 +152,41 @@ export const roadMapList = [
export const homeList = [ export const homeList = [
{ {
position: 'top', position: 'top',
icon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/h5/lifeLearning/icon6.png', icon: 'https://webapp-pub.ezijing.com/www/pc/lifeLearning/home.png',
isShow: false, isShow: false,
title: '职业证书', title: '职业证书',
itemList: [ itemList: [
{ {
name: '1+X', name: '1+X',
href: '' href: 'https://x.ezijing.com/'
}, },
{ {
name: '私人财富风险管理顾问(PRP)', name: '私人财富风险管理顾问(PRP)',
href: '' href: 'https://prp.ezijing.com'
}, },
{ {
name: '高管培训-数字创新管理', name: '高管培训-数字创新管理',
href: '' onClick() {
Notify({ type: 'primary', message: '即将推出' })
}
}, },
{ {
name: '互联网营销师', name: '互联网营销师',
href: '' href: 'https://vst.ezijing.com'
}, },
{ {
name: '工业机器人系统操作员', name: '工业机器人系统操作员',
href: '' href: 'https://vst.ezijing.com'
}, },
{ {
name: '大数据技术人员', name: '大数据技术人员',
href: '' href: 'https://vst.ezijing.com'
} }
] ]
}, },
{ {
position: 'right-start', position: 'top-end',
icon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/h5/lifeLearning/icon6.png', icon: 'https://webapp-pub.ezijing.com/www/pc/lifeLearning/home.png',
isShow: false, isShow: false,
title: '实习就业', title: '实习就业',
itemList: [ itemList: [
...@@ -172,7 +198,7 @@ export const homeList = [ ...@@ -172,7 +198,7 @@ export const homeList = [
}, },
{ {
position: 'top-start', position: 'top-start',
icon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/www/h5/lifeLearning/icon6.png', icon: 'https://webapp-pub.ezijing.com/www/pc/lifeLearning/home.png',
isShow: false, isShow: false,
title: '企业培训', title: '企业培训',
itemList: [ itemList: [
......
import { getUser, logout } from '@/api'
export const state = () => ({ export const state = () => ({
user: {},
searchVisible: false, searchVisible: false,
menuVisible: false, menuVisible: false,
locales: ['zh-CN', 'en-US'], locales: ['zh-CN', 'en-US'],
...@@ -6,6 +9,9 @@ export const state = () => ({ ...@@ -6,6 +9,9 @@ export const state = () => ({
}) })
export const mutations = { export const mutations = {
setUser(state, user) {
state.user = user
},
toggleSearch(state, visible) { toggleSearch(state, visible) {
state.searchVisible = visible state.searchVisible = visible
}, },
...@@ -20,6 +26,32 @@ export const mutations = { ...@@ -20,6 +26,32 @@ export const mutations = {
} }
export const actions = { export const actions = {
getUser({ commit }) {
getUser().then(response => {
commit('setUser', response.data)
})
},
// 退出登录
logout({ commit }) {
logout().then(response => {
commit('setUser', {})
this.$router.replace('/')
})
},
// 检测登录状态
async checkLogin({ commit }) {
console.log('000')
const isLogin = await getUser()
.then(response => {
commit('setUser', response.data)
return true
})
.catch(() => {
commit('setUser', {})
return false
})
return isLogin
},
switchLocale({ commit }, locale) { switchLocale({ commit }, locale) {
commit('setLocale', locale) commit('setLocale', locale)
this.app.i18n.locale = locale this.app.i18n.locale = locale
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论