瀏覽代碼

feature:修改微信小程序的tabbar组件

zeng.chen 1 年之前
父節點
當前提交
efd659789e
共有 6 個文件被更改,包括 39 次插入35 次删除
  1. 21 18
      app.json
  2. 2 1
      pages/home/home.js
  3. 4 6
      pages/home/home.wxml
  4. 6 6
      pages/piano/woodenfish/woodenfish.wxml
  5. 3 2
      pages/piano/woodenfish/woodenfish.wxss
  6. 3 2
      project.config.json

+ 21 - 18
app.json

@@ -1,6 +1,8 @@
 {
   "pages": [
+    "pages/home/home",
     "pages/index/index",
+    "pages/me/me",
     "pages/login/login",
     "pages/about/about",
     "pages/repeat/repeat",
@@ -10,35 +12,36 @@
     "pages/deviceConnect0/deviceConnect0",
     "pages/deviceConnect2/deviceConnect2",
     "pages/deviceConnect1/deviceConnect1",
-    "pages/me/me",
     "pages/download/download",
     "pages/wakeList/wakeList",
     "pages/aboutInfo/aboutInfo",
-    "pages/home/home",
     "pages/bluConnect/bleconnect"
   ],
-  "subPackages": [{
-    "root": "pages/piano/",
-    "pages": [
-      "detail/detail",
-      "woodenfish/woodenfish",
-      "wallpaper/wallpaper",
-      "musicscore/musicscore",
-      "firmware/firmware"
-    ]
-  }],
-
+  "subPackages": [
+    {
+      "root": "pages/piano/",
+      "pages": [
+        "detail/detail",
+        "woodenfish/woodenfish",
+        "wallpaper/wallpaper",
+        "musicscore/musicscore",
+        "firmware/firmware"
+      ]
+    }
+  ],
   "tabBar": {
+    "custom": true,
     "borderStyle": "black",
-    "list": [{
-        "pagePath": "pages/index/index",
-        "text": "首页",
+    "list": [
+      {
+        "pagePath": "pages/home/home",
+        "text": "首页2",
         "iconPath": "./img/index_unaction.png",
         "selectedIconPath": "./img/index_action.png"
       },
       {
-        "pagePath": "pages/home/home",
-        "text": "首页2",
+        "pagePath": "pages/index/index",
+        "text": "首页",
         "iconPath": "./img/index_unaction.png",
         "selectedIconPath": "./img/index_action.png"
       },

+ 2 - 1
pages/home/home.js

@@ -10,6 +10,7 @@ Page({
     navBarHeight: app.globalData.navBarHeight,
     MenuButtonheight: app.globalData.MenuButtonheight,
     MenuButtonTop: app.globalData.MenuButtonTop,
+    rightId:wx.getStorageSync('rightId') || 0,
     nvabarData: {
       nvabarData: {
         showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
@@ -25,7 +26,7 @@ Page({
       bannerList: [],
       isLoginWx: false,
       selectIndex: -1,
-    }
+        }
   },
   changeRole() {
     app.changeUserRight()

+ 4 - 6
pages/home/home.wxml

@@ -1,17 +1,16 @@
 <!-- pages/home/home.wxml -->
 <view class="container">
-  <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>
+  <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 class="helloC" style="margin-top: {{navBarHeight}};">下午好,昵称XXX</view>
-  <!-- <view class="bannerC">banner</view> -->
   <swiper class="bannerC" indicator-dots="true" autoplay="3000">
-    <swiper-item class="bannerItemC" wx:for="{{bannerList}}" wx:for-item="item">
+    <swiper-item class="bannerItemC" wx:for="{{bannerList}}" wx:key="item">
       <image src="{{item}}" mode="scaleToFill"/>
     </swiper-item>
   </swiper>
   <scroll-view class="deviceScrollClass" scroll-y="true">
-    <view class="deviceClass" wx:for="{{deviceList}}"  >
-        <!-- <view class="deviceItemC" bind:tap="deviceItemTap"> -->
+    <view class="deviceClass" wx:for="{{deviceList}}" wx:key="item" >
           <image class="deviceImg" src="../../img/g.png" mode="scaleToFill" />
           <view class="detailClass" style="flex-direction: row;">
             <view class="powerClass">
@@ -25,7 +24,6 @@
 
           <image class="detailPageC" src="../../img/a6.png" mode="scaleToFill" bind:tap="devieDetailPageTap" />
         </view>
-      <!-- </view> -->
     <view class="deviceEmptyClass" wx:if="{{deviceList && deviceList.deviceList.length == 0 || !isLoginWx}}">
       + 添加设备
     </view>

+ 6 - 6
pages/piano/woodenfish/woodenfish.wxml

@@ -13,8 +13,8 @@
         </span>
       </view>
 
-<!-- <view class="calender_c"></view> -->
-<xx-calendar use_date_arr="{{use_date_arr}}"></xx-calendar>
+      <!-- <view class="calender_c"></view> -->
+      <xx-calendar use_date_arr="{{use_date_arr}}"></xx-calendar>
 
       <view class="detail_c">
         <text class="detail_time">2024-04-23</text>
@@ -37,14 +37,14 @@
         <view class="audio_c">
           <text class="select_audio_title">音效选择</text>
           <!-- <view class="select_audio"></view> -->
-          <dropdownmenu class="select_audio" dropDownMenuTitle='{{dropDownMenuTitle}}'  dropDownMenuSourceData='{{data2}}' 
-  bind:selectedItem='selectedItem' />
+          <dropdownmenu class="select_audio" dropDownMenuTitle='{{dropDownMenuTitle}}' dropDownMenuSourceData='{{data2}}' bind:selectedItem='selectedItem' />
         </view>
         <view class="time_c">
           <text class="select_duration_title">敲击间隔</text>
-<view class="select_duration"></view>
-        </view>
+          <view class="select_duration"></view>
+          <progress percent="20" stroke-width="10rpx" activeColor="#10AE0d" backgroundColor="#10AEFF" border-radius="5rpx" style="width: 100%; " />
 
+        </view>
       </view>
 
 

+ 3 - 2
pages/piano/woodenfish/woodenfish.wxss

@@ -121,7 +121,6 @@ width: 16rpx;
   width: 100%;
   height: 400rpx;
   flex-direction: column;
-  background-color: darkseagreen;
 }
 
 .container .scroll_c  .set_c .title_c {
@@ -142,13 +141,13 @@ width: 16rpx;
 .container .scroll_c  .set_c .audio_c .select_audio {
   margin-left: 16rpx;
   margin-right: 16rpx;
-  background-color: darkslateblue;
   flex: 1;
 }
 
 .container .scroll_c  .set_c .time_c {
   flex-direction: row;
   display: flex;
+  flex: 1;
 }
 
 
@@ -157,6 +156,8 @@ width: 16rpx;
   margin-right: 16rpx;
 }
 .container .scroll_c  .set_c .time_c .select_duration {
+  margin-top: 16rpx;
   margin-left: 16rpx;
   margin-right: 16rpx;
+  flex: 1;
 }

+ 3 - 2
project.config.json

@@ -42,7 +42,7 @@
     "condition": false
   },
   "compileType": "miniprogram",
-  "libVersion": "2.19.4",
+  "libVersion": "3.4.1",
   "appid": "wx08f94a3e90881910",
   "projectname": "miniprogram-92",
   "condition": {},
@@ -55,5 +55,6 @@
       "format": "expanded",
       "extension": ".wxss"
     }
-  ]
+  ],
+  "simulatorPluginLibVersion": {}
 }