|
@@ -1,27 +1,67 @@
|
|
|
<template>
|
|
|
<header class="header">
|
|
|
- <div class="container clearfix">
|
|
|
+ <div class="container clearfix dis_play">
|
|
|
<div class="logo logo--no" v-if="header.companyLogo">
|
|
|
- <img style="cursor: pointer; width: 162px; height: 33px" :src="$tools.splitImgHost(header.companyLogo)" alt=""
|
|
|
- @click="go('/')" />
|
|
|
+ <img
|
|
|
+ style="cursor: pointer; max-width: 100%; max-height: 100%"
|
|
|
+ :src="$tools.splitImgHost(header.companyLogo)"
|
|
|
+ alt=""
|
|
|
+ @click="go('/')"
|
|
|
+ />
|
|
|
</div>
|
|
|
<h1 class="logo" v-else @click="go('/')"></h1>
|
|
|
<nav class="nav">
|
|
|
<ul class="list">
|
|
|
<li v-for="(item, index) in showNav(header.Nav)" :key="index">
|
|
|
<a v-if="item.name == '首页'" @click="go('/index')">首页</a>
|
|
|
- <a v-if="item.name == '走进祥粤'" @click="go('/about')"
|
|
|
- :style="$route.path === '/about' ? 'color:red;' : ''">走进祥粤</a>
|
|
|
- <a v-if="item.name == '课程'" @click="go('/course-list')"
|
|
|
- :style="$route.path === '/course-list' ? 'color:red;' : ''">课程</a>
|
|
|
- <a v-if="item.name == '直播'" @click="go('/live-list')"
|
|
|
- :style="$route.path === '/live-list' ? 'color:red;' : ''">直播</a>
|
|
|
- <a v-if="item.name == '题库'" @click="go('/bank-list')"
|
|
|
- :style="$route.path === '/bank-list' ? 'color:red;' : ''">题库</a>
|
|
|
+ <a
|
|
|
+ v-if="item.name == '走进祥粤'"
|
|
|
+ @click="go('/about')"
|
|
|
+ :style="$route.path === '/about' ? 'color:red;' : ''"
|
|
|
+ >走进祥粤</a
|
|
|
+ >
|
|
|
+ <a
|
|
|
+ v-if="item.name == '课程'"
|
|
|
+ @click="go('/course-list')"
|
|
|
+ :style="$route.path === '/course-list' ? 'color:red;' : ''"
|
|
|
+ >课程</a
|
|
|
+ >
|
|
|
+ <a
|
|
|
+ v-if="item.name == '直播'"
|
|
|
+ @click="go('/live-list')"
|
|
|
+ :style="$route.path === '/live-list' ? 'color:red;' : ''"
|
|
|
+ >直播</a
|
|
|
+ >
|
|
|
+ <a
|
|
|
+ v-if="item.name == '题库'"
|
|
|
+ @click="go('/bank-list')"
|
|
|
+ :style="$route.path === '/bank-list' ? 'color:red;' : ''"
|
|
|
+ >题库</a
|
|
|
+ >
|
|
|
</li>
|
|
|
</ul>
|
|
|
</nav>
|
|
|
|
|
|
+ <div class="search">
|
|
|
+ <div class="search__select">
|
|
|
+ <select v-model="type">
|
|
|
+ <option value="1">课程</option>
|
|
|
+ <option value="2">题库</option>
|
|
|
+ <option value="6">直播</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="search__input">
|
|
|
+ <input type="text" v-model="searchKey" autocomplete="off" />
|
|
|
+ <input
|
|
|
+ type="password"
|
|
|
+ autocomplete="new-password"
|
|
|
+ style="display: none"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <el-button type="primary" @click="search" class="search__btn"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
<div class="userinfo" v-if="userInfo">
|
|
|
<!-- <a class="msg" @click="go('/person-center/my-message')">
|
|
|
<i class="pi" v-if="msgCount > 0"></i>
|
|
@@ -30,7 +70,7 @@
|
|
|
{{ msgData.text }} <el-button style="float:right;" type="text">立即学习</el-button>
|
|
|
</div>
|
|
|
</a> -->
|
|
|
-
|
|
|
+
|
|
|
<!-- <el-tooltip placement="bottom-end" v-model="msgShow" :hide-after="0" manual popper-class="tooltipStyle">
|
|
|
<el-badge :is-dot="msgCount > 0 ? true : false" class="item" style="vertical-align: baseline">
|
|
|
<el-button style="font-size: 20px; padding: 0px" icon="el-icon-message-solid" type="text"
|
|
@@ -42,20 +82,35 @@
|
|
|
<i style="font-size: 18px; cursor: pointer" class="el-icon-close" @click="clearMsg"></i>
|
|
|
</div>
|
|
|
</el-tooltip> -->
|
|
|
- <el-badge :is-dot="msgCount > 0 ? true : false" class="item" style="vertical-align: baseline">
|
|
|
- <el-button style="font-size: 20px; padding: 0px" icon="el-icon-message-solid" type="text"
|
|
|
- @click="go('/person-center/my-message')"></el-button>
|
|
|
+ <el-badge
|
|
|
+ :is-dot="msgCount > 0 ? true : false"
|
|
|
+ class="item"
|
|
|
+ style="vertical-align: baseline"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ style="font-size: 20px; padding: 0px"
|
|
|
+ icon="el-icon-message-solid"
|
|
|
+ type="text"
|
|
|
+ @click="go('/person-center/my-message')"
|
|
|
+ ></el-button>
|
|
|
</el-badge>
|
|
|
<el-dropdown @command="handleCommand">
|
|
|
- <span class="el-dropdown-link" @click="go('/person-center/my-course')"
|
|
|
- style="margin-left: 10px; cursor: pointer">
|
|
|
- <img style="width: 24px; vertical-align: middle" :src="
|
|
|
- userInfo
|
|
|
- ? userInfo.avatar
|
|
|
- ? $tools.splitImgHost(userInfo.avatar, true)
|
|
|
- : '@/assets/qrcode.png'
|
|
|
- : ''
|
|
|
- " alt="" />
|
|
|
+ <span
|
|
|
+ class="el-dropdown-link"
|
|
|
+ @click="go('/person-center/my-course')"
|
|
|
+ style="margin-left: 10px; cursor: pointer"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ style="width: 24px; vertical-align: middle"
|
|
|
+ :src="
|
|
|
+ userInfo
|
|
|
+ ? userInfo.avatar
|
|
|
+ ? $tools.splitImgHost(userInfo.avatar, true)
|
|
|
+ : '@/assets/qrcode.png'
|
|
|
+ : ''
|
|
|
+ "
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
<span>{{ userInfo && userInfo.realname }}</span>
|
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
@@ -72,24 +127,12 @@
|
|
|
<a @click="go('/login', { state: 2 })">注册</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="search">
|
|
|
- <div class="search__select">
|
|
|
- <select v-model="type">
|
|
|
- <option value="1">课程</option>
|
|
|
- <option value="2">题库</option>
|
|
|
- <option value="6">直播</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="search__input">
|
|
|
- <input type="text" v-model="searchKey" autocomplete="off" />
|
|
|
- <input type="password" autocomplete="new-password" style="display: none" />
|
|
|
- </div>
|
|
|
- <el-button type="primary" @click="search" class="search__btn">搜索</el-button>
|
|
|
- </div>
|
|
|
</div>
|
|
|
|
|
|
- <RebuildModal ref="rebuildModal" @rebuildSubmit="rebuildSubmit($event)"></RebuildModal>
|
|
|
+ <RebuildModal
|
|
|
+ ref="rebuildModal"
|
|
|
+ @rebuildSubmit="rebuildSubmit($event)"
|
|
|
+ ></RebuildModal>
|
|
|
</header>
|
|
|
</template>
|
|
|
|
|
@@ -99,7 +142,7 @@ import { mapGetters, mapMutations } from "vuex";
|
|
|
export default {
|
|
|
name: "Header",
|
|
|
components: {
|
|
|
- RebuildModal,
|
|
|
+ RebuildModal
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -109,22 +152,22 @@ export default {
|
|
|
timer: null,
|
|
|
msgData: {},
|
|
|
sysTime: 0,
|
|
|
- msgShow: false,
|
|
|
+ msgShow: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["header", "userInfo", "msgCount"]),
|
|
|
- showNav: function () {
|
|
|
- return function (list) {
|
|
|
+ showNav: function() {
|
|
|
+ return function(list) {
|
|
|
var newList = [];
|
|
|
if (list) {
|
|
|
- newList = list.filter((item) => {
|
|
|
+ newList = list.filter(item => {
|
|
|
return item.status === 1;
|
|
|
});
|
|
|
}
|
|
|
return newList;
|
|
|
};
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
if (this.$tools.isLogin()) {
|
|
@@ -157,13 +200,13 @@ export default {
|
|
|
query: {
|
|
|
gradeId: item.gradeId,
|
|
|
orderGoodsId: item.orderGoodsId,
|
|
|
- rebuild: 1,
|
|
|
- },
|
|
|
+ rebuild: 1
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
getGoodsData() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$request.goodsDetail(this.msgData.goodsId).then((res) => {
|
|
|
+ this.$request.goodsDetail(this.msgData.goodsId).then(res => {
|
|
|
resolve(res.data);
|
|
|
});
|
|
|
});
|
|
@@ -175,7 +218,7 @@ export default {
|
|
|
let ary = {
|
|
|
userId: this.msgData.userId,
|
|
|
msgId: this.msgData.id,
|
|
|
- updateTime: new Date(new Date().toLocaleDateString()).getTime(),
|
|
|
+ updateTime: new Date(new Date().toLocaleDateString()).getTime()
|
|
|
};
|
|
|
localStorage.setItem("msg", JSON.stringify(ary));
|
|
|
this.msgShow = false;
|
|
@@ -188,15 +231,15 @@ export default {
|
|
|
if (item.goodsType == 1) {
|
|
|
this.sysTime = this.$tools.timest();
|
|
|
item.orderGoodsId = this.msgData.orderGoodsId;
|
|
|
- this.canJump(item).then((res) => {
|
|
|
+ this.canJump(item).then(res => {
|
|
|
this.clearMsg();
|
|
|
this.$router.push({
|
|
|
path: `/my-course-detail/${item.goodsId}`,
|
|
|
query: {
|
|
|
gradeId: item.gradeId,
|
|
|
orderGoodsId: item.orderGoodsId,
|
|
|
- courseId: res.rows[0].courseId || "",
|
|
|
- },
|
|
|
+ courseId: res.rows[0].courseId || ""
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
|
|
@@ -208,18 +251,18 @@ export default {
|
|
|
this.$router.push({
|
|
|
path: "/person-center/my-bank/bank-detail/" + item.goodsId,
|
|
|
query: {
|
|
|
- orderGoodsId: item.orderGoodsId,
|
|
|
- },
|
|
|
+ orderGoodsId: item.orderGoodsId
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
canJump(item) {
|
|
|
- return new Promise((resolve) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
this.$request
|
|
|
.orderInfo({
|
|
|
- orderGoodsId: item.orderGoodsId,
|
|
|
+ orderGoodsId: item.orderGoodsId
|
|
|
})
|
|
|
- .then(async (res) => {
|
|
|
+ .then(async res => {
|
|
|
let items = res.data;
|
|
|
let currentTime = this.$tools.timest();
|
|
|
if (items.interfaceAccountId > 0) {
|
|
@@ -233,7 +276,7 @@ export default {
|
|
|
"1.点击【跳转学习网址】按钮",
|
|
|
"2.打开学习网址后,选择【个人用户】进行登录",
|
|
|
"(1)账号:您个人的身份证号码",
|
|
|
- "(2)密码:身份证号码,再加111111",
|
|
|
+ "(2)密码:身份证号码,再加111111"
|
|
|
];
|
|
|
const newDatas = [];
|
|
|
const h = this.$createElement;
|
|
@@ -246,19 +289,19 @@ export default {
|
|
|
closeOnClickModal: false,
|
|
|
closeOnPressEscape: false,
|
|
|
distinguishCancelAndClose: false,
|
|
|
- showClose: false,
|
|
|
+ showClose: false
|
|
|
})
|
|
|
- .then((_) => {
|
|
|
+ .then(_ => {
|
|
|
window.open("http://admin.zhujianpeixun.com/", "_blank");
|
|
|
})
|
|
|
- .catch((_) => { });
|
|
|
+ .catch(_ => {});
|
|
|
|
|
|
return;
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
message:
|
|
|
- "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!",
|
|
|
+ "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -279,7 +322,7 @@ export default {
|
|
|
) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "不在学习服务期,不能进入学习",
|
|
|
+ message: "不在学习服务期,不能进入学习"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -291,7 +334,7 @@ export default {
|
|
|
) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "不在班级有效期,不能进入学习",
|
|
|
+ message: "不在班级有效期,不能进入学习"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -299,7 +342,7 @@ export default {
|
|
|
if (items.learningStatus == 2) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "开放学习时间待定,不能进入学习",
|
|
|
+ message: "开放学习时间待定,不能进入学习"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -307,7 +350,7 @@ export default {
|
|
|
if (items.classStatus == 0) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "尚未开班,不能进入学习",
|
|
|
+ message: "尚未开班,不能进入学习"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -317,7 +360,7 @@ export default {
|
|
|
) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "不在开放学习时间,不能进入学习",
|
|
|
+ message: "不在开放学习时间,不能进入学习"
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -335,31 +378,31 @@ export default {
|
|
|
// if (item.educationName == "继续教育") {
|
|
|
this.$request
|
|
|
.lockLockStatus({
|
|
|
- action: "jxjy",
|
|
|
+ action: "jxjy"
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
//有其他端在操作,不能学习
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: res.msg,
|
|
|
+ message: res.msg
|
|
|
});
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
+ .catch(err => {
|
|
|
//可以学习
|
|
|
this.$request
|
|
|
.courseCourseList({
|
|
|
pageNum: 1,
|
|
|
pageSize: 1,
|
|
|
goodsId: items.goodsId,
|
|
|
- gradeId: items.gradeId,
|
|
|
+ gradeId: items.gradeId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.rows.length) {
|
|
|
resolve(res);
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "课程内暂无可以学习的科目",
|
|
|
+ message: "课程内暂无可以学习的科目"
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -393,13 +436,13 @@ export default {
|
|
|
* 查询商品重修状态
|
|
|
*/
|
|
|
courseGoodsRebuildStatus(goodsId, gradeId) {
|
|
|
- return new Promise((resolve) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
this.$request
|
|
|
.courseGoodsRebuildStatus({
|
|
|
goodsId: goodsId,
|
|
|
- gradeId: gradeId,
|
|
|
+ gradeId: gradeId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
resolve(res.data);
|
|
|
});
|
|
|
});
|
|
@@ -426,13 +469,13 @@ export default {
|
|
|
go(path, query) {
|
|
|
if (path === this.$route.path) {
|
|
|
this.$router.push({
|
|
|
- path: "refresh", //refresh路由地址和当前要刷新路由地址同级即可
|
|
|
+ path: "refresh" //refresh路由地址和当前要刷新路由地址同级即可
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
this.$router.push({
|
|
|
path,
|
|
|
- query,
|
|
|
+ query
|
|
|
});
|
|
|
},
|
|
|
|
|
@@ -441,7 +484,7 @@ export default {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
duration: 2000,
|
|
|
- message: "请输入搜索内容",
|
|
|
+ message: "请输入搜索内容"
|
|
|
});
|
|
|
|
|
|
return;
|
|
@@ -457,15 +500,15 @@ export default {
|
|
|
this.$router.push({
|
|
|
path: "/live-list",
|
|
|
query: {
|
|
|
- searchKey: this.searchKey,
|
|
|
- },
|
|
|
+ searchKey: this.searchKey
|
|
|
+ }
|
|
|
});
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
path: "/course-list",
|
|
|
query: {
|
|
|
- searchKey: this.searchKey,
|
|
|
- },
|
|
|
+ searchKey: this.searchKey
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
} else if (path == "/course-list") {
|
|
@@ -476,15 +519,15 @@ export default {
|
|
|
this.$router.push({
|
|
|
path: "/live-list",
|
|
|
query: {
|
|
|
- searchKey: this.searchKey,
|
|
|
- },
|
|
|
+ searchKey: this.searchKey
|
|
|
+ }
|
|
|
});
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
path: "/bank-list",
|
|
|
query: {
|
|
|
- searchKey: this.searchKey,
|
|
|
- },
|
|
|
+ searchKey: this.searchKey
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
} else if (path == "/live-list") {
|
|
@@ -495,15 +538,15 @@ export default {
|
|
|
this.$router.push({
|
|
|
path: "/course-list",
|
|
|
query: {
|
|
|
- searchKey: this.searchKey,
|
|
|
- },
|
|
|
+ searchKey: this.searchKey
|
|
|
+ }
|
|
|
});
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
path: "/bank-list",
|
|
|
query: {
|
|
|
- searchKey: this.searchKey,
|
|
|
- },
|
|
|
+ searchKey: this.searchKey
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
@@ -513,22 +556,22 @@ export default {
|
|
|
this.$router.push({
|
|
|
path: "/course-list",
|
|
|
query: {
|
|
|
- searchKey: this.searchKey,
|
|
|
- },
|
|
|
+ searchKey: this.searchKey
|
|
|
+ }
|
|
|
});
|
|
|
} else if (type == "6") {
|
|
|
this.$router.push({
|
|
|
path: "/live-list",
|
|
|
query: {
|
|
|
- searchKey: this.searchKey,
|
|
|
- },
|
|
|
+ searchKey: this.searchKey
|
|
|
+ }
|
|
|
});
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
path: "/bank-list",
|
|
|
query: {
|
|
|
- searchKey: this.searchKey,
|
|
|
- },
|
|
|
+ searchKey: this.searchKey
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -544,8 +587,8 @@ export default {
|
|
|
this.timer = setTimeout(() => {
|
|
|
this.showBox = false;
|
|
|
}, 500);
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -555,16 +598,22 @@ export default {
|
|
|
position: relative;
|
|
|
background: #fff;
|
|
|
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04);
|
|
|
+ .dis_play {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
|
|
|
.container {
|
|
|
height: 80px;
|
|
|
|
|
|
.logo {
|
|
|
- margin-top: 23px;
|
|
|
- float: left;
|
|
|
+ // margin-top: 23px;
|
|
|
+ // float: left;
|
|
|
cursor: pointer;
|
|
|
- width: 162px;
|
|
|
- height: 33px;
|
|
|
+ text-align: center;
|
|
|
+ max-width: 300px;
|
|
|
+ max-height: 61px;
|
|
|
background: url("~@/assets/logo.png") no-repeat center;
|
|
|
|
|
|
&--no {
|
|
@@ -573,11 +622,11 @@ export default {
|
|
|
}
|
|
|
|
|
|
.nav {
|
|
|
- float: left;
|
|
|
- margin-top: 30px;
|
|
|
+ // float: left;
|
|
|
+ // margin-top: 30px;
|
|
|
|
|
|
.list {
|
|
|
- margin-left: 146px;
|
|
|
+ // margin-left: 146px;
|
|
|
display: flex;
|
|
|
|
|
|
li {
|
|
@@ -595,9 +644,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
.search {
|
|
|
- float: right;
|
|
|
- margin-right: 12px;
|
|
|
- margin-top: 20px;
|
|
|
+ // float: right;
|
|
|
+ // margin-right: 12px;
|
|
|
+ // margin-top: 20px;
|
|
|
width: 324px;
|
|
|
background: #fafbfc;
|
|
|
border: 1px solid #3f8dfd;
|
|
@@ -639,8 +688,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
.userinfo {
|
|
|
- margin-top: 30px;
|
|
|
- float: right;
|
|
|
+ // margin-top: 30px;
|
|
|
+ // float: right;
|
|
|
white-space: nowrap;
|
|
|
|
|
|
a {
|