Parcourir la source

1.修改新手教程。调整首页
2.添加邮箱api验证。

slambb il y a 4 ans
Parent
commit
f8f798060b

+ 4 - 1
common/config.js

@@ -56,7 +56,10 @@ const URL = {
 	 * 根据类型使用密码登录,0:电话 和1:邮箱 
 	 */
 	LOGINPASSWORDBASEDONTHETYPE: `${host}/program/password_login_type`,
-
+	//根据验证码修改密码
+	MODIFYPASSWORDFROMSMS: `${host}/program/SMS_modify_password`,
+	//根据旧密码修改密码
+	MODIFYPASSWORDFROMACCOUNT: `${host}/program/modify_password_from_account`,
 	// 小程序用户登录
 	USERlOGINURL: `${host}/program/client_login`,
 	// 苹果用户登录

+ 45 - 37
components/modal/action-jump/action-jump.vue

@@ -1,8 +1,8 @@
 <template>
 	<view style="width: 750rpx;">
 		<view class="flex justify-center" style="margin-top: 32rpx;">
-			<!-- 目前格子数量不代表数字,显示完成度而已 -->
-			<view class="grid-progress-vertical-container" style="top:-460rpx; ">
+			<!-- 目前格子数量不代表数字,显示完成度而已 -460rpx;-->
+			<view class="grid-progress-vertical-container" style="top:-520rpx; ">
 				<view class="grid-progress-vertical-bar">
 					<view class="grid-progress-vertical-child" v-for="(item, index) in maxShowCount +1" :key="index"
 						v-if="index!==0">
@@ -28,52 +28,60 @@
 					</view>
 				</view>
 			</view>
-			<view class="flex justify-center align-center" style="height: 100rpx; width: 444rpx; ">
+			<view class="flex align-center justify-center" style="font-size: 14px;">
+				<view style="position: relative;">
+					<image style="width: 135px;height: 75px;" src="../../../static/modal/action-jump/Fill.png"></image>
+					<view class="mid-absolute flex flex-direction align-center justify-center text-white">
+						<view class="flex align-center">
+							<image style="width: 22rpx;height: 28rpx;"
+								src="../../../static/modal/action-jump/jumpSpeed.png"></image>
+							<view style="margin-left: 6rpx;">平均速度</view>
+						</view>
+						<view style="margin-top: 12rpx;">{{jumpSpeed}}</view>
+					</view>
+				</view>
+				<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;"
+						src="../../../static/modal/action-jump/midPlay.png">
+					</image>
+					<image v-else class="mid-absolute" style="width: 28rpx;height: 28rpx;"
+						src="../../../static/modal/action-jump/midPause.png">
+					</image>
+				</view>
+				<view style="position: relative;">
+					<image style="width: 135px;height: 75px; transform: scaleX(-1);"
+						src="../../../static/modal/action-jump/Fill.png"></image>
+					<view class="mid-absolute flex flex-direction align-center justify-center text-white">
+						<view class="flex align-center">
+							<image style="width: 22rpx;height: 28rpx;"
+								src="../../../static/modal/action-jump/jumpCalorie.png"></image>
+							<view style="margin-left: 6rpx;">卡路里</view>
+						</view>
+						<view style="margin-top: 12rpx;">{{jumpCalorie}}</view>
+					</view>
+				</view>
+			</view>
+			<!-- <view class="flex justify-center align-center" style="height: 100rpx; width: 444rpx; ">
 				<view v-if="bTipLevel" class="cu-btn make-text-bPurple text-16px text-bold"
 					style="width: 272rpx;height:80rpx;border-radius: 10px;" @click="onTipLevel">选择关卡</view>
 				<view v-else class="text-12px text-white text-center">
 					{{taskDescribe}}
 				</view>
-			</view>
+			</view> -->
 
 		</view>
 		<canvas canvas-id="actionJumpCanvas" :style="{ width: canvasW + 'px', height: canvasH + 'px' }"></canvas>
-		<view class="flex align-center justify-center" style="font-size: 14px;">
-			<view style="position: relative;">
-				<image style="width: 135px;height: 75px;" src="../../../static/modal/action-jump/Fill.png"></image>
-				<view class="mid-absolute flex flex-direction align-center justify-center text-white">
-					<view class="flex align-center">
-						<image style="width: 22rpx;height: 28rpx;"
-							src="../../../static/modal/action-jump/jumpSpeed.png"></image>
-						<view style="margin-left: 6rpx;">平均速度</view>
-					</view>
-					<view style="margin-top: 12rpx;">{{jumpSpeed}}</view>
-				</view>
-			</view>
-			<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;"
-					src="../../../static/modal/action-jump/midPlay.png">
-				</image>
-				<image v-else class="mid-absolute" style="width: 28rpx;height: 28rpx;"
-					src="../../../static/modal/action-jump/midPause.png">
-				</image>
-			</view>
-			<view style="position: relative;">
-				<image style="width: 135px;height: 75px; transform: scaleX(-1);"
-					src="../../../static/modal/action-jump/Fill.png"></image>
-				<view class="mid-absolute flex flex-direction align-center justify-center text-white">
-					<view class="flex align-center">
-						<image style="width: 22rpx;height: 28rpx;"
-							src="../../../static/modal/action-jump/jumpCalorie.png"></image>
-						<view style="margin-left: 6rpx;">卡路里</view>
-					</view>
-					<view style="margin-top: 12rpx;">{{jumpCalorie}}</view>
+		<view class="flex align-center justify-center" style="width: 750rpx;">
+			<view class="flex justify-center align-center" style="height: 120rpx; width: 444rpx; ">
+				<view  class="text-12px text-white text-center">
+					{{taskDescribe}}
 				</view>
 			</view>
 		</view>
+		
 
 		<!-- <view style="height: 41px;"></view> -->
 

+ 9 - 0
pages.json

@@ -305,6 +305,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/platform-page/guide/guide-ble-scroll",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"subPackages": [{
 		"root": "pages/personal-page",

+ 188 - 43
pages/login-page/pwd/pwd.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
-		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" :title="bModifyPassword?'修改密码':'设置密码'" color="#000000" fixed="true"
-			:border="false">
+		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" :title="bModifyPassword?'修改密码':'设置密码'"
+			color="#000000" fixed="true" :border="false">
 			<view slot="left">
 				<view class=" flex align-center margin-left">
 					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
@@ -14,7 +14,8 @@
 		</uni-nav-bar>
 		<block v-if="bModifyPassword">
 			<view class="card-view password-item flex justify-center ">
-				<m-input style=" margin-left: 46rpx;" type="text" focus clearable v-model="account" placeholder="请输入手机号/邮箱">
+				<m-input style=" margin-left: 46rpx;" type="text" focus clearable v-model="account"
+					placeholder="请输入手机号/邮箱">
 				</m-input>
 			</view>
 			<view class="card-view password-item flex justify-center ">
@@ -28,21 +29,25 @@
 				</m-input>
 			</view>
 			<view class="card-view password-item flex justify-center ">
-				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable v-model="confirmPassword"
-					placeholder="请再次输入新密码">
+				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable
+					v-model="confirmPassword" placeholder="请再次输入新密码">
 				</m-input>
 			</view>
 		</block>
 		<block v-else>
 			<view class="card-view password-item flex justify-center ">
-				<m-input style=" margin-left: 46rpx;" type="text" focus clearable v-model="account" placeholder="请输入手机号/邮箱">
+				<m-input style=" margin-left: 46rpx;" type="text" focus clearable v-model="account"
+					placeholder="请输入手机号/邮箱">
 				</m-input>
 			</view>
 			<view class="card-view cu-form-group ">
 				<view style="width: 16rpx;"></view>
 				<m-input type="number" focus clearable v-model="verificationCode" placeholder="请输入验证码">
 				</m-input>
-				<button class='cu-btn make-bg-bPurple shadow text-white'>获取验证码</button>
+				<button v-if="bCodeDisabled" class="cu-btn make-bg-bPurple shadow text-white"
+					style="background-color: rgb(0,0,0);opacity: 0.5;">
+					重新获取({{count}})</button>
+				<button v-else class="cu-btn make-bg-bPurple shadow text-white" @tap="onGetCode">获取验证码</button>
 			</view>
 			<view class="card-view password-item flex justify-center ">
 				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable v-model="newPassword"
@@ -50,12 +55,12 @@
 				</m-input>
 			</view>
 			<view class="card-view password-item flex justify-center ">
-				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable v-model="confirmPassword"
-					placeholder="请确认新密码">
+				<m-input style=" margin-left: 46rpx;" type="password" maxlength="16" displayable
+					v-model="confirmPassword" placeholder="请确认新密码">
 				</m-input>
 			</view>
 		</block>
-		
+
 
 		<view class="text-red margin-xl text-regular">密码必须是6-18位字符,数字、字母、特殊字符 (不能是纯数字、字母的组合)</view>
 
@@ -66,7 +71,12 @@
 	import service from '../../../util/util-js/service.js';
 	import mInput from '../../../components/m-input.vue';
 	import verify from '../../../util/util-js/verify.js'
-	
+	import config from '@/common/config.js';
+	import reqUtil from "@/util/util-js/requstUtil.js";
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex'
 
 	export default {
 		components: {
@@ -79,79 +89,214 @@
 				newPassword: '',
 				confirmPassword: '',
 				verificationCode: '',
-				bModifyPassword:true
+				bModifyPassword: true,
+				bModifying: false,
 			}
 		},
+		computed: mapState(['bCodeDisabled', 'count']),
 		onLoad(option) {
-			//设置页面状态
-			this.bModifyPassword = option.bModify?true:false;
+			if (option.bModify) {
+				//设置页面状态
+				this.bModifyPassword = JSON.parse(option.bModify);
+			}
 		},
 		methods: {
+			...mapMutations(['countDown', 'resetCountDown']),
+
 			onBack() {
 				uni.navigateBack({
 					delta: 1
 				})
+			},
+			onGetCode() {
+				//置灰状态
+				if (this.bCodeDisabled) return;
+
+				if (!~this.account.indexOf('@')) {
+					if (!verify.checkPhone(this.account)) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入正确手机号'
+						});
+						return;
+					}
+
+					//调用store 倒计时
+					this.countDown({
+						account: this.account,
+						type: 0
+					});
+				} else {
+					if (!verify.checkEMail(this.account)) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入正确邮箱号'
+						});
+						return;
+					}
+
+					//调用store 倒计时
+					this.countDown({
+						account: this.account,
+						type: 1
+					});
+				}
+
+
+
 			},
 			savePassword() {
+				if (this.bModifying) return;
 				/**
 				 * 同时判断两个类型
 				 */
 				if (!~this.account.indexOf('@') && !verify.checkPhone(this.account)) {
-				
+
 					uni.showToast({
 						icon: 'none',
 						title: '手机号不合法',
 					});
 					return;
-				}else if(~this.account.indexOf('@') && !verify.checkEMail(this.account))
-				{
+				} else if (~this.account.indexOf('@') && !verify.checkEMail(this.account)) {
 					uni.showToast({
 						icon: 'none',
 						title: '邮箱地址不合法',
 					});
 					return;
 				}
-				
-				if(this.verificationCode == '' 
-				|| this.verificationCode == undefined 
-				|| this.verificationCode == null){
-					uni.showToast({
-						icon: 'none',
-						title: '输入验证码',
-					});
-					return;
-				}
 
-				if(!verify.checkPassword(this.newPassword)){
-					uni.showToast({
-						icon: 'none',
-						title: '新的密码格式不合法',
-					});
-					return;
+
+				if (this.bModifyPassword) {
+					//如果是修改密码,不需要验证码
+					if (!verify.checkPassword(this.oldPassword)) {
+						uni.showToast({
+							icon: 'none',
+							title: '旧的密码格式不合法',
+						});
+						return;
+					}
+					if (!verify.checkPassword(this.newPassword)) {
+						uni.showToast({
+							icon: 'none',
+							title: '新的密码格式不合法',
+						});
+						return;
+					}
+
+				} else {
+					if (this.verificationCode == '' ||
+						this.verificationCode == undefined ||
+						this.verificationCode == null) {
+						uni.showToast({
+							icon: 'none',
+							title: '输入验证码',
+						});
+						return;
+					}
+					if (!verify.checkPassword(this.newPassword)) {
+						uni.showToast({
+							icon: 'none',
+							title: '新的密码格式不合法',
+						});
+						return;
+					}
 				}
-				
-				if(!verify.checkPassword(this.confirmPassword)){
+
+				if (!verify.checkPassword(this.confirmPassword)) {
 					uni.showToast({
 						icon: 'none',
 						title: '确认的密码格式不合法',
 					});
 					return;
 				}
-				
-				if(this.confirmPassword != this.newPassword){
+				if (this.confirmPassword != this.newPassword) {
 					uni.showToast({
 						icon: 'none',
 						title: '请输入两个相同的密码',
 					});
 					return;
 				}
-				
+
+				this.bModifying = true;
+
 				uni.showToast({
-					icon: 'none',
-					title: '已发送重置邮件至注册邮箱,请注意查收。',
-					duration: 3000
+					icon: 'loading',
+					title: '',
+					duration: 10000
 				});
+
 				//todo 处理新密码
+				if (this.bModifyPassword) {
+					//如果是修改密码,不需要验证码
+					reqUtil.requestData(config.URL.MODIFYPASSWORDFROMACCOUNT, {
+						"account": this.account,
+						"type": !~this.account.indexOf('@') ? 0 : 1,
+						"oldPassword": this.oldPassword,
+						"newPassword": this.newPassword
+					}).then(res => {
+							uni.hideToast();
+
+							console.log("MODIFYPASSWORDFROMACCOUNT" + JSON.stringify(res));
+							if (res.code == 0) {
+								uni.showToast({
+									icon: 'success',
+									title: '设置密码成功',
+									duration: 2000,
+									mask: true
+								});
+								this.$store.state.setPasswordFirstTime = false;
+								setTimeout(() => {
+									this.onBack();
+								}, 2000);
+							} else {
+								uni.showToast({
+									title: '修改密码失败',
+									duration: 2000
+								});
+							}
+							this.resetCountDown();
+							this.bModifying = false;
+
+						},
+						e => {
+							console.log(e);
+							this.bModifying = false;
+						});
+				} else {
+					reqUtil.requestData(config.URL.MODIFYPASSWORDFROMSMS, {
+						"account": this.account,
+						"type": !~this.account.indexOf('@') ? 0 : 1,
+						"code": this.verificationCode,
+						"password": this.newPassword
+					}).then(res => {
+							console.log("MODIFYPASSWORDFROMSMS" + JSON.stringify(res));
+							uni.hideToast();
+
+							if (res.code == 0) {
+								uni.showToast({
+									icon: 'success',
+									title: '修改密码成功',
+									duration: 2000,
+									mask: true
+								});
+								this.$store.state.setPasswordFirstTime = false;
+								setTimeout(() => {
+									this.onBack();
+								}, 2000);
+							} else {
+								uni.showToast({
+									title: '修改密码失败',
+									duration: 2000
+								});
+							}
+							this.resetCountDown();
+							this.bModifying = false;
+						},
+						e => {
+							console.log(e);
+							this.bModifying = false;
+						});
+				}
 			}
 		}
 	}
@@ -161,8 +306,8 @@
 	.password-item {
 		height: 100rpx;
 	}
-	
-	.card-view{
+
+	.card-view {
 		border-radius: 10px;
 	}
 </style>

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

@@ -118,7 +118,7 @@
 					<view class="item-group">
 						<view class="text-grey padding-sm margin-name text-width flex">邮箱
 						</view>
-						<view class="text-bold text-cut" style="width: 220rpx;">{{mailboxNumber!==''?mailboxNumber:'未绑定' }}11111111111111111111</view>
+						<view class="text-bold text-cut" style="width: 220rpx;">{{mailboxNumber!==''?mailboxNumber:'未绑定' }}</view>
 					</view>
 
 				</view>

+ 243 - 32
pages/personal-page/devices-hardware/devices-hardware.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
-		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" @clickRight="onNavUpdateDevice()" title="选择设备类型"
-		 color="#000000" fixed="true" :border="false">
+		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" @clickRight="onNavUpdateDevice()"
+			title="选择设备类型" color="#000000" fixed="true" :border="false">
 			<view slot="left">
 				<view class=" flex align-center margin-left">
 					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
@@ -9,30 +9,111 @@
 			</view>
 			<view slot="right">
 				<view class=" flex align-center " style="margin-right: 10rpx;">
-					<image style="width: 60rpx;height: 50rpx;" src="../../../static/devicesIconSimple/upgrade.png"></image>
+					<image style="width: 60rpx;height: 50rpx;" src="../../../static/devicesIconSimple/upgrade.png">
+					</image>
 				</view>
 			</view>
 		</uni-nav-bar>
-		<view class="card-view padding-top padding-bottom" v-for="(item,index) in devicesList" :key="index" :class="item.bRatio?'hardware-border':''">
+		<view class="card-view padding-top padding-bottom" v-for="(item,index) in devicesList" :key="index"
+			:id="'task_'+index" :class="item.bRatio?'hardware-border':''" :style="{'z-index': threeZIndex}">
 			<view class="flex justify-between align-center">
 				<view class="flex justify-start align-center">
-					<image style="margin-left: 20rpx; width: 200rpx;height: 120rpx;" :src="item.icon" mode="aspectFit"></image>
+					<image style="margin-left: 20rpx; width: 200rpx;height: 120rpx;" :src="item.icon" mode="aspectFit">
+					</image>
 					<view style="width: 350rpx;margin-left: 10rpx;">
-						<view style="margin: 20rpx 0rpx; font-weight: bold; font-size: 18px; color: #565656;">{{item.cname}}</view>
-						<view style="font-size: 12px; white-space:pre-wrap;" class="make-text-bPurple">{{item.describe}}</view>
+						<view style="margin: 20rpx 0rpx; font-weight: bold; font-size: 18px; color: #565656;">
+							{{item.cname}}</view>
+						<view style="font-size: 12px; white-space:pre-wrap;" class="make-text-bPurple">{{item.describe}}
+						</view>
 					</view>
 
 				</view>
-				<image style="margin-right: 60rpx; width: 60rpx;height: 60rpx;" :src="item.bRatio?'/static/devicesOther/radio-b.png':'/static/devicesOther/radio-g.png'"
-				 mode="aspectFit" @tap="_onRadio(item,$event)"></image>
+				<image style="margin-right: 60rpx; width: 60rpx;height: 60rpx;"
+					:src="item.bRatio?'/static/devicesOther/radio-b.png':'/static/devicesOther/radio-g.png'"
+					mode="aspectFit" @tap="_onRadio(item,$event)"></image>
 			</view>
 		</view>
-		<!-- <button @click="onGetDevice()"> onGetDevice</button> -->
-		<!-- <view class="margin">
-			<view class="make-text-bPurple text-14px">** 匹配步骤 **</view>
-			<view class="make-text-bPurple text-14px">1.长按游戏手柄直到蓝灯正常闪烁</view>
-			<view class="make-text-bPurple text-14px">2.蓝灯正常闪烁后,选择下面模式匹配手柄</view>
-		</view> -->
+
+
+
+		<view v-if="currentIndex<5" class="position-absolute-center" style="z-index: 1; width: 750rpx;display: flex;">
+			<swiper class="swiper" :style="{height:currentHeight+'px'}" :circular="circular" :vertical="true"
+				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 class="bluetooth-guide-number" style="position: absolute;left: 94rpx;top: 8rpx;">1</view>
+						<image style="width: 590rpx; height: 626rpx;"
+							src="../../../static/guide/blutooth/guide-ble-1@2x.png">
+						</image>
+					</view>
+
+				</swiper-item>
+				<!-- 2 -->
+				<swiper-item class="flex justify-center align-center flex-direction">
+
+					<image style="width: 354rpx; height: 306rpx; margin-bottom: 28rpx;"
+						src="../../../static/guide/blutooth/guide-ble-device.png">
+					</image>
+					<view class="position-relative">
+						<image style="width: 520rpx; height:166rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+						</image>
+						<view class="position-absolute-center text-regular"
+							style="width: 438rpx;height: 96rpx;top: 26rpx;">长按游戏设备开关3秒,设备灯连续闪烁为可连接状态</view>
+					</view>
+					<view class="bluetooth-guide-number" style="margin-top: 36rpx;">2</view>
+				</swiper-item>
+				<!-- 3 -->
+				<swiper-item class="flex justify-start align-center flex-direction">
+
+					<view :style="{height:threeTipHeight+'px'}"></view>
+					<view class="flex justify-end">
+						<view class="bluetooth-guide-number" style="margin-top: 32rpx;">3</view>
+						<view class="position-relative">
+							<image style="width: 462rpx; height:206rpx;"
+								src="../../../static/guide/blutooth/boxRight@2x.png">
+							</image>
+							<view class="position-absolute-center text-regular"
+								style="width: 392rpx;height: 144rpx;top: 44rpx;">选择设备类型连接,按钮勾选上表示手柄连接成功。如果连接失败请重试</view>
+						</view>
+					</view>
+
+				</swiper-item>
+				<!-- 4 -->
+				<swiper-item class="flex justify-center align-center flex-direction">
+
+					<image style="width: 446rpx; height: 384rpx; margin-bottom: 28rpx;"
+						src="../../../static/guide/blutooth/guide-ble-bind.png">
+					</image>
+					<view class="position-relative">
+						<image style="width: 520rpx; height:166rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+						</image>
+						<view class="position-absolute-center text-regular"
+							style="width: 438rpx;height: 96rpx;top: 26rpx;">请将手柄十字键朝上插入绑带中,用绑带将手柄朝上绑在右脚脚踝上</view>
+					</view>
+					<view class="bluetooth-guide-number" style="margin-top: 36rpx;">4</view>
+				</swiper-item>
+				<!-- 5 -->
+				<swiper-item class="flex justify-start align-center flex-direction">
+
+					<view :style="{height:threeTipHeight+'px'}"></view>
+					<view class="position-relative">
+						<image style="width: 520rpx; height:162rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+						</image>
+						<view class="position-absolute-center flex align-center justify-center"
+							style="width: 438rpx;top: 32rpx;">
+							<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>
+				</swiper-item>
+
+			</swiper>
+		</view>
+
 	</view>
 
 
@@ -50,7 +131,7 @@
 	export default {
 		computed: mapState(['bOpenBluetooth', 'bOpenSuccess', 'bListenAdapterStateChange', 'bListenDeviceFound',
 			'BLEConnectDevice', 'BLEGetServices', 'cIndex', 'bConnection', 'bVerifiedConnection', 'BLEInfoList',
-			'BLEDeviceShowList', 'finallyUseDevice'
+			'BLEDeviceShowList', 'finallyUseDevice', 'systemInfo','guideUnlockState'
 		]),
 		data() {
 			return {
@@ -77,7 +158,14 @@
 				//是否显示
 				bShow: true,
 				//切换连接
-				bSwitch: false
+				bSwitch: false,
+
+				//提示
+				circular: false,
+				currentHeight: 0,
+				threeTipHeight: 0,
+				threeZIndex: 0,
+				currentIndex: 5,
 			}
 		},
 		onLoad(op) {
@@ -110,7 +198,16 @@
 			uni.$on('listenerBLE', this.onListenerBLE);
 
 
-
+			this.currentHeight = this.systemInfo.windowHeight;
+			
+			if (this.guideUnlockState.firstDisconnectBluetooth) {
+			
+				this.currentIndex = 0;
+				let guideUnlockState = Object.assign(this.guideUnlockState, {
+					firstDisconnectBluetooth: false
+				});
+				this.setGuideUnlockState(guideUnlockState);
+			}
 		},
 		onUnload() {
 			uni.$off('retryConnectBLESuccess', this.onRetryConnectBLESuccess);
@@ -131,7 +228,7 @@
 					if (
 						(eq.ename.indexOf("mobilePhoneBandage") > -1 && this.BLEConnectDevice.id == 0) ||
 						(eq.ename.indexOf("hotman") > -1 && this.BLEConnectDevice.id == 1) ||
-						(eq.ename.indexOf("BLEHandle") > -1 && this.BLEConnectDevice.id == 2)||
+						(eq.ename.indexOf("BLEHandle") > -1 && this.BLEConnectDevice.id == 2) ||
 						(eq.ename.indexOf("rope") > -1 && this.BLEConnectDevice.id == 3)) {
 						eq.bRatio = true;
 						this.currentItem = eq;
@@ -153,6 +250,14 @@
 			}
 
 
+		},
+		onReady() {
+			let view = uni.createSelectorQuery().select('#task_0');
+			view.boundingClientRect(data => {
+				// console.log('参数:' + JSON.stringify(data));
+				//13 是间隔
+				this.threeTipHeight = data.top + data.height + 13;
+			}).exec();
 		},
 		onHide() {
 			//如果蓝牙弹出匹配框,会触发onHide。这时候处理蓝牙连接流程检测应等onShow 时候,再检测
@@ -161,7 +266,8 @@
 		methods: {
 			...mapMutations(['initAdapter', 'onCreateBLESuccess', 'onGetBLEDeviceServices', 'onOnlyCloseBLEConnection',
 				'onGetRSSITransDistance',
-				'addBLEDevice', 'onWriteBLEConnectionValue', 'deleteBLEDevice', 'B_GetBondedDevices', 'B_OpenBLESetting'
+				'addBLEDevice', 'onWriteBLEConnectionValue', 'deleteBLEDevice', 'B_GetBondedDevices',
+				'B_OpenBLESetting','setGuideUnlockState'
 			]),
 			//
 			onClearTimeout() {
@@ -204,7 +310,8 @@
 				// mac="BB:34:24:22:77:88";
 				// mac="较è¾";
 				//判断mac地址是否是合理的格式
-				var tempMacRegExp = /[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}/;
+				var tempMacRegExp =
+					/[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}/;
 				if (!tempMacRegExp.test(mac)) {
 					uni.hideToast();
 					uni.showModal({
@@ -296,7 +403,7 @@
 					if (
 						(eq.ename.indexOf("mobilePhoneBandage") > -1 && this.BLEConnectDevice.id == 0) ||
 						(eq.ename.indexOf("hotman") > -1 && this.BLEConnectDevice.id == 1) ||
-						(eq.ename.indexOf("BLEHandle") > -1 && this.BLEConnectDevice.id == 2)||
+						(eq.ename.indexOf("BLEHandle") > -1 && this.BLEConnectDevice.id == 2) ||
 						(eq.ename.indexOf("rope") > -1 && this.BLEConnectDevice.id == 3)) {
 
 						eq.bRatio = true;
@@ -449,7 +556,9 @@
 								"name": bondedDevice.name,
 								"RSSI": -74,
 								"localName": "",
-								"advertisServiceUUIDs": ["00001812-0000-1000-8000-00805F9B34FB", "0000FFF0-0000-1000-8000-00805F9B34FB"]
+								"advertisServiceUUIDs": ["00001812-0000-1000-8000-00805F9B34FB",
+									"0000FFF0-0000-1000-8000-00805F9B34FB"
+								]
 							}
 
 							let obj = Object.assign({}, setDevice, _self.currentItem);
@@ -543,12 +652,13 @@
 					 */
 					// console.log("onBluetoothDeviceFound:", res);
 					res.devices.forEach(device => {
-						if (device.name.indexOf('PBox') > -1 || device.name.indexOf('BGBox') > -1 || device.name.indexOf('Rope') > -1) {
+						if (device.name.indexOf('PBox') > -1 || device.name.indexOf('BGBox') > -1 || device
+							.name.indexOf('Rope') > -1) {
 							//如果搜索的设备名 不是对应当前设备类型,过滤
 							// if (device.name.indexOf(_self.currentItem.deviceName) == -1) return;
-							if (_self.currentItem.deviceName.indexOf('PBox') == -1 
-							&& _self.currentItem.deviceName.indexOf('BGBox') == -1
-							&& _self.currentItem.deviceName.indexOf('Rope') == -1
+							if (_self.currentItem.deviceName.indexOf('PBox') == -1 &&
+								_self.currentItem.deviceName.indexOf('BGBox') == -1 &&
+								_self.currentItem.deviceName.indexOf('Rope') == -1
 							) return;
 							//寻找到对应设备时候,其余的返回
 							if (_self.searchObj) return;
@@ -684,10 +794,16 @@
 											})
 											this.onOnlyCloseBLEConnection({
 												getSuccess: () => {
-													if (this.currentItem)
-														this.currentItem.bRatio = false;
-
-													this.currentItem = null;
+													if (this
+														.currentItem
+														)
+														this
+														.currentItem
+														.bRatio =
+														false;
+
+													this.currentItem =
+														null;
 												}
 											});
 										}, 6000)
@@ -714,7 +830,8 @@
 								this.currentItem = null;
 								this.currentItem = item;
 								this.bSwitch = true;
-								console.log("this.currentItem1 ==:", this.currentItem, this.bOpenBluetooth, this.BLEConnectDevice);
+								console.log("this.currentItem1 ==:", this.currentItem, this.bOpenBluetooth,
+									this.BLEConnectDevice);
 								this.startBluetoothDeviceDiscovery();
 							}
 						});
@@ -773,6 +890,78 @@
 				})
 
 
+			},
+
+			onSwiperChange(e) {
+				let currentIndex = e.detail.current;
+				// console.log(currentIndex);
+				if (currentIndex === this._videoIndex) {
+					return;
+				}
+
+				if (currentIndex === 2) {
+					setTimeout(() => {
+						this.threeZIndex = 2;
+					}, 200)
+				} else {
+					this.threeZIndex = 0;
+				}
+
+				// let isNext = false;
+				// if (currentIndex === 0 && this._videoIndex === this.videoList.length - 1) {
+				// 	isNext = true;
+				// } else if (currentIndex === this.videoList.length - 1 && this._videoIndex === 0) {
+				// 	isNext = false;
+				// } else if (currentIndex > this._videoIndex) {
+				// 	isNext = true;
+				// }
+
+				// if (isNext) {
+				// 	this._videoDataIndex++;
+				// } else {
+				// 	this._videoDataIndex--;
+				// }
+
+				// if (this._videoDataIndex < 0) {
+				// 	this._videoDataIndex = this.videoDataList.length - 1;
+				// } else if (this._videoDataIndex >= this.videoDataList.length) {
+				// 	this._videoDataIndex = 0;
+				// }
+
+				// this.circular = (this._videoDataIndex != 0);
+
+				// if (this._videoIndex >= 0) {
+				//     this._videoContextList[this._videoIndex].pause();
+				//     this._videoContextList[this._videoIndex].seek(0);
+				// }
+
+				// this._videoIndex = currentIndex;
+
+
+			},
+			//禁止用户手动滑动
+			stopTouchMove() {
+				// return;
+			},
+			onSwiperClick() {
+				console.log('onSwiperClick');
+
+				this.currentIndex++;
+
+				if (this.currentIndex === 2) {
+					setTimeout(() => {
+						this.threeZIndex = 2;
+					}, 200)
+				} else {
+					this.threeZIndex = 0;
+				}
+
+
+			},
+			onSwiperItemClick(e) {
+				console.log('onSwiperItemClick');
+
+
 			}
 		}
 
@@ -784,4 +973,26 @@
 		border: 1rpx solid #9898FF;
 		box-sizing: border-box;
 	}
+
+	.swiper {
+		flex: 1;
+		background-color: rgba(0, 0, 0, 0.32);
+	}
+
+	.swiper-item {
+		flex: 1;
+	}
+
+	.bluetooth-guide-number {
+		border-radius: 18px;
+		border-width: 1rpx;
+		width: 30px;
+		height: 30px;
+		text-align: center;
+		line-height: 30px;
+		color: #000000;
+		/* border-color: #FFFFFF; */
+		background-color: #FFFFFF;
+		margin-right: 13px;
+	}
 </style>

+ 127 - 41
pages/personal-page/personal/personal.vue

@@ -382,9 +382,9 @@
 		<code-elf-guide ref="codeElfGuide" v-if="bGuidePages" @hide="guideHide" @change="onGuideChange"
 			:current="guideCurrent" :currentMode="currentMode"></code-elf-guide>
 
-		<!-- <view v-if="bStartBoxingPost" class="CountDownMask">
+		<view v-if="bStartCountDown" class="CountDownMask">
 			{{BoxingPostCountDownText}}
-		</view> -->
+		</view>
 
 		<view class="cu-modal " :class="modalName=='showPlanTipModal'?'show':''"
 			@touchmove.stop.prevent="moveBoxingHandle">
@@ -457,7 +457,7 @@
 					<!-- :class="!item.isUnlock?'':'make-text-bPurple'" -->
 					<view class="my-column-cu-steps">
 						<view class="cu-item"
-							:class="(currentJumpTask!=null&&item.id==currentJumpTask.item.id)?'make-bg-bPurple-01':''"
+							:class="(tempSelectedLevel!=null&&item.id==tempSelectedLevel.item.id)?'make-bg-bPurple-01':''"
 							v-for="(item,index) in currentTaskList" :key="index" :id='"task_"+index'
 							@click="selectTask(index,item)">
 							<image v-if="item.isUnlock" class="my-column-cu-image"
@@ -515,18 +515,20 @@
 								style="right: 70rpx;bottom: 24rpx;">游戏中...</view>
 							<!-- /static/devicesOther/radio-g -->
 							<image class="my-column-cu-image"
-								style="left: 140rpx;top: 50rpx; width: 30rpx;height: 30rpx;"
-								:src="(currentJumpTask!=null&&item.id==currentJumpTask.item.id)?'/static/devicesOther/radio-b.png':'.png'"
+								style="left: 140rpx;top: 70rpx; width: 30rpx;height: 30rpx;"
+								:src="(tempSelectedLevel!=null&&item.id==tempSelectedLevel.item.id)?'/static/devicesOther/radio-b.png':'.png'"
 								mode="aspectFit"></image>
 
 						</view>
 					</view>
 				</scroll-view>
 
-
 				<button class="cu-btn make-bg-bPurple text-white margin-top margin-bottom"
-					style="width: 604rpx;height: 88rpx;" @tap="onPassTheLevel">点击直接通过所选关卡</button>
+					style="width: 604rpx;height: 88rpx;" @tap="onConfirmSelectionLevel">确认</button>
 
+				<!-- <button class="cu-btn make-bg-bPurple text-white margin-top margin-bottom"
+					style="width: 604rpx;height: 88rpx;" @tap="onPassTheLevel">点击直接通过所选关卡</button>
+ -->
 			</view>
 		</view>
 
@@ -714,6 +716,7 @@
 				//屏幕抖动
 				bEFHitShake: false,
 				bStartBoxingPost: false,
+				bStartCountDown: false,
 				BoxingPostCountDownText: 3,
 				b_countDown: null,
 
@@ -818,7 +821,12 @@
 				 * 任务参数
 				 */
 				modalHeight: 300,
-				vLog: ''
+				vLog: '',
+
+				/**
+				 * 任务关卡相关
+				 */
+				tempSelectedLevel: null
 
 			};
 		},
