浏览代码

任务奖励提示,每日签到页面更新

slambb 4 年之前
父节点
当前提交
942e3613a9
共有 31 个文件被更改,包括 1609 次插入354 次删除
  1. 5 1
      App.vue
  2. 42 29
      common/config.js
  3. 8 3
      components/modal-tip/modalTip.vue
  4. 159 76
      components/modal/action-jump/action-jump.vue
  5. 9 6
      components/uni-count-down/uni-count-down.vue
  6. 4 3
      pages.json
  7. 708 227
      pages/personal-page/personal/personal.vue
  8. 0 1
      platform/app-plus/subNVue/drawer.nvue
  9. 510 0
      platform/app-plus/subNVue/reward-popup.nvue
  10. 二进制
      static/common/modal/canUnlock.png
  11. 二进制
      static/common/subNVue/achievement-title.png
  12. 二进制
      static/common/subNVue/bg-light.png
  13. 二进制
      static/common/subNVue/big-medal.png
  14. 二进制
      static/common/subNVue/line-border@2x.png
  15. 二进制
      static/common/subNVue/prompt-bg-title@2x.png
  16. 二进制
      static/common/subNVue/prompt-bg@2x.png
  17. 二进制
      static/common/subNVue/prompt-qm@2x.png
  18. 二进制
      static/common/subNVue/prompt-reward-title@2x.png
  19. 二进制
      static/common/subNVue/reward-diamond.png
  20. 二进制
      static/common/subNVue/reward-gold.png
  21. 二进制
      static/common/subNVue/reward-title.png
  22. 二进制
      static/common/subNVue/sign/sign-grey-diamond@2x.png
  23. 二进制
      static/common/subNVue/sign/sign-grey-gold@2x.png
  24. 二进制
      static/common/subNVue/sign/sign-tick@2x.png
  25. 二进制
      static/common/subNVue/sign/sign-title@2x.png
  26. 二进制
      static/common/subNVue/unlock/unlock-mid-bg.png
  27. 二进制
      static/common/subNVue/unlock/unlock-mid.png
  28. 二进制
      static/common/subNVue/unlock/unlock-title.png
  29. 81 0
      util/util-css/main-nvue.css
  30. 2 1
      util/util-css/main.css
  31. 81 7
      util/util-js/store.js

+ 5 - 1
App.vue

@@ -90,11 +90,15 @@
 
 	}
 </script>
-
+<!-- <style src="@/util/util-css/main-nvue.css"></style> -->
 <style>
 	/*每个页面公共css */
 	// #ifndef APP-PLUS-NVUE
 	@import "util/util-css/main.css";
 	@import "util/util-css/icon.css";
 	// #endif
+	/* nvue 页面公共css */
+	// #ifdef APP-PLUS-NVUE 
+	@import "util/util-css/main-nvue.css";
+	// #endif 
 </style>

+ 42 - 29
common/config.js

@@ -11,10 +11,11 @@ const active = "dev";
 //测试地址,阿里云服务器
 const host="https://www.9527fun.cn/api_dev"
 //本地测试地址
-// const host = "http://192.168.1.7:9090/api_dev"
+// const host = "http://192.168.1.12:9090/api_dev"
 // const host = "http://192.168.0.112:9090/api_dev"
 // const host = "http://47.104.216.192:9090/api_dev"
 // const host = "http://121.4.103.151:9090/api_prd"
