杜迪迪 il y a 3 mois
Parent
commit
af9c45a84e
3 fichiers modifiés avec 20 ajouts et 5 suppressions
  1. 7 0
      api/work.js
  2. 5 5
      pages.json
  3. 8 0
      pages/work/index.vue

+ 7 - 0
api/work.js

@@ -9,4 +9,11 @@ export const msgList = (params) => {
 		method: "get",
 		params,
 	})
+}
+// 已读
+export const readList = () => {
+	return request({
+		url: "/api/msg/readMsg",
+		method: "get",
+	})
 }

+ 5 - 5
pages.json

@@ -20,7 +20,8 @@
 		{
 			"path": "pages/work/index",
 			"style": {
-				"navigationBarTitleText": "工作台"
+				"navigationBarTitleText": "工作台",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -205,10 +206,9 @@
 			}
 		},
 		{
-			"path" : "pages/work/detailInfo",
-			"style" : 
-			{
-				"navigationBarTitleText" : "详情"
+			"path": "pages/work/detailInfo",
+			"style": {
+				"navigationBarTitleText": "详情"
 			}
 		}
 	],

+ 8 - 0
pages/work/index.vue

@@ -74,6 +74,14 @@
 			// 	this.read = res;
 			// });
 			this.getList()
+			uni.startPullDownRefresh();
+		},
+		onPullDownRefresh() {
+			this.getList();
+			console.log("refresh");
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 800);
 		},
 		methods: {
 			detailInfo(item) {