初始化
This commit is contained in:
61
pages/joinFlow/person/index.js
Normal file
61
pages/joinFlow/person/index.js
Normal 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',
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/joinFlow/person/index.json
Normal file
4
pages/joinFlow/person/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
85
pages/joinFlow/person/index.scss
Normal file
85
pages/joinFlow/person/index.scss
Normal file
@@ -0,0 +1,85 @@
|
||||
page {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.banner {
|
||||
height: 400rpx;
|
||||
background-image: var(--background);
|
||||
padding: 30rpx;
|
||||
|
||||
.text-1 {
|
||||
color: white;
|
||||
font-size: 60rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-2 {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
background-color: white;
|
||||
transform: translateY(-20rpx);
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
padding: 50rpx 0 0;
|
||||
|
||||
.text-1 {
|
||||
font-weight: 700;
|
||||
font-size: 45rpx;
|
||||
margin-bottom: 40rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
input {
|
||||
text-align: right;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
textarea {
|
||||
background-color: rgba(242, 244, 247, 1);
|
||||
margin-top: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
color: rgba(11, 27, 61, 0.5);
|
||||
padding: 25rpx;
|
||||
height: 200rpx;
|
||||
width: 100%;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
background-color: white;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.surgery-box {
|
||||
padding: 30rpx 0;
|
||||
|
||||
.title {
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
font-size: 38rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.surgery-list {
|
||||
height: 50vh;
|
||||
padding: 0 30rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.surgery-item {
|
||||
height: 80rpx;
|
||||
|
||||
&.active {
|
||||
color: #2ba471;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
75
pages/joinFlow/person/index.wxml
Normal file
75
pages/joinFlow/person/index.wxml
Normal file
@@ -0,0 +1,75 @@
|
||||
<wxs src="/utils/wxs/comment.wxs"
|
||||
module="utils"></wxs>
|
||||
<view class="banner">
|
||||
<t-navbar t-class="fixed-nav"
|
||||
fixed="{{false}}" />
|
||||
<view class="info">
|
||||
<view class="text-1">术极守护</view>
|
||||
<view class="text-2">您的贴身康复管家</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="content"
|
||||
scroll-y>
|
||||
<view class="text-1">建立康复档案</view>
|
||||
<t-cell title="选择手术"
|
||||
arrow
|
||||
note="请选择"
|
||||
bind:tap="changeSurgeryShow">
|
||||
</t-cell>
|
||||
<t-cell title="手术日期"
|
||||
arrow
|
||||
note="{{utils.formatDate(date, 'YYYY/MM/DD') || '请选择'}}"
|
||||
bind:tap="chaneTimeShow">
|
||||
</t-cell>
|
||||
<t-cell title="年龄">
|
||||
<input type="number"
|
||||
slot="note"
|
||||
maxlength="3"
|
||||
placeholder="请输入年龄"
|
||||
data-field="age"
|
||||
bind:change="onInputChange" />
|
||||
</t-cell>
|
||||
<t-cell title="过敏史">
|
||||
<textarea placeholder="请输入过敏史(如:青霉素过敏)"
|
||||
slot="description"
|
||||
data-field="allergy"
|
||||
bind:change="onInputChange" />
|
||||
</t-cell>
|
||||
<t-cell title="合并症">
|
||||
<textarea placeholder="请输入合并症(如:高血压、糖尿病)"
|
||||
slot="description"
|
||||
data-field="comorbidity"
|
||||
bind:change="onInputChange" />
|
||||
</t-cell>
|
||||
</scroll-view>
|
||||
<view class="btn">
|
||||
<t-button block
|
||||
theme="primary"
|
||||
bind:tap="onSubmit">下一步
|
||||
</t-button>
|
||||
</view>
|
||||
|
||||
<t-popup visible="{{showSurgery}}"
|
||||
placement="bottom"
|
||||
bind:visible-change="changeSurgeryShow">
|
||||
<view class="surgery-box">
|
||||
<view class="title">手术列表</view>
|
||||
<scroll-view class="surgery-list"
|
||||
scroll-y>
|
||||
<view class="flex-between surgery-item " wx:for="{{6}}" wx:key="index">
|
||||
<view class="name">测试手术名字</view>
|
||||
<t-icon name="check" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</t-popup>
|
||||
|
||||
<!-- 时间 -->
|
||||
<t-date-time-picker title="选择时间"
|
||||
visible="{{showTime}}"
|
||||
mode="date"
|
||||
default-value="{{date}}"
|
||||
format="YYYY-MM-DD"
|
||||
bindconfirm="onTimeConfirm"
|
||||
bindclose="chaneTimeShow" />
|
||||
Reference in New Issue
Block a user