初始化

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,36 @@
Page({
data: {
formData: {
hospital: "",
department: ""
}
},
onInputChange(e) {
console.log("dsds");
const {field} = e.currentTarget.dataset;
this.setData({
[`formData.${field}`]: e.detail.value,
});
},
onSubmit() {
let {formData} = this.data
let errorText = ""
if (!formData.hospital.trim()) {
errorText = "请填写医院名称"
}
if (!formData.department.trim()) {
errorText = "请填写科室名称"
}
if (errorText) {
wx.showToast({
title: errorText,
icon: "none"
})
return;
}
wx.navigateTo({
url: "/pages/joinFlow/person/index"
})
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle": "custom"
}

View File

@@ -0,0 +1,8 @@
.content {
margin-top: 60rpx;
.btn {
margin-top: 60rpx;
padding: 40rpx 30rpx;
}
}

View File

@@ -0,0 +1,26 @@
<t-navbar title="选择康复计划"
left-arrow
fixed="{{false}}" />
<view class="content">
<t-input value="{{formData.hospital}}"
borderless
label="医院"
placeholder="请输入医院名称"
bind:change="onInputChange"
data-field="hospital" />
<t-input value="{{formData.department}}"
borderless
label="科室"
clearable="{{false}}"
placeholder="请输入科室名称"
bind:change="onInputChange"
data-field="department" />
<view class="btn">
<t-button block
theme="primary" bind:tap="onSubmit">
确认
</t-button>
</view>
</view>