Pārlūkot izejas kodu

1.添加任务栏,2.添加好友相关页面

slambb 4 gadi atpakaļ
vecāks
revīzija
8e10b1058e

+ 203 - 0
components/hans-tabbar/hans-tabbar.vue

@@ -0,0 +1,203 @@
+<template>
+	<view class="weui-tabbar" :class="extClass">
+		<!-- 选中的时候往weui-tabbar__item加class:weui-bar__item_on -->
+		<view @click="tabChange(index)" v-for="(item, index) in list" :key="index" class="weui-tabbar__item"
+			:class="{'weui-bar__item_on':index === current}">
+			<view style="position: relative;display:inline-block;">
+				<image :src="current === index ? item.selectedIconPath : item.iconPath" class="weui-tabbar__icon">
+				</image>
+			</view>
+			<view class="weui-tabbar__label">{{ item.text }}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			// list: {
+			// 	type: Array,
+			// 	default: function() {
+			// 		return []
+			// 	}
+			// }
+		},
+		data() {
+			return {
+				extClass: '',
+				current: 0,
+				list:[]
+			};
+		},
+
+		created() {
+			// "tabBar":{
+			//         "color":"#AAABAD",
+			//         "selectedColor":"#9797FF",
+			//         "backgroundColor":"#FFFFFF",
+			//         "borderStyle":"#eee",
+			// 		"height":"75px",
+			// 		"spacing":"6px",
+			//         "list":[
+			//             {
+			//                 "pagePath":"pages/personal-page/personal/personal",
+			//                 "text":"首页",
+			//                 "iconPath":"./static/common/navigationBar/nHome.png",
+			//                 "selectedIconPath":"static/common/navigationBar/nHomeB.png"
+			//             },
+			//             {
+			//                 "pagePath":"pages/personal-page/plan/plan",
+			//                 "text":"计划",
+			//                 "iconPath":"static/common/navigationBar/nPlan.png",
+			//                 "selectedIconPath":"static/common/navigationBar/nPlanB.png"
+			//             },{
+			//                 "pagePath":"pages/game-page/game/game",
+			//                 "text":"游戏",
+			//                 "iconPath":"static/common/navigationBar/nGame.png",
+			//                 "selectedIconPath":"static/common/navigationBar/nGameB.png"
+			//             },
+			// 			{
+			// 			    "pagePath":"pages/game-page/game/game",
+			// 			    "text":"视频",
+			// 			    "iconPath":"static/common/navigationBar/nVideo.png",
+			// 			    "selectedIconPath":"static/common/navigationBar/nVideoB.png"
+			// 			},
+			//             {
+			//                 "pagePath":"pages/my-page/homepage/homepage",
+			//                 "text":"我的",
+			//                 "iconPath":"static/common/navigationBar/nMy.png",
+			//                 "selectedIconPath":"static/common/navigationBar/nMyB.png"
+			//             }
+			//         ]
+			//     }
+			this.list = [{
+					"pagePath": "../../personal-page/personal/personal",
+					"text": "首页",
+					"iconPath": "/static/common/navigationBar/nHome.png",
+					"selectedIconPath": "/static/common/navigationBar/nHomeB.png"
+				},
+				{
+					"pagePath": "../../personal-page/plan/plan",
+					"text": "计划",
+					"iconPath": "/static/common/navigationBar/nPlan.png",
+					"selectedIconPath": "/static/common/navigationBar/nPlanB.png"
+				}, {
+					"pagePath": "../../game-page/game/game",
+					"text": "游戏",
+					"iconPath": "/static/common/navigationBar/nGame.png",
+					"selectedIconPath": "/static/common/navigationBar/nGameB.png"
+				},
+				{
+					"pagePath": "../../game-page/game/game",
+					"text": "视频",
+					"iconPath": "/static/common/navigationBar/nVideo.png",
+					"selectedIconPath": "/static/common/navigationBar/nVideoB.png"
+				},
+				{
+					"pagePath": "../../my-page/homepage/homepage",
+					"text": "我的",
+					"iconPath": "/static/common/navigationBar/nMy.png",
+					"selectedIconPath": "/static/common/navigationBar/nMyB.png"
+				}
+			];
+			const value = uni.getStorageSync('tabbarCurrentIndex');
+			if (value) {
+				this.current = value;
+			}
+
+		},
+		methods: {
+			tabChange(index) {
+				if (index === this.current) {
+					return;
+				}
+				this.current = index;
+				this.$emit('tabChange', index)
+
+				uni.setStorageSync('tabbarCurrentIndex', this.current);
+				uni.reLaunch({
+					url: this.list[this.current].pagePath,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+				console.log('tabChange');
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.weui-tabbar {
+		display: flex;
+		position: relative;
+		z-index: 500;
+		height: 75px;
+		background-color: #ffffff;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.weui-tabbar:before {
+		content: ' ';
+		position: absolute;
+		left: 0;
+		top: 0;
+		right: 0;
+		height: 1px;
+		border-top: 1rpx solid rgba(0, 0, 0, 0.1);
+		color: rgba(0, 0, 0, 0.1);
+	}
+
+	.weui-tabbar__item {
+		display: block;
+		flex: 1;
+		padding: 8px 0 4px;
+		padding-bottom: calc(8px + constant(safe-area-inset-bottom));
+		padding-bottom: calc(8px + env(safe-area-inset-bottom));
+		font-size: 0;
+		color: rgba(0, 0, 0, 0.5);
+		text-align: center;
+		-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+	}
+
+	.weui-tabbar__item:first-child {
+		padding-left: constant(safe-area-inset-left);
+		padding-left: env(safe-area-inset-left);
+	}
+
+	.weui-tabbar__item:last-child {
+		padding-right: constant(safe-area-inset-right);
+		padding-right: env(safe-area-inset-right);
+	}
+
+	.weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon,
+	.weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon>i,
+	.weui-tabbar__item.weui-bar__item_on .weui-tabbar__label {
+		color: #9797FF;
+	}
+
+	.weui-tabbar__icon {
+		display: inline-block;
+		width: 28px;
+		height: 28px;
+		margin-bottom: 2px;
+	}
+
+	i.weui-tabbar__icon,
+	.weui-tabbar__icon>i {
+		font-size: 24px;
+		color: rgba(0, 0, 0, 0.5);
+	}
+
+	.weui-tabbar__icon image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.weui-tabbar__label {
+		color: #bfbfbf;
+		font-size: 10px;
+		line-height: 1.4;
+	}
+</style>

+ 123 - 90
components/modal/action-jump/action-jump.vue

@@ -1,12 +1,12 @@
 <template>
-	<view>
+	<view style="width: 750rpx;">
 
 		<view class="flex justify-center" style="height: 75px; margin-top: 46rpx;">
 			<!-- 计时器 -->
-			<view class="action-jump-timer flex justify-center">
+			<!-- <view class="action-jump-timer flex justify-center">
 				<boxingCountDown ref="boxingCountDownRef" :show-day="false" :second="showTime" color="#FFFFFF"
 					background-color="rgba(255,255,255,0);" border-color="#007AFF" splitorColor="#FFFFFF" />
-			</view>
+			</view> -->
 
 			<view class="grid-progress-vertical-container" style="top:-460rpx; ">
 				<view class="grid-progress-vertical-bar">
@@ -46,12 +46,12 @@
 
 		</view>
 
-		<view class="action-jump-parent margin-bottom">
+		<!-- 	<view class="action-jump-parent margin-bottom">
 			<view class="action-jump-container">
-				<canvas canvas-id="actionJumpCanvas"
-					:style="{ width: canvasW + 'px', height: canvasH + 'px' }"></canvas>
+				
 			</view>
-		</view>
+		</view> -->
+		<canvas canvas-id="actionJumpCanvas" :style="{ width: canvasW + 'px', height: canvasH + 'px' }"></canvas>
 
 		<view class="flex align-center justify-center" style="font-size: 14px;">
 			<view style="position: relative;">
@@ -94,17 +94,20 @@
 
 		<!-- 测试按钮 -->
 		<view style="display: flex;justify-content: space-between;">
-			<button @click="startJumpGame">startGame</button>
-			<button @click="onClear">onClear</button>
+			<!-- <button @click="startJumpGame">startGame</button> -->
+			<!-- <button @click="onClear">onClear</button> -->
+			<view>{{isY?'Y':'X'}}</view>
+			<button @click="onChangeY">Y为旋转轴</button>
+			<button @click="onChangeX">X为旋转轴</button>
 		</view>
 
-		<view style="display: flex;justify-content: space-between;" class="margin-top margin-bottom">
+		<!-- <view style="display: flex;justify-content: space-between;" class="margin-top margin-bottom">
 			<button @click="onJumpType(0)">jump</button>
 			<button @click="onJumpType(1)">left</button>
 			<button @click="onJumpType(2)">right</button>
 			<button @click="onJumpType(3)">rLeft</button>
 			<button @click="onJumpType(4)">rRight</button>
-		</view>
+		</view> -->
 
 		<view style="display: flex;justify-content: space-around;">
 			<view style="font-size: 14px;">t:{{countdown}}</view>
@@ -117,15 +120,18 @@
 </template>
 
 <script>
-	import boxingCountDown from '@/components/uni-count-down/uni-count-down.vue'
+	// import boxingCountDown from '@/components/uni-count-down/uni-count-down.vue'
 
 
 	import ActionJump from "@/util/util-js/action/jump.js"
 
+	import {
+		mapMutations
+	} from 'vuex';
 
 	export default {
 		components: {
-			boxingCountDown
+			// boxingCountDown
 		},
 		props: {
 			showTime: {
@@ -135,6 +141,7 @@
 		},
 		data() {
 			return {
+				isY: true,
 				//满格的数值是 25
 				maxShowCount: 25,
 				//显示的点
@@ -242,53 +249,33 @@
 
 		created() {
 			let _self = this;
-
-			this.onLoadImage();
-
 			this.actionJumpCanvas = uni.createCanvasContext("actionJumpCanvas", this);
 			// console.log("this.actionJumpCanvas:", this.actionJumpCanvas);
-
 			this.SystemInfo = uni.getSystemInfoSync();
 			this.canvasW = this.SystemInfo.windowWidth; // 画布宽度
 			this.canvasH = 114;
+			this.onLoadImage();
 
-			// this.xA = 0;
-			// this.yA = 0;
-			// this.zA = 0;
-			// this.bJump = false;
-
-			_self.actionJumpObj = new ActionJump();
-
-			_self.actionJumpObj.addEventListener('resultant', (e) => {
-				if (e.type == 'jump') {
-					// this.jumpCount++;
-					this.bJump = true;
-				} else if (e.type == 'peakOfWave') {} else if (e.type == 'valleyOfWave') {} else if (e.type ==
-					'curAngle') {
-					// if (e.value > 0) {
-					//     this.rotate.rotation = 180;
-					//     this.playerControScript.leftJump();
-					// } else {
-					//     this.rotate.rotation = 0;
-					//     this.playerControScript.rightJump();
-					// }
-				} else if (e.type == 'rotate') {
-
-				} else if (e.type == 'stateDataOfJump') {
-					//发送给game,在game里面处理判断
-					this.listenStateDataOfJump(e);
-				} else if (e.type == 'bUpdateDraw') {
-
-				} else if (e.type == 'stop') {
-
-					this.onClearData();
-					console.log('stop');
-				}
-
-
-			})
+			this.onListenActionJump();
 		},
 		methods: {
+			...mapMutations(['onWriteBLEConnectionValue']),
+			onListenActionJump() {
+				let _self = this;
+				_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();
+						// console.log('stop');
+					}
+				})
+			},
 			//load 相关图片
 			onLoadImage() {
 				let _self = this;
@@ -344,7 +331,7 @@
 					success: function(image) {
 						_self.jumpNormalImage = image;
 
-
+						console.log('-------------------》宽度:', _self.canvasW);
 						_self.onDrawBg();
 					}
 				});
@@ -502,7 +489,7 @@
 			},
 			//单纯的绘制八个背景
 			onDrawBg() {
-				this.actionJumpCanvas.clearRect(0, 0, this.canvasW, 114);
+				this.actionJumpCanvas.clearRect(0, 0, this.canvasW, this.canvasH);
 				let _currentBgStartX = this.canvasW / 2;
 				let count = 4;
 				for (let i = 0; i < count; i++) {
@@ -626,6 +613,13 @@
 				this.resetJumpGame();
 
 				this.onDrawBg();
+
+				this.xA = 0;
+				this.yA = 0;
+				this.zA = 0;
+				this.bJump = false;
+
+				this.actionJumpObj.resetAll();
 			},
 
 			onJumpType(event) {
@@ -677,14 +671,34 @@
 			},
 			//控制播放
 			onControllerPlay() {
-				this.$emit("onControllerPlay");
-				this.bJumpPlay = !this.bJumpPlay;
+				// this.bJumpPlay = !this.bJumpPlay;
+
 				if (this.bJumpPlay) {
-					this.startJumpGame();
-				} else {
 					this.onClear();
+					this.onClearData();
+					this._changePlay();
+					
+					this.$emit("actionJumpControllerPlay", false);
+				} else {
+
+					this.$emit("actionJumpCheck");
+				}
+			},
+			//修改状态
+			_changePlay(bPlaying) {
+				if (bPlaying) {
+					this.bJumpPlay = bPlaying;
+				} else {
+					this.bJumpPlay = !this.bJumpPlay;
 				}
 			},
+			
+			onActionJumpPlay(){
+				this.onClear();
+				this.onClearData();
+				this.startJumpGame();
+				this._changePlay(true);
+			},
 
 			getCurrentJumpType() {
 				let _temp = this.spawnArray[this.index];;
@@ -732,22 +746,22 @@
 					currentMaxValue,
 					oGyroValue
 				} = data
-				console.log('====', data);
+				// console.log(data);
 				if (currentMaxValue == 0) {
 					//JumpType.NORMAL = 0
 					if (_jumpType == 0) {
-						console.log('1====', data);
+						// console.log('1====', data);
 						this.eliminateJumpPrefabFormTemp(_tempState);
 					}
 					//JumpType.RIGHT_ROTATE = 4
-					else if (_jumpType == 4 && oGyroValue < 0) {
-						console.log('right1:', oGyroValue);
+					else if (_jumpType == 4 && (!this.isY && oGyroValue < 0 || this.isY && oGyroValue > 0)) {
+						// console.log('right1:', oGyroValue);
 						_tempState[4].bTrigger = true;
 						this.eliminateJumpPrefabFormTemp(_tempState);
 					}
 					//JumpType.LEFT_ROTATE = 3
-					else if (_jumpType == 3 && oGyroValue > 0) {
-						console.log('left1:', oGyroValue);
+					else if (_jumpType == 3 && (!this.isY && oGyroValue > 0 || this.isY && oGyroValue < 0)) {
+						// console.log('left1:', oGyroValue);
 						_tempState[3].bTrigger = true;
 						this.eliminateJumpPrefabFormTemp(_tempState);
 					}
@@ -760,13 +774,24 @@
 						_tempState[2].bTrigger = true;
 					}
 
-					//如果是检测到旋转跳
-					if (oGyroValue < -5) {
-						console.log('right:', oGyroValue);
-						_tempState[4].bTrigger = true;
-					} else if (oGyroValue > 5) {
-						console.log('left:', oGyroValue);
-						_tempState[3].bTrigger = true;
+					if (this.isY) {
+						//如果是检测到旋转跳
+						if (oGyroValue > 5) {
+							// console.log('y right:', oGyroValue);
+							_tempState[4].bTrigger = true;
+						} else if (oGyroValue < -5) {
+							// console.log('y left:', oGyroValue);
+							_tempState[3].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;
+						}
 					}
 
 					this.eliminateJumpPrefabFormTemp(_tempState);
@@ -815,6 +840,7 @@
 			 * 识别跳部分数据处理
 			 */
 			onBLERopeUpdate(gameData) {
+				if (!this.bJumpPlay) return;
 				//********陀螺仪角速度********
 				let {
 					gx,
@@ -866,7 +892,9 @@
 						oGyroX: gx,
 						oGyroY: gy,
 						oGyroZ: gz
-					}
+					},
+					//输入当前轴
+					bYAxis: this.isY,
 				};
 				this.actionJumpObj.updateJump(_temp);
 
@@ -874,35 +902,40 @@
 				if (this.BLEAccIndex > 150) {
 					this.onClearData();
 					this.bJump = false;
+					return;
 				}
 				this.BLEAccIndex++;
-				this.oldxA = this.xA;
 			},
 			onClearData() {
 				this.BLEAccIndex = 0;
+			},
+			onChangeY() {
+				this.isY = true;
+			},
+			onChangeX() {
+				this.isY = false;
 			}
 		}
 	}
 </script>
 
 <style lang="scss">
-	.action-jump-parent {
-		// border: 1rpx solid #ffaa7f;
-		position: relative;
-		display: flex;
-		justify-content: center;
-		overflow: hidden;
-		top: 0;
-		width: 750rpx;
-	}
-
-	.action-jump-container {
-		width: 100%;
-		height: 114px;
-		// border: 1rpx solid #000000;
-		position: relative;
-		// display: flex;
-	}
+	// .action-jump-parent {
+	// 	border: 1rpx solid #ffaa7f;
+	// 	position: relative;
+	// 	display: flex;
+	// 	justify-content: center;
+	// 	overflow: hidden;
+	// 	top: 0;
+	// 	width: 100%;
+	// }
+
+	// .action-jump-container {
+	// 	width: 100%;
+	// 	height: 114px;
+	// 	border: 1rpx solid #000000;
+	// 	position: relative;
+	// }
 
 	.mid-absolute {
 		position: absolute;

+ 67 - 15
components/side-bar/side-bar.vue

@@ -1,19 +1,21 @@
 <template>
 	<!-- @touchmove.stop.prevent="moveHandle" -->
 	<view class="content">
-		<view class="side-left" :data-position="pos" :prop="pos" :change:prop="side.sizeReady" @touchstart="side.touchstart"
-		 @touchmove="side.touchmove" @touchend="side.touchend" @change="change">
+		<view class="side-left" :data-position="pos" :prop="pos" :change:prop="side.sizeReady"
+			@touchstart="side.touchstart" @touchmove="side.touchmove" @touchend="side.touchend" @change="change">
 			<!-- 侧边栏 bshow-->
 			<view class="side-mask" v-if="bshow" @tap="closeSide"></view>
 			<view class="side-handle">
-				<view id="my-side-dialog" class="basis-xl bg-white selector-query-hock" :class="bOpen?'side-pointer':''" @tap.stop="">
+				<view id="my-side-dialog" class="basis-xl bg-white selector-query-hock" :class="bOpen?'side-pointer':''"
+					@tap.stop="">
 					<scroll-view scroll-y="true" class="selector-query-hock" style="height: 100%;width: 100%;">
 						<view class="cu-list menu text-left ">
-							<view class="bg-image text-white" style="margin-bottom: 60rpx; padding-bottom: 60rpx;">
+							<view class="bg-image text-white" style="margin-bottom: 50rpx; padding-bottom: 50rpx;">
 								<view class="blank-space"></view>
 								<view class="flex-sub text-center">
 									<view class="cu-avatar-group" style="position: relative; margin: 10rpx;">
-										<view class="cu-avatar round " style="width: 146rpx;height: 146rpx;" :style="[{ backgroundImage:'url('+avatarUrl+')' }]"></view>
+										<view class="cu-avatar round " style="width: 146rpx;height: 146rpx;"
+											:style="[{ backgroundImage:'url('+avatarUrl+')' }]"></view>
 
 									</view>
 
@@ -21,30 +23,51 @@
 										<image class="avatar-img bg-black" mode="aspectFit" :src="avatarUrl"></image>
 									</view> -->
 									<view class="flex justify-center align-center" @tap="onNavEditInfoPage">
-										<view style="font-weight: bold; color: #000000; font-size: 22px;">{{userName}}</view>
-										<image style="width: 34rpx;height: 34rpx; margin-left: 22rpx;" src="/static/sideEdit.png"></image>
+										<view style="font-weight: bold; color: #000000; font-size: 22px;">{{userName}}
+										</view>
+										<image style="width: 34rpx;height: 34rpx; margin-left: 22rpx;"
+											src="/static/sideEdit.png"></image>
 									</view>
 								</view>
 								<view class="flex flex-direction justify-center align-center">
 									<view class="bg-days margin">{{days}}天</view>
 									<view class="text-more text-gray">
-										{{signature!=='null'?signature:''}}
+										{{signature!=='null'?signature:'111111111'}}
+									</view>
+									<view class="flex justify-center align-center "
+										style="height: 52rpx; width: 412rpx; margin-top: 48rpx; ">
+										<view class=" flex align-center justify-center text-black" >
+											<view class="flex  align-center">
+												<image class="png-more" style="margin-right: 18rpx;"
+													src="/static/common/sideBar/sDiamond.png"></image>
+												<view class="text-bold" >1000</view>
+											</view>
+											<view class="flex  align-center" style="margin-left: 60rpx;">
+												<image class="png-more" style="margin-right: 18rpx;"
+													src="/static/common/sideBar/sGold.png"></image>
+												<view  class="text-bold" >1000</view>
+											</view>
+										</view>
 									</view>
 								</view>
+								
 
 							</view>
 
-							<view class="cu-item myarrow margin-view" v-for="(item,index) in sideList" :key="index" @tap="onNavListItem(item.page_type)">
+							<view class="cu-item myarrow margin-view" v-for="(item,index) in sideList" :key="index"
+								@tap="onNavListItem(item.page_type)">
 								<view class="content flex align-center margin-top margin-bottom">
-									<image :src="item.url" style="width: 34rpx;width: 34rpx; margin-bottom: 2rpx;margin-right:44rpx;" mode="aspectFit"></image>
+									<image :src="item.url"
+										style="width: 34rpx;width: 34rpx; margin-bottom: 2rpx;margin-right:44rpx;"
+										mode="aspectFit"></image>
 									<text class="text-black text-16px text-bold">{{item.name}}</text>
 								</view>
 
 							</view>
 
 							<view class="flex justify-center align-center " style="margin: 60px 0px;">
-								<button class="cu-btn round text-16px line-mGrey" style="width: 250rpx; height: 80rpx;" @tap="onExit"> <span
-									 style="color:#000000;">退出登录</span> </button>
+								<button class="cu-btn round text-16px line-mGrey" style="width: 250rpx; height: 80rpx;"
+									@tap="onExit"> <span style="color:#000000;">退出登录</span> </button>
 							</view>
 						</view>
 					</scroll-view>
@@ -86,14 +109,34 @@
 				show: {
 					type: Boolean,
 					default: false
-				}
+				},
+				deleyTimeoutObj: null,
 			}
 		},
+		// watch: {
+		// 	bshow(val) {
+		// 		console.log('watch bshow', val);
+		// 		if (val) {
+		// 			uni.hideTabBar();
+		// 		} else {
+		// 			uni.showTabBar({
+		// 				success: (success) => {
+		// 					console.log('success:',success);
+		// 				},
+		// 				fail: (fail) => {
+		// 					console.log('fail:',fail);
+		// 				}
+		// 			});
+		// 		}
+
+		// 	},
+		// },
 		mounted() {
 			// console.log("******",this.bshow);
 		},
 		methods: {
 			...mapMutations(['loginUserInfo', 'onLuanchLogin', 'delectToken']),
+
 			// 跳转我的页面
 			onNavMyPage() {
 				uni.navigateTo({
@@ -133,6 +176,9 @@
 					case "feedback":
 						url = '/pages/login-page/feedback/feedback';
 						break;
+					case "friend":
+						url = '/pages/friend-page/main/main';
+						break;
 				}
 				uni.navigateTo({
 					url: url,
@@ -161,6 +207,10 @@
 				// console.log("showModal:",this.show);
 				this.bshow = true;
 				this.show = true;
+				
+				uni.hideTabBar({
+					
+				})
 			},
 			hideModal() {
 				// console.log("hideModal");
@@ -168,11 +218,13 @@
 				this.show = false;
 				this.$store.state.bCanvasShow = true;
 				this.$emit("hideSideBar");
+				
+				uni.showTabBar({
+					
+				})
 			},
-
 			change(e) {
 				// console.log("side change:", e);
-
 				if (e.close) {
 					this.hideModal();
 					this.bOpen = false;

+ 8 - 0
components/side-bar/sideBar.js

@@ -37,6 +37,14 @@ export default {
 		page_type: "ranking",
 	}
 	 ,
+	 
+	 {
+	 	id: 7,
+	 	type: 'image',
+	 	url: '/static/friend.png',
+	 	name: '好友',
+	 	page_type: "friend",
+	 },
 	// {
 	// 	id: 5,
 	// 	type: 'image',

+ 2 - 2
manifest.json

@@ -77,12 +77,12 @@
                 "androidStyle" : "default",
                 "android" : {
                     "xxhdpi" : "",
-                    "xhdpi" : "D:/BaiduYunDownload/uniapp资源/splash.png"
+                    "xhdpi" : "D:/uniapp资源/splash.png"
                 }
             },
             "icons" : {
                 "android" : {
-                    "xhdpi" : "D:/BaiduYunDownload/uniapp资源/icon.png"
+                    "xhdpi" : "D:/uniapp资源/icon.png"
                 }
             }
         },

+ 27 - 0
pages.json

@@ -225,6 +225,33 @@
             }
             
         }
+        ,{
+            "path" : "pages/friend-page/search/search",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/friend-page/main/main",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/friend-page/select/select",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 2 - 0
pages/Loading-page/Loading/Loading.vue

@@ -66,11 +66,13 @@
 			...mapMutations(['accountLogin']),
 			onNavTo(navType) {
 				// uni.hideToast();
+				console.log('navType:',navType);
 				if (navType == "userInfo") {
 					uni.redirectTo({
 						url: "../../my-page/userInfo/userInfo"
 					})
 				} else if (navType == "personal") {
+					// uni.redirectTo({
 					uni.redirectTo({
 						url: "../../personal-page/personal/personal"
 					})

+ 76 - 0
pages/friend-page/main/main.vue

@@ -0,0 +1,76 @@
+<template>
+	<view>
+		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" @clickRight="onNavSearchFriend()" title="我的好友" color="#000000" fixed="true"
+			:border="false">
+			<view slot="left">
+				<view class=" flex align-center margin-left">
+					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
+				</view>
+			</view>
+			<view slot="right">
+				<view class=" flex align-center margin-left">
+					<image class="p-left-arrow" src="../../../static/friend/add.png"></image>
+				</view>
+			</view>
+		</uni-nav-bar>
+
+
+
+		<view class="cu-list menu-avatar margin-top">
+			<view class="cu-item card-view" style="height: 180rpx;" v-for="(item, index) in 10" :key="index">
+				<view class="cu-avatar round lg"
+					style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg);">
+					<view class="cu-tag badge">99+</view>
+				</view>
+				<view class="content" style="width: 360rpx;">
+					<view class="text-grey">凯尔</view>
+					<view class="text-gray text-sm flex">
+						<view class="text-cut">
+							<text class="cuIcon-infofill text-red  margin-right-xs"></text>
+							我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。
+						</view>
+
+					</view>
+					<view class="text-gray text-sm flex">
+						<view class="text-cut">
+							<text class="cuIcon-infofill text-red  margin-right-xs"></text>
+							我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。
+						</view>
+
+					</view>
+				</view>
+				<view class="action" style="width: 160rpx; ">
+					<button class="cu-btn round make-lines-bPurple" style="width: 146rpx; right: 30rpx;">
+						添加</button>
+				</view>
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+			onBack() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			onNavSearchFriend(){
+				uni.navigateTo({
+					url:"../search/search"
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 37 - 0
pages/friend-page/search/search.vue

@@ -0,0 +1,37 @@
+<template>
+	<view>
+		<view class="cu-bar search bg-white">
+			<view class=" flex align-center margin-left" @click="onBack()">
+				<image class="p-left-arrow" src="/static/p-left-arrow.png"></image>
+			</view>
+			<view class="search-form round">
+				<text class="cuIcon-search"></text>
+				<input @focus="InputFocus" @blur="InputBlur" :adjust-position="false" type="text" placeholder="搜索图片、文章、视频" confirm-type="search"></input>
+			</view>
+			<view class="action">
+				<view class="text-16px make-text-bPurple" style="line-height: 32rpx;">搜索</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			onBack() {
+				uni.navigateBack({
+					delta: 1
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 22 - 0
pages/friend-page/select/select.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 1 - 1
pages/game-page/game-play-sub/subGame/subGame.nvue

@@ -2,7 +2,7 @@
 	<view class="web-view">
 		<!-- :src="url" src = 'http://192.168.0.112:7456/build/index.html' :src="LocationGameUrl" -->
 		<!-- @receivedtitle="onReceivedTitle"   @pagefinish="onPageFinish"-->
-		<web-view class="web-view-child" src = 'http://192.168.0.112:7456/build/index.html' ref="webview" @pagestart="onPageStart" @onPostMessage="handlePostMessage"
+		<web-view class="web-view-child" src = 'http://192.168.1.14:7456/build/index.html' ref="webview" @pagestart="onPageStart" @onPostMessage="handlePostMessage"
 		 @error="onError"></web-view>
 		<view class="web-back" @click="navBack">
 			<image style="width: 40rpx;height: 40rpx;" src="/static/gameCloseW.png"></image>

+ 262 - 69
pages/personal-page/personal/personal.vue

@@ -3,38 +3,35 @@
 		<!-- :title="title" @clickRight="onNavAppInfo()" -->
 		<!-- 自定义导航栏 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()" title="" color="#FFFFFF" fixed="true" :border="false">
+			@clickLeft="showClickEvent()" title="PK模式" 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="right">
-			</view> -->
-		</uni-nav-bar>
-		<view style="display: flex;position: absolute;top:30rpx;right: 40rpx; z-index: 10000;">
-			<view class=" flex  flex-direction" 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-top: 30rpx;">
-					<image class="png-more" style="margin-right: 18rpx;" src="/static/personal/cGold.png"></image>
-					<view>{{cGold}}</view>
+			<view slot="right">
+				<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>
-		</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="text-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'"
+							<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;">
@@ -69,9 +66,51 @@
 
 							</view>
 
+							<!-- pk模式下的跳绳 -->
+							<view v-if="currentMode == 'pkMode' && 1 === currentModeIndex" class="flex justify-around "
+								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>
+										<HitEffect ref="aiHitEffectRef"></HitEffect>
+									</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 ">
+									<LEDFont style="" :showValue='99' :size="30" color='#FFFFFF'>
+									</LEDFont>
+									<view class="text-white text-bold">:</view>
+									<LEDFont style="" :showValue='99' :size="30" color='#FFFFFF'>
+									</LEDFont>
+								</view>
+								<view class="flex flex-direction justify-center align-center">
+									<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 text-center">
+										{{aiObj.name}}
+									</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>
 
 							<!-- 圆形进度条 -->
-							<view v-else class="qiun-charts-arcbar">
+							<view
+								v-if="(currentMode == 'pkMode' && 1 === currentModeIndex)||currentMode== 'calorieMode'"
+								class="qiun-charts-arcbar">
 								<!-- 进度条 -->
 								<canvas canvas-id="canvasArcbar" id="canvasArcbar" class="charts-arcbar "></canvas>
 								<!-- 图标 -->
@@ -100,11 +139,39 @@
 										</view>
 									</view>
 								</view> -->
+
+								<!-- 计时器 -->
+								<view class="personal-fruit-container">
+									<arcbarCountDown style="margin-top: 200px;" ref="arcbarCountDownRef"
+										:show-day="false" :second="0" color="#FFFFFF"
+										background-color="rgba(255,255,255,0);" border-color="#007AFF"
+										splitorColor="#FFFFFF" />
+								</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="projectButtonView" style="position: absolute;left: 0;top: 18px;">
@@ -136,7 +203,8 @@
 							</view>
 
 							<view id='actionJumpID' v-if="true" class="charts-pring-bottom">
-								<action-jump ref="actionJumpRef" @onControllerPlay="onPersonalCheck"></action-jump>
+								<action-jump ref="actionJumpRef" @actionJumpCheck="onPersonalCheck"
+									@actionJumpControllerPlay="onBoxingPostControlPlay"></action-jump>
 							</view>
 							<!-- <button @tap="onTestAddLocalCalorie">11</button> -->
 						</view>
@@ -170,7 +238,7 @@
 									<view class="make-text-bPurple" style="margin-left: 10rpx;">120斤</view>
 								</view> -->
 							</view>
-							<view class="text-xl padding">
+							<view class="text-xl padding text-center">
 								<view class="make-text-bPurple">
 									{{ weight }}公斤
 									<!-- <span class="text-11px text-gray "> (过重)</span> -->
@@ -400,8 +468,19 @@
 			</view>
 		</scroll-view>
 
+		<!-- 底部中间上滑按钮 -->
+		<view
+			style="z-index: 10; position: absolute;bottom: -10px;right: 0;left: 0; margin: auto; width: 750rpx; height: 68rpx; "
+			class="flex flex-direction justify-center align-center">
+			<image style="width: 156rpx; height: 32rpx;" src="../../../static/personal/slideUp.png" @tap="showModal"
+				data-target="slideUpModal"></image>
+			<view style="width: 100%;,height: 36rpx; background-color: #FFFFFF; color: #FFFFFF;">0</view>
+		</view>
+
 		<!-- 右下角导航栏 -->
 		<!-- <round-menu @trigger="onRoundTrigger"></round-menu> -->
+		<!-- 底部操作条 -->
+		<!-- <myTabbar style="position:fixed;bottom:0;width:100%;left:0;right:0;" ></myTabbar> -->
 
 		<!-- 侧边栏 -->
 		<sideBar ref="sideBar"></sideBar>
@@ -522,6 +601,70 @@
 		<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" style="width: 100%; height: 60rpx;" @tap="hideModal">
+					<view class="text-blue make-bg-bPurple radius" style="width: 80rpx; height: 4px;"></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;">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" >
+							<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;">健身模式</view>
+							</view>
+						</button>
+					</view>
+					
+				</view>
+				<view class="my-column-cu-steps">
+					<view class="cu-item" :class="index>basics?'':'make-text-bPurple'"
+						v-for="(item,index) in basicsList" :key="index">
+						<!-- <text :class="'cuIcon-' + item.cuIcon"></text> -->
+						<image v-if="index>basics" class="my-column-cu-image"
+							src="../../../static/common/modal/lock.png"></image>
+						<image v-else class="my-column-cu-image" src="../../../static/common/modal/unLock.png"></image>
+						<view class="content">
+							<!-- 这是第一次,我家的铲屎官走了这么久。久到足足有三天!! -->
+							<view class="text-15px text-bold text-cut text-left "
+								style="margin-left: 48rpx; width: 360rpx;">
+								{{index+1}}. 拉伸运动拉伸运动拉伸运动拉伸运动
+							</view>
+							<view class="flex justify-start align-center" style="margin-left: 86rpx;">
+								<!-- 居中绘制星星样式 -->
+								<view class="flex align-center justify-center"
+									style="margin-right: 36rpx;margin-top: 4rpx;">
+									<image style="width: 24rpx;height: 26rpx; margin-right: 18rpx;"
+										src="/static/common/modal/reward.png"></image>
+									<view class="text-13px" style="line-height: 26rpx;">{{cDiamond}}</view>
+								</view>
+								<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 class="text-13px text-grey text-left" style="margin: 20rpx 20rpx 0 86rpx;">
+								本关卡是为了让用户开始放松,需要在两分钟内跳100下</view>
+						</view>
+
+						<image class="my-column-cu-right-image" src="../../../static/common/modal/medal.png"></image>
+
+					</view>
+				</view>
+
+				<button class="cu-btn make-bg-bPurple text-white" style="width: 604rpx;height: 88rpx;margin-bottom: 32rpx;" @tap="BasicsSteps">开始</button>
+
+			</view>
+		</view>
+
+
 	</view>
 </template>
 
@@ -545,6 +688,8 @@
 	import promptBox from "@/components/prompt-box/prompt-box.vue"
 
 	import roundMenu from "@/components/round-menu/round-menu.vue"
+	import myTabbar from "@/components/hans-tabbar/hans-tabbar.vue"
+
 	import codeElfGuide from '@/components/code-elf-guide/code-elf-guide.vue'
 
 	import boxingPost from "@/components/modal/boxing-post/boxing-post.vue"
@@ -566,6 +711,8 @@
 
 	import LEDFont from '@/components/LEDFont/LEDFont.vue'
 
+	import arcbarCountDown from '@/components/uni-count-down/uni-count-down.vue'
+
 	// 获取 module 
 	// var testModule = uni.requireNativePlugin("MyAttitude")
 	// const modal = uni.requireNativePlugin('modal');
@@ -606,7 +753,10 @@
 			elect,
 			character,
 			fruit,
+
 			roundMenu,
+			myTabbar,
+
 			codeElfGuide,
 			boxingPost,
 			boxingHit,
@@ -617,7 +767,8 @@
 			keyboardListener,
 
 			actionJump,
-			LEDFont
+			LEDFont,
+			arcbarCountDown
 		},
 
 		data() {
@@ -705,7 +856,7 @@
 					name: '匿名',
 					avatar: '/static/defaultAvatar.png'
 				},
-				currentMode: 'calorieMode', //pkMode calorieMode
+				currentMode: 'pkMode', //pkMode calorieMode
 
 				bHitShake: false,
 
@@ -719,7 +870,24 @@
 				 */
 				bGetBondTesting: false,
 
-
+				basicsList: [{
+						cuIcon: 'usefullfill',
+						name: '开始',
+						bLock: false,
+					}, {
+						cuIcon: 'radioboxfill',
+						name: '等待',
+						bLock: true,
+					},
+					{
+						cuIcon: 'roundclosefill',
+						name: '错误'
+					}, {
+						cuIcon: 'roundcheckfill',
+						name: '完成'
+					},
+				],
+				basics: 1,
 			};
 		},
 		onLoad() {
@@ -955,6 +1123,9 @@
 				'gCreateSandbagAlgorithm', 'gUpdateSandbagAlgorithm', 'gStartSimulateBLEUpdate',
 				'gStopSimulateBLEUpdate'
 			]),
+			BasicsSteps() {
+				this.basics = this.basics == this.basicsList.length - 1 ? 0 : this.basics + 1
+			},
 			onKeyDown(e) {
 				console.log(e);
 			},
@@ -1384,8 +1555,11 @@
 			//蓝牙断开连接时候
 			callbackCloseBLE() {
 				// this.$store.state.cIndex = -1;
-				//蓝牙断开连接后,直接关闭
-				this.$refs.boxingPostRef.onCloseDevices();
+
+				if (0 == this.currentModeIndex) {
+					//蓝牙断开连接后,直接关闭
+					this.$refs.boxingPostRef.onCloseDevices();
+				}
 
 				// if (!this.BLEConnectDevice) {
 				// 	console.log('连接蓝牙对象为空,不进行重连!');
@@ -1777,30 +1951,41 @@
 					// 	return;
 					// }
 
+				} else if (1 === this.currentModeIndex) {
+					//2.检测是否连接设备 || this.BLEConnectDevice.ename !== 'BT04'
+					if (this.cIndex == -1) {
+						//没有连接设备,提示去连接设备
+						uni.showToast({
+							title: '请连接蓝牙设备',
+							icon: 'none'
+						})
+						this.toView = "addDeviceView";
+						return;
+					}
 				}
 
 
 				//3.检测一下计划日期
 				console.log(this.remainingDays);
-				if (this.planData.startTime > this.planData.endTime || this.remainingDays == 0) {
-					if (!this.$store.state.bPlanExpired) {
-						this.$store.state.bPlanExpired = true;
-						setTimeout(() => {
-							this.$store.state.bPlanExpired = false;
-						}, 3000)
-						uni.showToast({
-							title: "计划到期,请制定计划。",
-							icon: 'none'
-						})
-					}
+				// if (this.planData.startTime > this.planData.endTime || this.remainingDays == 0) {
+				// 	if (!this.$store.state.bPlanExpired) {
+				// 		this.$store.state.bPlanExpired = true;
+				// 		setTimeout(() => {
+				// 			this.$store.state.bPlanExpired = false;
+				// 		}, 3000)
+				// 		uni.showToast({
+				// 			title: "计划到期,请制定计划。",
+				// 			icon: 'none'
+				// 		})
+				// 	}
 
-					this.$store.state.bGuidePages = true;
-					setTimeout(() => {
-						this.$refs.codeElfGuide.setCurrent(0);
-					}, 0)
-					this.toView = "projectButtonView";
-					return;
-				}
+				// 	this.$store.state.bGuidePages = true;
+				// 	setTimeout(() => {
+				// 		this.$refs.codeElfGuide.setCurrent(0);
+				// 	}, 0)
+				// 	this.toView = "projectButtonView";
+				// 	return;
+				// }
 
 				if (0 === this.currentModeIndex) {
 
@@ -1834,13 +2019,13 @@
 									value: "3"
 								});
 
-								setTimeout(() => {
-									//设置加速计b:20ms a:10ms
-									this.onWriteBLEConnectionValue({
-										value: config.refreshRate
-									});
+								// setTimeout(() => {
+								// 	//设置加速计b:20ms a:10ms
+								// 	this.onWriteBLEConnectionValue({
+								// 		value: config.refreshRate
+								// 	});
 
-								}, 1000)
+								// }, 1000)
 							}
 
 						}
@@ -1853,14 +2038,19 @@
 					}
 
 				} else if (1 == this.currentModeIndex) {
-					console.log();
 					if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
 						//打开跳绳模式
-						this.B_OpenRopeSkipping();
+						// this.B_OpenRopeSkipping();
+						this.onWriteBLEConnectionValue({
+							value: "3"
+						});
 					}
 					//监听蓝牙回调
 					uni.$on('updateBLEDeviceData', this.callbackUpdateBLEData);
-					
+
+					//调用开始
+					this.$refs.actionJumpRef.onActionJumpPlay();
+
 				}
 			},
 			onShowBoxingHitTip() {
@@ -2099,6 +2289,14 @@
 						if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
 							this.B_CloseRopeSkipping();
 						} else {
+							console.log("停止时候,上传卡路里");
+							this.$refs.boxingPostRef.onBoxingPostStop();
+
+
+							//停止时候,重置ai信息
+							this.aiObj.name = this.aiOldObj.name;
+							this.aiObj.avatar = this.aiOldObj.avatar;
+
 							//停止蓝牙加速计
 							this.onWriteBLEConnectionValue({
 								value: "4"
@@ -2106,27 +2304,22 @@
 						}
 
 					}
-
-
-
 					uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
 
-					console.log("停止时候,上传卡路里");
-					this.$refs.boxingPostRef.onBoxingPostStop();
-
 					this.syncRequestEvent({
 						success: () => {
 							this.updateArcbarData();
 						}
 					});
 
-					//停止时候,重置ai信息
-					this.aiObj.name = this.aiOldObj.name;
-					this.aiObj.avatar = this.aiOldObj.avatar;
 
 				} else {
-					//如果不是,继续调用播放
-					this.$refs.boxingPostRef.onBoxingPostPlay(true);
+					if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
+						this.$refs.actionJumpRef.onActionJumpPlay();
+					} else {
+						//如果不是,继续调用播放
+						this.$refs.boxingPostRef.onBoxingPostPlay(true);
+					}
 				}
 
 			},
