fix: 修复患者就诊历史
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getseesionDoctorList
|
||||
} from '../../request/api/api'
|
||||
getDoctorNewsApi
|
||||
} from '../../request/api/systemNotice'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -38,15 +38,17 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
goInfo() {
|
||||
getseesionDoctorList({
|
||||
method: "get",
|
||||
data: {
|
||||
async goInfo() {
|
||||
try {
|
||||
const res = await getDoctorNewsApi({
|
||||
store_id: uni.getStorageSync('store_id') || 11001
|
||||
})
|
||||
if (res.data && res.data.result && res.data.result.items) {
|
||||
this.list = res.data.result.items
|
||||
}
|
||||
}).then((res) => {
|
||||
this.list = res.data.data.list
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('获取医生消息失败:', error)
|
||||
}
|
||||
},
|
||||
toInfo(e) {
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -150,9 +150,9 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getseesionInfo,
|
||||
getseesionRead
|
||||
} from '../../request/api/api'
|
||||
import {getSystemNoticeIndexApi} from '../../request/api/systemNotice'
|
||||
import {getChatFriendsListApi} from "@/request/api/im";
|
||||
import {checkDev} from "@/utils/utils";
|
||||
|
||||
@@ -254,18 +254,19 @@ export default {
|
||||
// })
|
||||
},
|
||||
//
|
||||
getInfo() {
|
||||
getseesionInfo({
|
||||
method: "get",
|
||||
data: {
|
||||
async getInfo() {
|
||||
try {
|
||||
const res = await getSystemNoticeIndexApi({
|
||||
store_id: uni.getStorageSync('store_id') || 11001,
|
||||
})
|
||||
if (res.data && res.data.result) {
|
||||
this.order = res.data.result.order
|
||||
this.system = res.data.result.system
|
||||
this.doctor = res.data.result.doctor_news
|
||||
}
|
||||
}).then((res) => {
|
||||
// console.log(res, 'info');
|
||||
this.order = res.data.data.order
|
||||
this.system = res.data.data.system
|
||||
this.doctor = res.data.data.doctor_news
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('获取消息概览失败:', error)
|
||||
}
|
||||
},
|
||||
getMyChatFriendsList() {
|
||||
getChatFriendsListApi().then((res) => {
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getseesionOrder
|
||||
} from '../../request/api/api'
|
||||
getOrderNoticeApi
|
||||
} from '../../request/api/systemNotice'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -35,16 +35,17 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
goInfo() {
|
||||
getseesionOrder({
|
||||
method: "get",
|
||||
data: {
|
||||
async goInfo() {
|
||||
try {
|
||||
const res = await getOrderNoticeApi({
|
||||
store_id: uni.getStorageSync('store_id') || 11001
|
||||
})
|
||||
if (res.data && res.data.result && res.data.result.items) {
|
||||
this.list = res.data.result.items
|
||||
}
|
||||
}).then((res) => {
|
||||
// console.log(res, 'res');
|
||||
this.list = res.data.data.list
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('获取订单消息失败:', error)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getseesionSystem
|
||||
} from '../../request/api/api'
|
||||
getSystemNoticeListApi
|
||||
} from '../../request/api/systemNotice'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -32,16 +32,17 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
goInfo() {
|
||||
getseesionSystem({
|
||||
method: "get",
|
||||
data: {
|
||||
async goInfo() {
|
||||
try {
|
||||
const res = await getSystemNoticeListApi({
|
||||
store_id: uni.getStorageSync('store_id') || 11001
|
||||
})
|
||||
if (res.data && res.data.result && res.data.result.items) {
|
||||
this.list = res.data.result.items
|
||||
}
|
||||
}).then((res) => {
|
||||
// console.log(res, 'res');
|
||||
this.list = res.data.data.list
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('获取系统消息失败:', error)
|
||||
}
|
||||
},
|
||||
next(type,id,data){
|
||||
// if(type==7&&id){
|
||||
|
||||
@@ -77,6 +77,10 @@ function request(url, params, method = 0) {
|
||||
if (res.data?.data != null) {
|
||||
res.data.data = getRes(res.data.data)
|
||||
}
|
||||
// 处理 xkApi 返回的 result 格式
|
||||
if (res.data?.result != null) {
|
||||
res.data.result = getRes(res.data.result)
|
||||
}
|
||||
resolve(res)
|
||||
},
|
||||
// 失败钩子
|
||||
|
||||
49
request/api/systemNotice.js
Normal file
49
request/api/systemNotice.js
Normal file
@@ -0,0 +1,49 @@
|
||||
import {get, post} from './http'
|
||||
|
||||
const prefix = '/system-notice'
|
||||
|
||||
/**
|
||||
* 获取通知概览(各类通知未读数量)
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function getSystemNoticeIndexApi(params) {
|
||||
return await get(`${prefix}/index`, params, 3)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单消息列表
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function getOrderNoticeApi(params) {
|
||||
return await get(`${prefix}/order`, params, 3)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统消息列表
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function getSystemNoticeListApi(params) {
|
||||
return await get(`${prefix}/system`, params, 3)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取医生群发消息列表
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function getDoctorNewsApi(params) {
|
||||
return await get(`${prefix}/doctor-news`, params, 3)
|
||||
}
|
||||
|
||||
/**
|
||||
* 标记医生消息为已读
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function readDoctorNewsApi(params) {
|
||||
return await post(`${prefix}/read-doctor-news`, params, 3)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user