+// const host = "http://121.4.59.141:9090/api_dev"
 
 const URL = {
 	//验证token,获取服务器返回的信息
@@ -41,14 +42,16 @@ const URL = {
 	USERLOGINOUT: `${host}/program/delete_token`,
 	// 微信端解密信息接口
 	WXGETUSERINFO: `${host}/program/wx_getUserInfo`,
-	
+
 	//添加前端设备的信息
-	ADDCLIENTINFO:`${host}/program/add_client_info`,
-	
+	ADDCLIENTINFO: `${host}/program/add_client_info`,
+
 	//获取version code 状态,用于处理特定信息显示
-	GETVERSIONCODE:`${host}/program/get_version_code_state`,
-	
-	
+	GETVERSIONCODE: `${host}/program/get_version_code_state`,
+
+	/**
+	 * 用户处理部分
+	 */
 	// 获取用户信息
 	USERINFOURL: `${host}/user_info/get`,
 	// 添加用户信息
@@ -64,6 +67,9 @@ const URL = {
 	//添加更新自身体重
 	USERADDWEIGHT: `${host}/user_info/add_weight`,
 
+	//获取钱包信息,对应gold 和 diamond
+	USERGETWALLETINFO: `${host}/user_info/get_user_wallets`,
+
 	//获取体重列表
 	USERGETWEIGHT: `${host}/user_info/get_weight`,
 
@@ -71,7 +77,7 @@ const URL = {
 	FITNESSPROGRAM: `${host}/fitness_program/add`,
 
 	FITNESSPROGRAMGET: `${host}/fitness_program/get`,
-	
+
 	/**
 	 * 7-28 好友操作部分
 	 */
@@ -80,7 +86,7 @@ const URL = {
 	ADDFIRENDINFO: `${host}/user_info/friend_add`,
 	DELETEFIRENDINFO: `${host}/user_info/friend_delete`,
 	GETFRIENDLIST: `${host}/user_info/get_friend_list`,
-	
+
 	//游戏页面部分
 	//获取全部游戏
 	GAMELIST: `${host}/game/list`,
@@ -94,11 +100,11 @@ const URL = {
 	//根据游戏类目获取游戏列表
 	GAMELIST_FROM_CATEGORY: `${host}/game/list_from_category`,
 	GAMELIST_FROM_CATEGORY_PLATFORM: `${host}/game/list_from_category_platform`,
-	
+
 	//根据游戏显示获取游戏列表
 	GAMELIST_BY_RANKING_SHOW: `${host}/game/list_by_ranking_show`,
 	GAMELIST_BY_RANKING_SHOW_AND_PLATFORM: `${host}/game/list_by_ranking_show_and_platform`,
-	
+
 	//收藏
 	//添加
 	FAVORITESADD: `${host}/favorites/add`,
@@ -126,43 +132,50 @@ const URL = {
 	AIRANDOMINFO: `${host}/client_game/ai_random_info`,
 	//给webview 图片中转接口
 	TRANSFERPICTURE: `${host}/client_game/transfer_picture`,
-	
+
 	//设备操作
 	//绑定二维码设备
-	DEVICEBIND:`${host}/device/bind`,
+	DEVICEBIND: `${host}/device/bind`,
 	//获取绑定的设备
-	DEVICEBINDINGLIST:`${host}/device/binding_list`,
-	
+	DEVICEBINDINGLIST: `${host}/device/binding_list`,
+
 	//绑定蓝牙设备
-	BLEBIND:`${host}/bluetooth/bind`,
+	BLEBIND: `${host}/bluetooth/bind`,
 	//查看是否可以绑定此设备
-	BLEFINDHASBIND:`${host}/bluetooth/findHasBind`,
+	BLEFINDHASBIND: `${host}/bluetooth/findHasBind`,
 	//获取绑定的设备
-	BLEBINDINGLIST:`${host}/bluetooth/binding_list`,
-	
-	
+	BLEBINDINGLIST: `${host}/bluetooth/binding_list`,
+
+	/**
+	 * 任务部分
+	 */
+	GETLEVELJUMPLIST: `${host}/level/getLevelJumpList`,//只获取levelJump列表,后续其他扩展新加
+	PASSTHELEVEL: `${host}/level/passTheLevel`,//通用处理过关操作
+	UNLOCKLEVEL: `${host}/level/unlockLevel`,//通用处理解锁关卡操作
+
+
 	/**
 	 * fc 游戏接口
 	 */
 	//根据种类获取对应的分类菜单
-	FCCATEGORYBYTYPE:`${host}/FC/category_by_type`,
-	
-	FCListByCategory:`${host}/FC/list_by_category`,
-	
-	
+	FCCATEGORYBYTYPE: `${host}/FC/category_by_type`,
+
+	FCListByCategory: `${host}/FC/list_by_category`,
+
+
 	/**
 	 * ota
 	 */
-	GETOTA:`${host}/OTA/get_ota`,
+	GETOTA: `${host}/OTA/get_ota`,
 	/**
 	 * 版本更新信息
 	 */
-	APPVERSIONUPDATE:`${host}/app/version_update`,
-	
+	APPVERSIONUPDATE: `${host}/app/version_update`,
+
 	/**
 	 * 上传反馈信息
 	 */
-	UPLOADFEEDBACK:`${host}/manager/upload_feedback`,
+	UPLOADFEEDBACK: `${host}/manager/upload_feedback`,
 }
 
 

+ 8 - 3
components/modal-tip/modalTip.vue

@@ -33,7 +33,10 @@
 		data() {
 			return {
 				title:'提示',
-				context:''
+				context:'',
+				//当前传入操作的item
+				operationItem: null,
+				type:'none'
 			};
 		},
 		created() {
@@ -41,15 +44,17 @@
 		},
 		methods: {
 			setShowData(data){
-				let {title,context} = data;
+				let {title,context,operationItem,type} = data;
 				this.title = title;
 				this.context = context;
+				this.operationItem = operationItem;
+				this.type = type;
 			},
 			hideModalTip(){
 				this.$emit('hide')
 			},
 			confirmModalTip(){
-				this.$emit('confirm')
+				this.$emit('confirm',{type:this.type,operationItem:this.operationItem})
 			}
 
 		}

+ 159 - 76
components/modal/action-jump/action-jump.vue

@@ -1,62 +1,41 @@
 <template>
 	<view style="width: 750rpx;">
-
 		<view class="flex justify-center" style="margin-top: 32rpx;">
-			<!-- 计时器 -->
-			<!-- <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 class="grid-progress-vertical-container" style="top:-460rpx; ">
 				<view class="grid-progress-vertical-bar">
-					<view class="grid-progress-vertical-child" v-for="(item, index) in 20" :key="index">
+					<view class="grid-progress-vertical-child" v-for="(item, index) in maxShowCount +1" :key="index"
+						v-if="index!==0">
 						<view
-							:class="showCount>=index+1? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
+							:class="showCurCount>=index? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
 						</view>
-						<view :class="index%5 == 0?'':'grid-progress-text-hidden'" class="grid-progress-vertical-text">
-							{{(index+1)*2}}
+						<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 20" :key="index">
-						<view :class="index%5 == 0?'':'grid-progress-text-hidden'" class="grid-progress-vertical-text">
-							{{(index+26)*2}}
+					<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="showCount>=index+26? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
+							:class="showCurCount>=index+20? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
 						</view>
 					</view>
 				</view>
 			</view>
-			<!-- 居中绘制星星样式 -->
-			<!-- <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="text-14px text-white">
-					拉伸运动:
-				</view>
-				<view class="flex flex-direction" 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="flex justify-center align-center" style="height: 100rpx; width: 444rpx; ">
 				<view class="text-12px text-white text-center">
-					本关卡是为了让用户开始放松,需要在两分钟内跳100下
+					{{taskDescribe}}
 				</view>
 			</view>
 
 		</view>
-
-		<!-- 	<view class="action-jump-parent margin-bottom">
-			<view class="action-jump-container">
-				
-			</view>
-		</view> -->
 		<canvas canvas-id="actionJumpCanvas" :style="{ width: canvasW + 'px', height: canvasH + 'px' }"></canvas>
-
 		<view class="flex align-center justify-center" style="font-size: 14px;">
 			<view style="position: relative;">
 				<image style="width: 135px;height: 75px;" src="../../../static/modal/action-jump/Fill.png"></image>
@@ -97,7 +76,7 @@
 		<!-- <view style="height: 41px;"></view> -->
 
 		<!-- 测试按钮 -->
-		<!-- <view style="display: flex;justify-content: space-between;">
+		<view style="display: flex;justify-content: space-between;">
 			<view>{{isY?'Y':'X'}}</view>
 			<button @click="onChangeY">Y为旋转轴</button>
 			<button @click="onChangeX">X为旋转轴</button>
@@ -109,7 +88,7 @@
 			<button @click="onJumpType(2)">right</button>
 			<button @click="onJumpType(3)">rLeft</button>
 			<button @click="onJumpType(4)">rRight</button>
-		</view> -->
+		</view>
 
 		<!-- <view style="display: flex;justify-content: space-around; padding-bottom: 100rpx;">
 			<view style="font-size: 14px;">t:{{countdown}}</view>
@@ -122,9 +101,6 @@
 </template>
 
 <script>
-	// import boxingCountDown from '@/components/uni-count-down/uni-count-down.vue'
-
-
 	import ActionJump from "@/util/util-js/action/jump.js"
 
 	import {
@@ -133,27 +109,25 @@
 
 	export default {
 		components: {
-			// boxingCountDown
+
 		},
 		props: {
 			showTime: {
 				type: Number,
 				default: 0
+			},
+			levelData: {
+				type: Object,
+				default: null
 			}
 		},
 		data() {
 			return {
 				isY: true,
-				//满格的数值是 25
-				maxShowCount: 25,
-				//显示的点
-				showCount: 0,
-
 				canvasW: 0, // 画布宽
 				canvasH: 0, // 画布高
 				SystemInfo: {}, // 设备信息
 
-
 				directionJump: null,
 				midJump: null,
 				rotateJump: null,
@@ -205,7 +179,7 @@
 				bNextSpawnRightRotateDirection: false,
 
 				//生成预制的模板,用count 来判断生成哪一种
-				template: [{
+				template: [{ //原地
 					count: 1,
 					spawnList: [
 						[0]
@@ -229,6 +203,7 @@
 				}, ],
 
 				level: 3,
+				levelType: 0,
 				countdown: 60,
 				countdownInterval: null,
 
@@ -245,10 +220,47 @@
 				xA: 0,
 				yA: 0,
 				zA: 0,
-				actionJumpObj: null
+				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
 			}
 		},
+		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;
+				}
 
+			}
+		},
 		created() {
 			let _self = this;
 			this.actionJumpCanvas = uni.createCanvasContext("actionJumpCanvas", this);
@@ -353,41 +365,55 @@
 				}
 
 				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.level == 1) {
-					//随便生成一组数据
+				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;
+					// if (_ranType >= 1) ran += 2;
 
 					for (let i = 0; i < _spawnList[ran].length; i++) {
 						this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
 					}
-				} else 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]);
+				} 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.level == 3) {
+				} else if (this.levelType == 5) {
 					//随便生成三组数据
 					let _newArray = [];
 					// let _spawnList1 = this.template[1].spawnList;
@@ -408,6 +434,22 @@
 					//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++;
 
@@ -622,6 +664,7 @@
 
 			onJumpType(event) {
 				// console.log("onJumpType:", event);
+				if (this.isGameOver || !this.bJumpPlay) return;
 				this.eliminateJumpPrefab(event);
 			},
 
@@ -666,12 +709,42 @@
 			},
 			//设置ui信息
 			setEliminationCount(value) {
+				this.taskSignCurCount++;
+				this.roundingCount += this.addShowCountUnit;
+				//取两位后计算Math floor,不然会有偏差值问题  Math.floor(39.9999999+ 0.1111111) = 39
+				this.showCurCount = Math.floor(this.roundingCount.toFixed(2));
 				this.eliminationCount += value;
+
 				// this.eliminationLabel.string = '消除数量:' + this.eliminationCount.toString();
 				this.$emit('actionJumpDataUpdate', {
 					eliminationCount: this.eliminationCount,
 					faultCount: this.faultCount
 				});
+
+				//todo 能量槽满的时候,说明踩中次数到达	
+				if (this.taskSignCurCount >= this.taskSignCount) {
+					this.onGameOver();
+				}
+			},
+			onGameOver() {
+				this.isGameOver = true;
+				//处理参数
+				this.onClear();
+				this.onClearData();
+				this._changePlay();
+				/**
+				 * 判断胜利和失败
+				 */
+				let myWin = false; //默认失败
+				//比如,1 规定时间内跳完所有标志块.2 充满左右两边蓄能槽
+				if (this.taskSignCurCount >= this.taskSignCount) {
+					//todo 有情况是2条件情况和1 其实这里处理一样,判断跳的完成度是否符合条件
+					myWin = true;
+				}
+
+				this.$emit('gameOver', {
+					myWin: myWin
+				});
 			},
 			setFaultCount(value) {
 				this.faultCount += value;
@@ -681,21 +754,24 @@
 					faultCount: this.faultCount
 				});
 			},
+
 			//控制播放
 			onControllerPlay() {
-				// this.bJumpPlay = !this.bJumpPlay;
-
 				if (this.bJumpPlay) {
-					this.onClear();
-					this.onClearData();
-					this._changePlay();
-
+					//仅仅暂停,没有清空数据
+					this._changePlay(false);
 					this.$emit("actionJumpControllerPlay", false);
 				} else {
-
 					this.$emit("actionJumpCheck");
 				}
 			},
+			onContinueGame() {
+				this._changePlay(true);
+			},
+			onClearActionJumpData() {
+				this.onClear();
+				this.onClearData();
+			},
 			//修改状态
 			_changePlay(bPlaying) {
 				if (bPlaying) {
@@ -710,6 +786,11 @@
 				this.onClearData();
 				this.startJumpGame();
 				this._changePlay(true);
+
+				//reset 对应计算数据
+				this.taskSignCurCount = 0;
+				this.showCurCount = 0;
+				this.roundingCount = 0;
 			},
 
 			getCurrentJumpType() {
@@ -719,6 +800,8 @@
 
 			//监听跳的状态数据
 			listenStateDataOfJump(data) {
+				if (this.isGameOver || !this.bJumpPlay) return;
+
 				let _jumpType = this.getCurrentJumpType();
 				//初始全部默认状态
 				let _tempState = [{
@@ -852,7 +935,7 @@
 			 * 识别跳部分数据处理
 			 */
 			onBLERopeUpdate(gameData) {
-				if (!this.bJumpPlay) return;
+				if (!this.bJumpPlay || this.isGameOver) return;
 				//********陀螺仪角速度********
 				let {
 					gx,

+ 9 - 6
components/uni-count-down/uni-count-down.vue

@@ -99,10 +99,12 @@
 			},
 			//开始计时
 			timePlay(data){
-				console.log(data);
+				// console.log(data);
 				if (this.seconds <= 0) {
-					this.seconds = this.startSeconds;
+					// this.seconds = this.startSeconds;
+					this.startData();
 				}
+				console.log('seconds:',this.seconds,this.startSeconds);
 				this.timer = setInterval(() => {
 					this.seconds--
 					if (this.seconds < 0) {
@@ -114,14 +116,14 @@
 			},
 			//暂停时间
 			timePause(data){
-				console.log(data);
+				// console.log(data);
 				clearInterval(this.timer);
 				this.timer = null;
 			},
 			timeUp() {
 				clearInterval(this.timer);
 				this.timer = null;
-				this.$emit('timeup');
+				this.$emit('timeUp');
 			},
 			countDown() {
 				let seconds = this.seconds
@@ -150,6 +152,8 @@
 				this.h = hour
 				this.i = minute
 				this.s = second
+				
+				this.$emit('timeUpdate',{curSeconds:seconds});
 			},
 			startData() {
 			  this.startSeconds = this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
@@ -159,8 +163,7 @@
 				this.countDown();
 			},
 			changeFlag() {
-				this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
-				// this.startData();
+				this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second);
 				this.countDown();
 			}
 		}

+ 4 - 3
pages.json

@@ -287,12 +287,13 @@
 							}
 						}, {
 							"id": "personal-popup",
-							"path": "../../platform/app-plus/subNVue/popup",
+							"path": "../../platform/app-plus/subNVue/reward-popup",
 							"type": "popup",
 							"style": {
 								"margin": "auto",
-								"width": "80%",
-								"height": "600rpx"
+								// "width": "100%",
+								// "height": "100%",
+								"background": "transparent"
 							}
 						}]
 					}

+ 708 - 227
pages/personal-page/personal/personal.vue

@@ -88,57 +88,53 @@
 							</view>
 
 							<!-- pk模式下的跳绳 -->
-							<view v-if="currentMode == 'pkMode' && 1 === currentModeIndex" 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>
-										<HitEffect ref="aiHitEffectRef"></HitEffect>
-									</view>
-									<view style="margin-top: 20rpx; width: 165rpx; "
-										class="text-cut text-white text-center">
-										{{userName}}
+							<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>
 
-								<view class="flex justify-center align-center " style=" width: 300rpx;">
-									<LEDFont style="" :showValue='myAcionJumpScore' :size="30" color='#FFFFFF'>
-									</LEDFont>
-									<view class="text-white text-bold">:</view>
-									<LEDFont style="" :showValue='otherActionJumpScore' :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>
-										<HitEffect ref="hitEffectRef"></HitEffect>
+									<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.othreScore' :size="30" color='#FFFFFF'>
+										</LEDFont>
 									</view>
-									<view style="margin-top: 20rpx; width: 165rpx;"
-										class="text-cut text-white text-center">
-										{{finallySelectFriendInfo.username}}
+									<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>
-								<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 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
-									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 style="height:80rpx;"> </view>
+							</block>
 
 							<!-- 圆形进度条 -->
 							<view
@@ -155,16 +151,16 @@
 								<!-- 图标 -->
 								<view class="personal-fruit-container">
 									<view class="text-13px text-white" style="margin-top: -50px;">
-										失误:{{actionJumpFaultCount}}</view>
+										失误:{{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='actionJumpAllCount' :size="60"
+									<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> -->
@@ -184,9 +180,10 @@
 								<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="actionJumpCountDown"
+										ref="arcbarCountDownRef" :show-day="false" :second="AJData.gameLimitTime"
 										color="#FFFFFF" background-color="rgba(255,255,255,0);" border-color="#007AFF"
-										:size="18" splitorColor="#FFFFFF" />
+										:size="18" splitorColor="#FFFFFF" @timeUp="arcbarCountDownTimeUp"
+										@timeUpdate="arcbarCountDownTimeUpdate" />
 								</view>
 
 
@@ -216,7 +213,7 @@
 
 							<!-- 用于定位 -->
 							<!-- <view id="boxingHitID" style="position: absolute;top: 180rpx; pointer-events: none;" ></view> -->
-							<view id="boxingHitID" v-if="currentModeIndex == 0" class="charts-pring-bottom">
+							<view id="boxingHitID" v-if="0 === currentModeIndex" class="charts-pring-bottom">
 								<!-- 添加一个 ConnectBindingDevice 测试 -->
 								<boxing-hit ref="boxingPostRef"
 									:bUpdate="!bHide&&(ConnectBindingDevice!=null)||(cIndex!=-1 && BLEConnectDevice!=null &&
@@ -226,17 +223,19 @@
 									@updateCalorie="boxingUpdateCalorie" @boxingPostCheck="onPersonalCheck"
 									@shake="onScreenShake" @updateSportTime="onUpdateSportTime"
 									@boxingGuideFinish="onBoxingGuideFinish"
-									@boxingPostControlPlay="onBoxingPostControlPlay" @modeEvent="onModeEvent"
+									@boxingPostControlPlay="onActionControlPlay" @modeEvent="onModeEvent"
 									@hitEvent="onHitEvent" @aiHitEvent="onAiHitEvent" @gameOver="onBoxingGameOver"
 									@closeBoxingControl="onCloseBoxingHit"></boxing-hit>
 
 							</view>
 
-							<view id='actionJumpID' v-if="true" class="charts-pring-bottom">
-								<action-jump ref="actionJumpRef" @actionJumpCheck="onPersonalCheck"
-									@actionJumpControllerPlay="onBoxingPostControlPlay"
+							<view id='actionJumpID' v-if="1 === currentModeIndex" class="charts-pring-bottom">
+								<action-jump ref="actionJumpRef"
+									:levelData="currentJumpTask!=null?currentJumpTask.item:null"
+									@actionJumpCheck="onPersonalCheck" @actionJumpControllerPlay="onActionControlPlay"
 									@actionJumpDataUpdate="onActionJumpDataUpdate"
-									@actionJumpCountDownUpdate="onActionJumpCountDownUpdate"></action-jump>
+									@actionJumpCountDownUpdate="onActionJumpCountDownUpdate"
+									@gameOver="onActionJumpGameOver"></action-jump>
 							</view>
 							<!-- <button @tap="onTestAddLocalCalorie">11</button> -->
 						</view>
@@ -249,15 +248,14 @@
 					<!-- <button  @tap="onShowBoxingHitTip">11</button> -->
 				</view>
 			</view>
-			<modal-mask></modal-mask>
+			<!-- <modal-mask></modal-mask> -->
 
-			<view class="example">
+			<!-- <view class="example">
 				<view class="example-title">从左侧滑出</view>
 				<button @click="showDrawer">显示抽屉</button>
-			</view>
+			</view> -->
 			<view class="example">
-				<view class="example-title">从上侧竖向滑出</view>
-				<button @click="showPopup">显示 弹出层</button>
+				<button @click="showPopup('signIn',null)">显示 每日签到</button>
 			</view>
 			<view style="height: 100rpx;"></view>
 		</scroll-view>
@@ -272,9 +270,6 @@
 		<!-- 右下角导航栏 -->
 		<round-fab :connect="cIndex!=-1 && BLEConnectDevice!=null" @fabClick="fabClick"></round-fab>
 
-		<!-- 底部操作条 -->
-		<!-- <myTabbar style="position:fixed;bottom:0;width:100%;left:0;right:0;" ></myTabbar> -->
-
 		<!-- 侧边栏 -->
 		<sideBar ref="sideBar"></sideBar>
 
@@ -403,15 +398,18 @@
 				<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>
+							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">
+						<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;">健身模式</view>
+								<view class="text-14px text-white" style="line-height: 28rpx;">
+									{{currentMode !== 'pkMode'?'PK模式':'健身模式'}}
+								</view>
 							</view>
 						</button>
 					</view>
@@ -421,48 +419,70 @@
 					:style="{ height: modalHeight + 'px' }" :scroll-into-view="taskIntoView"
 					:scroll-top="taskScrollTop">
 					<view class="my-column-cu-steps">
-						<view class="cu-item" :class="index>basics?'':'make-text-bPurple'"
-							v-for="(item,index) in basicsList" :key="index" :id='"task_"+index'
+						<view class="cu-item" :class="!item.isUnlock?'':'make-text-bPurple'"
+							v-for="(item,index) in currentTaskList" :key="index" :id='"task_"+index'
 							@click="selectTask(index,item)">
-							<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 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 "
 									style="margin-left: 48rpx; width: 360rpx;">
-									{{index+1}}. 拉伸运动拉伸运动拉伸运动拉伸运动
+									{{index+1}}. {{item.name}}
 								</view>
-								<view class="flex justify-start align-center" style="margin-left: 86rpx;">
+								<view class="flex justify-start align-center" style="margin:30rpx 0 30rpx 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>
+											src="/static/common/sideBar/sGold.png"></image>
+										<view class="text-13px" 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: 24rpx;height: 26rpx; margin-right: 18rpx;"
+											src="/static/common/sideBar/sDiamond.png"></image>
+										<view class="text-13px" 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 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">
+							</view>
+							<image class="my-column-cu-right-image" style="pointer-events:auto;"
+								src="../../../static/common/modal/medal.png" @click="showPopup('prompt',item)">
 							</image>
 
+							<image class="my-column-cu-image"
+								style="left: 130rpx;top: 40rpx; width: 50rpx;height: 50rpx;"
+								:src="(currentJumpTask!=null&&item.id==currentJumpTask.item.id)?'/static/devicesOther/radio-b.png':'/static/devicesOther/radio-g.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="BasicsSteps">开始</button>
+					style="width: 604rpx;height: 88rpx;" @tap="onPassTheLevel">点击直接通过所选关卡</button>
 
 			</view>
 		</view>
@@ -490,7 +510,6 @@
 	import promptBox from "@/components/prompt-box/prompt-box.vue"
 
 	import roundFab from "@/components/round-fab/round-fab.vue"
-	import myTabbar from "@/components/hans-tabbar/hans-tabbar.vue"
 
 	import codeElfGuide from '@/components/code-elf-guide/code-elf-guide.vue'
 
@@ -547,7 +566,7 @@
 			'systemInfo', 'navHeight', 'tabbarHeight',
 			'cDiamond', 'cGold',
 			'finallySelectFriendInfo',
-			'currentJumpTask'
+			'currentJumpTask', 'singlePersonList', 'multiPersonList'
 		]),
 		components: {
 			// uniNavBar,
@@ -558,7 +577,6 @@
 			fruit,
 
 			roundFab,
-			myTabbar,
 
 			codeElfGuide,
 			boxingPost,
@@ -662,7 +680,7 @@
 					avatar: '/static/defaultAvatar.png'
 				},
 
-				currentMode: 'pkMode', //pkMode calorieMode
+				currentMode: 'calorieMode', //pkMode calorieMode
 
 				bHitShake: false,
 
@@ -705,15 +723,23 @@
 				currentTask: null, //当前选择的任务
 				taskIntoView: '',
 				taskScrollTop: 0,
+				currentTaskList: [],
+				nextTaskCanUnlock: false, //下一个关卡是否可解锁
 
 				/**
 				 * actionJump 模块对应的交互参数
 				 */
-				actionJumpAllCount: 0,
-				actionJumpFaultCount: 0,
-				actionJumpCountDown: 0,
-				myAcionJumpScore: 1000,
-				otherActionJumpScore: 80,
+				//pk部分参数
+				AJData: {
+					allCount: 0,
+					faultCount: 0,
+					perCountDown: 0,
+					gameCountDown: 0,
+					myScore: 0,
+					othreScore: 0,
+					gameLimitTime: 0,
+					describe: '', //关卡说明
+				},
 
 				/**
 				 * 任务参数
@@ -741,46 +767,47 @@
 			// 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: 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);
-					}
-				);
+			// 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 = {
@@ -818,29 +845,14 @@
 			this.gOnAddClientInfo();
 
 
-			// 接收 popup 的消息
-			uni.$on('popup-page', (data) => {
-				switch (data.type) {
-					case 'interactive':
-						uni.showModal({
-							title: '来自Popup的消息',
-							content: data.info
-						})
-						break;
-					default:
-						uni.showToast({
-							title: data.title,
-						})
-						break;
-				}
-			})
-			// 监听 drawer 消息
-			uni.$on('drawer-page', (data) => {
-				uni.showToast({
-					title: '点击了第' + data + '项',
-					icon: "none"
-				});
-			})
+			this.registerPopupEvent();
+
+			//获取任务数据
+			this.getLevelList(() => {
+				this.switchTaskInfo();
+			});
+			//钱包信息
+			this.getUserWallets();
 		},
 		onShow() {
 			_self.bHide = false;
@@ -915,6 +927,7 @@
 			// 		_self.topScrollHight = _self.phoneHeight - _self.navHeight - 30;
 			// 	}
 			// }).exec();
+
 		},
 		onUnload() {
 			console.log("personal ********* onUnload *********");
@@ -931,8 +944,7 @@
 			//unload 时候清除timeout
 			this.onUnloadCreateBLEConnectionTimeout();
 
-			uni.$off('popup-page')
-			uni.$off('drawer-page')
+			this.unregisterPopupEvent();
 
 		},
 		onHide() {
@@ -956,7 +968,8 @@
 				'gCreateSandbagAlgorithm', 'gUpdateSandbagAlgorithm', 'gStartSimulateBLEUpdate',
 				'gStopSimulateBLEUpdate',
 				'getActionJumpTask',
-				'setActionJumpTask'
+				'setActionJumpTask', 'getLevelList',
+				'getUserWallets', 'setGoldAndDiamond'
 			]),
 			BasicsSteps() {
 				this.basics = this.basics == this.basicsList.length - 1 ? 0 : this.basics + 1
@@ -972,8 +985,8 @@
 			showModal(e) {
 				this.modalName = e.currentTarget.dataset.target;
 				this.$store.state.bCanvasShow = false;
-				
-				if(this.modalName == "slideUpModal"){
+
+				if (this.modalName == "slideUpModal") {
 					this.updateTaskScroll();
 				}
 			},
@@ -997,6 +1010,27 @@
 				console.log(_add);
 				this.onUpdateCaloriePlane(10);
 			},
+			/**
+			 * 首页圆形表部分时间计时器
+			 */
+			arcbarCountDownTimeUp() {
+				//todo,涉及到倒计时的关卡。时间到。游戏结束
+				if (1 === this.currentModeIndex) {
+					this.$refs.actionJumpRef.onGameOver();
+				}
+
+			},
+			arcbarCountDownTimeUpdate(data) {
+				this.AJData.gameCountDown = data.curSeconds;
+				this.updateArcbarDataFromActionJump();
+			},
+			arcbarCountDownTimeReset() {
+				//清除时间计时器
+				this.$refs.arcbarCountDownRef.timePause();
+			},
+			arcbarCountDownPlay() {
+				this.$refs.arcbarCountDownRef.timePlay();
+			},
 			// 进度条数据
 			arcbarData(_planData) {
 				let showCal = 0,
@@ -1038,11 +1072,12 @@
 
 					series = [{
 						name: showTip,
-						data: this.actionJumpAllCount == 0 ? 0 : this.actionJumpAllCount / 200,
+						data: this.AJData.gameCountDown == 0 ? 0 : this.AJData.gameCountDown / this.AJData
+							.gameLimitTime,
 						color: '#2fc25b'
 					}];
 
-					console.log(series);
+					// console.log(series);
 				}
 
 				return {
@@ -1607,8 +1642,16 @@
 				if (0 === this.currentModeIndex) {
 					this.onBoxingGuideFinish();
 				} else if (1 === this.currentModeIndex) {
+					if (this.currentJumpTask == null) {
+						uni.showToast({
+							title: '先选一个挑战关卡',
+							icon: 'none',
+							duration: 2000,
+						})
+						return;
+					}
 					//调用开始
-					this.$refs.actionJumpRef.onActionJumpPlay();
+					this.onActionJumpPlay();
 				}
 
 				return;
@@ -1650,6 +1693,7 @@
 					// }
 
 				} else if (1 === this.currentModeIndex) {
+
 					//2.检测是否连接设备 || this.BLEConnectDevice.ename !== 'BT04'
 					if (this.cIndex == -1) {
 						//没有连接设备,提示去连接设备
@@ -1747,8 +1791,7 @@
 					uni.$on('updateBLEDeviceData', this.callbackUpdateBLEData);
 
 					//调用开始
-					this.$refs.actionJumpRef.onActionJumpPlay();
-
+					this.onActionJumpPlay();
 				}
 			},
 			onShowBoxingHitTip() {
@@ -1759,14 +1802,16 @@
 			},
 			//检测是否符合要求,没有的话进行新手提示
 			onPersonalCheck() {
-				// //判断一下,是否达标,给moadal 提示 
-				// if (this.planData.allCalorie >= this.planData.calorie) {
-				// 	this.modalName = 'showPlanTipModal';
-				// 	this.planTipIndex = 0;
-				// } else {
-				// 	//如果是一开始,还没达标,就不给modal 提示
-				// 	this.onStartCheck();
-				// }
+
+				if (1 === this.currentModeIndex && this.currentJumpTask == null) {
+					uni.showToast({
+						title: '先选一个挑战关卡',
+						icon: 'none',
+						duration: 2000,
+					})
+					return;
+				}
+
 				this.onStartCheck();
 			},
 			//
@@ -1777,8 +1822,8 @@
 					this.b_countDown = null;
 				}
 
-
-				if (this.currentMode == 'calorieMode' || this.currentMode == 'ropeMode') {
+				//|| this.currentMode == 'ropeMode'
+				if (this.currentMode == 'calorieMode') {
 					this.personalAudioContext.stop();
 					this.personalAudioContext.play();
 
@@ -1885,7 +1930,7 @@
 				this.modalName = null;
 				if (this.planTipIndex === 1) {
 					// 您今天的目标还没完成  是否结束训练
-					this.onBoxingPause(false);
+					this.onActionPause(false);
 				}
 			},
 			confirmPlanTipModal() {
@@ -1894,7 +1939,7 @@
 					this.onStartCheck()
 				} else if (this.planTipIndex === 1) {
 					// 您今天的目标还没完成  是否结束训练
-					this.onBoxingPause(true);
+					this.onActionPause(true);
 				}
 			},
 			//断开连接时候,关闭
@@ -1903,28 +1948,30 @@
 				if (this.currentMode == 'pkMode') {
 					this.$refs.hitEffectRef.onStop();
 				}
-				this.onBoxingPause(true);
+				this.onActionPause(true);
 			},
 			//点击暂停时候,判断一下是否完成目标
-			onBoxingPostControlPlay(bPlay) {
+			onActionControlPlay(bPlay) {
 				if (!bPlay) {
-
 					if (this.planData.allCalorie < this.planData.calorie) {
 						this.modalName = 'showPlanTipModal';
 						this.planTipIndex = 1;
 					} else {
 						//假如完成了目标,更新卡路里
-						this.onBoxingPause(true);
+						this.onActionPause(true);
 					}
 				}
 			},
-			//点击切换模式
+			/**
+			 * 切换体验模式
+			 * @param {Object} data
+			 */
 			onModeEvent(data) {
 				console.log("当前模式:", data);
 				this.currentMode = data.mode;
 				this.title = data.name;
-
-				if (this.currentMode == 'calorieMode' || this.currentMode == 'ropeMode') {
+				// || this.currentMode == 'ropeMode'
+				if (this.currentMode == 'calorieMode') {
 					setTimeout(() => {
 						this.updateNoLimit();
 					}, 0)
@@ -1978,46 +2025,50 @@
 			},
 
 			//弹出目标提示后,进行下一步
-			onBoxingPause(bFinish) {
+			onActionPause(bFinish) {
 				if (bFinish) {
-
 					if (this.ConnectBindingDevice) {
 						this.gStopSimulateBLEUpdate();
 					} else {
-						if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
-							this.B_CloseRopeSkipping();
-						} else {
-							console.log("停止时候,上传卡路里");
-							this.$refs.boxingPostRef.onBoxingPostStop();
-
+						// 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;
 
-							//停止蓝牙加速计
-							this.onWriteBLEConnectionValue({
-								value: "4"
-							});
+						} else if (1 === this.currentModeIndex) {
+							//todo actionJump
+							this.$refs.actionJumpRef.onClearActionJumpData();
 						}
+						//停止蓝牙加速计
+						this.onWriteBLEConnectionValue({
+							value: "4"
+						});
 
 					}
 					uni.$off('updateBLEDeviceData', this.callbackUpdateBLEData);
-
 					this.syncRequestEvent({
 						success: () => {
 							this.updateArcbarData();
 						}
 					});
-
-
 				} else {
-					if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
-						this.$refs.actionJumpRef.onActionJumpPlay();
-					} else {
-						//如果不是,继续调用播放
+					//如果不是,继续调用播放
+					if (0 === this.currentModeIndex) {
 						this.$refs.boxingPostRef.onBoxingPostPlay(true);
+					} else if (1 === this.currentModeIndex) {
+						//actionJump
+						this.$refs.actionJumpRef.onContinueGame();
 					}
+					// if (this.BLEConnectDevice.usageMode == "ropeSkipping") {
+
+					// } else {
+					// }
 				}
 
 			},
@@ -2194,7 +2245,7 @@
 			onBoxingGameOver(res) {
 				this.$refs.hitEffectRef.onStop();
 
-				this.onBoxingPause(true);
+				this.onActionPause(true);
 
 				let _title = res.myWin ? "胜利" : "失败";
 				let _context = res.myWin ? "你已经赢得PK胜利!" : "你在PK中被打败了!";
@@ -2202,16 +2253,26 @@
 
 				this.$refs.modalTipRef.setShowData({
 					title: _title,
-					context: _context
+					context: _context,
+					operationItem: null
 				});
 			},
 			onModalTipHide() {
 				this.modalName = null;
 
 			},
-			onModalTipConfirm() {
+			onModalTipConfirm(data) {
+				let {
+					type,
+					operationItem
+				} = data;
 				this.modalName = null;
 				//再来一局
+				//提示过关奖励
+				console.log('onModalTipConfirm', type, operationItem);
+				if (type == 'PASSTHELEVEL') {
+					this.showPopup('levelReward', operationItem);
+				}
 			},
 			onTestShare() {
 				uni.share({
@@ -2380,50 +2441,470 @@
 			 * action 模块相关数据更新
 			 */
 			onActionJumpDataUpdate(obj) {
-				console.log(obj);
-				this.actionJumpAllCount = obj.eliminationCount + obj.faultCount;
-				this.actionJumpFaultCount = obj.faultCount;
-
-				this.updateArcbarDataFromActionJump();
+				// console.log(obj);
+				this.AJData.allCount = obj.eliminationCount + obj.faultCount;
+				this.AJData.faultCount = obj.faultCount;
 			},
 			onActionJumpCountDownUpdate(obj) {
 				// console.log(obj);
-				this.actionJumpCountDown = obj.countDown;
+				this.AJData.perCountDown = obj.countDown;
 			},
+			//actionJump 模块跳关卡开始处理
+			onActionJumpPlay() {
+				this.$refs.actionJumpRef.onActionJumpPlay();
+				//todo 首先判断时间处理
+				if (0 !== this.currentJumpTask.item.limitTime) {
+					//0默认不限时,所以限时的才走计时间
 
+					this.arcbarCountDownPlay();
+				}
+				//开始时候,设置默认参数
+				this.onSetActionJumpData();
+			},
+			//重置actionJump数据
+			onResetActionJumpData() {
+				this.AJData = {
+					allCount: 0,
+					faultCount: 0,
+					perCountDown: 0,
+					gameCountDown: 0,
+					myScore: 0,
+					othreScore: 0,
+					gameLimitTime: 0,
+					describe: '', //关卡说明
+				}
+			},
+			onSetActionJumpData() {
+				let _item = this.currentJumpTask.item;
+				this.AJData = {
+					allCount: 0,
+					faultCount: 0,
+					perCountDown: 0,
+					gameCountDown: 0,
+					myScore: 0,
+					othreScore: 0,
+					gameLimitTime: _item.limitTime,
+					describe: '', //关卡说明
+				}
+				console.log('onSetActionJumpData', JSON.stringify(this.AJData), JSON.stringify(_item));
+			},
+			onActionJumpGameOver(data) {
+				// console.log('onActionJumpGameOver');
+				//todo 可能区分 levelJump 关卡类型
+				// if (this.currentMode == "calorieMode") {
+
+				// }
+
+				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'
+										});
+									} else {
+										//没有奖励数据
+										this.$refs.modalTipRef.setShowData({
+											title: _title,
+											context: _context,
+											operationItem: null,
+											type: 'none'
+										});
+									}
+
+
+
+
+
+
+									//
+									this.arcbarCountDownTimeReset();
+
+									//todo 通过关卡后,处理荣誉值,解锁成就
+								}
+							},
+							e => {
+								console.log(e);
+							}
+						);
+				}
+
+
+			},
 			showDrawer() {
 				uni.getSubNVueById('personal-drawer').show('slide-in-left', 200);
 			},
-			showPopup() {
-				// 向 popup 传递消息
-				uni.$emit('page-popup', {
-					title: '请阅读软件内容',
-					content: 'uni-app 是一个使用 Vue.js 开发跨平台应用的前端框架,开发者编写一套代码,可编译到iOS、Android、H5、小程序等多个平台。'
-				});
+			showPopup(type, item) {
+				console.log(type, item);
+				switch (type) {
+					case 'levelReward':
+						uni.$emit('reward-popup', {
+							title: '奖励',
+							content: '',
+							type: type,
+							item: {
+								gold: item.rewardGold,
+								diamond: item.rewardDiamond,
+								honor: item.rewardHonor
+							},
+							operationItem: item
+						});
+						break;
+					case 'prompt':
+						// 向 popup 传递消息
+						uni.$emit('reward-popup', {
+							title: '奖励',
+							content: '',
+							type: type,
+							item: {
+								gold: item.rewardGold,
+								diamond: item.rewardDiamond,
+								honor: item.rewardHonor.explain
+							},
+							operationItem: item
+						});
+						break;
+					case 'unlock':
+						// 向 popup 传递消息
+						uni.$emit('reward-popup', {
+							title: '解锁关卡',
+							content: '',
+							type: type,
+							item: {
+								consumeGold: item.consumeGold,
+								consumeDiamond: item.consumeDiamond
+							},
+							operationItem: item
+						});
+						break;
+					case 'signIn':
+						// 向 popup 传递消息
+						uni.$emit('reward-popup', {
+							title: '每日签到',
+							content: '',
+							type: type,
+							lists: [{
+									name: 'gold',
+									width: 28,
+									height: 28,
+									url: '../../../static/common/sideBar/sGold.png',
+									selectedUrl: '../../../static/common/subNVue/sign/sign-grey-gold@2x.png',
+									explain: '',
+									value: 20,
+									isSelect: true
+								},
+								{
+									name: 'diamond',
+									width: 28,
+									height: 28,
+									url: '../../../static/common/sideBar/sDiamond.png',
+									selectedUrl: '../../../static/common/subNVue/sign/sign-grey-diamond@2x.png',
+									explain: '',
+									value: 20,
+									isSelect: true
+								},
+								{
+									name: 'gold',
+									width: 28,
+									height: 28,
+									url: '../../../static/common/sideBar/sGold.png',
+									selectedUrl: '../../../static/common/subNVue/sign/sign-grey-gold@2x.png',
+									explain: '',
+									value: 20,
+									isSelect: true
+								},
+								{
+									name: 'gold',
+									width: 28,
+									height: 28,
+									url: '../../../static/common/sideBar/sGold.png',
+									selectedUrl: '../../../static/common/subNVue/sign/sign-grey-gold@2x.png',
+									explain: '',
+									value: 20,
+									isSelect: false
+								},
+								{
+									name: 'diamond',
+									width: 28,
+									height: 28,
+									url: '../../../static/common/sideBar/sDiamond.png',
+									selectedUrl: '../../../static/common/subNVue/sign/sign-grey-diamond@2x.png',
+									explain: '',
+									value: 20,
+									isSelect: false
+								},
+								{
+									name: 'gold',
+									width: 28,
+									height: 28,
+									url: '../../../static/common/sideBar/sGold.png',
+									selectedUrl: '../../../static/common/subNVue/sign/sign-grey-gold@2x.png',
+									explain: '',
+									value: 20,
+									isSelect: false
+								},
+								{
+									name: 'gold',
+									width: 28,
+									height: 28,
+									url: '../../../static/common/sideBar/sGold.png',
+									selectedUrl: '../../../static/common/subNVue/sign/sign-grey-gold@2x.png',
+									explain: '',
+									value: 20,
+									isSelect: false
+								}
+							]
+						});
+						break;
+
+					default:
+						uni.showToast({
+							title: 'showPopup 类型为空',
+						})
+						break;
+				}
+
+				// #ifdef APP-PLUS
 				const subNVue = uni.getSubNVueById('personal-popup')
-				subNVue.show('slide-in-top', 250)
+				subNVue.show('zoom-out', 250)
+				// #endif
+
+
+
 			},
 
 			/**
 			 * 任务相关
 			 */
 			selectTask(_index, _item) {
-				console.log('taskSelect=', _index);
-				this.setActionJumpTask(_index);
+				// console.log('taskSelect=', _index, JSON.stringify(_item));
+				if (_item.isUnlock) {
+					let _data = {
+						modeName: this.currentMode, //记录时候记录当前的mode 
+						index: _index,
+						item: _item,
+					}
+					this.setActionJumpTask(_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);
+					// return;
+					// let _content = '条件:';
+
+					// for (let i = 0; i < _item.conditionUnlock.length; i++) {
+					// 	let _condition = _item.conditionUnlock[i];
+					// 	let _consume = '';
+					// 	if (_condition.limitType == 2) {
+					// 		_consume = _item.consumeGold;
+					// 	} else if (_condition.limitType == 3) {
+					// 		_consume = _item.consumeDiamond;
+					// 	}
+					// 	_content += _consume + _condition.explain;
+					// 	if (i == _item.conditionUnlock.length - 1) {
+					// 		_content += '.';
+					// 	} else {
+					// 		_content += ',';
+					// 	}
+					// }
+					// //解锁关卡
+					// uni.showModal({
+					// 	title: '解锁-' + _item.name,
+					// 	content: _content,
+					// 	/**
+					// 	 * 如果需要强制,不显示取消按钮
+					// 	 */
+					// 	showCancel: true,
+					// 	ConfirmColor: '#A488DC',
+					// 	confirmText: '解锁',
+					// 	success: res => {
+					// 		if (res.confirm) {
+
+
+
+					// 		} else if (res.cancel) {
+					// 			//todo
+					// 		}
+
+					// 	}
+					// });
+				}
+
 			},
-			updateTaskScroll(){
+			updateTaskScroll() {
 				/**
 				 * 获取任务对象
 				 */
 				this.getActionJumpTask();
-				// console.error('当前的任务对象===========:' + this.currentJumpTask);
-				if (this.currentJumpTask != null) {
-					let _index = this.currentJumpTask-1<0?0:this.currentJumpTask-1;
-					this.taskIntoView = "task_" + _index ;
-					console.log(this.taskScrollTop);
-					// this.taskIntoView = '';
+				//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();
+			},
+			onPassTheLevel() {
+
+				this.onActionJumpGameOver({
+					myWin: true
+				});
+			},
+			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) {
+													uni.showToast({
+														title: '需要' + res.data[0].explain,
+														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);
+											}
+										);
+								}
+
+							}
+							break;
+						default:
+							uni.showToast({
+								title: data.title,
+							})
+							break;
+					}
+				})
+				// 监听 drawer 消息
+				uni.$on('drawer-page', (data) => {
+					uni.showToast({
+						title: '点击了第' + data + '项',
+						icon: "none"
+					});
+				})
+			},
+			unregisterPopupEvent() {
+				uni.$off('reward-popup-page')
+				uni.$off('drawer-page')
 			}
 		}
 	};

