Przeglądaj źródła

feature: 添加固件信息界面

Damon 1 rok temu
rodzic
commit
c0dba6c465

+ 2 - 3
pages/piano/detail/detail.wxml

@@ -27,16 +27,15 @@
       <text class="bottom_public_text">恢复出厂设置</text>
       <text>还原设备默认设置</text>
     </view>
-    <image class="bottom_item_image" mode="heightFix" src="./../../../img/min.png"></image>
+    <image class="bottom_item_image" mode="heightFix" src="./../../../img/b.png"></image>
   </view>
 
   <view class="bottom_public" bind:tap="firmwareClick" bin>
     <view class="bottom_item">
       <text class="bottom_public_text bottom_public_text_plus">固件信息</text>
       <view class="bottom_public_red" style="display: {{redShow ?'block':'none'}};"></view>
-      <!-- <image class="bottom_item_image" mode="heightFix" src="./../../../img/min.png"></image> -->
     </view>
-    <image class="bottom_item_image" mode="heightFix" src="./../../../img/min.png"></image>
+    <image class="bottom_item_image" mode="heightFix" src="./../../../img/b.png"></image>
   </view>
 
 </view>

+ 1 - 1
pages/piano/detail/detail.wxss

@@ -57,7 +57,7 @@
   width: 15rpx;
   height: 15rpx;
   background-color: red;
-  margin-bottom: 20rpx;
+  margin-bottom: 25rpx;
   border-radius: 50%;
 }
 

+ 10 - 0
pages/piano/firmware/firmware.js

@@ -9,6 +9,16 @@ Page({
       showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
       title: '固件信息', //导航栏 中间的标题
     },
+    topList: [{
+      title: "制造商",
+      name: "Air Smart",
+    }, {
+      title: "产品型号",
+      name: "MW-OTR",
+    }, {
+      title: "MAC地址",
+      name: "4b:45:12:5a:9y:3g",
+    }, ],
   },
 
   /**

+ 14 - 0
pages/piano/firmware/firmware.wxml

@@ -1,4 +1,18 @@
 <view>
   <nav-bar bind:goBack="_goBack" nav-bgc-class="ex-nav-bgc-class" nav-title-class="ex-nav-title-class" ex-back-pre="ex-back-pre" navbar-data='{{nvabarData}}'>
   </nav-bar>
+
+  <view style="margin-top: 100rpx;"></view>
+
+  <view wx:for="{{topList}}" wx:key="key" wx:for-item="item" wx:for-index="index">
+    <view class="top_item" data-index="{{index}}">
+      <view class="top_item_left">{{item.title}}</view>
+      <view class="top_item_right">{{item.name}}</view>
+    </view>
+  </view>
+
+  <view class="update">
+    <view bindtap="toUpdate" class="{{!islogin ? 'action' : ''}}">固件更新</view>
+  </view>
+
 </view>

+ 20 - 44
pages/piano/firmware/firmware.wxss

@@ -1,60 +1,36 @@
-.top_item_public_add {
-  /* 
-  margin-top: 50rpx; */
-  /*  垂直布局 */
-  /* flex-direction: column; */
-  /* 垂直居中 */
-  /* justify-content: center; */
-  display: -webkit-flex;
+.top_item {
   display: flex;
-  margin-top: 40rpx;
-  align-items: center;
-  justify-content: flex-start;
-  flex-wrap: wrap;
-  width: 100%;
-}
-
-.top_item_public {
-  /* display: flex;
-  flex: 1; */
-  justify-content: center;
-  flex: 0 0 auto;
-  width: 33.33333333%;
+  justify-content: space-between;
   text-align: center;
   color: #797979;
-  padding: 40rpx 0;
   font-size: 30rpx;
+  padding: 20rpx 40rpx 20rpx 40rpx;
 }
 
-.top_image {
-  height: 70rpx;
-}
-
-.setting_public {
-  margin: 200rpx 0 0rpx 40rpx;
-  font-size: 40rpx;
-  font-weight: 500;
+.top_item_left {
+  color: black;
+  font-size: 35rpx;
 }
 
-.bottom_public {
-  display: flex;
-  font-size: 40rpx;
-  margin: 60rpx 40rpx 40rpx 40rpx;
-  justify-content: space-between;
+.update {
+  margin-top: 100rpx;
   align-items: center;
-  font-size: 30rpx;
-}
-
-.bottom_public_text {
-  margin-right: 30rpx;
+  display: flex;
+  justify-content: center;
 }
 
-.bottom_item {
+.update>view {
   display: flex;
+  justify-content: center;
   align-items: center;
+  width: 520rpx;
+  height: 80rpx;
+  border-radius: 45rpx;
+  font-size: 35rpx;
+  font-weight: 400;
+  color: #FFFFFF;
 }
 
-.bottom_item_image {
-  height: 30rpx;
-  margin-right: 20rpx;
+.update>view.action {
+  background: #6547A3;
 }