diff --git a/api/index.js b/api/index.js index b383b75..df0c9eb 100644 --- a/api/index.js +++ b/api/index.js @@ -20,6 +20,7 @@ const API = { 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),// 修改待办列表状态 + todayTodoList:data => net.GET("/user/todo/today",data),// 今天待办列表 // 百科 getArticleList:data => net.GET("/article/list",data),// 百科列表 getArticleDetail:(data,userId) => net.GET("/article/"+data.id,null,true,{"userId":userId}),// 文章详情 diff --git a/config/index.js b/config/index.js index f891248..25398bd 100644 --- a/config/index.js +++ b/config/index.js @@ -1,5 +1,5 @@ // isdev 为 true 表示开发环境 false 表示发布环境 -const isdev = true; +const isdev = false; const baseUrl = isdev ? 'https://367a21fd.r12.cpolar.top' : 'https://api.jimingyiliao.com';// 办公室接口 & 测试环境 // 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';// 办公室接口 & 测试环境 diff --git a/pages/index/done.vue b/pages/index/done.vue index b8dd0a6..f57f9f2 100644 --- a/pages/index/done.vue +++ b/pages/index/done.vue @@ -191,7 +191,8 @@ {{item.content}} - {{util.timestampToDate(item.CreatedAt)}} + + {{item.remindDay + " " +item.remindTime}} diff --git a/pages/index/index.vue b/pages/index/index.vue index 72c459b..9a28e68 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -14,18 +14,17 @@ const h_index = ref(0) onShow((e) => { getLbtList() - // console.log("store:",store) // if(!store.userInfo && !store.operation_info) { //没登录过 且 未填写手术信息 if(!store.userInfo) { //没登录过 - // console.log("没有store.userInfo",store.userInfo) // getHospitalList() // setTimeout(()=>{ // inputDialog.value.open() // },0) } else { - setTimeout(()=>{ - inputDialog.value.close() - },0) + // setTimeout(()=>{ + // inputDialog.value.close() + // },0) + getTodayTodoList() } }) @@ -51,7 +50,34 @@ pageSize:1000, key:'' }) + const todayTodoList = ref([]) + const todayTodoListShow = ref({}) // 函数 + async function getTodayTodoList() { + const userInfo = uni.getStorageSync('userInfo') + if(userInfo) { + let user_info = JSON.parse(userInfo) + if(user_info.userId) { + const res = await api.todayTodoList({userId:user_info.userId}) + if(res.code == 0) { + todayTodoList.value = res.data + if(todayTodoList.value.length > 0) { + showTodo() + } + } + } + } + } + function showTodo() { + let start_num = 0 + setInterval(() => { + if(!(start_num < todayTodoList.value.length)) { + start_num = 0 + } + todayTodoListShow.value = todayTodoList.value[start_num] + start_num++ + }, 1000) + } function subscribeFunc() { uni.requestSubscribeMessage({          tmplIds: ['PgxoZOOSDgBcmIGd_EVLDnYUmL3eu6NQTAZCsHQeuWY'], @@ -212,6 +238,18 @@ --> + + + + + + + {{todayTodoListShow.remindTime}}: + + {{todayTodoListShow.content}} + + +