1229修改
This commit is contained in:
parent
8733d995ec
commit
6dcbf07b54
@ -16,7 +16,8 @@ const API = {
|
|||||||
getLbtList:data => net.GET("/banner/list",data),// 获取轮播图
|
getLbtList:data => net.GET("/banner/list",data),// 获取轮播图
|
||||||
hospital:data => net.PUT("/user/hospital",data),// 修改医院信息
|
hospital:data => net.PUT("/user/hospital",data),// 修改医院信息
|
||||||
getHospitalInfo:id => net.GET("/hospital/"+id),// 根据ID获取医院信息
|
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),// 获取测试记录
|
getVisionList:data => net.GET("/vision/list",data),// 获取测试记录
|
||||||
todoFinished:data => net.PUT("/user/todo",data),// 修改待办列表状态
|
todoFinished:data => net.PUT("/user/todo",data),// 修改待办列表状态
|
||||||
// 百科
|
// 百科
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// isdev 为 true 表示开发环境 false 表示发布环境
|
// isdev 为 true 表示开发环境 false 表示发布环境
|
||||||
const isdev = true;
|
const isdev = true;
|
||||||
const baseUrl = isdev ? 'https://api.jimingyiliao.com' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境
|
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 = isdev ? 'http://192.168.1.133:8899' : 'https://api.gwkjxb.com';// 办公室接口 & 正式环境
|
||||||
// const baseUrl = 'https://api.gwkjxb.com';// 正式环境(由于本地测试后台没有启动,暂时通用正式服)
|
// const baseUrl = 'https://api.gwkjxb.com';// 正式环境(由于本地测试后台没有启动,暂时通用正式服)
|
||||||
|
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
const store = useStore()
|
const store = useStore()
|
||||||
// 生命周期
|
// 生命周期
|
||||||
onLoad((e) => {
|
onLoad((e) => {
|
||||||
|
if(uni.getStorageSync('userInfo')) {
|
||||||
|
user_info.value = JSON.parse(uni.getStorageSync('userInfo'))
|
||||||
|
}
|
||||||
c_index.value = parseInt(e.state_index)
|
c_index.value = parseInt(e.state_index)
|
||||||
list_box.value[c_index.value].queryParams.isFinish = c_index.value?0:1
|
list_box.value[c_index.value].queryParams.isFinish = c_index.value?0:1
|
||||||
if(store.systemInfo) {
|
if(store.systemInfo) {
|
||||||
@ -29,6 +32,7 @@
|
|||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
// 变量
|
// 变量
|
||||||
|
const user_info = ref(null)
|
||||||
const inputDialog = ref()
|
const inputDialog = ref()
|
||||||
const state_index = ref(0)
|
const state_index = ref(0)
|
||||||
const swiper_h = ref(0)
|
const swiper_h = ref(0)
|
||||||
@ -85,12 +89,12 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
mask:true
|
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();
|
uni.hideLoading();
|
||||||
if(res.code === 0) {
|
if(res.code === 0) {
|
||||||
if(res.data && res.data.length > 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{
|
else{
|
||||||
list_box.value[c_index.value].queryParams.page--
|
list_box.value[c_index.value].queryParams.page--
|
||||||
|
@ -108,9 +108,9 @@
|
|||||||
if(!surgery_time.value) {
|
if(!surgery_time.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!choosed_h.value || !choosed_h.value.ID) {
|
// if(!choosed_h.value || !choosed_h.value.ID) {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
let user_info = JSON.parse(uni.getStorageSync('userInfo'))
|
let user_info = JSON.parse(uni.getStorageSync('userInfo'))
|
||||||
let h_query = {
|
let h_query = {
|
||||||
isSurgery:parseInt(isSurgery.value),
|
isSurgery:parseInt(isSurgery.value),
|
||||||
|
@ -99,31 +99,39 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
mask:true
|
mask:true
|
||||||
})
|
})
|
||||||
const res = await api.getTodoist(list_box.value[c_index.value].queryParams)
|
let operation_info = JSON.parse(uni.getStorageSync('operation_info'))
|
||||||
uni.hideLoading();
|
if(operation_info && operation_info.hospitalId) {
|
||||||
if(res.code === 0) {
|
const res = await api.getHospitalInfo2({
|
||||||
if(res.data && res.data.length > 0) {
|
hospitalId:operation_info.hospitalId,
|
||||||
// list.value.push(...res.data)
|
timeNum:list_box.value[c_index.value].queryParams.statet
|
||||||
list_box.value[c_index.value].list.push(...res.data)
|
})
|
||||||
|
// 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{
|
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.hideLoading();
|
||||||
uni.showToast({
|
|
||||||
title:res.msg,
|
|
||||||
icon:"error",
|
|
||||||
duration:2000,
|
|
||||||
mask:true,
|
|
||||||
success() {
|
|
||||||
if(res.code === 7) // 登录失败
|
|
||||||
{
|
|
||||||
store.afterFailLogin(2000)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function tabChange(currentIndex) {
|
function tabChange(currentIndex) {
|
||||||
c_index.value = currentIndex
|
c_index.value = currentIndex
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
id:a_info.value.ID,
|
id:a_info.value.ID,
|
||||||
},userInfo.value.userId)
|
},userInfo.value.userId)
|
||||||
}
|
}
|
||||||
a_info.value.isStar = type
|
a_info.value.is_favorite = type
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user