@@ -1111,6 +1119,8 @@
 						time: 0,
 						allData: 0,
 					}
+				} else if (this.modalName == "slideUpModal") {
+					this.tempSelectedLevel = this.currentJumpTask;
 				}
 				this.modalName = null;
 				this.$store.state.bCanvasShow = true;
@@ -1775,7 +1785,7 @@
 			},
 
 			//判断是否有其他限制
-			onStartCheck() {
+			onStartCheck(data) {
 				//#ifdef H5
 				// 直接走测试,如果是h5 APP-PLUS
 				if (0 === this.currentModeIndex) {
@@ -1939,17 +1949,57 @@
 					}
 
 				} else if (1 == this.currentModeIndex) {
-					if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
-						//打开跳绳模式
-						// this.B_OpenRopeSkipping();
-						this.onWriteBLEConnectionValue({
-							value: "3"
-						});
+					if (data) {
+						let {
+							bStartCountDown
+						} = data;
+						this.bStartCountDown = bStartCountDown;
 					}
-					//监听蓝牙回调
-					uni.$on('updateBLEDeviceData', this.callbackUpdateBLEData);
-					//调用开始
-					this.onActionJumpPlay();
+					if (this.bStartCountDown) {
+						this.BoxingPostCountDownText = 3;
+						this.b_countDown = setInterval(() => {
+							if (this.BoxingPostCountDownText <= 1) {
+								if (this.b_countDown) {
+									clearInterval(this.b_countDown);
+									this.b_countDown = null;
+								}
+								setTimeout(() => {
+									this.personalAudioContext.stop();
+									this.personalAudioContext.play();
+
+									//倒计时结束后开始游戏
+									if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
+										//打开跳绳模式
+										// this.B_OpenRopeSkipping();
+										this.onWriteBLEConnectionValue({
+											value: "3"
+										});
+									}
+									//监听蓝牙回调
+									uni.$on('updateBLEDeviceData', this.callbackUpdateBLEData);
+									//调用开始
+									this.onActionJumpPlay();
+
+									this.bStartCountDown = false;
+								}, 800)
+								return;
+							}
+							this.BoxingPostCountDownText--;
+						}, 1000)
+					} else {
+						if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
+							//打开跳绳模式
+							// this.B_OpenRopeSkipping();
+							this.onWriteBLEConnectionValue({
+								value: "3"
+							});
+						}
+						//监听蓝牙回调
+						uni.$on('updateBLEDeviceData', this.callbackUpdateBLEData);
+						//调用开始
+						this.onActionJumpPlay();
+					}
+
 				}
 			},
 			onShowBoxingHitTip() {
@@ -1959,18 +2009,28 @@
 				this.$store.state.bNewGuide = false;
 			},
 			//检测是否符合要求,没有的话进行新手提示
