fix: 修复通知列表bug
This commit is contained in:
parent
4a2614ff83
commit
c340a52c35
@ -3,7 +3,7 @@
|
||||
"appid" : "__UNI__933D519",
|
||||
"description" : "",
|
||||
"versionName" : "1.1.0",
|
||||
"versionCode" : "23",
|
||||
"versionCode" : "24",
|
||||
"transformPx" : false,
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<scroll-view v-if="deviceInfo" scroll-y="true" :style="{ height: deviceInfo.windowHeight + 'px' }"
|
||||
lower-threshold="100" @refresherrefresh="refresherList" :refresher-enabled="true" @scrolltolower="nextPage"
|
||||
:refresher-triggered="refresherTriggered">
|
||||
<view class="search">
|
||||
<view class="search" v-if="!(lockList.length === 0 && lockSearch.searchStr === '' && !focus)">
|
||||
<up-search :searchIconSize="48" :inputStyle="{ fontSize: '32rpx' }" @focus="getFocus" @blur="getBlur"
|
||||
:height="80" placeholder="搜索" :clearabled="false" @change="changeSearch"
|
||||
v-model="lockSearch.searchStr" bgColor="#ffffff" :showAction="false" maxlength="20"></up-search>
|
||||
@ -14,7 +14,7 @@
|
||||
<view v-if="lockList.length === 0 && lockSearch.searchStr === '' && !focus">
|
||||
<image src="/static/images/icon_add_round.png" mode="aspectFill" class="button-add-big"
|
||||
@click="toSearchDevice"></image>
|
||||
<view class="text">填加锁时,手机必须在锁旁边</view>
|
||||
<view class="text">添加锁时,手机必须在锁旁边</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="group" v-for="(group, grounIndex) in lockList" :key="group.groupId">
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<scroll-view v-if="deviceInfo" scroll-y="true" :style="{ height: deviceInfo.windowHeight + 'px' }"
|
||||
lower-threshold="100" @refresherrefresh="refresherList" :refresher-enabled="true" @scrolltolower="nextPage"
|
||||
:refresher-triggered="refresherTriggered">
|
||||
:refresher-triggered="refresherTriggered" @scroll="scroll">
|
||||
<view class="list" v-if="requestFinished">
|
||||
<view v-if="notificationList.length === 0">
|
||||
<image class="empty-list" src="/static/images/background_empty_list.png" mode="aspectFill"></image>
|
||||
@ -11,7 +11,8 @@
|
||||
<up-swipe-action v-else>
|
||||
<up-swipe-action-item class="item" ref="swipeItem" :options="options"
|
||||
v-for="(notification,index) in notificationList" :key="notification.id"
|
||||
:threshold="50" @click="deleteNotification(notification, index)">
|
||||
:threshold="50" @click="deleteNotification(notification, index)" :index="index"
|
||||
:name="index">
|
||||
<view class="notification" @click="toDetail(index,notification)">
|
||||
<view v-if="notification.readAt === 0">
|
||||
<image class="icon" src="/static/images/icon_notification_unread.png" mode="aspectFill"></image>
|
||||
@ -78,6 +79,13 @@ export default {
|
||||
timeFormat,
|
||||
...mapActions(useNotificationStore, ['getNotificationList', 'updateNotificationSearch', 'updateNotificationItem','deleteNotificationItem']),
|
||||
...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo', 'getNetworkType']),
|
||||
scroll(e) {
|
||||
this.$refs.swipeItem.forEach(item => {
|
||||
if(item.show) {
|
||||
item.closeHandler()
|
||||
}
|
||||
})
|
||||
},
|
||||
async deleteNotification (notification, index) {
|
||||
const netWork = await this.getNetworkType()
|
||||
if (!netWork) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<view class="view">
|
||||
<view class="view-button">
|
||||
<view style="width: 350rpx">名称</view>
|
||||
<view style="width: 150rpx">名称</view>
|
||||
<view class="view-button" style="padding: 20rpx 0">
|
||||
<view class="info" style="line-height: 40rpx;word-break: break-all;">{{currentLockInfo.lockAlias}}</view>
|
||||
</view>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user