diff --git a/api/doctorAuth.js b/api/doctorAuth.js
index d8fdd21..903b640 100644
--- a/api/doctorAuth.js
+++ b/api/doctorAuth.js
@@ -51,3 +51,35 @@ export function switchDoctorWxAccount(payload) {
data: payload,
});
}
+
+export function getDoctorWxAuthConfig() {
+ return req.request({
+ url: `${AUTH_PREFIX}/config`,
+ method: 'GET',
+ header: { isToken: false },
+ });
+}
+
+export function doctorWxLoginByWechat(payload) {
+ return req.request({
+ url: `${AUTH_PREFIX}/wx-login`,
+ method: 'POST',
+ data: payload,
+ header: { isToken: false },
+ });
+}
+
+export function getDoctorWxBindStatus() {
+ return doctorAuthRequest({
+ url: '/wx-bind-status',
+ method: 'GET',
+ });
+}
+
+export function bindDoctorWxWechat(code) {
+ return doctorAuthRequest({
+ url: '/bind-wechat',
+ method: 'POST',
+ data: { code },
+ });
+}
diff --git a/api/reception.js b/api/reception.js
index c12b8c0..3ad3791 100644
--- a/api/reception.js
+++ b/api/reception.js
@@ -34,6 +34,15 @@ export function getAcceptingPatientList(data) {
})
}
+/** 工作台看板统计 */
+export function getWorkbenchStats(data) {
+ return req.request({
+ url: '/newApi/doctor-reception-wx/workbench-stats',
+ method: 'GET',
+ data
+ })
+}
+
// 获取患者详情(挂号维度的就诊信息,不含处方列表)
export function getPatientItem(id) {
return req.request({
@@ -43,6 +52,15 @@ export function getPatientItem(id) {
})
}
+/** 医生应用特色方到开方区 */
+export function applySpecialPrescriptionApi(data) {
+ return req.request({
+ url: '/newApi/doctor-reception-wx/apply-special-prescription',
+ method: 'POST',
+ data
+ })
+}
+
/** 常用回复模板(与 PC online-consultation/get-quick-reply-list 同源) */
export function getQuickReplyListApi() {
return req.request({
diff --git a/api/storeConsultation.js b/api/storeConsultation.js
new file mode 100644
index 0000000..e75e718
--- /dev/null
+++ b/api/storeConsultation.js
@@ -0,0 +1,10 @@
+import { req } from '@/common/js/index.js';
+
+/** 检查门店在线复诊配置(委托诊所 + 在线复诊医生) */
+export function checkOnlineConsultationConfigApi(data) {
+ return req.request({
+ url: '/newApi/doctor-reception-wx/check-online-consultation-config',
+ method: 'GET',
+ data,
+ });
+}
diff --git a/common/js/index.js b/common/js/index.js
index 4b45c8b..7028e0f 100644
--- a/common/js/index.js
+++ b/common/js/index.js
@@ -2,6 +2,7 @@ import Request from './request.js';
import errorCode from './errorCode.js';
import {Base64} from "js-base64";
import { getDoctorWxEnv } from '@/config/app-env.js';
+import { resolveDoctorWxAuthToken } from '@/utils/doctorWxAuthToken.js';
const { legacyApiBase } = getDoctorWxEnv();
@@ -66,22 +67,9 @@ const reqInterceptor = async (options) => {
const loginMode = uni.getStorageSync('loginMode')
if (!skipToken) {
if (isDoctorWxAuthReq) {
- if (loginMode === 'platform_admin' && platformToken) {
- options.header['authorization'] = `Bearer ${platformToken}`
- } else if (loginMode === 'salesperson' && salespersonToken) {
- options.header['authorization'] = `Bearer ${salespersonToken}`
- } else if (loginMode === 'clinic_salesperson' && clinicSalespersonToken) {
- options.header['authorization'] = `Bearer ${clinicSalespersonToken}`
- } else if (loginMode === 'clinic_admin' && clinicToken) {
- options.header['authorization'] = `Bearer ${clinicToken}`
- } else if (doctorToken) {
- options.header['authorization'] = `Bearer ${doctorToken}`
- } else if (platformToken) {
- options.header['authorization'] = `Bearer ${platformToken}`
- } else if (salespersonToken) {
- options.header['authorization'] = `Bearer ${salespersonToken}`
- } else if (clinicToken) {
- options.header['authorization'] = `Bearer ${clinicToken}`
+ const authToken = resolveDoctorWxAuthToken()
+ if (authToken) {
+ options.header['authorization'] = `Bearer ${authToken}`
}
} else if (isPlatformAdminReq && platformToken) {
options.header['authorization'] = `Bearer ${platformToken}`
diff --git a/components/account-switch/account-switch-entry.vue b/components/account-switch/account-switch-entry.vue
index 3b57a09..54d8506 100644
--- a/components/account-switch/account-switch-entry.vue
+++ b/components/account-switch/account-switch-entry.vue
@@ -55,6 +55,7 @@ export default {
async onSwitched(result) {
saveLoginSession(result);
await fetchProfileAfterLogin(result);
+ uni.$emit('login-account-switched');
this.$toast('切换成功');
setTimeout(() => {
navigateAfterLogin(result);
diff --git a/components/d-top-message/d-top-message.vue b/components/d-top-message/d-top-message.vue
new file mode 100644
index 0000000..c0c54f7
--- /dev/null
+++ b/components/d-top-message/d-top-message.vue
@@ -0,0 +1,122 @@
+
+
+
+ {{ text }}
+
+
+
+
+
+
diff --git a/components/doctor-login/doctor-login.vue b/components/doctor-login/doctor-login.vue
index 5af8065..10a220b 100644
--- a/components/doctor-login/doctor-login.vue
+++ b/components/doctor-login/doctor-login.vue
@@ -73,14 +73,44 @@
登录
+
+
+
+ 微信一键登录
+
+
+
+
+ 服务协议和隐私政策
+
+ 请您在使用前仔细阅读并同意
+ 《用户服务协议》
+ 和
+ 《隐私权政策》
+ 。
+
+
+
+
+
+
+
diff --git a/pages.json b/pages.json
index 9e66b96..947d5a0 100644
--- a/pages.json
+++ b/pages.json
@@ -26,6 +26,9 @@
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark",
"backgroundColor": "#f7f8fa"
+ },
+ "usingComponents": {
+ "d-top-message": "/components/d-top-message/d-top-message"
}
},
{
diff --git a/pages/login/index.vue b/pages/login/index.vue
index f84adea..c1cd878 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -24,6 +24,7 @@ export default {
},
onShow() {
if (this.pendingAccountSelect) return;
+ this.$refs.doctorLogin?.loadWxConfig?.();
redirectIfLoggedIn();
},
methods: {
diff --git a/pages/my/index.vue b/pages/my/index.vue
index c1bdbe2..df293e3 100644
--- a/pages/my/index.vue
+++ b/pages/my/index.vue
@@ -53,6 +53,9 @@
+
+
+
@@ -61,10 +64,18 @@
+
+
+
+
+
+ 退出登录
-
+
@@ -73,16 +84,21 @@