+ 0 - 1
platform/app-plus/subNVue/drawer.nvue

@@ -145,7 +145,6 @@
 	}
 </script>
 
-<style src="@/util/util-css/main-nvue.css"></style>
 <style>
 	.wrapper {
 		flex-direction: column;

+ 510 - 0
platform/app-plus/subNVue/reward-popup.nvue

@@ -0,0 +1,510 @@
+<template>
+	<view class="wrapper">
+
+		<!-- 领取奖励提示,解锁成就 -->
+		<view v-if="currentType == 'levelReward'" class="reward-container">
+			<image style="width: 548rpx; height: 240rpx;" mode="aspectFit"
+				src="../../../static/common/subNVue/reward-title.png">
+			</image>
+			<view class="position-relative">
+				<image style="width: 472rpx; height: 482rpx;" mode="aspectFit"
+					src="../../../static/common/subNVue/bg-light.png">
+				</image>
+				<view class="position-absolute-center">
+					<image class="reward-image" mode="aspectFit" :src="lists[levelRewardIndex].url">
+					</image>
+				</view>
+
+			</view>
+			<view class="position-relative">
+				<image style="width: 502rpx;height: 94rpx;" mode="aspectFit"
+					src="../../../static/common/subNVue/line-border@2x.png">
+				</image>
+				<view class="position-absolute-center">
+					<text class="text-white text-15px text-center"
+						style="line-height: 30rpx;height: 30rpx;">{{lists[levelRewardIndex].explain}}</text>
+				</view>
+
+			</view>
+			<button class="make-bg-bPurple reward-button" @click="buttonMessage('confirm')"><text
+					class="text-white text-18px">确定</text> </button>
+		</view>
+		<!-- 显示奖励信息 -->
+		<view v-if="currentType == 'prompt'" class="reward-container" style="height: 1000rpx;">
+			<view class="position-absolute-center-top" style="top: 20rpx;">
+				<image style="width: 656rpx; height: 224rpx;" mode="aspectFit"
+					src="../../../static/common/subNVue/prompt-bg-title@2x.png">
+				</image>
+			</view>
+
+			<view class="prompt-mid">
+				<block v-for="(item, index) in lists" :key="index">
+					<view class="justify-center align-center" style="height: 230rpx; width: 160rpx; margin:5rpx;">
+						<view class="prompt-cell-bg"></view>
+						<image class="position-absolute-center-top" style="height:260rpx;"
+							src="../../../static/common/subNVue/prompt-bg@2x.png"></image>
+						<view class="position-absolute-center" style="height:200rpx;">
+							<image style="" :style="{width:item.width+'px',height:item.height+'px'}" mode="aspectFit"
+								:src="item.url">
+							</image>
+							<view class="position-absolute-center-bottom">
+								<text class="text-14px text-center"
+									style="height: 14px;line-height: 14px;">{{item.explain}}</text>
+							</view>
+						</view>
+
+					</view>
+
+				</block>
+
+			</view>
+			<view class="position-absolute-center-top" style="top: 160rpx">
+				<image class="prompt-title" mode="aspectFit"
+					src="../../../static/common/subNVue/prompt-reward-title@2x.png">
+				</image>
+				<!-- 内容部分 -->
+				<text class="text-18px text-black" style="margin-top: 44rpx;">本关卡可获得以下奖励</text>
+			</view>
+			<view class="position-absolute-center-bottom" style="bottom: 260rpx;">
+				<button class="make-bg-bPurple prompt-button" @click="buttonMessage('confirm')"><text
+						class="text-white text-18px">确定</text> </button>
+			</view>
+		</view>
+		<!-- 解锁关卡 -->
+		<view v-if="currentType == 'unlock'" class="reward-container border-1rpx-black" style="height: 1000rpx;">
+			<view class="position-absolute-center-top" style="top: 20rpx;">
+				<image style="width: 656rpx; height: 224rpx;" mode="aspectFit"
+					src="../../../static/common/subNVue/prompt-bg-title@2x.png">
+				</image>
+			</view>
+
+			<view class="prompt-mid flex-direction-column">
+				<view class="" style="height: 230rpx; width: 500rpx; margin:5rpx;">
+					<view class="position-absolute-center">
+						<image class="" style="height:296rpx;width: 296rpx"
+							src="../../../static/common/subNVue/unlock/unlock-mid-bg.png"></image>
+					</view>
+					<view class="position-absolute-center">
+						<image style="width: 196rpx;height:196rpx;" mode="aspectFit"
+							src="../../../static/common/subNVue/unlock/unlock-mid.png">
+						</image>
+					</view>
+
+				</view>
+				<view>
+					<!-- 内容部分 -->
+					<text class="text-18px text-black">解锁关卡消耗:</text>
+				</view>
+				<view class="justify-center align-center flex-direction-row unlock-cell">
+					<view class="align-center flex-direction-row"
+						style="margin-right: 40rpx; padding: 0 18px; height: 56rpx;">
+						<image class="png-more" style="margin-right: 16rpx;"
+							src="../../../static/common/sideBar/sGold.png">
+						</image>
+						<view class="text-14px" style="line-height: 28rpx;">{{unlockItem.consumeGold}}</view>
+					</view>
+					<view class=" align-center flex-direction-row" style="padding: 0 18px; height: 56rpx;">
+						<image class="png-more" style="margin-right: 16rpx; "
+							src="../../../static/common/sideBar/sDiamond.png">
+						</image>
+						<view class="text-14px" style="line-height: 28rpx;">{{unlockItem.consumeDiamond}}</view>
+					</view>
+				</view>
+
+
+			</view>
+			<view class="position-absolute-center-top" style="top: 160rpx">
+				<image class="prompt-title" mode="aspectFit"
+					src="../../../static/common/subNVue/unlock/unlock-title.png">
+				</image>
+			</view>
+			<view class="position-absolute-center-bottom justify-center align-center flex-direction-row"
+				style="bottom: 240rpx;">
+				<button class="make-bg-bPurple unlock-button" @click="buttonMessage('confirm')"><text
+						class="text-white text-18px">解锁</text> </button>
+				<button class="bg-grey-mid unlock-button" style="margin-left: 44rpx; border-color: #CDCDCD;"
+					@click="buttonMessage('cancle')"><text class="text-white text-18px">取消</text> </button>
+			</view>
+
+
+		</view>
+
+
+		<!-- 显示签到信息 -->
+		<view v-if="currentType == 'signIn'" class="reward-container" style="height: 1000rpx;">
+			<view class="position-absolute-center-top" style="top: 20rpx;">
+				<image style="width: 656rpx; height: 224rpx;" mode="aspectFit"
+					src="../../../static/common/subNVue/prompt-bg-title@2x.png">
+				</image>
+			</view>
+
+			<view class="prompt-mid justify-start flex-direction-column" style="height: 724rpx; ">
+				<view style="height: 81rpx;"></view>
+				<view class="flex-wrap flex-direction-row flex-sub justify-center">
+					<block v-for="(item, index) in lists" :key="index">
+						<view class="justify-center align-center" style="height: 148rpx; width: 116rpx; margin:5rpx;">
+							<view class="prompt-cell-bg" style="height: 148rpx;" :style="{opacity:item.isSelect?1:0.5}">
+							</view>
+							<view class="position-absolute-center" style="height:148rpx;">
+								<image style="" :style="{width:item.width+'px',height:item.height+'px'}"
+									mode="aspectFit" :src="item.isSelect?item.url:item.selectedUrl">
+								</image>
+								<text class="text-14px text-center"
+									style="height: 14px;line-height: 14px; margin-top:12rpx;">{{item.explain}}+20</text>
+
+							</view>
+
+						</view>
+						<view class="justify-center align-center" style=" margin:22rpx 5rpx;">
+							<image v-if="item.isSelect" class="" style="height:34rpx;width:34rpx;"
+								src="../../../static/common/subNVue/sign/sign-tick@2x.png"></image>
+							<text v-else class="text-13px text-gray">第{{index+1}}天</text>
+						</view>
+
+					</block>
+				</view>
+
+
+			</view>
+			<view class="position-absolute-center-top" style="top: 108rpx">
+				<image class="prompt-title" mode="aspectFit"
+					src="../../../static/common/subNVue/sign/sign-title@2x.png">
+				</image>
+			</view>
+			<view class="position-absolute-center-bottom" style="bottom: 200rpx;">
+				<button class="make-bg-bPurple prompt-button" @click="buttonMessage('confirm')"><text
+						class="text-white text-18px">点击领取</text> </button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				title: '',
+				content: '',
+				lists: [],
+				levelRewardIndex: 0,
+				promptList: [{
+					name: 'gold',
+					width: 31,
+					height: 31,
+					url: '../../../static/common/sideBar/sGold.png',
+					explain: ''
+				}, {
+					name: 'diamond',
+					width: 31,
+					height: 31,
+					url: '../../../static/common/sideBar/sDiamond.png',
+					explain: ''
+				}, {
+					name: 'medal',
+					width: 36,
+					height: 41,
+					url: '../../../static/common/modal/medal.png',
+					explain: ''
+				}, {
+					name: 'questionMark',
+					width: 24,
+					height: 35,
+					url: '../../../static/common/subNVue/prompt-qm@2x.png',
+					explain: '未知'
+				}],
+				currentType: 'none',
+
+				/**
+				 * 解锁项目
+				 */
+				unlockItem: {
+					consumeGold: 0,
+					consumeDiamond: 0
+				},
+				//当前传入操作的item
+				operationItem: null
+			}
+		},
+		created() {
+			const vm = this;
+			// for (let i = 1; i < 4; i++) {
+			// 	this.lists.push('item' + i);
+			// }
+			uni.$on('reward-popup', (data) => {
+				vm.title = data.title;
+				vm.content = data.content;
+				vm.lists = [];
+				vm.currentType = data.type;
+				vm.operationItem = data.operationItem;
+				if (vm.currentType == 'prompt') {
+					let _item = data.item;
+					console.log(_item);
+					if (_item.gold && _item.gold != 0) {
+						let temp = Object.assign({}, vm.promptList[0]);
+						temp.explain = _item.gold + '';
+						vm.lists.push(temp);
+					} else {
+						vm.lists.push(vm.promptList[3]);
+					}
+
+					if (_item.diamond && _item.diamond != 0) {
+						let temp = Object.assign({}, vm.promptList[1]);
+						temp.explain = _item.diamond + '';
+						vm.lists.push(temp);
+					} else {
+						vm.lists.push(vm.promptList[3]);
+					}
+
+					if (_item.honor) {
+						let temp = Object.assign({}, vm.promptList[2]);
+						temp.explain = _item.honor + '';
+						vm.lists.push(temp);
+					} else {
+						vm.lists.push(vm.promptList[3]);
+					}
+				} else if (vm.currentType == 'unlock') {
+					vm.unlockItem.consumeGold = data.item.consumeGold;
+					vm.unlockItem.consumeDiamond = data.item.consumeDiamond;
+				} else if (vm.currentType == 'signIn') {
+					vm.lists = data.lists;
+				} else if (vm.currentType == "levelReward") {
+					let _item = data.item;
+					if (_item.gold && _item.gold != 0) {
+						let temp = Object.assign({}, vm.promptList[0]);
+						temp.explain = _item.gold + '';
+						vm.lists.push(temp);
+					}
+
+					if (_item.diamond && _item.diamond != 0) {
+						let temp = Object.assign({}, vm.promptList[1]);
+						temp.explain = _item.diamond + '';
+						vm.lists.push(temp);
+					}
+
+					if (_item.honor && _item.honor.type != 0) {
+						let temp = Object.assign({}, vm.promptList[2]);
+						temp.explain = _item.honor.explain + '';
+						vm.lists.push(temp);
+					}
+
+					vm.levelRewardIndex = 0;
+					console.log(vm.lists);
+				}
+
+			})
+		},
+		beforeDestroy() {
+			uni.$off('drawer-page')
+		},
+		methods: {
+			sendMessage() {
+				const subNVue = uni.getCurrentSubNVue()
+				uni.$emit('reward-popup-page', {
+					title: '已读完!',
+				})
+			},
+			handle(item, index) {
+				const subNVue = uni.getCurrentSubNVue()
+				uni.$emit('reward-popup-page', {
+					type: 'interactive',
+					info: item + ' 该元素被点击了!',
+				})
+			},
+			buttonMessage(buttonEvent) {
+				const subNVue = uni.getCurrentSubNVue()
+				uni.$emit('reward-popup-page', {
+					type: 'button',
+					messageType: this.currentType,
+					confirm: buttonEvent == 'confirm' ? true : false,
+					cancel: buttonEvent == 'cancel' ? true : false,
+					info: buttonEvent + ' 该元素被点击了!',
+					operationItem: this.operationItem
+				})
+				if (this.currentType == 'levelReward') {
+					this.levelRewardIndex ++;
+					if(this.levelRewardIndex>=this.lists.length){
+						this.hidePupup();
+					}
+				} else {
+					this.hidePupup();
+				}
+
+			},
+			hidePupup() {
+				const subNVue = uni.getCurrentSubNVue();
+				subNVue.hide("auto", 250);
+			}
+		}
+	}
+</script>
+
+<style>
+	.wrapper {
+		justify-content: center;
+	}
+
+	.title {
+		height: 100rpx;
+		line-height: 100rpx;
+		border-bottom-style: solid;
+		border-bottom-width: 1rpx;
+		border-bottom-color: #CBCBCB;
+		flex: 0;
+		font-size: 30rpx;
+	}
+
+	.scroller {
+		height: 400rpx;
+		padding: 8rpx 15rpx;
+	}
+
+	.content {
+		color: #555555;
+		font-size: 32rpx;
+	}
+
+	.message-wrapper {
+		flex: 0;
+		border-top-style: solid;
+		border-top-width: 1rpx;
+		border-top-color: #CBCBCB;
+		height: 80rpx;
+		align-items: flex-end;
+	}
+
+	.send-message {
+		font-size: 30rpx;
+		line-height: 80rpx;
+		color: #00CE47;
+		margin-left: 20rpx;
+	}
+
+	.cell {
+		margin: 10rpx;
+		padding: 20rpx 0;
+		top: 10rpx;
+		align-items: center;
+		justify-content: center;
+		border-radius: 10rpx;
+		background-color: #5989B9;
+	}
+
+	.text {
+		font-size: 30rpx;
+		text-align: center;
+		color: white;
+	}
+
+	/**
+	 * 奖励样式
+	 */
+	.reward-container {
+		flex-direction: column;
+		justify-content: space-between;
+		padding: 10rpx 15rpx;
+		/* background-color: #F4F5F6; */
+		border-radius: 4rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 750rpx;
+	}
+
+	.reward-item {
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		justify-content: center;
+		align-items: center;
+
+	}
+
+	.reward-image {
+		width: 180rpx;
+		height: 180rpx;
+	}
+
+	.reward-button {
+		width: 348rpx;
+		height: 88rpx;
+		margin-top: 50rpx;
+		border-color: rgba(151, 151, 255, 1);
+	}
+
+	/**
+	 * 提示奖励部分
+	 */
+	.prompt-title {
+		width: 368rpx;
+		height: 90rpx;
+	}
+
+	.prompt-mid {
+		border-width: 14rpx;
+		border-style: solid;
+		border-color: #E5E5FF;
+		border-radius: 10px;
+		background-color: #FFFFFF;
+		width: 600rpx;
+		height: 622rpx;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		/* padding: 0 20px; */
+	}
+
+	.prompt-button {
+		width: 348rpx;
+		height: 88rpx;
+		margin-top: 50rpx;
+		border-color: rgba(151, 151, 255, 1);
+		border-radius: 21px;
+	}
+
+	.prompt-cell {
+		margin: 20rpx 5rpx 5rpx 5rpx;
+		/* padding: 40rpx 0; */
+		height: 260rpx;
+		top: 10rpx;
+		align-items: center;
+		justify-content: center;
+		border-radius: 10rpx;
+		background-color: #F2F2FF;
+	}
+
+	.prompt-cell-bg {
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		justify-content: center;
+		align-items: center;
+		height: 210rpx;
+		align-items: center;
+		justify-content: center;
+		border-radius: 10rpx;
+		background-color: #F2F2FF;
+	}
+
+	/**
+	 * 解锁样式
+	 */
+	.unlock-cell {
+		height: 80rpx;
+		width: 466rpx;
+		margin-top: 20rpx;
+		margin-bottom: 120rpx;
+		background-color: rgba(202, 202, 202, 0.13);
+		border-radius: 40rpx;
+	}
+
+	.unlock-button {
+		width: 208rpx;
+		height: 80rpx;
+		border-color: rgba(151, 151, 255, 1);
+		border-radius: 9px;
+	}
+</style>

