Commit 01db2ef2 by hank

作品

parent d78e0e8d
......@@ -7,7 +7,7 @@ export function getTempalteList (page = 1, size = 10 ) {
})
}
export function getTempalteFilmList (templateId, page = 1, size = 10 ) {
// 获取模板下视片列表
// 获取模板下作品列表
return get(`/template/get/film/list/${templateId}`, {
p: page,
c: size
......@@ -57,7 +57,7 @@ export function createTempalte(data) {
}
export function createFilm(data) {
/**
* 添加视片
* 添加作品
* {
"clientId": "string",
"clientSecret": "string",
......@@ -71,24 +71,24 @@ export function createFilm(data) {
return post('/template/add/film', data)
}
export function getFilmDetail(filmId) {
// 获取视片详情
// 获取作品详情
return get(`/template/get/film/info/${filmId}`)
}
export function getFilmList(page = 1, size = 10) {
console.log(page,' page')
// 获取所有视片
// 获取所有作品
return post(`/myfilm/get/list?p=${page}&c=${size}`, {
p: page,
c: size
})
}
export function getFilmDeviceIdList(filmId) {
// 获取视片下使用的所有设备id
// 获取作品下使用的所有设备id
return get(`/template/get/equipmentid/${filmId}`, {
})
}
export function getFilmDeviceList(filmId, page = 1, size = 10 ) {
// 获取视片下使用的所有设备
// 获取作品下使用的所有设备
return get(`/template/get/equipment/list/${filmId}`, {
p: page,
c: size
......@@ -96,14 +96,14 @@ export function getFilmDeviceList(filmId, page = 1, size = 10 ) {
}
export function bindDeviceToFilm(equipmentId, filmId) {
// 根据设备标识以及视片id设置默认视片
// 根据设备标识以及作品id设置默认作品
return post(`/template/update/equipment/binding/filmid`, {
equipmentId,
filmId
})
}
export function setDeviceDefaltFilm(clientId = 'maxrocky',clientSecret = 'maxrocky', filmId) {
// 根据设备标识以及视片id设置默认视片
// 根据设备标识以及作品id设置默认作品
return post(`/myequipment/update/film/def/version`, {
clientId,
clientSecret,
......@@ -111,7 +111,7 @@ export function setDeviceDefaltFilm(clientId = 'maxrocky',clientSecret = 'maxroc
})
}
export function updateFilmInfo(filmId, filmData, filmName, filmDescribe) {
// 更新视片信息
// 更新作品信息
return post('/template/update/film/info', {
filmId,
filmData,
......@@ -120,7 +120,7 @@ export function updateFilmInfo(filmId, filmData, filmName, filmDescribe) {
})
}
export function updateBaseFilmInfo(filmId, filmName, filmDescribe) {
// 更新视片基本信息
// 更新作品基本信息
return post('/template/update/film/base/info', {
filmId,
filmName,
......@@ -128,7 +128,7 @@ export function updateBaseFilmInfo(filmId, filmName, filmDescribe) {
})
}
export function deleteFilm(filmId) {
// 删除视片
// 删除作品
return get(`/template/del/film/info/${filmId}`)
}
......
......@@ -29,7 +29,7 @@
</div>
<div class="view-film">
<div class="right-item-title">
<span>正在播放的视片</span>
<span>正在播放的作品</span>
<span>{{detail.filmName ? detail.filmName : '无'}}</span>
</div>
......
<template>
<div class="film-container">
<div class="device-count">
<div class="count">已创建视片: {{list.length}}</div>
<div class="count">已创建作品: {{list.length}}</div>
</div>
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
......
......@@ -2,7 +2,7 @@
<div class="device-container">
<!-- swipeable -->
<van-tabs v-model="active" sticky ellipsis color="#1989fa" @change="tabChange">
<van-tab title="我的视片">
<van-tab title="我的作品">
<films></films>
</van-tab>
<van-tab title="我的设备">
......
......@@ -18,7 +18,7 @@
<van-tabbar-item :class="{ 'van-tabbar-item--active' : currentPath.includes('/device') }" replace :to="{
path: '/device',
exact: false
}" icon="setting-o">设备与视片</van-tabbar-item>
}" icon="setting-o">设备与作品</van-tabbar-item>
<van-tabbar-item :class="{ 'van-tabbar-item--active' : currentPath.includes('/user') }" replace :to="{
path: '/user',
exact: false
......
......@@ -25,7 +25,7 @@
</div>
<div class="bgeee"></div>
<div class="myfilms">
<div class="title">我的视片 ({{list.length}})</div>
<div class="title">我的作品 ({{list.length}})</div>
<van-list v-model="loading" :finished="finished" finished-text @load="onLoad">
<div class="film-list">
<div class="film-item" @click="goFilm(item)" v-for="(item,index) in list" :key="index">
......@@ -37,17 +37,17 @@
</van-list>
</div>
</div>
<van-button type="info" class="createBtn" size="large" @click="showInput">创建视片</van-button>
<van-dialog :before-close="beforeClose" v-model="show" title="视片信息" show-cancel-button>
<van-button type="info" class="createBtn" size="large" @click="showInput">创建作品</van-button>
<van-dialog :before-close="beforeClose" v-model="show" title="作品信息" show-cancel-button>
<div class="tips">
*视片名称:
*作品名称:
</div>
<input placeholder="请输入视片名称" v-model="templateData.filmName" class="film-name" type="text" />
<input placeholder="请输入作品名称" v-model="templateData.filmName" class="film-name" type="text" />
<br />
<div class="tips">
视片描述:
作品描述:
</div>
<input placeholder="请输入视片描述" v-model="templateData.filmDescribe" class="film-name" type="text" />
<input placeholder="请输入作品描述" v-model="templateData.filmDescribe" class="film-name" type="text" />
</van-dialog>
</div>
</template>
......@@ -151,7 +151,7 @@ export default {
console.log(action);
if (action === "confirm") {
if (!this.templateData.filmName) {
this.$toast("请输入视片名称");
this.$toast("请输入作品名称");
done(false);
} else {
createFilm({
......@@ -166,13 +166,13 @@ export default {
}).then(res => {
done();
this.$toast.success("添加成功");
console.log(res, "创建视片成功");
console.log(res, "创建作品成功");
this.show = false;
this.goFilm({
filmId: res.data.data
})
// updateFilmInfo(res.data.filmId, "数据").then(res => {
// console.log(res, "更新视片成功");
// console.log(res, "更新作品成功");
// this.$router.back();
// });
// this.$router.back();
......
......@@ -249,7 +249,7 @@ export default {
},
getFilmDetail() {
getFilmDetail(this.$route.query.filmId).then(res => {
console.log(res.data, "视片详情");
console.log(res.data, "作品详情");
this.templateData.filmId = res.data.filmId;
this.name = res.data.filmName;
this.templateData.resourceUrl = res.data.resourceUrl;
......@@ -272,7 +272,7 @@ export default {
).then(res => {
this.show = false;
this.$toast.success("发布成功");
console.log(res, "更新视片成功");
console.log(res, "更新作品成功");
this.$router.back();
});
}
......@@ -287,10 +287,10 @@ export default {
filmName: this.name
}).then(res => {
this.$toast.success("发布成功");
console.log(res, "创建视片成功");
console.log(res, "创建作品成功");
this.show = false;
// updateFilmInfo(res.data.filmId, "数据").then(res => {
// console.log(res, "更新视片成功");
// console.log(res, "更新作品成功");
// this.$router.back();
// });
this.$router.back();
......
<template>
<div class="edit-container">
<NavBar title="编辑视片" v-if="!is_mini_token" left-arrow>
<NavBar title="编辑作品" v-if="!is_mini_token" left-arrow>
<div @click="pageShow">页面管理</div>
</NavBar>
<svg
......@@ -398,7 +398,7 @@ export default {
}
},
mounted() {
document.title = "编辑视片";
document.title = "编辑作品";
var timer = setTimeout(() => {
this.gifloaded = true;
clearTimeout(timer);
......@@ -573,7 +573,7 @@ export default {
getFilmDetail() {
if (this.$route.query.filmId) {
getFilmDetail(this.$route.query.filmId).then(res => {
console.log(res.data, "视片详情");
console.log(res.data, "作品详情");
this.templateData.filmId = res.data.filmId;
this.templateData.filmName = res.data.filmName;
this.templateData.resourceUrl = res.data.resourceUrl;
......
......@@ -57,16 +57,16 @@
</div>-->
</div>
<div class="createBtn">
<van-button type="info" style="width:45%" @click="goEdit">修改视片</van-button>
<van-button type="info" style="width:45%" @click="goEdit">修改作品</van-button>
<van-button type="info" @click="goDevices" style="width:45%">更新绑定设备</van-button>
</div>
<van-dialog :before-close="beforeClose" v-model="show" title="视片信息" show-cancel-button>
<div class="tips">*视片名称:</div>
<input placeholder="请输入视片名称" v-model="templateData.filmName" class="film-name" type="text" />
<van-dialog :before-close="beforeClose" v-model="show" title="作品信息" show-cancel-button>
<div class="tips">*作品名称:</div>
<input placeholder="请输入作品名称" v-model="templateData.filmName" class="film-name" type="text" />
<br />
<div class="tips">视片描述:</div>
<div class="tips">作品描述:</div>
<input
placeholder="请输入视片描述"
placeholder="请输入作品描述"
v-model="templateData.filmDescribe"
class="film-name"
type="text"
......@@ -87,7 +87,7 @@ export default {
data() {
return {
show: false,
title: "视片详情",
title: "作品详情",
current: 0,
page: 1,
list: [],
......@@ -130,7 +130,7 @@ export default {
}
},
mounted() {
document.title = "视片详情";
document.title = "作品详情";
window.addEventListener("popstate", () => {
window.wx.miniProgram.navigateBack();
console.log('wx.miniProgram.navigateBack()')
......@@ -153,7 +153,7 @@ export default {
},
getFilmDetail() {
getFilmDetail(this.$route.query.filmId).then(res => {
console.log(res.data, "视片详情");
console.log(res.data, "作品详情");
this.templateData.filmId = res.data.filmId;
this.templateData.templateUrl = res.data.templateUrl.split(",");
this.templateData.filmName = res.data.filmName;
......@@ -182,7 +182,7 @@ export default {
console.log(action);
if (action === "confirm") {
if (!this.templateData.filmName) {
this.$toast("请输入视片名称");
this.$toast("请输入作品名称");
done(false);
} else {
updateBaseFilmInfo(
......@@ -194,7 +194,7 @@ export default {
this.$toast.success("更新成功");
this.show = false;
// updateFilmInfo(res.data.filmId, "数据").then(res => {
// console.log(res, "更新视片成功");
// console.log(res, "更新作品成功");
// this.$router.back();
// });
// this.$router.back();
......
<template>
<div class="edit-container">
<NavBar title="视片设备列表" v-if="!is_mini_token" left-arrow></NavBar>
<NavBar title="作品设备列表" v-if="!is_mini_token" left-arrow></NavBar>
<div class="content">
<div class="myfilms">
<div class="title">
......@@ -135,7 +135,7 @@ export default {
}
},
mounted() {
document.title = "视片设备列表";
document.title = "作品设备列表";
},
methods: {
getScheduleDetail() {
......
<template>
<div>
<NavBar title="我的视片" left-arrow></NavBar>
<NavBar title="我的作品" left-arrow></NavBar>
<film></film>
</div>
</template>
......
......@@ -8,7 +8,7 @@
<!-- <div class="user-name"></div> -->
</div>
<div class="eee-bg"></div>
<van-cell title="我的视片" icon="shop-o" is-link :to="{
<van-cell title="我的作品" icon="shop-o" is-link :to="{
path: '/user/films'
}"></van-cell>
<van-cell title="我的设备" icon="shop-o" is-link :to="{
......
......@@ -18,7 +18,7 @@
<van-tabbar-item :class="{ 'van-tabbar-item--active' : currentPath.includes('/device') }" replace :to="{
path: '/device',
exact: false
}" icon="setting-o">设备与视片</van-tabbar-item>
}" icon="setting-o">设备与作品</van-tabbar-item>
<van-tabbar-item :class="{ 'van-tabbar-item--active' : currentPath.includes('/user') }" replace :to="{
path: '/user',
exact: false
......
......@@ -83,7 +83,7 @@ export default {
},
getFilmDetail() {
getFilmDetail(this.$route.query.filmId).then(res => {
console.log(res.data, "视片详情");
console.log(res.data, "作品详情");
this.templateData.filmId = res.data.filmId;
this.name = res.data.filmName
this.templateData.resourceUrl = res.data.resourceUrl;
......@@ -99,7 +99,7 @@ export default {
JSON.stringify(this.templateData.listData)
).then(res => {
this.show = false;
console.log(res, "更新视片成功");
console.log(res, "更新作品成功");
this.$router.back();
});
}
......@@ -115,10 +115,10 @@ export default {
filmName: ''
}).then(res => {
this.$toast.success('添加成功');
console.log(res, "创建视片成功");
console.log(res, "创建作品成功");
this.show = false;
// updateFilmInfo(res.data.filmId, "数据").then(res => {
// console.log(res, "更新视片成功");
// console.log(res, "更新作品成功");
// this.$router.back();
// });
// this.$router.back();
......
......@@ -249,7 +249,7 @@ export default {
},
getFilmDetail() {
getFilmDetail(this.$route.query.filmId).then(res => {
console.log(res.data, "视片详情");
console.log(res.data, "作品详情");
this.templateData.filmId = res.data.filmId;
this.name = res.data.filmName;
this.templateData.resourceUrl = res.data.resourceUrl;
......@@ -272,7 +272,7 @@ export default {
).then(res => {
this.show = false;
this.$toast.success("发布成功");
console.log(res, "更新视片成功");
console.log(res, "更新作品成功");
this.$router.back();
});
}
......@@ -287,10 +287,10 @@ export default {
filmName: this.name
}).then(res => {
this.$toast.success("发布成功");
console.log(res, "创建视片成功");
console.log(res, "创建作品成功");
this.show = false;
// updateFilmInfo(res.data.filmId, "数据").then(res => {
// console.log(res, "更新视片成功");
// console.log(res, "更新作品成功");
// this.$router.back();
// });
this.$router.back();
......
......@@ -384,7 +384,7 @@ export default {
},
getFilmDetail() {
getFilmDetail(this.$route.query.filmId).then(res => {
console.log(res.data, "视片详情");
console.log(res.data, "作品详情");
this.templateData.filmId = res.data.filmId;
this.name = res.data.filmName;
this.templateData.resourceUrl = res.data.resourceUrl;
......@@ -407,7 +407,7 @@ export default {
).then(res => {
this.show = false;
this.$toast.success("发布成功");
console.log(res, "更新视片成功");
console.log(res, "更新作品成功");
this.$router.back();
});
}
......@@ -422,10 +422,10 @@ export default {
filmName: this.name
}).then(res => {
this.$toast.success("发布成功");
console.log(res, "创建视片成功");
console.log(res, "创建作品成功");
this.show = false;
// updateFilmInfo(res.data.filmId, "数据").then(res => {
// console.log(res, "更新视片成功");
// console.log(res, "更新作品成功");
// this.$router.back();
// });
this.$router.back();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment