企微构建新增指定默认首页
This commit is contained in:
@@ -60,6 +60,9 @@
|
||||
<el-form-item label="接口是否单服务">
|
||||
<el-checkbox v-model="form.isSingleService"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="默认首页">
|
||||
<el-input v-model="form.homePage" clearable placeholder="默认首页"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</template>
|
||||
</ai-card>
|
||||
@@ -158,11 +161,11 @@ export default {
|
||||
submit() {
|
||||
this.$refs.AddForm.validate(v => {
|
||||
if (v) {
|
||||
const {tabBar, form: {type, appId, isSingleService}} = this
|
||||
const {tabBar, form: {type, appId, isSingleService, homePage}} = this
|
||||
if (type == 'mp') {
|
||||
this.form.extra = {tabBar, appId}
|
||||
} else if (v == 'wxwork') {
|
||||
this.form.extra = {isSingleService}
|
||||
this.form.extra = {isSingleService, homePage}
|
||||
}
|
||||
this.instance.post("/node/custom/addOrUpdate", this.form).then(res => {
|
||||
if (res?.code == 0) {
|
||||
@@ -173,13 +176,15 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSysTypeChange(v, data) {
|
||||
handleSysTypeChange(v, data = {}) {
|
||||
let values = this.$copy(data)
|
||||
if (v == 'mp') {
|
||||
this.form.appId = data.appId
|
||||
this.tabBar = data?.tabBar || this.tabBar
|
||||
} else if (v == 'wxwork') {
|
||||
this.form.isSingleService = data.isSingleService
|
||||
if (values?.tabBar) {
|
||||
this.tabBar = values.tabBar || this.tabBar
|
||||
delete values.tabBar
|
||||
}
|
||||
}
|
||||
Object.keys(values).map(e => this.$set(this.form, e, values[e]))
|
||||
},
|
||||
handleTabbarChange(row, {name, label}) {
|
||||
row.text = label
|
||||
|
||||
Reference in New Issue
Block a user