Commit 11aed0ba by hank

添加模板至我的

parent 320eb085
<template> <template>
<div class="layout"> <div class="layout">
<div class="layout-content"> <div class="layout-content">
<keep-alive>
<router-view></router-view> <router-view></router-view>
</keep-alive>
</div> </div>
<van-tabbar route > <van-tabbar route >
<van-tabbar-item replace to="/tempaltes" active icon="home-o">模板库</van-tabbar-item> <van-tabbar-item replace to="/tempaltes" active icon="home-o">模板库</van-tabbar-item>
......
...@@ -75,8 +75,9 @@ export default { ...@@ -75,8 +75,9 @@ export default {
this.templateData.templateUrl = res.data.templateUrl; this.templateData.templateUrl = res.data.templateUrl;
this.templateData.frameUrl = res.data.frameUrl; this.templateData.frameUrl = res.data.frameUrl;
console.log("模板详情"); console.log("模板详情");
axios.get('http://visual-clouds.bdideal.com/html/156076616690429b1f3072101465b906a536cf608f824.txt').then(res => { axios.get(res.data.resourceUrl.replace('bdideal.com','oss-cn-beijing.aliyuncs.com')).then(res => {
console.log(res.data); console.log(res.data);
this.templateData.listData = res.data
}); });
}); });
}, },
...@@ -92,7 +93,6 @@ export default { ...@@ -92,7 +93,6 @@ export default {
}); });
}, },
publish() { publish() {
console.log(this.templateData.listData)
if (this.mode === "film") { if (this.mode === "film") {
updateFilmInfo( updateFilmInfo(
this.$route.query.filmId, this.$route.query.filmId,
...@@ -112,8 +112,9 @@ export default { ...@@ -112,8 +112,9 @@ export default {
resourceId: this.templateData.resourceId, resourceId: this.templateData.resourceId,
frameId: this.templateData.frameId, frameId: this.templateData.frameId,
filmData: JSON.stringify(this.templateData.listData), filmData: JSON.stringify(this.templateData.listData),
filmName: this.name filmName: ''
}).then(res => { }).then(res => {
this.$toast.success('添加成功');
console.log(res, "创建影片成功"); console.log(res, "创建影片成功");
this.show = false; this.show = false;
// updateFilmInfo(res.data.filmId, "数据").then(res => { // updateFilmInfo(res.data.filmId, "数据").then(res => {
...@@ -125,12 +126,7 @@ export default { ...@@ -125,12 +126,7 @@ export default {
} }
}, },
pub() { pub() {
if (!this.name) { this.publish()
this.$toast('请填写方案名称')
} else {
this.show = true;
}
}, },
enterSubmit() { enterSubmit() {
this.message({ this.message({
...@@ -138,7 +134,7 @@ export default { ...@@ -138,7 +134,7 @@ export default {
}) })
setTimeout(() => { setTimeout(() => {
this.publish() this.publish()
}, 500) }, 100)
}, },
goEdit() { goEdit() {
......
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