|
@@ -12,8 +12,19 @@
|
|
|
<a @click="go('/person-center/my-message')">
|
|
|
<i class="el-icon-message-solid icon"></i>
|
|
|
</a>
|
|
|
- <a @click="go('/person-center')">
|
|
|
+ <a
|
|
|
+ @click="go('/person-center')"
|
|
|
+ @mouseenter="mouseover"
|
|
|
+ @mouseleave="mouseLeave"
|
|
|
+ >
|
|
|
<i class="el-icon-user-solid icon"></i>
|
|
|
+ <transition name="fade">
|
|
|
+ <ul class="modal-box" v-show="showBox">
|
|
|
+ <li @click.stop="go('/person-center/my-course')">我的课程</li>
|
|
|
+ <li @click.stop="go('/person-center/my-bank')">我的题库</li>
|
|
|
+ <li @click.stop="$tools.exit">退出登录</li>
|
|
|
+ </ul>
|
|
|
+ </transition>
|
|
|
</a>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -30,15 +41,17 @@
|
|
|
</a>
|
|
|
<div class="search">
|
|
|
<div class="search__select">
|
|
|
- <select>
|
|
|
- <option value="1" selected>课程</option>
|
|
|
+ <select v-model="type">
|
|
|
+ <option value="1">课程</option>
|
|
|
<option value="2">题库</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="search__input">
|
|
|
- <input type="text" />
|
|
|
+ <input v-model="searchKey" type="text" />
|
|
|
</div>
|
|
|
- <div class="search__btn">搜索</div>
|
|
|
+ <el-button type="primary" @click="search" class="search__btn"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="contact" v-if="header.serviceTel.status == 1">
|
|
|
<div class="contact__phone">{{ header.serviceTel.tel }}</div>
|
|
@@ -61,8 +74,7 @@
|
|
|
v-if="item.name === '走进祥粤'"
|
|
|
:key="index"
|
|
|
class="tab"
|
|
|
- target="view_window"
|
|
|
- href="https://www.xyyxt.net/abount"
|
|
|
+ @click="go('/about')"
|
|
|
>走进祥粤</a
|
|
|
>
|
|
|
<a
|
|
@@ -122,7 +134,7 @@
|
|
|
class="item"
|
|
|
v-for="(aItem, aIndex) in item.list"
|
|
|
:key="'aItem' + aIndex"
|
|
|
- >{{ aItem.projectName }}</a
|
|
|
+ >{{ aItem.projectName }}-{{ aItem.businessName }}</a
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -294,7 +306,7 @@
|
|
|
:class="active1 === index ? 'active' : ''"
|
|
|
@click="active1 = index"
|
|
|
>
|
|
|
- {{ item.projectName + " - " + item.businessName }}
|
|
|
+ {{ item.name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -354,7 +366,7 @@
|
|
|
:class="active2 === index ? 'active' : ''"
|
|
|
@click="active2 = index"
|
|
|
>
|
|
|
- {{ item.projectName + " - " + item.businessName }}
|
|
|
+ {{ item.name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -476,6 +488,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ showBox: false,
|
|
|
indexToken: "",
|
|
|
indexUserAccount: "",
|
|
|
colors: [],
|
|
@@ -538,6 +551,8 @@ export default {
|
|
|
slideList: [],
|
|
|
active1: 0, //推荐课程index
|
|
|
active2: 0, //推荐题库index
|
|
|
+ searchKey: "",
|
|
|
+ type: "1",
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -550,6 +565,35 @@ export default {
|
|
|
methods: {
|
|
|
...mapMutations(["setUserInfo"]),
|
|
|
|
|
|
+ search() {
|
|
|
+ if (!this.searchKey.trim()) {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ duration: 2000,
|
|
|
+ message: "请输入搜索内容",
|
|
|
+ });
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let type = this.type;
|
|
|
+
|
|
|
+ //根据类型跳转题库或者列表页面
|
|
|
+ if (type == "1") {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/course-list",
|
|
|
+ query: {
|
|
|
+ searchKey: this.searchKey,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/bank-list",
|
|
|
+ query: {
|
|
|
+ searchKey: this.searchKey,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
advertisingHomeLocation() {
|
|
|
this.$request.advertisingHomeLocation().then((res) => {
|
|
|
this.swiperOptions.autoplay.delay = res.data.intervalTime * 1000;
|
|
@@ -671,6 +715,17 @@ export default {
|
|
|
query,
|
|
|
});
|
|
|
},
|
|
|
+ mouseover() {
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ this.showBox = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ mouseLeave() {
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.showBox = false;
|
|
|
+ }, 500);
|
|
|
+ },
|
|
|
login() {
|
|
|
this.$refs.loginForm.validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -868,10 +923,38 @@ export default {
|
|
|
color: #3f8dfd;
|
|
|
font-size: 14px;
|
|
|
padding: 0 14px;
|
|
|
+ position: relative;
|
|
|
|
|
|
.icon {
|
|
|
font-size: 20px;
|
|
|
}
|
|
|
+ .modal-box {
|
|
|
+ width: 162px;
|
|
|
+ background: #ffffff;
|
|
|
+ box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 8px;
|
|
|
+ position: absolute;
|
|
|
+ top: 34px;
|
|
|
+ left: -40px;
|
|
|
+ li {
|
|
|
+ margin-left: 10px;
|
|
|
+ border-bottom: 1px solid #eeeeee;
|
|
|
+ height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
+ cursor: pointer;
|
|
|
+ padding-left: 5px;
|
|
|
+ color: #666666;
|
|
|
+ text-align: left;
|
|
|
+ &:hover {
|
|
|
+ background: #eeeeee;
|
|
|
+ color: #3f8dfd;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:nth-last-of-type(1) {
|
|
|
+ border: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -924,13 +1007,13 @@ export default {
|
|
|
}
|
|
|
|
|
|
&__btn {
|
|
|
+ padding: 0;
|
|
|
text-align: center;
|
|
|
width: 80px;
|
|
|
height: 40px;
|
|
|
line-height: 40px;
|
|
|
- color: #fff;
|
|
|
font-size: 14px;
|
|
|
- background: #3f8dfd;
|
|
|
+ border-radius: 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1019,7 +1102,7 @@ export default {
|
|
|
transition: all 0.3s;
|
|
|
width: 672px;
|
|
|
padding: 0;
|
|
|
- background: rgba(0, 0, 0, 0.8);
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
@@ -1030,7 +1113,7 @@ export default {
|
|
|
min-height: 80px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- border-bottom: 1px solid rgba(255, 255, 255, 0.6);
|
|
|
+ border-bottom: 1px solid #ddd;
|
|
|
|
|
|
&:nth-last-of-type(1) {
|
|
|
border: 0;
|
|
@@ -1042,6 +1125,7 @@ export default {
|
|
|
height: 28px;
|
|
|
border: 1px solid #ffffff;
|
|
|
border-radius: 14px;
|
|
|
+ background: #3f8dfd;
|
|
|
line-height: 26px;
|
|
|
text-align: center;
|
|
|
border-radius: 15px;
|
|
@@ -1061,7 +1145,7 @@ export default {
|
|
|
font-size: 14px;
|
|
|
font-family: Microsoft YaHei;
|
|
|
font-weight: 400;
|
|
|
- color: #ffffff;
|
|
|
+ color: #666;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1093,6 +1177,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.text {
|
|
|
+ flex: 1;
|
|
|
&__title {
|
|
|
cursor: pointer;
|
|
|
font-size: 16px;
|
|
@@ -1679,4 +1764,18 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.fade-enter,
|
|
|
+.fade-leave-to {
|
|
|
+ opacity: 0;
|
|
|
+ height: 0;
|
|
|
+}
|
|
|
+.fade-enter-to,
|
|
|
+.fade-leave {
|
|
|
+ opacity: 1;
|
|
|
+ height: 122px;
|
|
|
+}
|
|
|
+.fade-enter-active,
|
|
|
+.fade-leave-active {
|
|
|
+ transition: all 0.3s;
|
|
|
+}
|
|
|
</style>
|