|
@@ -1,6 +1,6 @@
|
|
|
<!-- 新版本跳首页文件修改版本 -->
|
|
|
|
|
|
-<template>
|
|
|
+<template>
|
|
|
<view class="bg-person " :class="bEFHitShake?' screen-jitter ':''">
|
|
|
<uni-nav-bar id="nav-bar" status-bar="true" backgroundColor="RGBA(30, 30, 85, 1)" @clickLeft="showClickEvent()"
|
|
|
color="#FFFFFF" fixed="true" :border="false">
|
|
@@ -216,31 +216,91 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view> -->
|
|
|
-
|
|
|
+
|
|
|
<!-- <view class="margin-sm "> -->
|
|
|
- <!-- <button type="primary" @click="jumpIdenModule_onJumpInit">
|
|
|
+ <!-- <button type="primary" @click="jumpIdenModule_onJumpInit">
|
|
|
使用本地默认轨迹
|
|
|
</button>
|
|
|
<button type="primary" class=" margin-top-sm" @click="jumpIdenModule_onJumpInitLocalData">
|
|
|
使用so默认轨迹
|
|
|
</button> -->
|
|
|
-
|
|
|
- <!-- onTestUpdate -->
|
|
|
- <!-- <button type="primary" class="margin-top-sm" @click="jumpIdenModule_onTestUpdate">
|
|
|
+
|
|
|
+ <!-- onTestUpdate -->
|
|
|
+ <!-- <button type="primary" class="margin-top-sm" @click="jumpIdenModule_onTestUpdate">
|
|
|
模拟跳数据输入
|
|
|
</button> -->
|
|
|
-
|
|
|
+
|
|
|
<!-- </view> -->
|
|
|
-
|
|
|
- <button type="primary" @click="onHitOpenBLELight">
|
|
|
- onHitOpenBLELight
|
|
|
- </button>
|
|
|
+ <view class="cu-list menu card-menu">
|
|
|
+ <view class="cu-item">
|
|
|
+
|
|
|
+ <view class="content">
|
|
|
+ <text class="cuIcon-title text-green"></text>
|
|
|
+ <text class="text-grey">新协议</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-item">
|
|
|
+ <view class="content">
|
|
|
+ <text class="cuIcon-btn text-green"></text>
|
|
|
+ <text class="text-grey">默认 (5B0E02141E141E141E0...05D)</text>
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ <button class="cu-btn round bg-green shadow"
|
|
|
+ @click="onSendBLELightNoSet('5B0E02141E141E141E00000000000000005D')"> 发送</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-item">
|
|
|
+ <view class="content">
|
|
|
+ <text class="cuIcon-btn text-green"></text>
|
|
|
+ <text class="text-grey">退出(5B0E020...05D)</text>
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ <button class="cu-btn round bg-green shadow"
|
|
|
+ @click="onSendBLELightNoSet('5B0E0200000000000000000000000000005D')"> 发送</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-form-group">
|
|
|
+ <input placeholder="输入自定义指令" :value="readBLELight" @input="onReadBLELightInput"
|
|
|
+ name="input"></input>
|
|
|
+ <button class='cu-btn round bg-green shadow' @click="onSendBLELightValue(readBLELight)">发送</button>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ <view class="cu-item">
|
|
|
+ <view class="content">
|
|
|
+ <text class="cuIcon-btn text-green"></text>
|
|
|
+ <text class="text-grey">播放一段闪烁</text>
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ <button class="cu-btn round bg-green shadow" @click="onHitOpenBLELightNew"> 确定</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-list menu card-menu">
|
|
|
+ <view class="cu-item">
|
|
|
+
|
|
|
+ <view class="content">
|
|
|
+ <text class="cuIcon-title text-green"></text>
|
|
|
+ <text class="text-grey">旧设备</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-item">
|
|
|
+ <view class="content">
|
|
|
+ <text class="cuIcon-btn text-green"></text>
|
|
|
+ <text class="text-grey">播放一段闪烁</text>
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ <button class="cu-btn round bg-green shadow" @click="onHitOpenBLELight"> 确定</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
<!-- <button type="primary" @click="B_OpenRopeSkipping">
|
|
|
B_OpenRopeSkipping
|
|
|
</button> -->
|
|
|
-
|
|
|
-
|
|
|
- <view style="height: 50rpx;"></view>
|
|
|
+
|
|
|
+
|
|
|
+ <view style="height: 250rpx;"></view>
|
|
|
</scroll-view>
|
|
|
|
|
|
<!-- 底部中间上滑按钮 -->
|
|
@@ -600,7 +660,8 @@
|
|
|
'guideUnlockState',
|
|
|
'sandbagHitCount',
|
|
|
'readDataName',
|
|
|
- 'filesList'
|
|
|
+ 'filesList',
|
|
|
+ 'readBLELight'
|
|
|
]),
|
|
|
components: {
|
|
|
// uniNavBar,
|
|
@@ -937,6 +998,9 @@
|
|
|
//初始化一个android数据
|
|
|
this.jumpIdenModule_onJumpInit();
|
|
|
|
|
|
+ //
|
|
|
+ this.onGetReadBLELight();
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
_self.bHide = false;
|
|
@@ -1071,7 +1135,8 @@
|
|
|
'gOnAddClientInfo', 'onWriteBLEConnectionValue',
|
|
|
'gCreateFilterObj', 'gUpdateFilter', 'B_GetBondedDevices', 'B_OpenBLESetting', 'B_OpenRopeSkipping',
|
|
|
'B_CloseRopeSkipping',
|
|
|
- 'gCreateSandbagAlgorithm', 'gUpdateSandbagAlgorithm','gIntelligentUpdateSandbagAlgorithm', 'gStartSimulateBLEUpdate',
|
|
|
+ 'gCreateSandbagAlgorithm', 'gUpdateSandbagAlgorithm', 'gIntelligentUpdateSandbagAlgorithm',
|
|
|
+ 'gStartSimulateBLEUpdate',
|
|
|
'gStopSimulateBLEUpdate',
|
|
|
'getActionJumpTask',
|
|
|
'setActionJumpTask', 'getLevelList',
|
|
@@ -1097,9 +1162,13 @@
|
|
|
'jumpIdenModule_onTestUpdate',
|
|
|
'jumpIdenModule_onTestJump6AxisDataUpdate',
|
|
|
//算法相关END
|
|
|
-
|
|
|
+
|
|
|
//灯光
|
|
|
- 'onHitOpenBLELight'
|
|
|
+ 'onHitOpenBLELight',
|
|
|
+ 'onHitOpenBLELightNew',
|
|
|
+ 'onGetReadBLELight',
|
|
|
+ 'onSetReadBLELight',
|
|
|
+ 'B_WriteHexToBLECharacteristic'
|
|
|
]),
|
|
|
BasicsSteps() {
|
|
|
this.basics = this.basics == this.basicsList.length - 1 ? 0 : this.basics + 1
|
|
@@ -1433,8 +1502,8 @@
|
|
|
// this.$refs.boxingPostRef.onSetMode('ropeMode');
|
|
|
// }, 500)
|
|
|
// }
|
|
|
- } else if(eq.ename.indexOf("intelligent") > -1 && this.BLEConnectDevice.id == 4){
|
|
|
-
|
|
|
+ } else if (eq.ename.indexOf("intelligent") > -1 && this.BLEConnectDevice.id == 4) {
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1462,7 +1531,7 @@
|
|
|
if (!this.instructionState.bOpen) return;
|
|
|
|
|
|
if (this.BLEConnectDevice.usageMode == "hotman") {
|
|
|
- if(this.BLEConnectDevice.deviceType == "BLEIntelligent"){
|
|
|
+ if (this.BLEConnectDevice.deviceType == "BLEIntelligent") {
|
|
|
this.gIntelligentUpdateSandbagAlgorithm({
|
|
|
data: data,
|
|
|
callback: (res) => {
|
|
@@ -1471,7 +1540,7 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.gUpdateSandbagAlgorithm({
|
|
|
data: data,
|
|
|
callback: (res) => {
|
|
@@ -1481,7 +1550,7 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
} else if (this.BLEConnectDevice.usageMode == "general") {
|
|
|
//这个是普通打击模式
|
|
|
this.$refs.boxingPostRef.onBLEHandleUpdate(data);
|
|
@@ -2539,7 +2608,7 @@
|
|
|
let {
|
|
|
isOffEvent = false
|
|
|
} = data;
|
|
|
-
|
|
|
+
|
|
|
//游戏结束,重置时间
|
|
|
this.arcbarCountDownTimeReset();
|
|
|
//todo 可能区分 levelJump 关卡类型
|
|
@@ -2579,7 +2648,7 @@
|
|
|
this.uploadUserData_hitCount();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.AJData.isFinish = true;
|
|
|
//奖励赢的人 PKLEVELREWARD
|
|
|
let _item = this.currentJumpTask.item;
|
|
@@ -3381,7 +3450,25 @@
|
|
|
item.bRatio = true;
|
|
|
}
|
|
|
});
|
|
|
+ },
|
|
|
+
|
|
|
+ onReadBLELightInput: function(event) {
|
|
|
+ this.onSetReadBLELight(event.target.value);
|
|
|
+ },
|
|
|
+ onSendBLELightNoSet(value) {
|
|
|
+ console.log(value);
|
|
|
+ this.B_WriteHexToBLECharacteristic({
|
|
|
+ value: value
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onSendBLELightValue(value) {
|
|
|
+ console.log(value);
|
|
|
+ this.B_WriteHexToBLECharacteristic({
|
|
|
+ value: value
|
|
|
+ });
|
|
|
+ this.onSetReadBLELight(value);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|