个人消息
This commit is contained in:
@@ -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"}
|
||||
],
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-collapse": "/components/collapse/collapse",
|
||||
"t-collapse-panel": "/components/collapse/collapse-panel"
|
||||
"t-badge": "/components/badge/badge"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
<wxs module="_"> module.exports.contains = function(arr, target) { return arr.indexOf(target) > -1; } </wxs>
|
||||
<t-collapse value="{{activeValues}}" bind:change="handleChange">
|
||||
<t-collapse-panel
|
||||
header="今天任务到期了"
|
||||
header-right-content="{{_.contains(activeValues, 0) ? '收起' : '展开'}}"
|
||||
value="{{0}}"
|
||||
expandIcon
|
||||
>
|
||||
这个凑数的,到时候改成已读未读的消息
|
||||
</t-collapse-panel>
|
||||
</t-collapse>
|
||||
<view class="msgTitle">
|
||||
<view class="clear"></view>
|
||||
<view class="clear"><t-icon name="app"></t-icon></view>
|
||||
<view class="read"><t-icon name="app"/></view>
|
||||
</view>
|
||||
<view wx:for="{{messageList}}">
|
||||
<t-cell title="{{item.title}}" description="{{item.content}}" wx:key="index">
|
||||
<view slot="description">
|
||||
{{item.date}}
|
||||
</view>
|
||||
<view class="sendDate" slot="note">
|
||||
<t-badge wx:if="{{item.isRead}}" dot/>
|
||||
</view>
|
||||
</t-cell>
|
||||
</view>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
.msgTitle {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 50rpx;
|
||||
}
|
||||
.sendDate {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user