二进制
static/common/modal/canUnlock.png


二进制
static/common/subNVue/achievement-title.png


二进制
static/common/subNVue/bg-light.png


二进制
static/common/subNVue/big-medal.png


二进制
static/common/subNVue/line-border@2x.png


二进制
static/common/subNVue/prompt-bg-title@2x.png


二进制
static/common/subNVue/prompt-bg@2x.png


二进制
static/common/subNVue/prompt-qm@2x.png


二进制
static/common/subNVue/prompt-reward-title@2x.png


二进制
static/common/subNVue/reward-diamond.png


二进制
static/common/subNVue/reward-gold.png


二进制
static/common/subNVue/reward-title.png


二进制
static/common/subNVue/sign/sign-grey-diamond@2x.png


二进制
static/common/subNVue/sign/sign-grey-gold@2x.png


二进制
static/common/subNVue/sign/sign-tick@2x.png


二进制
static/common/subNVue/sign/sign-title@2x.png


二进制
static/common/subNVue/unlock/unlock-mid-bg.png


二进制
static/common/subNVue/unlock/unlock-mid.png


二进制
static/common/subNVue/unlock/unlock-title.png


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

@@ -26,6 +26,11 @@
 	flex-direction: row;
 }
 
+.flex-direction-column {
+	flex-direction: column;
+}
+
+
 .flex-wrap {
 	flex-wrap: wrap;
 }
