35 lines
1.5 KiB
Plaintext
35 lines
1.5 KiB
Plaintext
<!--pages/message/index.wxml-->
|
|
<wxs src="./index.wxs" module="_index" />
|
|
<view class="message-page">
|
|
<t-row>
|
|
<t-col span="4" offset="1" t-class="dark">
|
|
<!-- <text class="site-message-title">站内消息</text> -->
|
|
<t-badge count="{{unreadCount}}" content="站内消息" offset="{{ [4] }}" class="wrapper" />
|
|
</t-col>
|
|
<t-col span="3" offset="16" t-class="light">
|
|
<t-icon bindtap="onClearUnreadTap" name="clear" size="40rpx" />
|
|
</t-col>
|
|
</t-row>
|
|
<t-divider />
|
|
<view class="message-list">
|
|
<view class="message-item" wx:for="{{list}}" wx:for-item="item" wx:key="id">
|
|
<t-cell hover bordered title="{{item.title}}" data-key="showTextAndTitle" bind:tap="showDialog" data-id="{{item.id}}">
|
|
<t-avatar class="avatar-example" slot="image" image="{{item.image}}" badge-props="{{ {dot: !item.is_read, offset: [0, 4] } }}" />
|
|
<view slot="description">{{_index.ellipsis(item.content, 22)}}</view>
|
|
<text slot="note">{{item.createtime_text}}</text>
|
|
</t-cell>
|
|
</view>
|
|
</view>
|
|
<view class="empty-container" wx:if="{{list.length <= 0}}">
|
|
<t-empty icon="chat-bubble-error" description="暂无消息" />
|
|
</view>
|
|
<view class="safe-bottom" />
|
|
</view>
|
|
<t-dialog visible="{{showTextAndTitle}}" title="{{currentMessage.title}}" confirm-btn="{{ confirmBtn }}" bind:confirm="closeDialog">
|
|
<!-- 适配skyline,增加type="list" -->
|
|
<scroll-view slot="content" type="list" scroll-y class="long-content">
|
|
<view class="content-container">
|
|
{{currentMessage.content}}
|
|
</view>
|
|
</scroll-view>
|
|
</t-dialog> |