Browse Source

1.修改新手引导-蓝牙
2.修改跳的消除效果和消失特效
3.修改首页相关问题

slambb 4 năm trước cách đây
mục cha
commit
1c7d22f7e5

+ 67 - 22
components/modal/action-jump/action-jump.vue

@@ -97,13 +97,16 @@
 			<button @click="onChangeX">X为旋转轴</button>
 		</view> -->
 
-		<!-- <view style="display: flex;justify-content: space-between;" class="margin-top margin-bottom">
+		<!-- #ifdef H5 -->
+		<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>
+		<!-- #endif -->
+
 
 		<!-- <view style="display: flex;justify-content: space-around; padding-bottom: 100rpx;">
 			<view style="font-size: 14px;">t:{{countdown}}</view>
@@ -281,6 +284,10 @@
 				 * 是否去到下一个关卡
 				 */
 				canGoNext: false,
+				/**
+				 * 生成的特效
+				 */
+				canSpawnTemp: null,
 
 				onLogData: '',
 
@@ -376,13 +383,22 @@
 					} else if (e.type == 'stop') {
 						this.onClearData();
 						this.actionJumpObj.resetAll();
+
 						if (this.canOnDraw) {
 							this.canOnDraw = false;
+							// //这里更新特效
+							// this.onDrawEffect(this.canSpawnTemp);
 							this.onDraw("tipHit");
 						}
 						if (this.canGoNext) {
 							this.canGoNext = false;
-							this.startJumpGame();
+							// //这里更新特效
+							// this.onDrawEffect(this.canSpawnTemp);
+							//绘制新触发状态
+							this.onDraw("normal");
+							setTimeout(() => {
+								this.startJumpGame();
+							}, 500)
 						}
 						// console.log('stop');
 						//这里处理生成下一个
@@ -678,8 +694,11 @@
 				let _currentBgStartX = this.index == this.spawnArray.length || type == "normal" ? _drawObj
 					.bgStartXAllNormal : _drawObj
 					.bgStartXHasTip;
-				// console.log("_drawObj.startX:", _drawObj.startX, _drawObj.width / 2);
 
+				//最后还要绘制一个
+				if (this.spawnArray[this.spawnArray.length - 1].bTrigger) {
+					_currentBgStartX -= 20;
+				}
 				//绘制八个位置。如果生成数量不够的话。补上对应的数量
 				let count = 8 - this.spawnArray.length;
 				count = Math.ceil(count / 2);
@@ -717,7 +736,8 @@
 
 
 					this.actionJumpCanvas.save();
-					this.actionJumpCanvas.globalAlpha = this.spawnArray[i].bTrigger ? 0.7 : 1;
+					// this.spawnArray[i].bTrigger ? 0.7 : 1;
+					this.actionJumpCanvas.globalAlpha = 1;
 					this.actionJumpCanvas.scale(this.spawnArray[i].scaleX, 1);
 
 					let _currentPos = 0;
@@ -736,7 +756,7 @@
 						this.actionJumpCanvas.drawImage(_temp.path, _currentCenterPos - 7.5, 37, 40, 40);
 
 						//这里记录一个生成点,后面用于生成特效
-						this.effectSpawnPosX = _currentCenterPos - 8;
+						this.effectSpawnPosX = _currentPos;
 					} else {
 						_currentPos = (_currentBgStartX + _addData + _pos *
 								50) * this
@@ -747,26 +767,38 @@
 						//计算对应中心点的值
 						_currentCenterPos = _currentPos + 50 / 2 - 25 / 2;
 
-						//44.5 是取画布中心y点,减去图标本身高的一半的值
-						this.actionJumpCanvas.drawImage(_temp.path, _currentCenterPos, 44.5, 25, 25);
+						if (!this.spawnArray[i].bTrigger) {
+							//44.5 是取画布中心y点,减去图标本身高的一半的值
+							this.actionJumpCanvas.drawImage(_temp.path, _currentCenterPos, 44.5, 25, 25);
 
+						}
 					}
 
 					this.actionJumpCanvas.restore();
 
