@dongkboy 1 рік тому
батько
коміт
108871ecee
4 змінених файлів з 163 додано та 142 видалено
  1. 94 94
      App.vue
  2. 2 1
      components/modules/my/my-list-item.vue
  3. 20 0
      pages.json
  4. 47 47
      pages/index/index.vue

+ 94 - 94
App.vue

@@ -57,104 +57,104 @@
 			// #endif
 		},
 		onShow: function(e) {
-			// #ifdef APP-PLUS
-			this.getLocation();
-			// #endif
+			// // #ifdef APP-PLUS
+			// this.getLocation();
+			// // #endif
 		},
 		onHide: function() {},
 		methods: {
-			getLocation() {
-				uni.getLocation({
-					type: 'gcj02', // 根据需要选择坐标类型
-					geocode: true,
-					success: (res) => {
-						this.saveLocation(res);
-						if (this.locationInterval) {
-							clearInterval(this.locationInterval);
-						}
-						// 设置每小时重新获取坐标
-						this.locationInterval = setInterval(() => {
-							this.updateLocation();
-						}, 3600000); // 3600000毫秒 = 1小时
+			// getLocation() {
+			// 	uni.getLocation({
+			// 		type: 'gcj02', // 根据需要选择坐标类型
+			// 		geocode: true,
+			// 		success: (res) => {
+			// 			this.saveLocation(res);
+			// 			if (this.locationInterval) {
+			// 				clearInterval(this.locationInterval);
+			// 			}
+			// 			// 设置每小时重新获取坐标
+			// 			this.locationInterval = setInterval(() => {
+			// 				this.updateLocation();
+			// 			}, 3600000); // 3600000毫秒 = 1小时
 
-						// 重置错误通知状态
-						this.errorNotified = false;
-					},
-					fail: (err) => {
-						if (!this.errorNotified) {
-							this.handleLocationError(err);
-							this.errorNotified = true;
-						}
-					}
-				});
-			},
-			updateLocation() {
-				uni.getLocation({
-					type: 'gcj02',
-					geocode: true,
-					success: (res) => {
-						this.saveLocation(res);
-					},
-					fail: (err) => {
-						if (!this.errorNotified) {
-							this.handleLocationError(err);
-							this.errorNotified = true;
-						}
-					}
-				});
-			},
-			saveLocation(res) {
-				uni.setStorage({
-					key: 'location',
-					data: {
-						latitude: res.latitude,
-						longitude: res.longitude,
-						province: res.address.province,
-						city: res.address.city,
-						district: res.address.district,
-						street: res.address.street,
-						streetNum: res.address.streetNum,
-						poiName: res.address.poiName,
-						cityCode: res.address.cityCode
-					},
-					success: () => {}
-				});
-			},
-			handleLocationError(err) {
-				uni.showModal({
-					title: '获取权限',
-					content: '晋掌柜有道路救援服务,需要获取位置信息',
-					success: ({
-						confirm,
-						cancel
-					}) => {
-						setTimeout(() => {
-							if (confirm) {
-								this.openLocationSettings();
-							}
-							if (cancel) {
-								this.exitApp();
-							}
-						}, 0);
-					}
-				});
-			},
-			openLocationSettings() {
-				if (uni.getSystemInfoSync().platform == 'android') {
-					var Intent = plus.android.importClass('android.content.Intent');
-					var Settings = plus.android.importClass('android.provider.Settings');
-					var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
-					var main = plus.android.runtimeMainActivity();
-					main.startActivity(intent);
-				}
-			},
-			exitApp() {
-				if (plus.os.name === "Android") {
-					plus.runtime.quit();
-				} else {
-					plus.ios.import("UIApplication").sharedApplication().performSelector("exit");
-				}
-			},
+			// 			// 重置错误通知状态
+			// 			this.errorNotified = false;
+			// 		},
+			// 		fail: (err) => {
+			// 			if (!this.errorNotified) {
+			// 				this.handleLocationError(err);
+			// 				this.errorNotified = true;
+			// 			}
+			// 		}
+			// 	});
+			// },
+			// updateLocation() {
+			// 	uni.getLocation({
+			// 		type: 'gcj02',
+			// 		geocode: true,
+			// 		success: (res) => {
+			// 			this.saveLocation(res);
+			// 		},
+			// 		fail: (err) => {
+			// 			if (!this.errorNotified) {
+			// 				this.handleLocationError(err);
+			// 				this.errorNotified = true;
+			// 			}
+			// 		}
+			// 	});
+			// },
+			// saveLocation(res) {
+			// 	uni.setStorage({
+			// 		key: 'location',
+			// 		data: {
+			// 			latitude: res.latitude,
+			// 			longitude: res.longitude,
+			// 			province: res.address.province,
+			// 			city: res.address.city,
+			// 			district: res.address.district,
+			// 			street: res.address.street,
+			// 			streetNum: res.address.streetNum,
+			// 			poiName: res.address.poiName,
+			// 			cityCode: res.address.cityCode
+			// 		},
+			// 		success: () => {}
+			// 	});
+			// },
+			// handleLocationError(err) {
+			// 	uni.showModal({
+			// 		title: '获取权限',
+			// 		content: '晋掌柜有道路救援服务,需要获取位置信息',
+			// 		success: ({
+			// 			confirm,
+			// 			cancel
+			// 		}) => {
+			// 			setTimeout(() => {
+			// 				if (confirm) {
+			// 					this.openLocationSettings();
+			// 				}
+			// 				if (cancel) {
+			// 					this.exitApp();
+			// 				}
+			// 			}, 0);
+			// 		}
+			// 	});
+			// },
+			// openLocationSettings() {
+			// 	if (uni.getSystemInfoSync().platform == 'android') {
+			// 		var Intent = plus.android.importClass('android.content.Intent');
+			// 		var Settings = plus.android.importClass('android.provider.Settings');
+			// 		var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
+			// 		var main = plus.android.runtimeMainActivity();
+			// 		main.startActivity(intent);
+			// 	}
+			// },
+			// exitApp() {
+			// 	if (plus.os.name === "Android") {
+			// 		plus.runtime.quit();
+			// 	} else {
+			// 		plus.ios.import("UIApplication").sharedApplication().performSelector("exit");
+			// 	}
+			// },
 			//  TODO 开屏广告 后续优化添加
 			launch() {
 				try {

+ 2 - 1
components/modules/my/my-list-item.vue

@@ -196,7 +196,8 @@
 	}
 
 	.home-list-item>view:last-child {
-		color: #CCCCCC;
+		color: #333333;
+		font-size: 14px;
 	}
 
 	.home-list-hover {

+ 20 - 0
pages.json

@@ -226,6 +226,26 @@
 				}
 			}
 		},
