|
@@ -35,7 +35,7 @@
|
|
视频列表
|
|
视频列表
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="list">
|
|
<el-col :span="24" class="list">
|
|
- <el-col :span="24" class="videolist" v-for="(item, index) in videolist" :key="index">
|
|
|
|
|
|
+ <el-col :span="24" class="videolist" v-for="(item, index) in videolist" :key="index" @click.native="show(item)">
|
|
<p>{{ item.title }}</p>
|
|
<p>{{ item.title }}</p>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -72,6 +72,7 @@
|
|
import liveFoot from '@/layout/live/foot.vue';
|
|
import liveFoot from '@/layout/live/foot.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions: channel } = createNamespacedHelpers('channel');
|
|
const { mapActions: channel } = createNamespacedHelpers('channel');
|
|
|
|
+const { mapActions: channelvideo } = createNamespacedHelpers('channelvideo');
|
|
var moment = require('moment');
|
|
var moment = require('moment');
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
@@ -82,29 +83,16 @@ export default {
|
|
// 信息详情
|
|
// 信息详情
|
|
info: {},
|
|
info: {},
|
|
videoUrl: '',
|
|
videoUrl: '',
|
|
- videolist: [
|
|
|
|
- { title: '节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- { title: '节目单' },
|
|
|
|
- ],
|
|
|
|
|
|
+ videolist: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
await this.search();
|
|
await this.search();
|
|
|
|
+ // await this.searchVedio();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...channel(['query', 'fetch', 'update', 'create', 'delete']),
|
|
...channel(['query', 'fetch', 'update', 'create', 'delete']),
|
|
|
|
+ ...channelvideo({ videoquery: 'query', videofetch: 'fetch', videoupdate: 'update', videocreate: 'create', videodelete: 'delete' }),
|
|
async search() {
|
|
async search() {
|
|
let id = this.$route.query.id;
|
|
let id = this.$route.query.id;
|
|
if (id) {
|
|
if (id) {
|
|
@@ -113,10 +101,27 @@ export default {
|
|
this.$set(this, `info`, res.data);
|
|
this.$set(this, `info`, res.data);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ const res = await this.videoquery({ user_id: this.id });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `videolist`, res.data);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ show(data) {
|
|
|
|
+ console.log(data);
|
|
|
|
+ this.videoUrl = data.file_path;
|
|
},
|
|
},
|
|
|
|
+ // async searchVedio() {
|
|
|
|
+ // const res = await this.videoquery({ user_id: this.id });
|
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
|
+ // this.$set(this, `videolist`, res.data);
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
|
|
+ id() {
|
|
|
|
+ return this.$route.query.id;
|
|
|
|
+ },
|
|
},
|
|
},
|
|
metaInfo() {
|
|
metaInfo() {
|
|
return { title: this.$route.meta.title };
|
|
return { title: this.$route.meta.title };
|