-					if (i == this.spawnArray.length - 1) {
+					let _spawnLength = this.spawnArray.length;
+					if (i == _spawnLength - 1) {
 						//绘制结束位置
-						// console.log("count:", count);
-						for (let i = 0; i < count; i++) {
-							let _currentEndPos = _currentBgStartX + _addData + (this.spawnArray.length +
+						let _endCount = count + 1;
+						for (let i = 0; i < _endCount; i++) {
+							let _bigDataX = 40;
+							// if (i == 0 && this.spawnArray[_spawnLength - 1].bTrigger) {
+							// 	let _currentEndPos = (_currentBgStartX  + _spawnLength * 90 - _spawnLength * 40) *
+							// 		this
+							// 		.spawnArray[i]
+							// 		.scaleX;
+							// 	this.actionJumpCanvas.drawImage(this.jumpTipImage.path, _currentEndPos, 0, 90, 114);
+							// _bigDataX = 0;
+							// } 
+							if (this.spawnArray[_spawnLength - 1].bTrigger) {
+								_bigDataX = 0;
+							}
+							let _currentEndPos = _currentBgStartX + _bigDataX + (this.spawnArray.length +
 								i) * 50;
-
-							// console.log("end _currentEndPos:", _currentEndPos);
 							this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentEndPos, 0,
 								50, 114)
 
 						}
-
 					}
 				}
 
@@ -858,7 +890,11 @@
 					if (this.index >= this.spawnArray.length) {
 						clearInterval(this.countdownInterval);
 						this.countdownInterval = null;
-						this.startJumpGame();
+						//绘制新触发状态
+						this.onDraw("normal");
+						setTimeout(() => {
+							this.startJumpGame();
+						}, 2000)
 					} else {
 						//绘制新触发状态
 						this.onDraw('tipHit');
@@ -1033,7 +1069,8 @@
 			//监听跳的状态数据
 			listenStateDataOfJump(data) {
 				if (this.isGameOver || !this.bJumpPlay) return;
-
+				
+				if (this.spawnArray.length == this.index) return;
 				let _jumpType = this.getCurrentJumpType();
 				//初始全部默认状态
 				let _tempState = [{
@@ -1180,17 +1217,22 @@
 					// console.log("bSuccess:", bSuccess);
 					_temp.bTrigger = true;
 					this.index++;
-					//这里更新特效
-					this.onDrawEffect(_temp);
+
+					this.canSpawnTemp = _temp;
+					setTimeout(()=>{
+						//这里更新特效
+						this.onDrawEffect(this.canSpawnTemp);
+					},150);
+					
 					if (this.index >= this.spawnArray.length) {
 						clearInterval(this.countdownInterval);
 						this.countdownInterval = null;
 						this.canGoNext = true;
-						this.onDraw("normal");
+						// this.onDraw("normal");
 					} else {
 						//绘制新触发状态
 						this.canOnDraw = true;
-						this.onDraw("normal");
+						// this.onDraw("normal");
 					}
 					//成功
 					this.setEliminationCount(1);
@@ -1292,7 +1334,10 @@
 			},
 
 			onTipLevel() {
-				this.$emit("tipLevel");
+				this.$emit("tipLevel", {
+					hiddenType: 'normal'
+				});
+				console.log("**************22");
 			}
 		}
 	}

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "哔蹦",
     "appid" : "__UNI__2635DF5",
     "description" : "",
-    "versionName" : "2.4.17",
-    "versionCode" : 21092903,
+    "versionName" : "2.4.20",
+    "versionCode" : 21093003,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 1 - 1
pages/my-page/homepage/homepage.vue

@@ -10,7 +10,7 @@
 			</view> -->
 			<view slot="middle">
 				<view class="flex justify-center align-center"
-					style="margin-left: 250rpx; ">
+					style="margin-left: 220rpx; ">
 					<view class="flex align-center" style="margin-right: 40rpx; padding: 0 18px; height: 56rpx; background-color: rgba(183,183,183,0.33); border-radius: 13.5px;">
 						<image class="png-more" style="margin-right: 16rpx;"
 							src="/static/common/sideBar/sGold.png"></image>

+ 20 - 5
pages/personal-page/devices-hardware/devices-hardware.vue

@@ -41,11 +41,26 @@
 				disable-touch="true" :current="currentIndex" @click="onSwiperClick" @change="onSwiperChange">
 				<!-- 1 @touchmove.stop='stopTouchMove' -->
 				<swiper-item class="flex justify-center align-center" @click="onSwiperItemClick">
-					<view style="width: 590rpx; height: 626rpx;" class="position-relative">
+					<view style="width: 590rpx; height: 626rpx; margin-top: 50rpx;" class="position-relative">
 						<view class="bluetooth-guide-number" style="position: absolute;left: 94rpx;top: 8rpx;">1</view>
-						<image style="width: 590rpx; height: 626rpx;"
+						<!-- <image style="width: 590rpx; height: 626rpx;"
 							src="../../../static/guide/blutooth/guide-ble-1@2x.png">
-						</image>
+						</image> -->
+						<view style="width: 590rpx; height: 512rpx;" class="flex position-relative">
+							<image style="width: 424rpx;height: 412rpx; margin-top: 100rpx;" src="../../../static/guide/blutooth/guide-ble-tip.png"></image>
+							<image style="width: 102rpx;height: 102rpx; margin-top: 116rpx; margin-left: 56rpx;" src="../../../static/guide/blutooth/guide-ble-toggle.png"></image>
+							<view class="position-absolute-right-top">
+								<image  style="width: 406rpx;height: 94rpx; "  src="../../../static/guide/blutooth/guide-toggle-tip.png"></image>
+								<view class="position-absolute-center text-regular" style="width: 438rpx;height: 96rpx;top: 26rpx;left: 40rpx;">
+									确保手机蓝牙处于开启状态</view>
+							</view>
+						</view>
+						<view class="position-relative" style="top: 10rpx;">
+							<image style="width: 520rpx; height:166rpx;top: 10rpx;left: 26rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+							</image>
+							<view class="position-absolute-center text-regular" style="width: 438rpx;height: 96rpx;top: 18rpx;">
+								切记请不要直接连接蓝牙,确保手柄没被任何手机连接,如果有请断开连接。</view>
+						</view>
 					</view>
 
 				</swiper-item>
@@ -82,7 +97,7 @@
 				<!-- 4 -->
 				<swiper-item class="flex justify-center align-center flex-direction">
 
-					<image style="width: 446rpx; height: 384rpx; margin-bottom: 28rpx;"
+					<image style="width: 446rpx; height: 384rpx; margin-bottom: 28rpx; margin-top: 100rpx;"
 						src="../../../static/guide/blutooth/guide-ble-bind.png">
 					</image>
 					<view class="position-relative">
@@ -105,7 +120,7 @@
 							<image style="width: 60rpx;height:60rpx;margin-right: 28rpx;"
 								src="../../../static/guide/blutooth/guide-ble-finish@2x.png"></image>
 							<view class=" text-regular " style="width: 336rpx;height: 90rpx;">
-								您已绑定成功,返回主界面选择关卡开始游戏吧</view>
+								连接手柄成功后,返回主界面选择关卡开始游戏吧</view>
 						</view>
 
 					</view>

+ 44 - 25
pages/personal-page/personal/personal.vue

@@ -2,13 +2,8 @@
 	<view class="bg-person " :class="bEFHitShake?' screen-jitter ':''">
 		<!-- :title="title" @clickRight="onNavAppInfo() title="PK模式"" -->
 		<!-- 自定义导航栏 backgroundColor="rgba(164, 136, 220, 1)"  @clickRight="onSyncData" @clickRight="onTestShare"-->
-		<uni-nav-bar id="nav-bar" status-bar="true" backgroundColor="rgba(153, 150, 252, 255)" <!-- #ifdef APP-PLUS -->
-			@clickLeft="showDrawer()"
-			<!-- #endif -->
-			<!-- #ifdef H5 || MP-WEIXIN -->
-			@clickLeft="showClickEvent()"
-			<!-- #endif -->
-			color="#FFFFFF" fixed="true" :border="false">
+		<uni-nav-bar id="nav-bar" status-bar="true" backgroundColor="rgba(153, 150, 252, 255)"
+			@clickLeft="showClickEvent()" color="#FFFFFF" fixed="true" :border="false">
 			<view slot="left">
 				<view class=" flex align-center margin-left">
 					<image class="png-more" src="/static/more.png"></image>
@@ -273,14 +268,14 @@
 			<!-- <view class="example">
 				<button @click="onTipLevel">显示 ontipLevel</button>
 			</view> -->
-			<view class="example" style="margin-top: 10rpx;">
+			<!-- <view class="example" style="margin-top: 10rpx;">
 				<button @click="onNavToDirection">跳转校准页面</button>
-			</view>
-			<view class="example">
+			</view> -->
+			<!-- <view class="example">
 				<button @click="onGetBluetoothConnectView({
 												hiddenType: 'firstInstallation'
 											})">显示 bluetoothConnect</button>
