初始化

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

9
pages/expert/index.js Normal file
View File

@@ -0,0 +1,9 @@
Page({
onShow() {
this.getTabBar((tabBar) => {
tabBar.setData({
selected: '专家服务',
})
})
}
})

4
pages/expert/index.json Normal file
View File

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

57
pages/expert/index.scss Normal file
View File

@@ -0,0 +1,57 @@
page {
background-color: rgba(247, 249, 252, 1);
}
.head {
height: 400rpx;
background: linear-gradient(rgba(0, 86, 90, 1), rgba(0, 123, 127, 1));
color: white;
.icon {
width: 120rpx;
aspect-ratio: 1;
background-color: rgba(255, 255, 255, 0.2);
border-radius: 30rpx;
font-size: 50rpx;
}
.t-1 {
font-weight: 700;
font-size: 45rpx;
margin-top: 20rpx;
}
.t-2 {
font-size: 24rpx;
}
}
.padding {
padding: 30rpx;
.c-1 {
background: linear-gradient(rgba(0, 33, 33, 1), rgba(0, 106, 106, 1));
padding: 60rpx 30rpx 50rpx;
color: white;
border-radius: 30rpx;
margin-bottom: 30rpx;
.num {
font-size: 60rpx;
font-weight: 700;
}
.tip {
margin-top: 40rpx;
font-size: 26rpx;
color: rgba(255, 255, 255, 0.8);
}
}
.btn{
padding: 50rpx 0;
background-color: rgba(29, 120, 116, 1);
}
.c-2{
}
}

34
pages/expert/index.wxml Normal file
View File

@@ -0,0 +1,34 @@
<view class="head flex-column-center">
<view class="icon flex-center">
<t-icon name="call-1" />
</view>
<view class="t-1">专家服务</view>
<view class="t-2">专业医护团队为您守护</view>
</view>
<view class="padding">
<view class="c-1">
<view class="flex-between">
<view class="flex-align"
style="gap: 20rpx;">
<t-icon name="check-circle" />
可咨询次数
</view>
<view class="num">3</view>
</view>
<view class="tip">本月剩余 3 次免费咨询机会</view>
</view>
<t-button block
theme="primary"
class="btn"
icon="call-1">
一键拨打专家电话
</t-button>
<view class="c-2 flex-align">
<view class="icon">
<t-icon name="time" />
</view>
</view>
</view>

14
pages/home/index.js Normal file
View File

@@ -0,0 +1,14 @@
Page({
data: {
},
onShow() {
this.getTabBar((tabBar) => {
tabBar.setData({
selected: '首页',
})
})
}
})

4
pages/home/index.json Normal file
View File

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

127
pages/home/index.scss Normal file
View File

@@ -0,0 +1,127 @@
page {
background-color: rgba(247, 249, 252, 1);
}
.header {
background: var(--background);
color: white;
padding: 30rpx;
.h-1 {
display: flex;
gap: 30rpx;
.left {
flex: 1;
.t-1 {
font-size: 60rpx;
font-weight: 700;
}
.t-2 {
font-size: 28rpx;
}
}
.right {
width: 140rpx;
aspect-ratio: 1;
background-color: rgba(255, 255, 255, 0.2);
border-radius: 20rpx;
.d {
font-weight: 700;
font-size: 60rpx;
}
.c {
font-size: 24rpx;
}
}
}
.h-2 {
margin-top: 30rpx;
background-color: rgba(255, 255, 255, 0.15);
padding: 30rpx;
border-radius: 30rpx;
.title {
margin-bottom: 20rpx;
}
.num {
font-weight: 700;
}
}
}
.list {
padding: 30rpx;
.item {
background-color: white;
box-shadow: 0 4rpx 8rpx rgba(11, 27, 61, 0.04);
border-radius: 20rpx;
padding: 30rpx;
--color: rgba(0, 106, 106, 0.1);
align-items: flex-start;
gap: 30rpx;
&+.item {
margin-top: 30rpx;
}
.icon {
width: 90rpx;
aspect-ratio: 1;
border-radius: 20rpx;
background-color: var(--color);
color: rgba(99, 63, 0, 1);
}
.content {
.time {
margin-left: 20rpx;
color: rgba(69, 70, 78, 1);
font-size: 28rpx;
}
.title {
font-weight: 700;
margin-top: 10rpx;
}
.desc {
color: rgb(154, 156, 158);
font-size: 28rpx;
margin-top: 10rpx;
}
}
.btn {
width: fit-content;
font-size: 28rpx;
margin: 20rpx 0 0;
background-color: rgba(242, 244, 247, 1);
color: rgba(0, 106, 106, 1);
&.active {
opacity: 0.7;
background-color: rgba(232, 245, 233, 1);
color: rgba(46, 139, 87, 1);
}
}
}
}
.tip {
margin: 0 30rpx;
padding: 30rpx;
background-color: rgba(0, 106, 106, 0.08);
border-radius: 30rpx;
color: rgba(0, 106, 106, 1);
font-size: 28rpx;
}

