diff --git a/2024-10-31.md b/2024-10-31.md
new file mode 100644
index 0000000..2b36d96
--- /dev/null
+++ b/2024-10-31.md
@@ -0,0 +1 @@
+# 2024-10-31
diff --git a/dist.nu b/dist.nu
new file mode 100644
index 0000000..5f298e8
--- /dev/null
+++ b/dist.nu
@@ -0,0 +1,5 @@
+cd ./src/images/
+svn add . --no-ignore --force
+svn ci -m "版本更新"
+cd ..
+cd ..
diff --git a/package.json b/package.json
index b50c6a5..01fd7f5 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
"@antfu/eslint-config": "^3.7.3",
"eslint": "^9.12.0",
"eslint-config-prettier": "^9.1.0",
- "miniprogram-api-typings": "^2.8.3-1",
+ "miniprogram-api-typings": "^4.0.1",
"prettier": "^3.3.3"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d19c53c..07f148d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -31,8 +31,8 @@ importers:
specifier: ^9.1.0
version: 9.1.0(eslint@9.12.0)
miniprogram-api-typings:
- specifier: ^2.8.3-1
- version: 2.12.0
+ specifier: ^4.0.1
+ version: 4.0.1
prettier:
specifier: ^3.3.3
version: 3.3.3
@@ -95,25 +95,29 @@ packages:
resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==}
engines: {node: '>=6.9.0'}
- '@babel/helper-string-parser@7.25.7':
- resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==}
+ '@babel/helper-string-parser@7.25.9':
+ resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==}
engines: {node: '>=6.9.0'}
'@babel/helper-validator-identifier@7.25.7':
resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==}
engines: {node: '>=6.9.0'}
+ '@babel/helper-validator-identifier@7.25.9':
+ resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==}
+ engines: {node: '>=6.9.0'}
+
'@babel/highlight@7.25.7':
resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==}
engines: {node: '>=6.9.0'}
- '@babel/parser@7.25.8':
- resolution: {integrity: sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==}
+ '@babel/parser@7.26.2':
+ resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==}
engines: {node: '>=6.0.0'}
hasBin: true
- '@babel/types@7.25.8':
- resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==}
+ '@babel/types@7.26.0':
+ resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==}
engines: {node: '>=6.9.0'}
'@clack/core@0.3.4':
@@ -1071,8 +1075,8 @@ packages:
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
engines: {node: '>=16 || 14 >=14.17'}
- miniprogram-api-typings@2.12.0:
- resolution: {integrity: sha512-ibvbqeslVFur0IAvTxLMvsbtvVcMo6gwvOnj0YZHV7aeDLu091VQRrETT2QuiG9P6aZWRcxeNGJChRKVPCp9VQ==}
+ miniprogram-api-typings@4.0.1:
+ resolution: {integrity: sha512-Ok4SSNCYnNLgbAhHCpIeqx6XICZ3aUxZ2iQDExmwKEinWaQQFzzxobK5JP9skrEOWn9PoKodjw4iUdF8Um0i/A==}
miniprogram-licia@1.43.0:
resolution: {integrity: sha512-NTQxO0LaoIv66I7civEqyUwtF36My7S0TwGyvMAFUpUqGXcQZsM9Ng2OWwHaBvlqdjjPHSacTMH3XqGpnieEow==}
@@ -1163,6 +1167,9 @@ packages:
picocolors@1.1.0:
resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==}
+ picocolors@1.1.1:
+ resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
+
picomatch@2.3.1:
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
engines: {node: '>=8.6'}
@@ -1343,10 +1350,6 @@ packages:
tinyexec@0.3.0:
resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==}
- to-fast-properties@2.0.0:
- resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
- engines: {node: '>=4'}
-
to-regex-range@5.0.1:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
@@ -1526,10 +1529,12 @@ snapshots:
'@babel/highlight': 7.25.7
picocolors: 1.1.0
- '@babel/helper-string-parser@7.25.7': {}
+ '@babel/helper-string-parser@7.25.9': {}
'@babel/helper-validator-identifier@7.25.7': {}
+ '@babel/helper-validator-identifier@7.25.9': {}
+
'@babel/highlight@7.25.7':
dependencies:
'@babel/helper-validator-identifier': 7.25.7
@@ -1537,15 +1542,14 @@ snapshots:
js-tokens: 4.0.0
picocolors: 1.1.0
- '@babel/parser@7.25.8':
+ '@babel/parser@7.26.2':
dependencies:
- '@babel/types': 7.25.8
+ '@babel/types': 7.26.0
- '@babel/types@7.25.8':
+ '@babel/types@7.26.0':
dependencies:
- '@babel/helper-string-parser': 7.25.7
- '@babel/helper-validator-identifier': 7.25.7
- to-fast-properties: 2.0.0
+ '@babel/helper-string-parser': 7.25.9
+ '@babel/helper-validator-identifier': 7.25.9
'@clack/core@0.3.4':
dependencies:
@@ -1777,7 +1781,7 @@ snapshots:
'@vue/compiler-core@3.5.12':
dependencies:
- '@babel/parser': 7.25.8
+ '@babel/parser': 7.26.2
'@vue/shared': 3.5.12
entities: 4.5.0
estree-walker: 2.0.2
@@ -1790,7 +1794,7 @@ snapshots:
'@vue/compiler-sfc@3.5.12':
dependencies:
- '@babel/parser': 7.25.8
+ '@babel/parser': 7.26.2
'@vue/compiler-core': 3.5.12
'@vue/compiler-dom': 3.5.12
'@vue/compiler-ssr': 3.5.12
@@ -2737,7 +2741,7 @@ snapshots:
dependencies:
brace-expansion: 2.0.1
- miniprogram-api-typings@2.12.0: {}
+ miniprogram-api-typings@4.0.1: {}
miniprogram-licia@1.43.0: {}
@@ -2826,6 +2830,8 @@ snapshots:
picocolors@1.1.0: {}
+ picocolors@1.1.1: {}
+
picomatch@2.3.1: {}
picomatch@4.0.2: {}
@@ -2846,7 +2852,7 @@ snapshots:
postcss@8.4.47:
dependencies:
nanoid: 3.3.7
- picocolors: 1.1.0
+ picocolors: 1.1.1
source-map-js: 1.2.1
prelude-ls@1.2.1: {}
@@ -2987,8 +2993,6 @@ snapshots:
tinyexec@0.3.0: {}
- to-fast-properties@2.0.0: {}
-
to-regex-range@5.0.1:
dependencies:
is-number: 7.0.0
diff --git a/project.private.config.json b/project.private.config.json
index 1f743b7..7853185 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -199,5 +199,6 @@
}
]
}
- }
+ },
+ "libVersion": "3.6.3"
}
\ No newline at end of file
diff --git a/src/components/customAudioBar/index.wxml b/src/components/customAudioBar/index.wxml
index 2b0e6da..313110f 100644
--- a/src/components/customAudioBar/index.wxml
+++ b/src/components/customAudioBar/index.wxml
@@ -9,5 +9,5 @@
- 45”
+ {{time}}”
diff --git a/src/components/customRecord/index.ts b/src/components/customRecord/index.ts
index ad0248b..b105846 100644
--- a/src/components/customRecord/index.ts
+++ b/src/components/customRecord/index.ts
@@ -1,6 +1,4 @@
-import { isQualifiedName } from 'typescript'
-
-const _app = getApp()
+const app = getApp();
// pages/story/a.ts
Component({
@@ -21,11 +19,11 @@ Component({
lifetimes: {
attached() {
- const recorderManager = wx.getRecorderManager()
+ const recorderManager = wx.getRecorderManager();
this.setData({
recorderManager,
- })
- this.recorderManagerListen(recorderManager)
+ });
+ this.recorderManagerListen(recorderManager);
},
},
/**
@@ -36,90 +34,154 @@ Component({
this.checkRecordPermission(() => {
this.setData({
startShow: true,
- })
- })
+ });
+ });
},
handleShow() {
- const { recorderManager } = this.data
+ const { recorderManager } = this.data;
this.setData({
show: true,
- })
+ });
recorderManager?.start({
- format: 'mp3',
- })
+ format: "mp3",
+ });
},
handleHide() {
- const { recorderManager } = this.data
- recorderManager?.stop()
+ const { recorderManager } = this.data;
+ recorderManager?.stop();
this.setData({
startShow: false,
show: false,
- })
+ });
},
recorderManagerListen(recorderManager: WechatMiniprogram.RecorderManager) {
recorderManager.onError(() => {
wx.showToast({
- title: '录音失败',
- icon: 'none',
- })
- })
+ title: "录音失败",
+ icon: "none",
+ });
+ });
recorderManager.onStart(() => {
- this.handleTiem()
- })
+ this.handleTiem();
+ });
recorderManager.onStop((res) => {
- this.handleHide()
- console.log(res)
- })
+ this.handleHide();
+ this.uploadFile({
+ fileType: "audio",
+ tempFilePath: res.tempFilePath,
+ size: res.fileSize,
+ duration: res.duration,
+ }).then((res) => {
+ this.triggerEvent("file", res as object);
+ });
+ });
},
checkRecordPermission(callback: () => void) {
wx.getSetting({
success(res) {
- if (!res.authSetting['scope.record']) {
+ if (!res.authSetting["scope.record"]) {
wx.authorize({
- scope: 'scope.record',
+ scope: "scope.record",
success() {
// 用户已同意授权
},
fail() {
// 用户拒绝了授权
wx.showModal({
- title: '提示',
- content: '需要获取录音权限,请点击确定进入设置页面进行授权。',
+ title: "提示",
+ content: "需要获取录音权限,请点击确定进入设置页面进行授权。",
showCancel: false,
success(res) {
if (res.confirm) {
wx.openSetting({
success(res) {
// 用户在设置页面设置了录音权限
- if (res.authSetting['scope.record']) {
+ if (res.authSetting["scope.record"]) {
// 用户在设置页面设置了录音权限
} else {
// 用户在设置页面未设置录音权限
}
},
- })
+ });
}
},
- })
+ });
},
- })
+ });
} else {
// 已经有录音权限
- callback()
+ callback();
}
},
- })
+ });
},
handleTiem() {
const time = setTimeout(() => {
- clearInterval(time)
- if (!this.data.show) return
+ clearInterval(time);
+ if (!this.data.show) return;
this.setData({
time: this.data.time + 1,
- })
- console.log(this.data.time)
- this.handleTiem()
- }, 1000)
+ });
+ this.handleTiem();
+ }, 1000);
+ },
+ uploadFile(item) {
+ wx.showLoading({
+ title: "正在上传",
+ });
+ return new Promise((resolve, reject) => {
+ let url = `${app.globalData.upFileUrl}?r=file-service/upload-`;
+ if (item.fileType === "image") {
+ url += "img";
+ } else if (item.fileType === "video") {
+ url += "video";
+ } else if (item.fileType === "audio") {
+ url += "audio";
+ } else {
+ url += "doc";
+ }
+ wx.uploadFile({
+ filePath: item.tempFilePath,
+ name: "file",
+ url,
+ success: (res) => {
+ wx.hideLoading();
+ const data = JSON.parse(res.data);
+ const expandJson = {
+ fileId: "",
+ name: data.data.Url,
+ size: (item.size / 1024).toFixed(2),
+ fileUrl: data.data.Url,
+ suffix: this.GetExtensionFileName(data.data.Url),
+ type: item.fileType,
+ imgUrl: "",
+ duration: "",
+ };
+ if (item.fileType === "image") {
+ expandJson.imgUrl = data.data.Url;
+ }
+ if (item.fileType === "video") {
+ expandJson.imgUrl = data.data.SnapshotUrl;
+ }
+ if (item.fileType === "audio") {
+ expandJson.duration = item.duration;
+ }
+ resolve(expandJson);
+ },
+ fail() {
+ wx.hideLoading();
+ reject(new Error("上传失败"));
+ },
+ });
+ });
+ },
+ GetExtensionFileName(pathfilename) {
+ const reg = /(\\+)/g;
+ const pString = pathfilename.replace(reg, "#"); //用正则表达式来将\或\\替换成#
+ const arr = pString.split("#"); // 以“#”为分隔符,将字符分解为数组 例如 D Program Files bg.png
+ const lastString = arr[arr.length - 1]; //取最后一个字符
+ const arr2 = lastString.split("."); // 再以"."作为分隔符
+ return arr2[arr2.length - 1]; //将后缀名返回出来
},
},
-})
+});
diff --git a/src/components/uploadFile/index.ts b/src/components/uploadFile/index.ts
index 0a23185..befd2b3 100644
--- a/src/components/uploadFile/index.ts
+++ b/src/components/uploadFile/index.ts
@@ -10,6 +10,14 @@ Component({
type: Boolean,
value: false,
},
+ accept: {
+ type: String,
+ value: "image",
+ },
+ obscure: {
+ type: Boolean,
+ value: false,
+ },
},
/**
@@ -30,9 +38,20 @@ Component({
return arr2[arr2.length - 1]; //将后缀名返回出来
},
handleAfterRead(e) {
- this.uploadFile(e.detail.file).then((res) => {
- this.triggerEvent("file", res as object);
- });
+ if (this.data.obscure) {
+ wx.editImage({
+ src: e.detail.file.url || e.detail.file.tempFilePath,
+ success: (res:any) => {
+ this.uploadFile(res.detail.file).then((res) => {
+ this.triggerEvent("file", res as object);
+ });
+ },
+ });
+ } else {
+ this.uploadFile(e.detail.file).then((res) => {
+ this.triggerEvent("file", res as object);
+ });
+ }
},
handleChooseAvatar(e) {
this.uploadFile({
diff --git a/src/components/uploadFile/index.wxml b/src/components/uploadFile/index.wxml
index 01e6525..f3ac8b0 100644
--- a/src/components/uploadFile/index.wxml
+++ b/src/components/uploadFile/index.wxml
@@ -1,6 +1,6 @@
-
+
diff --git a/src/images/empty-3.png b/src/images/empty-3.png
deleted file mode 100644
index fcfabff..0000000
Binary files a/src/images/empty-3.png and /dev/null differ
diff --git a/src/images/empty-4.png b/src/images/empty-4.png
deleted file mode 100644
index 5314d3f..0000000
Binary files a/src/images/empty-4.png and /dev/null differ
diff --git a/src/images/empty-5.png b/src/images/empty-5.png
deleted file mode 100644
index 54301b7..0000000
Binary files a/src/images/empty-5.png and /dev/null differ
diff --git a/src/images/new.png b/src/images/new.png
deleted file mode 100644
index 850916a..0000000
Binary files a/src/images/new.png and /dev/null differ
diff --git a/src/images/none_1.png b/src/images/none_1.png
deleted file mode 100644
index e0c650f..0000000
Binary files a/src/images/none_1.png and /dev/null differ
diff --git a/src/images/user.png b/src/images/user.png
index 35955fc..4ec6bcb 100644
Binary files a/src/images/user.png and b/src/images/user.png differ
diff --git a/src/module1/pages/entryCases/index.ts b/src/module1/pages/entryCases/index.ts
index ec09116..28df187 100644
--- a/src/module1/pages/entryCases/index.ts
+++ b/src/module1/pages/entryCases/index.ts
@@ -1,29 +1,66 @@
-const _app = getApp()
+const _app = getApp();
Page({
data: {
show1: false,
show2: false,
show3: false,
+
+ images: [] as any,
+ description: "",
+ audios: [] as any,
},
onLoad() {},
handleChooseFile() {
wx.chooseMessageFile({
count: 1,
success(res) {
- console.log(res)
+ console.log(res);
},
fail() {
wx.showToast({
- icon: 'none',
- title: '取消选择',
- })
+ icon: "none",
+ title: "取消选择",
+ });
},
- })
+ });
},
handleSubmit() {
wx.navigateTo({
- url: '/module1/pages/entryCasesResult/index',
- })
+ url: "/module1/pages/entryCasesResult/index",
+ });
+ },
+ handlePhoto(e) {
+ const detail = e.detail;
+ const images = this.data.images;
+ this.setData({
+ images: [
+ ...images,
+ {
+ name: detail.name,
+ url: detail.fileUrl,
+ isRepeat: 2,
+ },
+ ],
+ });
+ },
+ handleDelPhoto(e) {
+ const { index } = e.currentTarget.dataset;
+ this.setData({
+ images: this.data.images.filter((_, i) => i !== Number(index)),
+ });
+ },
+ handleAudio(e) {
+ this.setData({
+ audios: [
+ ...this.data.audios,
+ {
+ name: e.detail.name,
+ url: e.detail.fileUrl,
+ duration: e.detail.duration,
+ isRepeat: 2,
+ },
+ ],
+ });
},
-})
+});
diff --git a/src/module1/pages/entryCases/index.wxml b/src/module1/pages/entryCases/index.wxml
index 62efb6c..481935e 100644
--- a/src/module1/pages/entryCases/index.wxml
+++ b/src/module1/pages/entryCases/index.wxml
@@ -5,21 +5,17 @@
(0/9)
-
-
-
+
+
+
-
+
-
+
@@ -31,6 +27,7 @@
-
-
+
+
转文字
@@ -48,7 +45,7 @@
-
+
您也可以长按录入语音
diff --git a/src/module1/pages/loginProtool/index.scss b/src/module1/pages/loginProtool/index.scss
index dfb742d..9f9736e 100644
--- a/src/module1/pages/loginProtool/index.scss
+++ b/src/module1/pages/loginProtool/index.scss
@@ -31,13 +31,13 @@
box-shadow: 0 -10rpx 20rpx #ccc;
.cancel {
flex: 1;
- height: 88rpx;
+ height: 84rpx;
text-align: center;
- line-height: 88rpx;
+ line-height: 84rpx;
font-size: 32rpx;
color: rgba(1, 180, 197, 1);
border-radius: 96rpx 96rpx 96rpx 96rpx;
- border: 1rpx solid #01b4c5;
+ border: 1px solid #01b4c5;
}
.sure {
flex: 1;
diff --git a/src/module1/pages/loginProtool/index.ts b/src/module1/pages/loginProtool/index.ts
index f9e5080..7b2b8da 100644
--- a/src/module1/pages/loginProtool/index.ts
+++ b/src/module1/pages/loginProtool/index.ts
@@ -12,6 +12,11 @@ Page({
}
},
handleCancel() {
+ const pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。
+ const prevPage = pages[pages.length - 2];
+ prevPage.setData({
+ protool: false,
+ });
wx.navigateBack();
},
handleOk() {
@@ -20,7 +25,7 @@ Page({
prevPage.setData({
protool: true,
});
- this.handleCancel();
+ wx.navigateBack();
},
});
diff --git a/src/module1/pages/sHostipal/index.wxml b/src/module1/pages/sHostipal/index.wxml
index ff6c2d0..4095152 100644
--- a/src/module1/pages/sHostipal/index.wxml
+++ b/src/module1/pages/sHostipal/index.wxml
@@ -36,7 +36,7 @@
{{item.CityName}}{{item.CountyName}}{{item.Address}}
-
+
没有找到您搜索的医院哦!
提交新医院
diff --git a/src/module1/pages/setInfo/index.scss b/src/module1/pages/setInfo/index.scss
index 2d70d4c..2d2a4a5 100644
--- a/src/module1/pages/setInfo/index.scss
+++ b/src/module1/pages/setInfo/index.scss
@@ -20,12 +20,16 @@
.row {
padding: 32rpx 0;
display: flex;
+ align-items: top;
border-bottom: 1px solid rgba(224, 224, 224, 0.5);
+ line-height: 1;
.label {
+ padding-right: 10rpx;
flex-shrink: 0;
width: 5.5rem;
font-size: 32rpx;
color: rgba(133, 133, 133, 1);
+ line-height: 1;
&.required {
position: relative;
display: flex;
@@ -50,6 +54,8 @@
.content {
flex: 1;
.input {
+ padding: 0;
+ line-height: 1;
font-size: 32rpx;
color: #000;
}
@@ -126,7 +132,7 @@
display: flex;
flex-wrap: wrap;
justify-content: space-between;
- gap: 20rpx;
+ gap: 20rpx 10rpx;
.upload {
padding: 16rpx;
background: #f6f6f6;
@@ -172,18 +178,8 @@
justify-content: space-between;
background-color: #fff;
box-shadow: 0 -10rpx 20rpx rgba(0, 0, 0, 0.1);
- .cancel {
- width: 332rpx;
- height: 84rpx;
- text-align: center;
- line-height: 88rpx;
- font-size: 32rpx;
- color: rgba(1, 180, 197, 1);
- border-radius: 96rpx 96rpx 96rpx 96rpx;
- border: 1rpx solid #01b4c5;
- }
.submit {
- width: 330rpx;
+ flex: 1;
height: 88rpx;
text-align: center;
line-height: 88rpx;
diff --git a/src/module1/pages/setInfo/index.ts b/src/module1/pages/setInfo/index.ts
index 71c0a72..e79ee27 100644
--- a/src/module1/pages/setInfo/index.ts
+++ b/src/module1/pages/setInfo/index.ts
@@ -4,7 +4,7 @@ Page({
data: {
applyDoctorInfo: null,
applyHostipalInfo: null,
- invite: false,
+ inviteName: "",
DoctorLevel: {},
DoctorTitleType: {},
@@ -30,6 +30,10 @@ Page({
this.getApplyDoctor();
this.getLoastApplyHostipal();
this.getDoctorDict();
+ const doctorId = app.globalData.scene?.doctorId;
+ if (doctorId) {
+ this.getDoctorInfo(doctorId);
+ }
});
},
getApplyDoctor() {
@@ -55,6 +59,19 @@ Page({
}
});
},
+ getDoctorInfo(dId) {
+ wx.ajax({
+ method: "GET",
+ url: "?r=takeda/reg/doctor-info",
+ data: {
+ DoctorId: dId,
+ },
+ }).then((res) => {
+ this.setData({
+ inviteName: res.Name,
+ });
+ });
+ },
getLoastApplyHostipal() {
wx.ajax({
method: "GET",
diff --git a/src/module1/pages/setInfo/index.wxml b/src/module1/pages/setInfo/index.wxml
index 24d6760..8eaff26 100644
--- a/src/module1/pages/setInfo/index.wxml
+++ b/src/module1/pages/setInfo/index.wxml
@@ -3,7 +3,7 @@
style="background: url({{imageUrl}}set-info-bg.png?r={{Timestamp}}) no-repeat top center/100% 356rpx;"
>
- 刘玉医生为您的邀约医生
+ {{inviteName}}医生为您的邀约医生
您的姓名
@@ -97,7 +97,6 @@
diff --git a/src/module1/pages/setInfoResult/index.ts b/src/module1/pages/setInfoResult/index.ts
index 4c0c1db..9f137d4 100644
--- a/src/module1/pages/setInfoResult/index.ts
+++ b/src/module1/pages/setInfoResult/index.ts
@@ -7,12 +7,11 @@ Page({
codeUrl: "",
},
onLoad(options) {
- console.log("DEBUGPRINT[6]: index.ts:9: options=", options)
app.waitLogin(true).then(() => {
const { url, loginState } = app.globalData;
this.setData({
isFollow: Number(options.isf),
- InviteDoctorName: options.iname,
+ InviteDoctorName: options.iname === "null" ? "" : options.iname,
codeUrl: `${url}?r=takeda/common/get-channel-wx-code&ChannelType=2&loginState=${loginState}`,
});
if (!options.iname) {
diff --git a/src/module1/pages/setInfoResult/index.wxml b/src/module1/pages/setInfoResult/index.wxml
index c906ff7..cbf44a4 100644
--- a/src/module1/pages/setInfoResult/index.wxml
+++ b/src/module1/pages/setInfoResult/index.wxml
@@ -2,17 +2,18 @@
class="page"
style="background: url({{imageUrl}}invite-bg.png?r={{Timestamp}}) no-repeat top right/832rpx 1714rpx;padding-top:{{menuButtonInfo.bottom}}px;"
>
+
-
- 医院信息提交成功
+
+ 提交成功
已将信息提交给
- {{InviteDoctorName}}医生
+ 王大志医生
审核通过后,您可进入罕心守护项目
-
+
扫码关注公众号
获取审核通知
diff --git a/src/pages/cases/index.json b/src/pages/cases/index.json
index 1450d53..8815625 100644
--- a/src/pages/cases/index.json
+++ b/src/pages/cases/index.json
@@ -3,6 +3,8 @@
"navigationStyle": "default",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
- "van-popup": "@vant/weapp/popup/index"
+ "van-popup": "@vant/weapp/popup/index",
+ "pagination": "/components/pagination/index",
+ "van-cascader": "@vant/weapp/cascader/index"
}
}
diff --git a/src/pages/cases/index.scss b/src/pages/cases/index.scss
index 11e4483..b9fd10a 100644
--- a/src/pages/cases/index.scss
+++ b/src/pages/cases/index.scss
@@ -28,7 +28,7 @@ page {
width: 48rpx;
height: 8rpx;
border-radius: 8rpx 8rpx 0 0;
- content: '';
+ content: "";
background-color: rgba(0, 180, 197, 1);
}
}
@@ -56,10 +56,16 @@ page {
}
}
.form {
- margin: 32rpx 32rpx 0;
+ margin: 32rpx 32rpx;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 18rpx 28rpx;
+ overflow: hidden;
+ max-height: 400rpx;
+ &.fold {
+ max-height: 0;
+ margin: 0;
+ }
.row {
display: flex;
align-items: center;
@@ -90,6 +96,20 @@ page {
text-overflow: ellipsis;
}
}
+ .range {
+ display: flex;
+ align-items: center;
+ .date {
+ flex: 1;
+ .date-content {
+ text-align: center;
+ width: 3em;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+ }
}
}
.station {
@@ -157,7 +177,7 @@ page {
color: rgba(153, 153, 153, 1);
}
.list-item {
- padding-bottom: 16rpx;
+ margin-bottom: 24rpx;
position: relative;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #ffffff;
@@ -175,7 +195,7 @@ page {
align-items: center;
&::before {
flex-shrink: 0;
- content: '';
+ content: "";
width: 10rpx;
height: 40rpx;
background: #00b4c5;
@@ -430,8 +450,12 @@ page {
border: 2rpx solid #f8f9f9;
font-size: 32rx;
}
+ .sub-title {
+ padding: 32rpx 0 16rpx;
+ font-size: 32rpx;
+ color: #141515;
+ }
.tags {
- margin-top: 32rpx;
display: flex;
flex-wrap: wrap;
gap: 20rpx;
@@ -450,6 +474,11 @@ page {
color: rgba(1, 180, 197, 1);
}
}
+ &.tags1 {
+ .tag {
+ border-radius: 90rpx;
+ }
+ }
}
.submit {
margin-top: 32rpx;
diff --git a/src/pages/cases/index.ts b/src/pages/cases/index.ts
index 2fe8ba0..a00fb32 100644
--- a/src/pages/cases/index.ts
+++ b/src/pages/cases/index.ts
@@ -1,25 +1,385 @@
-const _app = getApp()
+const app = getApp();
Page({
data: {
+ fold: true,
+
show1: false,
show2: false,
show3: false,
+ showArea: false,
+ fieldNames: { text: "label", value: "value", children: "children" },
+
+ nav: "0",
+
+ area: [],
+ caseStatusList: {},
+ fileTypeList: {},
+ reasonList: {},
+
+ pagination: {
+ page: 1,
+ pages: 1,
+ count: 1,
+ },
+ list: [],
+
+ hostilatSearch: "",
+ hostipalList: [],
+ hospitalClassification: {},
+ hospitalLevel: {},
+ hostipalPagination: {
+ page: 1,
+ pages: 1,
+ count: 1,
+ },
+
+ deptList: [] as any,
+ labelList: [] as any,
+
+ caseStatusName: "全部",
+ hospitalName: "全部",
+ deptName: "全部",
+ provinceName: "",
+ cityName: "",
+ countyName: "",
+
+ search: "",
+ caseStatus: [] as any,
+ hospitalId: [] as any,
+ submitTimeBegin: "",
+ submitTimeEnd: "",
+ feedbackTimeBegin: "",
+ feedbackTimeEnd: "",
+ deptId: [] as any,
+ labelId: [] as any,
+ provinceId: "",
+ cityId: "",
+ countyId: "",
+ isReject: "",
+ isHighQuality: "",
+ isOpen: "",
+ needDeal: "",
+ orderType: "",
},
onLoad() {
this.getTabBar().setData({
active: 2,
- })
+ });
+
+ app.waitLogin().then(() => {
+ this.getBaseInfo();
+ this.getList();
+ this.getHospitalsList();
+ this.getHostipalDict();
+ this.getDoctorDict();
+ this.getArea();
+ });
+ },
+ getBaseInfo() {
+ wx.ajax({
+ method: "GET",
+ url: "?r=takeda/case/get-base-info",
+ data: {},
+ }).then((res) => {
+ this.setData({
+ caseStatusList: res.caseStatusList,
+ fileTypeList: res.fileTypeList,
+ reasonList: res.reasonList,
+ });
+ });
+ },
+ getArea() {
+ wx.ajax({
+ method: "GET",
+ url: "/js/area.json",
+ isJSON: true,
+ }).then((res) => {
+ this.setData({
+ area: res,
+ });
+ });
+ },
+ handleNav(e) {
+ const { nav } = e.currentTarget.dataset;
+ this.setData({
+ nav,
+ isOpen: nav === "1" ? "1" : "",
+ isHighQuality: nav === "2" ? "1" : "",
+ });
+ this.handleSearch();
+ },
+ getList(newPage = 1) {
+ wx.ajax({
+ method: "POST",
+ url: "?r=takeda/case/get-list",
+ data: {
+ page: newPage,
+ search: this.data.search,
+ caseStatus: this.data.caseStatus,
+ submitTimeBegin: this.data.submitTimeBegin,
+ submitTimeEnd: this.data.submitTimeEnd,
+ feedbackTimeBegin: this.data.feedbackTimeBegin,
+ feedbackTimeEnd: this.data.feedbackTimeEnd,
+ deptId: this.data.deptId,
+ labelId: this.data.labelId,
+ provinceId: this.data.provinceId,
+ cityId: this.data.cityId,
+ countyId: this.data.countyId,
+ hospitalId: this.data.hospitalId,
+ isReject: this.data.isReject,
+ isHighQuality: this.data.isHighQuality,
+ isOpen: this.data.isOpen,
+ needDeal: this.data.needDeal,
+ orderType: this.data.orderType,
+ },
+ }).then((res) => {
+ const list = res.page === 1 ? res.list : [...this.data.list, ...res.list];
+ this.setData({
+ list,
+ pagination: {
+ page: res.page,
+ pages: res.pages,
+ count: res.count,
+ },
+ });
+ });
+ },
+ onReachBottom() {
+ const { page, pages } = this.data.pagination;
+ if (pages > page) {
+ this.getList(page + 1);
+ }
+ },
+ handleSearch() {
+ this.getList();
+ },
+ handleCaseShow() {
+ this.setData({
+ show1: true,
+ });
+ },
+ handleCase(e) {
+ const { value } = e.currentTarget.dataset;
+ const { caseStatus, caseStatusList } = this.data;
+ if (!value) {
+ this.setData({
+ caseStatus: [],
+ caseStatusName: "全部",
+ });
+ return;
+ }
+ if (caseStatus.includes(value)) {
+ this.setData({
+ caseStatus: caseStatus.filter((item) => item !== value),
+ caseStatusName: caseStatus
+ .filter((item) => item !== value)
+ .map((item) => caseStatusList[item])
+ .join(","),
+ });
+ } else {
+ this.setData({
+ caseStatus: [...caseStatus, value],
+ caseStatusName: [...caseStatus, value].map((item) => caseStatusList[item]).join(","),
+ });
+ }
+ },
+ handleCaseSubmit() {
+ this.setData({
+ show1: false,
+ });
+ this.handleSearch();
+ },
+ onClose() {
+ this.setData({
+ show1: false,
+ show2: false,
+ show3: false,
+ showArea: false,
+ });
},
handleImagePreview(e) {
- const { url } = e.currentTarget.dataset
+ const { url } = e.currentTarget.dataset;
wx.previewImage({
urls: [url],
- })
+ });
},
- handleDetail(){
+ handleDetail() {
wx.navigateTo({
- url:"/module1/pages/casesDetail/index"
- })
- }
-})
+ url: "/module1/pages/casesDetail/index",
+ });
+ },
+
+ // 医院选择弹窗
+ handleHostipalShow() {
+ this.setData({
+ show2: true,
+ });
+ },
+ getHostipalDict() {
+ wx.ajax({
+ method: "GET",
+ url: "?r=takeda/reg/hospital-dict",
+ data: {},
+ }).then((res) => {
+ this.setData({
+ hospitalClassification: res.hospitalClassification,
+ hospitalLevel: res.hospitalLevel,
+ });
+ });
+ },
+ handleSearchHostipal() {
+ this.getHospitalsList();
+ },
+ getHospitalsList(newPage = 1) {
+ wx.ajax({
+ method: "GET",
+ url: "?r=takeda/reg/hospitals",
+ data: {
+ page: newPage,
+ Search: this.data.hostilatSearch,
+ },
+ }).then((res) => {
+ const hostipalList = res.page === 1 ? res.list : [...this.data.hostipalList, ...res.list];
+ this.setData({
+ hostipalList,
+ hostipalPagination: {
+ page: res.page,
+ pages: res.pages,
+ count: res.count,
+ },
+ });
+ });
+ },
+ handleHostipalBottom(e) {
+ const hostipalPagination = this.data.hostipalPagination;
+ if (e.detail.direction === "botttom" && hostipalPagination.page < hostipalPagination.pages) {
+ this.getHospitalsList(Number(hostipalPagination.page) + 1);
+ }
+ },
+ handleHostipal(e) {
+ const { params } = e.currentTarget.dataset;
+ this.setData({
+ show2: false,
+ hospitalId: this.data.hospitalId.includes(params.HospitalId) ? [] : [params.HospitalId],
+ hospitalName: this.data.hospitalId.includes(params.HospitalId) ? "全部" : params.Name,
+ });
+ },
+
+ getDoctorDict() {
+ wx.ajax({
+ method: "POST",
+ url: "?r=takeda/reg/doctor-dict",
+ data: {},
+ }).then((res) => {
+ this.setData({
+ deptList: res.DoctorSpecialtyLabel,
+ });
+ });
+ },
+ handleTagShow() {
+ this.setData({
+ show3: true,
+ });
+ },
+ handleDept(e) {
+ const { params } = e.currentTarget.dataset;
+ const deptId = this.data.deptId;
+ const newDeptId: any = deptId.includes(params.value)
+ ? deptId.filter((item) => item !== params.value)
+ : [...deptId, params.value];
+ const newDeptName = this.data.deptList
+ .filter((item) => newDeptId.includes(item.value))
+ .map((item) => item.label)
+ .join(",");
+ const labelList = this.data.deptList
+ .filter((item) => newDeptId.includes(item.value))
+ .reduce((pre, cur) => {
+ return [...pre, ...cur.options];
+ }, []);
+ this.setData({
+ deptId: newDeptId,
+ deptName: newDeptName || "全部",
+ labelList,
+ labelId: [],
+ });
+ },
+ handleLabel(e) {
+ const { params } = e.currentTarget.dataset;
+ const labelId = this.data.labelId;
+ const newDeptId = labelId.includes(params.value)
+ ? labelId.filter((item) => item !== params.value)
+ : [...labelId, ...params.value];
+ this.setData({
+ labelId: newDeptId,
+ });
+ },
+ handleTagSubmit() {
+ this.setData({
+ show3: false,
+ });
+ this.handleSearch();
+ },
+
+ handleArea() {
+ this.setData({
+ showArea: true,
+ });
+ },
+ onFinish(e: any) {
+ this.setData({
+ provinceId: e.detail.selectedOptions[0].value,
+ provinceName: e.detail.selectedOptions[0].label,
+ cityId: e.detail.selectedOptions[1].value,
+ cityName: e.detail.selectedOptions[1].label,
+ countyId: e.detail.selectedOptions[2].value,
+ countyName: e.detail.selectedOptions[2].label,
+ showArea: false,
+ });
+ this.handleSearch();
+ },
+
+ handleRadio(e) {
+ const { key } = e.currentTarget.dataset;
+ this.setData({
+ [key]: this.data[key] === "1" ? "" : "1",
+ });
+ this.handleSearch();
+ },
+ handleOrder(e) {
+ const { value } = e.currentTarget.dataset;
+ this.setData({
+ orderType: value,
+ });
+ this.handleSearch();
+ },
+ handleFold() {
+ this.setData({
+ fold: !this.data.fold,
+ });
+ },
+ handleDel(e) {
+ const { index } = e.currentTarget.dataset;
+ const params: any = this.data.list[index];
+ wx.showModal({
+ title: "确认删除该病历?",
+ success: (e) => {
+ if (e.confirm) {
+ wx.ajax({
+ method: "POST",
+ url: "?r=takeda/case/delete-case",
+ data: {
+ caseId: params.caseId,
+ },
+ }).then(() => {
+ this.setData({
+ list: this.data.list.filter((item: any) => item.caseId !== params.caseId),
+ });
+ });
+ }
+ },
+ });
+ },
+});
+
+export {};
diff --git a/src/pages/cases/index.wxml b/src/pages/cases/index.wxml
index ee59c7f..9276b45 100644
--- a/src/pages/cases/index.wxml
+++ b/src/pages/cases/index.wxml
@@ -1,168 +1,244 @@
+