Эх сурвалжийг харах

1.改版首页样式
2.备份两个copy页面

slambb 3 жил өмнө
parent
commit
ebb30f5ddd

+ 11 - 2
components/LEDFont/LEDFont.vue

@@ -1,6 +1,10 @@
 <template>
 	<view>
-		<view class="uni__number" :style="{ color: color, 'font-size': size+'px' }"> {{currentValue}}</view>
+		<view class="uni__number" 
+		:style="{ color: color, 
+		'font-size': size+'px' ,
+		'height': height+'px',
+		'line-height': height+'px'}"> {{currentValue}}</view>
 	</view>
 </template>
 
@@ -8,6 +12,10 @@
 	export default {
 		name: "LEDFont",
 		props: {
+			height: {
+				type: Number,
+				value: '28'
+			},
 			size: {
 				type: Number,
 				value: '24'
@@ -17,7 +25,7 @@
 				default: '#000000'
 			},
 			showValue: {
-				type: Number,
+				type: [Number,String],
 				default: 0
 			}
 		},
@@ -58,5 +66,6 @@
 		font-size: 23px;
 		font-family: UnidreamLED;
 		border-radius: 3px;
+		/* border: 1rpx solid #000000; */
 	}
 </style>

+ 1361 - 0
components/modal/action-jump/action-jump-copy.vue

@@ -0,0 +1,1361 @@
+<!-- 旧版本跳区域部分文件 -->
+<template>
+	<view style="width: 750rpx;">
+		<view class="flex justify-center" style="margin-top: 32rpx;">
+			<!-- 目前格子数量不代表数字,显示完成度而已 -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">
+						<view
+							:class="showCurCount>=index? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
+						</view>
+						<view :class="(index%5 == 0||index == 1)?'':'grid-progress-text-hidden'"
+							class="grid-progress-vertical-text">
+							{{Math.floor(taskSignCount / 40 * index)}}
+						</view>
+					</view>
+				</view>
+				<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">
+						<view :class="(index%5 == 0||index == 1)?'':'grid-progress-text-hidden'"
+							class="grid-progress-vertical-text">
+							{{Math.floor(taskSignCount / 40 * index)+taskSignCount/2}}
+						</view>
+						<view
+							:class="showCurCount>=index+20? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
+						</view>
+					</view>
+				</view>
+			</view>
+			<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 class="position-relative">
+			<canvas canvas-id="actionJumpCanvas" :style="{ width: canvasW + 'px', height: canvasH + 'px' }"></canvas>
+			<canvas class="position-absolute-center" canvas-id="effectCanvas"
+				:style="{ width: canvasW + 'px', height: '164px' }"></canvas>
+		</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> -->
+
+		<!-- 测试按钮 -->
+		<!-- 	<view style="display: flex;justify-content: space-between;">
+			<view>{{isY?'Y':'X'}}</view>
+			<button @click="onChangeY">Y为旋转轴</button>
+			<button @click="onChangeX">X为旋转轴</button>
+		</view> -->
+
+		<!-- #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>
+		<!-- #endif -->
+
+
+		<!-- <view style="display: flex;justify-content: space-around; padding-bottom: 100rpx;">
+			<view style="font-size: 14px;">t:{{countdown}}</view>
+			<view style="font-size: 14px;">e:{{eliminationCount}}</view>
+			<view style="font-size: 14px;">f:{{faultCount}}</view>
+		</view> -->
+	</view>
+
+</template>
+
+<script>
+	import ActionJump from "@/util/util-js/action/jump-0.1.js"
+	import {
+		CONDITIONPASSED
+	} from "@/util/util-js/enum.js"
+
+	import Firework from "@/util/util-js/effect/firework.js"
+
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+
+	export default {
+		computed: mapState(['systemInfo']),
+		components: {
+
+		},
+		props: {
+			showTime: {
+				type: Number,
+				default: 0
+			},
+			levelData: {
+				type: Object,
+				default: null
+			},
+			currentMode: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				isY: true,
+				canvasW: 0, // 画布宽
+				canvasH: 0, // 画布高
+				// SystemInfo: {}, // 设备信息
+
+				directionJump: null,
+				midJump: null,
+				rotateJump: null,
+				directionJumpWhite: null,
+				midJumpWhite: null,
+				rotateJumpWhite: null,
+				//参考图片
+				cankao: null,
+
+				jumpTipImage: null,
+				jumpNormalImage: null,
+
+
+				jumpTypeArray: [{
+					jumpName: 'NORMAL',
+					jumpCode: 0,
+					icon: 'midJump',
+					scaleX: 1,
+					bTrigger: false,
+				}, {
+					jumpName: 'LEFT',
+					jumpCode: 1,
+					icon: 'directionJump',
+					scaleX: -1,
+					bTrigger: false,
+				}, {
+					jumpName: 'RIGHT',
+					jumpCode: 2,
+					icon: 'directionJump',
+					scaleX: 1,
+					bTrigger: false,
+				}, {
+					jumpName: 'LEFT_ROTATE',
+					jumpCode: 3,
+					icon: 'rotateJump',
+					scaleX: -1,
+					bTrigger: false,
+				}, {
+					jumpName: 'RIGHT_ROTATE',
+					jumpCode: 4,
+					icon: 'rotateJump',
+					scaleX: 1,
+					bTrigger: false,
+				}],
+				spawnArray: [],
+
+				//下一个生成是相反的方向
+				bNextSpawnRightDirection: false,
+				bNextSpawnRightRotateDirection: false,
+
+				//生成预制的模板,用count 来判断生成哪一种
+				template: [{ //原地
+					count: 1,
+					spawnList: [
+						[0]
+					]
+				}, {
+					count: 2,
+					spawnList: [
+						[2, 1],
+						[1, 2],
+						[3, 4],
+						[4, 3]
+					]
+				}, {
+					count: 3,
+					spawnList: [
+						[2, 0, 1],
+						[1, 0, 2],
+						[3, 0, 4],
+						[4, 0, 3]
+					]
+				}, ],
+
+				level: 3,
+				levelType: 0,
+				countdown: 60,
+				countdownInterval: null,
+
+				faultCount: 0,
+				eliminationCount: 0,
+
+				bJumpPlay: false,
+				jumpCalorie: 1000,
+				jumpSpeed: 1000,
+
+				//硬件设备处理
+				BLEAccIndex: 0,
+				bJump: false,
+				xA: 0,
+				yA: 0,
+				zA: 0,
+				actionJumpObj: null,
+
+				/**
+				 * 交互数据处理
+				 */
+				//当前选择的关卡信息
+				selfLevelData: null,
+				// 双人模式下 数据
+				//标记块数量
+				taskSignCount: 0, //总数
+				taskSignCurCount: 0, //当前计数
+				//{"type":1,"explain":"规定时间内跳完所有标志块","limitType":1}
+				taskConditionPassed: null,
+				taskDescribe: '',
+				//满格的数值是 25
+				maxShowCount: 20,
+				addShowCountUnit: 0,
+				showCurCount: 0,
+				roundingCount: 0,
+				//游戏结束
+				isGameOver: false,
+
+
+				//pk模式下操作
+				leftShowCurCount: 0,
+				rightShowCurCount: 0,
+				isleftPlayer: true,
+
+				/**
+				 * 是否允许绘制
+				 */
+				canOnDraw: false,
+				/**
+				 * 是否去到下一个关卡
+				 */
+				canGoNext: false,
+				/**
+				 * 生成的特效
+				 */
+				canSpawnTemp: null,
+
+				onLogData: '',
+
+				/**
+				 * 是否显示关卡提示
+				 */
+				bTipLevel: false,
+
+				/**
+				 * 烟花相关
+				 */
+				// firework collection
+				fireworks: [],
+				fireworkImage: null,
+				loop: null,
+				count: 100,
+				effectCanvas: null,
+				effectCurrentSpawn: null,
+				effectSpawnPosX: 0,
+				/**
+				 * 管理三个绘制
+				 */
+				bDrawBg: false,
+				bDrawJump: false,
+				bKeepBg: false,
+				bKeepType: '',
+				bDrawBoomEffect: false
+			}
+		},
+		watch: {
+			levelData(val) {
+				//更新数据
+				// console.log("levelData ============>", JSON.stringify(val));
+				if (val) {
+					this.taskSignCount = val.signCount;
+					this.taskConditionPassed = val.conditionPassed;
+					this.taskDescribe = val.describe;
+					this.addShowCountUnit = (this.maxShowCount * 2) / this.taskSignCount;
+					// console.log("this.addShowCountUnit:", this.addShowCountUnit, this.maxShowCount * 2, this
+					// 	.taskSignCount);
+					this.showCount = 0;
+					//用signType 做等级类型
+					this.levelType = val.signType;
+
+					console.log(JSON.stringify(this.taskConditionPassed));
+				}
+
+			},
+			currentMode(val) {
+				console.log('==========> action jump currentMode:', val);
+			}
+		},
+		created() {
+			let _self = this;
+			this.actionJumpCanvas = uni.createCanvasContext("actionJumpCanvas", this);
+			this.effectCanvas = uni.createCanvasContext("effectCanvas", this);
+			// this.SystemInfo = this.systemInfo; // uni.getSystemInfoSync();
+			this.canvasW = this.systemInfo.windowWidth; // 画布宽度
+			this.canvasH = 114;
+			this.onLoadImage();
+
+			setTimeout(() => {
+				this.onListenActionJump();
+			}, 2000)
+
+			//更新一次状态
+			const value = uni.getStorageSync('levelButtonPrompt');
+			if (value) {
+				_self.bTipLevel = !value.isSelected;
+			} else {
+				_self.bTipLevel = true;
+			}
+
+			// console.log('==========>levelButtonPrompt:', _self.bTipLevel);
+		},
+		methods: {
+			...mapMutations(['onWriteBLEConnectionValue', 'onConvertDeviceData']),
+			//更新新手状态提示
+			onUpdateTipLevelValue(value) {
+				this.bTipLevel = value;
+			},
+			onListenActionJump() {
+				let _self = this;
+				console.log("*****************onListenActionJump*****************************");
+				_self.actionJumpObj = new ActionJump();
+				_self.actionJumpObj.addEventListener('resultant', (e) => {
+					if (e.type == 'jump') {
+						// this.jumpCount++;
+						this.bJump = true;
+					} else if (e.type == 'stateDataOfJump') {
+						//发送给game,在game里面处理判断
+						this.listenStateDataOfJump(e);
+					} 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.onDrawEffect(this.canSpawnTemp);
+							//绘制新触发状态
+							this.onDraw("normal");
+							setTimeout(() => {
+								this.startJumpGame();
+							}, 500)
+						}
+						// console.log('stop');
+						//这里处理生成下一个
+					}
+				})
+			},
+			//load 相关图片
+			onLoadImage() {
+				let _self = this;
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/directionJump.png",
+					success: function(image) {
+						_self.directionJump = image;
+					}
+				});
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/midJump.png",
+					success: function(image) {
+						_self.midJump = image;
+					}
+				});
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/rotateJump.png",
+					success: function(image) {
+						_self.rotateJump = image;
+					}
+				});
+
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/directionJumpWhite.png",
+					success: function(image) {
+						_self.directionJumpWhite = image;
+					}
+				});
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/midJumpWhite.png",
+					success: function(image) {
+						_self.midJumpWhite = image;
+					}
+				});
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/rotateJumpWhite.png",
+					success: function(image) {
+						_self.rotateJumpWhite = image;
+					}
+				});
+
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/jumpTip.png",
+					success: function(image) {
+						_self.jumpTipImage = image;
+					}
+				});
+
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/jumpNormal.png",
+					success: function(image) {
+						_self.jumpNormalImage = image;
+						_self.onDrawBg();
+					}
+				});
+
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/cankao.png",
+					success: function(image) {
+						_self.cankao = image;
+					}
+				});
+
+				/**
+				 * 烟花照片
+				 */
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/boom.png",
+					success: function(image) {
+						_self.fireworkImage = image;
+					}
+				});
+
+			},
+			/**
+			 * 重置生成数组,重置倒计时
+			 */
+			resetJumpGame() {
+
+				this.spawnArray = [];
+				if (this.countdownInterval) {
+					clearInterval(this.countdownInterval);
+					this.countdownInterval = null;
+				}
+
+				// this.resetCountdown(60);
+
+			},
+			startJumpGame() {
+				this.isGameOver = false;
+				this.resetJumpGame();
+				//开始游戏
+
+				this.index = 0;
+				// this.levelLabel.string = '关卡' + this.level;
+				let _ranType = Math.floor(Math.random() * 2);
+				if (this.levelType == 0) {
+					//随便生成一组跳的数据
+					let _spawnList = this.template[0].spawnList;
+					for (let i = 0; i < 4; i++) {
+						this.spawnJumpPrefabsFromType(i, _spawnList[0][0]);
+					}
+				} else if (this.levelType == 1) {
+					//生成一组 左跳右跳
+					let _spawnList = this.template[1].spawnList;
+					let ran = Math.floor(Math.random() * 2);
+
+					// if (_ranType >= 1) ran += 2;
+
+					for (let i = 0; i < _spawnList[ran].length; i++) {
+						this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
+					}
+				} else if (this.levelType == 2) {
+					//生成一组 左跳右跳原地
+					let _spawnList = this.template[2].spawnList;
+					let ran = Math.floor(Math.random() * 2);
+					// if (_ranType >= 1) ran += 2;
+					for (let i = 0; i < _spawnList[ran].length; i++) {
+						this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
+					}
+				} else if (this.levelType == 3) {
+					//生成一组 左旋跳右旋跳
+					let _spawnList = this.template[1].spawnList;
+					let ran = Math.floor(Math.random() * 2) + 2;
+					for (let i = 0; i < _spawnList[ran].length; i++) {
+						this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
+					}
+				} else if (this.levelType == 4) {
+					//生成一组 左旋跳右旋跳
+					let _spawnList = this.template[2].spawnList;
+					let ran = Math.floor(Math.random() * 2) + 2;
+					for (let i = 0; i < _spawnList[ran].length; i++) {
+						this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
+					}
+				} else if (this.levelType == 5) {
+					//随便生成三组数据
+					let _newArray = [];
+					// let _spawnList1 = this.template[1].spawnList;
+					// let ran1 = Math.floor(Math.random() * 2);
+					// _newArray = _newArray.concat(_spawnList1[ran1]);
+					let _spawnList2 = this.template[2].spawnList;
+					let ran2 = Math.floor(Math.random() * 2);
+					let ran3 = Math.floor(Math.random() * 2);
+					if (_ranType >= 1) {
+						ran2 += 2;
+						ran3 += 2;
+					}
+					_newArray = _newArray.concat(_spawnList2[ran2]);
+					_newArray = _newArray.concat(_spawnList2[ran3]);
+					for (let i = 0; i < _newArray.length; i++) {
+						this.spawnJumpPrefabsFromType(i, _newArray[i]);
+					}
+					//todo 暂时给循环
+					this.level = 0;
+				}
+				//  if (this.level == 2) {
+				// 	//随便生成二组数据
+				// 	let _newArray = [];
+				// 	let _spawnList1 = this.template[1].spawnList;
+				// 	let ran1 = Math.floor(Math.random() * 2);
+				// 	_newArray = _newArray.concat(_spawnList1[ran1]);
+				// 	let _spawnList2 = this.template[2].spawnList;
+				// 	let ran2 = Math.floor(Math.random() * 2);
+				// 	if (_ranType >= 1) ran2 += 2;
+
+				// 	_newArray = _newArray.concat(_spawnList2[ran2]);
+				// 	// console.log(_newArray);
+				// 	for (let i = 0; i < _newArray.length; i++) {
+				// 		this.spawnJumpPrefabsFromType(i, _newArray[i]);
+				// 	}
+				// }
+
+				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.onDraw("tipHit");
+			},
+			spawnJumpPrefabsFromType(index, _jumpType) {
+
+				//todo 生成的节点,后面再处理节奏问题。比如生成顺序
+				for (let i = 0; i < this.jumpTypeArray.length; i++) {
+					if (this.jumpTypeArray[i].jumpCode == _jumpType) {
+						let _jumpPrefab = Object.assign({}, this.jumpTypeArray[i]);
+						this.spawnArray.push(_jumpPrefab);
+						break;
+					}
+				}
+
+
+			},
+			spawnJumpPrefabs(index) {
+
+				let ran = Math.floor(Math.random() * 5);
+				//todo 生成的节点,后面再处理节奏问题。比如生成顺序
+				let _jumpPrefab = Object.assign({}, this.jumpTypeArray[ran]);
+				//这里处理相反方向,比如生成了一个左旋转,下一个右旋转
+
+				if (_jumpPrefab.jumpName == 'LEFT') {
+					if (this.bNextSpawnRightDirection) {
+						//如果是对应的需要记录一个对应的准确值
+						this.bNextSpawnRightDirection = false;
+					} else {
+						ran = 2; //RIGHT;
+						this.bNextSpawnRightDirection = true;
+					}
+
+				} else if (_jumpPrefab.jumpName == 'RIGHT') {
+
+					if (this.bNextSpawnRightDirection) {
+						ran = 1; //LEFT;
+						this.bNextSpawnRightDirection = false;
+
+					} else {
+						this.bNextSpawnRightDirection = true;
+					}
+				}
+				if (_jumpPrefab.jumpName == 'LEFT_ROTATE') {
+					if (this.bNextSpawnRightRotateDirection) {
+						//如果是对应的需要记录一个对应的准确值
+						this.bNextSpawnRightRotateDirection = false;
+					} else {
+						ran = 4; //RIGHT_ROTATE;
+						this.bNextSpawnRightRotateDirection = true;
+					}
+					// console.log('l==rotate', ran);
+				} else if (_jumpPrefab.jumpName == 'RIGHT_ROTATE') {
+					if (this.bNextSpawnRightRotateDirection) {
+						ran = 3; //LEFT_ROTATE;
+						this.bNextSpawnRightRotateDirection = false;
+					} else {
+						//如果是对应的需要记录一个对应的准确值
+						this.bNextSpawnRightRotateDirection = true;
+					}
+				}
+				this.spawnArray.push(_jumpPrefab);
+			},
+			//单纯的绘制八个背景
+			onDrawBg() {
+				this.bDrawBg = true;
+				this.bKeepBg = true;
+				this.actionJumpCanvas.clearRect(0, 0, this.canvasW, this.canvasH);
+				let _currentBgStartX = this.canvasW / 2;
+				let count = 4;
+				for (let i = 0; i < count; i++) {
+					let _currentStartPos = _currentBgStartX - i * 50 - 50;
+					this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentStartPos, 0, 50,
+						114);
+					let _currentEndPos = _currentBgStartX + i * 50;
+					this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentEndPos, 0, 50, 114);
+
+				}
+				this.actionJumpCanvas.draw();
+			},
+			onDraw(type) {
+				this.bDrawJump = true;
+				this.bKeepBg = false;
+				this.bKeepType = type;
+				this.actionJumpCanvas.clearRect(0, 0, this.canvasW, 114);
+				//计算一个对象
+				let _drawObj = {
+					path: null,
+					startX: 0,
+					width: 0,
+					bgWidth: 0,
+					bgStartXAllNormal: 0,
+					bgStartXHasTip: 0,
+				}
+				//计算居中的点
+				_drawObj.width = this.spawnArray.length * (50 + 10);
+				_drawObj.startX = this.canvasW / 2 - _drawObj.width / 2;
+				//全部是普通背景
+				_drawObj.bgStartXAllNormal = this.canvasW / 2 - (this.spawnArray.length * 50) / 2;
+				_drawObj.bgStartXHasTip = this.canvasW / 2 - (this.spawnArray.length * 50 + 40) / 2;
+
+				let _currentBgStartX = this.index == this.spawnArray.length || type == "normal" ? _drawObj
+					.bgStartXAllNormal : _drawObj
+					.bgStartXHasTip;
+
+				//最后还要绘制一个
+				if (this.spawnArray[this.spawnArray.length - 1].bTrigger) {
+					_currentBgStartX -= 20;
+				}
+				//绘制八个位置。如果生成数量不够的话。补上对应的数量
+				let count = 8 - this.spawnArray.length;
+				count = Math.ceil(count / 2);
+
+				//计算一个节点数组
+				for (let i = 0; i < this.spawnArray.length; i++) {
+					//默认 mid 图标
+					let _temp = this.spawnArray[i].bTrigger ? this.midJump : this.midJumpWhite;
+					if (this.spawnArray[i].icon == 'directionJump') {
+						_temp = this.spawnArray[i].bTrigger ? this.directionJump : this.directionJumpWhite;
+					} else if (this.spawnArray[i].icon == 'rotateJump') {
+						_temp = this.spawnArray[i].bTrigger ? this.rotateJump : this.rotateJumpWhite;
+					}
+					//如果是相反绘制,需要加多一个自身位置偏移
+					let _pos = this.spawnArray[i].scaleX < 0 ? i + 1 : i;
+					let _spacing = i == 0 ? 0 : 1;
+
+					let _addData = 0;
+					//大图提示后面要加上大图占的位置,为大图宽度减小图( 90 - 50 )
+					if (i >= this.index && type !== "normal") {
+						_addData = 40;
+					}
+
+					if (i == 0) {
+						//_frontBgData 为减去大图位置,10 为偏移位置
+						let _frontBgData = 40;
+						//绘制前背景
+						for (let i = 0; i < count; i++) {
+							let _currentStartPos = _currentBgStartX - _frontBgData - i * 50 - 10;
+							this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentStartPos, 0,
+								50, 114)
+
+						}
+					}
+
+
+					this.actionJumpCanvas.save();
+					// this.spawnArray[i].bTrigger ? 0.7 : 1;
+					this.actionJumpCanvas.globalAlpha = 1;
+					this.actionJumpCanvas.scale(this.spawnArray[i].scaleX, 1);
+
+					let _currentPos = 0;
+					let _currentCenterPos = 0;
+					if (i == this.index && type !== "normal") {
+						_currentPos = (_currentBgStartX + _pos * 90 - i * 40) *
+							this
+							.spawnArray[i]
+							.scaleX;
+						this.actionJumpCanvas.drawImage(this.jumpTipImage.path, _currentPos, 0, 90, 114);
+
+						//计算对应中心点的值
+						_currentCenterPos = _currentPos + 90 / 2 - 25 / 2;
+
+						//57 - 40/2 是取画布中心y点,减去图标本身高的一半的值
+						this.actionJumpCanvas.drawImage(_temp.path, _currentCenterPos - 7.5, 37, 40, 40);
+
+						//这里记录一个生成点,后面用于生成特效
+						this.effectSpawnPosX = _currentPos;
+					} else {
+						_currentPos = (_currentBgStartX + _addData + _pos *
+								50) * this
+							.spawnArray[i]
+							.scaleX;
+						this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentPos, 0, 50, 114)
+
+						//计算对应中心点的值
+						_currentCenterPos = _currentPos + 50 / 2 - 25 / 2;
+
+						if (!this.spawnArray[i].bTrigger) {
+							//44.5 是取画布中心y点,减去图标本身高的一半的值
+							this.actionJumpCanvas.drawImage(_temp.path, _currentCenterPos, 44.5, 25, 25);
+
+						}
+					}
+
+					this.actionJumpCanvas.restore();
+
+					let _spawnLength = this.spawnArray.length;
+					if (i == _spawnLength - 1) {
+						//绘制结束位置
+						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;
+							this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentEndPos, 0,
+								50, 114)
+
+						}
+					}
+				}
+
+				this.actionJumpCanvas.draw();
+			},
+			onDrawEffect(_temp) {
+				//根据当前消除的生成一个
+				// console.log("生成的_temp:" + JSON.stringify(_temp));
+				let spawnTemp = this.midJump;
+				if (_temp.icon == 'directionJump') {
+					spawnTemp = this.directionJump;
+				} else if (_temp.icon == 'rotateJump') {
+					spawnTemp = this.rotateJump;
+				}
+				let tempFirework = new Firework(this.fireworkImage,
+					spawnTemp, _temp.scaleX, this.effectSpawnPosX, 0, this.canvasW, 164);
+				this.fireworks.push(tempFirework);
+				this.bDrawBoomEffect = true;
+				this.onInitFirework();
+			},
+			onClear() {
+				this.resetJumpGame();
+
+				this.onDrawBg();
+
+				this.xA = 0;
+				this.yA = 0;
+				this.zA = 0;
+				this.bJump = false;
+
+				this.actionJumpObj.resetAll();
+			},
+
+			/**
+			 * 统一绘制 效果 背景,交互,烟花
+			 */
+			onInitFirework() {
+				if (this.loop != null) {
+					return;
+				}
+
+				this.loop = setInterval(() => {
+					if (!this.bDrawBoomEffect) {
+						clearInterval(this.loop);
+						this.loop = null;
+						// console.log("结束绘制");
+						this.effectCanvas.clearRect(0, 0, this.canvasW, 164);
+						this.effectCanvas.draw();
+						return;
+					}
+					this.effectCanvas.clearRect(0, 0, this.canvasW, 164);
+					if (this.bDrawBoomEffect) {
+						// loop over each firework, draw it, update it
+						var i = this.fireworks.length;
+						while (i--) {
+							this.fireworks[i].draw(this.effectCanvas, () => {
+								this.fireworks.splice(i, 1);
+								if (this.fireworks.length == 0) {
+									this.bDrawBoomEffect = false;
+								}
+							});
+
+						}
+					}
+					this.effectCanvas.draw();
+				}, 30)
+			},
+			onJumpType(event) {
+				// console.log("onJumpType:", event);
+				if (this.isGameOver || !this.bJumpPlay) return;
+				this.eliminateJumpPrefab(event);
+			},
+
+			// update (dt) {}
+			//模拟测试调用
+			eliminateJumpPrefab(_jumpType) {
+				let _temp = this.spawnArray[this.index];
+				// let _temp = this.jumpTypeArray[Math.floor(Math.random()*4) ];
+				//这里更新特效
+				// this.onDrawEffect(_temp);
+				// return;
+				//如果当前的跳类型和预制目标一样
+				if (_jumpType == _temp.jumpCode) {
+					_temp.bTrigger = true;
+					this.index++;
+					//这里更新特效
+					let _endTemp = Object.assign({}, _temp);
+					this.onDrawEffect(_endTemp);
+					if (this.index >= this.spawnArray.length) {
+						clearInterval(this.countdownInterval);
+						this.countdownInterval = null;
+						//绘制新触发状态
+						this.onDraw("normal");
+						setTimeout(() => {
+							this.startJumpGame();
+						}, 2000)
+					} else {
+						//绘制新触发状态
+						this.onDraw('tipHit');
+					}
+					//成功
+					this.setEliminationCount(1);
+				} else {
+					//失误
+					this.setFaultCount(1);
+				}
+			},
+
+			//设置倒计时
+			setCountdown(value) {
+				this.countdown -= value;
+				// this.countdownLabel.string = '倒计时:' + this.countdown;
+				this.$emit('actionJumpCountDownUpdate', {
+					countDown: this.countdown
+				});
+			},
+			resetCountdown(value) {
+				this.countdown = value;
+				// this.countdownLabel.string = '倒计时:' + this.countdown;
+				this.$emit('actionJumpCountDownUpdate', {
+					countDown: this.countdown
+				});
+			},
+			//设置ui信息
+			setEliminationCount(value) {
+				this.taskSignCurCount++;
+				this.roundingCount += this.addShowCountUnit;
+				this.eliminationCount += value;
+
+				// this.eliminationLabel.string = '消除数量:' + this.eliminationCount.toString();
+				this.$emit('actionJumpDataUpdate', {
+					eliminationCount: this.eliminationCount,
+					faultCount: this.faultCount
+				});
+
+				//如果是pk模式。不走下面判断
+				if (this.currentMode == 'pkMode') return;
+
+				if (CONDITIONPASSED.ENERGYBARFULL == this.taskConditionPassed.limitType) {
+					//能量条的条件下才显示能量条动
+					//取两位后计算Math floor,不然会有偏差值问题  Math.floor(39.9999999+ 0.1111111) = 39
+					this.showCurCount = Math.floor(this.roundingCount.toFixed(2));
+					//1.能量槽满的时候,说明踩中次数到达	
+					if (this.taskSignCurCount >= this.taskSignCount)
+						this.onGameOver("energyBarFull");
+				} else if (CONDITIONPASSED.SKIPALLFLAGWITHINTIME == this.taskConditionPassed.limitType) {
+					//规定时间下也给显示能量条
+					this.showCurCount = Math.floor(this.roundingCount.toFixed(2));
+					//2.规定时间内跳完所有标志块
+					if (this.taskSignCurCount >= this.taskSignCount)
+						this.onGameOver("skipAllFlagWithinTime");
+				} else if (this.taskConditionPassed.isScore) {
+					//3.达到一定分数
+					//如果是用分数判断
+					//分数是 跳对的加1分,错的扣1分,0不扣分。
+					let curScore = this.eliminationCount - this.faultCount;
+					curScore = curScore < 0 ? 0 : curScore;
+					//当前分数达到,胜利
+					if (curScore >= this.taskConditionPassed.limitScore)
+						this.onGameOver("score");
+				}
+			},
+			onGameOver(type) {
+				this.isGameOver = true;
+				//处理参数
+				this.onClear();
+				this.onClearData();
+				this.bJumpPlay = false;
+				/**
+				 * 判断胜利和失败
+				 */
+				let myWin = false; //默认失败
+				//比如, 1.充满左右两边蓄能槽.2.规定时间内跳完所有标志块.
+				if (type == "energyBarFull") {
+					//1.能量槽满的时候,说明踩中次数到达	
+					if (this.taskSignCurCount >= this.taskSignCount) {
+						myWin = true;
+					}
+				} else if (type == 'skipAllFlagWithinTime') {
+					myWin = true;
+				} else if (type == "timeUp") {
+					//2.规定时间内跳完所有标志块
+					//查看消除数量是否到达总数,未达成就是未完成
+					if (this.taskSignCurCount >= this.taskSignCount) {
+						myWin = true;
+					}
+				} else if (type == "score") {
+					myWin = true;
+				}
+				console.log(type, {
+					myWin: myWin
+				});
+				this.$emit('gameOver', {
+					myWin: myWin,
+					type: 'calorieMode',
+					isOffEvent: true
+				});
+			},
+			//pk模式下结束游戏关卡
+			onPKModeGameOver(type) {
+				this.isGameOver = true;
+				//处理参数
+				this.onClear();
+				this.onClearData();
+				this.bJumpPlay = false;
+
+				this.$emit('gameOver', {
+					type: 'pkMode',
+					isOffEvent: true
+				});
+			},
+			setFaultCount(value) {
+				this.faultCount += value;
+				// this.faultLabel.string = '失误:' + this.faultCount;
+				this.$emit('actionJumpDataUpdate', {
+					eliminationCount: this.eliminationCount,
+					faultCount: this.faultCount
+				});
+			},
+
+			//控制播放
+			onControllerPlay() {
+				if (this.bJumpPlay) {
+					//仅仅暂停,没有清空数据
+					this._changePlay(false);
+					this.$emit("actionJumpControllerPlay", false);
+				} else {
+					this.$emit("actionJumpCheck");
+				}
+			},
+			onContinueGame() {
+				this._changePlay(true);
+			},
+			onClearActionJumpData() {
+				console.log("onClearActionJumpData");
+				this.onClear();
+				this.onClearData();
+			},
+			//修改状态
+			_changePlay(bPlaying) {
+				if (bPlaying) {
+					this.bJumpPlay = bPlaying;
+				} else {
+					this.bJumpPlay = !this.bJumpPlay;
+				}
+			},
+
+			onActionJumpPlay() {
+				this.onClear();
+				this.onClearData();
+				this.startJumpGame();
+				this._changePlay(true);
+
+				//reset 对应计算数据
+				this.taskSignCurCount = 0;
+				this.showCurCount = 0;
+				this.roundingCount = 0;
+
+				this.faultCount = 0;
+				this.eliminationCount = 0;
+			},
+
+			getCurrentJumpType() {
+				let _temp = this.spawnArray[this.index];
+				return _temp.jumpCode;
+			},
+
+			//监听跳的状态数据
+			listenStateDataOfJump(data) {
+				if (this.isGameOver || !this.bJumpPlay) return;
+				
+				if (this.spawnArray.length == this.index) return;
+				let _jumpType = this.getCurrentJumpType();
+				//初始全部默认状态
+				let _tempState = [{
+						jumpName: 'NORMAL',
+						jumpCode: 0,
+						bTrigger: true,
+						describe: '正常跳'
+					},
+					{
+						jumpName: 'LEFT',
+						jumpCode: 1,
+						bTrigger: false,
+						describe: '左直跳'
+					},
+					{
+						jumpName: 'RIGHT',
+						jumpCode: 2,
+						bTrigger: false,
+						describe: '右直跳'
+					},
+					{
+						jumpName: 'LEFT_ROTATE',
+						jumpCode: 3,
+						bTrigger: false,
+						describe: '左旋转跳'
+					},
+					{
+						jumpName: 'RIGHT_ROTATE',
+						jumpCode: 4,
+						bTrigger: false,
+						describe: '右旋转跳'
+					}
+				];
+
+
+				let {
+					currentMaxValue,
+					oGyroValue,
+					peakOfWaveMaxValue,
+					valleyOfWaveMinValue
+				} = data
+				// console.log('stateDataOfJump:');
+				// console.log(JSON.stringify(data));
+				this.onLogData = data;
+				let _rotateLimit = 4;
+				let _jumpLimit = 8;
+
+				switch (_jumpType) {
+					case 0:
+						//JumpType.NORMAL = 0
+						_tempState[0].bTrigger = true;
+						this.eliminateJumpPrefabFormTemp(_tempState);
+						break;
+					case 1:
+						if (currentMaxValue < -_jumpLimit || valleyOfWaveMinValue < -20) {
+							//left jump
+							_tempState[1].bTrigger = true;
+						}
+						this.eliminateJumpPrefabFormTemp(_tempState);
+						break;
+					case 2:
+						if (currentMaxValue > _jumpLimit || peakOfWaveMaxValue > 20) {
+							//right jump
+							_tempState[2].bTrigger = true;
+						}
+						this.eliminateJumpPrefabFormTemp(_tempState);
+						break;
+					case 4:
+						if (oGyroValue > _rotateLimit) {
+							_tempState[4].bTrigger = true;
+						}
+						this.eliminateJumpPrefabFormTemp(_tempState);
+						break;
+					case 3:
+						if (oGyroValue < -_rotateLimit) {
+							_tempState[3].bTrigger = true;
+						}
+						this.eliminateJumpPrefabFormTemp(_tempState);
+						break;
+					default:
+						console.log('没有对应的_jumpType', _jumpType);
+						break;
+				}
+
+				// if (currentMaxValue == 0) {
+
+				// } else {
+				// 	// console.log('2====', data);
+
+				// 	if (this.isY) {
+				// 		//如果是检测到旋转跳
+				// 		if (oGyroValue > _rotateLimit) {
+				// 			// console.log('y right:', oGyroValue);
+				// 			_tempState[4].bTrigger = true;
+				// 		} else if (oGyroValue < -_rotateLimit) {
+				// 			// console.log('y left:', oGyroValue);
+				// 			_tempState[3].bTrigger = true;
+				// 		}
+				// 		if (valleyOfWaveMinValue < -_jumpLimit) {
+				// 			//left jump
+				// 			_tempState[1].bTrigger = true;
+				// 		} else if (peakOfWaveMaxValue > _jumpLimit) {
+				// 			//right jump
+				// 			_tempState[2].bTrigger = true;
+				// 		}
+				// 	} else {
+				// 		//如果是检测到旋转跳
+				// 		if (oGyroValue < -5) {
+				// 			// console.log('x right:', oGyroValue);
+				// 			_tempState[4].bTrigger = true;
+				// 		} else if (oGyroValue > 5) {
+				// 			// console.log('x left:', oGyroValue);
+				// 			_tempState[3].bTrigger = true;
+				// 		}
+				// 		if (valleyOfWaveMinValue < -_jumpLimit) {
+				// 			//left jump
+				// 			_tempState[1].bTrigger = true;
+				// 		} else if (peakOfWaveMaxValue > _jumpLimit) {
+				// 			//right jump
+				// 			_tempState[2].bTrigger = true;
+				// 		}
+				// 	}
+
+				// 	this.eliminateJumpPrefabFormTemp(_tempState);
+				// }
+			},
+			eliminateJumpPrefabFormTemp(_tempState) {
+				//如果消除完,需要重新生成
+				let _temp = this.spawnArray[this.index];
+				let bSuccess = false;
+				for (let i = 0; i < _tempState.length; i++) {
+					let _state = _tempState[i];
+					if (_state.bTrigger)
+						console.log(JSON.stringify(_state) + JSON.stringify(this.onLogData));
+					//如果当前的跳类型和预制目标一样
+					if (_state.jumpCode == _temp.jumpCode && _state.bTrigger) {
+						//成功
+						bSuccess = true;
+						break;
+					}
+				}
+				//如果存在其中一个为true
+				if (bSuccess) {
+					// console.log("bSuccess:", bSuccess);
+					_temp.bTrigger = true;
+					this.index++;
+
+					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");
+					} else {
+						//绘制新触发状态
+						this.canOnDraw = true;
+						// this.onDraw("normal");
+					}
+					//成功
+					this.setEliminationCount(1);
+				} else {
+					//失误
+					this.setFaultCount(1);
+				}
+
+
+			},
+
+
+			/**
+			 * @param {Object} gameData
+			 * 识别跳部分数据处理
+			 */
+			onBLERopeUpdate(gameData) {
+				if (!this.bJumpPlay || this.isGameOver) return;
+				//********陀螺仪角速度********
+				let {
+					gx,
+					gy,
+					gz
+				} = gameData.gyro;
+				let {
+					min,
+					s,
+					ms
+				} = gameData;
+				//-gameData.acc.ax * 10;
+				let _ax = gameData.acc.ax * 10;
+				let _ay = gameData.acc.ay * 10;
+				let _az = gameData.acc.az * 10;
+				//低通滤波分离重力
+				let alpha = 0.8;
+				this.xA = alpha * this.xA + (1 - alpha) * _ax;
+				this.yA = alpha * this.yA + (1 - alpha) * _ay;
+				this.zA = alpha * this.zA + (1 - alpha) * _az;
+
+				//高通滤波获取线性速度
+				let linear_acceleration_x = _ax - this.xA;
+				let linear_acceleration_y = _az - this.zA;
+				let linear_acceleration_z = _ay - this.yA;
+
+				let _temp = {
+					linearAcc: {
+						lAccX: linear_acceleration_x,
+						lAccY: linear_acceleration_y,
+						lAccZ: linear_acceleration_z
+					}, //gameData.acc,
+					oriAcc: {
+						oAccX: _ax,
+						oAccY: _ay,
+						oAccZ: _az
+					},
+					gravityAcc: {
+						gravityX: this.xA,
+						gravityY: this.yA,
+						gravityZ: this.zA
+					},
+					bLimitRebound: false,
+					resultant: Math.sqrt(_ax * _ax +
+						_ay * _ay + _az * _az),
+					runIndex: this.BLEAccIndex,
+					//陀螺仪
+					oriGyro: {
+						oGyroX: gx,
+						oGyroY: gy,
+						oGyroZ: gz
+					},
+					//输入当前轴
+					bYAxis: true,
+				};
+				this.actionJumpObj.updateJump(_temp);
+
+
+				// if (this.BLEAccIndex > 150) {
+				// 	this.onClearData();
+				// 	this.bJump = false;
+				// 	return;
+				// }
+				this.BLEAccIndex++;
+			},
+			onClearData() {
+				this.BLEAccIndex = 0;
+			},
+			onChangeY() {
+				this.isY = true;
+			},
+			onChangeX() {
+				this.isY = false;
+			},
+			onGetActionJumpPlayView(callback) {
+				let view = uni.createSelectorQuery().select('#ActionJumpPlay');
+				view.boundingClientRect(data => {
+					if (callback)
+						callback(data);
+				}).exec();
+			},
+
+			onTipLevel() {
+				this.$emit("tipLevel", {
+					hiddenType: 'normal'
+				});
+				console.log("**************22");
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.mid-absolute {
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		right: 0;
+		left: 0;
+		margin: auto;
+	}
+
+	.action-jump-timer {
+		position: absolute;
+		top: -150rpx;
+	}
+</style>

+ 302 - 327
components/modal/action-jump/action-jump.vue

@@ -1,8 +1,9 @@
+<!-- 新版本跳区域部分文件 -->
 <template>
 	<view style="width: 750rpx;">
-		<view class="flex justify-center" style="margin-top: 32rpx;">
+		<view class="flex justify-center" style="margin-top: 68rpx;">
 			<!-- 目前格子数量不代表数字,显示完成度而已 -460rpx;-->
-			<view class="grid-progress-vertical-container" style="top:-520rpx; ">
+			<view class="grid-progress-vertical-container" style="top:-376rpx;">
 				<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">
@@ -10,7 +11,7 @@
 							:class="showCurCount>=index? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
 						</view>
 						<view :class="(index%5 == 0||index == 1)?'':'grid-progress-text-hidden'"
-							class="grid-progress-vertical-text">
+							class="grid-progress-vertical-text" style="position: absolute;right: 0;top: -4px;">
 							{{Math.floor(taskSignCount / 40 * index)}}
 						</view>
 					</view>
@@ -19,65 +20,62 @@
 					<view class="grid-progress-vertical-child" v-for="(item, index) in maxShowCount +1" :key="index"
 						v-if="index!==0">
 						<view :class="(index%5 == 0||index == 1)?'':'grid-progress-text-hidden'"
-							class="grid-progress-vertical-text">
+							class="grid-progress-vertical-text" style="position: absolute;left: 0;top: -4px;">
 							{{Math.floor(taskSignCount / 40 * index)+taskSignCount/2}}
 						</view>
+						<!-- 设置空位 -->
+						<view></view>
 						<view
 							:class="showCurCount>=index+20? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
 						</view>
 					</view>
 				</view>
 			</view>
-			<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 class="position-relative">
+			<image class="position-absolute-left-top" style="width: 86.12px;height:55.96px; left: 146rpx;top:-100rpx;"
+				src="../../../static/modal/action-jump/progress-tip-add.png"></image>
 			<canvas canvas-id="actionJumpCanvas" :style="{ width: canvasW + 'px', height: canvasH + 'px' }"></canvas>
 			<canvas class="position-absolute-center" canvas-id="effectCanvas"
 				:style="{ width: canvasW + 'px', height: '164px' }"></canvas>
 		</view>
+		<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/mid-button-orange@2x.png">
+				</image>
+
+				<image v-if="!bJumpPlay" class="mid-absolute" style="left:12rpx; width: 56rpx;height: 70rpx;"
+					src="../../../static/play.png">
+				</image>
+				<image v-else class="mid-absolute" style="width: 100rpx;height: 100rpx;"
+					src="../../../static/e-pause.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 align-center justify-center" style="width: 750rpx;">
 			<view class="flex justify-center align-center" style="height: 120rpx; width: 444rpx; ">
@@ -166,8 +164,12 @@
 				cankao: null,
 
 				jumpTipImage: null,
+				JumpTipOrange: null,
 				jumpNormalImage: null,
+				jumpNormalWidth: 70,
+				jumpNormalHeight: 164,
 
+				jumpProgressTip: null,
 
 				jumpTypeArray: [{
 					jumpName: 'NORMAL',
@@ -175,32 +177,41 @@
 					icon: 'midJump',
 					scaleX: 1,
 					bTrigger: false,
+					bShow: true,
 				}, {
 					jumpName: 'LEFT',
 					jumpCode: 1,
 					icon: 'directionJump',
 					scaleX: -1,
 					bTrigger: false,
+					bShow: true,
 				}, {
 					jumpName: 'RIGHT',
 					jumpCode: 2,
 					icon: 'directionJump',
 					scaleX: 1,
 					bTrigger: false,
+					bShow: true,
 				}, {
 					jumpName: 'LEFT_ROTATE',
 					jumpCode: 3,
 					icon: 'rotateJump',
 					scaleX: -1,
 					bTrigger: false,
+					bShow: true,
 				}, {
 					jumpName: 'RIGHT_ROTATE',
 					jumpCode: 4,
 					icon: 'rotateJump',
 					scaleX: 1,
 					bTrigger: false,
+					bShow: true,
 				}],
 				spawnArray: [],
+				/**
+				 * 生成的背景位置
+				 */
+				spawnPos: [],
 
 				//下一个生成是相反的方向
 				bNextSpawnRightDirection: false,
@@ -229,8 +240,9 @@
 						[4, 0, 3]
 					]
 				}, ],
