|
@@ -10,7 +10,7 @@
|
|
|
<el-col class="infoLeftList" :span="24" v-for="(item, index) in zhuantiList" :key="index">
|
|
|
<p>{{ item.publish_time }}</p>
|
|
|
<p>
|
|
|
- <span class="textOver">{{ item.title }}</span>
|
|
|
+ <span @click="clickzhuanti(item.id)" class="textOver">{{ item.title }}</span>
|
|
|
<span>{{ item.content }}</span>
|
|
|
</p>
|
|
|
</el-col>
|
|
@@ -22,7 +22,7 @@
|
|
|
<el-col :span="23" class="infoRight">
|
|
|
<el-col class="infoRightList" :span="24" v-for="(item, index) in jishuList" :key="index">
|
|
|
<p>
|
|
|
- <span class="textOver">{{ item.title }}</span
|
|
|
+ <span class="textOver" @click="clickjishu(item.id)">{{ item.title }}</span
|
|
|
><span class="textOver">{{ item.publish_time }}</span>
|
|
|
</p>
|
|
|
</el-col>
|
|
@@ -43,7 +43,7 @@
|
|
|
<el-col :span="23" class="infoRight">
|
|
|
<el-col class="infoRightList" :span="24" v-for="(item, index) in hangyeList" :key="index">
|
|
|
<p>
|
|
|
- <span class="textOver">{{ item.title }}</span
|
|
|
+ <span class="textOver" @click="clickhangye(item.id)">{{ item.title }}</span
|
|
|
><span class="textOver">{{ item.publish_time }}</span>
|
|
|
</p>
|
|
|
</el-col>
|
|
@@ -56,7 +56,7 @@
|
|
|
<el-col class="infoLeftList" :span="24" v-for="(item, index) in jiaoyuList" :key="index">
|
|
|
<p>{{ item.publish_time }}</p>
|
|
|
<p>
|
|
|
- <span class="textOver">{{ item.title }}</span>
|
|
|
+ <span class="textOver" @click="clickjiaoyu(item.id)">{{ item.title }}</span>
|
|
|
<span>{{ item.content }}</span>
|
|
|
</p>
|
|
|
</el-col>
|
|
@@ -85,12 +85,42 @@ export default {
|
|
|
hangyeList: [],
|
|
|
jiaoyuList: [],
|
|
|
}),
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
+ ...news(['query']),
|
|
|
+ async searchInfo() {
|
|
|
+ let res = await this.query({ skip: 0, limit: 5, column_name: '专题研讨' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `zhuantiList`, res.data);
|
|
|
+ res = await this.query({ skip: 0, limit: 10, column_name: '技术问答' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `jishuList`, res.data);
|
|
|
+ res = await this.query({ skip: 0, limit: 10, column_name: '行业研究' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `hangyeList`, res.data);
|
|
|
+ res = await this.query({ skip: 0, limit: 5, column_name: '教育培训' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `jiaoyuList`, res.data);
|
|
|
+ },
|
|
|
turnToList(column_name) {
|
|
|
this.$router.push({ path: '/technical/list', query: { column_name: column_name } });
|
|
|
},
|
|
|
+ clickzhuanti(id) {
|
|
|
+ this.$router.push({ path: '/live/detail', query: { id: id } });
|
|
|
+ console.log(id);
|
|
|
+ },
|
|
|
+ clickjishu(id) {
|
|
|
+ this.$router.push({ path: '/live/detail', query: { id: id } });
|
|
|
+ console.log(id);
|
|
|
+ },
|
|
|
+ clickhangye(id) {
|
|
|
+ this.$router.push({ path: '/live/detail', query: { id: id } });
|
|
|
+ console.log(id);
|
|
|
+ },
|
|
|
+
|
|
|
+ clickjiaoyu(id) {
|
|
|
+ this.$router.push({ path: '/live/detail', query: { id: id } });
|
|
|
+ console.log(id);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -138,17 +168,17 @@ export default {
|
|
|
width: 95%;
|
|
|
border-bottom: 1px dashed #ccc;
|
|
|
padding: 8px 0 8px 0;
|
|
|
- height: 82px;
|
|
|
+ height: 80px;
|
|
|
margin: 0 0 0 5px;
|
|
|
}
|
|
|
|
|
|
-.infoLeftList:last-child {
|
|
|
+.infoLeftList:nth-child(6) {
|
|
|
float: left;
|
|
|
width: 95%;
|
|
|
border-bottom: none;
|
|
|
- padding: 15px 0 15px 0;
|
|
|
- height: 80px;
|
|
|
- margin: 0 0 0 5px;
|
|
|
+ padding: 8px 0 8px 0;
|
|
|
+ height: 81px;
|
|
|
+ margin: 0 0 15px 5px;
|
|
|
}
|
|
|
.infoLeftList:hover p:last-child span:first-child {
|
|
|
-webkit-transform: translateY(-3px);
|