Commit 689dfdec by crushh

update: dist

parent cf7b62dc
......@@ -70,7 +70,7 @@
<div class="flex mt16" v-show="baseForm.backMusicFlag">
<div class="flex">
<el-button size="small" class="playBtn" @click="handleListen"><i :class="['iconfont fz14', isPlay ? 'icon-zanting' : 'icon-kaiqi']"></i> 点击试听</el-button>
<el-select class="musicSelect" v-model="baseForm.backMusicUrlObj" value-key="materialValue" @clear="handleClear" :clearable="customMusicOptions.length">
<el-select class="musicSelect" v-model="baseForm.backMusicUrlObj" value-key="materialValue" @clear="handleClear" @change="handleChange" :clearable="customMusicOptions.length">
<el-option v-for="item in backMusicOptionsComputed" :key="item.materialValue" :value="item" :label="item.materialName"> </el-option>
</el-select>
</div>
......@@ -340,9 +340,19 @@ export default {
});
},
handleClear() {
if (this.isPlay) {
this.isPlay = !this.isPlay;
music.pause();
}
this.customMusicOptions = [];
this.baseForm.backMusicUrlObj = this.backMusicOptions[0];
},
handleChange() {
if (this.isPlay) {
this.isPlay = !this.isPlay;
music.pause();
}
},
setAudioList(obj) {
const { name, url } = obj;
this.customMusicOptions = [
......@@ -353,6 +363,10 @@ export default {
materialKey: 'backMusicUrl'
}
];
if (this.isPlay) {
this.isPlay = !this.isPlay;
music.pause();
}
this.baseForm.backMusicUrlObj = this.customMusicOptions[0];
},
handleAdsChange(obj) {
......
......@@ -243,12 +243,14 @@ export default {
this.menuActive = index;
},
async getGameTemplateByType() {
this.loading = true;
const res = await getGameTemplateByType({ templateType: 1 });
this.templateData = res.result;
if (this.isAdd) {
this.$route.meta.refresh = false;
const { templateId } = res.result[0];
this.templateId = templateId;
this.loading = false;
} else {
const { id } = this.$route.params;
this.getGameDetail(id);
......
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 to comment