Bladeren bron

Merge branch 'master' of gitee.com:sh_13808852820/program

Foystor 3 jaren geleden
bovenliggende
commit
dfc819a40b
1 gewijzigde bestanden met toevoegingen van 21 en 59 verwijderingen
  1. 21 59
      src/pages/start/index.vue

+ 21 - 59
src/pages/start/index.vue

@@ -1,9 +1,5 @@
 <template>
   <div id="playing_container">
-    <!--    <view style="width: 100%;height: 100px;color: white">-->
-    <!--      <view>脑环Mac:{{ deviceId }}</view>-->
-    <!--      <view>教具UUID:{{ toy_UUID }}</view>-->
-    <!--    </view>-->
     <!--    计费面板模块-->
     <div class="game_panel padding-top-sm">
       <van-row gutter="16">
@@ -46,7 +42,7 @@
     <div class="game_status padding-tb">
       <van-row>
         <van-col
-          span="5"
+          span="8"
         >
           <div
             class="flex flex-direction align-center justify-center"
@@ -71,63 +67,33 @@
             <text class="text-default">未正确佩戴</text>
           </div>
         </van-col>
-        <van-col span="4">
+        <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>-->
-            <text class="text-default">{{ device_power }}%</text>
+           <view class="elc_power_container">
+             <img
+               src="https://img.shuimuai.com/web/dianchi_3.png"
+               alt=""
+               :style="{ width: device_power + '%' }"
+               class="device_elc"
+             />
+           </view>
             <text class="text-default">脑环电量</text>
           </div>
         </van-col>
-         <van-col span="4">
-          <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>-->
-            <text class="text-default">{{ device_voltage }}</text>
-            <text class="text-default">脑环电压</text>
-          </div>
-        </van-col>
 
-        <van-col span="4">
+        <van-col span="8" v-if="is_new">
           <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>-->
-            <text class="text-default">{{ toy_power }}</text>
+           <view class="elc_power_container">
+             <img
+               src="https://img.shuimuai.com/web/dianchi_3.png"
+               alt=""
+               :style="{ width: toy_power + '%' }"
+               class="device_elc"
+             />
+           </view>
             <text class="text-default">教具电量</text>
           </div>
         </van-col>
-        <van-col span="4">
-          <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>-->
-            <text class="text-default">{{ toy_voltage }}</text>
-            <text class="text-default">教具电压</text>
-          </div>
-        </van-col>
       </van-row>
     </div>
 
@@ -384,8 +350,8 @@ export default {
       device_power: 0,
       device_voltage:0,
 
-
       toy_UUID: "",
+      is_new:false,
     };
   },
   methods: {
@@ -674,11 +640,7 @@ export default {
       $this.$bluetooth.watch_bluetooth_status($this);
     }
 
-    // const $sendSmPack = setInterval(()=>{
-    //   if ($this.game_status == 1){
-    //     $this.$bluetooth.SendOrder("04")
-    //   }
-    // },1500)
+    $this.is_new = game_store.getters.getIsNew()
   },
   created() {
     $this = this;