-			onPersonalCheck() {
+			onPersonalCheck(data) {
 
 				if (1 === this.currentModeIndex) {
 					if (this.currentJumpTask == null) {
-						uni.showToast({
-							title: '先选一个挑战关卡',
-							icon: 'none',
-							duration: 2000,
-						})
+
+						if (this.guideUnlockState.firstPromptSelectLevel) {
+							this.onTipLevel();
+							let guideUnlockState = Object.assign(this.guideUnlockState, {
+								firstPromptSelectLevel: false
+							});
+							this.setGuideUnlockState(guideUnlockState);
+						} else {
+							uni.showToast({
+								title: '先选一个挑战关卡',
+								icon: 'none',
+								duration: 2000,
+							})
+						}
 						return;
 					}
 					if (this.currentMode == 'pkMode' && this.finallySelectFriendInfo == null) {
+						//todo 这里没处理 新手提示
 						uni.showToast({
 							title: '选择一个pk好友',
 							icon: 'none',
@@ -2014,7 +2074,7 @@
 					}
 				}
 
-				this.onStartCheck();
+				this.onStartCheck(data);
 			},
 			//
 			onBoxingGuideFinish() {
@@ -2659,17 +2719,17 @@
 			 */
 			fabClick() {
 				//如果第一次点击悬停按钮
-				if (this.guideUnlockState.firstDisconnectBluetooth) {
-
-					this.onGetBluetoothConnectView({
-						hiddenType: 'firstDisconnectBluetooth'
-					});
-					let guideUnlockState = Object.assign(this.guideUnlockState, {
-						firstDisconnectBluetooth: false
-					});
-					this.setGuideUnlockState(guideUnlockState);
-					return;
-				}
+				// if (this.guideUnlockState.firstDisconnectBluetooth) {
+
+				// 	this.onGetBluetoothConnectView({
+				// 		hiddenType: 'firstDisconnectBluetooth'
+				// 	});
+				// 	let guideUnlockState = Object.assign(this.guideUnlockState, {
+				// 		firstDisconnectBluetooth: false
+				// 	});
+				// 	this.setGuideUnlockState(guideUnlockState);
+				// 	return;
+				// }
 
 
 
@@ -2962,7 +3022,8 @@
 						index: _index,
 						item: _item,
 					}
-					this.setActionJumpTask(_data);
+					//记录临时选择的游戏关卡
+					this.tempSelectedLevel = _data;
 				} else {
 					let isCanUnlock = _index == 0 || (_index >= 1 && this.currentTaskList[_index - 1].isUnlock && this
 						.currentTaskList[_index - 1].isPassed) ? true : false;
@@ -3002,6 +3063,9 @@
 
 				this.switchTaskInfo();
 			},
+			/**
+			 * @deprecated Test 测试通过关卡
+			 */
 			onPassTheLevel() {
 				if (this.currentMode == "pkMode") {
 					this.AJData.myScore = 10;
@@ -3011,6 +3075,28 @@
 					myWin: true
 				});
 			},
+			//确认时候选择按钮
+			onConfirmSelectionLevel() {
+				if (this.tempSelectedLevel == null) {
+					uni.showToast({
+						icon: 'none',
+						title: '先选择一个挑战关卡',
+						mask: true
+					})
+					return;
+				}
+				//点击确认时候,记录关卡,并且开始游戏
+				this.setActionJumpTask(this.tempSelectedLevel);
+
+				this.hideModal();
+				setTimeout(()=>{
+					// 自动调用开始游戏
+					this.onPersonalCheck({
+						bStartCountDown: true
+					});
+				},300);
+
+			},
 			registerPopupEvent() {
 				// 接收 popup 的消息
 				uni.$on('reward-popup-page', (data) => {
@@ -3142,7 +3228,7 @@
 											this.onGetBluetoothConnectView({
 												hiddenType: 'firstInstallation'
 											});
-										}, 50)
+										}, 100)
 									}
 								}
 							} else if (data.messageType == 'bluetoothConnect') {
@@ -3158,7 +3244,7 @@
 											this.showGuide('level-button-tip', {
 												hiddenType: 'firstInstallation'
 											});
-										}, 50)
+										}, 100)
 									} else if (data.hiddenType == 'firstDisconnectBluetooth') {
 										this.fabClick();
 									}
