|
@@ -21,6 +21,7 @@ import list from './parts/list.vue';
|
|
|
import top from '@/layout/common/top.vue';
|
|
|
import page from '@/layout/common/page.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: mapTopic } = createNamespacedHelpers('topic');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -33,36 +34,6 @@ export default {
|
|
|
return {
|
|
|
clientHeight: '',
|
|
|
communityList: [
|
|
|
- {
|
|
|
- content:
|
|
|
- '文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容',
|
|
|
- origin: '文章来源',
|
|
|
- renew_time: '2021-02-01 10:00:00',
|
|
|
- type: '0',
|
|
|
- imgUrl: [
|
|
|
- { name: '图片名称', url: require('@a/news1.jpg') },
|
|
|
- // { name: '图片名称1', url: require('@a/news1.jpg') },
|
|
|
- // { name: '图片名称2', url: require('@a/news1.jpg') },
|
|
|
- ],
|
|
|
- fileUrl: require('@a/video1.mp4'),
|
|
|
- website: 'http://broadcast.waityou24.cn/platlive/home.html',
|
|
|
- read: 10,
|
|
|
- },
|
|
|
- {
|
|
|
- content:
|
|
|
- '文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容',
|
|
|
- origin: '文章来源',
|
|
|
- renew_time: '2021-02-01 10:00:00',
|
|
|
- type: '0',
|
|
|
- imgUrl: [
|
|
|
- { name: '图片名称', url: require('@a/news1.jpg') },
|
|
|
- { name: '图片名称1', url: require('@a/news1.jpg') },
|
|
|
- { name: '图片名称2', url: require('@a/news1.jpg') },
|
|
|
- ],
|
|
|
- fileUrl: require('@a/video1.mp4'),
|
|
|
- website: 'http://broadcast.waityou24.cn/platlive/home.html',
|
|
|
- read: 10,
|
|
|
- },
|
|
|
{
|
|
|
content:
|
|
|
'文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容',
|
|
@@ -72,7 +43,6 @@ export default {
|
|
|
imgUrl: [
|
|
|
{ name: '图片名称', url: require('@a/news1.jpg') },
|
|
|
{ name: '图片名称1', url: require('@a/news1.jpg') },
|
|
|
- { name: '图片名称2', url: require('@a/news1.jpg') },
|
|
|
],
|
|
|
fileUrl: require('@a/video1.mp4'),
|
|
|
website: 'http://broadcast.waityou24.cn/platlive/home.html',
|
|
@@ -90,8 +60,14 @@ export default {
|
|
|
this.$set(this, `clientHeight`, clientHeight);
|
|
|
},
|
|
|
methods: {
|
|
|
- search({ skip = 0, limit = 10, searchName, ...info } = {}) {
|
|
|
- console.log(searchName);
|
|
|
+ ...mapTopic(['query']),
|
|
|
+ async search({ skip = 0, limit = 5, searchName, ...info } = {}) {
|
|
|
+ if (searchName) info.content = searchName;
|
|
|
+ let res = await this.query({ skip, limit, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `communityList`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
},
|
|
|
// 话题正文
|
|
|
detailBtn(data) {
|