Quellcode durchsuchen

添加新手引导,修复相关问题

slambb vor 4 Jahren
Ursprung
Commit
d6e0854588

+ 2 - 2
common/config.js

@@ -9,9 +9,9 @@ const active = "dev";
 //线上地址,腾讯云服务器
 // const host="https://www.9527fun.cn/api_prd"
 //测试地址,阿里云服务器
-// const host="https://www.9527fun.cn/api_dev"
+const host="https://www.9527fun.cn/api_dev"
 //本地测试地址
-const host = "http://192.168.1.15:9090/api_dev"
+// const host = "http://192.168.1.11:9090/api_dev"
 // const host = "http://192.168.0.112:9090/api_dev"
 // const host = "http://47.104.216.192:9090/api_dev"
 // const host = "http://121.4.103.151:9090/api_prd"

+ 34 - 27
components/modal/action-jump/action-jump.vue

@@ -48,8 +48,8 @@
 					<view style="margin-top: 12rpx;">{{jumpSpeed}}</view>
 				</view>
 			</view>
-			<view class="flex" style="position: relative;" @click="onControllerPlay">
-				<image style="width: 112px;height: 111px;" src="../../../static/modal/action-jump/midButton.png">
+			<view id="ActionJumpPlay" class="flex" style="position: relative;" @click="onControllerPlay">
+				<image style="width: 110px;height: 110px;" src="../../../static/modal/action-jump/midButton.png">
 				</image>
 
 				<image v-if="!bJumpPlay" class="mid-absolute" style=" width: 28rpx;height: 28rpx;"
@@ -82,13 +82,13 @@
 			<button @click="onChangeX">X为旋转轴</button>
 		</view> -->
 
-		<view style="display: flex;justify-content: space-between;" class="margin-top margin-bottom">
+		<!-- <view style="display: flex;justify-content: space-between;" class="margin-top margin-bottom">
 			<button @click="onJumpType(0)">jump</button>
 			<button @click="onJumpType(1)">left</button>
 			<button @click="onJumpType(2)">right</button>
 			<button @click="onJumpType(3)">rLeft</button>
 			<button @click="onJumpType(4)">rRight</button>
-		</view>
+		</view> -->
 
 		<!-- <view style="display: flex;justify-content: space-around; padding-bottom: 100rpx;">
 			<view style="font-size: 14px;">t:{{countdown}}</view>
@@ -248,12 +248,12 @@
 				roundingCount: 0,
 				//游戏结束
 				isGameOver: false,
-				
-				
+
+
 				//pk模式下操作
-				leftShowCurCount:0,
-				rightShowCurCount:0,
-				isleftPlayer:true
+				leftShowCurCount: 0,
+				rightShowCurCount: 0,
+				isleftPlayer: true
 			}
 		},
 		watch: {
@@ -384,7 +384,7 @@
 					this.countdownInterval = null;
 				}
 
-				this.resetCountdown(60);
+				// this.resetCountdown(60);
 
 			},
 			startJumpGame() {
@@ -474,17 +474,17 @@
 				this.level++;
 
 				//倒计时
-				this.countdownInterval = setInterval(() => {
-					if (this.countdown <= 0) {
-						clearInterval(this.countdownInterval);
-						this.countdownInterval = null;
-						//处理下一个关卡
-						// console.warn('时间到,处理下一个关卡');
-						this.startJumpGame();
-						return;
-					}
-					this.setCountdown(1);
-				}, 1000);
+				// this.countdownInterval = setInterval(() => {
+				// 	if (this.countdown <= 0) {
+				// 		clearInterval(this.countdownInterval);
+				// 		this.countdownInterval = null;
+				// 		//处理下一个关卡
+				// 		// console.warn('时间到,处理下一个关卡');
+				// 		this.startJumpGame();
+				// 		return;
+				// 	}
+				// 	this.setCountdown(1);
+				// }, 1000);
 
 				this.onDraw();
 			},
@@ -738,10 +738,10 @@
 					eliminationCount: this.eliminationCount,
 					faultCount: this.faultCount
 				});
-				
+
 				//如果是pk模式。不走下面判断
-				if(this.currentMode == 'pkMode')return;
-				
+				if (this.currentMode == 'pkMode') return;
+
 				if (CONDITIONPASSED.ENERGYBARFULL == this.taskConditionPassed.limitType) {
 					//能量条的条件下才显示能量条动
 					//取两位后计算Math floor,不然会有偏差值问题  Math.floor(39.9999999+ 0.1111111) = 39
@@ -798,7 +798,7 @@
 				});
 				this.$emit('gameOver', {
 					myWin: myWin,
-					type:'calorieMode'
+					type: 'calorieMode'
 				});
 			},
 			//pk模式下结束游戏关卡
@@ -808,9 +808,9 @@
 				this.onClear();
 				this.onClearData();
 				this._changePlay();
-				
+
 				this.$emit('gameOver', {
-					type:'pkMode'
+					type: 'pkMode'
 				});
 			},
 			setFaultCount(value) {
@@ -1081,6 +1081,13 @@
 			},
 			onChangeX() {
 				this.isY = false;
+			},
+			onGetActionJumpPlayView(callback) {
+				let view = uni.createSelectorQuery().select('#ActionJumpPlay');
+				view.boundingClientRect(data => {
+					if (callback)
+						callback(data);
+				}).exec();
 			}
 		}
 	}

+ 9 - 1
components/round-fab/round-fab.vue

@@ -26,7 +26,7 @@
 				<view v-if="flexDirectionEnd || horizontalRight" class="uni-fab__item uni-fab__item--first" />
 			</view>
 		</view>
-		<view :class="{
+		<view id='RoundFabID' :class="{
 		  'uni-fab__circle--leftBottom': leftBottom,
 		  'uni-fab__circle--rightBottom': rightBottom,
 		  'uni-fab__circle--leftTop': leftTop,
@@ -218,6 +218,14 @@
 				} else {
 					return this.isShow && this.direction === paramA ? this.contentWidth : this.contentWidthMin
 				}
+			},
+			
+			onGetRoundFabView(callback){
+				let view = uni.createSelectorQuery().select('#RoundFabID');
+				view.boundingClientRect(data => {
+					if (callback)
+						callback(data);
+				}).exec();
 			}
 		}
 	}

+ 1 - 1
components/uni-count-down/uni-count-down.vue

