瀏覽代碼

no message

USER-20230908AJ\Administrator 1 年之前
父節點
當前提交
dae2d5b401
共有 3 個文件被更改,包括 24 次插入15 次删除
  1. 15 15
      page_subpack/message/message.vue
  2. 9 0
      pages.json
  3. 二進制
      static/img/task/day-stast-3.png

+ 15 - 15
page_subpack/message/message.vue

@@ -51,8 +51,8 @@
 			return {
 				current: 0,
 				tabsList: [{
-					name: '全部(0)',
-					is_dot: true,
+					name: '全部',
+					is_dot: false,
 					dot_color: 'red',
 					disabled: false
 				}, {
@@ -138,13 +138,14 @@
 						if (res.data.items.length <= 0) {
 							this.isEnd = true;
 						} else {
-							this.tabsList[0].name = '全部(' + res.data.total + ')'
 							this.tabsList[1].name = '未读(' + res.data.unreadNum + ')'
+							this.tabsList[1].is_dot =  res.data.unreadNum>0
 							res.data.items.forEach((item) => {
 								item.is_del = false;
 								this.list.push(item)
 							})
 							// this.list.push(...res.data)
+              tools.hideLoading()
 						}
 						++this.page;
 					}
@@ -158,9 +159,7 @@
 			},
 			// 下拉刷新
 			onRefresh() {
-				uni.showLoading({
-					title: '数据加载中'
-				})
+        tools.showLoading()
 				this.startNotices()
 				setTimeout(() => {
 					// uni.showToast({
@@ -173,16 +172,17 @@
 			},
 			// 滚动到底部
 			onScrollBottom() {
-				uni.showLoading({
-					title: '数据加载中'
-				})
+				// uni.showLoading({
+				// 	title: '数据加载中'
+				// })
+        tools.showLoading()
 				this.getNotices()
-				setTimeout(() => {
-					uni.showToast({
-						title: '加载完成',
-						icon: 'none'
-					})
-				}, 1000)
+				// setTimeout(() => {
+				// 	uni.showToast({
+				// 		title: '加载完成',
+				// 		icon: 'none'
+				// 	})
+				// }, 1000)
 				console.log("到底部了");
 			},
 		},

+ 9 - 0
pages.json

@@ -198,6 +198,15 @@
     "selectedColor": "",
     "backgroundColor": ""
   },
+  "preloadRule": {
+    "pages/index/index": {
+      "network": "all",
+      "packages": [
+        "page_subpack",
+        "page_task"
+      ]
+    }
+  },
   "condition": {
     "current": 0,
     "list": [

二進制
static/img/task/day-stast-3.png