+				//模板对象池,管理生成对象
+				templatePool: [],
 
-				level: 3,
 				levelType: 0,
 				countdown: 60,
 				countdownInterval: null,
@@ -263,7 +275,7 @@
 				taskConditionPassed: null,
 				taskDescribe: '',
 				//满格的数值是 25
-				maxShowCount: 20,
+				maxShowCount: 13,
 				addShowCountUnit: 0,
 				showCurCount: 0,
 				roundingCount: 0,
@@ -308,19 +320,15 @@
 				effectCurrentSpawn: null,
 				effectSpawnPosX: 0,
 				/**
-				 * 管理三个绘制
+				 * 烟花特效
 				 */
-				bDrawBg: false,
-				bDrawJump: false,
-				bKeepBg: false,
-				bKeepType: '',
 				bDrawBoomEffect: false
 			}
 		},
 		watch: {
 			levelData(val) {
 				//更新数据
-				// console.log("levelData ============>", JSON.stringify(val));
+				// console.log("levelData ============>"+JSON.stringify(val));
 				if (val) {
 					this.taskSignCount = val.signCount;
 					this.taskConditionPassed = val.conditionPassed;
@@ -332,7 +340,7 @@
 					//用signType 做等级类型
 					this.levelType = val.signType;
 
-					console.log(JSON.stringify(this.taskConditionPassed));
+					// console.log(JSON.stringify(this.taskConditionPassed));
 				}
 
 			},
@@ -346,7 +354,7 @@
 			this.effectCanvas = uni.createCanvasContext("effectCanvas", this);
 			// this.SystemInfo = this.systemInfo; // uni.getSystemInfoSync();
 			this.canvasW = this.systemInfo.windowWidth; // 画布宽度
-			this.canvasH = 114;
+			this.canvasH = 147.68;
 			this.onLoadImage();
 
 			setTimeout(() => {
@@ -446,18 +454,32 @@
 					}
 				});
 
+
 				uni.getImageInfo({
 					src: "../../../static/modal/action-jump/jumpTip.png",
 					success: function(image) {
 						_self.jumpTipImage = image;
 					}
 				});
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/jump-tip-orange@2x.png",
+					success: function(image) {
+						_self.JumpTipOrange = image;
+					}
+				})
+				uni.getImageInfo({
+					src: "../../../static/modal/action-jump/progress-tip.png",
+					success: function(image) {
+						_self.jumpProgressTip = image;
+					}
+				})
+
 
 				uni.getImageInfo({
 					src: "../../../static/modal/action-jump/jumpNormal.png",
 					success: function(image) {
 						_self.jumpNormalImage = image;
-						_self.onDrawBg();
+						_self.onDrawBg(true);
 					}
 				});
 