-			</view>
+			</view> -->
 			<!-- <view class="example">
 				<button @click="onUserSignIn()">签到</button>
 			</view> -->
@@ -819,7 +814,7 @@
 
 				},
 				defaultAJData: null,
-
+				bGamePlaying:false,
 				/**
 				 * 任务参数
 				 */
@@ -1100,10 +1095,29 @@
 			},
 
 			showClickEvent() {
+				// #ifdef APP-PLUS 
+				this.showDrawer();
+				// #endif 
+				// #ifdef H5 || MP-WEIXIN 
 				this.$refs.sideBar.showModal();
 				this.$store.state.bCanvasShow = false;
+				// #endif 
 			},
 			showModal(e) {
+
+				if (e.currentTarget.dataset.target == "slideUpModal" && this.bGamePlaying) {
+					/**
+					 * 判断下游戏是否进行中,进行中不能切换
+					 */
+					uni.showToast({
+						title:'游戏进行中,不能选择关卡。',
+						icon:'none',
+						mask:true
+					})
+					return;
+				}
+				
+				
 				this.modalName = e.currentTarget.dataset.target;
 				this.$store.state.bCanvasShow = false;
 
@@ -2019,20 +2033,22 @@
 				// #ifdef APP-PLUS
 				if (1 === this.currentModeIndex) {
 					if (this.currentJumpTask == null) {
-
+						console.log("**************11");
+						this.onTipLevel({hiddenType: 'normal'});
 						if (this.guideUnlockState.firstPromptSelectLevel) {
-							this.onTipLevel();
+							// this.onTipLevel();
 							let guideUnlockState = Object.assign(this.guideUnlockState, {
 								firstPromptSelectLevel: false
 							});
 							this.setGuideUnlockState(guideUnlockState);
-						} else {
-							uni.showToast({
-								title: '先选一个挑战关卡',
-								icon: 'none',
-								duration: 2000,
-							})
 						}
+						// else {
+						// uni.showToast({
+						// 	title: '先选一个挑战关卡',
+						// 	icon: 'none',
+						// 	duration: 2000,
+						// })
+						// }
 						return;
 					}
 					if (this.currentMode == 'pkMode' && this.finallySelectFriendInfo == null) {
@@ -2806,6 +2822,7 @@
 				}
 				this.onSetActionJumpData();
 				this.$refs.actionJumpRef.onActionJumpPlay();
+				this.bGamePlaying = true;
 				//todo 首先判断时间处理
 				if (0 !== this.currentJumpTask.item.limitTime) {
 					//0默认不限时,所以限时的才走计时间
@@ -2839,6 +2856,8 @@
 					});
 					uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
 					console.log('onActionJumpGameOver 任务结束');
+					
+					this.bGamePlaying = false;
 				}
 
 
