diff --git a/api/index.js b/api/index.js index c103db6..b383b75 100644 --- a/api/index.js +++ b/api/index.js @@ -16,7 +16,8 @@ const API = { getLbtList:data => net.GET("/banner/list",data),// 获取轮播图 hospital:data => net.PUT("/user/hospital",data),// 修改医院信息 getHospitalInfo:id => net.GET("/hospital/"+id),// 根据ID获取医院信息 - getTodoist:data => net.GET("/user/todo",data),// 获取待办事项 + getHospitalInfo2:data => net.GET("/hospital/notes",data),// 根据ID获取医院信息222 + getTodoist:(data,userId) => net.GET("/user/todo",data,true,{"userId":userId}),// 获取待办事项 getVisionList:data => net.GET("/vision/list",data),// 获取测试记录 todoFinished:data => net.PUT("/user/todo",data),// 修改待办列表状态 // 百科 diff --git a/config/index.js b/config/index.js index fe68f91..d60408d 100644 --- a/config/index.js +++ b/config/index.js @@ -1,6 +1,7 @@ // isdev 为 true 表示开发环境 false 表示发布环境 const isdev = true; const baseUrl = isdev ? 'https://api.jimingyiliao.com' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境 +// const baseUrl = isdev ? 'http://707788f2.r1.cpolar.top' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境 // const baseUrl = isdev ? 'http://192.168.1.133:8899' : 'https://api.gwkjxb.com';// 办公室接口 & 正式环境 // const baseUrl = 'https://api.gwkjxb.com';// 正式环境(由于本地测试后台没有启动,暂时通用正式服) diff --git a/pages/index/done.vue b/pages/index/done.vue index e52d933..a169c83 100644 --- a/pages/index/done.vue +++ b/pages/index/done.vue @@ -13,6 +13,9 @@ const store = useStore() // 生命周期 onLoad((e) => { + if(uni.getStorageSync('userInfo')) { + user_info.value = JSON.parse(uni.getStorageSync('userInfo')) + } c_index.value = parseInt(e.state_index) list_box.value[c_index.value].queryParams.isFinish = c_index.value?0:1 if(store.systemInfo) { @@ -29,6 +32,7 @@ getList() }) // 变量 + const user_info = ref(null) const inputDialog = ref() const state_index = ref(0) const swiper_h = ref(0) @@ -85,12 +89,12 @@ uni.showLoading({ mask:true }) - const res = await api.getTodoist(list_box.value[c_index.value].queryParams) + const res = await api.getTodoist(list_box.value[c_index.value].queryParams,user_info.value?.userId || 0) uni.hideLoading(); if(res.code === 0) { if(res.data && res.data.length > 0) { - // list.value.push(...res.data) - list_box.value[c_index.value].list.push(...res.data) + // list_box.value[c_index.value].list.push(...res.data) + list_box.value[c_index.value].list = res.data } else{ list_box.value[c_index.value].queryParams.page-- diff --git a/pages/index/index.vue b/pages/index/index.vue index ca96673..8e13292 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -108,9 +108,9 @@ if(!surgery_time.value) { return } - if(!choosed_h.value || !choosed_h.value.ID) { - return - } + // if(!choosed_h.value || !choosed_h.value.ID) { + // return + // } let user_info = JSON.parse(uni.getStorageSync('userInfo')) let h_query = { isSurgery:parseInt(isSurgery.value), diff --git a/pages/index/note_list.vue b/pages/index/note_list.vue index 9732221..b132b63 100644 --- a/pages/index/note_list.vue +++ b/pages/index/note_list.vue @@ -99,31 +99,39 @@ uni.showLoading({ mask:true }) - const res = await api.getTodoist(list_box.value[c_index.value].queryParams) - uni.hideLoading(); - if(res.code === 0) { - if(res.data && res.data.length > 0) { - // list.value.push(...res.data) - list_box.value[c_index.value].list.push(...res.data) + let operation_info = JSON.parse(uni.getStorageSync('operation_info')) + if(operation_info && operation_info.hospitalId) { + const res = await api.getHospitalInfo2({ + hospitalId:operation_info.hospitalId, + timeNum:list_box.value[c_index.value].queryParams.statet + }) + // return + // const res = await api.getTodoist(list_box.value[c_index.value].queryParams) + if(res.code === 0) { + if(res.data && res.data.length > 0) { + // list_box.value[c_index.value].list.push(...res.data) + list_box.value[c_index.value].list = res.data + } + else{ + list_box.value[c_index.value].queryParams.page-- + } } else{ - list_box.value[c_index.value].queryParams.page-- - } - } - else{ - uni.showToast({ - title:res.msg, - icon:"error", - duration:2000, - mask:true, - success() { - if(res.code === 7) // 登录失败 - { - store.afterFailLogin(2000) + uni.showToast({ + title:res.msg, + icon:"error", + duration:2000, + mask:true, + success() { + if(res.code === 7) // 登录失败 + { + store.afterFailLogin(2000) + } } - } - }) + }) + } } + uni.hideLoading(); } function tabChange(currentIndex) { c_index.value = currentIndex diff --git a/pages/wikipedia/detail.vue b/pages/wikipedia/detail.vue index 7cf3ee6..86aaa4d 100644 --- a/pages/wikipedia/detail.vue +++ b/pages/wikipedia/detail.vue @@ -65,7 +65,7 @@ id:a_info.value.ID, },userInfo.value.userId) } - a_info.value.isStar = type + a_info.value.is_favorite = type }