@@ -3174,7 +3260,7 @@
 											this.showGuide('level-button-tip', {
 												hiddenType: 'firstInstallation'
 											});
-										}, 30)
+										}, 100)
 									}
 								}
 							} else if (data.messageType == 'level-button-tip') {

+ 299 - 0
pages/platform-page/guide/guide-ble-scroll.vue

@@ -0,0 +1,299 @@
+<template>
+	<view>
+		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" @clickRight="onNavUpdateDevice()"
+			title="蓝牙连接指导" color="#000000" fixed="true" :border="false">
+			<view slot="left">
+				<view class=" flex align-center margin-left">
+					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
+				</view>
+			</view>
+			<!-- <view slot="right">
+				<view class=" flex align-center " style="margin-right: 10rpx;">
+					<image style="width: 60rpx;height: 50rpx;" src="../../../static/devicesIconSimple/upgrade.png">
+					</image>
+				</view>
+			</view> -->
+		</uni-nav-bar>
+
+		<view class="swiper">
+			<!-- 1 -->
+			<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;"
+						src="../../../static/guide/blutooth/guide-ble-1@2x.png">
+					</image>
+				</view>
+
+			</view>
+			<!-- 2 -->
+			<view class="flex justify-center align-center flex-direction" style="margin-top: 60px;">
+
+				<image style="width: 354rpx; height: 306rpx; margin-bottom: 28rpx;"
+					src="../../../static/guide/blutooth/guide-ble-device.png">
+				</image>
+				<view class="position-relative">
+					<image style="width: 520rpx; height:166rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+					</image>
+					<view class="position-absolute-center text-regular" style="width: 438rpx;height: 96rpx;top: 26rpx;">
+						长按游戏设备开关3秒,设备灯连续闪烁为可连接状态</view>
+				</view>
+				<view class="bluetooth-guide-number" style="margin-top: 36rpx;">2</view>
+			</view>
+			<!-- 3 -->
+			<view class="flex justify-start align-center flex-direction" style="margin-top: 60px;">
+
+				<view class="card-view padding-top padding-bottom" :style="{'z-index': threeZIndex}"
+					v-for="(item,index) in devicesList" :key="index" :class="item.bRatio?'hardware-border':''"
+					:id="'task_'+index">
+					<view class="flex justify-between align-center">
+						<view class="flex justify-start align-center">
+							<image style="margin-left: 20rpx; width: 200rpx;height: 120rpx;" :src="item.icon"
+								mode="aspectFit">
+							</image>
+							<view style="width: 350rpx;margin-left: 10rpx;">
+								<view style="margin: 20rpx 0rpx; font-weight: bold; font-size: 18px; color: #565656;">
+									{{item.cname}}
+								</view>
+								<view style="font-size: 12px; white-space:pre-wrap;" class="make-text-bPurple">
+									{{item.describe}}
+								</view>
+							</view>
+
+						</view>
+						<!-- item.bRatio -->
+						<image style="margin-right: 60rpx; width: 60rpx;height: 60rpx;"
+							:src="threeZIndex == 1100?'/static/devicesOther/radio-b.png':'/static/devicesOther/radio-g.png'"
+							mode="aspectFit"></image>
+					</view>
+				</view>
+				<!-- <view :style="{height:threeTipHeight+'px'}"></view> -->
+				<view class="flex justify-end">
+					<view class="bluetooth-guide-number" style="margin-top: 32rpx;">3</view>
+					<view class="position-relative">
+						<image style="width: 462rpx; height:206rpx;"
+							src="../../../static/guide/blutooth/boxRight@2x.png">
+						</image>
+						<view class="position-absolute-center text-regular"
+							style="width: 392rpx;height: 144rpx;top: 44rpx;">选择设备类型连接,按钮勾选上表示手柄连接成功。如果连接失败请重试</view>
+					</view>
+				</view>
+
+			</view>
+			<!-- 4 -->
+			<view class="flex justify-center align-center flex-direction" style="margin-top: 60px;">
+
+				<image style="width: 446rpx; height: 384rpx; margin-bottom: 28rpx;"
+					src="../../../static/guide/blutooth/guide-ble-bind.png">
+				</image>
+				<view class="position-relative">
+					<image style="width: 520rpx; height:166rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+					</image>
+					<view class="position-absolute-center text-regular" style="width: 438rpx;height: 96rpx;top: 26rpx;">
+						请将手柄十字键朝上插入绑带中,用绑带将手柄朝上绑在右脚脚踝上</view>
+				</view>
+				<view class="bluetooth-guide-number" style="margin-top: 36rpx;">4</view>
+			</view>
+			<!-- 5 -->
+			<view class="flex justify-start align-center flex-direction" style="padding: 60px 0;">
+
+				<!-- <view :style="{height:threeTipHeight+'px'}"></view> -->
+				<view class="position-relative">
+					<image style="width: 520rpx; height:162rpx;" src="../../../static/guide/blutooth/boxMid@2x.png">
+					</image>
+					<view class="position-absolute-center flex align-center justify-center"
+						style="width: 438rpx;top: 32rpx;">
+						<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>
+				<!-- 			<button class="cu-btn make-bg-bPurple text-white " style="width: 520rpx; height:81rpx;margin-top: 100rpx;"
+							@click="onBack()">返回上一页</button> -->
+			</view>
+		</view>
+
+
+
+	</view>
+
+
+</template>
+
+<script>
+	import config from '@/common/config.js'
+	import reqUtil from '@/util/util-js/requstUtil.js';
+
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+
+	export default {
+		computed: mapState(['BLEInfoList', 'systemInfo']),
+		data() {
+			return {
+				devicesList: [],
+				circular: true,
+				videoList: [{
+						id: "video0",
+						src: "",
+						img: ""
+					},
+					{
+						id: "video1",
+						src: "",
+						img: ""
+					},
+					{
+						id: "video2",
+						src: "",
+						img: ""
+					}
+				],
+				videoDataList: [],
+				currentHeight: 0,
+				threeTipHeight: 0,
+				threeZIndex: 100,
+			}
+		},
+		onLoad(op) {
+
+			this.BLEInfoList.forEach((item, index, selfarr) => {
+				//item.deviceType == 'BLEHandle' || 
+				if (item.deviceType == 'BLERope') {
+					let item = Object.assign({}, selfarr[index]);
+					this.devicesList.push(item);
+				}
+			})
+
+			this.currentHeight = this.systemInfo.windowHeight;
+			// console.log(this.currentHeight);
+
+
+		},
+		onUnload() {
+
+		},
+		onShow() {
+
+		},
+		onReady() {
+			let view = uni.createSelectorQuery().select('#task_0');
+			view.boundingClientRect(data => {
+				// console.log('参数:' + JSON.stringify(data));
+				//13 是间隔
+				this.threeTipHeight = data.top + data.height + 13;
+			}).exec();
+		},
+		onHide() {},
+		methods: {
+			...mapMutations([]),
+
+			onBack() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			onNavUpdateDevice() {
+				uni.showToast({
+					title: '点击此处升级硬件',
+					icon: 'none'
+				})
+			},
+			onSwiperChange(e) {
+				let currentIndex = e.detail.current;
+				// console.log(currentIndex);
+				if (currentIndex === this._videoIndex) {
+					return;
+				}
+
+				if (currentIndex === 2) {
+					setTimeout(() => {
+						this.threeZIndex = 1100;
+					}, 200)
+				} else {
+					this.threeZIndex = 100;
+				}
+
+				// let isNext = false;
+				// if (currentIndex === 0 && this._videoIndex === this.videoList.length - 1) {
+				// 	isNext = true;
+				// } else if (currentIndex === this.videoList.length - 1 && this._videoIndex === 0) {
+				// 	isNext = false;
+				// } else if (currentIndex > this._videoIndex) {
+				// 	isNext = true;
+				// }
+
+				// if (isNext) {
+				// 	this._videoDataIndex++;
+				// } else {
+				// 	this._videoDataIndex--;
+				// }
+
+				// if (this._videoDataIndex < 0) {
+				// 	this._videoDataIndex = this.videoDataList.length - 1;
+				// } else if (this._videoDataIndex >= this.videoDataList.length) {
+				// 	this._videoDataIndex = 0;
+				// }
+
+				// this.circular = (this._videoDataIndex != 0);
+
+				// if (this._videoIndex >= 0) {
+				//     this._videoContextList[this._videoIndex].pause();
+				//     this._videoContextList[this._videoIndex].seek(0);
+				// }
+
+				// this._videoIndex = currentIndex;
+
+
+			},
+			onNavtoHome() {
+				uni.reLaunch({
+					url: '../../personal-page/personal/personal'
+				})
+			}
+		}
+
+	}
+</script>
+
+<style>
+	.hardware-border {
+		border: 1rpx solid #9898FF;
+		box-sizing: border-box;
+	}
+
+
+	.swiper {
+		flex: 1;
+		background-color: rgba(0, 0, 0, 0.32);
+	}
+
+	.swiper-item {
+		flex: 1;
+	}
+
+	.video {
+		flex: 1;
+		/* #ifndef APP-PLUS */
+		width: 100%;
+		/* #endif */
+	}
+
+	.bluetooth-guide-number {
+		border-radius: 18px;
+		border-width: 1rpx;
+		width: 30px;
+		height: 30px;
+		text-align: center;
+		line-height: 30px;
+		color: #000000;
+		/* border-color: #FFFFFF; */
+		background-color: #FFFFFF;
+		margin-right: 13px;
+	}
+</style>

+ 3 - 2
pages/platform-page/guide/guide.vue

@@ -74,7 +74,8 @@
 							// firstDisconnectBluetooth: true,
 							firstUnlockJumpUp: true,
 							firstUnlockLeftAndRightJump: true,
-							firstUnlockLeftAndRightRotationJump: true
+							firstUnlockLeftAndRightRotationJump: true,
+							firstPromptSelectLevel:true
 						});
 						this.setGuideUnlockState(guideUnlockState);
 						