@@ -304,6 +309,38 @@
 	color: #ffffff;
 }
 
+/* 蓝紫 */
+.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);
+}
+
+
+.make-bg-bPurple {
+	background-color: rgba(151, 151, 255, 1);
+}
+
+
+.bg-gray {
+	background-color: #f0f0f0;
+	color: #333333;
+}
+
+.bg-grey {
+	background-color: #8799a3;
+	color: #ffffff;
+}
+
+.bg-grey-mid{
+	background-color: #CDCDCD;
+	color: #ffffff;
+}
 
 /*  -- 内外边距 -- */
 
@@ -313,4 +350,48 @@
 
 .margin-12px {
 	margin: 12px;
+}
+
+
+.position-relative{
+	position: relative;
+}
+
+.position-absolute-center{
+	position: absolute;
+	top: 0;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	justify-content: center;
+	align-items: center;
+}
+
+
+
+.position-absolute-center-bottom{
+	position: absolute;
+	/* top: 0; */
+	bottom: 0;
+	left: 0;
+	right: 0;
+	/* justify-content: center; */
+	align-items: center;
+}
+
+.position-absolute-center-top{
+	position: absolute;
+	top: 0;
+	/* bottom: 0; */
+	left: 0;
+	right: 0;
+	/* justify-content: center; */
+	align-items: center;
+}
+
+
+/* 自定义导航栏的图片大小 */
+.png-more {
+	width: 20px;
+	height: 20px;
 }

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

