From c30fba1ec2423ee8fc1376d6e9405754f1ff2a8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=98=BF=E6=80=AA?= <690927457@qq.com>
Date: Fri, 26 Apr 2024 14:57:47 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E5=BC=B9=E5=B9=95=E6=8F=90=E9=86=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/index.js | 1 +
config/index.js | 2 +-
pages/index/done.vue | 3 ++-
pages/index/index.vue | 59 +++++++++++++++++++++++++++++++++++++++----
4 files changed, 58 insertions(+), 7 deletions(-)
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}}
+
+
+