diff --git a/app.json b/app.json index a7fd267..f20a495 100644 --- a/app.json +++ b/app.json @@ -1,6 +1,7 @@ { "pages": [ "pages/task/index", + "pages/task/taskView/index", "pages/logs/logs", "pages/myself/index", "pages/message/index", diff --git a/pages/myself/notify/index.js b/pages/myself/notify/index.js index e4d0cf4..d172732 100644 --- a/pages/myself/notify/index.js +++ b/pages/myself/notify/index.js @@ -1,10 +1,11 @@ Page({ data: { - activeValues: [], - }, - handleChange(e) { - this.setData({ - activeValues: e.detail.value, - }); + messageList : [ + {"taskId":"2022","isRead":true,"title":"今天是任务的需要的","content":"任务【测试...】已延期","date":"2022-12-14"}, + {"taskId":"2022","isRead":false,"title":"任务延期","content":"点哦电脑玩i回家欧帝啊我你的破请问你的我i拿到钱哦i我你懂屁请问你oi","date":"2022-12-14"}, + {"taskId":"2022","isRead":true,"title":"任务【测试3213...】已延期","content":"点哦电脑玩i回家欧帝啊我你的破请问你的我i拿到钱哦i我你懂屁请问你oi","date":"2022-12-14"}, + {"taskId":"2022","isRead":false,"title":"任务【测试412312...】已延期","content":"任务【测试...】已延期","date":"2022-12-14"} + ], }, + }); diff --git a/pages/myself/notify/index.json b/pages/myself/notify/index.json index 157fe45..8958e61 100644 --- a/pages/myself/notify/index.json +++ b/pages/myself/notify/index.json @@ -1,6 +1,5 @@ { "usingComponents": { - "t-collapse": "/components/collapse/collapse", - "t-collapse-panel": "/components/collapse/collapse-panel" + "t-badge": "/components/badge/badge" } } diff --git a/pages/myself/notify/index.wxml b/pages/myself/notify/index.wxml index 7d16e47..0974ec0 100644 --- a/pages/myself/notify/index.wxml +++ b/pages/myself/notify/index.wxml @@ -1,11 +1,15 @@ - module.exports.contains = function(arr, target) { return arr.indexOf(target) > -1; } - - - 这个凑数的,到时候改成已读未读的消息 - - + + + + + + + + + {{item.date}} + + + + + + diff --git a/pages/myself/notify/index.wxss b/pages/myself/notify/index.wxss index e69de29..c261220 100644 --- a/pages/myself/notify/index.wxss +++ b/pages/myself/notify/index.wxss @@ -0,0 +1,8 @@ +.msgTitle { + display: flex; + justify-content: space-between; + padding: 20rpx 50rpx; +} +.sendDate { + padding-left: 20rpx; +} diff --git a/pages/task/index.js b/pages/task/index.js index 7b34ac7..7431695 100644 --- a/pages/task/index.js +++ b/pages/task/index.js @@ -128,6 +128,11 @@ Page({ handleAction(e) { let itemId = e.currentTarget.dataset.id; let items = []; + items.push({ + label: '详情', + operate: '3', + dataId: itemId, + }); items.push({ label: '配置', operate: '0', @@ -158,11 +163,17 @@ Page({ let operate = e.detail.selected.operate; let dataId = e.detail.selected.dataId; if (operate == 0){ - //进入详情页面 TODO + //进入详情修改页面 wx.navigateTo({ url: '/pages/taskDetail/index?id=' + dataId }); } + if (operate == 3){ + //进入详情查看页面 + wx.navigateTo({ + url: '/pages/task/taskView/index?id=' + dataId + }); + } if (operate == 1){ //取消提醒 //TODO } diff --git a/pages/task/taskView/index.js b/pages/task/taskView/index.js new file mode 100644 index 0000000..2b33cca --- /dev/null +++ b/pages/task/taskView/index.js @@ -0,0 +1,12 @@ +let taskId = ''; +Page({ + data: { + alertText: '', + completeText: '', + repeatText: '' + }, + onLoad: function (options) { + taskId = options.id; + } + +}); diff --git a/pages/task/taskView/index.json b/pages/task/taskView/index.json new file mode 100644 index 0000000..d0e8daf --- /dev/null +++ b/pages/task/taskView/index.json @@ -0,0 +1,9 @@ +{ + "usingComponents": { + "t-date-time-picker": "/components/date-time-picker/date-time-picker", + "t-picker": "/components/picker/picker", + "t-picker-item": "/components/picker/picker-item", + "t-switch": "/components/switch/switch", + "t-button": "/components/button/button" + } +} diff --git a/pages/task/taskView/index.wxml b/pages/task/taskView/index.wxml new file mode 100644 index 0000000..17282a4 --- /dev/null +++ b/pages/task/taskView/index.wxml @@ -0,0 +1,29 @@ + + + + + diff --git a/pages/task/taskView/index.wxss b/pages/task/taskView/index.wxss new file mode 100644 index 0000000..c7c7789 --- /dev/null +++ b/pages/task/taskView/index.wxss @@ -0,0 +1,17 @@ +.pannel-item { + font-size: 32rpx; +} + +.pannel-item::after { + border: 0; +} + +.sub-text { + color: #000; + opacity: 0.9; +} + +.empty { + color: #000; + opacity: 0.32; +} diff --git a/pages/taskDetail/index.js b/pages/taskDetail/index.js index b234ba8..77524a5 100644 --- a/pages/taskDetail/index.js +++ b/pages/taskDetail/index.js @@ -25,10 +25,6 @@ Page({ taskId = options.id; }, - onShow() { - - }, - showPicker(e) { const { mode } = e?.currentTarget?.dataset; this.setData({