Przeglądaj źródła

任务、监督列表完成 2/24

zhangyun 3 lat temu
rodzic
commit
572abbf598

+ 10 - 0
MingGaoApp/pages.json

@@ -29,7 +29,12 @@
 			"path": "pages/response/index",
 			"style": {
 				"navigationBarTitleText": "应答中心",
+<<<<<<< HEAD
 				"navigationBarBackgroundColor": "#f7f7f7"
+=======
+				"navigationBarBackgroundColor":"#f7f7f7",
+				"enablePullDownRefresh": true
+>>>>>>> 1109b35e1af43843203fb52a720d61490fc14249
 			}
 
 		},
@@ -37,7 +42,12 @@
 			"path": "pages/response/details",
 			"style": {
 				"navigationBarTitleText": "应答中心详情",
+<<<<<<< HEAD
 				"navigationBarBackgroundColor": "#f7f7f7"
+=======
+				"navigationBarBackgroundColor":"#f7f7f7",
+				"enablePullDownRefresh": false
+>>>>>>> 1109b35e1af43843203fb52a720d61490fc14249
 			}
 
 		}, {

+ 12 - 1
MingGaoApp/pages/response/details.vue

@@ -40,9 +40,13 @@
 			return {
 				phoneHeight: '', // 获取当前的屏幕高度
 				value: "", // input框值	
+				tltName: '', // 头部标题
 			}
 		},
-		onLoad() {
+		onLoad(options) {
+			console.log(111)
+			console.log(options)
+			this.tltName = options.name
 			var that = this
 			uni.getSystemInfo({ //异步获取。
 				success(res) {
@@ -60,6 +64,13 @@
 				console.log(this.value)
 			},
 		},
+		
+		onReady() {
+			// 修改头部标题栏
+			uni.setNavigationBarTitle({
+			    title: this.tltName
+			});
+		},
 	}
 </script>
 

+ 84 - 38
MingGaoApp/pages/response/index.vue

@@ -205,42 +205,83 @@
 				// if (typeof WebSocket === "undefined") {
 				// 	console.log('您的浏览器不支持sooket')
 				// } else {
-					uni.getStorage({
-						key: 'session_key',
-						success: function(res) {
-							console.log(res.data)
-							uni.connectSocket({
-								url: that.urlData + "&token=" + res.data,
-								// data() {
-								// 	return {
-								// 		token: res.data
-								// 	}
-								// },
-								header: {
-									'content-type': 'application/json'
-								},
-								protocols: ['protocol1'],
-								method: 'GET',
-								success: function(res) {
-									console.log(res)
-								},
-								fail: function(err) {
-									console.log(err)
-								},
-							})
-
-							// 监听WebSocket连接打开成功事件
-							uni.onSocketOpen(function(res) {
-								console.log('WebSocket连接已打开!');
-
-							})
-
-							// 监听WebSocket连接打开失败事件
-							uni.onSocketError(function(res) {
-								console.log('WebSocket连接打开失败,请检查!');
-							});
-						}
-					});
+				uni.getStorage({
+					key: 'session_key',
+					success: function(res) {
+						console.log(res.data)
+						uni.connectSocket({
+							url: that.urlData + "&token=" + res.data,
+							// data() {
+							// 	return {
+							// 		token: res.data
+							// 	}
+							// },
+							header: {
+								'content-type': 'application/json'
+							},
+							protocols: ['protocol1'],
+							method: 'GET',
+							success: function(res) {
+								console.log(res)
+							},
+							fail: function(err) {
+								console.log(err)
+							},
+						})
+
+						// 监听WebSocket连接打开成功事件
+						// uni.onSocketOpen(function(res) {
+						// 	console.log('WebSocket连接已打开!');
+						// 	// uni.sendSocketMessage({
+						// 	// 	data: obj,
+						// 	// 	success: function (res) {
+						// 	// 		console.log(res)
+						// 	// 	},
+						// 	// 	fail: function (err) {
+						// 	// 		console.log(err)
+						// 	// 	},
+						// 	// });
+
+						// })
+
+						// // 监听WebSocket连接打开失败事件
+						// uni.onSocketError(function(res) {
+						// 	console.log(res)
+						// 	console.log('WebSocket连接打开失败,请检查!');
+						// });
+
+						//监听socket打开
+						uni.onSocketOpen(() => {
+							// this.isSocketOpen = true
+							console.log('WebSocket连接已打开!');
+						})
+						//监听socket关闭
+						uni.onSocketClose(() => {
+							// this.isSocketOpen = false
+							console.log('WebSocket连接已关闭!');
+						})
+						//监听socket错误
+						uni.onSocketError(() => {
+							this.isSocketOpen = false
+							console.log('WebSocket连接打开失败');
+						})
+
+						var obj = {};
+						obj = {
+							action: "list",
+							recv_user_id: '167',
+							data: {
+								msg_status: false,
+								msg_info: ""
+							}
+						};
+						console.log('222222')
+						uni.onSocketMessage((res) => {
+							console.log(res)
+							console.log(('-------------------------------'))
+						})
+					}
+				});
 				// }
 			},
 
@@ -248,8 +289,8 @@
 			defail(data) {
 				console.log(data)
 				uni.navigateTo({
-					// url: '/pages/details/details?id=' + id + '&signboard=1'
-					url: '/pages/response/details'
+					url: '/pages/response/details?name=' + data.name
+					// url: '/pages/response/details'
 				})
 			},
 		},
@@ -269,6 +310,9 @@
 			// await this.setup()
 		},
 
+
+
+
 		// 下拉刷新
 		onPullDownRefresh() {
 			console.log('刷新了')
@@ -293,11 +337,13 @@
 
 	.response_box {
 		background: #f7f7f7;
+
 		.response_ul {
 			// border: 1px solid #000;
 			overflow-y: auto;
 			// height: 1550rpx;
 			height: 1450rpx;
+
 			.response_list {
 				position: relative;
 				background: #FFF;

Plik diff jest za duży
+ 2 - 7
MingGaoApp/unpackage/dist/dev/app-plus/app-config-service.js


Plik diff jest za duży
+ 10130 - 12318
MingGaoApp/unpackage/dist/dev/app-plus/app-service.js


Plik diff jest za duży
+ 1049 - 2139
MingGaoApp/unpackage/dist/dev/app-plus/app-view.js