tijiao
This commit is contained in:
@@ -197,54 +197,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
userMes: {},
|
userMes: {},
|
||||||
shengpiNumber: 0,
|
shengpiNumber: 0,
|
||||||
pageList: [
|
pageList: [],
|
||||||
// {
|
|
||||||
// name: "我的病历夹",
|
|
||||||
// url: "/pages/folder/index",
|
|
||||||
// type: "pageJump",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "会话记录",
|
|
||||||
// url: "/pages/my/recordsList",
|
|
||||||
// type: "pageJump",
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
name: "我的订单",
|
|
||||||
url: "/pages/order/index",
|
|
||||||
type: "pageJump",
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// name: "我的文章",
|
|
||||||
// url: "/pages/articleList/index",
|
|
||||||
// type: "pageJump"
|
|
||||||
// },
|
|
||||||
|
|
||||||
// {
|
|
||||||
// name: "待审核医案",
|
|
||||||
// url: "/pages/medicalRecords/PendingApprovalIndex",
|
|
||||||
// type: "pageJump"
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
name: "我的课程",
|
|
||||||
url: "/pages/curriculum/index/index",
|
|
||||||
type: "pageJump",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "个人资料",
|
|
||||||
url: "/pages/my/persData",
|
|
||||||
type: "pageJump",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "关于我们",
|
|
||||||
url: "/pages/my/aboutUs",
|
|
||||||
type: "pageJump",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "问题反馈/申诉",
|
|
||||||
url: "/pages/user/workOrder",
|
|
||||||
type: "pageJump",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
infoShow: false, // 显示电子书相关
|
infoShow: false, // 显示电子书相关
|
||||||
aiVipLog: null,
|
aiVipLog: null,
|
||||||
flag: null,
|
flag: null,
|
||||||
@@ -256,15 +209,18 @@ export default {
|
|||||||
//第一次加载
|
//第一次加载
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
this.getMedicalRecords();
|
|
||||||
this.getMedicalRecordsCanCheck();
|
|
||||||
},
|
},
|
||||||
//页面显示
|
//页面显示
|
||||||
onShow() {
|
async onShow() {
|
||||||
if(uni.getStorageSync('medicalRecordsStatusId')){
|
if(uni.getStorageSync('medicalRecordsStatusId')){
|
||||||
uni.removeStorageSync('medicalRecordsStatusId');
|
uni.removeStorageSync('medicalRecordsStatusId');
|
||||||
}
|
}
|
||||||
this.getShengpiNumber()
|
|
||||||
|
|
||||||
|
await this.getShengpiNumber()
|
||||||
|
await this.getMedicalRecords();
|
||||||
|
await this.getMedicalRecordsCanCheck();
|
||||||
this.getData();
|
this.getData();
|
||||||
this.getVipData();
|
this.getVipData();
|
||||||
},
|
},
|
||||||
@@ -302,37 +258,76 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getMedicalRecords() {
|
async getMedicalRecords() {
|
||||||
if (this.userInfo.id != undefined) {
|
this.pageList = [
|
||||||
this.$http
|
{
|
||||||
.post("common/medicalRecords/getMedicalRecordsRoleByUser")
|
name: "我的订单",
|
||||||
.then((res) => {
|
url: "/pages/order/index",
|
||||||
console.log("res at line 237:", res);
|
type: "pageJump",
|
||||||
if (res.code == 0 && res.roleFlag == 1) {
|
},
|
||||||
this.pageList.splice(1, 0, {
|
{
|
||||||
name: "我的医案",
|
name: "我的课程",
|
||||||
url: "/pages/medicalRecords/index",
|
url: "/pages/curriculum/index/index",
|
||||||
type: "pageJump",
|
type: "pageJump",
|
||||||
});
|
},
|
||||||
}
|
{
|
||||||
});
|
name: "个人资料",
|
||||||
}
|
url: "/pages/my/persData",
|
||||||
},
|
type: "pageJump",
|
||||||
getMedicalRecordsCanCheck() {
|
},
|
||||||
if (this.userInfo.id != undefined) {
|
{
|
||||||
this.$http.post("common/medicalRecords/canCheck").then((res) => {
|
name: "关于我们",
|
||||||
console.log("res at line 237:", res);
|
url: "/pages/my/aboutUs",
|
||||||
if (res.code == 0 && res.flag == true) {
|
type: "pageJump",
|
||||||
|
},
|
||||||
this.pageList.splice(1, 0, {
|
{
|
||||||
name: "待审批医案",
|
name: "问题反馈/申诉",
|
||||||
url: "/pages/medicalRecords/PendingApprovalIndex",
|
url: "/pages/user/workOrder",
|
||||||
type: "pageJump",
|
type: "pageJump",
|
||||||
contentType: "shengpi",
|
},
|
||||||
});
|
];
|
||||||
}
|
// 确保 userInfo.id 是有效的
|
||||||
|
if (this.userInfo.id != undefined) {
|
||||||
|
try {
|
||||||
|
// 同时发送两个请求,使用 Promise.all 确保并行处理
|
||||||
|
const [res1, res2] = await Promise.all([
|
||||||
|
this.$http.post("common/medicalRecords/getMedicalRecordsRoleByUser"),
|
||||||
|
this.$http.post("common/medicalRecords/canCheck")
|
||||||
|
]);
|
||||||
|
|
||||||
|
console.log("res1 at line 237:", res1);
|
||||||
|
console.log("res2 at line 237:", res2);
|
||||||
|
|
||||||
|
// 在所有请求完成后根据返回结果更新 pageList
|
||||||
|
|
||||||
|
|
||||||
|
if (res2.code == 0 && res2.flag == true) {
|
||||||
|
this.pageList.splice(2, 0, {
|
||||||
|
name: "待审批医案",
|
||||||
|
url: "/pages/medicalRecords/PendingApprovalIndex",
|
||||||
|
type: "pageJump",
|
||||||
|
contentType: "shengpi",
|
||||||
|
});
|
||||||
|
} if (res1.code == 0 && res1.roleFlag == 1) {
|
||||||
|
this.pageList.splice(2, 0, {
|
||||||
|
name: "我的医案",
|
||||||
|
url: "/pages/medicalRecords/index",
|
||||||
|
type: "pageJump",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 在两个请求都成功后更新 pageList
|
||||||
|
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error fetching data:", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
,
|
||||||
|
getMedicalRecordsCanCheck() {
|
||||||
|
|
||||||
},
|
},
|
||||||
getShengpiNumber() {
|
getShengpiNumber() {
|
||||||
this.$http
|
this.$http
|
||||||
|
|||||||
Reference in New Issue
Block a user