初始化

This commit is contained in:
zhu
2026-03-27 13:29:41 +08:00
commit ee03132cee
112 changed files with 6417 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
Page({
data: {
showPicker: false,
date: new Date().getTime(),
//手术
showSurgery: false,
surgeryList: [],
selectSurgery: [],
age: "",
allergy: "",
comorbidity: "",
},
onInputChange(e) {
const { field } = e.currentTarget.dataset;
this.setData({
[`${field}`]: e.detail.value,
});
},
//选择时间
chaneTimeShow() {
this.setData({
showTime: !this.data.showTime
})
},
onTimeConfirm(e) {
let { value } = e.detail
this.setData({
date: value
})
},
//选择手术
changeSurgeryShow() {
this.setData({
showSurgery: !this.data.showSurgery
})
},
//提交
onSubmit() {
let { date, age, allergy, comorbidity } = this.data
let errorText = ""
if (!date) {
errorText = "请选择时间"
}
if (!age.trim()) {
errorText = "请填写年龄"
}
if (errorText) {
wx.showToast({
title: errorText,
icon: 'none'
})
return
}
wx.switchTab({
url: '/pages/home/index',
})
}
})