@@ -122,7 +122,7 @@
 			countDown() {
 				let seconds = this.seconds
 				let [day, hour, minute, second] = [0, 0, 0, 0]
-				if (seconds > 0) {
+				if (seconds >= 0) {
 					day = Math.floor(seconds / (60 * 60 * 24))
 					hour = Math.floor(seconds / (60 * 60)) - (day * 24)
 					minute = Math.floor(seconds / 60) - (day * 24 * 60) - (hour * 60)

+ 11 - 0
pages.json

@@ -302,6 +302,17 @@
 								// "height": "100%",
 								"background": "transparent"
 							}
+						}, {
+							"id": "personal-guide",
+							"path": "../../platform/app-plus/subNVue/guide",
+							"type": "popup",
+							"style": {
+								"margin": "auto",
+								// "width": "100%",
+								// "height": "100%",
+								"background": "transparent",
+								"mask":"rgba(0,0,0,0)"
+							}
 						}]
 					}
 				}

+ 0 - 2
pages/my-page/firstPlan/firstPlan.vue

@@ -160,7 +160,6 @@
 					if (dateSpan > 0) {
 						this.startTime = date.formatDate(nDate);
 						this.currentPlanData.startTime = date.formatTime(nDate);
-						// this.currentDays = date.datedifference(this.startTime, this.endTime);
 						this.currentDays = Math.floor(Math.abs(dateSpan) / (24 * 3600 * 1000));
 					} else {
 						uni.showToast({
@@ -182,7 +181,6 @@
 					if (dateSpan > 0) {
 						this.endTime = date.formatDate(nDate);
 						this.currentPlanData.endTime = date.formatTime(nDate);
-						// this.currentDays = date.datedifference(this.startTime, this.endTime);
 						this.currentDays = Math.floor(Math.abs(dateSpan) / (24 * 3600 * 1000));
 					} else {
 						uni.showToast({

+ 248 - 83
pages/personal-page/personal/personal.vue

@@ -233,9 +233,8 @@
 									:levelData="currentJumpTask!=null?currentJumpTask.item:null"
 									:currentMode="currentMode" @actionJumpCheck="onPersonalCheck"
 									@actionJumpControllerPlay="onActionControlPlay"
-									@actionJumpDataUpdate="onActionJumpDataUpdate"
-									@actionJumpCountDownUpdate="onActionJumpCountDownUpdate"
-									@gameOver="onActionJumpGameOver"></action-jump>
+									@actionJumpDataUpdate="onActionJumpDataUpdate" @gameOver="onActionJumpGameOver">
+								</action-jump>
 							</view>
 							<!-- <button @tap="onTestAddLocalCalorie">11</button> -->
 						</view>
@@ -255,8 +254,19 @@
 				<button @click="showDrawer">显示抽屉</button>
 			</view> -->
 			<!-- <view class="example">
-				<button @click="showPopup('signIn',null)">显示 每日签到</button>
+				<button @click="showPopup('pkFinish',null)">显示 pk奖励</button>
 			</view> -->
+			<!-- guide -->
+			<!-- <view class="example">
+				<button @click="showGuide('device-tip',null)">显示 device-tip</button>
+			</view>
+			<view class="example">
+				<button @click="onGetActionJumpView()">显示 onGetActionJumpView</button>
+			</view>
+			<view class="example">
+				<button @click="onGetBluetoothConnectView()">显示 bluetoothConnect</button>
+			</view>
+ -->
 			<view class="example" style="margin-top: 10rpx;">
 				<button @click="onNavToDirection">跳转校准页面</button>
 			</view>
@@ -271,10 +281,12 @@
 		</view>
 
 		<!-- 右下角导航栏 -->
-		<round-fab :connect="cIndex!=-1 && BLEConnectDevice!=null" @fabClick="fabClick"></round-fab>
+		<round-fab ref="roundFabRef" :connect="cIndex!=-1 && BLEConnectDevice!=null" @fabClick="fabClick"></round-fab>
 
-		<!-- 侧边栏 -->
+		<!-- 侧边栏 如果app使用 nvue 侧边栏 -->
+		<!-- #ifdef H5 || MP-WEIXIN -->
 		<sideBar ref="sideBar"></sideBar>
+		<!-- #endif -->
 
 		<!-- 训练卡 -->
 		<view class="cu-modal " :class="modalName == 'sportCompletion' ? '' : ''">
@@ -743,12 +755,12 @@
 					myUsageTime: 0,
 					otherUsageTime: 0,
 					isLeftPlayer: true,
-					isFinish:false,
+					isFinish: false,
 					gameLimitTime: 0,
 					describe: '', //关卡说明
-					
+
 				},
-				defaultAJData:null,
+				defaultAJData: null,
 
 				/**
 				 * 任务参数
@@ -869,7 +881,7 @@
 			// 	this.$testWS.sendSocketMessage('unity');
 			// });
 			//复制一个默认参数
-			this.defaultAJData = Object.assign({},this.AJData);
+			this.defaultAJData = Object.assign({}, this.AJData);
 		},
 		onShow() {
 			_self.bHide = false;
@@ -930,21 +942,28 @@
 		},
 		onReady() {
 			// 计算屏幕剩余高度  填补剩余高度
-			let phoneHeight = this.systemInfo.windowHeight;
-
-			console.log('计算屏幕剩余高度 ===:', phoneHeight, this.systemInfo);
 			// 计算组件的高度
-			_self.scrollviewHight = phoneHeight - this.navHeight - this.tabbarHeight - 16 - this.systemInfo
+			_self.scrollviewHight = this.systemInfo.windowHeight - this.navHeight - this.tabbarHeight - 16 - this
+				.systemInfo
 				.statusBarHeight;
-			// let view = uni.createSelectorQuery().select('#nav-bar');
-			// view.boundingClientRect(data => {
-			// 	// console.log('data===:', data);
-			// 	if (data != null) {
-			// 		_self.navHeight = data.height;
-			// 		_self.scrollviewHight = _self.phoneHeight - _self.navHeight;
-			// 		_self.topScrollHight = _self.phoneHeight - _self.navHeight - 30;
+
+			// #ifdef APP-PLUS
+			//制作一个新手引导,以nvue为主。
+			//第一步提示设置计划,之后在回调registerPopupEvent 中处理
+			this.showGuide('plan', null);
+			// if (!this.bNewGuide) {
+				
+			// } else {
+			// 	//添加设备绑腿提示
+			// 	//guide.nvue 里面存储
+			// 	const value = uni.getStorageSync('deviceDirectionPrompt');
+			// 	if (!value && !value.isSelected) {
+			// 		this.showGuide('device-tip', null);
 			// 	}
-			// }).exec();
+			// }
+			// #endif
+
+
 
 		},
 		onUnload() {
@@ -989,7 +1008,7 @@
 				'setActionJumpTask', 'getLevelList',
 				'getUserWallets', 'setGoldAndDiamond',
 				'onConvertDeviceData',
-				'showDrawerById', 'showPopupById'
+				'showDrawerById', 'showPopupById', 'showGuideById'
 			]),
 			BasicsSteps() {
 				this.basics = this.basics == this.basicsList.length - 1 ? 0 : this.basics + 1
@@ -1048,6 +1067,7 @@
 			arcbarCountDownTimeUpdate(data) {
 				this.AJData.gameCountDown = data.curSeconds;
 				this.updateArcbarDataFromActionJump();
+				this.onActionJumpCountDownUpdate();
 			},
 			arcbarCountDownTimeReset() {
 				//清除时间计时器
@@ -1679,8 +1699,8 @@
 
 			//判断是否有其他限制
 			onStartCheck() {
-				//#ifdef H5 || APP-PLUS
-				// 直接走测试,如果是h5
+				//#ifdef H5
+				// 直接走测试,如果是h5 APP-PLUS
 				if (0 === this.currentModeIndex) {
 					this.onBoxingGuideFinish();
 				} else if (1 === this.currentModeIndex) {
@@ -1692,7 +1712,7 @@
 						})
 						return;
 					}
-					if (this.currentMode == 'pkMode' && this.finallySelectFriendInfo==null) {
+					if (this.currentMode == 'pkMode' && this.finallySelectFriendInfo == null) {
 						uni.showToast({
 							title: '选择一个pk好友',
 							icon: 'none',
@@ -1751,41 +1771,55 @@
 							title: '请连接蓝牙设备',
 							icon: 'none'
 						})
-						this.toView = "addDeviceView";
+						// this.toView = "addDeviceView";
 						return;
 					}
 				}
 
 
 				//3.检测一下计划日期
-				console.log(this.remainingDays);
-				// if (this.planData.startTime > this.planData.endTime || this.remainingDays == 0) {
-				// 	if (!this.$store.state.bPlanExpired) {
-				// 		this.$store.state.bPlanExpired = true;
-				// 		setTimeout(() => {
-				// 			this.$store.state.bPlanExpired = false;
-				// 		}, 3000)
-				// 		uni.showToast({
-				// 			title: "计划到期,请制定计划。",
-				// 			icon: 'none'
-				// 		})
-				// 	}
+				console.log("remainingDays == >", this.planData, this.remainingDays);
+				if (date.formatDate(new Date()) > this.planData.endTime || this.remainingDays == 0) {
+					if (!this.$store.state.bPlanExpired) {
+						this.$store.state.bPlanExpired = true;
+						setTimeout(() => {
+							this.$store.state.bPlanExpired = false;
+						}, 3000)
+						// uni.showToast({
+						// 	title: "计划到期,请制定计划。",
+						// 	icon: 'none'
+						// })
+						uni.showModal({
+							title: '提醒',
+							content: '计划到期,请制定新计划。',
+							confirmText: '去制定',
+							success: (res) => {
+								if (res.confirm) {
+									uni.switchTab({
+										url: "../plan/plan"
+									})
+								}
+							}
+						})
+					}
 
-				// 	this.$store.state.bGuidePages = true;
-				// 	setTimeout(() => {
-				// 		this.$refs.codeElfGuide.setCurrent(0);
-				// 	}, 0)
-				// 	this.toView = "projectButtonView";
-				// 	return;
-				// }
+					// this.$store.state.bGuidePages = true;
+					// setTimeout(() => {
+					// 	this.$refs.codeElfGuide.setCurrent(0);
+					// }, 0)
+					// this.toView = "projectButtonView";
+					// // #ifdef APP-PLUS
+					// this.showGuide('plan', null)
+					// // #endif
+
+					return;
+				}
 
 				if (0 === this.currentModeIndex) {
 
 					//如果新手,调用新手教程
 					console.log("this.bNewGuide:", this.bNewGuide);
-					// this.$store.state.bNewGuide = true;
 					if (this.bNewGuide) {
-						// this.$refs.boxingPostRef.onGuideBoxingPostPlay();
 						// 拳击的新手提示
 						this.$store.state.bGuidePages = true;
 						this.guideCurrent = 5;
@@ -1854,7 +1888,7 @@
 			onPersonalCheck() {
 
 				if (1 === this.currentModeIndex) {
-					if(this.currentJumpTask == null){
+					if (this.currentJumpTask == null) {
 						uni.showToast({
 							title: '先选一个挑战关卡',
 							icon: 'none',
@@ -1862,7 +1896,7 @@
 						})
 						return;
 					}
-					if (this.currentMode == 'pkMode' && this.finallySelectFriendInfo==null) {
+					if (this.currentMode == 'pkMode' && this.finallySelectFriendInfo == null) {
 						uni.showToast({
 							title: '选择一个pk好友',
 							icon: 'none',
@@ -2117,22 +2151,22 @@
 
 					}
 					uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
-					if(1 === this.currentModeIndex){
-						if(this.currentMode == "calorieMode"){
+					if (1 === this.currentModeIndex) {
+						if (this.currentMode == "calorieMode") {
 							this.syncRequestEvent({
 								success: () => {
 									this.updateArcbarData();
 								}
 							});
 						}
-					}else{
+					} else {
 						this.syncRequestEvent({
 							success: () => {
 								this.updateArcbarData();
 							}
 						});
 					}
-					
+
 				} else {
 					//如果不是,继续调用播放
 					if (0 === this.currentModeIndex) {
@@ -2274,6 +2308,41 @@
 				}).exec();
 			},
 
+			onGetActionJumpView() {
+				
+				this.$nextTick(() => {
+					this.toView = "actionJumpID"
+				});
+				this.toView = '' //不清空再次跳到锚点位置会不起作用
+				
+				setTimeout(()=>{
+					_self.$refs.actionJumpRef.onGetActionJumpPlayView((data) => {
+						console.log(JSON.stringify(data));
+						// #ifdef APP-PLUS
+						_self.showGuide('actionJumpPlay', data);
+						// #endif
+					});
+				},200)
+				
+			},
+			onGetBluetoothConnectView() {
+
+				_self.$refs.roundFabRef.onGetRoundFabView((data) => {
+					console.log(JSON.stringify(data));
+					// #ifdef APP-PLUS
+					_self.showGuide('bluetoothConnect', data);
+					// #endif
+				});
+				// let view = uni.createSelectorQuery().select('#roundFabID');
+				// view.boundingClientRect(data => {
+				// 	console.log(JSON.stringify(data));
+				// 	// #ifdef APP-PLUS
+				// 	_self.showGuide('bluetoothConnect', data);
+				// 	// #endif
+				// }).exec();
+
+			},
+
 			//拳击模块的回调
 			boxingUpdateCalorie(calorie) {
 				if (this.currentMode != 'pkMode') {
@@ -2529,22 +2598,28 @@
 				if (this.currentMode == "pkMode") {
 					if (this.AJData.isLeftPlayer) {
 						this.AJData.myScore = obj.eliminationCount - obj.faultCount;
-						this.AJData.myUsageTime = this.AJData.gameLimitTime - this.AJData.perCountDown;
 					} else {
 						this.AJData.otherScore = obj.eliminationCount - obj.faultCount;
-						this.AJData.otherUsageTime = this.AJData.gameLimitTime - this.AJData.perCountDown;
 					}
 				}
+				// console.log(this.AJData.myUsageTime, this.AJData.otherUsageTime);
 
 			},
 			onActionJumpCountDownUpdate(obj) {
-				// console.log(obj);
-				this.AJData.perCountDown = obj.countDown;
+				// this.AJData.perCountDown = obj.countDown;
+				if (this.currentMode == "pkMode") {
+					if (this.AJData.isLeftPlayer) {
+						this.AJData.myUsageTime = this.AJData.gameLimitTime - this.AJData.gameCountDown;
+					} else {
+						this.AJData.otherUsageTime = this.AJData.gameLimitTime - this.AJData.gameCountDown;
+					}
+				}
+				// console.log(this.AJData.myUsageTime, this.AJData.otherUsageTime, this.AJData.gameLimitTime);
 			},
 			//actionJump 模块跳关卡开始处理
 			onActionJumpPlay() {
 				//开始时候,设置默认参数
-				if(this.AJData.isFinish){
+				if (this.AJData.isFinish) {
 					//如果下一局,重新设置一下默认参数
 					this.onResetDefaultActionJumpData();
 				}
@@ -2558,7 +2633,7 @@
 			},
 			//重置actionJump数据
 			onResetDefaultActionJumpData() {
-				this.AJData = Object.assign({},this.defaultAJData);
+				this.AJData = Object.assign({}, this.defaultAJData);
 			},
 			onSetActionJumpData() {
 				let _item = this.currentJumpTask.item;
@@ -2593,45 +2668,82 @@
 						})
 					} else {
 						this.AJData.isFinish = true;
+						//奖励赢的人 PKLEVELREWARD
+						let _item = this.currentJumpTask.item;
+						let _curFriend = this.finallySelectFriendInfo;
+						console.log('this.finallySelectFriendInfo:', this.finallySelectFriendInfo);
+
 						let isMyWin = true;
 						//如果是右边好友,即判断结束。计算胜负关系
 						if (this.AJData.myScore > this.AJData.otherScore) {
 							//规定时间内,跳得最多
-							uni.showToast({
-								title: '我赢!!',
-								duration: 2000
-							})
+							// uni.showToast({
+							// 	title: '我赢!!',
+							// 	duration: 2000
+							// })
 							isMyWin = true;
+
+							//显示一个提示框
+							this.showPopup('pkFinish', {
+								name: this.username,
+								url: this.avatarUrl,
+								score: this.AJData.myScore,
+								consumeTime: Math.abs(this.AJData.myUsageTime),
+								hit: this.AJData.allCount - this.AJData.faultCount,
+								miss: this.AJData.faultCount
+							});
+							console.log({
+								name: this.username,
+								url: this.avatarUrl,
+								score: this.AJData.myScore,
+								consumeTime: Math.abs(this.AJData.myUsageTime),
+								hit: this.AJData.allCount - this.AJData.faultCount,
+								miss: this.AJData.faultCount
+							});
 						} else {
-							uni.showToast({
-								title: '好友赢或者平局',
-								duration: 2000
-							})
+							// uni.showToast({
+							// 	title: '好友赢或者平局',
+							// 	duration: 2000
+							// })
 							isMyWin = false;
+
+							//显示一个提示框
+							this.showPopup('pkFinish', {
+								name: _curFriend.username,
+								url: _curFriend.avatarUrl,
+								score: this.AJData.otherScore,
+								consumeTime: this.AJData.otherUsageTime,
+								hit: this.AJData.allCount - this.AJData.faultCount,
+								miss: this.AJData.faultCount
+							});
 						}
-						//奖励赢的人 PKLEVELREWARD
-						let _item = this.currentJumpTask.item;
-						let _curFriend = this.finallySelectFriendInfo;
-						console.log('this.finallySelectFriendInfo:',this.finallySelectFriendInfo);
+
 						reqUtil
 							.requestData(config.URL.PKLEVELREWARD, {
 								levelId: _item.id,
 								levelType: 1,
-								isMyWin:isMyWin,
-								friendId:_curFriend.friendId
+								isMyWin: isMyWin,
+								friendId: _curFriend.friendId
 							})
 							.then(
 								res => {
 									if (res.code == 0) {
 										console.log('PKLEVELREWARD:' + JSON.stringify(res.data));
-										if(isMyWin){
+										this.nextTaskCanUnlock = false;
+										for (let i = 0; i < this.currentTaskList.length; i++) {
+											if (this.currentTaskList[i].id == _item.id) {
+												this.currentTaskList[i].isPassed = true;
+												break;
+											}
+										}
+										if (isMyWin) {
 											//只有isMyWin的情况下才有这两个字段返回,更新本地金币和钻石
 											this.setGoldAndDiamond({
 												gold: res.data.gold,
 												diamond: res.data.diamond
 											});
 										}
-						
+
 									}
 								},
 								e => {
@@ -2702,7 +2814,16 @@
 				this.showDrawerById();
 			},
 			showPopup(type, item) {
-				this.showPopupById({type,item});
+				this.showPopupById({
+					type,
+					item
+				});
+			},
+			showGuide(type, item) {
+				this.showGuideById({
+					type,
+					item
+				});
 			},
 			/**
 			 * 任务相关
@@ -2755,7 +2876,10 @@
 				this.switchTaskInfo();
 			},
 			onPassTheLevel() {
-
+				if (this.currentMode == "pkMode") {
+					this.AJData.myScore = 10;
+					this.AJData.isLeftPlayer = false;
+				}
 				this.onActionJumpGameOver({
 					myWin: true
 				});
@@ -2830,11 +2954,20 @@
 														}
 													}
 												} else if (res.code === 803) {
-													uni.showToast({
-														title: '需要' + res.data[0].explain,
-														icon: 'none',
-														duration: 2000
-													})
+													if (res.data.length > 0) {
+														uni.showToast({
+															title: '需要' + res.data[0].explain,
+															icon: 'none',
+															duration: 2000
+														})
+													} else {
+														uni.showToast({
+															title: '关卡条件关联未设置',
+															icon: 'none',
+															duration: 2000
+														})
+													}
+
 												} else if (res.code === 802 || res.code === 805) {
 													uni.showToast({
 														title: res.msg,
@@ -2865,10 +2998,42 @@
 						icon: "none"
 					});
 				})
+
+				uni.$on('guide-popup-page', (data) => {
+					// console.log('guide-popup-page', JSON.stringify(data));
+					switch (data.type) {
+						case 'button':
+							if (data.messageType == 'plan') {
+								if (data.confirm) {
+									//跳转提示蓝牙
+									this.onGetBluetoothConnectView();
+								}
+							} else if (data.messageType == 'bluetoothConnect') {
+								if (data.confirm) {
+									//跳转播放
+									this.onGetActionJumpView();
+								}
+							} else if (data.messageType == 'actionJumpPlay') {
+								if (data.confirm) {
+									setTimeout(() => {
+										this.showGuide('device-tip', null);
+									}, 30)
+								}
+							}
+
+							break;
+						default:
+							uni.showToast({
+								title: data.title,
+							})
+							break;
+					}
+				})
 			},
 			unregisterPopupEvent() {
 				uni.$off('reward-popup-page')
 				uni.$off('drawer-page')
+				uni.$off('guide-popup-page')
 			},
 
 			onNavToDirection() {

+ 0 - 2
pages/personal-page/plan/plan.vue

@@ -176,7 +176,6 @@
 					if (dateSpan > 0) {
 						this.startTime = date.formatDate(nDate);
 						this.currentPlanData.startTime = date.formatTime(nDate);
-						// this.currentDays = date.datedifference(this.startTime, this.endTime);
 						this.currentDays = Math.floor(Math.abs(dateSpan) / (24 * 3600 * 1000));
 					} else {
 						uni.showToast({
@@ -198,7 +197,6 @@
 					if (dateSpan > 0) {
 						this.endTime = date.formatDate(nDate);
 						this.currentPlanData.endTime = date.formatTime(nDate);
-						// this.currentDays = date.datedifference(this.startTime, this.endTime);
 						this.currentDays = Math.floor(Math.abs(dateSpan) / (24 * 3600 * 1000));
 					} else {
 						uni.showToast({

+ 332 - 0
platform/app-plus/subNVue/guide.nvue

@@ -0,0 +1,332 @@
+<template>
+	<view class="guide-wrapper">
+
+		<view v-if="currentType == 'device-tip'"
+			class="guide-container justify-center align-center position-relative mask-bg-07">
+			<view class="mid">
+				<image class="bind-tip-image" src="../../../static/modal/tip/bind-tip-bg.png"></image>
+				<text class="text-16px text-center text-white"
+					style="width: 500rpx;margin-bottom: 130rpx;">请将手柄十字键朝上插入绑带中,佩戴在右侧小腿侧面</text>
+				<view class="flex flex-direction-row" @click="switchSelected()">
+					<image v-if="!isSelected" style="width: 40rpx;height: 40rpx; margin-right: 20rpx;"
+						src="../../../static/common/subNVue/guide/check-box.png"></image>
+					<image v-else style="width: 40rpx;height: 40rpx; margin-right: 20rpx;"
+						src="../../../static/common/subNVue/guide/check-box-selected.png"></image>
+					<text class="text-15px text-white">不再提示</text>
+				</view>
+			</view>
+		</view>
+		<view v-if="currentType == 'plan'" class="guide-container position-relative" @click="buttonMessage('confirm')">
+
+			<!-- top: 55px; 相当于 上间隔 -->
+			<view class="mask-bg-07" :style="{height:guideHeight+'px'}"></view>
+			<!-- 中心位置 225 -->
+			<view style="width: 750rpx;height: 284px;">
+				<view style="height: 200px;" class="mask-bg-07">
+					<view class="position-absolute-center" style="top: 0;left:100rpx;">
+						<image style="width: 488rpx;height: 366rpx;"
+							src="../../../static/common/subNVue/guide/guide-plan@3x.png">
+						</image>
+					</view>
+					<view class="position-absolute-center">
+						<text class="text-white text-14px" style="top: -30rpx;left:90rpx;">运动开始前设置一下计划</text>
+					</view>
+				</view>
+				<view style="width: 750rpx;height: 120px;" class="flex flex-direction-row">
+					<view style="width: 30px;" class="mask-bg-07"></view>
+					<image style="width: 150px;height: 150px; opacity: 0.7;"
+						src="../../../static/common/subNVue/guide/guide-rect-mask.png"></image>
+					<view class="mask-bg-07 flex-sub"></view>
+				</view>
+			</view>
+			<!-- 计算剩余空白 -->
+			<view class="mask-bg-07 flex-sub"></view>
+
+		</view>
+
+		<view v-if="currentType == 'actionJumpPlay'" class="guide-container position-relative"
+			@click="buttonMessage('confirm')">
+			<!-- top: 55px; 相当于 上间隔 -->
+			<view class="mask-bg-07" :style="{height:guideHeight+'px'}"></view>
+			<!-- 中心位置 275 -->
+			<view style="width: 750rpx;height: 350px;">
+				<view style="height: 200px;" class="mask-bg-07">
+					<view class="position-absolute-center" style="top: 0;left:100rpx;">
+						<image style="width: 488rpx;height: 366rpx;"
+							src="../../../static/common/subNVue/guide/guide-mid.png">
+						</image>
+					</view>
+					<view class="position-absolute-center">
+						<text class="text-white text-14px" style="top: -30rpx;left:80rpx;">点击开始进行</text>
+					</view>
+				</view>
+				<view style="width: 750rpx;height: 150px;" class="flex flex-direction-row">
+					<view style="width: 166rpx;" class="mask-bg-07"></view>
+					<image style="width: 200px;height: 200px; opacity: 0.7;top: -63rpx;"
+						src="../../../static/common/subNVue/guide/guide-circle-mask.png"></image>
+					<view class="mask-bg-07 flex-sub"></view>
+				</view>
+			</view>
+			<!-- 计算剩余空白 -->
+			<view class="mask-bg-07 flex-sub"></view>
+		</view>
+		<view v-if="currentType == 'bluetoothConnect'" class="guide-container position-relative"
+			@click="buttonMessage('confirm')">
+			<!-- top: 55px; 相当于 上间隔 -->
+			<view class="mask-bg-07" :style="{height:guideHeight+'px'}"></view>
+			<!-- 中心位置 225 -->
+			<view style="width: 750rpx;height: 284px;">
+				<view style="height: 200px;" class="mask-bg-07">
+					<view class="position-absolute-center" style="top: 0;left:100rpx;">
+						<image style="width: 488rpx;height: 366rpx;"
+							src="../../../static/common/subNVue/guide/guide-bluetooth@3x.png">
+						</image>
+					</view>
+					<view class="position-absolute-center">
+						<text class="text-white text-14px" style="top: -10rpx;left:80rpx;">点击此处进行蓝牙连接</text>
+					</view>
+				</view>
+				<view style="width: 750rpx;height: 84px;" class="flex flex-direction-row">
+					<!-- 这里width 当做 left -->
+					<view class="mask-bg-07" :style="{width:guideLeft+'px'}"></view>
+					<image style="width: 100px;height: 100px; opacity: 0.7;top: -16px;"
+						src="../../../static/common/subNVue/guide/guide-circle-mask.png"></image>
+					<view class="mask-bg-07 flex-sub"></view>
+				</view>
+			</view>
+			<!-- 计算剩余空白 -->
+			<view class="mask-bg-07 flex-sub"></view>
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	export default {
+		computed: mapState(['systemInfo', 'navHeight', 'tabbarHeight']),
+		data() {
+			return {
+				title: '',
+				content: '',
+				lists: [],
+				isSelected: false,
+				currentType: 'none',
+				operationItem: null,
+				guideHeight: 55,
+				guideLeft: 166,
+			}
+		},
+		created() {
+			const vm = this;
+			// for (let i = 1; i < 20; i++) {
+			// 	this.lists.push('item' + i);
+			// }
+			uni.$on('guide-popup', (data) => {
+				vm.title = data.title;
+				vm.content = data.content;
+				vm.currentType = data.type;
+				vm.operationItem = data.operationItem;
+				// console.log(JSON.stringify(data),vm.currentType);
+				if (vm.currentType == "actionJumpPlay") {
+					let _viewData = data.item;
+					// console.log(JSON.stringify(vm.systemInfo)); 
+					// _viewData.height/4 = 27.5
+					vm.guideHeight = _viewData.top + _viewData.height - _viewData.height / 4 - vm.systemInfo
+						.statusBarHeight - 275;
+				} else if (vm.currentType == "bluetoothConnect") {
+					let _viewData = data.item;
+					vm.guideHeight = _viewData.top + _viewData.height - _viewData.height / 4 - vm.systemInfo
+						.statusBarHeight - 225;
+					vm.guideLeft = _viewData.left - _viewData.width / 2 + 5;
+				} else if (vm.currentType == "plan") {
+					let _viewData = data.item;
+					vm.guideHeight = vm.systemInfo.screenHeight - 284 - 32;
+					// vm.guideLeft = 55;
+				}
+			})
+		},
+		beforeDestroy() {
+			uni.$off('guide-popup')
+		},
+		methods: {
+			switchSelected() {
+				console.log('switchSelected', this.isSelected, !this.isSelected);
+				this.isSelected = !this.isSelected;
+				if (this.isSelected) {
+					//this.buttonMessage('confirm');
+					uni.setStorage({
+						key: 'deviceDirectionPrompt',
+						data: {
+							isSelected: true
+						}
+					})
+				} else {
+					// this.buttonMessage('cancel');
+					uni.setStorage({
+						key: 'deviceDirectionPrompt',
+						data: {
+							isSelected: false
+						}
+					})
+				}
+			},
+
+			buttonMessage(buttonEvent) {
+
+				setTimeout(() => {
+					const subNVue = uni.getCurrentSubNVue()
+					uni.$emit('guide-popup-page', {
+						type: 'button',
+						messageType: this.currentType,
+						confirm: buttonEvent == 'confirm' ? true : false,
+						cancel: buttonEvent == 'cancel' ? true : false,
+						info: buttonEvent + ' 该元素被点击了!',
+						operationItem: this.operationItem
+					})
+				}, 260);
+
+				this.hidePupup();
+			},
+			hidePupup() {
+				console.log('hidePupup');
+				uni.getCurrentSubNVue().hide('auto', 250);
+				setTimeout(() => {
+					this.currentType = 'none';
+				}, 250);
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.guide-wrapper {
+		justify-content: center;
+		align-items: center;
+	}
+
+	.guide-container {
+		/* background-color: rgba(0, 0, 0, 0.3); */
+		width: 750rpx;
+		flex: 1;
+	}
+
+	.transparents-container {}
+
+
+	.mid {
+		justify-content: center;
+		align-items: center;
+		height: 700rpx;
+		width: 300rpx;
+
+	}
+
+	.bind-tip-image {
+		border-width: 14rpx;
+		border-style: solid;
+		border-color: #E5E5FF;
+		background-color: #FFFFFF;
+		width: 226rpx;
+		height: 260rpx;
+		margin-bottom: 50rpx;
+	}
+
+	.title {
+		height: 100rpx;
+		line-height: 100rpx;
+		border-bottom-style: solid;
+		border-bottom-width: 1rpx;
+		border-bottom-color: #CBCBCB;
+		flex: 0;
+		font-size: 30rpx;
+	}
+
+	.scroller {
+		height: 400rpx;
+		padding: 8rpx 15rpx;
+	}
+
+	.content {
+		color: #555555;
+		font-size: 32rpx;
+	}
+
+	.message-wrapper {
+		flex: 0;
+		border-top-style: solid;
+		border-top-width: 1rpx;
+		border-top-color: #CBCBCB;
+		height: 80rpx;
+		align-items: flex-end;
+	}
+
+	.send-message {
+		font-size: 30rpx;
+		line-height: 80rpx;
+		color: #00CE47;
+		margin-left: 20rpx;
+	}
+
+	.cell {
+		margin: 10rpx;
+		padding: 20rpx 0;
+		top: 10rpx;
+		align-items: center;
+		justify-content: center;
+		border-radius: 10rpx;
+		background-color: #5989B9;
+	}
+
+	.text {
+		font-size: 30rpx;
+		text-align: center;
+		color: white;
+	}
+
+
+	.circle {
+		width: 50px;
+		height: 50px;
+		border-width: 1rpx;
+		border-color: #FF0000;
+		border-style: solid;
+		border-radius: 50%;
+		position: absolute;
+		top: 200rpx;
+		left: 200rpx;
+		background-color: rgba(255, 255, 255, 0);
+		/* box-sizing: border-box; */
+	}
+
+	.su {
+		position: relative;
+		width: 750px;
+		flex: 1;
+		border-width: 1rpx;
+		border-color: #FF0000;
+		border-style: solid;
+	}
+
+	.lk {
+		position: absolute;
+		width: 100px;
+		height: 200px;
+		/* border-radius: 10px; */
+		// border-width: 10px;
+		// border-color: rgba(0, 0, 0, 0.4);
+		// border-style: solid;
+		border-top-color: #000000;
+		border-top-width: 10px;
+		border-bottom: 1rpx solid #000;
+
+		top: 150px;
+		/* margin-top: -250px; */
+		left: 150px;
+		/* margin-left: -250px; */
+	}
+</style>

+ 57 - 5
platform/app-plus/subNVue/reward-popup.nvue

@@ -42,7 +42,7 @@
 			<view class="prompt-mid" style="height: 622rpx; ">
 				<block v-for="(item, index) in lists" :key="index">
 					<view class="justify-center align-center" style="height: 230rpx; width: 160rpx; margin:5rpx;">
-						<view class="prompt-cell-bg" ></view>
+						<view class="prompt-cell-bg"></view>
 						<image class="position-absolute-center-top" style="height:200rpx;"
 							src="../../../static/common/subNVue/prompt-bg@2x.png"></image>
 						<view class="position-absolute-center-top" style="height:140rpx;top: 40rpx;">
@@ -178,6 +178,46 @@
 						class="text-white text-18px">点击领取</text> </button>
 			</view>
 		</view>
+
+
+		<!-- pk过关面板 -->
+		<view v-if="currentType == 'pkFinish'" class="reward-container" style="height: 1000rpx;">
+			<view class="position-absolute-center-top" style="top: 20rpx;">
+				<image style="width: 570rpx; height: 908rpx;" mode="aspectFit"
+					src="../../../static/common/subNVue/pkFinish@2x.png">
+				</image>
+			</view>
+
+			<view class="flex flex-direction justify-around align-center" style="position: relative;">
+				<text class="make-text-bPurple " style="font-size: 23px;">胜利</text>
+				<image class="margin-12px" style="width: 150rpx;height: 150rpx;" :src="pkFinishItem.url"></image>
+				<text class="text-18px">{{pkFinishItem.name}}</text>
+				<text class="text-15px text-grey margin-12px">{{pkFinishItem.score}}分</text>
+			</view>
+
+			<view class="flex-direction-row" style="margin-top: 82rpx;">
+				<view class="flex flex-direction  align-center">
+					<text class="text-grey text-12px">时长(秒)</text>
+					<text class="text-bold text-16px" style="margin-top: 5rpx;">{{pkFinishItem.consumeTime}}</text>
+				</view>
+				<view class="flex flex-direction  align-center" style="margin: 0 35rpx;">
+					<text class="text-grey text-12px">踩中(次)</text>
+					<text class="text-bold text-16px" style="margin-top: 5rpx;">{{pkFinishItem.hit}}</text>
+				</view>
+				<view class="flex flex-direction  align-center">
+					<text class="text-grey text-12px">失误(次)</text>
+					<text class="text-bold text-16px" style="margin-top: 5rpx;">{{pkFinishItem.miss}}</text>
+				</view>
+			</view>
+
+			<button class="make-bg-bPurple reward-button" @click="buttonMessage('confirm')"><text
+					class="text-white text-18px">确定</text> </button>
+
+
+		</view>
+	
+	
+	
 	</view>
 </template>
 
@@ -243,7 +283,16 @@
 					consumeDiamond: 0
 				},
 				//当前传入操作的item
-				operationItem: null
+				operationItem: null,
+				//pk 完成后对应的一个item
+				pkFinishItem: {
+					name: '',
+					url: '../../../static/defaultAvatar.png',
+					score: 0,
+					consumeTime: 0,
+					hit: 0,
+					miss: 0
+				}
 			}
 		},
 		created() {
@@ -310,6 +359,9 @@
 
 					vm.levelRewardIndex = 0;
 					console.log(vm.lists);
+				}else if(vm.currentType == "pkFinish"){
+					vm.pkFinishItem = Object.assign({},data.item);
+					console.log('vm.pkFinishItem:',vm.pkFinishItem);
 				}
 
 			})
