From 1eceec1dc68b6772f461e625d8576270241bd2b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B7=A6=E5=93=A5?= <17630302050@163.com>
Date: Tue, 3 Jun 2025 22:53:55 +0800
Subject: [PATCH] ewew
---
app.json | 4 +
pages/AddTherapeuticRegimen/index.js | 189 +++++++++++++++++++++++++
pages/AddTherapeuticRegimen/index.json | 14 ++
pages/AddTherapeuticRegimen/index.less | 40 ++++++
pages/AddTherapeuticRegimen/index.wxml | 39 +++++
pages/therapeuticRegimen/index.js | 5 +
pages/therapeuticRegimen/index.json | 4 +-
pages/therapeuticRegimen/index.less | 3 +
pages/therapeuticRegimen/index.wxml | 1 +
project.private.config.json | 11 +-
10 files changed, 307 insertions(+), 3 deletions(-)
create mode 100644 pages/AddTherapeuticRegimen/index.js
create mode 100644 pages/AddTherapeuticRegimen/index.json
create mode 100644 pages/AddTherapeuticRegimen/index.less
create mode 100644 pages/AddTherapeuticRegimen/index.wxml
diff --git a/app.json b/app.json
index fbbedba..6db189d 100644
--- a/app.json
+++ b/app.json
@@ -60,6 +60,10 @@
"root": "pages/therapeuticRegimen",
"name": "therapeuticRegimen",
"pages": ["index"]
+ },{
+ "root": "pages/AddTherapeuticRegimen",
+ "name": "AddTherapeuticRegimen",
+ "pages": ["index"]
}
],
"window": {
diff --git a/pages/AddTherapeuticRegimen/index.js b/pages/AddTherapeuticRegimen/index.js
new file mode 100644
index 0000000..388c7e4
--- /dev/null
+++ b/pages/AddTherapeuticRegimen/index.js
@@ -0,0 +1,189 @@
+// pages/followUp/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ style: 'border: 2rpx solid #efefef;border-radius: 12rpx;',
+ personInfo: {
+ name: '',
+ gender: 0,
+ birth: '',
+ address: [],
+ introduction: '',
+ yearType: 0,
+
+ // photos: [],
+ },
+ mode: '',
+ dateVisible: false,
+ date: new Date('2021-12-23').getTime(), // 支持时间戳传入
+ dateText: '',
+ filter(type, options) {
+ if (type === 'year') {
+ return options.sort((a, b) => b.value - a.value);
+ }
+ return options;
+ },
+ popupProps: {
+ usingCustomNavbar: true,
+ },
+
+ formatter(item, index) {
+ if (index === 1) {
+ const label = item.label.slice(0, -1);
+ return {
+ value: item.value,
+ label: calendarMonth[Number(label) - 1],
+ };
+ }
+ if (index === 2) {
+ const [dateValue, weekValue] = item.label.split(' ');
+ const dateSuffixes = {
+ 1: 'st',
+ 2: 'nd',
+ 3: 'rd',
+ };
+ const weekMap = {
+ 周一: 'Mon.',
+ 周二: 'Tues.',
+ 周三: 'Wed.',
+ 周四: 'Thurs.',
+ 周五: 'Fri.',
+ 周六: 'Sat.',
+ 周日: 'Sun.',
+ };
+ const label = dateValue.slice(0, -1);
+
+ return {
+ value: item.value,
+ label: `${label}${dateSuffixes[label] || 'th'} ${weekMap[weekValue]}`,
+ };
+ }
+
+ return {
+ value: item.value,
+ label: item.label.slice(0, -1),
+ };
+ },
+
+ originFiles: [
+ {
+ url: 'https://tdesign.gtimg.com/mobile/demos/example4.png',
+ name: 'uploaded1.png',
+ type: 'image',
+ removeBtn: true,
+ },
+ {
+ url: 'https://tdesign.gtimg.com/mobile/demos/example6.png',
+ name: 'uploaded2.png',
+ type: 'image',
+ removeBtn: true,
+ },
+ {
+ url: 'https://tdesign.gtimg.com/mobile/demos/example5.png',
+ name: 'uploaded3.png',
+ type: 'image',
+ removeBtn: true,
+ },
+ ],
+ gridConfig: {
+ column: 4,
+ width: 160,
+ height: 160,
+ },
+ config: {
+ count: 1,
+ },
+
+
+ },
+ showPicker(e) {
+ const { mode } = e.currentTarget.dataset;
+ this.setData({
+ [`${mode}Visible`]: true,
+ });
+
+
+
+ },
+
+ handleSuccess(e) {
+ console.log(e.detail)
+ const { files } = e.detail;
+ this.setData({
+ originFiles: files,
+ });
+ },
+ handleRemove(e) {
+ console.log(e.detail.file);
+ const { index } = e.detail;
+ const { originFiles } = this.data;
+ originFiles.splice(index, 1);
+ this.setData({
+ originFiles,
+ });
+ },
+ handleClick(e) {
+ console.log(e.detail.file);
+ },
+
+
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/AddTherapeuticRegimen/index.json b/pages/AddTherapeuticRegimen/index.json
new file mode 100644
index 0000000..db6145a
--- /dev/null
+++ b/pages/AddTherapeuticRegimen/index.json
@@ -0,0 +1,14 @@
+{
+ "usingComponents": {
+ "t-cell": "tdesign-miniprogram/cell/cell",
+ "t-input": "tdesign-miniprogram/input/input",
+ "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker",
+ "t-row": "tdesign-miniprogram/row/row",
+ "t-col": "tdesign-miniprogram/col/col",
+ "t-button": "tdesign-miniprogram/button/button",
+ "t-upload": "tdesign-miniprogram/upload/upload",
+ "t-radio": "tdesign-miniprogram/radio/radio",
+ "t-radio-group": "tdesign-miniprogram/radio-group/radio-group"
+ },
+ "navigationBarTitleText": "用药方案"
+}
\ No newline at end of file
diff --git a/pages/AddTherapeuticRegimen/index.less b/pages/AddTherapeuticRegimen/index.less
new file mode 100644
index 0000000..54ffe00
--- /dev/null
+++ b/pages/AddTherapeuticRegimen/index.less
@@ -0,0 +1,40 @@
+/* pages/AddTherapeuticRegimen/index.wxss */
+
+.therapeuticRegimen{
+ padding: 28rpx;
+ .improt-file{
+ border-radius: 20rpx;
+ background-color: #fff;
+ padding: 28rpx;
+ margin-bottom: 28rpx;
+ }
+ .title{
+ margin-bottom: 20rpx;
+ }
+ .therapeuticRegimen-item{
+ border-radius: 20rpx;
+ background-color: #fff;
+ padding: 28rpx;
+ margin-bottom: 28rpx;
+ }
+ .input-example {
+ // background-color: var(--bg-color-demo);
+ padding: 10rpx 0;
+ }
+
+ .input-example__label {
+ color: var(--td-text-color-primary);
+ font-size: 24rpx;
+ line-height: 40rpx;
+ margin: 0 8rpx 16rpx;
+ }
+ .box{
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ padding-right: 60rpx;
+ }
+ .t-overlay{
+ top: 0!important;
+ }
+}
\ No newline at end of file
diff --git a/pages/AddTherapeuticRegimen/index.wxml b/pages/AddTherapeuticRegimen/index.wxml
new file mode 100644
index 0000000..3944c6e
--- /dev/null
+++ b/pages/AddTherapeuticRegimen/index.wxml
@@ -0,0 +1,39 @@
+
+
+
+ 拍照导入
+
+
+
+ 用药方案
+
+
+
+
+
+ 用药周期
+
+
+
+
+
+
+
+
+ 体重(kg)
+
+
+
+
+
+
+
+ 药品信息
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/therapeuticRegimen/index.js b/pages/therapeuticRegimen/index.js
index 6e6663a..6ce1fa1 100644
--- a/pages/therapeuticRegimen/index.js
+++ b/pages/therapeuticRegimen/index.js
@@ -8,6 +8,11 @@ Page({
},
+ toPath(){
+ wx.navigateTo({
+ url: '/pages/AddTherapeuticRegimen/index',
+ })
+ },
/**
* 生命周期函数--监听页面加载
*/
diff --git a/pages/therapeuticRegimen/index.json b/pages/therapeuticRegimen/index.json
index 37eb285..c9de7f6 100644
--- a/pages/therapeuticRegimen/index.json
+++ b/pages/therapeuticRegimen/index.json
@@ -1,5 +1,7 @@
{
- "usingComponents": {},
+ "usingComponents": {
+ "t-button": "tdesign-miniprogram/button/button"
+ },
"navigationBarTitleText": "用药方案"
}
\ No newline at end of file
diff --git a/pages/therapeuticRegimen/index.less b/pages/therapeuticRegimen/index.less
index 4080624..41b0e72 100644
--- a/pages/therapeuticRegimen/index.less
+++ b/pages/therapeuticRegimen/index.less
@@ -36,4 +36,7 @@
}
}
}
+ .t-button{
+ margin-top: 28rpx;
+ }
}
\ No newline at end of file
diff --git a/pages/therapeuticRegimen/index.wxml b/pages/therapeuticRegimen/index.wxml
index 4cd449b..ebe4f89 100644
--- a/pages/therapeuticRegimen/index.wxml
+++ b/pages/therapeuticRegimen/index.wxml
@@ -20,4 +20,5 @@
每日2次,饭后服用
+ 新增用药方案
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
index 37f15ad..dcf595b 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -3,12 +3,19 @@
"miniprogram": {
"list": [
{
- "name": "pages/therapeuticRegimen/index",
- "pathName": "pages/therapeuticRegimen/index",
+ "name": "pages/AddTherapeuticRegimen/index",
+ "pathName": "pages/AddTherapeuticRegimen/index",
"query": "",
"scene": null,
"launchMode": "default"
},
+ {
+ "name": "pages/therapeuticRegimen/index",
+ "pathName": "pages/therapeuticRegimen/index",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
{
"name": "pages/emergency/index",
"pathName": "pages/emergency/index",