From cda63b5ae26ae0ffd6efdcbdf1b05b60843313ad Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 16 Mar 2026 15:08:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TUICallKit-Vue3/App.vue | 5 +- TUICallKit-Vue3/TUIKit/pages/chat/chat.vue | 6 +- .../doctor/pages/doctor/doctor.vue | 649 +++++++++++++ TUICallKit-Vue3/main.js | 35 + TUICallKit-Vue3/pages.json | 15 +- TUICallKit-Vue3/pages/Card/Card.vue | 45 +- TUICallKit-Vue3/pages/Card/edit_card.vue | 51 +- TUICallKit-Vue3/pages/index/index.vue | 906 ++++++++++-------- TUICallKit-Vue3/pages/index/video.vue | 11 +- TUICallKit-Vue3/pages/login/login.vue | 21 +- TUICallKit-Vue3/pages/order/monad/monad.vue | 42 +- TUICallKit-Vue3/pages/order/order.vue | 25 +- TUICallKit-Vue3/static/user/home.png | Bin 7581 -> 4443 bytes TUICallKit-Vue3/static/user/home_no.png | Bin 7648 -> 4687 bytes TUICallKit-Vue3/static/user/user.png | Bin 7767 -> 6915 bytes TUICallKit-Vue3/static/user/user_no.png | Bin 7821 -> 7165 bytes TUICallKit-Vue3/utils/api.js | 6 +- admin/src/views/consumer/doctor/edit.vue | 43 + admin/src/views/tcm/appointment/list.vue | 70 +- server/app/adminapi/logic/auth/AdminLogic.php | 9 + .../app/adminapi/logic/tcm/DiagnosisLogic.php | 69 ++ .../app/api/controller/DoctorController.php | 20 +- server/app/api/controller/TcmController.php | 68 ++ server/app/api/logic/DoctorLogic.php | 83 +- server/app/api/logic/UserLogic.php | 1 + server/sql/add_doctor_consult_fields.sql | 7 + 26 files changed, 1695 insertions(+), 492 deletions(-) create mode 100644 TUICallKit-Vue3/doctor/pages/doctor/doctor.vue create mode 100644 server/sql/add_doctor_consult_fields.sql diff --git a/TUICallKit-Vue3/App.vue b/TUICallKit-Vue3/App.vue index 0c99eea9..93859e52 100644 --- a/TUICallKit-Vue3/App.vue +++ b/TUICallKit-Vue3/App.vue @@ -67,10 +67,11 @@ const userinfo = async (code) => { wxcode(code) } - if(res.code==1){ + uni.setStorageSync('userData', res.data) + if(res.code==1 && res.data.diagnosis){ video(res.data) } - uni.setStorageSync('userData', res.data) + } catch (err) { diff --git a/TUICallKit-Vue3/TUIKit/pages/chat/chat.vue b/TUICallKit-Vue3/TUIKit/pages/chat/chat.vue index 19af35d2..106e85f8 100644 --- a/TUICallKit-Vue3/TUIKit/pages/chat/chat.vue +++ b/TUICallKit-Vue3/TUIKit/pages/chat/chat.vue @@ -166,7 +166,7 @@ const SDKAppID = app.globalData.SDKAppID || options.SDKAppID; targetUserID = options.targetUserID; currentUserID = userID; // 保存当前用户ID - + console.log('-------',userID,userSig,SDKAppID) // 获取用户头像 const userData = uni.getStorageSync('userData'); if (userData && userData.avatar) { @@ -180,7 +180,7 @@ } conversationID = `C2C${targetUserID}`; - console.log('当前用户:', currentUserID, '对方用户:', targetUserID); + console.log('当前用户:', currentUserID, '对方用户:', targetUserID,'conversationID'+conversationID); if (!app.globalData.imChat) { chat = TencentCloudChat.create({ @@ -212,7 +212,7 @@ } await loadHistoryMessages(); - uni.showToast({ title: '聊天已就绪', icon: 'success' }); + //uni.showToast({ title: '聊天已就绪', icon: 'success' }); // 监听键盘高度变化 uni.onKeyboardHeightChange((res) => { diff --git a/TUICallKit-Vue3/doctor/pages/doctor/doctor.vue b/TUICallKit-Vue3/doctor/pages/doctor/doctor.vue new file mode 100644 index 00000000..c0d4a402 --- /dev/null +++ b/TUICallKit-Vue3/doctor/pages/doctor/doctor.vue @@ -0,0 +1,649 @@ + + + + + diff --git a/TUICallKit-Vue3/main.js b/TUICallKit-Vue3/main.js index ccc5335d..8f880e54 100644 --- a/TUICallKit-Vue3/main.js +++ b/TUICallKit-Vue3/main.js @@ -116,12 +116,47 @@ function apiUrl(promise, Loading = true) { }) } +/** + * 解析页面参数(支持普通参数和扫码 scene 参数) + * @param {Object} options - 页面 options,如 getCurrentPages()[].options + * @returns {Object} 解析后的参数对象 + */ +function parsePageParams(options) { + const params = {} + if (!options) return params + + // 如果有 scene 参数(扫码进入),解析 scene + if (options.scene) { + try { + const decodedScene = decodeURIComponent(options.scene) + decodedScene.split('&').forEach(item => { + const [key, value] = item.split('=') + if (key && value) { + params[key] = value + } + }) + } catch (error) { + console.error('解析scene参数失败:', error) + } + } + + // 合并普通参数(普通跳转进入) + Object.keys(options).forEach(key => { + if (key !== 'scene' && options[key]) { + params[key] = options[key] + } + }) + + return params +} + export function createApp() { const app = createSSRApp(App) // Vue3挂载全局属性的方式 app.config.globalProperties.$url = baseUrl app.config.globalProperties.apiUrl = apiUrl + app.config.globalProperties.$parsePageParams = parsePageParams return { app diff --git a/TUICallKit-Vue3/pages.json b/TUICallKit-Vue3/pages.json index 98bea226..f36dc013 100644 --- a/TUICallKit-Vue3/pages.json +++ b/TUICallKit-Vue3/pages.json @@ -80,11 +80,22 @@ } } ] + }, + { + "root": "doctor", + "pages": [ + { + "path": "pages/doctor/doctor", + "style": { + "navigationBarTitleText": "医生信息" + } + } + ] } ], "tabBar": { - "color": "#7A7E83", - "selectedColor": "#FFA500", + "color": "#8a8a8a", + "selectedColor": "#204e2b", "borderStyle": "black", "backgroundColor": "#ffffff", "list": [{ diff --git a/TUICallKit-Vue3/pages/Card/Card.vue b/TUICallKit-Vue3/pages/Card/Card.vue index 37b65097..d5662e8c 100644 --- a/TUICallKit-Vue3/pages/Card/Card.vue +++ b/TUICallKit-Vue3/pages/Card/Card.vue @@ -1,9 +1,7 @@