Commit 01e5f339 by 李伟康

commit 轻改根据门店显示素材

1 parent 396bd7db
......@@ -15,7 +15,7 @@
>文件夹</view>
<template v-for="(i,index) in data">
<view
:class="['item', {active: i.id == id} ]"
:class="['item', {active: i[idKey] == id} ]"
:key="index"
@click="jump(i)"
>
......@@ -60,7 +60,11 @@ export default {
type: String,
data: Array,
id: [String, Number],
showPayBtn: Boolean
showPayBtn: Boolean,
idKey:{
type: String,
default: 'id'
}
},
data () {
return {
......
......@@ -22,18 +22,18 @@
</view>
<template v-for="(item, index) in media">
<view
:class="['view', { showView: id == item.id }]"
:class="['view', { showView: id == item.sort }]"
:key="index"
>
<component
:is="componentName(item.id)"
:is="componentName(item.sort)"
:views="item.receptionSourceDetailList || []"
:ref="'media' + item.id"
:ref="'media' + item.sort"
:title="item.detailTitle || ''"
:madiaId="item.id"
:madiaId="item.sort"
:customerType="customerType"
@jumpPage="jumpPage"
:show="id == item.id"
:show="id == item.sort"
@reception="reception"
/>
</view>
......@@ -46,6 +46,7 @@
@choose="choose"
@finish="open"
:id="id"
idKey="sort"
/>
</template>
<finish-step
......@@ -95,7 +96,7 @@ export default {
computed: {
title () {
let { id } = this,
name = this.media.find((e) => e.id == id)?.detailTitle || "";
name = this.media.find((e) => e.sort == id)?.detailTitle || "";
return name;
},
watchStatus () {
......@@ -112,13 +113,13 @@ export default {
...mapMutations("audio", ["setReceptionStatus"]),
componentName (id) {
let name = "";
if ([8, 10, 11].includes(id)) name = "membranes";
if ([2, 4, 5].includes(id)) name = "membranes";
else
name = {
7: "reception",
13: "invitation",
9: "Case",
12: 'history'
1: "reception",
7: "invitation",
3: "Case",
6: 'history'
}[id];
return name;
},
......@@ -127,8 +128,8 @@ export default {
},
/**切换素材 */
choose (e) {
if (this.id == 7) this.$refs.media7[0].closeAllPopup();
this.jumpPage({ id: e.id })
if (this.id == 1) this.$refs.media1[0].closeAllPopup();
this.jumpPage({ id: e.sort })
},
back () {
if (this.historyId) {
......@@ -171,7 +172,7 @@ export default {
this.$emit('reception')
},
backInvitation () {
this.jumpPage({ id: 13 })
this.jumpPage({ id: 7 })
setTimeout(() => {
uni.showToast({
title: '请选择回店客户',
......
......@@ -157,9 +157,9 @@ export default {
this.$refs.home.previewRef.close();
},
preview () {
let { id } = this.chooseItem;
let { sort } = this.chooseItem;
this.type = "preview";
this.id = id;
this.id = sort;
this.cancel()
},
back () {
......@@ -200,7 +200,7 @@ export default {
return true
},
jumpPage (id) {
this.id = id ? id : this.moduleList[0].id
this.id = id ? id : this.moduleList[0].sort
this.type = "edit"
},
clearHistory () {
......@@ -217,8 +217,8 @@ export default {
if (!flag) return
this.customerType = index
if (index == 0) {
const { id } = moduleList[moduleList.length - 1]
this.jumpPage(id)
const { sort } = moduleList[moduleList.length - 1]
this.jumpPage(sort)
}
else this.jumpPage()
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!