Skip to content

Commit

Permalink
add h h h hhhhh
Browse files Browse the repository at this point in the history
  • Loading branch information
liweiwei committed Jul 4, 2020
1 parent 0fd16a7 commit 68e7afd
Show file tree
Hide file tree
Showing 11 changed files with 1,440 additions and 276 deletions.
2 changes: 1 addition & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {

// Paths
assetsSubDirectory: 'static',
assetsPublicPath: 'http://127.0.0.1:8080/',
assetsPublicPath: 'http://localhost:8080/',
proxyTable: {},

// Various Dev Server settings
Expand Down
1,276 changes: 1,004 additions & 272 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
"webpack-prod": "node node_modules/.bin/webpack --config build/webpack.prod.conf.js"
},
"dependencies": {
"axios": "^0.18.0",
"axios": "^0.18.1",
"element-ui": "^2.4.8",
"video.js": "^7.6.6",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
Expand Down Expand Up @@ -76,7 +77,7 @@
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-dev-server": "^2.11.5",
"webpack-merge": "^4.1.0"
},
"engines": {
Expand Down
3 changes: 3 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import store from './store'
import Video from 'video.js'
import 'video.js/dist/video-js.css'

Vue.use(ElementUI)

Vue.config.productionTip = false
Vue.prototype.$video = Video

/* eslint-disable no-new */
new Vue({
Expand Down
36 changes: 36 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,42 @@ export default new Router({
component: () =>
import('@/views/catalog')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'video',
component: () =>
import('@/views/video')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'video_detail',
component: () =>
import('@/views/video_detail')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'blue_video',
component: () =>
import('@/views/blue_video')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'blue_video_detail',
component: () =>
import('@/views/blue_video_detail')
}]
}
]
})
5 changes: 5 additions & 0 deletions src/store/modules/menuList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ export const menuRouterList = [{
name: '小说查询',
hasChild: false,
selected: true
},{
path: '/video',
name: '我的视频',
hasChild: false,
selected: false
}
// },{
// path: '/myNote',
Expand Down
95 changes: 95 additions & 0 deletions src/views/blue_video.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<template>
<div id="blue_video_tag">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="分类:">
<el-input v-model="formInline.tag" placeholder=""></el-input>
</el-form-item>
<el-form-item label='分页:'>
<el-input-number v-model="formInline.num" :min="1" :max="10" label="分页"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>

<el-table :data="tableData" style="width: 100%" @row-click="handdle">
<el-table-column prop="date" style="width: 100%">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-row :gutter="20">
<el-col :span="10">
<div class="grid-content bg-purple">
<img :src="props.row.imgBase64" style="width: 200px"/>
</div>
</el-col>
<el-col :span="14">
<el-form-item label="片名">
<span>{{ props.row.title }}</span>
</el-form-item>
<el-form-item label="时间">
<span>{{ props.row.date }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</el-table-column>
</el-table>
</div>
</template>


<script>
import { request, URL } from "../common/request";
export default {
data() {
return {
formInline: {
num: 1,
tag: ""
},
tableData: []
};
},
methods: {
onSubmit() {
if (this.formInline.videoName === "") {
return false;
}
request(URL.site("server_url", "/api/video/blue/list"), {
method: "GET",
params: {
tag: this.formInline.tag,
page: this.formInline.num
}
}).then(res => {
// console.log(res.response);
this.tableData = res.response.data;
});
},
handdle(row, event, column) {
this.$router.push("/blue_video_detail?videoId=" + row.id+"&videoName="+row.title+"&original="+row.original);
},
handleChange(value) {
// console.log(value);
}
}
};
</script>

<style>
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 80px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 100%;
}
</style>

99 changes: 99 additions & 0 deletions src/views/blue_video_detail.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<template>
<div id="catalog">
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<img :src="data.imgBase64" style="width: 220px" />
</div>
</el-col>
<el-col :span="14">
<el-form label-position="left" label-width="80px" class="demo-table-expand">
<el-form-item label="片名">
<span>{{ title }}</span>
</el-form-item>
</el-form>
</el-col>
</el-row>
<div style="height: 100px"></div>
<el-row>
<el-button type="primary" @click.native="lu1">线路1</el-button>
<el-button type="success" @click.native="lu2">线路2</el-button>
<el-button type="warning" @click.native="lu3">线路3</el-button>
</el-row>
</div>
</template>

<script>
import { request, URL } from "../common/request";
export default {
// :href='"#/chapter?resourceId=" + video.resourceID + "&chapterId=" + video.lastSerialid '
data() {
return {
resourceId: 0,
imgBase64: "",
original: "",
title: "",
page: 1,
pageSize: 10,
data: {}
};
},
created: function() {
this.resourceId = parseInt(this.$route.query.videoId);
this.title = this.$route.query.videoName;
this.original = this.$route.query.original;
if (this.resourceId == undefined || this.resourceId == NaN) {
return;
}
request(URL.site("server_url", "/api/video/blue/detail"), {
method: "GET",
params: {
id: this.resourceId,
original: this.original
}
}).then(res => {
this.data = res.response.data;
});
},
methods: {
lu1: function() {
window.open(this.data.host + this.data.path, "_blank");
console.log(this.data.host + this.data.path);
},
lu2: function() {
window.open(this.data.host2 + this.data.path, "_blank");
console.log(this.data.host2 + this.data.path);
},
lu3: function() {
window.open(this.data.host3 + this.data.path, "_blank");
console.log(this.data.host3 + this.data.path);
}
},
name: "blue_video_detail"
};
</script>

<style>
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 80px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 100%;
}
.jianjie {
font-size: 10px;
line-height: 5px;
height: 20px;
padding: 0px;
line-height: 1.5;
}
</style>
96 changes: 96 additions & 0 deletions src/views/video.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<template>
<div id="video_search">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label>
<el-input v-model="formInline.videoName" placeholder="搜索"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>

<el-table :data="tableData" style="width: 100%" @row-click="handdle">
<el-table-column prop="date" style="width: 100%">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-row :gutter="20">
<el-col :span="10">
<div class="grid-content bg-purple">
<img :src="props.row.pic" style="width: 100px; height: 100px" />
</div>
</el-col>
<el-col :span="14">
<el-form-item label="片名">
<span>{{ props.row.name }}</span>
</el-form-item>
<el-form-item label="类型">
<span>{{ props.row.type }}</span>
</el-form-item>
<el-form-item label="看过">
<span>{{ props.row.hits }}</span>
</el-form-item>
<el-form-item label="评分">
<span>{{ props.row.pf }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</el-table-column>
</el-table>
</div>
</template>


<script>
import { request, URL } from "../common/request";
export default {
data() {
return {
formInline: {
videoName: ""
},
tableData: [
]
};
},
methods: {
onSubmit() {
if (this.formInline.videoName === "") {
return false;
}
request(URL.site("server_url", "/api/video/search"), {
method: "GET",
params: {
key: this.formInline.videoName
}
}).then(res => {
console.log(res.response);
this.tableData = res.response.data;
console.log(this.tableData);
});
},
handdle(row, event, column) {
this.$router.push("/video_detail?videoId=" + row.id);
}
}
};
</script>

<style>
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 80px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 100%;
}
</style>

Loading

0 comments on commit 68e7afd

Please sign in to comment.