+		{
+			"path": "pages/set/accountCancellation",
+			"style": {
+				"navigationBarTitleText": "账号注销",
+				"app-plus": {
+					"scrollIndicator": "none", //隐藏滚动条
+					"bounce": "none" //关闭反弹效果
+				}
+			}
+		},
+		{
+			"path": "pages/login/logoutAgreement",
+			"style": {
+				"navigationBarTitleText": "注销协议",
+				"app-plus": {
+					"scrollIndicator": "none", //隐藏滚动条
+					"bounce": "none" //关闭反弹效果
+				}
+			}
+		},
 		{
 			"path": "pages/set/question",
 			"style": {

+ 47 - 47
pages/index/index.vue

@@ -8,6 +8,7 @@
 				<text>{{city}}</text>
 				<image src="../../static/image/index/img/jiantou.png" mode="" style="width: 12px;height: 12px;"></image>
 			</view>
+
 			<view class="search" :style="{opacity:featureHideHandling?1:0}">
 				<u-search :show-action="true" action-text="搜索" bg-color="#fff" maxlength="10" placeholder="请输入关键词"
 					:clearabled="false" :action-style="{position: 'absolute',right:'10px'}" search-icon="0">
@@ -222,7 +223,7 @@
 						cat_id: 2,
 						img: '/static/image/index/category-img/3.png',
 						title: '道路救援',
-						src: '/pages/roadRescue/index',
+						// src: '/pages/roadRescue/index',
 						width: '92rpx',
 						height: '69rpx',
 					},
@@ -388,11 +389,10 @@
 				}
 			};
 		},
