|
@@ -40,18 +40,28 @@
|
|
|
</van-col>
|
|
|
<van-col span="8">
|
|
|
<div class="flex flex-direction align-center justify-center">
|
|
|
+<!-- <view class="elc_power_container">-->
|
|
|
+<!-- <img src="https://img.shuimuai.com/web/dianchi_3.png" alt="" :style="{ width: device_power + '%' }"-->
|
|
|
+<!-- class="device_elc"/>-->
|
|
|
+<!-- </view>-->
|
|
|
<view class="elc_power_container">
|
|
|
- <img src="https://img.shuimuai.com/web/dianchi_3.png" alt="" :style="{ width: device_power + '%' }"
|
|
|
- class="device_elc"/>
|
|
|
+ <view class="device_power" :style="{'background-size': device_power + '% 100%'}">
|
|
|
+ <text v-if="is_dev" v-text="device_power+'%'"></text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<text class="text-default">脑机电量</text>
|
|
|
</div>
|
|
|
</van-col>
|
|
|
<van-col span="8">
|
|
|
<div class="flex flex-direction align-center justify-center">
|
|
|
+<!-- <view class="elc_power_container">-->
|
|
|
+<!-- <img src="https://img.shuimuai.com/web/dianchi_3.png" alt="" :style="{ width: toy_power + '%' }"-->
|
|
|
+<!-- class="device_elc"/>-->
|
|
|
+<!-- </view>-->
|
|
|
<view class="elc_power_container">
|
|
|
- <img src="https://img.shuimuai.com/web/dianchi_3.png" alt="" :style="{ width: toy_power + '%' }"
|
|
|
- class="device_elc"/>
|
|
|
+ <view class="device_power" :style="{'background-size': toy_power + '% 100%'}">
|
|
|
+ <text v-if="is_dev" v-text="toy_power+'%'"></text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<text class="text-default">教具电量</text>
|
|
|
</div>
|
|
@@ -283,6 +293,8 @@ export default {
|
|
|
play_time: 0,
|
|
|
// 本次游玩时间倒计时
|
|
|
countdown_text: "--:--",
|
|
|
+ // 是否开发环境
|
|
|
+ is_dev: false,
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
@@ -292,6 +304,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.is_dev = process.env.NODE_ENV === "development";
|
|
|
let game_status = game_store.getters.getGameStatus()*1;
|
|
|
if (game_status === 1) {
|
|
|
$this.is_end = false;
|
|
@@ -680,7 +693,16 @@ export default {
|
|
|
border-radius: 5px;
|
|
|
height: 22px;
|
|
|
}
|
|
|
-
|
|
|
+.device_power{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background-image: url(https://img.shuimuai.com/web/dianchi_3.png);
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 0 100%;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
.device_elc {
|
|
|
height: 18px;
|
|
|
}
|