@@ -355,10 +407,10 @@
 			hidePupup() {
 				// const subNVue = uni.getCurrentSubNVue();
 				// subNVue.hide("auto", 250);
-				uni.getCurrentSubNVue().hide('auto',250);
-				setTimeout(()=>{
+				uni.getCurrentSubNVue().hide('auto', 250);
+				setTimeout(() => {
 					this.currentType = 'none';
-				},250);
+				}, 250);
 			}
 		}
 	}

BIN
static/common/subNVue/guide/check-box-selected.png


BIN
static/common/subNVue/guide/check-box.png


BIN
static/common/subNVue/guide/guide-bluetooth@3x.png


BIN
static/common/subNVue/guide/guide-circle-mask.png


BIN
static/common/subNVue/guide/guide-mid.png


BIN
static/common/subNVue/guide/guide-plan@3x.png


BIN
static/common/subNVue/guide/guide-rect-mask.png


BIN
static/common/subNVue/pkFinish@2x.png


+ 36 - 11
util/util-css/main-nvue.css

@@ -78,7 +78,7 @@
 	position: relative;
 }
 
-.pos-center{
+.pos-center {
 	position: absolute;
 	top: 0;
 	left: 0;
@@ -87,7 +87,8 @@
 	justify-content: center;
 	align-items: center;
 }
-.pos-top-center{
+
+.pos-top-center {
 	position: absolute;
 	top: 0;
 	left: 0;
@@ -105,6 +106,19 @@
 	border-color: #000000;
 }
 
+.border-1rpx-red {
+	border-width: 1rpx;
+	border-style: solid;
+	border-color: #FF0000;
+}
+
+/* ==================
+         蒙层 透明度
+ ==================== */
+.mask-bg-07 {
+	background-color: rgba(0, 0, 0, 0.7);
+}
+
 /* ==================
           文本
  ==================== */
@@ -155,6 +169,11 @@
 	/* line-height: 52px; */
 }
 
+.text-38px {
+	font-size: 38px;
+	/* line-height: 52px; */
+}
+
 .text-18px-before::before {
 	font-size: 18px;
 }
@@ -180,11 +199,12 @@
 	overflow: hidden;
 }
 
