1
0

4 کامیت‌ها b107e6f180 ... 63963ec93b

نویسنده SHA1 پیام تاریخ
  ck110 63963ec93b 修改bug 2 هفته پیش
  ck110 e8b7ca84fe Merge branch 'master' of http://150.158.33.144:3000/lalalashen/MeetMateApp 2 هفته پیش
  ck110 6fd3e4b295 Merge branch 'master' of http://150.158.33.144:3000/lalalashen/MeetMateApp 2 هفته پیش
  ck110 d483f92753 1 2 هفته پیش
5فایلهای تغییر یافته به همراه233 افزوده شده و 194 حذف شده
  1. 38 3
      common/websocketUtil.js
  2. 179 179
      manifest.json
  3. 1 1
      pages/article/article.vue
  4. 5 3
      pages/login/reg.vue
  5. 10 8
      pages/my/step.vue

+ 38 - 3
common/websocketUtil.js

@@ -70,13 +70,13 @@ class websocketUtil {
 		if (this.socketStatus < 10) {
 			// 失败重连
 			if (this.reconnectNum > 50) return;
-			if (this.reconnectNum < this.reconnect_time.length) {
+			if (this.reconnectNum < reconnect_time.length) {
 				reconnect_timeout = reconnect_time[this.reconnectNum]
 			} else {
-				reconnect_timeout = reconnect_time[this.reconnect_time.length - 1]
+				reconnect_timeout = reconnect_time[reconnect_time.length - 1]
 			}
 
-			console.log("uniWebsocket 重新连接", this.socketStatus, this.reconnectNum, this.reconnect_timeout)
+			console.log("uniWebsocket 重新连接", this.socketStatus, this.reconnectNum, reconnect_timeout)
 
 			this.reconnectNum = this.reconnectNum + 1
 
@@ -238,6 +238,41 @@ class websocketUtil {
 			});
 		}, that.timeout)
 	}
+	/**
+	 * 重新打开链接
+	 */
+	restart() {
+
+		if (this.socketStatus >= 10) {
+			console.log("连接已打开");
+			return;
+		}
+
+		autoFlag = true
+
+		this.reconnect()
+
+	}
+	/**
+	 * 关闭链接
+	 */
+	close() {
+
+		if (this.socketStatus < 10) {
+			console.log("连接未打开");
+			return;
+		}
+
+		// heartbeatTimeOut && clearTimeout(heartbeatTimeOut)
+		this.heartbeatInterval && clearInterval(this.heartbeatInterval)
+		this.reconnectTimeOut && clearTimeout(this.reconnectTimeOut)
+
+		this.autoFlag = false
+
+		this.socketTask.close()
+
+	}
+
 	stop() {
 		uni.closeSocket();
 	}

+ 179 - 179
manifest.json

