调整手动绑定样式
This commit is contained in:
@@ -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: "",
|
||||
})
|
||||
},
|
||||
})
|
Reference in New Issue
Block a user