@@ -2189,13 +2382,13 @@
 							value: "3"
 						});
 
-						setTimeout(() => {
-							//设置加速计b:20ms a:10ms
-							this.onWriteBLEConnectionValue({
-								value: config.refreshRate
-							});
+						// setTimeout(() => {
+						// 	//设置加速计b:20ms a:10ms
+						// 	this.onWriteBLEConnectionValue({
+						// 		value: config.refreshRate
+						// 	});
 
-						}, 1000)
+						// }, 1000)
 					}
 
 					//监听蓝牙回调
@@ -2474,7 +2667,7 @@
 		background-color: rgba(246, 243, 249, 255);
 		padding-bottom: 20rpx;
 		border-radius: 80rpx 80rpx 0 0;
-		width: 100%;
+		width: 750rpx;
 		overflow: hidden;
 	}
 

+ 1 - 1
pages/personal-page/plan/plan.vue

@@ -97,7 +97,7 @@
 				<myPicker v-if="modalName == 'showPickerModal' ? true:false" :pickerObj="pickerObj" @confirmEvent="onConfirm"
 				 @cancelEvent="onCancel"></myPicker>
 			</view>
-		</view>
+		</view>z
 	</view>
 </template>
 

BIN
static/common/modal/lock.png


BIN
static/common/modal/medal.png