50
pages/home/index.wxml Normal file
View File

@@ -0,0 +1,50 @@
<view class="header">
<t-navbar class="fixed-nav"
fixed="{{false}}" />
<view class="h-1">
<view class="left">
<view class="t-1">术后第 2 天</view>
<view class="t-2">康复进行中</view>
</view>
<view class="right flex-column-center ">
<view class="d">2</view>
<view class="c">DAYS</view>
</view>
</view>
<view class="h-2">
<view class="flex-between title">
<view>今日任务完成度</view>
<view class="num">0/5</view>
</view>
<t-progress percentage="80"
color="{{ ['white', 'white'] }}"
track-color="rgba(255, 255, 255, 0.2)"
label="" />
</view>
</view>
<view class="list">
<view class="item flex-align"
wx:for="{{5}}"
wx:key="index">
<view class="icon flex-center">
<t-icon name="apple" />
</view>
<view class="content">
<view class="flex-align">
<t-tag variant="light"
theme="success">用药</t-tag>
<view class="time">08:00</view>
</view>
<view class="title">服用抗生素</view>
<view class="desc">头孢类抗生素,饭后服用</view>
<button class="btn">标记完成</button>
</view>
</view>
</view>
<view class="tip">
<view class="title">💡 温馨提示:</view>
<view class="text"> 请按时完成康复任务,如有任何不适请及时联系医护人员</view>
</view>
<view style="height: 30rpx;"></view>

View 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",
})
}
}
})

View File

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

View 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;
}
}

View 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>

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>

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',
})
}
})

View File

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

View 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;
}
}
}
}

View 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" />

View File

@@ -0,0 +1,31 @@
Page({
data: {
key: "is_first",
loading: true,
},
onLoad(options) {
this.init()
},
init() {
let state = wx.getStorageSync(this.data.key);
if (state) {
wx.redirectTo({
url: "/pages/joinFlow/access/index",
})
} else {
this.setData({
loading: false
})
}
},
handNext() {
wx.setStorageSync(this.data.key, true)
wx.redirectTo({
url: "/pages/home/index",
})
}
})

View File

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

View File

@@ -0,0 +1,38 @@
.page {
background-image: linear-gradient(135deg, rgba(0, 33, 33, 1), rgba(0, 106, 106, 1), );
position: relative;
height: 100vh;
}
.j-1 {
color: white;
position: absolute;
margin: auto;
height: min-content;
inset: 0;
text-align: center;
.text-1 {
font-size: 60rpx;
font-weight: 700;
margin-bottom: 40rpx;
}
.text-2 {
line-height: 50rpx;
color: rgba(255, 255, 255, 0.8);
}
}
.footer {
position: absolute;
left: 40rpx;
right: 40rpx;
bottom: 60rpx;
.btn {
width: 100% !important;
padding: 30rpx 0;
color: rgba(0, 106, 106, 1);
}
}

View File

@@ -0,0 +1,13 @@
<view wx:if="{{!loading}}" class="page">
<view class="j-1">
<view class="text-1">欢迎使用术极守护</view>
<view class="text-2">您的贴身康复管家</view>
<view class="text-2">为您的术后康复之路保驾护航</view>
</view>
<view class="footer">
<button class="btn"
bind:tap="handNext"> 下一步</button>
</view>
</view>

66
pages/test/index.js Normal file
View File

@@ -0,0 +1,66 @@
// pages/test/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

3
pages/test/index.json Normal file
View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

1
pages/test/index.scss Normal file
View File

@@ -0,0 +1 @@
/* pages/test/index.wxss */

2
pages/test/index.wxml Normal file
View File

@@ -0,0 +1,2 @@
<!--pages/test/index.wxml-->
<text>pages/test/index.wxml</text>