历史记录暂时提交
parent
2d33b67618
commit
ff06714223
|
|
@ -46,37 +46,38 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 消息列表 -->
|
<uni-swipe-action ref="swipeAction" class="message-list">
|
||||||
<view class="message-list">
|
<uni-swipe-action-item
|
||||||
<view
|
|
||||||
v-for="(item, index) in messageList"
|
v-for="(item, index) in messageList"
|
||||||
|
:right-options="options"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="message-item"
|
@click="deleteItem($event, index)"
|
||||||
@click="handleItemClick(item)"
|
|
||||||
>
|
>
|
||||||
<view class="item-icon-wrap">
|
<view class="message-item" @click="handleItemClick(item)">
|
||||||
<view class="item-icon" :style="{ backgroundColor: item.iconBg }">
|
<view class="item-icon-wrap">
|
||||||
<image mode="aspectFit" :style="{width: item.width,
|
<view class="item-icon" :style="{ backgroundColor: item.iconBg }">
|
||||||
|
<image mode="aspectFit" :style="{width: item.width,
|
||||||
height: '70rpx' }" :src="item.imgUrl" />
|
height: '70rpx' }" :src="item.imgUrl" />
|
||||||
|
</view>
|
||||||
|
<view v-if="item.badge" class="item-badge"></view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.badge" class="item-badge"></view>
|
<view class="item-content">
|
||||||
</view>
|
<view class="item-title">{{ item.title }}</view>
|
||||||
<view class="item-content">
|
<view class="item-desc">{{ item.desc }}</view>
|
||||||
<view class="item-title">{{ item.title }}</view>
|
|
||||||
<view class="item-desc">{{ item.desc }}</view>
|
|
||||||
</view>
|
|
||||||
<!-- 右侧时间+角标列 -->
|
|
||||||
<view class="item-right">
|
|
||||||
<view class="item-time">
|
|
||||||
<uni-dateformat :date="item.time" :format="isTodayDate(item.time)?'hh:mm':'yyyy-MM-dd hh:mm:ss'"
|
|
||||||
:threshold="[60000, 3600000]"></uni-dateformat>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.numBadge" class="num-badge">
|
<!-- 右侧时间+角标列 -->
|
||||||
<uni-badge :text="item.numBadge" type="error" size="mini" />
|
<view class="item-right">
|
||||||
|
<view class="item-time">
|
||||||
|
<uni-dateformat :date="item.time" :format="isTodayDate(item.time)?'hh:mm':'yyyy-MM-dd hh:mm:ss'"
|
||||||
|
:threshold="[60000, 3600000]"></uni-dateformat>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.numBadge">
|
||||||
|
<uni-badge :text="item.numBadge" type="error" size="mini" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</uni-swipe-action-item>
|
||||||
</view>
|
</uni-swipe-action>
|
||||||
|
|
||||||
<!-- 底部提示 -->
|
<!-- 底部提示 -->
|
||||||
<uni-divider-text margin="10rpx 0"
|
<uni-divider-text margin="10rpx 0"
|
||||||
|
|
@ -141,38 +142,59 @@ export default {
|
||||||
numBadge: 25, // 无值则不显示
|
numBadge: 25, // 无值则不显示
|
||||||
width: '100rpx'
|
width: '100rpx'
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
options: [{
|
||||||
|
text: '置顶',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#FFA726'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '删除',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#E83A30'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isTodayDate,
|
isTodayDate,
|
||||||
navBack() {
|
navBack() {
|
||||||
|
this.$modal.showToast('模块建设中~')
|
||||||
console.log('返回上一页')
|
console.log('返回上一页')
|
||||||
},
|
},
|
||||||
clearUnread() {
|
clearUnread() {
|
||||||
|
this.$modal.showToast('模块建设中~')
|
||||||
console.log('清除未读')
|
console.log('清除未读')
|
||||||
},
|
},
|
||||||
openSetting() {
|
openSetting() {
|
||||||
|
this.$modal.showToast('模块建设中~')
|
||||||
console.log('打开通知设置')
|
console.log('打开通知设置')
|
||||||
},
|
},
|
||||||
goToOpen() {
|
goToOpen() {
|
||||||
|
this.$modal.showToast('模块建设中~')
|
||||||
console.log('去开启系统通知')
|
console.log('去开启系统通知')
|
||||||
},
|
},
|
||||||
goToClose() {
|
goToClose() {
|
||||||
|
this.$modal.showToast('模块建设中~')
|
||||||
console.log('关闭系统通知')
|
console.log('关闭系统通知')
|
||||||
},
|
},
|
||||||
goToSubscribe() {
|
goToSubscribe() {
|
||||||
|
this.$modal.showToast('模块建设中~')
|
||||||
console.log('进入消息订阅')
|
console.log('进入消息订阅')
|
||||||
},
|
},
|
||||||
goToAI() {
|
goToAI() {
|
||||||
|
this.$modal.showToast('模块建设中~')
|
||||||
console.log('进入AI识别')
|
console.log('进入AI识别')
|
||||||
},
|
},
|
||||||
handleItemClick(item) {
|
handleItemClick(item) {
|
||||||
|
this.$modal.showToast('敬请期待~')
|
||||||
console.log('点击消息:', item.title)
|
console.log('点击消息:', item.title)
|
||||||
},
|
},
|
||||||
switchTab(tab) {
|
deleteItem(event, index) {
|
||||||
console.log('切换到:', tab)
|
this.$modal.showToast('敬请期待~')
|
||||||
// 实际项目中用 uni.switchTab 跳转对应页面
|
console.log('删除消息:', event, index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -362,7 +384,6 @@ export default {
|
||||||
.item-time {
|
.item-time {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
margin-bottom: 8rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue