杜迪迪 3 月之前
父節點
當前提交
af9c45a84e
共有 3 個文件被更改,包括 20 次插入5 次删除
  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) {