初始化
This commit is contained in:
31
pages/joinFlow/access/index.js
Normal file
31
pages/joinFlow/access/index.js
Normal file
@@ -0,0 +1,31 @@
|
||||
// pages/auth/access/index.js
|
||||
Page({
|
||||
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
handClick(e) {
|
||||
let { type } = e.currentTarget.dataset
|
||||
//拍照
|
||||
if (type == 1) {
|
||||
wx.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success(res) {
|
||||
console.log(res);
|
||||
},
|
||||
fail(err) {
|
||||
wx.showToast({
|
||||
title: '扫码失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: "/pages/joinFlow/manual/index",
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
4
pages/joinFlow/access/index.json
Normal file
4
pages/joinFlow/access/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
80
pages/joinFlow/access/index.scss
Normal file
80
pages/joinFlow/access/index.scss
Normal file
@@ -0,0 +1,80 @@
|
||||
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;
|
||||
background-color: white;
|
||||
transform: translateY(-20rpx);
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
padding: 80rpx 30rpx 30rpx;
|
||||
|
||||
.text-1 {
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
font-size: 45rpx;
|
||||
}
|
||||
|
||||
.text-2 {
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
color: rgba(69, 70, 78, 1);
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
box-shadow: 0 4rpx 12rpx rgba(11, 27, 61, 0.14);
|
||||
padding: 30rpx;
|
||||
border-radius: 30rpx;
|
||||
gap: 30rpx;
|
||||
margin-bottom: 60rpx;
|
||||
|
||||
.icon {
|
||||
width: 90rpx;
|
||||
aspect-ratio: 1;
|
||||
background-color: rgba(0, 106, 106, 0.1);
|
||||
font-size: 50rpx;
|
||||
border-radius: 20rpx;
|
||||
color: rgba(46, 139, 87, 1);
|
||||
}
|
||||
|
||||
.t-1 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.t-2 {
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgba(69, 70, 78, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
background-color: rgba(255, 221, 180, 1);
|
||||
padding: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
color: rgba(99, 63, 0, 1);
|
||||
font-size: 28rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
}
|
||||
40
pages/joinFlow/access/index.wxml
Normal file
40
pages/joinFlow/access/index.wxml
Normal file
@@ -0,0 +1,40 @@
|
||||
<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>
|
||||
|
||||
<view class="content">
|
||||
<view class="text-1">开始使用</view>
|
||||
<view class="text-2">请选择康复计划接入方式</view>
|
||||
<view class="item flex-align"
|
||||
bind:tap="handClick"
|
||||
data-type="1">
|
||||
<view class="icon flex-center">
|
||||
<t-icon name="qrcode" />
|
||||
</view>
|
||||
<view>
|
||||
<view class="t-1">扫码接入</view>
|
||||
<view class="t-2">扫描医护人员提供的二维码</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item flex-align"
|
||||
bind:tap="handClick"
|
||||
data-type="2">
|
||||
<view class="icon flex-center">
|
||||
<t-icon name="search" />
|
||||
</view>
|
||||
<view>
|
||||
<view class="t-1">手动选择</view>
|
||||
<view class="t-2">搜索医院、科室、手术名称</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tip">
|
||||
<view>💡 温馨提示:</view>
|
||||
<view>首次使用需要录入基本信息,请准备好您的手术相关资料</view>
|
||||
</view>
|
||||
</view>
|
||||
36
pages/joinFlow/manual/index.js
Normal file
36
pages/joinFlow/manual/index.js
Normal 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"
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/joinFlow/manual/index.json
Normal file
4
pages/joinFlow/manual/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
8
pages/joinFlow/manual/index.scss
Normal file
8
pages/joinFlow/manual/index.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
.content {
|
||||
margin-top: 60rpx;
|
||||
|
||||
.btn {
|
||||
margin-top: 60rpx;
|
||||
padding: 40rpx 30rpx;
|
||||
}
|
||||
}
|
||||
26
pages/joinFlow/manual/index.wxml
Normal file
26
pages/joinFlow/manual/index.wxml
Normal 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>
|
||||
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