tijiao
This commit is contained in:
@@ -197,54 +197,7 @@ export default {
|
||||
return {
|
||||
userMes: {},
|
||||
shengpiNumber: 0,
|
||||
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",
|
||||
},
|
||||
],
|
||||
pageList: [],
|
||||
infoShow: false, // 显示电子书相关
|
||||
aiVipLog: null,
|
||||
flag: null,
|
||||
@@ -256,15 +209,18 @@ export default {
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
uni.hideTabBar();
|
||||
this.getMedicalRecords();
|
||||
this.getMedicalRecordsCanCheck();
|
||||
|
||||
},
|
||||
//页面显示
|
||||
onShow() {
|
||||
async onShow() {
|
||||
if(uni.getStorageSync('medicalRecordsStatusId')){
|
||||
uni.removeStorageSync('medicalRecordsStatusId');
|
||||
}
|
||||
this.getShengpiNumber()
|
||||
|
||||
|
||||
await this.getShengpiNumber()
|
||||
await this.getMedicalRecords();
|
||||
await this.getMedicalRecordsCanCheck();
|
||||
this.getData();
|
||||
this.getVipData();
|
||||
},
|
||||
@@ -302,37 +258,76 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
getMedicalRecords() {
|
||||
if (this.userInfo.id != undefined) {
|
||||
this.$http
|
||||
.post("common/medicalRecords/getMedicalRecordsRoleByUser")
|
||||
.then((res) => {
|
||||
console.log("res at line 237:", res);
|
||||
if (res.code == 0 && res.roleFlag == 1) {
|
||||
this.pageList.splice(1, 0, {
|
||||
name: "我的医案",
|
||||
url: "/pages/medicalRecords/index",
|
||||
async getMedicalRecords() {
|
||||
this.pageList = [
|
||||
{
|
||||
name: "我的订单",
|
||||
url: "/pages/order/index",
|
||||
type: "pageJump",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getMedicalRecordsCanCheck() {
|
||||
{
|
||||
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",
|
||||
},
|
||||
];
|
||||
// 确保 userInfo.id 是有效的
|
||||
if (this.userInfo.id != undefined) {
|
||||
this.$http.post("common/medicalRecords/canCheck").then((res) => {
|
||||
console.log("res at line 237:", res);
|
||||
if (res.code == 0 && res.flag == true) {
|
||||
try {
|
||||
// 同时发送两个请求,使用 Promise.all 确保并行处理
|
||||
const [res1, res2] = await Promise.all([
|
||||
this.$http.post("common/medicalRecords/getMedicalRecordsRoleByUser"),
|
||||
this.$http.post("common/medicalRecords/canCheck")
|
||||
]);
|
||||
|
||||
this.pageList.splice(1, 0, {
|
||||
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() {
|
||||
this.$http
|
||||
|
||||
Reference in New Issue
Block a user