-
+		async onLoad() {},
 		computed: {
 			...mapState(['userInfo', 'featureHideHandling'])
 		},
-
 		onPageScroll(e) {
 			//兼容iOS端下拉时顶部漂移
 			if (e.scrollTop >= 0) {
@@ -414,12 +414,12 @@
 			}
 			this.initializeCategoryList();
 			// #ifdef APP-PLUS
-			this.getCurrentLocation();
-			this.soketInit();
+			// this.getCurrentLocation();
+			// this.soketInit();
 			// #endif
 
 		},
-		async onLoad() {},
+
 		async onPullDownRefresh() {
 			await this.loginUser();
 			uni.stopPullDownRefresh();
@@ -469,48 +469,48 @@
 				})
 			},
 			//初始化websoket连接
-			soketInit() {
-				uni.connectSocket({
-					url: base.socketUrl + '/' + this.userInfo.sysUser.id,
-					method: 'GET',
-
-				});
-				uni.onSocketOpen((res) => {
-					console.log(res, '已打开');
-					this.socketOpen = true;
-					this.sendMessage();
-				});
-			},
+			// soketInit() {
+			// 	uni.connectSocket({
+			// 		url: base.socketUrl + '/' + this.userInfo.sysUser.id,
+			// 		method: 'GET',
+
+			// 	});
+			// 	uni.onSocketOpen((res) => {
+			// 		console.log(res, '已打开');
+			// 		this.socketOpen = true;
+			// 		this.sendMessage();
+			// 	});
+			// },
 			//发送信息
-			sendMessage() {
-				if (this.longitude) {
-					const dataToSend = {
-						userId: this.userInfo.sysUser.id,
-						longitude: this.longitude,
-						latitude: this.latitude,
-						province: this.province,
-						city: this.city,
-						district: this.district,
-						street: this.street,
-						streetNum: this.streetNum,
-						poiName: this.poiName,
-						cityCode: this.cityCode
-					};
-					console.log("首次消息", dataToSend);
-					if (this.socketOpen) {
-						uni.sendSocketMessage({
-							data: JSON.stringify(dataToSend)
-						})
-						if (this.messageInterval) {
-							clearInterval(this.messageInterval);
-						}
-						this.messageInterval = setInterval(async () => {
-							await this.getCurrentLocation();
-							await this.updatesendMessage();
-						}, 120000); // 120000毫秒 = 2分钟	
-					}
-				}
-			},
+			// sendMessage() {
+			// 	if (this.longitude) {
+			// 		const dataToSend = {
+			// 			userId: this.userInfo.sysUser.id,
+			// 			longitude: this.longitude,
+			// 			latitude: this.latitude,
+			// 			province: this.province,
+			// 			city: this.city,
+			// 			district: this.district,
+			// 			street: this.street,
+			// 			streetNum: this.streetNum,
+			// 			poiName: this.poiName,
+			// 			cityCode: this.cityCode
+			// 		};
+			// 		console.log("首次消息", dataToSend);
+			// 		if (this.socketOpen) {
+			// 			uni.sendSocketMessage({
+			// 				data: JSON.stringify(dataToSend)
+			// 			})
+			// 			if (this.messageInterval) {
+			// 				clearInterval(this.messageInterval);
+			// 			}
+			// 			this.messageInterval = setInterval(async () => {
+			// 				await this.getCurrentLocation();
+			// 				await this.updatesendMessage();
+			// 			}, 120000); // 120000毫秒 = 2分钟	
+			// 		}
+			// 	}
+			// },
 
 			getCurrentLocation() {
 				//获取当前的地理位置