@@ -4389,7 +4389,7 @@ scroll-view.cu-steps .cu-item {
 
 .grid-progress-vertical-child {
 	/* position: relative; */
-	width: 70rpx;
+	width: 74rpx;
 	height: 14rpx;
 	margin: 14rpx 18rpx 0 18rpx;
 	display: flex;
@@ -4402,6 +4402,7 @@ scroll-view.cu-steps .cu-item {
 .grid-progress-vertical-text {
 	color: #FFFFFF;
 	font-size: 8px;
+	line-height: 8px;
 }
 
 .grid-progress-text-hidden {

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

@@ -255,7 +255,11 @@ const store = new Vuex.Store({
 		},
 		globalMyAttitude: null,
 
-		//当前显示的模式下标
+		/**
+		 * 当前显示的模式下标,区分总体的显示模块
+		 * 比如拳击模块体验下,设置 0
+		 * 跳绳为主的模式体验下,设置 1
+		 */
 		currentModeIndex: 1,
 
 		//蓝牙变量操作
@@ -340,13 +344,15 @@ const store = new Vuex.Store({
 		bRopeKeyTwo: 0,
 
 		//钻石,金币
-		cDiamond: 10000,
-		cGold: 10000,
+		cDiamond: 0,
+		cGold: 0,
 
 		/**
 		 * 任务相关
 		 */
-		currentJumpTask: null
+		currentJumpTask: null,
+		multiPersonList: [],
+		singlePersonList: [],
 
 	},
 	mutations: {
@@ -367,6 +373,10 @@ const store = new Vuex.Store({
 				state.currentJumpTask = value;
 			}
 		},
+		resetActionJumpTask(state) {
+			state.currentJumpTask = null;
+			uni.setStorageSync('currentJumpTask', state.currentJumpTask);
+		},
 
 		setFinallSelectFriendInfo(state, friendInfo) {
 			state.finallySelectFriendInfo = friendInfo;
@@ -1240,7 +1250,7 @@ const store = new Vuex.Store({
 			state.oldArcbarProCalorie = 0;
 			//记录表盘当前的总卡路里
 			state.oldArcbarAllCalorie = 0;
-			
+
 			//任务相关
 			state.currentJumpTask = null;
 		},
@@ -1482,7 +1492,7 @@ const store = new Vuex.Store({
 			state.bListenerAccArray = false;
 			//更新二进制的
 			state.bListenerHexUpdate = false;
-			
+
 		},
 		//连接蓝牙
 		onCreateBLEConnection(state, context) {
@@ -1745,6 +1755,10 @@ const store = new Vuex.Store({
 
 		},
 		onWriteBLEConnectionValue(state, context) {
+			//#ifdef H5
+			console.warn("h5不支持蓝牙:",'onWriteBLEConnectionValue');
+			return;
+			//#endif
 			let {
 				getSuccess = null,
 					getFail = null,
@@ -1860,7 +1874,7 @@ const store = new Vuex.Store({
 			} = data.gyro;
 
 			state.filter.Update(new o0.Vector3(ax, ay, az), msGap, new o0.Vector3(gx, gy, gz),
-			callback); //我自己的更新acc的函数
+				callback); //我自己的更新acc的函数
 		},
 
 		/**
@@ -3059,6 +3073,66 @@ const store = new Vuex.Store({
 					console.log(e)
 				});
 		},
+
+		/**
+		 * 任务其他操作
+		 */
+
+		//获取关卡信息
+		getLevelList(state, callback) {
+			let self = this;
+			reqUtil
+				.requestData(config.URL.GETLEVELJUMPLIST, {})
+				.then(
+					res => {
+						if (res.code == 0) {
+							// console.log('GETLEVELJUMPLIST:' + JSON.stringify(res.data.singlePerson));
+							state.singlePersonList = res.data.singlePerson;
+							state.multiPersonList = res.data.multiPerson;
+							//获取到数据时候,重置actionJump
+							self.commit('resetActionJumpTask');
+							if (callback)
+								callback();
+						}
+					},
+					e => {
+						console.log(e);
+					}
+				);
+		},
+
+		/**
+		 * 获取钱包信息
+		 * @param {Object} state
+		 * @param {Object} callback
+		 */
+		getUserWallets(state, callback) {
+			reqUtil
+				.requestData(config.URL.USERGETWALLETINFO, {})
+				.then(
+					res => {
+						if (res.code == 0) {
+							console.log('USERGETWALLETINFO:' + JSON.stringify(res.data));
+							state.cGold = res.data.gold;
+							state.cDiamond = res.data.diamond;
+							if (callback)
+								callback();
+						}
+					},
+					e => {
+						console.log(e);
+					}
+				);
+		},
+
+		setGoldAndDiamond(state, context) {
+			let {
+				gold,
+				diamond
+			} = context;
+			state.cGold = gold;
+			state.cDiamond = diamond;
+		}
 	}
 })