@@ -3236,7 +3255,7 @@
 											this.onGetBluetoothConnectView({
 												hiddenType: 'firstInstallation'
 											});
-										}, 100)
+										}, 60)
 										console.log('提示连接手柄')
 									}
 								}
@@ -3254,7 +3273,7 @@
 												hiddenType: 'firstInstallation'
 											});
 											console.log('提示连接关卡')
-										}, 100)
+										}, 60)
 									} else if (data.hiddenType == 'firstDisconnectBluetooth') {
 										this.fabClick();
 									}
@@ -3270,7 +3289,7 @@
 											this.showGuide('level-button-tip', {
 												hiddenType: 'firstInstallation'
 											});
-										}, 100)
+										}, 60)
 									}
 								}
 							} else if (data.messageType == 'level-button-tip') {
@@ -3350,9 +3369,9 @@
 			/**
 			 * 提示打开关卡
 			 */
-			onTipLevel() {
+			onTipLevel(value) {
 				// #ifdef APP-PLUS
-				this.showGuide('level-button-tip', null);
+				this.showGuide('level-button-tip', value);
 				// #endif
 				// #ifdef H5
 				console.warn("不支持nvue");

+ 19 - 4
pages/platform-page/guide/guide-ble-scroll.vue

@@ -20,14 +20,29 @@
 			<view class="flex justify-center align-center" style="padding-top: 60px;">
 				<view style="width: 590rpx; height: 626rpx;" class="position-relative">
 					<view class="bluetooth-guide-number" style="position: absolute;left: 94rpx;top: 8rpx;">1</view>
-					<image style="width: 590rpx; height: 626rpx;"
+					<!-- <image style="width: 590rpx; height: 626rpx;"
 						src="../../../static/guide/blutooth/guide-ble-1@2x.png">
-					</image>
+					</image> -->
+					<view style="width: 590rpx; height: 512rpx;" class="flex position-relative">
+						<image style="width: 424rpx;height: 412rpx; margin-top: 100rpx;" src="../../../static/guide/blutooth/guide-ble-tip.png"></image>
+						<image style="width: 102rpx;height: 102rpx; margin-top: 116rpx; margin-left: 56rpx;" src="../../../static/guide/blutooth/guide-ble-toggle.png"></image>
+						<view class="position-absolute-right-top">
+							<image  style="width: 406rpx;height: 94rpx; "  src="../../../static/guide/blutooth/guide-toggle-tip.png"></image>
+							<view class="position-absolute-center text-regular" style="width: 438rpx;height: 96rpx;top: 26rpx;left: 40rpx;">
+								确保手机蓝牙处于开启状态</view>
+						</view>
+					</view>
+					<view class="position-relative" style="top: 10rpx;">
+						<image style="width: 520rpx; height:166rpx;top: 10rpx;left: 26rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+						</image>
+						<view class="position-absolute-center text-regular" style="width: 438rpx;height: 96rpx;top: 18rpx;">
+							切记请不要直接连接蓝牙,确保手柄没被任何手机连接,如果有请断开连接。</view>
+					</view>
 				</view>
 
 			</view>
 			<!-- 2 -->
-			<view class="flex justify-center align-center flex-direction" style="margin-top: 60px;">
+			<view class="flex justify-center align-center flex-direction" style="margin-top: 80px;">
 
 				<image style="width: 354rpx; height: 306rpx; margin-bottom: 28rpx;"
 					src="../../../static/guide/blutooth/guide-ble-device.png">
@@ -106,7 +121,7 @@
 						<image style="width: 60rpx;height:60rpx;margin-right: 28rpx;"
 							src="../../../static/guide/blutooth/guide-ble-finish@2x.png"></image>
 						<view class=" text-regular " style="width: 336rpx;height: 90rpx;">
-							您已绑定成功,返回主界面选择关卡开始游戏吧</view>
+							您已了解规则,返回主界面选择关卡开始游戏吧</view>
 
 					</view>
 

+ 19 - 11
pages/platform-page/guide/guide-level-scroll.vue

@@ -9,7 +9,7 @@
 			</view>
 		</uni-nav-bar>
 
-		<view v-for="(item,index) in levelList" :key="index" class="mask-bg-07 ">
+		<view v-for="(item,index) in levelList" :key="index" style="background-color: rgba(0,0,0,0.32);">
 			<view class="flex flex-direction level-mid position-relative">
 				<view style="height: 278rpx;width: 750rpx;" class="position-relative">
 					<view class="position-absolute-center flex">
@@ -28,11 +28,11 @@
 				<image
 					:style="{ width: item.firstWidth  + 'rpx', height: item.firstHeight  + 'rpx' ,transform:'scaleX('+item.firstDirection +')' }"
 					:src="item.firstImage"></image>
-				<view class="flex flex-direction-row align-center justify-center margin-xl">
+				<view v-if="!item.secondHidden" class="flex flex-direction-row align-center justify-center margin-xl">
 					<text class="level-tip-number">2</text>
 					<text class="text-16px text-left text-white " style="width:476rpx;">{{item.secondText}}</text>
 				</view>
-				<image
+				<image v-if="!item.secondHidden"
 					:style="{ width: item.secondWidth  + 'rpx', height: item.secondHeight  + 'rpx' ,transform:'scaleX('+item.secondDirection +')' }"
 					:src="item.secondImage">
 				</image>
@@ -55,16 +55,22 @@
 				circular: true,
 				levelList: [{
 						title: '解锁向上跳',
-						firstText: '请先确保手柄已经连接成功。',
-						firstImage: '../../../static/common/subNVue/guide/level-game-fab@2x.png',
+						// firstText: '请先确保手柄已经连接成功。',
+						// firstImage: '../../../static/common/subNVue/guide/level-game-fab@2x.png',
+						// firstDirection: 1,
+						// firstWidth: 102,
+						// firstHeight: 108,
+						firstText: '通过向上跳的方式消除标志块',
+						firstImage: '../../../static/modal/action-jump/midJumpWhite.png',
 						firstDirection: 1,
-						firstWidth: 102,
-						firstHeight: 108,
+						firstWidth: 68,
+						firstHeight: 68,
 						secondText: '通过向上跳的方式消除标志块',
 						secondImage: '../../../static/modal/action-jump/midJumpWhite.png',
 						secondDirection: 1,
 						secondWidth: 68,
-						secondHeight: 68
+						secondHeight: 68,
+						secondHidden: true
 
 					},
 					{
@@ -78,7 +84,8 @@
 						secondImage: '../../../static/modal/action-jump/directionJumpWhite.png',
 						secondDirection: 1,
 						secondWidth: 68,
-						secondHeight: 68
+						secondHeight: 68,
+						secondHidden: false
 					},
 					{
 						title: '解锁左右旋跳',
@@ -91,7 +98,8 @@
 						secondImage: '../../../static/modal/action-jump/directionJumpWhite.png',
 						secondDirection: 1,
 						secondWidth: 68,
-						secondHeight: 68
+						secondHeight: 68,
+						secondHidden: false
 					}
 				],
 				currentHeight: 0,
@@ -144,7 +152,7 @@
 		text-align: center;
 		color: #FFFFFF;
 		margin-right: 13px;
-		line-height: 18px;
+		line-height: 22px;
 		border: 1rpx solid #FFFFFF;
 	}
 </style>

+ 1 - 1
pages/platform-page/settings/settings.vue

@@ -72,7 +72,7 @@
 
 							uni.showToast({
 								icon: 'none',
-								title: '  请先点击头像进绑定手机号或邮箱才可以设置密码!',
+								title: '请先点击头像进绑定手机\r\n或邮箱才可以设置密码!',
 								duration: 3000,
 								mask: true
 							})

+ 26 - 26
platform/app-plus/subNVue/guide.nvue

@@ -15,8 +15,8 @@
 					<view class="position-absolute-center">
 						<text class="text-white text-14px text-lines2"
 							style="top: -80rpx;left:70rpx; width: 300rpx;">点击此按钮选择关卡</text>
-						<view v-if="hiddenType != 'firstInstallation'" class="flex flex-direction-row"
-							style="top: -50rpx;left:50rpx;" @click="switchSelected()">
+						<view v-if="hiddenType != 'firstInstallation' && hiddenType != 'normal'"
+							class="flex flex-direction-row" style="top: -50rpx;left:50rpx;" @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;"
@@ -73,7 +73,7 @@
 					</view>
 					<view class="position-absolute-center">
 						<text class="text-white text-14px text-lines2"
-							style="top: -30rpx;left:90rpx; width: 300rpx;">请先定制属于您的专属计划,好的开始是成功的一半。</text>
+							style="top: -30rpx;left:90rpx; width: 300rpx;">请先定制属于您的专属计划</text>
 					</view>
 				</view>
 				<view style="width: 750rpx;height: 120px;" class="flex flex-direction-row">
@@ -127,7 +127,7 @@
 							src="../../../static/common/subNVue/guide/guide-bluetooth@3x.png">
 						</image>
 					</view>
-					<view class="position-absolute-center" >
+					<view class="position-absolute-center">
 						<text class="text-white text-14px" style="left: 20px;top: -5px;">请先连接蓝牙设备.</text>
 						<!-- <text class="text-left  text-white text-14px"
 							style="width: 542rpx;">1、长按开关键3秒,绿灯连续闪烁为可连接状态.</text>
@@ -167,16 +167,18 @@
 
 				<view class="flex flex-direction-row align-center justify-center margin-17px">
 					<text class="game-number">1</text>
-					<text class="text-16px text-left text-white " style="width:476rpx;">{{unlockLevelInfo.firstText}}</text>
+					<text class="text-16px text-left text-white "
+						style="width:476rpx;">{{unlockLevelInfo.firstText}}</text>
 				</view>
 				<image
 					:style="{ width: unlockLevelInfo.firstWidth  + 'rpx', height: unlockLevelInfo.firstHeight  + 'rpx' ,transform:'scaleX('+unlockLevelInfo.firstDirection +')' }"
 					:src="unlockLevelInfo.firstImage"></image>
-				<view class="flex flex-direction-row align-center justify-center margin-17px">
+				<view v-if="!unlockLevelInfo.secondHidden" class="flex flex-direction-row align-center justify-center margin-17px">
 					<text class="game-number">2</text>
-					<text class="text-16px text-left text-white " style="width:476rpx;">{{unlockLevelInfo.secondText}}</text>
+					<text class="text-16px text-left text-white "
+						style="width:476rpx;">{{unlockLevelInfo.secondText}}</text>
 				</view>
-				<image
+				<image v-if="!unlockLevelInfo.secondHidden"
 					:style="{ width: unlockLevelInfo.secondWidth  + 'rpx', height: unlockLevelInfo.secondHeight  + 'rpx' ,transform:'scaleX('+unlockLevelInfo.secondDirection +')' }"
 					:src="unlockLevelInfo.secondImage">
 				</image>
@@ -224,23 +226,26 @@
 					secondText: '',
 					secondImage: '',
 					secondWidth: 0,
-					secondHeight: 0
+					secondHeight: 0,
+					secondHidden: false
 				},
 
 				midJumpInfo: {
 					title: '解锁向上跳',
-					firstText: '请先确保手柄已经连接成功。',
-					firstImage: '../../../static/common/subNVue/guide/level-game-fab@2x.png',
+					// firstText: '请先确保手柄已经连接成功。',
+					// firstImage: '../../../static/common/subNVue/guide/level-game-fab@2x.png',
+					firstText: '通过向上跳的方式消除标志块',
+					firstImage: '../../../static/modal/action-jump/midJumpWhite.png',
 					firstDirection: 1,
-					firstWidth: 102,
-					firstHeight: 108,
+					firstWidth: 68, //102,
+					firstHeight: 68, //108,
 					secondText: '通过向上跳的方式消除标志块',
 					secondImage: '../../../static/modal/action-jump/midJumpWhite.png',
 					secondDirection: 1,
 					secondWidth: 68,
-					secondHeight: 68
-
-				},
+					secondHeight: 68,
+					secondHidden: true,
+					},
 
 				directionJumpInfo: {
 					title: '解锁左右跳',
@@ -253,7 +258,8 @@
 					secondImage: '../../../static/modal/action-jump/directionJumpWhite.png',
 					secondDirection: 1,
 					secondWidth: 68,
-					secondHeight: 68
+					secondHeight: 68,
+					secondHidden: false
 				},
 
 				rotationJumpInfo: {
@@ -267,20 +273,18 @@
 					secondImage: '../../../static/modal/action-jump/directionJumpWhite.png',
 					secondDirection: 1,
 					secondWidth: 68,
-					secondHeight: 68
+					secondHeight: 68,
+					secondHidden: false
 				}
 			}
 		},
 		created() {
 			console.log('*********一个guide 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.currentType = data.type || 'none';
 				vm.operationItem = data.operationItem;
 				let _viewData = data.item;
 				//获取类型
@@ -375,11 +379,7 @@
 				this.hidePupup();
 			},
 			hidePupup() {
-				console.log('hidePupup');
 				uni.getCurrentSubNVue().hide('auto', 250);
-				setTimeout(() => {
-					this.currentType = 'none';
-				}, 250);
 			}
 		}
 	}

