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 @@
+
+
+
+
+ 加载中...
+
+
+
+
+
+
+
+
+
+ {{ doctor.title || '主任医师' }}
+
+
+ {{ doctor.name }}
+ {{ doctor.hospital || '甄养堂医院' }}
+
+ ✓
+ {{ doctor.experience || '24年临床经验' }}
+
+
+
+ {{ doctor.rating || '4.9' }}
+ 评分
+
+
+
+ {{ formatPatientCount(doctor.patient_count) }}
+ 患者数
+
+
+
+ 执业证书编号
+ {{doctor.license_no}}
+
+
+
+
+
+
+
+
+
+ 擅长领域
+
+
+ {{ doctor.about || '擅长运用传统中医理论与现代诊断相结合...' }}
+
+
+
+
+
+ 专业领域
+
+
+
+ {{ getExpertiseIcon(item.icon) }}
+
+
+ {{ item.title }}
+ {{ item.desc }}
+
+
+
+
+
+
+
+
+
+
+
+ "{{ review.content }}"
+
+
+
+
+
+
+
+ {{ error }}
+ 重试
+
+
+
+
+
+ 💬
+ 图文问诊
+
+
+ 📹
+ 视频问诊
+
+
+
+
+
+
+
+
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 @@
-
+
@@ -61,6 +59,7 @@
暂无就诊卡
+ 新建就诊卡
@@ -73,7 +72,7 @@
diff --git a/TUICallKit-Vue3/pages/index/video.vue b/TUICallKit-Vue3/pages/index/video.vue
index d3970a4a..dba12e0c 100644
--- a/TUICallKit-Vue3/pages/index/video.vue
+++ b/TUICallKit-Vue3/pages/index/video.vue
@@ -64,15 +64,17 @@ import { ref,onMounted,getCurrentInstance} from "vue";
const { proxy } = getCurrentInstance()
import * as GenerateTestUserSig from "@/debug/GenerateTestUserSig-es.js";
import { CallManager } from "@/TUICallKit/src/TUICallService/serve/callManager";
+import { onLaunch, onShow, onHide, onError ,onShareAppMessage} from '@dcloudio/uni-app'
let userID = ref("4");
let avatarUrl = ref(""); // 声明为响应式变量
uni.CallManager = new CallManager();
-onMounted(() => {
+onLaunch(() => {
uni.login({
provider: 'weixin',
success: function (loginRes) {
-
+
+
wxcode(loginRes.code)
// 获取用户信息
@@ -105,7 +107,8 @@ onShareAppMessage((res) =>{
});
const wxcode = async (code) => {
-
+
+ return
try {
// 通过 proxy 调用全局的 apiUrl
const res = await proxy.apiUrl({
@@ -115,7 +118,7 @@ const wxcode = async (code) => {
code: code
},
}, false) // 不显示加载中
-
+
loginHandler(res.data.diagnosis.patient_id)
} catch (err) {
uni.showToast({ title: '请求失败', icon: 'none' })
diff --git a/TUICallKit-Vue3/pages/login/login.vue b/TUICallKit-Vue3/pages/login/login.vue
index d07889d6..4c5ef91f 100644
--- a/TUICallKit-Vue3/pages/login/login.vue
+++ b/TUICallKit-Vue3/pages/login/login.vue
@@ -50,16 +50,17 @@