@@ -1,180 +1,180 @@
 {
-    "name" : "遇见玛特",
-    "appid" : "__UNI__A59181F",
-    "description" : "",
-    "versionName" : "1.1.4",
-    "versionCode" : 114,
-    "transformPx" : false,
-    /* 5+App特有相关 hfhz-mrro-iqmv-igdl storygarden2024@outlook.com*/
-    "app-plus" : {
-        "compatible" : {
-            "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持  
-        },
-        "usingComponents" : true,
-        "nvueStyleCompiler" : "uni-app",
-        "compilerVersion" : 3,
-        "splashscreen" : {
-            "alwaysShowBeforeRender" : true,
-            "waiting" : true,
-            "autoclose" : true,
-            "delay" : 0
-        },
-        "safearea" : {
-            "background" : "#00000000",
-            "bottom" : {
-                "offset" : "none"
-            }
-        },
-        /* 模块配置 */
-        "modules" : {
-            "Push" : {},
-            "Geolocation" : {},
-            "Camera" : {},
-            "Record" : {}
-        },
-        /* 应用发布信息 */
-        "distribute" : {
-            /* android打包配置 */
-            "android" : {
-                "permissions" : [
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-                ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
-                "enableOAID" : false
-            },
-            /* ios打包配置 */
-            "ios" : {
-                "UIBackgroundModes" : "audio",
-                "dSYMs" : false,
-                "idfa" : false
-            },
-            /* SDK配置 */
-            "sdkConfigs" : {
-                "ad" : {},
-                "payment" : {},
-                "speech" : {},
-                "oauth" : {},
-                "push" : {
-                    "unipush" : {
-                        "version" : "2",
-                        "offline" : false,
-                        "hms" : {},
-                        "oppo" : {},
-                        "vivo" : {},
-                        "mi" : {},
-                        "meizu" : {},
-                        "honor" : {}
-                    }
-                },
-                "geolocation" : {
-                    "system" : {
-                        "__platform__" : [ "android" ]
-                    }
-                },
-                "share" : {
-                    "weixin" : {
-                        "appid" : "",
-                        "UniversalLinks" : ""
-                    }
-                }
-            },
-            "splashscreen" : {
-                "androidStyle" : "default",
-                "useOriginalMsgbox" : false,
-                "iosStyle" : "common",
-                "ios" : {},
-                "android" : {
-                    "xxhdpi" : "static/loading_1080.png",
-                    "xhdpi" : "static/loading_720.png",
-                    "hdpi" : "static/loading_480.png"
-                }
-            },
-            "icons" : {
-                "android" : {
-                    "hdpi" : "unpackage/res/icons/72x72.png",
-                    "xhdpi" : "unpackage/res/icons/96x96.png",
-                    "xxhdpi" : "unpackage/res/icons/144x144.png",
-                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
-                },
-                "ios" : {
-                    "appstore" : "unpackage/res/icons/1024x1024.png",
-                    "ipad" : {
-                        "app" : "unpackage/res/icons/76x76.png",
-                        "app@2x" : "unpackage/res/icons/152x152.png",
-                        "notification" : "unpackage/res/icons/20x20.png",
-                        "notification@2x" : "unpackage/res/icons/40x40.png",
-                        "proapp@2x" : "unpackage/res/icons/167x167.png",
-                        "settings" : "unpackage/res/icons/29x29.png",
-                        "settings@2x" : "unpackage/res/icons/58x58.png",
-                        "spotlight" : "unpackage/res/icons/40x40.png",
-                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
-                    },
-                    "iphone" : {
-                        "app@2x" : "unpackage/res/icons/120x120.png",
-                        "app@3x" : "unpackage/res/icons/180x180.png",
-                        "notification@2x" : "unpackage/res/icons/40x40.png",
-                        "notification@3x" : "unpackage/res/icons/60x60.png",
-                        "settings@2x" : "unpackage/res/icons/58x58.png",
-                        "settings@3x" : "unpackage/res/icons/87x87.png",
-                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
-                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
-                    }
-                }
-            }
-        }
-    },
-    "networkTimeout" : {
-        "request" : 6000
-    },
-    /* 快应用特有相关 */
-    "quickapp" : {},
-    /* 小程序特有相关 */
-    "mp-weixin" : {
-        "appid" : "",
-        "setting" : {
-            "urlCheck" : false
-        },
-        "usingComponents" : true
-    },
-    "mp-alipay" : {
-        "usingComponents" : true
-    },
-    "mp-baidu" : {
-        "usingComponents" : true
-    },
-    "mp-toutiao" : {
-        "usingComponents" : true
-    },
-    "uniStatistics" : {
-        "enable" : false
-    },
-    "vueVersion" : "2",
-    "h5" : {
-        "router" : {
-            "base" : "./",
-            "mode" : "hash"
-        },
-        "template" : "h5.template.html",
-        "optimization" : {
-            "treeShaking" : {
-                "enable" : true
-            }
-        }
-    },
-    "fallbackLocale" : "zh-Hans"
-}
+	"name": "遇见玛特",
+	"appid": "__UNI__A59181F",
+	"description": "",
+	"versionName": "1.1.5",
+	"versionCode": 115,
+	"transformPx": false,
+	/* 5+App特有相关 hfhz-mrro-iqmv-igdl storygarden2024@outlook.com*/
+	"app-plus": {
+		"compatible": {
+			"ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持  
+		},
+		"usingComponents": true,
+		"nvueStyleCompiler": "uni-app",
+		"compilerVersion": 3,
+		"splashscreen": {
+			"alwaysShowBeforeRender": true,
+			"waiting": true,
+			"autoclose": true,
+			"delay": 0
+		},
+		"safearea": {
+			"background": "#00000000",
+			"bottom": {
+				"offset": "none"
+			}
+		},
+		/* 模块配置 */
+		"modules": {
+			"Push": {},
+			"Geolocation": {},
+			"Camera": {},
+			"Record": {}
+		},
+		/* 应用发布信息 */
+		"distribute": {
+			/* android打包配置 */
+			"android": {
+				"permissions": [
+					"<uses-feature android:name=\"android.hardware.camera\"/>",
+					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+					"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+				],
+				"abiFilters": ["armeabi-v7a", "arm64-v8a"],
+				"enableOAID": false
+			},
+			/* ios打包配置 */
+			"ios": {
+				"UIBackgroundModes": "audio",
+				"dSYMs": false,
+				"idfa": false
+			},
+			/* SDK配置 */
+			"sdkConfigs": {
+				"ad": {},
+				"payment": {},
+				"speech": {},
+				"oauth": {},
+				"push": {
+					"unipush": {
+						"version": "2",
+						"offline": false,
+						"hms": {},
+						"oppo": {},
+						"vivo": {},
+						"mi": {},
+						"meizu": {},
+						"honor": {}
+					}
+				},
+				"geolocation": {
+					"system": {
+						"__platform__": ["android"]
+					}
+				},
+				"share": {
+					"weixin": {
+						"appid": "",
+						"UniversalLinks": ""
+					}
+				}
+			},
+			"splashscreen": {
+				"androidStyle": "default",
+				"useOriginalMsgbox": false,
+				"iosStyle": "common",
+				"ios": {},
+				"android": {
+					"xxhdpi": "static/loading_1080.png",
+					"xhdpi": "static/loading_720.png",
+					"hdpi": "static/loading_480.png"
+				}
+			},
+			"icons": {
+				"android": {
+					"hdpi": "unpackage/res/icons/72x72.png",
+					"xhdpi": "unpackage/res/icons/96x96.png",
+					"xxhdpi": "unpackage/res/icons/144x144.png",
+					"xxxhdpi": "unpackage/res/icons/192x192.png"
+				},
+				"ios": {
+					"appstore": "unpackage/res/icons/1024x1024.png",
+					"ipad": {
+						"app": "unpackage/res/icons/76x76.png",
+						"app@2x": "unpackage/res/icons/152x152.png",
+						"notification": "unpackage/res/icons/20x20.png",
+						"notification@2x": "unpackage/res/icons/40x40.png",
+						"proapp@2x": "unpackage/res/icons/167x167.png",
+						"settings": "unpackage/res/icons/29x29.png",
+						"settings@2x": "unpackage/res/icons/58x58.png",
+						"spotlight": "unpackage/res/icons/40x40.png",
+						"spotlight@2x": "unpackage/res/icons/80x80.png"
+					},
+					"iphone": {
+						"app@2x": "unpackage/res/icons/120x120.png",
+						"app@3x": "unpackage/res/icons/180x180.png",
+						"notification@2x": "unpackage/res/icons/40x40.png",
+						"notification@3x": "unpackage/res/icons/60x60.png",
+						"settings@2x": "unpackage/res/icons/58x58.png",
+						"settings@3x": "unpackage/res/icons/87x87.png",
+						"spotlight@2x": "unpackage/res/icons/80x80.png",
+						"spotlight@3x": "unpackage/res/icons/120x120.png"
+					}
+				}
+			}
+		}
+	},
+	"networkTimeout": {
+		"request": 6000
+	},
+	/* 快应用特有相关 */
+	"quickapp": {},
+	/* 小程序特有相关 */
+	"mp-weixin": {
+		"appid": "",
+		"setting": {
+			"urlCheck": false
+		},
+		"usingComponents": true
+	},
+	"mp-alipay": {
+		"usingComponents": true
+	},
+	"mp-baidu": {
+		"usingComponents": true
+	},
+	"mp-toutiao": {
+		"usingComponents": true
+	},
+	"uniStatistics": {
+		"enable": false
+	},
+	"vueVersion": "2",
+	"h5": {
+		"router": {
+			"base": "./",
+			"mode": "hash"
+		},
+		"template": "h5.template.html",
+		"optimization": {
+			"treeShaking": {
+				"enable": true
+			}
+		}
+	},
+	"fallbackLocale": "zh-Hans"
+}

+ 1 - 1
pages/article/article.vue

@@ -121,7 +121,7 @@
 			//打开预览e
 			previewOpen(imgs1, index) {
 				this.imgs = imgs1.split("|");
-				setTimeout(()=>this.$refs.previewImage.open(index),0)
+				setTimeout(() => this.$refs.previewImage.open(index), 0)
 				return; //如需测试和uni原生预览差别可注释这两行
 			},
 			loadData() {

+ 5 - 3
pages/login/reg.vue

@@ -270,9 +270,11 @@
 								title: res.data.str,
 								icon: "none",
 							});
