fix: 修复患者就诊历史

This commit is contained in:
2025-12-24 16:19:14 +08:00
parent 69acd7a4bb
commit d9ec5c88be
3 changed files with 24 additions and 7 deletions

View File

@@ -249,6 +249,7 @@ import {
} from '../../request/api/api'
import { getPlatformQualificationsApi } from '../../request/api/platform'
import { getStoreDrugListBySalespersonApi, getHomeTopProductsApi, getHomeZonesApi } from "@/request/api/product";
import request from "@/request/api/request";
export default {
data() {
@@ -271,7 +272,8 @@ export default {
list: [],
info: [],
bgShow: false,
isShow_envVersion: true
isShow_envVersion: true,
defaultDoctorId: '39' // 默认医生ID从API获取
}
},
onLoad() {
@@ -319,7 +321,7 @@ export default {
golist(type) {
if (type === 3) {
return uni.navigateTo({
url: '/subPackages/product/product?doctor_id=' + 39 + '&register_type=3'
url: '/subPackages/product/product?doctor_id=' + this.defaultDoctorId + '&register_type=3'
})
}
uni.navigateTo({
@@ -583,7 +585,7 @@ export default {
// 直接购买
buyProduct(item) {
uni.navigateTo({
url: `/subPackages/product/product?doctor_id=39&register_type=3`
url: `/subPackages/product/product?doctor_id=${this.defaultDoctorId}&register_type=3`
});
},
// 预览资质证明
@@ -600,6 +602,20 @@ export default {
uni.navigateTo({
url: '/pages/index/platform-info'
});
},
// 获取默认医生ID
async getDefaultDoctorId() {
try {
const res = await request('/xkApi/online-consultation/get-default-doctor-id', {
method: 'GET'
}, 0);
if (res.data && res.data.result && res.data.result.doctor_id) {
this.defaultDoctorId = res.data.result.doctor_id;
}
} catch (error) {
console.error('获取默认医生ID失败:', error);
// 如果接口失败保持默认值39
}
}
},
mounted() {
@@ -623,6 +639,7 @@ export default {
this.getHomeTopProducts(); // 获取首页热销商品
this.getPlatformQualifications(); // 获取平台资质证明
this.getHomeZones(); // 获取首页专区入口
this.getDefaultDoctorId(); // 获取默认医生ID
},
}
</script>

View File

@@ -27,8 +27,8 @@ function request(url, params, method = 0) {
if (url.split('/').indexOf('imApi') !== -1) {
// baseURL = "http://127.0.0.1:12080/api"
// baseURL = isDev === true? 'http://127.0.0.1:12080/api': "http://im.xiaokang88.com/api"
// baseURL = isDev === true? 'http://127.0.0.1:12080/api': "https://api.ws.g.xiaokang88.com/api"
baseURL = "https://api.ws.g.xiaokang88.com/api"
baseURL = isDev === true? 'http://127.0.0.1:12080/api': "https://api.ws.g.xiaokang88.com/api"
// baseURL = "https://api.ws.g.xiaokang88.com/api"
}
if (url.split('/').indexOf('newApi') !== -1) {
baseURL = isDev === true? 'http://127.0.0.1:18018/member': "https://shop.xiaokang88.com/member"

View File

@@ -204,5 +204,5 @@ export class WebSocketManager {
}
// 全局WebSocket实例
// export const webSocketManager = new WebSocketManager('ws://127.0.0.1:12080/ws');
export const webSocketManager = new WebSocketManager('wss://api.ws.g.xiaokang88.com/ws');
export const webSocketManager = new WebSocketManager('ws://127.0.0.1:12080/ws');
// export const webSocketManager = new WebSocketManager('wss://api.ws.g.xiaokang88.com/ws');