BIN
static/common/modal/reward.png


BIN
static/common/modal/right-arrow.png


BIN
static/common/modal/unLock.png


BIN
static/common/sideBar/sDiamond.png


BIN
static/common/sideBar/sGold.png


BIN
static/friend.png


BIN
static/friend/add.png


BIN
static/personal/linkWhite.png


BIN
static/personal/slideUp.png


BIN
static/personal/switchWhite.png


+ 199 - 1
util/util-css/main.css

@@ -2068,6 +2068,97 @@ button.cuIcon.lg {
 	margin-top: 20upx;
 }
 
+/* ==================
+        slam custom 时间轴
+ ==================== */
+
+.slam-cu-timeline {
+	display: block;
+	background-color: #ffffff;
+}
+
+.slam-cu-timeline .slam-cu-time {
+	width: 120upx;
+	text-align: center;
+	padding: 20upx 0;
+	font-size: 26upx;
+	color: #888;
+	display: block;
+}
+
+.slam-cu-timeline>.slam-cu-item {
+	padding: 30upx 30upx 30upx 120upx;
+	position: relative;
+	display: block;
+	z-index: 0;
+}
+
+.slam-cu-timeline>.slam-cu-item:not([class*="text-"]) {
+	color: #ccc;
+}
+
+.slam-cu-timeline>.slam-cu-item::after {
+	content: "";
+	display: block;
+	position: absolute;
+	width: 1upx;
+	border: 1upx dashed #9797FF;
+	left: 73upx;
+	height: 100%;
+	top: 0;
+	z-index: 8;
+}
+
+.slam-cu-timeline>.slam-cu-item::before {
+	font-family: "cuIcon";
+	display: block;
+	position: absolute;
+	top: 0upx;
+	z-index: 9;
+	/* background-color: #ffffff; */
+	width: 76upx;
+	height: 76upx;
+	text-align: center;
+	border: none;
+	line-height: 76upx;
+	left: 36upx;
+	background-color: RGBA(235, 235, 255, 1);
+
+	font-size: 20px;
+
+	border-radius: 25px;
+}
+
+.slam-cu-timeline>.slam-cu-item:not([class*="cuIcon-"])::before {
+	content: "\e763";
+}
+
+.slam-cu-timeline>.slam-cu-item[class*="cuIcon-"]::before {
+	/* background-color: #ffffff; */
+	width: 76upx;
+	height: 76upx;
+	text-align: center;
+	border: none;
+	line-height: 76upx;
+	left: 36upx;
+}
+
+.slam-cu-timeline>.slam-cu-item>.content {
+	padding: 30upx;
+	border-radius: 6upx;
+	display: block;
+	line-height: 1.6;
+}
+
+.slam-cu-timeline>.slam-cu-item>.content:not([class*="bg-"]) {
+	background-color: #f1f1f1;
+	color: #333333;
+}
+
+.slam-cu-timeline>.slam-cu-item>.content+.content {
+	margin-top: 20upx;
+}
+
 /* ==================
          聊天
  ==================== */