@@ -485,6 +507,7 @@
 			resetJumpGame() {
 
 				this.spawnArray = [];
+				this.templatePool = [];
 				if (this.countdownInterval) {
 					clearInterval(this.countdownInterval);
 					this.countdownInterval = null;
@@ -497,212 +520,183 @@
 				this.isGameOver = false;
 				this.resetJumpGame();
 				//开始游戏
-
 				this.index = 0;
-				// this.levelLabel.string = '关卡' + this.level;
+				// this.levelType = 5;
 				let _ranType = Math.floor(Math.random() * 2);
 				if (this.levelType == 0) {
 					//随便生成一组跳的数据
 					let _spawnList = this.template[0].spawnList;
-					for (let i = 0; i < 4; i++) {
-						this.spawnJumpPrefabsFromType(i, _spawnList[0][0]);
+					for (let i = 0; i < 31; i++) {
+						//再对象池里面生成一组对象
+						this.addTemplatePoolFromType(0 !== i, _spawnList[0][0]);
 					}
+					//先生成4个
+					for (let i = 0; i < 5; i++) {
+						this.spawnArray.push(this.templatePool[this.index]);
+						this.index++;
+					}
+
 				} else if (this.levelType == 1) {
+					//生成一个占位
+					this.addTemplatePoolFromType(false, this.template[0].spawnList[0][0]);
 					//生成一组 左跳右跳
 					let _spawnList = this.template[1].spawnList;
-					let ran = Math.floor(Math.random() * 2);
-
-					// if (_ranType >= 1) ran += 2;
-
-					for (let i = 0; i < _spawnList[ran].length; i++) {
-						this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
+					for (let i = 0; i < 30; i++) {
+						let ran = Math.floor(Math.random() * 2);
+						for (let j = 0; j < _spawnList[ran].length; j++) {
+							//再对象池里面生成一组对象
+							this.addTemplatePoolFromType(true, _spawnList[ran][j]);
+						}
 					}
+					//先生成5个
+					for (let i = 0; i < 5; i++) {
+						this.spawnArray.push(this.templatePool[this.index]);
+						this.index++;
+					}
+
 				} else if (this.levelType == 2) {
+					//生成一个占位
+					this.addTemplatePoolFromType(false, this.template[0].spawnList[0][0]);
 					//生成一组 左跳右跳原地
 					let _spawnList = this.template[2].spawnList;
-					let ran = Math.floor(Math.random() * 2);
-					// if (_ranType >= 1) ran += 2;
-					for (let i = 0; i < _spawnList[ran].length; i++) {
-						this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
+					for (let i = 0; i < 30; i++) {
+						let ran = Math.floor(Math.random() * 2);
+						for (let j = 0; j < _spawnList[ran].length; j++) {
+							//再对象池里面生成一组对象
+							this.addTemplatePoolFromType(true, _spawnList[ran][j]);
+						}
+					}
+					//先生成5个
+					for (let i = 0; i < 5; i++) {
+						this.spawnArray.push(this.templatePool[this.index]);
+						this.index++;
 					}
+
+
 				} else if (this.levelType == 3) {
+					//生成一个占位
+					this.addTemplatePoolFromType(false, this.template[0].spawnList[0][0]);
 					//生成一组 左旋跳右旋跳
 					let _spawnList = this.template[1].spawnList;
-					let ran = Math.floor(Math.random() * 2) + 2;
-					for (let i = 0; i < _spawnList[ran].length; i++) {
-						this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
+					for (let i = 0; i < 30; i++) {
+						let ran = Math.floor(Math.random() * 2) + 2;
+						for (let j = 0; j < _spawnList[ran].length; j++) {
+							//再对象池里面生成一组对象
+							this.addTemplatePoolFromType(true, _spawnList[ran][j]);
+						}
+					}
+					//先生成5个
+					for (let i = 0; i < 30; i++) {
+						this.spawnArray.push(this.templatePool[this.index]);
+						this.index++;
 					}
 				} else if (this.levelType == 4) {
+					//生成一个占位
+					this.addTemplatePoolFromType(false, this.template[0].spawnList[0][0]);
 					//生成一组 左旋跳右旋跳
 					let _spawnList = this.template[2].spawnList;
-					let ran = Math.floor(Math.random() * 2) + 2;
-					for (let i = 0; i < _spawnList[ran].length; i++) {
-						this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
+					for (let i = 0; i < 30; i++) {
+						let ran = Math.floor(Math.random() * 2) + 2;
+						for (let j = 0; j < _spawnList[ran].length; j++) {
+							//再对象池里面生成一组对象
+							this.addTemplatePoolFromType(true, _spawnList[ran][j]);
+						}
+					}
+					//先生成5个
+					for (let i = 0; i < 5; i++) {
+						this.spawnArray.push(this.templatePool[this.index]);
+						this.index++;
 					}
+
 				} else if (this.levelType == 5) {
-					//随便生成三组数据
-					let _newArray = [];
-					// let _spawnList1 = this.template[1].spawnList;
-					// let ran1 = Math.floor(Math.random() * 2);
-					// _newArray = _newArray.concat(_spawnList1[ran1]);
-					let _spawnList2 = this.template[2].spawnList;
-					let ran2 = Math.floor(Math.random() * 2);
-					let ran3 = Math.floor(Math.random() * 2);
-					if (_ranType >= 1) {
-						ran2 += 2;
-						ran3 += 2;
+					//生成一个占位
+					this.addTemplatePoolFromType(false, this.template[0].spawnList[0][0]);
+					
+					for (let i = 0; i < 20; i++) {
+						//随便生成三组数据
+						let _newArray = [];
+						let _spawnList2 = this.template[2].spawnList;
+						let ran2 = Math.floor(Math.random() * 2);
+						let ran3 = Math.floor(Math.random() * 2);
+						if (_ranType >= 1) {
+							ran2 += 2;
+							ran3 += 2;
+						}
+						_newArray = _newArray.concat(_spawnList2[ran2]);
+						_newArray = _newArray.concat(_spawnList2[ran3]);
+						for (let j = 0; j < _newArray.length; j++) {
+							this.addTemplatePoolFromType(true, _newArray[j]);
+						}
 					}
-					_newArray = _newArray.concat(_spawnList2[ran2]);
-					_newArray = _newArray.concat(_spawnList2[ran3]);
-					for (let i = 0; i < _newArray.length; i++) {
-						this.spawnJumpPrefabsFromType(i, _newArray[i]);
+					//先生成5个
+					for (let i = 0; i < 5; i++) {
+						this.spawnArray.push(this.templatePool[this.index]);
+						this.index++;
 					}
-					//todo 暂时给循环
-					this.level = 0;
 				}
-				//  if (this.level == 2) {
-				// 	//随便生成二组数据
-				// 	let _newArray = [];
-				// 	let _spawnList1 = this.template[1].spawnList;
-				// 	let ran1 = Math.floor(Math.random() * 2);
-				// 	_newArray = _newArray.concat(_spawnList1[ran1]);
-				// 	let _spawnList2 = this.template[2].spawnList;
-				// 	let ran2 = Math.floor(Math.random() * 2);
-				// 	if (_ranType >= 1) ran2 += 2;
-
-				// 	_newArray = _newArray.concat(_spawnList2[ran2]);
-				// 	// console.log(_newArray);
-				// 	for (let i = 0; i < _newArray.length; i++) {
-				// 		this.spawnJumpPrefabsFromType(i, _newArray[i]);
-				// 	}
-				// }
-
-				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.onDraw("tipHit");
 			},
-			spawnJumpPrefabsFromType(index, _jumpType) {
-
-				//todo 生成的节点,后面再处理节奏问题。比如生成顺序
+			addTemplatePoolFromType(bShow, _jumpType) {
 				for (let i = 0; i < this.jumpTypeArray.length; i++) {
 					if (this.jumpTypeArray[i].jumpCode == _jumpType) {
-						let _jumpPrefab = Object.assign({}, this.jumpTypeArray[i]);
-						this.spawnArray.push(_jumpPrefab);
+						let _jumpPrefab = Object.assign({}, this.jumpTypeArray[i], {
+							bShow: bShow
+						});
+						this.templatePool.push(_jumpPrefab);
 						break;
 					}
 				}
-
-
 			},
-			spawnJumpPrefabs(index) {
-
-				let ran = Math.floor(Math.random() * 5);
-				//todo 生成的节点,后面再处理节奏问题。比如生成顺序
-				let _jumpPrefab = Object.assign({}, this.jumpTypeArray[ran]);
-				//这里处理相反方向,比如生成了一个左旋转,下一个右旋转
-
-				if (_jumpPrefab.jumpName == 'LEFT') {
-					if (this.bNextSpawnRightDirection) {
-						//如果是对应的需要记录一个对应的准确值
-						this.bNextSpawnRightDirection = false;
-					} else {
-						ran = 2; //RIGHT;
-						this.bNextSpawnRightDirection = true;
-					}
+			//单纯的绘制八个背景
+			onDrawBg(bDraw) {
+				this.spawnPos = [];
 
-				} else if (_jumpPrefab.jumpName == 'RIGHT') {
+				if (bDraw) {
+					this.actionJumpCanvas.clearRect(0, 0, this.canvasW, this.canvasH);
+				}
 
-					if (this.bNextSpawnRightDirection) {
-						ran = 1; //LEFT;
-						this.bNextSpawnRightDirection = false;
+				let _currentBgStartX = this.canvasW / 2;
+				let count = 5;
+				let _currentPos = -12,
+					_addPos = 0;
 
-					} else {
-						this.bNextSpawnRightDirection = true;
-					}
-				}
-				if (_jumpPrefab.jumpName == 'LEFT_ROTATE') {
-					if (this.bNextSpawnRightRotateDirection) {
-						//如果是对应的需要记录一个对应的准确值
-						this.bNextSpawnRightRotateDirection = false;
-					} else {
-						ran = 4; //RIGHT_ROTATE;
-						this.bNextSpawnRightRotateDirection = true;
+				this.actionJumpCanvas.drawImage(this.jumpProgressTip.path, _currentBgStartX, 5, 171, 24.66);
+				this.actionJumpCanvas.drawImage(this.jumpProgressTip.path, _currentBgStartX, 116, 171, 24.66);
+				for (let i = 0; i < count; i++) {
+					if (0 !== i) {
+						_currentPos += this.jumpNormalWidth;
 					}
-					// console.log('l==rotate', ran);
-				} else if (_jumpPrefab.jumpName == 'RIGHT_ROTATE') {
-					if (this.bNextSpawnRightRotateDirection) {
-						ran = 3; //LEFT_ROTATE;
-						this.bNextSpawnRightRotateDirection = false;
+
+					if (1 === i) {
+						this.actionJumpCanvas.drawImage(this.jumpTipImage.path, _currentPos, 0, 120, this.canvasH);
+						this.actionJumpCanvas.drawImage(this.JumpTipOrange.path, _currentPos + 3, 7, 113, this.canvasH -
+							14);
+						// this.actionJumpCanvas.drawImage(this.midJump.path, _currentPos + 30, 46, 60, 60);
+						//添加对应生成点
+						this.spawnPos.push({
+							center: _currentPos + 30
+						})
+						_currentPos += 50;
 					} else {
-						//如果是对应的需要记录一个对应的准确值
-						this.bNextSpawnRightRotateDirection = true;
+						this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentPos, 0, this.jumpNormalWidth,
+							this.canvasH);
+
+						// this.actionJumpCanvas.drawImage(this.midJump.path, _currentPos + 16, 55, 40, 40);
+						//添加对应生成点
+						this.spawnPos.push({
+							center: _currentPos + 16
+						})
 					}
-				}
-				this.spawnArray.push(_jumpPrefab);
-			},
-			//单纯的绘制八个背景
-			onDrawBg() {
-				this.bDrawBg = true;
-				this.bKeepBg = true;
-				this.actionJumpCanvas.clearRect(0, 0, this.canvasW, this.canvasH);
-				let _currentBgStartX = this.canvasW / 2;
-				let count = 4;
-				for (let i = 0; i < count; i++) {
-					let _currentStartPos = _currentBgStartX - i * 50 - 50;
-					this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentStartPos, 0, 50,
-						114);
-					let _currentEndPos = _currentBgStartX + i * 50;
-					this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentEndPos, 0, 50, 114);
 
 				}
-				this.actionJumpCanvas.draw();
+				if (bDraw) {
+					this.actionJumpCanvas.draw();
+				}
 			},
 			onDraw(type) {
-				this.bDrawJump = true;
-				this.bKeepBg = false;
-				this.bKeepType = type;
-				this.actionJumpCanvas.clearRect(0, 0, this.canvasW, 114);
-				//计算一个对象
-				let _drawObj = {
-					path: null,
-					startX: 0,
-					width: 0,
-					bgWidth: 0,
-					bgStartXAllNormal: 0,
-					bgStartXHasTip: 0,
-				}
-				//计算居中的点
-				_drawObj.width = this.spawnArray.length * (50 + 10);
-				_drawObj.startX = this.canvasW / 2 - _drawObj.width / 2;
-				//全部是普通背景
-				_drawObj.bgStartXAllNormal = this.canvasW / 2 - (this.spawnArray.length * 50) / 2;
-				_drawObj.bgStartXHasTip = this.canvasW / 2 - (this.spawnArray.length * 50 + 40) / 2;
-
-				let _currentBgStartX = this.index == this.spawnArray.length || type == "normal" ? _drawObj
-					.bgStartXAllNormal : _drawObj
-					.bgStartXHasTip;
-
-				//最后还要绘制一个
-				if (this.spawnArray[this.spawnArray.length - 1].bTrigger) {
-					_currentBgStartX -= 20;
-				}
-				//绘制八个位置。如果生成数量不够的话。补上对应的数量
-				let count = 8 - this.spawnArray.length;
-				count = Math.ceil(count / 2);
-
+				this.actionJumpCanvas.clearRect(0, 0, this.canvasW, this.canvasH);
+				//单纯绘制背景
+				this.onDrawBg(false);
 				//计算一个节点数组
 				for (let i = 0; i < this.spawnArray.length; i++) {
 					//默认 mid 图标
@@ -713,93 +707,40 @@
 						_temp = this.spawnArray[i].bTrigger ? this.rotateJump : this.rotateJumpWhite;
 					}
 					//如果是相反绘制,需要加多一个自身位置偏移
-					let _pos = this.spawnArray[i].scaleX < 0 ? i + 1 : i;
-					let _spacing = i == 0 ? 0 : 1;
-
-					let _addData = 0;
-					//大图提示后面要加上大图占的位置,为大图宽度减小图( 90 - 50 )
-					if (i >= this.index && type !== "normal") {
-						_addData = 40;
-					}
-
-					if (i == 0) {
-						//_frontBgData 为减去大图位置,10 为偏移位置
-						let _frontBgData = 40;
-						//绘制前背景
-						for (let i = 0; i < count; i++) {
-							let _currentStartPos = _currentBgStartX - _frontBgData - i * 50 - 10;
-							this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentStartPos, 0,
-								50, 114)
-
-						}
-					}
-
-
+					let _pos = this.spawnArray[i].scaleX < 0 ? i + 1 : 0;
 					this.actionJumpCanvas.save();
-					// this.spawnArray[i].bTrigger ? 0.7 : 1;
-					this.actionJumpCanvas.globalAlpha = 1;
+					let _opacity = this.spawnArray[i].bTrigger ? 0.7 : 1;
+					console.log(this.spawnArray[i].bTrigger + '==' + _opacity);
+					this.actionJumpCanvas.globalAlpha = this.spawnArray[i].bShow ? _opacity : 0;
 					this.actionJumpCanvas.scale(this.spawnArray[i].scaleX, 1);
 
-					let _currentPos = 0;
+					let _currentPos = this.spawnPos[i].center;
 					let _currentCenterPos = 0;
-					if (i == this.index && type !== "normal") {
-						_currentPos = (_currentBgStartX + _pos * 90 - i * 40) *
-							this
-							.spawnArray[i]
-							.scaleX;
-						this.actionJumpCanvas.drawImage(this.jumpTipImage.path, _currentPos, 0, 90, 114);
 
-						//计算对应中心点的值
-						_currentCenterPos = _currentPos + 90 / 2 - 25 / 2;
+					if (i == 1) {
+						if (this.spawnArray[i].scaleX < 0) {
+							_currentPos = (_currentPos * 2 - 30) * this.spawnArray[i].scaleX;
+							//这里记录一个生成点,后面用于生成特效
+							this.effectSpawnPosX = _currentPos - 30;
+						} else {
+							//这里记录一个生成点,后面用于生成特效
+							this.effectSpawnPosX = _currentPos;
+						}
 
-						//57 - 40/2 是取画布中心y点,减去图标本身高的一半的值
-						this.actionJumpCanvas.drawImage(_temp.path, _currentCenterPos - 7.5, 37, 40, 40);
 
-						//这里记录一个生成点,后面用于生成特效
-						this.effectSpawnPosX = _currentPos;
+						//大图
+						this.actionJumpCanvas.drawImage(_temp.path, _currentPos, 46, 60, 60);
+						// console.log('big:' + _currentPos);
 					} else {
-						_currentPos = (_currentBgStartX + _addData + _pos *
-								50) * this
-							.spawnArray[i]
-							.scaleX;
-						this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentPos, 0, 50, 114)
-
-						//计算对应中心点的值
-						_currentCenterPos = _currentPos + 50 / 2 - 25 / 2;
-
-						if (!this.spawnArray[i].bTrigger) {
-							//44.5 是取画布中心y点,减去图标本身高的一半的值
-							this.actionJumpCanvas.drawImage(_temp.path, _currentCenterPos, 44.5, 25, 25);
-
+						//小图
+						if (this.spawnArray[i].scaleX < 0) {
+							_currentPos = (_currentPos + 40) * this.spawnArray[i].scaleX
+							console.log('min:' + _currentPos);
 						}
-					}
+						this.actionJumpCanvas.drawImage(_temp.path, _currentPos, 55, 40, 40);
 
-					this.actionJumpCanvas.restore();
-
-					let _spawnLength = this.spawnArray.length;
-					if (i == _spawnLength - 1) {
-						//绘制结束位置
-						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;
-							this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentEndPos, 0,
-								50, 114)
-
-						}
 					}
+					this.actionJumpCanvas.restore();
 				}
 
 				this.actionJumpCanvas.draw();
@@ -822,7 +763,7 @@
 			onClear() {
 				this.resetJumpGame();
 
-				this.onDrawBg();
+				this.onDrawBg(true);
 
 				this.xA = 0;
 				this.yA = 0;
@@ -875,19 +816,29 @@
 			// update (dt) {}
 			//模拟测试调用
 			eliminateJumpPrefab(_jumpType) {
-				let _temp = this.spawnArray[this.index];
-				// let _temp = this.jumpTypeArray[Math.floor(Math.random()*4) ];
-				//这里更新特效
-				// this.onDrawEffect(_temp);
-				// return;
+				//只触发第二个
+				if (this.spawnArray.length < 2) {
+					return;
+				}
+				let _temp = this.spawnArray[1];
 				//如果当前的跳类型和预制目标一样
 				if (_jumpType == _temp.jumpCode) {
 					_temp.bTrigger = true;
-					this.index++;
+					this.spawnArray.splice(0, 1);
+					if (this.index < this.templatePool.length) {
+						this.spawnArray.push(this.templatePool[this.index]);
+						this.index++;
+					}
 					//这里更新特效
 					let _endTemp = Object.assign({}, _temp);
 					this.onDrawEffect(_endTemp);
-					if (this.index >= this.spawnArray.length) {
+					//绘制新触发状态
+					this.onDraw('tipHit');
+					//成功
+					this.setEliminationCount(1);
+					//替换数组
+					// console.log(this.index + " == " + this.spawnArray.length);
+					if (this.spawnArray.length < 2 && this.index > 2) {
 						clearInterval(this.countdownInterval);
 						this.countdownInterval = null;
 						//绘制新触发状态
@@ -895,12 +846,7 @@
 						setTimeout(() => {
 							this.startJumpGame();
 						}, 2000)
-					} else {
-						//绘制新触发状态
-						this.onDraw('tipHit');
 					}
-					//成功
-					this.setEliminationCount(1);
 				} else {
 					//失误
 					this.setFaultCount(1);
@@ -1062,15 +1008,15 @@
 			},
 
 			getCurrentJumpType() {
-				let _temp = this.spawnArray[this.index];
+				let _temp = this.spawnArray[1];
 				return _temp.jumpCode;
 			},
 
 			//监听跳的状态数据
 			listenStateDataOfJump(data) {
 				if (this.isGameOver || !this.bJumpPlay) return;
-				
-				if (this.spawnArray.length == this.index) return;
+
+				if (this.spawnArray.length < 2) return;
 				let _jumpType = this.getCurrentJumpType();
 				//初始全部默认状态
 				let _tempState = [{
@@ -1198,8 +1144,11 @@
 				// }
 			},
 			eliminateJumpPrefabFormTemp(_tempState) {
-				//如果消除完,需要重新生成
-				let _temp = this.spawnArray[this.index];
+				//只触发第二个
+				if (this.spawnArray.length < 2) {
+					return;
+				}
+				let _temp = this.spawnArray[1];	
 				let bSuccess = false;
 				for (let i = 0; i < _tempState.length; i++) {
 					let _state = _tempState[i];
@@ -1214,28 +1163,31 @@
 				}
 				//如果存在其中一个为true
 				if (bSuccess) {
-					// console.log("bSuccess:", bSuccess);
 					_temp.bTrigger = true;
-					this.index++;
-
 					this.canSpawnTemp = _temp;
-					setTimeout(()=>{
+					setTimeout(() => {
 						//这里更新特效
 						this.onDrawEffect(this.canSpawnTemp);
-					},150);
-					
-					if (this.index >= this.spawnArray.length) {
+					}, 150);
+					this.spawnArray.splice(0, 1);
+					if (this.index < this.templatePool.length) {
+						this.spawnArray.push(this.templatePool[this.index]);
+						this.index++;
+					}
+					//成功
+					this.setEliminationCount(1);
+					//替换数组
+					// console.log(this.index + " == " + this.spawnArray.length);
+					if (this.spawnArray.length < 2 && this.index > 2) {
 						clearInterval(this.countdownInterval);
 						this.countdownInterval = null;
+						//绘制新触发状态
 						this.canGoNext = true;
-						// this.onDraw("normal");
-					} else {
+					}else {
 						//绘制新触发状态
 						this.canOnDraw = true;
-						// this.onDraw("normal");
 					}
-					//成功
-					this.setEliminationCount(1);
+					
 				} else {
 					//失误
 					this.setFaultCount(1);
@@ -1357,4 +1309,27 @@
 		position: absolute;
 		top: -150rpx;
 	}
+
+	.grid-progress-vertical-container {
+		min-height: 376rpx;
+	}
+
+	.grid-progress-vertical-bar {
+		max-height: 376rpx;
+	}
+
+	.grid-progress-vertical-child {
+		width: 35px;
+		height: 7.36px;
+		margin: 7.36px 0 0 0;
+		position: relative;
+	}
+
+	.grid-progress-vertical-active {
+		width: 28rpx;
+	}
+
+	.grid-progress-vertical-inactive {
+		width: 28rpx;
+	}
 </style>

+ 2 - 2
components/round-fab/round-fab.vue

@@ -36,9 +36,9 @@
 			<!-- 父节点 uni-fab__plus   :style="{ 'background-color': styles.buttonColor }"-->
 			<!-- <view class="fab-circle-v" :class="{'uni-fab__plus--active': isShow}"></view>
 			<view class="fab-circle-h" :class="{'uni-fab__plus--active': isShow}"></view> -->
-			<image v-if="isConnect" style="width: 100%;height: 100%;" src="../../static/personal/connecting.png">
+			<image v-if="isConnect" style="width: 100%;height: 100%;" src="../../static/personal/connecting-orange.png">
 			</image>
-			<image v-else style="width: 100%;height: 100%;" src="../../static/personal/disconnect.png"></image>
+			<image v-else style="width: 100%;height: 100%;" src="../../static/personal/disconnect-orange.png"></image>
 		</view>
 	</view>
 </template>

+ 4 - 3
components/uni-count-down/uni-count-down.vue

@@ -3,9 +3,9 @@
 		<text v-if="showDay" :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ d }}</text>
 		<text v-if="showDay" :style="{ color: splitorColor }" class="uni-countdown__splitor">天</text>
 		<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor, 'font-size': size+'px' }" class="uni-countdown__number">{{ h }}</text>
-		<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '时' }}</text>
+		<text :style="{ color: splitorColor, 'font-size': size+'px' }" class="uni-countdown__splitor">{{ showColon ? ':' : '时' }}</text>
 		<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor, 'font-size': size+'px' }" class="uni-countdown__number">{{ i }}</text>
-		<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '分' }}</text>
+		<text :style="{ color: splitorColor, 'font-size': size+'px' }" class="uni-countdown__splitor">{{ showColon ? ':' : '分' }}</text>
 		<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor, 'font-size': size+'px' }" class="uni-countdown__number">{{ s }}</text>
 		<text v-if="!showColon" :style="{ color: splitorColor }" class="uni-countdown__splitor">秒</text>
 	</view>
@@ -186,7 +186,8 @@
 		/* #endif */
 		justify-content: center;
 		line-height: 48rpx;
-		padding: 8rpx 0 0 0;
+		/* padding: 8rpx 0 0 0; */
+		padding: 1px;
 		font-size: 24rpx;
 		/* border: 1rpx solid #000000; */
 	}

+ 2 - 2
manifest.json

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

+ 4067 - 0
pages/personal-page/personal/personal-copy.vue

@@ -0,0 +1,4067 @@
+<!-- 旧版本跳首页文件修改版本 -->
+
+<template>
+	<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)"
+			@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>
+				</view>
+			</view>
+			<!-- @clickRight="onNavFcGame()" -->
+			<view slot="middle">
+				<!-- <view style="position: relative; border: 1rpx solid #FFFFFF;">
+					<view
+						style="position: absolute;top: 0;left: -155rpx;right: 0;bottom: 0;margin: auto; width: 194rpx;height: 52rpx; border-radius: 26rpx 0 0 26rpx; background-color: rgba(255,255,255,0.12);"
+						class="flex align-center justify-center">
+						<image style="width: 26rpx;height: 24rpx; margin-right: 12rpx;"
+							src="/static/personal/linkWhite.png"></image>
+						<view class="text-14px ">连接设备</view>
+					</view>
+					
+				</view> -->
+				<view class="flex justify-center align-center" style="margin-left: 160rpx; ">
+					<view class="flex align-center"
+						style="margin-right: 40rpx; padding: 0 18px; height: 56rpx; background-color: rgba(255,255,255,0.11); border-radius: 13.5px;">
+						<image class="png-more" style="margin-right: 16rpx;" src="/static/common/sideBar/sGold.png">
+						</image>
+						<view class="text-14px" style="line-height: 28rpx;">{{cGold}}</view>
+					</view>
+					<view class="flex  align-center"
+						style="padding: 0 18px; height: 56rpx; background-color: rgba(255,255,255,0.11); border-radius: 13.5px;">
+						<image class="png-more" style="margin-right: 16rpx; " src="/static/common/sideBar/sDiamond.png">
+						</image>
+						<view class="text-14px" style="line-height: 28rpx;">{{cDiamond}}</view>
+					</view>
+				</view>
+			</view>
+		</uni-nav-bar>
+		<!-- 导航栏下面滚动区域 -->
+		<scroll-view class="scroll-class" @scroll="mainScroll" :scroll-top="scrollTop" :scroll-into-view="toView"
+			scroll-y="true" :style="{ height: scrollviewHight + 'px' }">
+			<view class="flex align-center">
+				<view class="justify-center">
+					<!-- 计划显示 区域 topScrollHight :style="{ height: + '100%' }"-->
+					<scroll-view scroll-y="true" style="height: 100%; width: 100%;">
+						<view class="plan-view">
+							<!-- 拳击模块 -->
+							<view v-if="currentMode == 'pkMode' && 0 === currentModeIndex"
+								style="display: flex; flex-direction: row; height: 200rpx; margin-top: 140rpx; justify-content: space-around;align-items: center;">
+								<view>
+									<view class="cu-avatar-group" style="position: relative;">
+										<view class="cu-avatar round xl" :class="bAiHitShake?' screen-jitter':''"
+											:style="[{ backgroundImage:'url('+avatarUrl+')' }]"></view>
+										<HitEffect ref="aiHitEffectRef"></HitEffect>
+									</view>
+									<view style="margin-top: 20rpx; width: 165rpx;" class="text-cut text-white">
+										{{userName}}{{AJData.isLeftPlayer?'':'当前玩家'}}
+									</view>
+								</view>
+
+								<view>
+									<image style="width: 104rpx; height: 42rpx ;margin-bottom: 60rpx;"
+										src="/static/personal/pk@2x.png"></image>
+								</view>
+								<view>
+									<view class="cu-avatar-group" style="position: relative;">
+										<view class="cu-avatar round xl" :class="bHitShake?' screen-jitter':''"
+											:style="[{ backgroundImage:'url('+aiObj.avatar+')' }]"></view>
+										<HitEffect ref="hitEffectRef"></HitEffect>
+									</view>
+									<view style="margin-top: 20rpx; width: 165rpx;" class="text-cut text-white">
+										{{aiObj.name}}{{AJData.isLeftPlayer?'':'当前玩家'}}
+									</view>
+								</view>
+
+								<view
+									style="position: absolute;left: 0;right: 0;top: 0;bottom: 0; height: 200rpx; margin-top: 120rpx;">
+									<HitFistEffect ref="hitFistRef"></HitFistEffect>
+								</view>
+
+							</view>
+
+							<!-- pk模式下的跳绳 -->
+							<block v-if="1 === currentModeIndex">
+								<view v-if="currentMode == 'pkMode'" class="flex justify-center "
+									style="height: 180rpx; margin-top: 20rpx;">
+									<view class="flex flex-direction justify-center align-center">
+										<view class="cu-avatar-group" style="position: relative;">
+											<view class="cu-avatar round xl" :class="bAiHitShake?' screen-jitter':''"
+												:style="[{ backgroundImage:'url('+avatarUrl+')' }]"></view>
+										</view>
+										<view style="margin-top: 20rpx; width: 165rpx; "
+											class="text-cut text-white text-center">
+											{{userName}}
+										</view>
+									</view>
+
+									<view class="flex justify-center align-center " style=" width: 300rpx;">
+										<LEDFont style="" :showValue='AJData.myScore' :size="30" color='#FFFFFF'>
+										</LEDFont>
+										<view class="text-white text-bold">:</view>
+										<LEDFont style="" :showValue='AJData.otherScore' :size="30" color='#FFFFFF'>
+										</LEDFont>
+									</view>
+									<view v-if="finallySelectFriendInfo"
+										class="flex flex-direction justify-center align-center"
+										@click="onNavToSelectFriend()">
+										<view class="cu-avatar-group" style="position: relative;">
+											<view class="cu-avatar round xl" :class="bHitShake?' screen-jitter':''"
+												:style="[{ backgroundImage:'url('+finallySelectFriendInfo.avatarUrl+')' }]">
+											</view>
+										</view>
+										<view style="margin-top: 20rpx; width: 165rpx;"
+											class="text-cut text-white text-center">
+											{{finallySelectFriendInfo.username}}
+										</view>
+									</view>
+									<view v-else class="flex flex-direction justify-center align-center"
+										@click="onNavToSelectFriend()">
+										<image style="width: 100rpx ;height: 100rpx;"
+											src="/static/friend/friend-add.png">
+										</image>
+										<view style="margin-top: 20rpx; width: 165rpx;"
+											class="text-cut text-white text-center">
+											选择好友
+										</view>
+									</view>
+								</view>
+								<view v-else style="height:80rpx;"> </view>
+							</block>
+
+							<!-- 圆形进度条 -->
+							<view
+								v-if="(currentMode == 'pkMode' && 1 === currentModeIndex)||currentMode== 'calorieMode'"
+								class="qiun-charts-arcbar">
+								<!-- 进度条 -->
+								<canvas canvas-id="canvasArcbar" id="canvasArcbar" class="charts-arcbar "></canvas>
+								<!-- 图标 -->
+								<view class="personal-fruit-container">
+									<image style="width: 36rpx;height: 56rpx; margin-top: -120px;"
+										src="../../../static/modal/action-jump/arcbarJumpIcon.png"></image>
+								</view>
+
+								<!-- 图标 -->
+								<view class="personal-fruit-container">
+									<view class="text-13px text-white" style="margin-top: -50px;">
+										失误:{{AJData.faultCount}}</view>
+								</view>
+								<!-- 水果卡路里-->
+								<!-- <view class="personal-fruit-container">
+									<fruit ref="personalFruitRef" :calorie="planData.allCalorie"></fruit>
+								</view> -->
+
+								<!-- 跳动次数 -->
+								<view class="personal-fruit-container">
+									<LEDFont style="margin-top: 40px;" :showValue='AJData.allCount' :size="60"
+										color='#FFFFFF'>
+									</LEDFont>
+									<!-- <view style="margin-top: 130px;font-size:12px;color: #FFFFFF;">计划时间{{planData.sportTime}}分钟</view> -->
+								</view>
+								<!-- 计划按钮 -->
+								<!-- <view id="projectButtonView" style="position: absolute;left: 0;top: 18px;">
+									<view class="flex justify-center" style="width: 100%;">
+										<view class="charts-pring-button  make-line-bPurple " :class="bPlanExpired?'breathing-lamp':''" style="background-color: #FFFFFF;"
+										 @tap="openPlan">
+											<image src="/static/reform.png" class="p-data-png" mode="aspectFit"></image>
+											<view class="text-11px">改计划</view>
+										</view>
+									</view>
+								</view> -->
+
+								<!-- 计时器 -->
+								<view class="personal-fruit-container">
+									<arcbarCountDown
+										style="margin-top: 150px; border: 1rpx solid rgba(255,255,255,0.33); padding: 0 10px; border-radius: 40rpx;"
+										ref="arcbarCountDownRef" :show-day="false" :second="AJData.gameLimitTime"
+										color="#FFFFFF" background-color="rgba(255,255,255,0);" border-color="#007AFF"
+										:size="18" splitorColor="#FFFFFF" @timeUp="arcbarCountDownTimeUp"
+										@timeUpdate="arcbarCountDownTimeUpdate" />
+								</view>
+
+
+								<!-- 卡路里提示 -->
+								<!-- <view class="personal-fruit-container">
+									<prompt-box :calorie="planData.allCalorie"></prompt-box>
+								</view> -->
+							</view>
+							<!-- 钻石和金币部分 -->
+							<!-- <view class="charts-pring-bottom" style="margin-top: 34rpx;">
+								<view class="flex justify-center align-center"
+									style="height: 52rpx; width: 412rpx; background-color: rgba(255,255,255,0.11); border-radius: 12rpx;">
+									<view class=" flex align-center justify-center" style="color: #fff;">
+										<view class="flex  align-center">
+											<image class="png-more" style="margin-right: 18rpx;"
+												src="/static/personal/cDiamond.png"></image>
+											<view>{{cDiamond}}</view>
+										</view>
+										<view class="flex  align-center" style="margin-left: 60rpx;">
+											<image class="png-more" style="margin-right: 18rpx;"
+												src="/static/personal/cGold.png"></image>
+											<view>{{cGold}}</view>
+										</view>
+									</view>
+								</view>
+							</view> -->
+
+							<!-- 用于定位 -->
+							<!-- <view id="boxingHitID" style="position: absolute;top: 180rpx; pointer-events: none;" ></view> -->
+							<view id="boxingHitID" v-if="0 === currentModeIndex" class="charts-pring-bottom">
+								<!-- 添加一个 ConnectBindingDevice 测试 -->
+								<boxing-hit ref="boxingPostRef"
+									:bUpdate="!bHide&&(ConnectBindingDevice!=null)||(cIndex!=-1 && BLEConnectDevice!=null &&
+								 (BLEConnectDevice.deviceType == 'mySelf'||BLEConnectDevice.deviceType == 'BLEHandle' || BLEConnectDevice.deviceType == 'BLERope' ))"
+									:showTime="localSportTime"
+									:bRebound="BLEConnectDevice&&BLEConnectDevice.limitType == 'rebound'"
+									@updateCalorie="boxingUpdateCalorie" @boxingPostCheck="onPersonalCheck"
+									@shake="onScreenShake" @updateSportTime="onUpdateSportTime"
+									@boxingGuideFinish="onBoxingGuideFinish"
+									@boxingPostControlPlay="onActionControlPlay" @modeEvent="onModeEvent"
+									@hitEvent="onHitEvent" @aiHitEvent="onAiHitEvent" @gameOver="onBoxingGameOver"
+									@closeBoxingControl="onCloseBoxingHit"></boxing-hit>
+
+							</view>
+
+							<view id='actionJumpID' v-if="1 === currentModeIndex" class="charts-pring-bottom">
+								<action-jump ref="actionJumpRef"
+									:levelData="currentJumpTask!=null?currentJumpTask.item:null"
+									:currentMode="currentMode" @actionJumpCheck="onPersonalCheck"
+									@actionJumpControllerPlay="onActionControlPlay"
+									@actionJumpDataUpdate="onActionJumpDataUpdate" @gameOver="onActionJumpGameOver"
+									@tipLevel="onTipLevel">
+								</action-jump>
+							</view>
+							<!-- <button @tap="onTestAddLocalCalorie">11</button> -->
+						</view>
+
+					</scroll-view>
+					<!-- <view class="margin flex flex-direction">
+						<view class="title">当前游戏链接:{{LocationGameUrl}}</view>
+						<input style="border: 1rpx solid #000000;margin: 10rpx;" @input="onKeyInput" placeholder="输入同步到view中" />
+					</view> -->
+					<!-- <button  @tap="onShowBoxingHitTip">11</button> -->
+				</view>
+			</view>
+			<!-- <modal-mask></modal-mask> -->
+
+			<!-- <view class="example">
+				<view class="example-title">从左侧滑出</view>
+				<button @click="showDrawer">显示抽屉</button>
+			</view> -->
+			<!-- <view class="example">
+				<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="showGuide('level-game-tip',{levelType:'rotationJump'})">显示 level-game-tip</button>
+			</view> -->
+			<!-- <view class="example">
+				<button @click="onTipLevel">显示 ontipLevel</button>
+			</view> -->
+			<!-- <view class="example" style="margin-top: 10rpx;">
+				<button @click="onNavToDirection">跳转校准页面</button>
+			</view> -->
+			<!-- <view class="example">
+				<button @click="onGetBluetoothConnectView({
+												hiddenType: 'firstInstallation'
+											})">显示 bluetoothConnect</button>
+			</view> -->
+			<!-- <view class="example">
+				<button @click="onUserSignIn()">签到</button>
+			</view> -->
+			<view style="height: 100rpx;"></view>
+		</scroll-view>
+
+		<!-- 底部中间上滑按钮 -->
+		<view class="flex flex-direction justify-end align-center task-up-button" @tap="showModal"
+			data-target="slideUpModal">
+			<!-- <image style="width: 156rpx; height: 32rpx;" src="../../../static/personal/slideUp.png" @tap="showModal"
+				data-target="slideUpModal"></image> -->
+			<image style="width: 147px;height: 31px; top: -6px;" class="position-absolute-center"
+				src="../../../static/modal/level-tip/level-tip-bg@2x.png"></image>
+			<image style="width: 30px;height: 23px; " src="../../../static/modal/level-tip/level-tip-logo@2x.png">
+			</image>
+			<view style="width: 100%;height: 16rpx; background-color: #FFFFFF; color: #FFFFFF;"></view>
+		</view>
+
+		<!-- 右下角导航栏 -->
+		<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' ? '' : ''">
+
+			<view style="
+			position: relative; 
+			width: 586rpx;
+			height: 766rpx;
+			background-color: #FFFFFF; 
+			border-radius: 25px;
+			display: inline-block;
+			vertical-align: middle;
+			margin-left: auto;
+			margin-right: auto;
+			overflow: hidden;">
+				<view style="position: relative; width: 100%; height: 328rpx;">
+					<image style="position: absolute;top: 0;left: 0; width: 100%;height: 100%;"
+						src="../../../static/sidebar_top_bg.png"></image>
+					<view class="flex flex-direction justify-around align-center"
+						style="position: relative; height: 100%;">
+						<view class="text-white">已在哔嘣健身训练了</view>
+						<view class="text-white"><span style="font-size: 43px;">{{sportData.time}}</span> 分钟</view>
+						<view class="text-white">本次达标率{{sportData.percent}}%</view>
+					</view>
+				</view>
+				<view class="flex justify-around">
+					<view class="flex flex-direction justify-around align-center"
+						style="position: relative; height: 162rpx;">
+						<view class="text-grey">消耗</view>
+						<view class="text-grey"><span
+								style="font-size: 18px; color: #000000;">{{sportData.calorie}}</span> 卡</view>
+					</view>
+					<view class="flex flex-direction justify-around align-center"
+						style="position: relative; height: 162rpx;">
+						<view class="text-grey">踩中</view>
+						<view class="text-grey"><span style="font-size: 18px; color: #000000;">{{sportData.hit}}</span>
+							次</view>
+					</view>
+					<view class="flex flex-direction justify-around align-center"
+						style="position: relative; height: 162rpx;">
+						<view class="text-grey">失误</view>
+						<view class="text-grey"><span style="font-size: 18px; color: #000000;">{{sportData.miss}}</span>
+							次</view>
+					</view>
+				</view>
+				<view class="flex flex-direction justify-around align-center margin-top-sm">
+					<view style="position: relative; width: 500rpx; border:1rpx solid #EEEEEE ;"></view>
+				</view>
+				<view class="flex flex-direction justify-around align-center" style="height: 230rpx;">
+					<view class="text-black text-16px">非常优秀,继续加油!</view>
+					<view class="flex justify-center align-center text-white make-bg-bPurple round text-16px"
+						style="width: 300rpx;height: 80rpx;" @tap="hideModal">确定</view>
+				</view>
+			</view>
+		</view>
+		<!-- :class="modalName == 'jumpAnimation' ? 'show' : ''" -->
+		<view class="cu-modal " :class="modalName == 'jumpAnimation' ? '' : ''">
+
+			<view style="
+			position: relative; 
+			width: 586rpx;
+			height: 400rpx;
+			background-color: #FFFFFF; 
+			border-radius: 4px;
+			display: inline-block;
+			vertical-align: middle;
+			margin-left: auto;
+			margin-right: auto;
+			overflow: hidden;">
+				<view style="height: 100%;display: flex;justify-content: center;align-items: center;">
+					<character></character>
+				</view>
+			</view>
+		</view>
+
+		<!-- 引导蒙层 bGuidePages guideCurrent-->
+		<code-elf-guide ref="codeElfGuide" v-if="bGuidePages" @hide="guideHide" @change="onGuideChange"
+			:current="guideCurrent" :currentMode="currentMode"></code-elf-guide>
+
+		<view v-if="bStartCountDown" class="CountDownMask">
+			{{BoxingPostCountDownText}}
+		</view>
+
+		<view class="cu-modal " :class="modalName=='showPlanTipModal'?'show':''"
+			@touchmove.stop.prevent="moveBoxingHandle">
+			<view class="cu-bind-modal">
+				<view style="position: absolute; top: 0; left: 0; width: 100%; height:100%;">
+					<image style="position: absolute;top: 0;left: 0; width: 100%;height: 100%;"
+						src="/static/modelBg.png"></image>
+				</view>
+				<view class="flex flex-direction justify-between " style="position: relative; height: 100%;">
+					<view class="flex justify-around justify-center align-center" style="margin: 170rpx 30rpx 0 30rpx;">
+						<view style="width: 80rpx;height: 2rpx;border-radius: 2px; background-color: #cbcdcf;"></view>
+						<view class="make-text-bPurple" style=" font-size: 20px;">提示</view>
+						<view style="width: 80rpx;height: 2rpx;border-radius: 2px;background-color: #cbcdcf;"></view>
+					</view>
+					<view class="text-16px" style="align-self: center; max-width: 200px; word-break: break-all;">
+						{{planTip[planTipIndex]}}
+					</view>
+
+					<view class="flex justify-around align-center"
+						style=" border-top: 1rpx solid #EEEEEE; margin-bottom: 2px;">
+						<view class="flex justify-center align-center  text-16px" style="width: 100%;height: 123rpx;"
+							@tap="hidePlanTipModal">取消</view>
+						<view style="height: 123rpx;width: 1px;background-color: #EEEEEE;"></view>
+						<view class="flex justify-center align-center  text-16px" style="width: 100%;height: 123rpx;"
+							@tap="confirmPlanTipModal">确定</view>
+					</view>
+				</view>
+
+
+			</view>
+		</view>
+
+		<ModalTip ref='modalTipRef' :class="modalName=='showModalTip'?' show':''" @hide="onModalTipHide"
+			@confirm="onModalTipConfirm"></ModalTip>
+
+		<!-- 任务栏 -->
+		<view class="cu-modal bottom-modal" :class="modalName=='slideUpModal'?'show':''" @tap="hideModal">
+			<view class="cu-dialog bg-white" style="border-radius: 15px 15px 0 0 ;" @tap.stop="">
+				<view class="flex justify-center align-center position-relative" style="width: 750rpx; height: 64rpx;"
+					@tap="hideModal">
+					<view class="text-blue make-bg-bPurple radius" style="width: 80rpx; height: 4px;"></view>
+					<view class="position-absolute-right-top">
+						<image style="width: 64rpx;height: 64rpx;" src="../../../static/common/modal/task-close@2x.png">
+						</image>
+					</view>
+				</view>
+				<view class="flex justify-between" style="width: 100%; padding: 34rpx 60rpx 46rpx 81rpx;">
+					<view class="flex align-center justify-center">
+						<view class="text-16px text-bold make-text-bPurple"
+							style="line-height: 32rpx;  margin-right: 18rpx;">{{currentMode == 'pkMode'?'PK模式':'健身模式'}}
+						</view>
+						<image style="width: 42rpx;height: 24rpx;" src="/static/common/modal/right-arrow.png"></image>
+					</view>
+					<view>
+						<button class="make-bg-bPurple flex justify-center align-center" @click="onSwitchMode">
+							<view class="flex align-center justify-center" style="width: 190rpx;height: 60rpx;">
+								<image style="width: 24rpx;height: 22rpx; margin-right: 18rpx;"
+									src="/static/personal/switchWhite.png"></image>
+								<view class="text-14px text-white" style="line-height: 28rpx;">
+									{{currentMode !== 'pkMode'?'PK模式':'健身模式'}}
+								</view>
+							</view>
+						</button>
+					</view>
+
+				</view>
+				<scroll-view scroll-y="true" style="height: 800rpx; max-height: 800rpx;min-height: 460rpx;"
+					:style="{ height: modalHeight + 'px' }" :scroll-into-view="taskIntoView"
+					:scroll-top="taskScrollTop">
+					<!-- :class="!item.isUnlock?'':'make-text-bPurple'" -->
+					<view class="my-column-cu-steps">
+						<view class="cu-item"
+							: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"
+								src="../../../static/common/modal/unLock.png"></image>
+							<image
+								v-else-if="index>=1&&currentTaskList[index-1].isUnlock&&currentTaskList[index-1].isPassed"
+								class="my-column-cu-image" src="../../../static/common/modal/canUnlock.png">
+							</image>
+							<image v-else class="my-column-cu-image" src="../../../static/common/modal/lock.png">
+							</image>
+							<view class="content">
+								<view class="text-15px text-bold text-cut text-left text-black text-medium"
+									style="margin-left: 48rpx; width: 360rpx;margin-top: 30rpx;">
+									{{index+1}}. {{item.name}}
+								</view>
+								<view class="flex justify-start align-center" style="margin:20rpx 0 20rpx 86rpx;">
+									<!-- 居中绘制星星样式 -->
+									<view class="flex align-center justify-center"
+										style="margin-right: 36rpx;margin-top: 4rpx;">
+										<image style="width: 36rpx;height: 36rpx; margin-right: 18rpx;"
+											src="/static/common/sideBar/sGold.png"></image>
+										<view class="text-13px text-black text-medium" style="line-height: 26rpx;">
+											{{item.consumeGold}}
+										</view>
+									</view>
+									<view class="flex align-center justify-center"
+										style="margin-right: 36rpx;margin-top: 4rpx;">
+										<image style="width: 38rpx;height: 34rpx; margin-right: 18rpx;"
+											src="/static/common/sideBar/sDiamond.png"></image>
+										<view class="text-13px text-black text-medium" style="line-height: 26rpx;">
+											{{item.consumeDiamond}}
+										</view>
+									</view>
+
+								</view>
+								<!-- <view class="text-13px text-grey text-left" style="margin: 20rpx 20rpx 0 86rpx;">
+									{{item.conditionPassed.explain}}
+								</view> -->
+								<view class="flex justify-start align-center" style="margin-left: 86rpx;">
+									<view class="flex flex-direction align-center" v-for="(item, index) in 5"
+										:key="index">
+										<image style="width: 34rpx;height: 32rpx;"
+											src="../../../static/modal/action-jump/stars.png">
+										</image>
+									</view>
+
+								</view>
+
+							</view>
+							<image class="my-column-cu-right-image" style="pointer-events:auto;"
+								src="../../../static/common/modal/medal.png" @click="showPopup('prompt',item)">
+							</image>
+							<view v-if="currentJumpTask!=null&&item.id==currentJumpTask.item.id"
+								class="position-absolute-right-bottom make-text-bPurple text-13px text-medium "
+								style="right: 70rpx;bottom: 24rpx;">游戏中...</view>
+							<!-- /static/devicesOther/radio-g -->
+							<image class="my-column-cu-image"
+								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="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>
+
+		<!-- 这里vConsole 是为了解决再页面内显示vconsole -->
+		<view id="vconsole" :prop="vLog" :change:prop="vconsole.updateData"></view>
+	</view>
+</template>
+
+<!-- 这里vConsole 是为了解决再页面内显示vconsole -->
+<script module="vconsole" lang="renderjs">
+	import VConsole from '../../../util/util-js/vconsole.min.js'
+	new VConsole();
+	export default {
+		mounted() {
+			// ...
+		},
+		data: {
+			return () {}
+		},
+		methods: {
+			updateData(newValue, oldValue, ownerInstance, instance) {
+				// newValue: 新数据
+				// oldValue: 老数据
+				var log = console.log.bind(console);
+				log(newValue)
+			}
+		}
+	}
+</script>
+
+<script>
+	// import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue';
+	import uCharts from '@/components/u-charts/u-charts.js';
+	import myPicker from '@/components/slambb-picker/slambb-picker.vue';
+	import pickerData from '@/components/slambb-picker/picker.js';
+	import date from '@/util/util-js/date.js';
+	import sideBar from '@/components/side-bar/side-bar.vue';
+
+	import reqUtil from '@/util/util-js/requstUtil.js';
+	import config from '@/common/config.js';
+
+	import uniCountDown from '@/components/uni-count-down/uni-count-down.vue'
+
+	import character from "@/components/electAni/character.vue"
+	import fruit from "@/components/fruitMachine/fruitMachine.vue"
+
+	import promptBox from "@/components/prompt-box/prompt-box.vue"
+
+	import roundFab from "@/components/round-fab/round-fab.vue"
+
+	import codeElfGuide from '@/components/code-elf-guide/code-elf-guide.vue'
+
+	import boxingPost from "@/components/modal/boxing-post/boxing-post.vue"
+
+	import boxingHit from "@/components/modal/boxing-hit/boxing-hit.vue"
+
+	import actionJump from "@/components/modal/action-jump/action-jump.vue"
+
+	import AccAndOri from "@/util/util-js/AccAndOri.js"
+
+	import AvatarConfig from "@/util/util-js/avatar.js"
+
+	import HitEffect from "@/components/effectHit/hitEffect.vue"
+	import HitFistEffect from "@/components/effectHit/hitFistEffect.vue"
+
+	import ModalTip from "@/components/modal-tip/modalTip.vue"
+
+	import keyboardListener from '@/components/keyboard-listener/keyboard-listener.vue'
+
+	import LEDFont from '@/components/LEDFont/LEDFont.vue'
+
+	import arcbarCountDown from '@/components/uni-count-down/uni-count-down.vue'
+
+	import modalMask from '@/components/modal-mask/modal-mask.vue'
+
+	// 获取 module 
+	// var testModule = uni.requireNativePlugin("MyAttitude")
+	// const modal = uni.requireNativePlugin('modal');
+
+
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+
+	var _self;
+	var canvaArcbar1;
+
+	export default {
+		computed: mapState(['bCanvasShow', 'forcedLogin', 'hasLogin', 'userName', 'avatarUrl', 'days', 'remainingDays',
+			'signature', 'weight', 'height', 'planData', 'BLEDeviceShowList', 'BLEConnectDevice', 'bPlanExpired',
+			'bPlanFinish',
+			'bGuidePages',
+			'globalAcc', 'globalOri', 'DeviceBindingList', 'ConnectBindingDevice', 'cIndex', 'bNewGuide',
+			'localSportTime',
+			'currentModeIndex', 'oldArcbarProCalorie', 'oldArcbarAllCalorie', 'bOpenBluetooth', 'bOpenSuccess',
+			'bListenAdapterStateChange', 'bConnection', 'bVerifiedConnection', 'currentInstruction',
+			'instructionState',
+			'LocationGameUrl',
+			'bPhoneMatched',
+			'versionCodeState',
+			'platform',
+			'systemInfo', 'navHeight', 'tabbarHeight',
+			'cDiamond', 'cGold',
+			'finallySelectFriendInfo',
+			'currentJumpTask', 'singlePersonList', 'multiPersonList',
+			'guideUnlockState'
+		]),
+		components: {
+			// uniNavBar,
+			myPicker,
+			sideBar,
+			uniCountDown,
+			character,
+			fruit,
+
+			roundFab,
+
+			codeElfGuide,
+			boxingPost,
+			boxingHit,
+			promptBox,
+			HitEffect,
+			HitFistEffect,
+			ModalTip,
+			keyboardListener,
+
+			actionJump,
+			LEDFont,
+			arcbarCountDown,
+
+			modalMask
+		},
+
+		data() {
+			return {
+				title: 'pk模式', //pk模式 健身模式
+				modalName: null,
+				originalDate: '', //记录new date
+				currentDate: '', //当前日期
+				cWidthArcbar: '', //圆弧进度图
+				cHeightArcbar: '', //圆弧进度图
+				arcbarWidth: '', //圆弧进度图,进度条宽度,此设置可使各端宽度一致
+				pixelRatio: 1,
+				// textarea: '',
+				// arcbarImagePath: '/static/logo.png',
+				// cWidth: '',
+				// cHeight: '',
+				scrollviewHight: '',
+				// 顶部区域部分
+				topScrollHight: '',
+				// 选择器
+				pickerObj: {},
+				// lineAImagePath: '/static/logo.png',
+				// visible: true,
+				// indicatorStyle: `height: ${Math.round(uni.getSystemInfoSync().screenWidth / (750 / 100))}px;`,
+				//设备列表
+				deviceList: [{
+					name: '蹦床',
+					icon: '/static/trampoline.png'
+				}],
+				cState: 1,
+				//游戏列表
+				gameList: [],
+				//视频列表,现在视频是和游戏一起管理
+				videoList: [],
+				//运动数据
+				sportData: {
+					calorie: 0,
+					hit: 0,
+					miss: 0,
+					percent: 0,
+					time: 0,
+					allData: 0
+				},
+
+				//设置滚动栏高度
+				scrollTop: 0,
+				//scroll view 跳转到对应的组件上
+				toView: '',
+				guideCurrent: 0,
+
+				bHide: false,
+
+				//屏幕抖动
+				bEFHitShake: false,
+				bStartBoxingPost: false,
+				bStartCountDown: false,
+				BoxingPostCountDownText: 3,
+				b_countDown: null,
+
+				countDownUrl: [
+					"/static/personal/audio/GO.mp3",
+					"/static/personal/audio/1.mp3",
+					"/static/personal/audio/2.mp3",
+					"/static/personal/audio/3.mp3"
+				],
+				threeUrl: "/static/personal/audio/3.mp3",
+				twoUrl: "/static/personal/audio/2.mp3",
+				oneUrl: "/static/personal/audio/1.mp3",
+				goUrl: "/static/personal/audio/GO.mp3",
+
+				dangdang: "/static/personal/audio/dangdang.mp3",
+				personalAudioContext: null,
+
+				planTip: [
+					'您今天的目标已经达成,是否进行自由训练.',
+					'您今天的目标还没完成,是否结束训练.'
+				],
+				planTipIndex: 0,
+
+				//匹配的ai信息
+				aiObj: {
+					name: '匿名',
+					avatar: '/static/defaultAvatar.png'
+				},
+				aiOldObj: {
+					name: '匿名',
+					avatar: '/static/defaultAvatar.png'
+				},
+
+				currentMode: 'calorieMode', //pkMode calorieMode
+
+				bHitShake: false,
+
+				bAiHitShake: false,
+				//限制重连,比如去了对应硬件连接页面,限制这个页面的重连操作
+				bLimitReconnection: false,
+
+				/**
+				 * 首页这里连接了蓝牙,然后选择框回来后show会触发,触发时候检测一下是否有对应的
+				 * 匹配蓝牙
+				 */
+				bGetBondTesting: false,
+
+				basicsList: [{
+						cuIcon: 'usefullfill',
+						name: '开始',
+						bLock: false,
+					}, {
+						cuIcon: 'radioboxfill',
+						name: '等待',
+						bLock: true,
+					},
+					{
+						cuIcon: 'roundclosefill',
+						name: '错误'
+					}, {
+						cuIcon: 'roundcheckfill',
+						name: '完成'
+					},
+					{
+						cuIcon: 'roundcheckfill',
+						name: '完成'
+					},
+					{
+						cuIcon: 'roundcheckfill',
+						name: '完成'
+					},
+				],
+				basics: 3,
+				currentTask: null, //当前选择的任务
+				taskIntoView: '',
+				taskScrollTop: 0,
+				currentTaskList: [],
+				nextTaskCanUnlock: false, //下一个关卡是否可解锁
+
+				/**
+				 * actionJump 模块对应的交互参数
+				 */
+				AJData: {
+					allCount: 0,
+					faultCount: 0,
+					perCountDown: 0,
+					gameCountDown: 0,
+					//pk部分参数
+					myScore: 0, //左边自己的分数
+					otherScore: 0, //右边好友的分数
+					myUsageTime: 0,
+					otherUsageTime: 0,
+					isLeftPlayer: true,
+					isFinish: false,
+					gameLimitTime: 0,
+					describe: '', //关卡说明
+
+				},
+				defaultAJData: null,
+				bGamePlaying:false,
+				/**
+				 * 任务参数
+				 */
+				modalHeight: 300,
+				vLog: '',
+
+				/**
+				 * 任务关卡相关
+				 */
+				tempSelectedLevel: null
+
+			};
+		},
+		onLoad() {
+			//设置self
+			_self = this;
+			// 圆形进度条样式
+			this.cWidthArcbar = uni.upx2px(415); //这里要与样式的宽高对应
+			this.cHeightArcbar = uni.upx2px(440); //这里要与样式的宽高对应
+			this.arcbarWidth = uni.upx2px(14);
+			// 体重数据样式
+			// this.cWidth = uni.upx2px(750);
+			// this.cHeight = uni.upx2px(300);
+			// #ifdef APP-PLUS || H5
+			//监听
+			uni.$on('updateArcbarData', this.updateArcbarData);
+			// #endif
+
+			//监听
+			uni.$on('callbackCloseBLE', this.callbackCloseBLE);
+			// uni.$on('callbackBLEState', this.callbackBLEState);
+
+			//获得游戏列表
+			// reqUtil
+			// 	.requestData(config.URL.GAMERECOMMENDBYPLATFORM, {
+			// 		recommendType: 2,
+			// 		endTime: config.endTime
+			// 	})
+			// 	.then(
+			// 		res => {
+			// 			// console.log('GAMERECOMMEND =====', res);
+			// 			if (res.code == 0) {
+			// 				if (res.data.gameList.length > 3) {
+			// 					this.gameList = this.gameList.concat(res.data.gameList.slice(0, 3));
+			// 				} else {
+			// 					this.gameList = this.gameList.concat(res.data.gameList);
+			// 				}
+			// 			}
+			// 		},
+			// 		e => {
+			// 			console.log(e);
+			// 		}
+			// 	);
+			//获得视频列表
+			// reqUtil
+			// 	.requestData(config.URL.GAMERECOMMENDBYPLATFORM, {
+			// 		recommendType: 1,
+			// 		endTime: config.endTime
+			// 	})
+			// 	.then(
+			// 		res => {
+			// 			if (res.code == 0) {
+			// 				if (res.data.gameList.length > 3) {
+			// 					this.videoList = this.videoList.concat(res.data.gameList.slice(0, 3));
+			// 				} else {
+			// 					this.videoList = this.videoList.concat(res.data.gameList);
+			// 				}
+			// 			}
+			// 		},
+			// 		e => {
+			// 			console.log(e);
+			// 		}
+			// 	);
+
+
+			//初始化后设置一下pickerObj
+			this.pickerObj = {
+				pickerLeftList: pickerData.getWeightList().leftList,
+				pickerRightList: pickerData.getWeightList().rightList,
+				pickerType: 'doubleItem',
+				pickerUnit: '公斤',
+				pickerTitle: '记体重',
+				defaultValue: this.weight,
+				showInput: true,
+			};
+
+
+			this.getPlanData(function() {
+				// 如果个人页面直接获取数据
+				_self.showArcbar();
+
+			});
+
+			this.personalAudioContext = uni.createInnerAudioContext();
+			this.personalAudioContext.autoplay = false;
+			this.personalAudioContext.src = this.dangdang;
+			this.personalAudioContext.volume = 1;
+
+			//获取本地记录的运动时间
+			uni.getStorage({
+				key: 'localSportTime',
+				success: function(res) {
+					// console.log("本地的时间:",res.data);
+					_self.$store.state.localSportTime = res.data;
+				}
+			});
+
+			//获取设备信息,上报服务器
+			this.gOnAddClientInfo();
+
+
+			this.registerPopupEvent();
+
+			//获取任务数据
+			this.getLevelList(() => {
+				this.switchTaskInfo();
+			});
+			//钱包信息
+			this.getUserWallets();
+
+			//测试socket
+			// console.log('test*******************************');
+			// this.$testWS.connectSocket(()=>{
+			// 	this.$testWS.sendSocketMessage('unity');
+			// });
+			//复制一个默认参数
+			this.defaultAJData = Object.assign({}, this.AJData);
+
+			//用户签到列表
+			this.getSignInList();
+
+
+			uni.$on("onLog", this.onLog);
+
+		},
+		onShow() {
+			_self.bHide = false;
+
+			if (canvaArcbar1)
+				_self.updateArcbarData();
+
+			//this.bConnection && 
+			if (this.bVerifiedConnection && this.BLEConnectDevice) {
+				this.updateBLECIndex();
+
+				// setTimeout(() => {
+				// 	/**
+				// 	 * 如果是首页连接,则检测
+				// 	 */
+				// 	if (this.bGetBondTesting) {
+				// 		this.onGetBondDevice();
+				// 		this.bGetBondTesting = false;
+				// 	}
+				// }, 5000)
+
+			}
+			//如果是测试数据
+			if (this.ConnectBindingDevice) {
+				if (this.$refs.boxingPostRef) {
+					this.$refs.boxingPostRef.onSetMode('pkMode');
+				} else {
+					setTimeout(() => {
+						this.$refs.boxingPostRef.onSetMode('pkMode');
+					}, 500)
+				}
+			}
+
+			console.log('personal show');
+
+			this.bLimitReconnection = false;
+
+			//测试环境检测,给个modal提示 active
+			// if (config.active == 'dev') {
+			// 	function thanDate(date2) {
+			// 		var oDate1 = new Date();
+			// 		console.log("检测日期", oDate1);
+			// 		var oDate2 = new Date(date2);
+			// 		if (oDate1.getTime() > oDate2.getTime()) {
+			// 			return true;
+			// 		} else {
+			// 			return false;
+			// 		}
+			// 	}
+			// 	if (thanDate('2021-05-31 13:10:36')) {
+			// 		uni.showModal({
+			// 			title: "提示",
+			// 			content: "此版本为测试版本,有需要请和开发者联系。微信 sweetdontcry"
+			// 		})
+			// 	}
+			// }
+
+			// #ifdef APP-PLUS
+			if (this.guideUnlockState.firstInstallation) {
+				// 根据onshow 去调用first显示。 由于 onShow生命周期比 onReady 快。所以此时没有 注册 onShowFirstInstallation
+				// 即 onShowFirstInstallation 是调用不到的
+				uni.$emit("onShowFirstInstallation");
+			}
+			// #endif
+		},
+		onReady() {
+			// 计算屏幕剩余高度  填补剩余高度
+			// 计算组件的高度
+			_self.scrollviewHight = this.systemInfo.windowHeight - this.navHeight - this.tabbarHeight - 16 - this
+				.systemInfo
+				.statusBarHeight;
+
+			console.log("personal onReady");
+
+			// #ifdef APP-PLUS
+			//第一步提示设置计划,之后在回调registerPopupEvent 中处理
+			//第一次安装登录。提示 计划,这里注册一次信息
+			uni.$on("onShowFirstInstallation", this.onShowFirstInstallation);
+			if (this.guideUnlockState.firstInstallation) {
+				// 如果新安装便触发一次,新手调用
+				uni.$emit("onShowFirstInstallation");
+			}
+
+			// #endif
+		},
+		onUnload() {
+			console.log("personal ********* onUnload *********");
+			uni.$off("onLog", this.onLog);
+
+			// #ifndef APP-PLUS||H5
+			//监听
+			console.log('移除监听');
+			uni.$off('updateArcbarData', this.updateArcbarData);
+			// #endif
+			//*****注释蓝牙操作******
+			uni.$off('callbackCloseBLE', this.callbackCloseBLE);
+			// uni.$off('callbackBLEState', this.callbackBLEState);
+			uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
+
+			//unload 时候清除timeout
+			this.onUnloadCreateBLEConnectionTimeout();
+
+			this.unregisterPopupEvent();
+
+			uni.$off("onShowFirstInstallation", this.onShowFirstInstallation);
+
+		},
+		onHide() {
+			_self.bHide = true;
+			console.log("personal ******* onHide *******");
+			//时间暂停 ,隐藏了 需要判断是否为空
+			if (_self.$refs.countDownObj)
+				_self.$refs.countDownObj.timePause('pause');
+			//心电图暂停
+			if (_self.$refs.electRef)
+				_self.$refs.electRef.pausedElect(true);
+
+		},
+		methods: {
+			...mapMutations(['accountLogin', 'getPlanData', 'addlocalCalorie', 'setLocalCalorie', 'setShowCalorie',
+				'syncLocalDataToServer', 'syncRequestEvent', 'setLocalSportTime',
+				'initAdapter', 'onCreateBLEConnection', 'onUnloadCreateBLEConnectionTimeout', 'onCloseBLEConnection',
+				'gOnAddClientInfo', 'onWriteBLEConnectionValue',
+				'gCreateFilterObj', 'gUpdateFilter', 'B_GetBondedDevices', 'B_OpenBLESetting', 'B_OpenRopeSkipping',
+				'B_CloseRopeSkipping',
+				'gCreateSandbagAlgorithm', 'gUpdateSandbagAlgorithm', 'gStartSimulateBLEUpdate',
+				'gStopSimulateBLEUpdate',
+				'getActionJumpTask',
+				'setActionJumpTask', 'getLevelList',
+				'getUserWallets', 'setGoldAndDiamond',
+				'onConvertDeviceData',
+				'showDrawerById', 'showPopupById', 'showGuideById',
+				'getSignInList', 'onUserSignIn',
+				'setGuideUnlockState'
+			]),
+			BasicsSteps() {
+				this.basics = this.basics == this.basicsList.length - 1 ? 0 : this.basics + 1
+			},
+			onLog(value) {
+				this.vLog = value;
+			},
+			onKeyDown(e) {
+				console.log(e);
+			},
+
+			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;
+
+				if (this.modalName == "slideUpModal") {
+					this.updateTaskScroll();
+				}
+			},
+			hideModal(e) {
+				if (this.modalName == "sportCompletion") {
+					console.log("关闭卡片");
+					this.sportData = {
+						calorie: 0,
+						hit: 0,
+						miss: 0,
+						percent: 0,
+						time: 0,
+						allData: 0,
+					}
+				} else if (this.modalName == "slideUpModal") {
+					this.tempSelectedLevel = this.currentJumpTask;
+				}
+				this.modalName = null;
+				this.$store.state.bCanvasShow = true;
+			},
+			onTestAddLocalCalorie() {
+				let _add = (10 * 1.875) / (4 * 30);
+				console.log(_add);
+				this.onUpdateCaloriePlane(10);
+			},
+			/**
+			 * 首页圆形表部分时间计时器
+			 */
+			arcbarCountDownTimeUp() {
+				//todo,涉及到倒计时的关卡。时间到。游戏结束
+				if (1 === this.currentModeIndex) {
+					if (this.currentMode == "pkMode") {
+						this.$refs.actionJumpRef.onPKModeGameOver("timeUp");
+					} else {
+						uni.showToast({
+							title: '时间到,游戏结束。',
+							icon: 'none',
+							duration: 2000,
+							mask: true
+						})
+						this.$refs.actionJumpRef.onGameOver("timeUp");
+					}
+
+				}
+
+			},
+			arcbarCountDownTimeUpdate(data) {
+				this.AJData.gameCountDown = data.curSeconds;
+				this.updateArcbarDataFromActionJump();
+				this.onActionJumpCountDownUpdate();
+			},
+			arcbarCountDownTimeReset() {
+				//清除时间计时器
+				this.$refs.arcbarCountDownRef.timePause();
+			},
+			arcbarCountDownPlay(bResetTime) {
+				if (bResetTime) {
+					this.$refs.arcbarCountDownRef.startData();
+				}
+				this.$refs.arcbarCountDownRef.timePlay();
+			},
+			// 进度条数据
+			arcbarData(_planData) {
+				let showCal = 0,
+					showLCal = 0,
+					LCalTip = '',
+					showTip = '';
+				let series = [{
+					name: showTip,
+					data: 0,
+					color: '#2fc25b'
+				}];
+				//这里区分进度条数据
+				if (0 == this.currentModeIndex) {
+					showCal = _planData.calorie;
+					showLCal = _planData.allCalorie;
+					LCalTip = '大卡';
+					showTip = '(未达标)';
+
+					// 如果运动的卡路里大于目标卡路里,设置为目标卡路里值,即为Max
+					if (showLCal >= showCal) {
+						showTip = '(达标)';
+					}
+
+					series = [{
+						name: showTip,
+						data: _planData.allCalorie == 0 ? 0 : _planData.allCalorie / showCal,
+						color: '#2fc25b'
+					}];
+				} else if (1 == this.currentModeIndex) {
+					showCal = _planData.calorie;
+					showLCal = _planData.allCalorie;
+					LCalTip = '大卡';
+					showTip = '(未达标)';
+
+					// 如果运动的卡路里大于目标卡路里,设置为目标卡路里值,即为Max
+					if (showLCal >= showCal) {
+						showTip = '(达标)';
+					}
+
+					series = [{
+						name: showTip,
+						data: this.AJData.gameCountDown == 0 ? 0 : this.AJData.gameCountDown / this.AJData
+							.gameLimitTime,
+						color: '#2fc25b'
+					}];
+
+					// console.log(series);
+				}
+
+				return {
+					showCal,
+					showLCal,
+					LCalTip,
+					showTip,
+					series
+				}
+
+			},
+			// 圆形进度条
+			showArcbar() {
+				let {
+					showCal,
+					showLCal,
+					LCalTip,
+					series
+				} = this.arcbarData(_self.planData);
+				// console.log("series==", series[0]);
+				canvaArcbar1 = new uCharts({
+					$this: _self,
+					canvasId: 'canvasArcbar',
+					type: 'myGradualChangeArcbar',
+					fontSize: 11,
+					legend: {
+						show: false
+					},
+					background: '#FFFFFF',
+					pixelRatio: 1,
+					series: series,
+					animation: false,
+					width: _self.cWidthArcbar,
+					height: _self.cHeightArcbar,
+					dataLabel: true,
+					//  Math.round(chartData.series[0].data * 100) + '%'
+					// title: {
+					// 	// arcbarDate: date.formatDate(_self.originalDate),
+					// 	name: showLCal,
+					// 	molecularUnit: LCalTip, //单位的分子部分
+					// 	denominatorUnit: showCal, //单位的分母部分
+					// 	unitFontSize: 11, //单位字符大小
+					// 	color: 'rgba(255, 255, 255, 1)',
+					// 	fontSize: 28,
+					// 	offsetX: -30,
+					// 	offsetY: 10
+					// },
+					// subtitle: {
+					// 	name: series[0].name,
+					// 	color: 'rgba(255, 255, 255, 1)',
+					// 	fontSize: 13,
+					// 	offsetY: -75
+					// },
+					extra: {
+						arcbar: {
+							type: 'default',
+							backgroundColor: 'rgba(234, 234, 255, 1)',
+							backgroundEndColor: 'rgba(234, 234, 255, 1)',
+							backgroundMiddle: '#9291FF', //'rgba(158, 158, 255, 1)',
+							width: _self.arcbarWidth, //圆弧的宽度
+							lineColor: '#51EDFE',
+							lineEndColor: '#F7C75D'
+						}
+					}
+				});
+
+				// 更新位置同步
+				this.syncLocalDataToServer((res) => {
+					this.originalDate = res.newDate;
+					this.currentDate = date.formatTime(res.newDate);
+					this.updateArcbarData();
+				});
+			},
+			updateArcbarData(data) {
+				// if (data == "plan") {
+				// 	// 加入设置的卡路里小于本地,则更新本地最小值
+				// 	_self.addlocalCalorie(0);
+				// 	console.log("**************updateArcbarData");
+				// 	// 如果是计划设置好后
+				// 	// this.$store.state.bPlanFinish = true;
+				// 	// setTimeout(() => {
+				// 	// 	this.$store.state.bPlanFinish = false;
+				// 	// }, 10000)
+				// }
+				// console.log("updateArcbarData:",this.planData);
+				let {
+					showCal,
+					showLCal,
+					LCalTip,
+					series
+				} = _self.arcbarData(_self.planData);
+
+				if (showCal == _self.oldArcbarProCalorie && showLCal == _self.oldArcbarAllCalorie) {
+					// console.log("没有改变值,不刷新表盘:", showCal, _self.oldArcbarProCalorie, showLCal, _self.oldArcbarAllCalorie);
+					return;
+				}
+				//这个是显示当前的总卡路里
+				_self.$store.state.oldArcbarAllCalorie = showLCal;
+				//这个是计划的卡路里
+				_self.$store.state.oldArcbarProCalorie = showCal;
+
+				canvaArcbar1.updateData({
+					series: series,
+					// title: {
+					// 	//这里的文案是自定义的,不写是不变的
+					// 	name: showLCal,
+					// 	molecularUnit: LCalTip, //单位的分子部分
+					// 	denominatorUnit: showCal, //单位的分母部分
+					// }
+					//,
+					// subtitle: {
+					// 	//这里的文案是自定义的,不写是不变的
+					// 	name: series[0].name
+					// }
+				});
+			},
+			updateArcbarDataFromActionJump(data) {
+				let {
+					showCal,
+					showLCal,
+					LCalTip,
+					series
+				} = _self.arcbarData(_self.planData);
+
+				canvaArcbar1.updateData({
+					series: series
+				});
+			},
+			//没有限制下的更新表盘
+			updateNoLimit() {
+				let {
+					showCal,
+					showLCal,
+					LCalTip,
+					series
+				} = _self.arcbarData(_self.planData);
+
+				//这个是显示当前的总卡路里
+				_self.$store.state.oldArcbarAllCalorie = showLCal;
+				//这个是计划的卡路里
+				_self.$store.state.oldArcbarProCalorie = showCal;
+
+				canvaArcbar1.updateData({
+					series: series,
+					// title: {
+					// 	//这里的文案是自定义的,不写是不变的
+					// 	name: showLCal,
+					// 	molecularUnit: LCalTip, //单位的分子部分
+					// 	denominatorUnit: showCal, //单位的分母部分
+					// }
+					// ,
+					// subtitle: {
+					// 	//这里的文案是自定义的,不写是不变的
+					// 	name: series[0].name
+					// }
+				});
+			},
+			// 跳转计划页面
+			openPlan(e) {
+				// console.log(e);
+				uni.navigateTo({
+					url: '../plan/plan?newsid=' + 11,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+
+			// 跳转转换页面
+			onNavConver() {
+				uni.reLaunch({
+					url: '../../conversion-page/conversion/conversion',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			// 跳转我的页面
+			onNavMyPage() {
+				uni.navigateTo({
+					url: '../../my-page/homepage/homepage',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+
+			updateBLECIndex() {
+				for (let i = 0; i < this.BLEDeviceShowList.length; i++) {
+					let eq = this.BLEDeviceShowList[i];
+					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("rope") > -1 && this.BLEConnectDevice.id == 3)) {
+
+						eq.bRatio = true;
+						this.$store.state.cIndex = i;
+
+					}
+
+					if (eq.ename.indexOf("hotman") > -1 && this.BLEConnectDevice.id == 1) {
+						if (this.$refs.boxingPostRef) {
+							this.$refs.boxingPostRef.onSetMode('pkMode');
+						} else {
+							setTimeout(() => {
+								this.$refs.boxingPostRef.onSetMode('pkMode');
+							}, 500)
+						}
+
+					} else if (eq.ename.indexOf("BLEHandle") > -1 && this.BLEConnectDevice.id == 2) {
+						if (this.$refs.boxingPostRef) {
+							this.$refs.boxingPostRef.onSetMode('calorieMode');
+						} else {
+							setTimeout(() => {
+								this.$refs.boxingPostRef.onSetMode('calorieMode');
+							}, 500)
+						}
+					} else if (eq.ename.indexOf("rope") > -1 && this.BLEConnectDevice.id == 3) {
+						//todo 暂时设置兼容跑步模式
+						// if (this.$refs.boxingPostRef) {
+						// 	this.$refs.boxingPostRef.onSetMode('ropeMode');
+						// } else {
+						// 	setTimeout(() => {
+						// 		this.$refs.boxingPostRef.onSetMode('ropeMode');
+						// 	}, 500)
+						// }
+					}
+				}
+			},
+
+			/**
+			 * 蓝牙断开连接时候
+			 */
+			callbackCloseBLE() {
+				if (0 == this.currentModeIndex) {
+					//蓝牙断开连接后,直接关闭
+					this.$refs.boxingPostRef.onCloseDevices();
+				}
+			},
+			//蓝牙状态回调
+			callbackBLEState(res) {
+				console.log("callbackBLEState==", res);
+				if (this.cState != res.state) this.cState = res.state;
+			},
+			//设备回调事件
+			callbackUpdateBLEData(data) {
+				//如果在监听状态时候隐藏页面,返回
+				if (_self.bHide) return;
+				// console.log("callbackDeviceState==", data);
+
+				if (this.ConnectBindingDevice) {
+					this.gUpdateSandbagAlgorithm({
+						data: data,
+						callback: (res) => {
+							if (res.type == 'hit') {
+								this.$refs.boxingPostRef.onBLEHotmanUpdate(res);
+							}
+						}
+					});
+					return;
+				}
+
+				//连接了手柄模式
+				//没有开启指令不刷新
+				if (!this.instructionState.bOpen) return;
+
+				if (this.BLEConnectDevice.usageMode == "hotman") {
+					this.gUpdateFilter({
+						data: data,
+						callback: (res) => {
+							if (res.type == 'hit') {
+								this.$refs.boxingPostRef.onBLEHotmanUpdate(res);
+							}
+						}
+					});
+				} else if (this.BLEConnectDevice.usageMode == "general") {
+					//这个是普通打击模式
+					this.$refs.boxingPostRef.onBLEHandleUpdate(data);
+				} else if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
+
+					this.onConvertDeviceData({
+						data: data,
+						callback: (outData) => {
+							// this.outBLEData = {
+							// 	acc: outData.convertAcc,
+							// 	gyro: outData.convertGyro
+							// }
+							// console.log(JSON.stringify(outData),JSON.stringify(data));
+							data.acc = outData.convertAcc;
+							data.gyro = outData.convertGyro;
+							//跳绳蓝牙反馈
+							this.$refs.actionJumpRef.onBLERopeUpdate(data);
+
+						}
+					});
+
+				}
+
+
+			},
+			//绑定设备函数
+			onBindingDevice(item, index) {
+				if (item == null) {
+					item = this.DeviceBindingList[0];
+				}
+				if (this.BLEConnectDevice) {
+					uni.showToast({
+						icon: "none",
+						title: "已连接硬件设备",
+						duration: 1000
+					})
+					return;
+				}
+
+				if (this.ConnectBindingDevice) {
+					this.$store.state.ConnectBindingDevice = null;
+					setTimeout(() => {
+						uni.showToast({
+							icon: "none",
+							title: "断开连接",
+							duration: 1000
+						})
+					}, 300)
+				} else {
+					this.$store.state.ConnectBindingDevice = item;
+					setTimeout(() => {
+						uni.showToast({
+							icon: "none",
+							title: "已连接",
+							duration: 1000
+						})
+					}, 300)
+					//连接后保存最近连接的设备
+				}
+
+				//刷新状态
+				this.$refs.boxingPostRef.onSetMode('pkMode');
+
+			},
+			//关闭设备函数
+			onCloseBindingDevice(item, e) {
+				if (e.currentTarget.dataset.index == this.cIndex) {
+					uni.showModal({
+						title: '设备状态',
+						content: '是否断开连接',
+						ConfirmColor: '#A488DC',
+						success: res => {
+							if (res.confirm) {
+								this.$store.state.cIndex = -1;
+								this.$store.state.ConnectBindingDevice = null;
+							}
+						}
+					});
+				}
+			},
+			onNavBindingDevice() {
+				this.toView = "addDeviceView";
+			},
+			onDevice(item, e) {
+				if (this.ConnectBindingDevice) {
+					uni.showToast({
+						title: '当前已开启数据',
+						icon: 'none',
+						mask: true
+					})
+					return;
+				}
+				if (this.cIndex !== -1) {
+					uni.showToast({
+						title: '当前已连接设备',
+						icon: 'none',
+						mask: true
+					})
+					return;
+				}
+				//连接蓝牙
+				this.onCreateBLEConnection({
+					item: item,
+					index: e.currentTarget.dataset.index,
+					initItem: true,
+					getinitAdapter: () => {
+						this.onDevice(item, e);
+					},
+					getSuccess: () => {
+						if (this.bHide) {
+							//弹出框时候,是隐藏状态
+							this.bGetBondTesting = true;
+						} else {
+							//没有弹出框时候,直接检测
+							// setTimeout(() => {
+							// 	this.onGetBondDevice();
+							// }, 5000)
+						}
+
+						//刷新状态
+						if (this.cIndex != -1) {
+							let eq = this.BLEDeviceShowList[this.cIndex];
+							// console.log(eq,this.BLEConnectDevice);
+							if (eq.ename.indexOf("hotman") > -1 && this.BLEConnectDevice.id == 1) {
+								this.$refs.boxingPostRef.onSetMode('pkMode');
+							} else if (eq.ename.indexOf("BLEHandle") > -1 && this.BLEConnectDevice.id == 2) {
+								this.$refs.boxingPostRef.onSetMode('calorieMode');
+							} else if (eq.ename.indexOf("rope") > -1 && this.BLEConnectDevice.id == 3) {
+								// this.$refs.boxingPostRef.onSetMode('ropeMode');
+							}
+						}
+					}
+				});
+			},
+			/**
+			 * 检测获取匹配的设备
+			 */
+			onGetBondDevice() {
+				/**
+				 * 假如手机没有匹配,断开连接
+				 */
+				console.log("****", this.BLEConnectDevice);
+				if (!this.BLEConnectDevice) return;
+
+				this.B_GetBondedDevices({
+					deviceId: this.BLEConnectDevice.deviceId,
+					success: (bondedDevice) => {
+						// console.error("===========", bondedDevice);
+						// uni.hideToast();
+						if (bondedDevice == null) {
+							// if (plus.os.name == 'Android') 
+							{
+								//此问题 华为手机容易出现
+								//android手机已配对的设备 不存在,但是app 又直接连接成功了。提示,并且断开app连接
+								//1.关闭当前连接
+								this.onCloseBLEConnection({
+									getSuccess: () => {}
+								});
+								uni.hideToast();
+								//2.跳转蓝牙设置
+								uni.showModal({
+									title: '蓝牙配对失败',
+									content: '请跳转后点击配对BGBox_2020,成功后手动跳转回哔蹦重新连接。',
+									success: (res) => {
+										if (res.confirm) {
+											this.B_OpenBLESetting();
+										}
+									}
+								})
+							}
+						}
+					}
+				});
+
+			},
+
+			openDeviceList(e) {
+
+				if (this.ConnectBindingDevice) {
+					uni.showToast({
+						title: '当前已开启数据',
+						icon: 'none',
+						mask: true
+					})
+					return;
+				}
+
+				//先判断蓝牙是否初始化
+				/**
+				 * 蓝牙部分操作,转全局变量操作
+				 * */
+				console.log("openDeviceList bOpenBluetooth", this.bOpenBluetooth);
+				// #ifdef APP-PLUS
+				if (!this.bOpenBluetooth) {
+
+					this.initAdapter(() => {
+						uni.navigateTo({
+							// url: '../devices-category/devices-category',
+							url: '../devices-hardware/devices-hardware',
+							success: res => {
+								this.bLimitReconnection = true;
+							},
+							fail: () => {},
+							complete: () => {}
+						});
+					});
+
+					return;
+				}
+				// #endif
+				uni.navigateTo({
+					url: '../devices-hardware/devices-hardware',
+					success: res => {
+						this.bLimitReconnection = true;
+					},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			onNavToMore() {
+				uni.navigateTo({
+					url: '../more/more?index=' + this.cIndex,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			onAddDevice() {
+				let deviceItem = {
+					name: '蹦床',
+					icon: '/static/trampoline.png'
+				};
+				if (this.deviceList.length != 0) {
+					this.deviceList = this.deviceList.concat(deviceItem);
+				} else {
+					this.deviceList = deviceItem;
+				}
+			},
+			onCloseDevice(item, e) {
+				//如果不是连接状态,则删除
+				if (e.currentTarget.dataset.index != this.cIndex) {
+					if (this.cIndex != -1) {
+						uni.showToast({
+							icon: 'none',
+							title: "请先断开已连接设备",
+							duration: 2000,
+							mask: true
+						})
+						return;
+					}
+					uni.showModal({
+						title: '设备状态',
+						content: '是否删除设备?',
+						ConfirmColor: '#A488DC',
+						success: res => {
+							if (res.confirm) {
+								this.$store.commit('deleteBLEDevice', e.currentTarget.dataset.index);
+							}
+						}
+					});
+					return;
+				}
+				uni.showModal({
+					title: '设备状态',
+					content: '是否断开连接?',
+					/**
+					 * 如果需要强制,不显示取消按钮
+					 */
+					showCancel: true,
+					ConfirmColor: '#A488DC',
+					success: res => {
+						if (res.confirm) {
+							this.onCloseBLEConnection({
+								getSuccess: () => {}
+							});
+
+						}
+					}
+				});
+			},
+
+			onNavDetail(item) {
+				console.log(item);
+				let temItem = encodeURIComponent(JSON.stringify(item));
+				// return;
+				uni.navigateTo({
+					url: '../../game-page/game-detail/game-detail?item=' + temItem
+				});
+			},
+			onNavToGameMore(e) {
+
+				uni.reLaunch({
+					url: '../../game-page/game/game?type=' + e.currentTarget.dataset.type
+				});
+			},
+
+			//判断是否有其他限制
+			onStartCheck(data) {
+				//#ifdef H5
+				// 直接走测试,如果是h5 APP-PLUS
+				if (0 === this.currentModeIndex) {
+					this.onBoxingGuideFinish();
+				} else if (1 === this.currentModeIndex) {
+					if (this.currentJumpTask == null) {
+						uni.showToast({
+							title: '先选一个挑战关卡',
+							icon: 'none',
+							duration: 2000,
+						})
+						return;
+					}
+					if (this.currentMode == 'pkMode' && this.finallySelectFriendInfo == null) {
+						uni.showToast({
+							title: '选择一个pk好友',
+							icon: 'none',
+							duration: 2000,
+						})
+						return;
+					}
+
+					//调用开始
+					this.onActionJumpPlay();
+				}
+
+				return;
+				//#endif
+				//分类型判断
+				if (0 === this.currentModeIndex) {
+					//拳击运动类型
+					// 1.检测是否有对应设备,没有ConnectBindingDevice,再进行下一步
+					if (this.ConnectBindingDevice == null) {
+						uni.showToast({
+							title: '开启连接数据',
+							icon: 'none'
+						})
+						this.toView = "openAccGyroView";
+						return;
+
+					}
+					// TODO,目前去掉蓝牙设备
+					// //2.检测是否有设备
+					// if (this.BLEDeviceShowList.length == 0) {
+					// 	this.$store.state.bGuidePages = true;
+					// 	this.guideCurrent = 3;
+					// 	uni.showToast({
+					// 		title: '请添加蓝牙设备',
+					// 		icon: 'none'
+					// 	})
+					// 	this.toView = "addDeviceView";
+					// 	return;
+					// }
+					// //2.检测是否连接设备 || this.BLEConnectDevice.ename !== 'BT04'
+					// if (this.cIndex == -1) {
+					// 	//没有连接设备,提示去连接设备
+					// 	uni.showToast({
+					// 		title: '请连接蓝牙设备',
+					// 		icon: 'none'
+					// 	})
+					// 	this.toView = "addDeviceView";
+					// 	return;
+					// }
+
+				} else if (1 === this.currentModeIndex) {
+
+					//2.检测是否连接设备 || this.BLEConnectDevice.ename !== 'BT04'
+					if (this.cIndex == -1) {
+						//没有连接设备,提示去连接设备
+						// uni.showToast({
+						// 	title: '请连接蓝牙设备',
+						// 	icon: 'none'
+						// })
+						this.onGetBluetoothConnectView({
+							hiddenType: 'none'
+						});
+						// this.toView = "addDeviceView";
+						return;
+					}
+				}
+
+
+				//3.检测一下计划日期
+				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";
+					// // #ifdef APP-PLUS
+					// this.showGuide('plan', null)
+					// // #endif
+
+					return;
+				}
+
+				if (0 === this.currentModeIndex) {
+
+					//如果新手,调用新手教程
+					console.log("this.bNewGuide:", this.bNewGuide);
+					if (this.bNewGuide) {
+						// 拳击的新手提示
+						this.$store.state.bGuidePages = true;
+						this.guideCurrent = 5;
+						this.toView = "boxingHitID";
+						this.$store.state.bNewGuide = false;
+					} else {
+						if (this.ConnectBindingDevice) {
+							//假如有连接bingding设备
+							this.gCreateSandbagAlgorithm();
+							this.gStartSimulateBLEUpdate();
+						} else {
+							//todo 跳绳模式 发送开启指令
+							if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
+								//打开跳绳模式
+								this.B_OpenRopeSkipping();
+							} else {
+								//初始化filter快速打击对象
+								if (this.BLEConnectDevice.usageMode == "hotman") {
+									this.gCreateFilterObj();
+								}
+								//打开加速计
+								this.onWriteBLEConnectionValue({
+									value: "3"
+								});
+
+								// setTimeout(() => {
+								// 	//设置加速计b:20ms a:10ms
+								// 	this.onWriteBLEConnectionValue({
+								// 		value: config.refreshRate
+								// 	});
+
+								// }, 1000)
+							}
+
+						}
+						//监听蓝牙回调
+						uni.$on('updateBLEDeviceData', this.callbackUpdateBLEData);
+						this.onBoxingGuideFinish();
+					}
+
+				} else if (1 == this.currentModeIndex) {
+					if (data) {
+						let {
+							bStartCountDown
+						} = data;
+						this.bStartCountDown = bStartCountDown;
+					}
+					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() {
+				this.$store.state.bGuidePages = true;
+				this.guideCurrent = 5;
+				this.toView = "boxingHitID";
+				this.$store.state.bNewGuide = false;
+			},
+			//检测是否符合要求,没有的话进行新手提示
+			onPersonalCheck(data) {
+				// #ifdef APP-PLUS
+				if (1 === this.currentModeIndex) {
+					if (this.currentJumpTask == null) {
+						console.log("**************11");
+						this.onTipLevel({hiddenType: 'normal'});
+						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',
+							duration: 2000,
+						})
+						return;
+					}
+
+					let _item = this.currentJumpTask.item;
+					//第一次选择关卡时候判断
+					if (this.guideUnlockState.firstUnlockJumpUp && _item.id == 1) {
+						this.showGuide('level-game-tip', {
+							levelType: 'midJump',
+							hiddenType: 'firstUnlockJumpUp'
+						})
+						let guideUnlockState = Object.assign(this.guideUnlockState, {
+							firstUnlockJumpUp: false
+						});
+						this.setGuideUnlockState(guideUnlockState);
+						return;
+					} else if (this.guideUnlockState.firstUnlockLeftAndRightJump && _item.id == 6) {
+						this.showGuide('level-game-tip', {
+							levelType: 'directionJump',
+							hiddenType: 'firstUnlockLeftAndRightJump'
+						})
+						let guideUnlockState = Object.assign(this.guideUnlockState, {
+							firstUnlockLeftAndRightJump: false
+						});
+						this.setGuideUnlockState(guideUnlockState);
+						return;
+					} else if (this.guideUnlockState.firstUnlockLeftAndRightRotationJump && _item.id == 9) {
+						this.showGuide('level-game-tip', {
+							levelType: 'rotationJump',
+							hiddenType: 'firstUnlockLeftAndRightRotationJump'
+						})
+						let guideUnlockState = Object.assign(this.guideUnlockState, {
+							firstUnlockLeftAndRightRotationJump: false
+						});
+						this.setGuideUnlockState(guideUnlockState);
+						return;
+					}
+				}
+				// #endif
+
+
+				this.onStartCheck(data);
+			},
+			//
+			onBoxingGuideFinish() {
+
+				if (this.b_countDown) {
+					clearInterval(this.b_countDown);
+					this.b_countDown = null;
+				}
+
+				//|| this.currentMode == 'ropeMode'
+				if (this.currentMode == 'calorieMode') {
+					this.personalAudioContext.stop();
+					this.personalAudioContext.play();
+
+					setTimeout(() => {
+						this.$refs.boxingPostRef.onBoxingPostPlay(true);
+					}, 600);
+				} else {
+					this.BoxingPostCountDownText = 3;
+					this.$refs.boxingPostRef.onSetRingAnimation(true);
+					uni.showToast({
+						title: '匹配中...',
+						mask: true,
+						icon: 'loading',
+						duration: 2000
+					})
+
+					setTimeout(() => {
+						//ai信息
+						this.onGetAiRandom();
+
+						// 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();
+						// 			this.$refs.boxingPostRef.onBoxingPostPlay(true);
+						// 			this.$refs.boxingPostRef.onSetRingAnimation(false);
+						// 			uni.hideToast();
+						// 		}, 800)
+						// 	}
+						// 	this.BoxingPostCountDownText--;
+						// }, 1000)
+						setTimeout(() => {
+							this.personalAudioContext.stop();
+							this.personalAudioContext.play();
+							this.$refs.boxingPostRef.onBoxingPostPlay(true);
+							this.$refs.boxingPostRef.onSetRingAnimation(false);
+							uni.hideToast();
+						}, 800)
+					}, 2000);
+
+				}
+
+
+			},
+			//运动时间
+			onUpdateSportTime(res) {
+				// console.log("同步的运动时间",res);
+				this.setLocalSportTime(res);
+			},
+
+			//更新运动数据
+			onUpdateCaloriePlane(data) {
+
+				// 记录卡路里到本地
+				this.addlocalCalorie(data);
+
+				this.updateArcbarData();
+			},
+
+			onRoundTrigger(data) {
+				// console.log("onRoundTrigger==", data);
+				// return;
+				let url = '';
+				switch (data.item.type) {
+					case "personal":
+						//个人中心页面
+						url = '../../personal-page/personal/personal';
+						break;
+					case "game":
+						url = '../../game-page/game/game';
+						break;
+					default:
+						url = '../../personal-page/personal/personal';
+						break;
+				}
+				uni.reLaunch({
+					url: url,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+
+			/**
+			 * 同步本地数据到服务器
+			 */
+			onSyncData() {
+				this.syncRequestEvent({
+					success: () => {
+						this.updateArcbarData();
+					}
+				});
+				// 更新显示日期
+				this.originalDate = new Date();
+				this.currentDate = date.formatTime(this.originalDate);
+			},
+			hidePlanTipModal() {
+				this.modalName = null;
+				if (this.planTipIndex === 1) {
+					// 您今天的目标还没完成  是否结束训练
+					this.onActionPause(false);
+				}
+			},
+			confirmPlanTipModal() {
+				this.modalName = null;
+				if (this.planTipIndex === 0) {
+					this.onStartCheck()
+				} else if (this.planTipIndex === 1) {
+					// 您今天的目标还没完成  是否结束训练
+					this.onActionPause(true);
+				}
+			},
+			//断开连接时候,关闭
+			onCloseBoxingHit() {
+				console.log('关闭训练');
+				if (this.currentMode == 'pkMode') {
+					this.$refs.hitEffectRef.onStop();
+				}
+				this.onActionPause(true);
+			},
+			//点击暂停时候,判断一下是否完成目标
+			onActionControlPlay(bPlay) {
+				if (!bPlay) {
+					//跳模块的情况下,暂停计时器
+					if (1 == this.currentModeIndex)
+						this.arcbarCountDownTimeReset();
+
+					if (this.planData.allCalorie < this.planData.calorie) {
+						this.modalName = 'showPlanTipModal';
+						this.planTipIndex = 1;
+					} else {
+						//假如完成了目标,更新卡路里
+						this.onActionPause(true);
+					}
+				}
+			},
+			/**
+			 * 切换体验模式
+			 * @param {Object} data
+			 */
+			onModeEvent(data) {
+				console.log("当前模式:", data);
+				this.currentMode = data.mode;
+				this.title = data.name;
+				// || this.currentMode == 'ropeMode'
+				if (this.currentMode == 'calorieMode') {
+					setTimeout(() => {
+						this.updateNoLimit();
+					}, 0)
+
+				}
+			},
+			onAiHitEvent(bloodPoint) {
+
+				// this.onPlay({
+				// 	bloodPoint: num,
+				// 	createType: 'red',
+				// 	callback: (res) => {
+				// 		console.log("红色拳头击中对方:", res);
+				// 	}
+				// });
+				this.$refs.hitFistRef.onPlay({
+					bloodPoint: bloodPoint,
+					createType: 'red',
+					callback: () => {
+						if (this.bAiHitShake) return;
+						this.bAiHitShake = true;
+						this.$refs.aiHitEffectRef.onPlay();
+						this.$refs.aiHitEffectRef.onAIHit();
+						setTimeout(() => {
+							this.bAiHitShake = false;
+						}, 500)
+					}
+				});
+
+
+			},
+			//打击时候头像修改
+			onHitEvent(bloodPoint) {
+				// console.log("this.bHitShake:",this.bHitShake);
+
+				this.$refs.hitFistRef.onPlay({
+						bloodPoint: bloodPoint,
+						createType: 'blue',
+						callback: () => {
+							if (this.bHitShake) return;
+							this.bHitShake = true;
+							this.$refs.hitEffectRef.onPlay();
+							this.$refs.hitEffectRef.onMyHit();
+							setTimeout(() => {
+								this.bHitShake = false;
+							}, 500)
+						}
+					}
+
+				);
+			},
+
+			//弹出目标提示后,进行下一步
+			onActionPause(bFinish) {
+				if (bFinish) {
+					if (this.ConnectBindingDevice) {
+						this.gStopSimulateBLEUpdate();
+						uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
+					} else {
+						// if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
+						// 	this.B_CloseRopeSkipping();
+						// } else {
+						// }
+						if (0 === this.currentModeIndex) {
+							this.$refs.boxingPostRef.onBoxingPostStop();
+							//停止时候,重置ai信息
+							this.aiObj.name = this.aiOldObj.name;
+							this.aiObj.avatar = this.aiOldObj.avatar;
+						} else if (1 === this.currentModeIndex) {
+							//todo actionJump
+							if (this.currentMode == "calorieMode") {
+								this.$refs.actionJumpRef.onGameOver("none");
+							} else {
+								this.$refs.actionJumpRef.onPKModeGameOver("none");
+							}
+						}
+					}
+					if (1 === this.currentModeIndex) {
+						if (this.currentMode == "calorieMode") {
+							this.syncRequestEvent({
+								success: () => {
+									this.updateArcbarData();
+								}
+							});
+						}
+					} else {
+						this.syncRequestEvent({
+							success: () => {
+								this.updateArcbarData();
+							}
+						});
+					}
+
+				} else {
+					//如果不是,继续调用播放
+					if (0 === this.currentModeIndex) {
+						this.$refs.boxingPostRef.onBoxingPostPlay(true);
+					} else if (1 === this.currentModeIndex) {
+						//actionJump
+						this.$refs.actionJumpRef.onContinueGame();
+						if (0 !== this.currentJumpTask.item.limitTime) {
+							//0默认不限时,所以限时的才走计时间
+							this.arcbarCountDownPlay(false);
+						}
+					}
+				}
+			},
+
+			/**
+			 * 新手任务引导
+			 */
+			onGuideChange(e) {
+				let tempCurrent = e.detail.current;
+				if (tempCurrent == 1) {
+					_self.toView = "addDeviceView";
+				} else if (tempCurrent == 0) {
+					_self.toView = "projectButtonView";
+				}
+
+			},
+
+			guideHide(e) {
+				this.$store.state.bGuidePages = false;
+				if (e.current == 0 && !e.onlyHide) {
+					//跳转计划页面
+					this.openPlan();
+				} else if (e.current == 1 && !e.onlyHide) {
+					console.log('guideHide:', e.current);
+					//跳转搜索设备页面
+					// this.openDeviceList();
+				} else if (e.current == 3 && !e.onlyHide) {
+					//新手引导跳转扫码页面,直接走绑定 再check
+					// this.openQRCode((res) => {
+					// 	setTimeout(() => {
+					// 		this.onPersonalCheck();
+					// 	}, 200);
+					// });
+					// 跳转连接蓝牙页面
+					this.openDeviceList();
+				} else if (e.current == 4 && !e.onlyHide) {
+					//连接绑定设备
+					// this.openQRCode();
+					console.log(e);
+					let _index = Number(e.device.dataset.index);
+					this.onBindingDevice(this.DeviceBindingList[_index], _index);
+
+					//连接设备后,再
+					setTimeout(() => {
+						this.onPersonalCheck();
+					}, 200);
+				} else if (e.current == 5 && !e.onlyHide) {
+					console.log("==:", e);
+					//todo 跳绳模式 新手引导
+					if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
+						this.B_OpenRopeSkipping();
+					} else {
+						//初始化filter快速打击对象
+						if (this.BLEConnectDevice.usageMode == "hotman") {
+							this.gCreateFilterObj();
+						}
+						//打开加速计
+						this.onWriteBLEConnectionValue({
+							value: "3"
+						});
+
+						// setTimeout(() => {
+						// 	//设置加速计b:20ms a:10ms
+						// 	this.onWriteBLEConnectionValue({
+						// 		value: config.refreshRate
+						// 	});
+
+						// }, 1000)
+					}
+
+					//监听蓝牙回调
+					uni.$on('updateBLEDeviceData', this.callbackUpdateBLEData);
+					this.onBoxingGuideFinish();
+				}
+			},
+
+			mainScroll(e) {
+				if (_self.toView == "addDeviceView") {
+					_self.toView = "";
+					if (!_self.bGuidePages) return;
+					let view = uni.createSelectorQuery().select('#addDeviceView');
+					view.boundingClientRect(data => {
+						_self.$refs.codeElfGuide.setDeviceObj(data);
+					}).exec();
+				} else if (_self.toView == "projectButtonView") {
+					_self.toView = "";
+					if (!_self.bGuidePages) return;
+					_self.onGetProjectView();
+				} else if (_self.toView == "QRDeviceView") {
+					_self.toView = "";
+					if (!_self.bGuidePages) return;
+					let view = uni.createSelectorQuery().select('#QRDeviceView');
+					view.boundingClientRect(data => {
+						_self.$refs.codeElfGuide.setDeviceObj(data);
+					}).exec();
+				} else if (_self.toView == "bing-boxingPost") {
+					_self.toView = "";
+					if (!_self.bGuidePages) return;
+					let view = uni.createSelectorQuery().select('#bing-boxingPost');
+					view.boundingClientRect(data => {
+						_self.$refs.codeElfGuide.setDeviceObj(data);
+
+						console.log(data);
+					}).exec();
+				} else if (_self.toView == "boxingHitID") {
+					_self.toView = "";
+
+					// let view = uni.createSelectorQuery().select('#boxingHitID');
+					// view.boundingClientRect(data => {
+					// 	_self.$refs.codeElfGuide.setModalObj(data);
+
+					// 	console.log(data);
+					// }).exec();
+				} else if (_self.toView == "openAccGyroView") {
+					_self.toView = "";
+				}
+			},
+
+			onGetProjectView() {
+				let view = uni.createSelectorQuery().select('#projectButtonView');
+				view.boundingClientRect(data => {
+					_self.$refs.codeElfGuide.setProjectObj(data);
+				}).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(initData) {
+
+				_self.$refs.roundFabRef.onGetRoundFabView((data) => {
+					console.log(JSON.stringify(data), initData.firstInstallation);
+					// #ifdef APP-PLUS
+					let temp = Object.assign({}, data, initData);
+					console.log('当前的temp:', temp);
+					_self.showGuide('bluetoothConnect', temp);
+					// #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') {
+					//这里调用一下设置可以播放音效
+					this.$refs.personalFruitRef.onCanPlay();
+				}
+
+				this.onUpdateCaloriePlane(calorie);
+
+
+			},
+			//扫码添加设备
+			openQRCode(callback) {
+				let that = this;
+				// 允许从相机和相册扫码
+				uni.scanCode({
+					success: function(res) {
+						// console.log('条码类型:' + res.scanType);
+						// console.log('条码内容:' + res.result);
+						let obj = JSON.parse(res.result)
+						let data = {
+							type: obj.type,
+							uuid: obj.uuid,
+						}
+					}
+				});
+			},
+
+			//屏幕抖动
+			onScreenShake() {
+				this.bEFHitShake = true;
+				setTimeout(() => {
+					this.bEFHitShake = false;
+				}, 500)
+			},
+
+			onGetAiRandom() {
+				let _self = this;
+
+				let avatarlist = AvatarConfig.getAvatarList().avatarList;
+				let _length = avatarlist.length;
+				let _index = Math.floor(Math.random() * _length);
+
+				console.log(avatarlist);
+
+				_self.aiObj.name = avatarlist[_index].name;
+				_self.aiObj.avatar = avatarlist[_index].url;
+			},
+			onBoxingGameOver(res) {
+				this.$refs.hitEffectRef.onStop();
+
+				this.onActionPause(true);
+				//拳击柱部分
+				uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
+
+				let _title = res.myWin ? "胜利" : "失败";
+				let _context = res.myWin ? "你已经赢得PK胜利!" : "你在PK中被打败了!";
+				this.modalName = "showModalTip"
+
+				this.$refs.modalTipRef.setShowData({
+					title: _title,
+					context: _context,
+					operationItem: null
+				});
+			},
+			onModalTipHide() {
+				this.modalName = null;
+
+			},
+			onModalTipConfirm(data) {
+				let {
+					type,
+					operationItem
+				} = data;
+				this.modalName = null;
+				//再来一局
+				//提示过关奖励
+				console.log('onModalTipConfirm', type, operationItem);
+				if (type == 'PASSTHELEVEL') {
+					this.showPopup('levelReward', operationItem);
+				}
+			},
+			onTestShare() {
+				uni.share({
+					provider: "weixin",
+					scene: "WXSenceTimeline",
+					type: 2,
+					imageUrl: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/uni@2x.png",
+					success: function(res) {
+						console.log("success:" + JSON.stringify(res));
+					},
+					fail: function(err) {
+						console.log("fail:" + JSON.stringify(err));
+					}
+				});
+			},
+			openAcc() {
+				if (!this.globalAcc) {
+					AccAndOri.bindAcc((accId) => {
+						this.$store.state.globalAcc = accId;
+						console.log("初始化:globalAcc=", this.globalAcc);
+					});
+				}
+
+				if (!this.globalOri) {
+					AccAndOri.bindOri((oriId) => {
+						this.$store.state.globalOri = oriId;
+						console.log("初始化:globalOri=", this.globalOri);
+					});
+				}
+			},
+			closeAcc() {
+				AccAndOri.unBindAcc(this.globalAcc);
+				this.$store.state.globalAcc = null;
+
+				AccAndOri.unBindOri(this.globalOri);
+				this.$store.state.globalOri = null;
+			},
+			outGyro(o) {
+				console.log("Orientation\nAlpha:" + o.alpha + "\nBeta:" + o.beta + "\nGamma:" + o.gamma);
+			},
+			openGyro() {
+				if (!this.globalOri) {
+					AccAndOri.bindOri((oriId) => {
+						this.$store.state.globalOri = oriId;
+						console.log("初始化:globalOri=", this.globalOri);
+					});
+				}
+				uni.$on('watchOrientation', this.outGyro);
+			},
+			stopGyro() {
+				uni.$off('watchOrientation', this.outGyro);
+				AccAndOri.unBindOri(this.globalOri);
+				this.$store.state.globalOri = null;
+			},
+
+			onKeyInput: function(event) {
+				this.$store.state.LocationGameUrl = event.target.value
+			},
+
+			onNavFcGame() {
+				// console.log(0);
+				uni.navigateTo({
+					url: "../../fc-page/fc/fc"
+				})
+			},
+
+			onNavAppInfo() {
+				uni.navigateTo({
+					url: '../../info-page/app-info/app-info'
+				})
+			},
+
+			getBLEDeviceServices() {
+				console.log("getBLEDeviceServices");
+
+				// uni.getBLEDeviceServices({
+				// 	deviceId: "C5:5C:19:04:00:30",
+				// 	success: res => {
+				// 		console.log("getBLEDeviceServices==", JSON.stringify(res));
+				// 	},
+				// 	fail: failRes => {
+				// 		console.log('device services:', failRes)
+
+				// 	}
+				// });
+			},
+
+			// testAsyncFunc() {
+			// 	// 调用异步方法
+			// 	testModule.testAsyncFunc({
+			// 			'name': 'unimp',
+			// 			'age': 1
+			// 		},
+			// 		(ret) => {
+			// 			modal.toast({
+			// 				message: ret,
+			// 				duration: 1.5
+			// 			});
+			// 		})
+			// },
+			// startSyncFunc() {
+			// 	// 调用同步方法
+			// 	var ret = testModule.onStartAccAndGyro({
+			// 		'name': 'unimp',
+			// 		'age': 1
+			// 	})
+			// 	modal.toast({
+			// 		message: ret,
+			// 		duration: 1.5
+			// 	});
+			// },
+
+			// stopSyncFunc() {
+			// 	// 调用同步方法
+			// 	var ret = testModule.onStopAccAndGyro({
+			// 		'name': 'unimp',
+			// 		'age': 1
+			// 	})
+			// 	modal.toast({
+			// 		message: ret,
+			// 		duration: 1.5
+			// 	});
+			// },
+
+			onNavToSelectFriend() {
+				uni.navigateTo({
+					url: '../../friend-page/select/select'
+				})
+			},
+			/**
+			 * 悬停按钮
+			 */
+			fabClick() {
+				//如果第一次点击悬停按钮
+				// if (this.guideUnlockState.firstDisconnectBluetooth) {
+
+				// 	this.onGetBluetoothConnectView({
+				// 		hiddenType: 'firstDisconnectBluetooth'
+				// 	});
+				// 	let guideUnlockState = Object.assign(this.guideUnlockState, {
+				// 		firstDisconnectBluetooth: false
+				// 	});
+				// 	this.setGuideUnlockState(guideUnlockState);
+				// 	return;
+				// }
+
+
+
+				if (this.cIndex != -1 && this.BLEConnectDevice != null) {
+					//先检测
+					uni.showModal({
+						title: '设备状态',
+						content: '是否断开连接?',
+						/**
+						 * 如果需要强制,不显示取消按钮
+						 */
+						showCancel: true,
+						ConfirmColor: '#A488DC',
+						success: res => {
+							if (res.confirm) {
+								this.onCloseBLEConnection({
+									getSuccess: () => {}
+								});
+
+							}
+						}
+					});
+				} else {
+
+					this.openDeviceList();
+				}
+
+			},
+
+			/**
+			 * action 模块相关数据更新,实时更新
+			 */
+			onActionJumpDataUpdate(obj) {
+				// console.log(obj);
+				this.AJData.allCount = obj.eliminationCount + obj.faultCount;
+				this.AJData.faultCount = obj.faultCount;
+
+				//如果pk模式下,区分两个人的分数
+				if (this.currentMode == "pkMode") {
+					if (this.AJData.isLeftPlayer) {
+						this.AJData.myScore = obj.eliminationCount - obj.faultCount;
+					} else {
+						this.AJData.otherScore = obj.eliminationCount - obj.faultCount;
+					}
+				}
+				// console.log(this.AJData.myUsageTime, this.AJData.otherUsageTime);
+
+			},
+			onActionJumpCountDownUpdate(obj) {
+				// 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) {
+					//如果下一局,重新设置一下默认参数
+					this.onResetDefaultActionJumpData();
+				}
+				this.onSetActionJumpData();
+				this.$refs.actionJumpRef.onActionJumpPlay();
+				this.bGamePlaying = true;
+				//todo 首先判断时间处理
+				if (0 !== this.currentJumpTask.item.limitTime) {
+					//0默认不限时,所以限时的才走计时间
+					this.arcbarCountDownPlay(true);
+				}
+			},
+			//重置actionJump数据
+			onResetDefaultActionJumpData() {
+				this.AJData = Object.assign({}, this.defaultAJData);
+			},
+			onSetActionJumpData() {
+				let _item = this.currentJumpTask.item;
+				//这里set只是对应关卡的数据
+				this.AJData = Object.assign({}, this.AJData, {
+					allCount: 0,
+					faultCount: 0,
+					perCountDown: 0,
+					gameCountDown: 0,
+					gameLimitTime: _item.limitTime
+				})
+				console.log('onSetActionJumpData', JSON.stringify(this.AJData), JSON.stringify(_item));
+			},
+			onActionJumpGameOver(data) {
+				let {
+					isOffEvent = false
+				} = data;
+				if (isOffEvent) {
+					//停止蓝牙加速计
+					this.onWriteBLEConnectionValue({
+						value: "4"
+					});
+					uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
+					console.log('onActionJumpGameOver 任务结束');
+					
+					this.bGamePlaying = false;
+				}
+
+
+				//游戏结束,重置时间
+				this.arcbarCountDownTimeReset();
+				//todo 可能区分 levelJump 关卡类型
+				if (this.currentMode == "pkMode") {
+					//pk模式下面
+					if (this.AJData.isLeftPlayer) {
+						//如果是左边的.切换下一个玩家
+						this.AJData.isLeftPlayer = false;
+						uni.showModal({
+							title: '切换下一个玩家',
+							showCancel: false,
+							success: (res) => {
+								if (res.confirm) {
+									//重新开始计算
+									this.onActionJumpPlay();
+								}
+							}
+						})
+					} 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
+							// })
+							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
+							// })
+							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
+							});
+						}
+
+						reqUtil
+							.requestData(config.URL.PKLEVELREWARD, {
+								levelId: _item.id,
+								levelType: 1,
+								isMyWin: isMyWin,
+								friendId: _curFriend.friendId
+							})
+							.then(
+								res => {
+									if (res.code == 0) {
+										console.log('PKLEVELREWARD:' + JSON.stringify(res.data));
+										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 => {
+									console.log(e);
+								}
+							);
+					}
+				} else {
+					this.AJData.isFinish = true;
+					if (data.myWin) {
+						//通过关卡,处理逻辑
+						let _item = this.currentJumpTask.item;
+						reqUtil
+							.requestData(config.URL.PASSTHELEVEL, {
+								levelId: _item.id,
+								levelType: 1,
+							})
+							.then(
+								res => {
+									if (res.code == 0) {
+										console.log('PASSTHELEVEL:' + JSON.stringify(res.data));
+										//处理 列表数据
+										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;
+											}
+										}
+										let _title = data.myWin ? "胜利" : "失败";
+										let _context = data.myWin ? "通关关卡成功!" : "通关关卡失败!";
+										this.modalName = "showModalTip"
+										if (0 !== res.data.rewardHonor.type || 0 !== res.data.rewardGold || 0 !== res.data
+											.rewardDiamond) {
+											//todo
+											this.$refs.modalTipRef.setShowData({
+												title: _title,
+												context: _context,
+												operationItem: res.data,
+												type: 'PASSTHELEVEL'
+											});
+											//存在任何奖励的情况下直接更新一下返回的金币和钻石数据
+											this.setGoldAndDiamond({
+												gold: res.data.gold,
+												diamond: res.data.diamond
+											});
+										} else {
+											//没有奖励数据
+											this.$refs.modalTipRef.setShowData({
+												title: _title,
+												context: _context,
+												operationItem: null,
+												type: 'none'
+											});
+										}
+
+
+									}
+								},
+								e => {
+									console.log(e);
+								}
+							);
+					}
+				}
+			},
+			showDrawer() {
+				this.showDrawerById();
+			},
+			showPopup(type, item) {
+				this.showPopupById({
+					type,
+					item
+				});
+			},
+			showGuide(type, item) {
+				this.showGuideById({
+					type,
+					item
+				});
+			},
+			/**
+			 * 任务相关
+			 */
+			selectTask(_index, _item) {
+				// console.log(JSON.stringify(_item));
+				if (_item.isUnlock) {
+					let _data = {
+						modeName: this.currentMode, //记录时候记录当前的mode 
+						index: _index,
+						item: _item,
+					}
+					//记录临时选择的游戏关卡
+					this.tempSelectedLevel = _data;
+				} else {
+					let isCanUnlock = _index == 0 || (_index >= 1 && this.currentTaskList[_index - 1].isUnlock && this
+						.currentTaskList[_index - 1].isPassed) ? true : false;
+					if (!isCanUnlock) return;
+					this.showPopup('unlock', _item);
+				}
+			},
+			updateTaskScroll() {
+				/**
+				 * 获取任务对象
+				 */
+				this.getActionJumpTask();
+				//console.error('当前的任务对象===========:' + JSON.stringify(this.currentJumpTask.modeName) + '= '+this.currentMode);
+				if (this.currentJumpTask != null && this.currentJumpTask.modeName == this.currentMode) {
+					let _index = this.currentJumpTask.index - 1 < 0 ? 0 : this.currentJumpTask.index - 1;
+					this.$nextTick(() => {
+						this.taskIntoView = "task_" + _index;
+					});
+					this.taskIntoView = '' //不清空再次跳到锚点位置会不起作用
+				}
+
+			},
+			switchTaskInfo() {
+				if (this.currentMode == 'calorieMode') {
+					this.currentTaskList = this.singlePersonList;
+				} else if (this.currentMode == 'pkMode') {
+					this.currentTaskList = this.multiPersonList;
+				}
+
+			},
+			onSwitchMode() {
+				if (this.currentMode == 'calorieMode') {
+					this.currentMode = 'pkMode';
+				} else if (this.currentMode == 'pkMode') {
+					this.currentMode = 'calorieMode';
+				}
+
+				this.switchTaskInfo();
+			},
+			/**
+			 * @deprecated Test 测试通过关卡
+			 */
+			onPassTheLevel() {
+				if (this.currentMode == "pkMode") {
+					this.AJData.myScore = 10;
+					this.AJData.isLeftPlayer = false;
+				}
+				this.onActionJumpGameOver({
+					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) => {
+					switch (data.type) {
+						case 'interactive':
+							uni.showModal({
+								title: '来自Popup的消息',
+								content: data.info
+							})
+							break;
+						case 'button':
+							if (data.messageType == 'prompt') {
+								if (data.confirm) {
+									console.log('prompt confirm!');
+								} else if (data.cancel) {
+
+								}
+							} else if (data.messageType == 'unlock') {
+								if (data.confirm) {
+									let _operationItem = data.operationItem;
+									console.log('unlock confirm!', _operationItem);
+									uni.showToast({
+										title: '正在解锁',
+										icon: 'loading',
+										duration: 10000
+									})
+									//todo 处理解锁流程
+									reqUtil
+										.requestData(config.URL.UNLOCKLEVEL, {
+											levelId: _operationItem.id,
+											levelType: 1, //levelJump = 1
+											numberType: _operationItem.numberType,
+
+										})
+										.then(
+											res => {
+												uni.hideToast();
+												console.log('UNLOCKLEVEL:' + JSON.stringify(res));
+												if (res.code === 404) {
+													uni.showToast({
+														title: '金币不足',
+														icon: 'none',
+														duration: 1000
+													})
+												} else if (res.code === 405) {
+													uni.showToast({
+														title: '钻石不足',
+														icon: 'none',
+														duration: 1000
+													})
+												} else if (res.code === 0) {
+													//解锁成功
+													uni.showToast({
+														title: '解锁成功',
+														icon: 'none',
+														duration: 1000
+													})
+													//更新本地金币和钻石
+													this.setGoldAndDiamond({
+														gold: res.data.gold,
+														diamond: res.data.diamond
+													});
+
+													for (let i = 0; i < this.currentTaskList.length; i++) {
+														if (this.currentTaskList[i].id == _operationItem.id) {
+															this.currentTaskList[i].isUnlock = true;
+															break;
+														}
+													}
+												} else if (res.code === 803) {
+													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,
+														icon: 'none',
+														duration: 2000
+													})
+												}
+											},
+											e => {
+												console.log(e);
+											}
+										);
+								}
+
+							} else if (data.messageType == 'signIn') {
+								this.onUserSignIn();
+							}
+							break;
+						default:
+							uni.showToast({
+								title: data.title,
+							})
+							break;
+					}
+				})
+				// 监听 drawer 消息
+				uni.$on('drawer-page', (data) => {
+					uni.showToast({
+						title: '点击了第' + data + '项',
+						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) {
+
+									//首次安装
+									if (data.hiddenType == 'firstInstallation') {
+										//跳转提示连接手柄蓝牙
+										setTimeout(() => {
+											this.onGetBluetoothConnectView({
+												hiddenType: 'firstInstallation'
+											});
+										}, 60)
+										console.log('提示连接手柄')
+									}
+								}
+							} else if (data.messageType == 'bluetoothConnect') {
+								if (data.confirm) {
+									//跳转播放
+									// this.onGetActionJumpView();
+									//首次安装
+									if (data.hiddenType == 'firstInstallation') {
+										setTimeout(() => {
+											// this.showGuide('device-tip', {
+											// 	hiddenType: 'firstInstallation'
+											// });
+											this.showGuide('level-button-tip', {
+												hiddenType: 'firstInstallation'
+											});
+											console.log('提示连接关卡')
+										}, 60)
+									} else if (data.hiddenType == 'firstDisconnectBluetooth') {
+										this.fabClick();
+									}
+								}
+							} else if (data.messageType == 'actionJumpPlay') {
+								if (data.confirm) {
+
+								}
+							} else if (data.messageType == 'device-tip') {
+								if (data.confirm) {
+									if (data.hiddenType == 'firstInstallation') {
+										setTimeout(() => {
+											this.showGuide('level-button-tip', {
+												hiddenType: 'firstInstallation'
+											});
+										}, 60)
+									}
+								}
+							} else if (data.messageType == 'level-button-tip') {
+								if (data.confirm) {
+
+								}
+							}
+
+							break;
+						case 'selected':
+							console.log('当前操作的类型 selected:', data.messageType)
+							if (data.messageType == 'level-button-tip') {
+								if (data.isSelected) {
+									uni.setStorage({
+										key: 'levelButtonPrompt',
+										data: {
+											isSelected: true
+										}
+									})
+									//如果选择不提示。则隐藏按钮
+									this.$refs.actionJumpRef.onUpdateTipLevelValue(false);
+
+								} else {
+									uni.setStorage({
+										key: 'levelButtonPrompt',
+										data: {
+											isSelected: false
+										}
+									})
+									//如果选择提示。则显示按钮
+									this.$refs.actionJumpRef.onUpdateTipLevelValue(true);
+								}
+							} else if (data.messageType == 'device-tip') {
+								if (data.isSelected) {
+									uni.setStorage({
+										key: 'deviceDirectionPrompt',
+										data: {
+											isSelected: true
+										}
+									})
+									//todo 后续处理是否自动提示,true就不自动提示
+								} else {
+									uni.setStorage({
+										key: 'deviceDirectionPrompt',
+										data: {
+											isSelected: false
+										}
+									})
+									//todo 后续处理是否自动提示,false就自动提示
+								}
+							}
+							break;
+						default:
+							uni.showToast({
+								title: data.title,
+							})
+							break;
+					}
+				})
+			},
+			unregisterPopupEvent() {
+				uni.$off('reward-popup-page')
+				uni.$off('drawer-page')
+				uni.$off('guide-popup-page')
+			},
+
+			onNavToDirection() {
+				uni.navigateTo({
+					url: '../directionOfDetection/directionOfDetection'
+				})
+			},
+
+			moveBoxingHandle() {
+				return;
+			},
+
+			/**
+			 * 提示打开关卡
+			 */
+			onTipLevel(value) {
+				// #ifdef APP-PLUS
+				this.showGuide('level-button-tip', value);
+				// #endif
+				// #ifdef H5
+				console.warn("不支持nvue");
+				// #endif
+			},
+
+			onShowFirstInstallation() {
+				//第一次安装登录。提示 计划
+				this.showGuide('plan', {
+					hiddenType: 'firstInstallation'
+				});
+				console.log("guideUnlockState 1=============:", this.guideUnlockState);
+				let guideUnlockState = Object.assign(this.guideUnlockState, {
+					firstInstallation: false
+				});
+				this.setGuideUnlockState(guideUnlockState);
+			}
+		}
+	};
+</script>
+
+<style>
+	.bg-person {
+		background-color: #9797ff;
+	}
+
+	.plan-view {
+		overflow: hidden;
+		background-color: #9797ff;
+	}
+
+	.plan-l-tip-view {
+		border-radius: 80upx 0 0 80upx;
+		background-color: rgba(255, 255, 255, 0.05);
+	}
+
+	.plan-r-tip-view {
+		border-radius: 0 80upx 80upx 0;
+		background-color: rgba(255, 255, 255, 0.05);
+	}
+
+	.bottom-view {
+		background-color: rgba(246, 243, 249, 255);
+		padding-bottom: 20rpx;
+		border-radius: 80rpx 80rpx 0 0;
+		width: 750rpx;
+		overflow: hidden;
+	}
+
+	.time-view {
+		width: 100%;
+		margin-top: 53rpx;
+		/* border: 1rpx solid #DD514C; */
+	}
+
+	/*样式的width和height一定要与定义的cWidth和cHeight相对应*/
+	.qiun-charts-arcbar {
+		/* padding: 20rpx 15rpx; */
+		/* margin-top: 60rpx; */
+		height: 480rpx;
+		position: relative;
+		width: 750rpx;
+
+		/* border: 1rpx solid #fff; */
+	}
+
+	.charts-arcbar {
+		position: absolute;
+		/* margin-left: 81upx;
+		 */
+		left: 0;
+		right: 0;
+		top: 0;
+		bottom: 0;
+		margin: auto;
+		width: 490rpx;
+		height: 480rpx;
+		/* border: 1rpx solid #FFFFFF; */
+	}
+
+	.charts-arcbar-img {
+		position: absolute;
+		left: 135upx;
+		width: 480upx;
+		height: 480upx;
+	}
+
+	.charts-pring-bottom {
+		position: relative;
+		width: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+
+	}
+
+	.charts-pring-button {
+		width: 178rpx;
+		height: 64rpx;
+		display: flex;
+		flex-direction: row;
+		justify-content: start;
+		align-items: center;
+		border-radius: 0 25px 25px 0;
+	}
+
+	/* 心电图 */
+	/* .qiun-charts-elect {
+		width: 500rpx;
+		height: 136rpx;
+	} */
+
+	.charts-elect {
+		width: 464rpx;
+		height: 96rpx;
+		border: 1rpx solid #000000;
+	}
+
+	.e-button {
+		background-color: rgba(255, 255, 255, 0.25);
+		border-radius: 45px;
+		margin: 5px 12px;
+		box-shadow: 1px 1px 3px #888888;
+		display: flex;
+		justify-content: center;
+	}
+
+	/* 曲线图 */
+	.qiun-charts-area {
+		width: calc(750rpx - 40rpx);
+		height: 300upx;
+		/* background-color: #007AFF; */
+		position: relative;
+	}
+
+	.charts-area {
+		position: absolute;
+		width: 750upx;
+		height: 300upx;
+	}
+
+	.qiun-charts-bottom-container {
+		height: 63px;
+		position: relative;
+		width: 100%;
+		justify-content: center;
+		align-items: center;
+		display: flex;
+		flex-direction: row;
+	}
+
+
+	.qiun-charts-bottom-right {
+		position: absolute;
+		left: calc(50% + 50rpx);
+		top: 15px;
+		margin-left: 20rpx;
+	}
+
+	/* picker */
+	.mpvue-picker-view {
+		width: calc(50% - 5px);
+		height: 300px;
+		/* background-color: rgba(255, 255, 255, 1); */
+		border-radius: 20px;
+	}
+
+	.item {
+		text-align: center;
+		width: calc(100% - 0px);
+		background-color: rgba(255, 255, 255, 1);
+		height: 88upx;
+		line-height: 88upx;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		font-size: 40upx;
+	}
+
+	.picker-unit {
+		position: absolute;
+		right: 70px;
+		top: 43%;
+	}
+
+	.left-button,
+	.right-button {
+		margin: 20px 0;
+		padding: 10px 30px;
+		background-color: #ffffff;
+	}
+
+	.left-button {
+		border-top-left-radius: 20px;
+		border-bottom-left-radius: 20px;
+		border-right: 1px solid #e6e6e6;
+	}
+
+	.right-button {
+		border-top-right-radius: 20px;
+		border-bottom-right-radius: 20px;
+	}
+
+	.png-size-28 {
+		width: 24px;
+		height: 24px;
+		margin-bottom: 4px;
+	}
+
+	.png-size-32 {
+		width: 32px;
+		height: 32px;
+	}
+
+	.png-size-34 {
+		width: 34px;
+		height: 34px;
+	}
+
+	/* 图标大小 */
+	.data-play {
+		width: 16px;
+		height: 16px;
+		margin-top: 10rpx;
+	}
+
+	.p-data-png {
+		width: 16px;
+		height: 16px;
+		margin: 5rpx 20rpx;
+	}
+
+	.data-png {
+		width: 16px;
+		height: 16px;
+		margin: 5rpx;
+	}
+
+	.data-png-20 {
+		width: 20px;
+		height: 20px;
+		margin: 0 14rpx;
+	}
+
+	.data-png-54 {
+		width: 54px;
+		height: 54px;
+		margin: 0 14rpx;
+	}
+
+	.data-png-add {
+		position: absolute;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		margin: auto;
+		width: 34px;
+		height: 37px;
+	}
+
+	.time-container {
+		margin-top: 13px;
+		width: 100%;
+		height: 218rpx;
+		position: relative;
+		/* border: 1rpx solid #007AFF; */
+	}
+
+	.time-png {
+		width: 503rpx;
+		height: 222rpx;
+		position: absolute;
+		left: 0;
+		right: 0;
+		top: 0;
+		bottom: 0;
+		margin: auto;
+		z-index: 1;
+	}
+
+	.time-text {
+		font-size: 9px;
+		z-index: 10;
+		position: relative;
+		height: 100%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		color: #FFFFFF;
+	}
+
+	.padding {
+		padding: 10rpx;
+	}
+
+	.logo {
+		height: 200rpx;
+		width: 200rpx;
+		margin-top: 200rpx;
+		margin-left: auto;
+		margin-right: auto;
+		margin-bottom: 50rpx;
+	}
+
+	.float-png {
+		position: absolute;
+		right: 15px;
+		bottom: 200px;
+		width: 56px;
+		height: 56px;
+	}
+
+	.moveCanvas {
+		position: fixed;
+		top: 9999rpx;
+		left: 0;
+		width: 188rpx;
+		height: 188rpx;
+	}
+
+	.scroll-class {
+		width: 100%;
+		overflow-x: hidden;
+		box-sizing: border-box;
+		/* border: 1rpx solid #000000; */
+	}
+
+	.homepage-grid-square {
+		width: 250rpx;
+		/* height: 250rpx; */
+		align-items: start;
+	}
+
+	.homepage-grid-square image {
+		width: 176rpx;
+		height: 176rpx;
+	}
+
+	.border {
+		/* width: 176rpx; */
+		font-size: 30rpx;
+		color: rgba(175, 175, 175, 1);
+		font-weight: 400;
+		text-align: center;
+		margin-top: 22rpx;
+		margin-bottom: 40rpx;
+	}
+
+	.item-img {
+		border-radius: 20rpx;
+		/* border: 1rpx solid #EEEEEE; */
+		box-shadow: 0px 1px 2px 0px rgba(113, 113, 219, 0.23);
+	}
+
+	.plan-Tip-child {
+		height: 120rpx;
+	}
+
+	.plan-mode-tip {
+		height: 90rpx;
+	}
+
+	.plan-grid-square {
+		width: 250rpx;
+		/* height: 250rpx; */
+		align-items: start;
+	}
+
+	.plan-grid-square image {
+		width: 168rpx;
+		height: 58rpx;
+	}
+
+	.plan-mode {
+		/* height: 54px; */
+		border-radius: 10px;
+		padding: 3px;
+		margin: 0 5px 10px 5px;
+		border: 1rpx solid #eeeeee;
+		/* box-shadow: 0px 1px 2px 0px rgba(113, 113, 219, 0.23); */
+		position: relative;
+	}
+
+	.plan-mode-selected {
+		/* height: 54px; */
+		padding: 3px;
+		margin: 0 5px 10px 5px;
+		background-size: contain;
+		background-clip: border-box;
+		background-repeat: no-repeat;
+		background-image: url(../../../static/plan-select-bg.png);
+		/* box-shadow: 0px 1px 2px 0px rgba(113, 113, 219, 0.23); */
+		position: relative;
+	}
+
+	.plan-mode-border {
+		/* width: 176rpx; */
+		font-size: 26rpx;
+		color: rgba(151, 151, 255, 1);
+		font-weight: 400;
+		text-align: center;
+	}
+
+	.button-fav {
+		background-color: rgba(153, 150, 252, 255);
+		color: #ffffff;
+		/* border-radius: 10px; */
+		/* width: 184rpx; */
+		height: 122rpx;
+		display: flex;
+		justify-content: center;
+		text-align: center;
+		align-items: center;
+		font-size: 14px;
+	}
+
+	.card-view-small {
+		/* border: 1rpx solid #000000; */
+		width: 80%;
+		border-radius: 20px;
+		margin-left: 50rpx;
+		overflow: hidden;
+		background-color: #ffffff;
+		box-shadow: 0px 2px 4px 0px rgba(113, 113, 219, 0.23);
+	}
+
+	.right-bg {
+		/* border: 1rpx solid #000000; */
+		border-radius: 8px;
+		background-color: #9797ff;
+		padding: 15rpx;
+		position: absolute;
+		right: 5%;
+		margin-top: 4%;
+	}
+
+	.plan-small-child {
+		background-color: #f5f5ff;
+		border-radius: 20px;
+		width: 480rpx;
+		height: 90rpx;
+		margin: 0 0 30rpx 30rpx;
+		/* margin-top: 60rpx; */
+	}
+
+	.cu-btn-plan {
+		position: relative;
+		border: 0upx;
+		display: inline-flex;
+		align-items: center;
+		justify-content: center;
+		box-sizing: border-box;
+		padding: 4upx 25upx 4upx 4upx;
+		margin-left: 5px;
+		font-size: 22upx;
+		height: 64upx;
+		line-height: 1;
+		text-align: center;
+		text-decoration: none;
+		overflow: visible;
+		margin-left: initial;
+		transform: translate(0upx, 0upx);
+		margin-right: initial;
+	}
+
+	.cu-btn-plan-child {
+		position: relative;
+		border: 0upx;
+		display: inline-flex;
+		align-items: center;
+		justify-content: center;
+		box-sizing: border-box;
+		padding: 0 4upx;
+		font-size: 22upx;
+		height: 56upx;
+		line-height: 1;
+		text-align: center;
+		text-decoration: none;
+		overflow: visible;
+		margin-left: initial;
+		transform: translate(0upx, 0upx);
+		margin-right: initial;
+	}
+
+	.cu-btn-plan-right {
+		position: relative;
+		border: 0upx;
+		display: inline-flex;
+		align-items: center;
+		justify-content: center;
+		box-sizing: border-box;
+		padding: 4upx 4upx 4upx 19upx;
+		margin-left: 5px;
+		font-size: 22upx;
+		height: 64upx;
+		line-height: 1;
+		text-align: center;
+		text-decoration: none;
+		overflow: visible;
+		margin-left: initial;
+		transform: translate(0upx, 0upx);
+		margin-right: initial;
+	}
+
+	/* 粗线条 */
+	.line-make {
+		margin-top: 11px;
+		margin-left: 8px;
+		border: 4rpx solid #FFFFFF;
+		width: 152rpx;
+		border-radius: 3px;
+	}
+
+
+	/* 头像背景处理 */
+	.avatar-bg-personal {
+		width: 34px;
+		height: 34px;
+		border-radius: 45px;
+		border: 2px solid #9997fc;
+		background-color: #9997fc;
+		box-sizing: border-box;
+	}
+
+
+	.avatar-bg-arrow {
+		position: absolute;
+		top: 12px;
+		left: calc(50% - 10px);
+		border-left: 10px solid transparent;
+		border-right: 10px solid transparent;
+		border-bottom: 10px solid #9997fc;
+	}
+
+	.elect-round-image {
+		width: 48px;
+		height: 48px;
+		z-index: 10;
+		box-shadow: 1px 1px 3px #888888;
+		border-radius: 45px;
+	}
+
+	.elect-personal {
+		/* width: 100%; */
+		height: 120rpx;
+		/* margin: 50rpx 0; */
+		margin-bottom: 50rpx;
+		border-radius: 45px;
+		padding: 10rpx;
+		border: 1rpx solid rgba(255, 255, 255, 0.11);
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		position: relative;
+	}
+
+	/* 呼吸灯 */
+	.breathing-lamp {
+		animation-duration: 1s;
+		animation-timing-function: ease-out;
+		animation-fill-mode: inherit;
+		animation-iteration-count: infinite;
+		animation-name: run-lamp;
+		animation-play-state: running;
+	}
+
+	@keyframes run-lamp {
+
+		0%,
+		100% {
+			opacity: 1;
+			transform: scale(1);
+		}
+
+		50% {
+			opacity: 0.6;
+			transform: scale(0.9);
+		}
+
+	}
+
+	.personal-fruit-container {
+		position: absolute;
+		left: 0;
+		top: 0;
+		bottom: 0;
+		right: 0;
+		margin: auto;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		/* border: 1rpx solid #F0F0F0; */
+	}
+
+
+	.screen-jitter {
+		animation-duration: 1s;
+		animation-timing-function: ease-out;
+		animation-fill-mode: inherit;
+		animation-iteration-count: infinite;
+		animation-name: personal-shake;
+		animation-play-state: running;
+	}
+
+	.screen-red {
+		border: 1rpx solid #ff0000;
+	}
+
+	@keyframes personal-shake {
+
+		0%,
+		100% {
+			transform: translateX(0)
+		}
+
+		10% {
+			transform: translateX(-9px)
+		}
+
+		20% {
+			transform: translateX(8px)
+		}
+
+		30% {
+			transform: translateX(-7px)
+		}
+
+		40% {
+			transform: translateX(6px)
+		}
+
+		50% {
+			transform: translateX(-5px)
+		}
+
+		60% {
+			transform: translateX(4px)
+		}
+
+		70% {
+			transform: translateX(-3px)
+		}
+
+		80% {
+			transform: translateX(2px)
+		}
+
+		90% {
+			transform: translateX(-1px)
+		}
+	}
+
+	.CountDownMask {
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		right: 0;
+		left: 0;
+		background-color: rgba(0, 0, 0, 0.5);
+		z-index: 1000;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		font-size: 100px;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+
+	/**
+	 * 任务样式
+	 */
+
+	.task-up-button {
+		z-index: 10;
+
+		/* #ifndef APP-PLUS */
+		position: absolute;
+		/* #endif */
+		/* #ifdef APP-PLUS */
+		position: fixed;
+		/* #endif */
+		bottom: 0;
+		right: 0;
+		left: 0;
+		margin: auto;
+		width: 100%;
+		height: 82rpx;
+	}
+</style>

+ 61 - 121
pages/personal-page/personal/personal.vue

@@ -1,36 +1,25 @@
+<!-- 新版本跳首页文件修改版本 -->
+
 <template>
 	<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)"
+		<uni-nav-bar id="nav-bar" status-bar="true" backgroundColor="RGBA(30, 30, 85, 1)"
 			@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>
 				</view>
 			</view>
-			<!-- @clickRight="onNavFcGame()" -->
 			<view slot="middle">
-				<!-- <view style="position: relative; border: 1rpx solid #FFFFFF;">
-					<view
-						style="position: absolute;top: 0;left: -155rpx;right: 0;bottom: 0;margin: auto; width: 194rpx;height: 52rpx; border-radius: 26rpx 0 0 26rpx; background-color: rgba(255,255,255,0.12);"
-						class="flex align-center justify-center">
-						<image style="width: 26rpx;height: 24rpx; margin-right: 12rpx;"
-							src="/static/personal/linkWhite.png"></image>
-						<view class="text-14px ">连接设备</view>
-					</view>
-					
-				</view> -->
 				<view class="flex justify-center align-center" style="margin-left: 160rpx; ">
-					<view class="flex align-center"
-						style="margin-right: 40rpx; padding: 0 18px; height: 56rpx; background-color: rgba(255,255,255,0.11); border-radius: 13.5px;">
-						<image class="png-more" style="margin-right: 16rpx;" src="/static/common/sideBar/sGold.png">
+					<view class="flex align-center "
+						style="margin-right: 40rpx; padding: 0 18px; height: 56rpx; background-color: rgba(255, 153, 0, 1); border-radius: 13.5px;">
+						<image class="png-more-black" style="margin-right: 16rpx;" src="/static/common/sideBar/gold_black@2x.png">
 						</image>
 						<view class="text-14px" style="line-height: 28rpx;">{{cGold}}</view>
 					</view>
 					<view class="flex  align-center"
-						style="padding: 0 18px; height: 56rpx; background-color: rgba(255,255,255,0.11); border-radius: 13.5px;">
-						<image class="png-more" style="margin-right: 16rpx; " src="/static/common/sideBar/sDiamond.png">
+						style="padding: 0 18px; height: 56rpx; background-color: rgba(255, 153, 0, 1); border-radius: 13.5px;">
+						<image class="png-more-black" style="margin-right: 16rpx; " src="/static/common/sideBar/diamond_black@2x.png">
 						</image>
 						<view class="text-14px" style="line-height: 28rpx;">{{cDiamond}}</view>
 					</view>
@@ -127,7 +116,8 @@
 										</view>
 									</view>
 								</view>
-								<view v-else style="height:80rpx;"> </view>
+								<!-- 80rpx -->
+								<view v-else style="height:20rpx;"> </view>
 							</block>
 
 							<!-- 圆形进度条 -->
@@ -135,78 +125,43 @@
 								v-if="(currentMode == 'pkMode' && 1 === currentModeIndex)||currentMode== 'calorieMode'"
 								class="qiun-charts-arcbar">
 								<!-- 进度条 -->
-								<canvas canvas-id="canvasArcbar" id="canvasArcbar" class="charts-arcbar "></canvas>
+								<canvas v-show="false" canvas-id="canvasArcbar" id="canvasArcbar" class="charts-arcbar "></canvas>
 								<!-- 图标 -->
-								<view class="personal-fruit-container">
+								<!-- <view class="personal-fruit-container">
 									<image style="width: 36rpx;height: 56rpx; margin-top: -120px;"
 										src="../../../static/modal/action-jump/arcbarJumpIcon.png"></image>
-								</view>
+								</view> -->
 
 								<!-- 图标 -->
-								<view class="personal-fruit-container">
+							<!-- 	<view class="personal-fruit-container">
 									<view class="text-13px text-white" style="margin-top: -50px;">
 										失误:{{AJData.faultCount}}</view>
-								</view>
-								<!-- 水果卡路里-->
-								<!-- <view class="personal-fruit-container">
-									<fruit ref="personalFruitRef" :calorie="planData.allCalorie"></fruit>
 								</view> -->
 
 								<!-- 跳动次数 -->
-								<view class="personal-fruit-container">
-									<LEDFont style="margin-top: 40px;" :showValue='AJData.allCount' :size="60"
+								<view class="position-absolute-center-bottom flex" style="align-items: flex-end; height: 276rpx;">
+									<LEDFont style="margin-left: 117rpx;" :showValue='AJData.allCount' :height="120" :size="120"
+										color='#FF9900'>
+									</LEDFont>
+									<LEDFont  showValue="/" :height="65" :size="65"
+										color='#FFFFFF'>
+									</LEDFont>
+									<LEDFont  :showValue='199' :height="65" :size="65"
 										color='#FFFFFF'>
 									</LEDFont>
-									<!-- <view style="margin-top: 130px;font-size:12px;color: #FFFFFF;">计划时间{{planData.sportTime}}分钟</view> -->
 								</view>
-								<!-- 计划按钮 -->
-								<!-- <view id="projectButtonView" style="position: absolute;left: 0;top: 18px;">
-									<view class="flex justify-center" style="width: 100%;">
-										<view class="charts-pring-button  make-line-bPurple " :class="bPlanExpired?'breathing-lamp':''" style="background-color: #FFFFFF;"
-										 @tap="openPlan">
-											<image src="/static/reform.png" class="p-data-png" mode="aspectFit"></image>
-											<view class="text-11px">改计划</view>
-										</view>
-									</view>
-								</view> -->
-
 								<!-- 计时器 -->
-								<view class="personal-fruit-container">
+								<view class="position-absolute-right-top" style="top: 76rpx;">
 									<arcbarCountDown
-										style="margin-top: 150px; border: 1rpx solid rgba(255,255,255,0.33); padding: 0 10px; border-radius: 40rpx;"
+										style="margin-right: 104rpx; border: 2px solid rgb(255,255,255); background-color: RGBA(255, 153, 0, 1); padding: 0px 14px; border-radius: 18px;"
 										ref="arcbarCountDownRef" :show-day="false" :second="AJData.gameLimitTime"
-										color="#FFFFFF" background-color="rgba(255,255,255,0);" border-color="#007AFF"
-										:size="18" splitorColor="#FFFFFF" @timeUp="arcbarCountDownTimeUp"
+										color="#FFFFFF" background-color="rgba(255,255,255,0)" border-color="#007AFF"
+										:size="29" splitorColor="#FFFFFF" @timeUp="arcbarCountDownTimeUp"
 										@timeUpdate="arcbarCountDownTimeUpdate" />
 								</view>
 
-
-								<!-- 卡路里提示 -->
-								<!-- <view class="personal-fruit-container">
-									<prompt-box :calorie="planData.allCalorie"></prompt-box>
-								</view> -->
 							</view>
-							<!-- 钻石和金币部分 -->
-							<!-- <view class="charts-pring-bottom" style="margin-top: 34rpx;">
-								<view class="flex justify-center align-center"
-									style="height: 52rpx; width: 412rpx; background-color: rgba(255,255,255,0.11); border-radius: 12rpx;">
-									<view class=" flex align-center justify-center" style="color: #fff;">
-										<view class="flex  align-center">
-											<image class="png-more" style="margin-right: 18rpx;"
-												src="/static/personal/cDiamond.png"></image>
-											<view>{{cDiamond}}</view>
-										</view>
-										<view class="flex  align-center" style="margin-left: 60rpx;">
-											<image class="png-more" style="margin-right: 18rpx;"
-												src="/static/personal/cGold.png"></image>
-											<view>{{cGold}}</view>
-										</view>
-									</view>
-								</view>
-							</view> -->
-
 							<!-- 用于定位 -->
-							<!-- <view id="boxingHitID" style="position: absolute;top: 180rpx; pointer-events: none;" ></view> -->
 							<view id="boxingHitID" v-if="0 === currentModeIndex" class="charts-pring-bottom">
 								<!-- 添加一个 ConnectBindingDevice 测试 -->
 								<boxing-hit ref="boxingPostRef"
@@ -232,35 +187,11 @@
 									@tipLevel="onTipLevel">
 								</action-jump>
 							</view>
-							<!-- <button @tap="onTestAddLocalCalorie">11</button> -->
 						</view>
 
 					</scroll-view>
-					<!-- <view class="margin flex flex-direction">
-						<view class="title">当前游戏链接:{{LocationGameUrl}}</view>
-						<input style="border: 1rpx solid #000000;margin: 10rpx;" @input="onKeyInput" placeholder="输入同步到view中" />
-					</view> -->
-					<!-- <button  @tap="onShowBoxingHitTip">11</button> -->
 				</view>
 			</view>
-			<!-- <modal-mask></modal-mask> -->
-
-			<!-- <view class="example">
-				<view class="example-title">从左侧滑出</view>
-				<button @click="showDrawer">显示抽屉</button>
-			</view> -->
-			<!-- <view class="example">
-				<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="showGuide('level-game-tip',{levelType:'rotationJump'})">显示 level-game-tip</button>
@@ -283,15 +214,16 @@
 		</scroll-view>
 
 		<!-- 底部中间上滑按钮 -->
-		<view class="flex flex-direction justify-end align-center task-up-button" @tap="showModal"
+		<view class="flex flex-direction justify-start align-center task-up-button" @tap="showModal"
 			data-target="slideUpModal">
 			<!-- <image style="width: 156rpx; height: 32rpx;" src="../../../static/personal/slideUp.png" @tap="showModal"
 				data-target="slideUpModal"></image> -->
-			<image style="width: 147px;height: 31px; top: -6px;" class="position-absolute-center"
-				src="../../../static/modal/level-tip/level-tip-bg@2x.png"></image>
-			<image style="width: 30px;height: 23px; " src="../../../static/modal/level-tip/level-tip-logo@2x.png">
-			</image>
-			<view style="width: 100%;height: 16rpx; background-color: #FFFFFF; color: #FFFFFF;"></view>
+			<image style="width: 248rpx;height: 104rpx;" class="position-absolute-center"
+				src="../../../static/modal/level-tip/level-tip-bg-orange.png"></image>
+			<view class="text-blue bg-white radius " style="z-index: 10; margin-top: 20rpx; width: 72rpx; height: 12rpx;"></view>
+			<!-- <image style="width: 30px;height: 23px; " src="../../../static/modal/level-tip/level-tip-logo@2x.png">
+			</image> -->
+			<!-- <view style="width: 100%;height: 16rpx; background-color: #FFFFFF; color: #FFFFFF;"></view> -->
 		</view>
 
 		<!-- 右下角导航栏 -->
@@ -421,13 +353,14 @@
 		<!-- 任务栏 -->
 		<view class="cu-modal bottom-modal" :class="modalName=='slideUpModal'?'show':''" @tap="hideModal">
 			<view class="cu-dialog bg-white" style="border-radius: 15px 15px 0 0 ;" @tap.stop="">
-				<view class="flex justify-center align-center position-relative" style="width: 750rpx; height: 64rpx;"
+				<view class="flex justify-center align-center position-relative"
+				 style="width: 750rpx; height: 64rpx; background-color: RGBA(255, 153, 0, 1);"
 					@tap="hideModal">
-					<view class="text-blue make-bg-bPurple radius" style="width: 80rpx; height: 4px;"></view>
-					<view class="position-absolute-right-top">
+					<view class="text-blue bg-white radius" style="width: 114rpx; height: 12rpx;"></view>
+					<!-- <view class="position-absolute-right-top">
 						<image style="width: 64rpx;height: 64rpx;" src="../../../static/common/modal/task-close@2x.png">
 						</image>
-					</view>
+					</view> -->
 				</view>
 				<view class="flex justify-between" style="width: 100%; padding: 34rpx 60rpx 46rpx 81rpx;">
 					<view class="flex align-center justify-center">
@@ -814,7 +747,7 @@
 
 				},
 				defaultAJData: null,
-				bGamePlaying:false,
+				bGamePlaying: false,
 				/**
 				 * 任务参数
 				 */
@@ -1110,14 +1043,14 @@
 					 * 判断下游戏是否进行中,进行中不能切换
 					 */
 					uni.showToast({
-						title:'游戏进行中,不能选择关卡。',
-						icon:'none',
-						mask:true
+						title: '游戏进行中,不能选择关卡。',
+						icon: 'none',
+						mask: true
 					})
 					return;
 				}
-				
-				
+
+
 				this.modalName = e.currentTarget.dataset.target;
 				this.$store.state.bCanvasShow = false;
 
@@ -2034,7 +1967,9 @@
 				if (1 === this.currentModeIndex) {
 					if (this.currentJumpTask == null) {
 						console.log("**************11");
-						this.onTipLevel({hiddenType: 'normal'});
+						this.onTipLevel({
+							hiddenType: 'normal'
+						});
 						if (this.guideUnlockState.firstPromptSelectLevel) {
 							// this.onTipLevel();
 							let guideUnlockState = Object.assign(this.guideUnlockState, {
@@ -2856,7 +2791,7 @@
 					});
 					uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
 					console.log('onActionJumpGameOver 任务结束');
-					
+
 					this.bGamePlaying = false;
 				}
 
@@ -3395,12 +3330,18 @@
 
 <style>
 	.bg-person {
-		background-color: #9797ff;
+		/* background-color: #9797ff; */
+		background-color: #00003D;
+		
+		/* #ifdef H5 */
+		/* background-size:750rpx 1622rpx;
+		background-image: url(../../../static/modal/action-jump/temp-tip.png); */
+		/* #endif */
 	}
 
 	.plan-view {
 		overflow: hidden;
-		background-color: #9797ff;
+		/* background-color: #9797ff; */
 	}
 
 	.plan-l-tip-view {
@@ -3429,13 +3370,11 @@
 
 	/*样式的width和height一定要与定义的cWidth和cHeight相对应*/
 	.qiun-charts-arcbar {
-		/* padding: 20rpx 15rpx; */
-		/* margin-top: 60rpx; */
-		height: 480rpx;
+		height: 376rpx;
 		position: relative;
 		width: 750rpx;
-
 		/* border: 1rpx solid #fff; */
+		/* background-color: RGBA(30, 30, 85, 1); */
 	}
 
 	.charts-arcbar {
@@ -4055,11 +3994,12 @@
 		/* #ifdef APP-PLUS */
 		position: fixed;
 		/* #endif */
-		bottom: 0;
+		bottom: -53rpx;
 		right: 0;
 		left: 0;
 		margin: auto;
 		width: 100%;
-		height: 82rpx;
+		height: 104rpx;
+		/* border: 1rpx solid #000000; */
 	}
 </style>

BIN
static/common/sideBar/diamond_black@2x.png


BIN
static/common/sideBar/gold_black@2x.png


BIN
static/modal/action-jump/jump-tip-orange@2x.png


BIN
static/modal/action-jump/mid-button-orange@2x.png


BIN
static/modal/action-jump/progress-tip-add.png


BIN
static/modal/action-jump/progress-tip.png


BIN
static/modal/action-jump/temp-tip.png


BIN
static/modal/level-tip/level-tip-bg-orange.png


BIN
static/personal/connecting-orange.png


BIN
static/personal/disconnect-orange.png


+ 5 - 0
util/util-css/main-nvue.css

@@ -430,3 +430,8 @@
 	width: 20px;
 	height: 20px;
 }
+
+.png-more-black {
+	width: 16px;
+	height: 16px;
+}

+ 12 - 0
util/util-css/main.css

@@ -4154,6 +4154,10 @@ scroll-view.cu-steps .cu-item {
 	width: 20px;
 	height: 20px;
 }
+.png-more-black {
+	width: 16px;
+	height: 16px;
+}
 
 .card-view {
 	/* border: 1rpx solid #000000; */
@@ -4545,6 +4549,14 @@ scroll-view.cu-steps .cu-item {
 	align-items: center;
 }
 
+.position-absolute-center-bottom {
+	position: absolute;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	align-items: center;
+}
+
 .position-absolute-right-top {
 	position: absolute;
 	right: 0;