-							uni.navigateTo({
-								url: '/pages/login/down'
-							})
+							// setTimeout(function() {
+							// 	uni.navigateTo({
+							// 		url: '/pages/login/down'
+							// 	})
+							// },1000);
 
 							// #endif
 							// setTimeout(function() {}, 1500);

+ 10 - 8
pages/my/step.vue

@@ -168,7 +168,7 @@
 			delTag(tg) {
 				let list_tag2 = [];
 				for (let i = 0; i < this.sel_tags.length; i++) {
-					if (this.sel_tags[i] != tg) {
+					if (this.sel_tags[i] != tg && this.sel_tags[i] != '') {
 						list_tag2.push(this.sel_tags[i]);
 					}
 				}
@@ -191,7 +191,7 @@
 					let tmpTags = [];
 					for (let entry of this.sel_tags) {
 						// console.log(entry); // 1, "string", false
-						if (entry != itm) {
+						if (entry != itm && entry != '') {
 							tmpTags.push(entry);
 						}
 					}
@@ -258,10 +258,10 @@
 						console.log("res", res.data)
 						this.nickname = res.data.nickname;
 						this.wechat = res.data.wechat;
-						this.sex = res.data.sex;
-						this.age = res.data.age;
-						this.height = res.data.height;
-						this.weight = res.data.weight;
+						this.sex = res.data.sex || 2;
+						this.age = res.data.age || 18;
+						this.height = res.data.height || 160;
+						this.weight = res.data.weight || 50;
 						this.xueli_sel = res.data.xueli;
 						this.xinzuo_sel = res.data.xinzuo;
 						this.ziye = res.data.ziye;
@@ -269,8 +269,10 @@
 						if (res.data.avator != "") {
 							this.avator = res.data.avator;
 						}
-						if (res.data.aihao != null) {
-							this.sel_tags = res.data.aihao.split(",");
+						if (res.data.aihao != null && res.data.aihao != undefined) {
+							if (res.data.aihao.length > 0) {
+								this.sel_tags = res.data.aihao.split(",");
+							}
 						}
 					}
 				});