@@ -4014,11 +4105,13 @@ scroll-view.cu-steps .cu-item {
 }
 
 /* 蓝紫 */
-.make-line-bPurple::after {
+.make-line-bPurple::after,
+.make-lines-bPurple::after{
 	border-color: rgba(151, 151, 255, 1);
 }
 
 .make-line-bPurple,
+.make-lines-bPurple,
 .make-text-bPurple {
 	color: rgba(151, 151, 255, 1);
 }
@@ -4311,3 +4404,108 @@ scroll-view.cu-steps .cu-item {
 	height: 100%;
 	background: rgba(255, 255, 255, 0.2); //rgba(144, 141, 246, 1);
 }
+
+
+
+/* ==================
+          自定义任务纵向步骤条
+ ==================== */
+
+.my-column-cu-steps {
+	display: flex;
+	flex-direction: column;
+}
+
+.my-column-cu-steps .cu-item {
+	flex: 1;
+	text-align: center;
+	position: relative;
+	min-height: 220upx;
+	/* border: 1px solid #000000; */
+}
+
+.my-column-cu-steps .cu-item:not([class*="text-"]) {
+	color: #8799a3;
+}
+
+.my-column-cu-steps .cu-item [class*="cuIcon-"] {
+	display: block;
+	font-size: 40upx;
+	line-height: 80upx;
+	position: absolute;
+	top: 0;
+	left: 42rpx;
+}
+
+.my-column-cu-steps .cu-item .my-column-cu-image {
+	display: block;
+	position: absolute;
+	top: 0rpx;
+	left: 82rpx;
+	
+	width: 76rpx;
+	height: 76rpx;
+}
+
+.my-column-cu-steps .cu-item .my-column-cu-right-image {
+	display: block;
+	position: absolute;
+	top: 0rpx;
+	right: 88rpx;
+	
+	width: 76rpx;
+	height: 76rpx;
+}
+
+.my-column-cu-steps .cu-item::before,
+.my-column-cu-steps .cu-item::after {
+	content: "";
+	display: block;
+	position: absolute;
+	width: 0px;
+	height: calc(100% - 106rpx);
+	border-left: 1px dashed #ccc;
+	top: calc(0px - (100% + 50rpx) / 2);
+	left: 120rpx;
+	/* right: 0; */
+	/* margin: auto; */
+	z-index: 0;
+}
+
+
+.my-column-cu-steps .cu-item::after {
+	border-left: 1px dashed currentColor;
+	width: 0px;
+	transition: all 0.3s ease-in-out 0s;
+}
+
+.my-column-cu-steps .cu-item[class*="text-"]::after {
+	height: calc(100% - 106upx);
+	color: currentColor;
+}
+
+.my-column-cu-steps .cu-item:first-child::before,
+.my-column-cu-steps .cu-item:first-child::after {
+	display: none;
+}
+
+.my-column-cu-steps>.cu-item>.content {
+	margin-left: 160rpx;
+	width: calc(100% - 230rpx);
+	border-radius: 6upx;
+
+	height: 220rpx;
+	line-height: 1.6;
+	display: flex;
+	flex-direction: column;
+	justify-content: start;
+}
+
+/* .my-column-cu-steps>.cu-item>.content:not([class*="bg-"]) {
+	background-color: #f1f1f1;
+	color: #333333;
+} */
+
+/* .my-column-cu-steps>.cu-item>.content+.content {
+	margin-top: 20upx;
+} */

+ 84 - 51
util/util-js/action/jump.js

@@ -2,7 +2,7 @@
  * 跳判断相关脚本代码
  */
 
-let assign = function (target, ...varArgs) {
+let assign = function(target, ...varArgs) {
 	if (target == null) {
 		throw new TypeError('Cannot convert undefined or null to object');
 	}
@@ -27,11 +27,11 @@ let assign = function (target, ...varArgs) {
 function Event() {
 	this.events = {};
 }
-Event.prototype.addEventListener = function (type, listener) {
+Event.prototype.addEventListener = function(type, listener) {
 	this.events[type] = this.events[type] || [];
 	this.events[type].push(listener);
 };
-Event.prototype.trigger = function () {
+Event.prototype.trigger = function() {
 	for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
 		args[_key] = arguments[_key];
 	}
@@ -40,7 +40,7 @@ Event.prototype.trigger = function () {
 	var params = args.slice(1);
 	if (!!this.events[type]) {
 		// console.log("type:",type);
-		this.events[type].forEach(function (listener) {
+		this.events[type].forEach(function(listener) {
 			try {
 				listener.apply(null, params);
 			} catch (e) {
@@ -49,38 +49,36 @@ Event.prototype.trigger = function () {
 		});
 	}
 };
-
+var jumpOpts = {
+	//是否上升的标志位
+	isDirectionUp: false,
+	//持续上升次数
+	continueUpCount: 0,
+	//上一点的持续上升的次数,为了记录波峰的上升次数
+	continueUpFormerCount: 0,
+
+	continueDownCount: 0,
+	continueDownFormerCount: 0,
+
+	//上一点的状态,上升还是下降
+	lastStatus: false,
+	//波峰值
+	peakOfWave: 0,
+	//波谷值
+	valleyOfWave: 0,
+	//检测到极快的波动的次数
+	timeOfPeakCount: 0,
+	//开始更新的次数
+	startCount: 0,
+	//停止跳
+	bStopJump: false,
+	//上次传感器的值
+	gravityOld: 0,
+
+	bUpState: false,
+}
 var ActionJump = function ActionJump() {
 
-
-	let jumpOpts = {
-		//是否上升的标志位
-		isDirectionUp: false,
-		//持续上升次数
-		continueUpCount: 0,
-		//上一点的持续上升的次数,为了记录波峰的上升次数
-		continueUpFormerCount: 0,
-
-		continueDownCount: 0,
-		continueDownFormerCount: 0,
-
-		//上一点的状态,上升还是下降
-		lastStatus: false,
-		//波峰值
-		peakOfWave: 0,
-		//波谷值
-		valleyOfWave: 0,
-		//检测到极快的波动的次数
-		timeOfPeakCount: 0,
-		//开始更新的次数
-		startCount: 0,
-		//停止跳
-		bStopJump: false,
-		//上次传感器的值
-		gravityOld: 0,
-
-		bUpState: false,
-	}
 	this.jumpOpts = jumpOpts;
 	//其他波峰波谷参数相关数组记录
 	this.peakOfWaveArray = [];
@@ -94,19 +92,35 @@ var ActionJump = function ActionJump() {
 	this.event = new Event();
 
 }
-ActionJump.prototype.addEventListener = function (type, listener) {
+ActionJump.prototype.addEventListener = function(type, listener) {
 	this.event.addEventListener(type, listener);
 };
 
 
-ActionJump.prototype.updateJump = function () {
+ActionJump.prototype.updateJump = function() {
 	let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 	//使用三个轴的数据,计算重力轴的加速度。最后减去重力的加速度值
 	//********加速计********
-	let { lAccX, lAccY, lAccZ } = data.linearAcc;
-	let { oAccX, oAccY, oAccZ } = data.oriAcc;
-	let { oGyroX, oGyroY, oGyroZ } = data.oriGyro;
-	this.detectorNewStep(data.resultant, lAccX, lAccY, lAccZ, oAccX, oAccY, oAccZ, data.runIndex, oGyroX);
+	let {
+		lAccX,
+		lAccY,
+		lAccZ
+	} = data.linearAcc;
+	let {
+		oAccX,
+		oAccY,
+		oAccZ
+	} = data.oriAcc;
+	let {
+		oGyroX,
+		oGyroY,
+		oGyroZ
+	} = data.oriGyro;
+	let {
+		bYAxis
+	} = data;
+	let _tempAxisData = bYAxis ? oGyroY : oGyroX;
+	this.detectorNewStep(data.resultant, lAccX, lAccY, lAccZ, oAccX, oAccY, oAccZ, data.runIndex, _tempAxisData);
 };
 
 
@@ -117,7 +131,8 @@ ActionJump.prototype.updateJump = function () {
  * 2.如果检测到了波峰,并且符合时间差以及阈值的条件,则判定为1步
  * 3.符合时间差条件,波峰波谷差值大于initialValue,则将该差值纳入阈值的计算中
  * */
-ActionJump.prototype.detectorNewStep = function (resultant, linearX, linearY, linearZ, oriX, oriY, oriZ, _runIndex, _oGyroY) {
+ActionJump.prototype.detectorNewStep = function(resultant, linearX, linearY, linearZ, oriX, oriY, oriZ, _runIndex,
+	_oGyroY) {
 	let bUpdate = true;
 	let _judgmentValue = oriZ;
 	if (this.jumpOpts.gravityOld == 0) {
@@ -125,7 +140,11 @@ ActionJump.prototype.detectorNewStep = function (resultant, linearX, linearY, li
 	} else {
 
 		if (!this.jumpOpts.bStopJump) {
-			let { bState, bType, value } = this.detectorPeakOfWaveAndValleyOfWave(_judgmentValue, this.jumpOpts.gravityOld);
+			let {
+				bState,
+				bType,
+				value
+			} = this.detectorPeakOfWaveAndValleyOfWave(_judgmentValue, this.jumpOpts.gravityOld);
 			if (bState) {
 				this.jumpOpts.bUpState = true;
 				let _temp = {
@@ -156,7 +175,7 @@ ActionJump.prototype.detectorNewStep = function (resultant, linearX, linearY, li
 			}
 
 			if (this.jumpOpts.bUpState) {
-				
+
 				this.oriGyroYArray.push(_oGyroY);
 
 				this.jumpOpts.startCount++;
@@ -277,7 +296,7 @@ ActionJump.prototype.detectorNewStep = function (resultant, linearX, linearY, li
 }
 
 
-ActionJump.prototype.detectorPeakOfWaveAndValleyOfWave = function (newValue, oldValue) {
+ActionJump.prototype.detectorPeakOfWaveAndValleyOfWave = function(newValue, oldValue) {
 	this.jumpOpts.lastStatus = this.jumpOpts.isDirectionUp;
 	if (newValue >= oldValue) {
 		this.jumpOpts.continueDownFormerCount = this.jumpOpts.continueDownCount;
@@ -290,19 +309,33 @@ ActionJump.prototype.detectorPeakOfWaveAndValleyOfWave = function (newValue, old
 		this.jumpOpts.isDirectionUp = false;
 		this.jumpOpts.continueDownCount++;
 	}
-	if (!this.jumpOpts.isDirectionUp && this.jumpOpts.lastStatus && this.jumpOpts.continueUpFormerCount >= 2 && Math.abs(oldValue) >= 5) {
+	if (!this.jumpOpts.isDirectionUp && this.jumpOpts.lastStatus && this.jumpOpts.continueUpFormerCount >= 2 && Math
+		.abs(oldValue) >= 5) {
 		this.jumpOpts.peakOfWave = oldValue;
-		return { value: oldValue, bType: 'peakOfWave', bState: true };
-	} else if (!this.jumpOpts.lastStatus && this.jumpOpts.isDirectionUp && this.jumpOpts.continueDownFormerCount >= 2 && Math.abs(oldValue) >= 5) {
+		return {
+			value: oldValue,
+			bType: 'peakOfWave',
+			bState: true
+		};
+	} else if (!this.jumpOpts.lastStatus && this.jumpOpts.isDirectionUp && this.jumpOpts.continueDownFormerCount >=
+		2 && Math.abs(oldValue) >= 5) {
 		this.jumpOpts.valleyOfWave = oldValue;
-		return { value: oldValue, bType: 'valleyOfWave', bState: true };
+		return {
+			value: oldValue,
+			bType: 'valleyOfWave',
+			bState: true
+		};
 	} else {
-		return { value: oldValue, bType: 'None', bState: false };
+		return {
+			value: oldValue,
+			bType: 'None',
+			bState: false
+		};
 	}
 }
 //重置对应的参数
-ActionJump.prototype.resetAll = function () {
-
+ActionJump.prototype.resetAll = function() {
+	// console.log('******************* resetAll ******************');
 	this.peakOfWaveArray = [];
 	this.peakOfWaveMaxValue = 0;
 	this.valleyOfWaveArray = [];