1229修改
This commit is contained in:
@@ -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--
|
||||
|
@@ -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),
|
||||
|
@@ -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--
|
||||
uni.showToast({
|
||||
title:res.msg,
|
||||
icon:"error",
|
||||
duration:2000,
|
||||
mask:true,
|
||||
success() {
|
||||
if(res.code === 7) // 登录失败
|
||||
{
|
||||
store.afterFailLogin(2000)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
else{
|
||||
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
|
||||
|
Reference in New Issue
Block a user