调整手动绑定样式

This commit is contained in:
2024-12-24 17:33:07 +08:00
parent b3358ef4ec
commit 4ecf443f89
6 changed files with 108 additions and 15 deletions

View File

@@ -93,6 +93,25 @@ Page({
})
})
},
onParkFocus(e) {
this.setData({
show: true,
title: "园区",
type: 'park'
})
},
onTenementFocus(e) {
const { park } = this.data;
if (!park) {
alertInfo("请先选择园区")
return;
}
this.setData({
show: true,
title: "公司",
type: 'tenement'
})
},
scan() {
wx.scanCode({
scanType: "qrCode",
@@ -108,4 +127,29 @@ Page({
}
})
},
onConfirm(e) {
console.log('e', e.detail)
const { type, data = {} } = e.detail;
switch(type) {
case "park":
this.setData({
park: data.id,
parkName: data.name,
})
break;
case "tenement":
this.setData({
tenement: data.id,
tenementName: data.name,
})
}
this.onConcal();
},
onConcal() {
this.setData({
show: false,
title: "",
type: "",
})
},
})