@@ -86,7 +87,7 @@
 						});
 						return;
 					case 'bluetoothConnect':
-						url = './guide-bluetoothConnect';
+						url = './guide-ble-scroll';
 						break;
 					case 'gameGuide':
 						uni.showToast({

+ 18 - 7
pages/platform-page/settings/settings.vue

@@ -10,10 +10,12 @@
 
 		</uni-nav-bar>
 		<view class="card-view settings-item" v-for="(item,index) in list" :key="index">
-			<view class="content position-relative"  @tap="onNavTo(item)">
+			<view class="content position-relative" @tap="onNavTo(item)">
 				<text class="text-black text-regular text-16px margin-left-xl">{{item.gameName}}</text>
 				<view v-if="index == 0" class="position-absolute-center">
-					<view class="text-gray" style="text-align: end;margin-right: 88rpx; line-height: 100rpx;">{{bModify?'已设置':'未设置'}}</view>
+					<view class="text-gray" style="text-align: end;margin-right: 88rpx; line-height: 100rpx;">
+						{{setPasswordFirstTime?'未设置':'已设置'}}
+					</view>
 				</view>
 				<view class="only-arrow"></view>
 			</view>
@@ -28,7 +30,7 @@
 		mapState
 	} from 'vuex';
 	export default {
-		computed: mapState(['platform', 'gamePlatform']),
+		computed: mapState(['platform', 'gamePlatform', 'setPasswordFirstTime', 'phoneNumber', 'mailboxNumber']),
 		data() {
 			return {
 				list: [{
@@ -45,8 +47,7 @@
 				type: '',
 				page: 1,
 				size: 10,
-				bDontUpdate: false,
-				bModify: true,
+				bDontUpdate: false
 			}
 		},
 		onLoad(option) {
@@ -63,12 +64,22 @@
 			},
 
 			onNavTo(item) {
-				console.log(item);
+				// console.log(item);
 				let url = '';
 				switch (item.navType) {
 					case 'password':
+						if (this.phoneNumber == '' && this.mailboxNumber == '') {
+
+							uni.showToast({
+								icon: 'none',
+								title: '  请先点击头像进绑定手机号或邮箱才可以设置密码!',
+								duration: 3000,
+								mask: true
+							})
+							return;
+						}
 						//todo 判断密码是否已经设置。如果没有,进入设置密码,如果已经设置了,进入修改密码;
-						url = '/pages/login-page/pwd/pwd?bModify=' + this.bModify;
+						url = '/pages/login-page/pwd/pwd?bModify=' + !this.setPasswordFirstTime;
 						break;
 					case 'guide':
 						url = '/pages/platform-page/guide/guide';

+ 2 - 2
platform/app-plus/subNVue/drawer.nvue

@@ -5,13 +5,13 @@
 				<image style="width: 750rpx;height: 672rpx;" src="../../../static/sidebar_white.png"></image>
 			</view>
 			<view class="blank-space"></view>
-			<view class="flex justify-center align-center ">
+			<view class="flex justify-center align-center " @tap="onNavEditInfoPage">
 				<view style="width: 146rpx;height: 146rpx; border-radius: 45px;">
 					<image class="avatar-img bg-black" mode="aspectFit" :src="avatarUrl">
 					</image>
 				</view>
 
-				<view class="flex flex-direction-row align-center margin-12px " @tap="onNavEditInfoPage">
+				<view class="flex flex-direction-row align-center margin-12px " >
 					<text class="text-22px text-bold">{{userName}}
 					</text>
 					<image style="width: 34rpx;height: 34rpx; margin-left: 22rpx;" src="/static/sideEdit.png"></image>

+ 11 - 7
util/util-js/store.js

@@ -49,13 +49,14 @@ const store = new Vuex.Store({
 		//是否是第一次走新手
 		bNewGuide: false,
 		//解锁状态,和首次安装app相关
+		//注意添加新字段时候。需要到 platform-page/guide.vue 确认需不需要添加新的reset
 		guideUnlockState: {
-			//是否首次安装
-			firstInstallation: true,
-			firstDisconnectBluetooth: true,
-			firstUnlockJumpUp: true,
-			firstUnlockLeftAndRightJump: true,
-			firstUnlockLeftAndRightRotationJump: true
+			firstInstallation: true,		//是否首次安装
+			firstDisconnectBluetooth: true,	//是否首次连接蓝牙
+			firstUnlockJumpUp: true,        //是否首次向上跳
+			firstUnlockLeftAndRightJump: true,//是否首次左右跳
+			firstUnlockLeftAndRightRotationJump: true,
+			firstPromptSelectLevel:true //是否首次提示选择关卡
 		},
 
 
@@ -210,6 +211,8 @@ const store = new Vuex.Store({
 		//phoneNumber
 		phoneNumber: '',
 		mailboxNumber: '',
+		//是否是第一次设置密码,根据这个值判断.默认未设置,即设置true
+		setPasswordFirstTime: true,
 		openid: '',
 		appleid: '',
 
@@ -507,7 +510,7 @@ const store = new Vuex.Store({
 			if (value) {
 				state.guideUnlockState = value;
 			}
-			console.log('获取guideUnlockState',state.guideUnlockState)
+			console.log('获取guideUnlockState', state.guideUnlockState)
 		},
 
 		/**
@@ -1257,6 +1260,7 @@ const store = new Vuex.Store({
 						let userInfo = res.data.userInfo;
 						state.phoneNumber = res.data.phoneNumber || '';
 						state.mailboxNumber = res.data.mailboxNumber || '';
+						state.setPasswordFirstTime = res.data.setPasswordFirstTime;
 						state.openid = res.data.openid || '';
 						self.commit('login', userInfo);
 					} else if (res.code = 201) {