-.text-lines1{
+.text-lines1 {
 	/** 显示的行数 **/
 	lines: 1;
 }
-.text-lines2{
+
+.text-lines2 {
 	/** 显示的行数 **/
 	lines: 2;
 }
@@ -311,7 +331,7 @@
 
 /* 蓝紫 */
 .make-line-bPurple::after,
-.make-lines-bPurple::after{
+.make-lines-bPurple::after {
 	border-color: rgba(151, 151, 255, 1);
 }
 
@@ -337,7 +357,7 @@
 	color: #ffffff;
 }
 
-.bg-grey-mid{
+.bg-grey-mid {
 	background-color: #CDCDCD;
 	color: #ffffff;
 }
@@ -352,12 +372,17 @@
 	margin: 12px;
 }
 
+.margin-24px {
+	margin: 24px;
+}
+
 
-.position-relative{
+
+.position-relative {
 	position: relative;
 }
 
-.position-absolute-center{
+.position-absolute-center {
 	position: absolute;
 	top: 0;
 	bottom: 0;
@@ -369,7 +394,7 @@
 
 
 
-.position-absolute-center-bottom{
+.position-absolute-center-bottom {
 	position: absolute;
 	/* top: 0; */
 	bottom: 0;
@@ -379,7 +404,7 @@
 	align-items: center;
 }
 
-.position-absolute-center-top{
+.position-absolute-center-top {
 	position: absolute;
 	top: 0;
 	/* bottom: 0; */
@@ -394,4 +419,4 @@
 .png-more {
 	width: 20px;
 	height: 20px;
-}
+}

+ 0 - 1
util/util-js/date.js

@@ -26,7 +26,6 @@ const formatDate = date => {
 
 //计算相差天数
 const datedifference = (sDate1, sDate2) => { //sDate1和sDate2是2006-12-18格式 
-	// console.log("datedifference=",sDate1,sDate2)
 	var dateSpan,
 		tempDate,
 		iDays;

+ 40 - 12
util/util-js/store.js

@@ -417,7 +417,7 @@ const store = new Vuex.Store({
 				});
 
 		},
-		onAccAndGyroConvertDataGet(state){
+		onAccAndGyroConvertDataGet(state) {
 			const convertAcc = uni.getStorageSync('convertAcc');
 			if (convertAcc) {
 				state.convertAcc = convertAcc;
@@ -427,7 +427,7 @@ const store = new Vuex.Store({
 				state.convertGyro = convertGyro;
 			}
 		},
-		onAccAndGyroConvertDataSave(state){
+		onAccAndGyroConvertDataSave(state) {
 			uni.setStorageSync('convertAcc', state.convertAcc);
 			uni.setStorageSync('convertGyro', state.convertGyro);
 		},
@@ -486,7 +486,7 @@ const store = new Vuex.Store({
 
 		setFinallSelectFriendInfo(state, friendInfo) {
 			state.finallySelectFriendInfo = friendInfo;
-			console.log('finallySelectFriendInfo',JSON.stringify(friendInfo));
+			console.log('finallySelectFriendInfo', JSON.stringify(friendInfo));
 		},
 		clearFinallFriendInfo(state) {
 			state.finallySelectFriendInfo = null;
@@ -1063,7 +1063,7 @@ const store = new Vuex.Store({
 						let tempTime = date.formatDate(nDate);
 						state.remainingDays = date.datedifference(tempTime, res.data.endTime) + 1;
 
-						// console.log("state.remainingDays======", state.remainingDays);
+						console.log("state.remainingDays======",tempTime,res.data.endTime, state.remainingDays);
 					}
 					// showArcbar
 					if (callback) {
@@ -3240,22 +3240,25 @@ const store = new Vuex.Store({
 			state.cGold = gold;
 			state.cDiamond = diamond;
 		},
-		
+
 		/**
 		 * 抽屉和弹出框
 		 */
-		hideDrawerById(state,context) {
+		hideDrawerById(state, context) {
 			// let { id } = context;
 			//personal-drawer
 			uni.getSubNVueById('personal-drawer').hide('slide-in-left', 200);
 		},
-		showDrawerById(state,context) {
+		showDrawerById(state, context) {
 			// let { id } = context;
 			//personal-drawer
 			uni.getSubNVueById('personal-drawer').show('slide-in-left', 200);
 		},
-		showPopupById(state,context) {
-			let { type, item } = context;
+		showPopupById(state, context) {
+			let {
+				type,
+				item
+			} = context;
 			console.log(type, item);
 			switch (type) {
 				case 'levelReward':
@@ -3377,20 +3380,45 @@ const store = new Vuex.Store({
 						]
 					});
 					break;
-		
+				case 'pkFinish':
+					// 向 popup 传递消息
+					uni.$emit('reward-popup', {
+						title: 'pk完成',
+						content: '',
+						type: type,
+						item: item,
+						operationItem: item
+					});
+					break;
 				default:
 					uni.showToast({
-						title: 'showPopup 类型为空',
+						title: 'showPopup类型为空',
+						icon: 'none'
 					})
 					break;
 			}
-		
+
 			// #ifdef APP-PLUS
 			//personal-popup
 			const subNVue = uni.getSubNVueById('personal-popup')
 			subNVue.show('zoom-out', 250)
 			// #endif
 		},
+		showGuideById(state, context){
+			let {
+				type,
+				item
+			} = context;
+			uni.$emit('guide-popup', {
+				title: 'guide',
+				content: '定制guide',
+				type: type,
+				item: item,
+				operationItem: item
+			});
+			const subNVue = uni.getSubNVueById('personal-guide')
+			subNVue.show('fade-in', 250)
+		}
 	}
 })