进村入库,修复定制方案的BUG

This commit is contained in:
aixianling
2022-07-14 11:52:00 +08:00
parent 4b4baf4952
commit 0f03dc9d04
4 changed files with 25 additions and 19 deletions

View File

@@ -41,6 +41,9 @@
<ai-card title="扩展设置">
<template #content>
<template v-if="form.type=='mp'">
<el-form-item label="小程序AppId">
<el-input v-model="form.appId" clearable placeholder="小程序appId"/>
</el-form-item>
<ai-title title="底部导航栏">
<template #rightBtn>
<ai-dialog-btn text="更换定制页" dialogTitle="选择应用">
@@ -90,7 +93,7 @@ export default {
e.project = "core"
} else e.project = "standard"
return e
})
}) || []
},
tabBar: v => ({
color: "#666666",
@@ -114,7 +117,7 @@ export default {
}
},
get() {
const {id} = this.form.customTabbar
const {id} = this.form.customTabbar || {}
return {id}
}
}
@@ -153,9 +156,9 @@ export default {
submit() {
this.$refs.AddForm.validate(v => {
if (v) {
const {tabBar, form: {type}} = this
const {tabBar, appId, form: {type}} = this
if (type == 'mp') {
this.form.extra = {tabBar}
this.form.extra = {tabBar, appId}
}
this.instance.post("/node/custom/addOrUpdate", this.form).then(res => {
if (res?.code == 0) {
@@ -168,9 +171,10 @@ export default {
},
handleSysTypeChange(v, data) {
if (v == 'mp') {
const {tabBar: {list}} = data
this.$set(this.form, 'customTabbar', list?.[2] || {
pagePath: "pages/enteringVillage/enteringVillage",
this.form.appId = data.appId
const customTabbar = data?.tabBar?.list?.[2]
this.$set(this.form, 'customTabbar', customTabbar || {
pagePath: "pages/AppEnteringVillage/AppEnteringVillage",
text: "进村",
iconPath: "TabBar/village.png",
selectedIconPath: "TabBar/village_selected.png"