BIN
static/guide/blutooth/guide-ble-tip.png


BIN
static/guide/blutooth/guide-ble-toggle.png


BIN
static/guide/blutooth/guide-toggle-tip.png


+ 30 - 12
util/util-js/effect/firework.js

@@ -88,6 +88,22 @@ var Firework = function Firework(image, typeImage, direction, tx, ty, cw, ch) {
 	// 		_this.event.trigger('renderComplete');
 	// 	}
 	// });
+	this.hiddenMidImage = false;
+	
+	
+	const innerAudioContext = uni.createInnerAudioContext();
+	innerAudioContext.autoplay = true;
+	innerAudioContext.src = '/static/elect/hit.mp3';
+	innerAudioContext.onPlay(() => {
+	  // console.log('开始播放');
+	});
+	innerAudioContext.onError((res) => {
+	  console.log(res.errMsg);
+	  console.log(res.errCode);
+	});
+	setTimeout(()=>{
+		innerAudioContext.destroy();
+	},800)
 }
 
 Firework.prototype.addEventListener = function(type, listener) {
@@ -101,7 +117,7 @@ Firework.prototype.draw = function(ctx, callback) {
 	let temp = this.position["EF_baozha_" + i];
 	// console.log("draw:"+this.direction);
 	let tempX = this.tx * this.direction;
-	let tempValue = this.direction < 0 ? 20 : -20
+	let tempValue =  this.direction < 0 ? 65 : -25
 	ctx.drawImage(this.image.path,
 		temp[0] //截取原始图片的 x坐标
 		, temp[1] //截取原始图片的 y坐标
@@ -112,17 +128,19 @@ Firework.prototype.draw = function(ctx, callback) {
 		, 164 //绘制图片的宽度
 		, 164 //绘制图片的高度
 	);
-	let _r = this.index / 19;
-	ctx.save();
-	//如果是相反绘制,需要加多一个自身位置偏移
-	let _pos = this.direction < 0 ? this.typeImage.width : 0;
-	//左边位置
-	let left = (this.typeImage.width + tempX - 164 * 0.5) - (this.typeImage.width / 2 - _pos) * _r + 20 - tempValue;
-	// 中心点 this.cw / 2 - this.typeImage.width / 2 * _r
-	ctx.translate(left, this.ch / 2 - this.typeImage.height / 2 * _r);
-	ctx.scale(_r * this.direction, _r);
-	ctx.drawImage(this.typeImage.path, 0, 0);
-	ctx.restore();
+	if(!this.hiddenMidImage){
+		let _r = this.index / 19;
+		ctx.save();
+		//如果是相反绘制,需要加多一个自身位置偏移
+		let _pos = this.direction < 0 ? this.typeImage.width : 0;
+		//左边位置
+		let left = (this.typeImage.width + tempX - 164 * 0.5) - (this.typeImage.width / 2 - _pos) * _r + 20 - tempValue;
+		// 中心点 this.cw / 2 - this.typeImage.width / 2 * _r
+		ctx.translate(left, this.ch / 2 - this.typeImage.height / 2 * _r);
+		ctx.scale(_r * this.direction, _r);
+		ctx.drawImage(this.typeImage.path, 0, 0);
+		ctx.restore();
+	}
 	if (i === 19 && callback) {
 		callback();
 	}

+ 10 - 0
util/util-js/store.js

@@ -1265,6 +1265,16 @@ const store = new Vuex.Store({
 						self.commit('login', userInfo);
 					} else if (res.code = 201) {
 						state.hasLogin = true;
+						//新用户重置一下新手教程数据
+						self.commit('setGuideUnlockState', {
+							//是否首次安装
+							firstInstallation: true,		//是否首次安装
+							firstDisconnectBluetooth: true,	//是否首次连接蓝牙
+							firstUnlockJumpUp: true,        //是否首次向上跳
+							firstUnlockLeftAndRightJump: true,//是否首次左右跳
+							firstUnlockLeftAndRightRotationJump: true,
+							firstPromptSelectLevel:true //是否首次提示选择关卡
+						});
 					}
 
 					if (callback) {