Browse Source

bug 修复

lilei 2 years ago
parent
commit
1e70608d91
2 changed files with 102 additions and 90 deletions
  1. 89 89
      App.vue
  2. 13 1
      pages/shelfSetting/shelfSet.vue

+ 89 - 89
App.vue

@@ -25,103 +25,103 @@
 		},
 		},
 		onLaunch: function() {
 		onLaunch: function() {
 			console.log('App launch')
 			console.log('App launch')
-			// 极光推送
-			if(uni.getSystemInfoSync().platform == "ios"){
-				// 请求定位权限
-				let locationServicesEnabled = jpushModule.locationServicesEnabled()
-				let locationAuthorizationStatus = jpushModule.getLocationAuthorizationStatus()
-				console.log('locationAuthorizationStatus',locationAuthorizationStatus)	
-				if (locationServicesEnabled == true && locationAuthorizationStatus < 3) {
-					jpushModule.requestLocationAuthorization((result)=>{
-						console.log('定位权限',result.status)
-					})
-				}
-				jpushModule.requestNotificationAuthorization((result)=>{
-					let status = result.status
-					if (status < 2) {
-						uni.showToast({
-							icon: 'none',
-							title: '您还没有打开通知权限',
-							duration: 3000
-						})
-					}
-				})
-			}
-			// 初始化
-			jpushModule.initJPushService();
-			jpushModule.setLoggerEnable(true);
-			jpushModule.addConnectEventListener(result=>{
-				let connectEnable = result.connectEnable
-				uni.$emit('connectStatusChange',connectEnable)
-			});
+			// // 极光推送
+			// if(uni.getSystemInfoSync().platform == "ios"){
+			// 	// 请求定位权限
+			// 	let locationServicesEnabled = jpushModule.locationServicesEnabled()
+			// 	let locationAuthorizationStatus = jpushModule.getLocationAuthorizationStatus()
+			// 	console.log('locationAuthorizationStatus',locationAuthorizationStatus)	
+			// 	if (locationServicesEnabled == true && locationAuthorizationStatus < 3) {
+			// 		jpushModule.requestLocationAuthorization((result)=>{
+			// 			console.log('定位权限',result.status)
+			// 		})
+			// 	}
+			// 	jpushModule.requestNotificationAuthorization((result)=>{
+			// 		let status = result.status
+			// 		if (status < 2) {
+			// 			uni.showToast({
+			// 				icon: 'none',
+			// 				title: '您还没有打开通知权限',
+			// 				duration: 3000
+			// 			})
+			// 		}
+			// 	})
+			// }
+			// // 初始化
+			// jpushModule.initJPushService();
+			// jpushModule.setLoggerEnable(true);
+			// jpushModule.addConnectEventListener(result=>{
+			// 	let connectEnable = result.connectEnable
+			// 	uni.$emit('connectStatusChange',connectEnable)
+			// });
 			
 			
-			jpushModule.addNotificationListener(result=>{
-				let notificationEventType = result.notificationEventType
-				let messageID = result.messageID
-				let title = result.title
-				let content = result.content
-				let extras = result.extras
+			// jpushModule.addNotificationListener(result=>{
+			// 	let notificationEventType = result.notificationEventType
+			// 	let messageID = result.messageID
+			// 	let title = result.title
+			// 	let content = result.content
+			// 	let extras = result.extras
 				
 				
-				uni.showToast({
-					icon: 'none',
-					title: JSON.stringify(result),
-					duration: 3000
-				})
-			});
+			// 	uni.showToast({
+			// 		icon: 'none',
+			// 		title: JSON.stringify(result),
+			// 		duration: 3000
+			// 	})
+			// });
 			
 			
-			jpushModule.addCustomMessageListener(result=>{
-				let type = result.type
-				let messageType = result.messageType
-				let content = result.content
-				uni.showToast({
-					icon: 'none',
-					title: JSON.stringify(result),
-					duration: 3000
-				})
-			})
+			// jpushModule.addCustomMessageListener(result=>{
+			// 	let type = result.type
+			// 	let messageType = result.messageType
+			// 	let content = result.content
+			// 	uni.showToast({
+			// 		icon: 'none',
+			// 		title: JSON.stringify(result),
+			// 		duration: 3000
+			// 	})
+			// })
 			
 			
-			jpushModule.addLocalNotificationListener(result=>{
-				let messageID = result.messageID
-				let title = result.title
-				let content = result.content
-				let extras = result.extras
-				uni.showToast({
-					icon: 'none',
-					title: JSON.stringify(result),
-					duration: 3000
-				})
-			})
+			// jpushModule.addLocalNotificationListener(result=>{
+			// 	let messageID = result.messageID
+			// 	let title = result.title
+			// 	let content = result.content
+			// 	let extras = result.extras
+			// 	uni.showToast({
+			// 		icon: 'none',
+			// 		title: JSON.stringify(result),
+			// 		duration: 3000
+			// 	})
+			// })
 			
 			
-			jpushModule.addGeofenceListener(result=>{
-				let code = result.code
-				let type = result.type
-				let geofenceId = result.geofenceId
-				let userInfo = result.userInfo
-				uni.showToast({
-					icon: 'none',
-					title: '触发地理围栏',
-					duration: 3000
-				})
-			})
+			// jpushModule.addGeofenceListener(result=>{
+			// 	let code = result.code
+			// 	let type = result.type
+			// 	let geofenceId = result.geofenceId
+			// 	let userInfo = result.userInfo
+			// 	uni.showToast({
+			// 		icon: 'none',
+			// 		title: '触发地理围栏',
+			// 		duration: 3000
+			// 	})
+			// })
 			
 			
-			jpushModule.setIsAllowedInMessagePop(true)
-			jpushModule.pullInMessage(result=>{
-				let code = result.code
-				console.log(code)
-			})
+			// jpushModule.setIsAllowedInMessagePop(true)
+			// jpushModule.pullInMessage(result=>{
+			// 	let code = result.code
+			// 	console.log(code)
+			// })
 			
 			
-			jpushModule.addInMessageListener(result=>{
-				let eventType = result.eventType
-				let messageType = result.messageType
-				let content = result.content
-				console.log('inMessageListener',eventType,messageType,content)
+			// jpushModule.addInMessageListener(result=>{
+			// 	let eventType = result.eventType
+			// 	let messageType = result.messageType
+			// 	let content = result.content
+			// 	console.log('inMessageListener',eventType,messageType,content)
 				
 				
-				uni.showToast({
-					icon: 'none',
-					title: JSON.stringify(result),
-					duration: 3000
-				})
-			})
+			// 	uni.showToast({
+			// 		icon: 'none',
+			// 		title: JSON.stringify(result),
+			// 		duration: 3000
+			// 	})
+			// })
 		},
 		},
 		onShow: function() {
 		onShow: function() {
 			console.log('App Show')
 			console.log('App Show')

+ 13 - 1
pages/shelfSetting/shelfSet.vue

@@ -26,13 +26,16 @@
 				<view class="label" style="width: 50%;" @click="showTip(1)">是否设置完成 <u-icon color="#ffaa00" name="question-circle"></u-icon></view>
 				<view class="label" style="width: 50%;" @click="showTip(1)">是否设置完成 <u-icon color="#ffaa00" name="question-circle"></u-icon></view>
 				<view class="text" style="width: 50%;text-align: right;"><u-switch v-model="switchVal" @change="switchChange"></u-switch></view>
 				<view class="text" style="width: 50%;text-align: right;"><u-switch v-model="switchVal" @change="switchChange"></u-switch></view>
 			</view>
 			</view>
-			<view class="card-row align_center flex justify_between">
+			<view class="card-row align_center flex justify_between" v-if="showMore">
 				<view class="label" style="width: 40%;" @click="showTip(0)">价格显示 <u-icon color="#ffaa00" name="question-circle"></u-icon></view>
 				<view class="label" style="width: 40%;" @click="showTip(0)">价格显示 <u-icon color="#ffaa00" name="question-circle"></u-icon></view>
 				<view class="text flex align_center" style="width: 60%;text-align: right;" @click="updateShowPrice = true">
 				<view class="text flex align_center" style="width: 60%;text-align: right;" @click="updateShowPrice = true">
 					<text style="width: 80%;flex: 1;">非铺货产品——{{ showPrice == '1' ? '显示': '不显示' }}价格</text>
 					<text style="width: 80%;flex: 1;">非铺货产品——{{ showPrice == '1' ? '显示': '不显示' }}价格</text>
 					<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
 					<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
 				</view>
 				</view>
 			</view>
 			</view>
+			<view class="moreSeting" @click="showMore=!showMore">
+				<text>{{!showMore?'更多设置':'收起'}}</text> <u-icon :name="showMore?'arrow-up':'arrow-down'"></u-icon>
+			</view>
 			<u-action-sheet :list="actionList" @click="clickAction" v-model="updateShowPrice"></u-action-sheet>
 			<u-action-sheet :list="actionList" @click="clickAction" v-model="updateShowPrice"></u-action-sheet>
 		</view>
 		</view>
 		<!-- 货位信息 -->
 		<!-- 货位信息 -->
@@ -98,6 +101,7 @@
 				showDot: false,
 				showDot: false,
 				showPrice: '',
 				showPrice: '',
 				updateShowPrice: false,
 				updateShowPrice: false,
+				showMore: false,
 				actionList:[
 				actionList:[
 					{
 					{
 						text: '非铺货产品——显示价格',
 						text: '非铺货产品——显示价格',
@@ -401,6 +405,14 @@
 			}
 			}
 		}
 		}
 	}
 	}
+	.moreSeting{
+		text-align: center;
+		color: #999;
+		padding: 20upx;
+		> text{
+			margin-right: 10rpx;
+		}
+	}
 }
 }
 .card-box{
 .card-box{
 	background-color: #fff;
 	background-color: #fff;