Ver código fonte

feature: 分包处理

332777428@qq.com 6 meses atrás
pai
commit
e6cc4dfade
93 arquivos alterados com 42 adições e 9335 exclusões
  1. 12 12
      app.json
  2. 0 1142
      pages/components/image-cropper/image-cropper.js
  3. 0 3
      pages/components/image-cropper/image-cropper.json
  4. 0 24
      pages/components/image-cropper/image-cropper.wxml
  5. 0 143
      pages/components/image-cropper/image-cropper.wxss
  6. 0 45
      pages/components/navbar/navbar.js
  7. 0 4
      pages/components/navbar/navbar.json
  8. 0 8
      pages/components/navbar/navbar.wxml
  9. 0 33
      pages/components/navbar/navbar.wxss
  10. 0 62
      pages/components/toast/toast.js
  11. 0 4
      pages/components/toast/toast.json
  12. 0 16
      pages/components/toast/toast.wxml
  13. 0 61
      pages/components/toast/toast.wxss
  14. 0 87
      pages/pageA/deviceList/deviceList.js
  15. 0 5
      pages/pageA/deviceList/deviceList.json
  16. 0 9
      pages/pageA/deviceList/deviceList.wxml
  17. 0 38
      pages/pageA/deviceList/deviceList.wxss
  18. 0 1069
      pages/pageA/index/index.js
  19. 0 5
      pages/pageA/index/index.json
  20. 0 211
      pages/pageA/index/index.wxml
  21. 0 847
      pages/pageA/index/index.wxss
  22. 0 95
      pages/pageA/login/login.js
  23. 0 5
      pages/pageA/login/login.json
  24. 0 20
      pages/pageA/login/login.wxml
  25. 0 55
      pages/pageA/login/login.wxss
  26. 0 15
      pages/pageB/about/about.js
  27. 0 5
      pages/pageB/about/about.json
  28. 0 15
      pages/pageB/about/about.wxml
  29. 0 30
      pages/pageB/about/about.wxss
  30. 0 207
      pages/pageB/connectBle/connectBle.js
  31. 0 5
      pages/pageB/connectBle/connectBle.json
  32. 0 9
      pages/pageB/connectBle/connectBle.wxml
  33. 0 39
      pages/pageB/connectBle/connectBle.wxss
  34. 0 142
      pages/pageB/deviceConMode/deviceConMode.js
  35. 0 5
      pages/pageB/deviceConMode/deviceConMode.json
  36. 0 20
      pages/pageB/deviceConMode/deviceConMode.wxml
  37. 0 117
      pages/pageB/deviceConMode/deviceConMode.wxss
  38. 0 155
      pages/pageB/deviceConnect0/deviceConnect0.js
  39. 0 5
      pages/pageB/deviceConnect0/deviceConnect0.json
  40. 0 29
      pages/pageB/deviceConnect0/deviceConnect0.wxml
  41. 0 1
      pages/pageB/deviceConnect0/deviceConnect0.wxss
  42. 0 145
      pages/pageB/deviceConnect1/deviceConnect1.js
  43. 0 5
      pages/pageB/deviceConnect1/deviceConnect1.json
  44. 0 31
      pages/pageB/deviceConnect1/deviceConnect1.wxml
  45. 0 62
      pages/pageB/deviceConnect1/deviceConnect1.wxss
  46. 0 228
      pages/pageB/deviceConnect2/deviceConnect2.js
  47. 0 5
      pages/pageB/deviceConnect2/deviceConnect2.json
  48. 0 16
      pages/pageB/deviceConnect2/deviceConnect2.wxml
  49. 0 1
      pages/pageB/deviceConnect2/deviceConnect2.wxss
  50. 0 226
      pages/pageB/deviceConnect3/deviceConnect3.js
  51. 0 5
      pages/pageB/deviceConnect3/deviceConnect3.json
  52. 0 34
      pages/pageB/deviceConnect3/deviceConnect3.wxml
  53. 0 37
      pages/pageB/deviceConnect3/deviceConnect3.wxss
  54. 0 84
      pages/pageC/aboutInfo/aboutInfo.js
  55. 0 5
      pages/pageC/aboutInfo/aboutInfo.json
  56. 0 10
      pages/pageC/aboutInfo/aboutInfo.wxml
  57. 0 27
      pages/pageC/aboutInfo/aboutInfo.wxss
  58. 0 887
      pages/pageC/aboutInfo/text.js
  59. 0 45
      pages/pageC/channelDetail/channelDetail.js
  60. 0 5
      pages/pageC/channelDetail/channelDetail.json
  61. 0 26
      pages/pageC/channelDetail/channelDetail.wxml
  62. 0 91
      pages/pageC/channelDetail/channelDetail.wxss
  63. 0 155
      pages/pageC/deviceDetail/deviceDetail.js
  64. 0 5
      pages/pageC/deviceDetail/deviceDetail.json
  65. 0 29
      pages/pageC/deviceDetail/deviceDetail.wxml
  66. 0 71
      pages/pageC/deviceDetail/deviceDetail.wxss
  67. 0 551
      pages/pageC/deviceWake/deviceWake.js
  68. 0 6
      pages/pageC/deviceWake/deviceWake.json
  69. 0 78
      pages/pageC/deviceWake/deviceWake.wxml
  70. 0 103
      pages/pageC/deviceWake/deviceWake.wxss
  71. 0 196
      pages/pageC/wakeList/wakeList.js
  72. 0 5
      pages/pageC/wakeList/wakeList.json
  73. 0 37
      pages/pageC/wakeList/wakeList.wxml
  74. 0 150
      pages/pageC/wakeList/wakeList.wxss
  75. 0 137
      pages/pageD/download/download.js
  76. 0 5
      pages/pageD/download/download.json
  77. 0 26
      pages/pageD/download/download.wxml
  78. 0 74
      pages/pageD/download/download.wxss
  79. 0 444
      pages/pageD/ota/ota.js
  80. 0 5
      pages/pageD/ota/ota.json
  81. 0 31
      pages/pageD/ota/ota.wxml
  82. 0 97
      pages/pageD/ota/ota.wxss
  83. 0 113
      pages/pageD/repeat/repeat.js
  84. 0 5
      pages/pageD/repeat/repeat.json
  85. 0 10
      pages/pageD/repeat/repeat.wxml
  86. 0 23
      pages/pageD/repeat/repeat.wxss
  87. 0 125
      pages/pageD/setWifi/setWifi.js
  88. 0 5
      pages/pageD/setWifi/setWifi.json
  89. 0 11
      pages/pageD/setWifi/setWifi.wxml
  90. 0 31
      pages/pageD/setWifi/setWifi.wxss
  91. 2 2
      pages/piano/cropper/cropper.json
  92. 1 1
      pages/piano/wallpaper/wallpaper.json
  93. 27 27
      utils/route_constant.js

+ 12 - 12
app.json

@@ -1,24 +1,24 @@
 {
   "pages": [
-    "pages/pageA/index/index",
-    "pages/pageA/login/login",
-    "pages/pageA/deviceList/deviceList"
+    "pages/index/index",
+    "pages/login/login",
+    "pages/deviceList/deviceList"
   ],
   "subPackages": [
     {
-      "root": "pages/pageB/",
+      "root": "pages/packageA/",
       "pages": [
         "about/about",
-        "connectBle/connectBle",
-        "deviceConMode/deviceConMode",
-        "deviceConnect0/deviceConnect0",
-        "deviceConnect1/deviceConnect1",
-        "deviceConnect2/deviceConnect2",
-        "deviceConnect3/deviceConnect3"
+        "about/connectBle",
+        "about/deviceConMode",
+        "about/deviceConnect0",
+        "about/deviceConnect1",
+        "about/deviceConnect2",
+        "about/deviceConnect3"
       ]
     },
     {
-      "root": "pages/pageC/",
+      "root": "pages/packageB/",
       "pages": [
         "aboutInfo/aboutInfo",
         "channelDetail/channelDetail",
@@ -28,7 +28,7 @@
       ]
     },
     {
-      "root": "pages/pageD/",
+      "root": "pages/packageC/",
       "pages": [
         "download/download",
         "ota/ota",

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 1142
pages/components/image-cropper/image-cropper.js


+ 0 - 3
pages/components/image-cropper/image-cropper.json

@@ -1,3 +0,0 @@
-{
-	"component": true
-}

+ 0 - 24
pages/components/image-cropper/image-cropper.wxml

@@ -1,24 +0,0 @@
-<view class='image-cropper' catchtouchmove='_preventTouchMove'>
-    <view class='main' bindtouchend="_cutTouchEnd" bindtouchstart="_cutTouchStart" bindtouchmove="_cutTouchMove" bindtap="_click">
-        <view class='content'>
-            <view class='content_top bg_gray {{_flag_bright?"":"bg_black"}}' style="height:{{cut_top}}px;transition-property:{{_cut_animation?'':'background'}}"></view>
-            <view class='content_middle' style="height:{{height}}px;">
-                <view class='content_middle_left bg_gray {{_flag_bright?"":"bg_black"}}' style="width:{{cut_left}}px;transition-property:{{_cut_animation?'':'background'}}"></view>
-                <view class='content_middle_middle' style="width:{{width}}px;height:{{height}}px;transition-duration: .3s;transition-property:{{_cut_animation?'':'background'}};">
-                    <view class="border border-top-left"></view>
-                    <view class="border border-top-right"></view>
-                    <view class="border border-right-top"></view>
-                    <view class="border border-right-bottom"></view>
-                    <view class="border border-bottom-right"></view>
-                    <view class="border border-bottom-left"></view>
-                    <view class="border border-left-bottom"></view>
-                    <view class="border border-left-top"></view>
-                </view>
-                <view class='content_middle_right bg_gray {{_flag_bright?"":"bg_black"}}' style="transition-property:{{_cut_animation?'':'background'}}"></view>
-            </view>
-            <view class='content_bottom bg_gray {{_flag_bright?"":"bg_black"}}' style="transition-property:{{_cut_animation?'':'background'}}"></view>
-        </view>
-        <image bindload="imageLoad" bindtouchstart="_start" bindtouchmove="_move" bindtouchend="_end" style="width:{{img_width ? img_width + 'px' : 'auto'}};height:{{img_height ? img_height + 'px' : 'auto'}};transform:translate3d({{_img_left-img_width/2}}px,{{_img_top-img_height/2}}px,0) scale({{scale}}) rotate({{angle}}deg);transition-duration:{{_cut_animation?.4:0}}s;" class='img' src='{{imgSrc}}'></image>
-    </view>
-    <canvas canvas-id='image-cropper' disable-scroll="true" style="width:{{_canvas_width * export_scale}}px;height:{{_canvas_height * export_scale}}px;left:{{canvas_left}}px;top:{{canvas_top}}px" class='image-cropper-canvas'></canvas>
-</view>

+ 0 - 143
pages/components/image-cropper/image-cropper.wxss

@@ -1,143 +0,0 @@
-.image-cropper {
-    background: rgba(14, 13, 13, .8);
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100vw;
-    height: 100vh;
-    z-index: 1;
-}
-
-.image-cropper .main {
-    position: absolute;
-    width: 100vw;
-    height: 100vh;
-    overflow: hidden;
-}
-
-.image-cropper .content {
-    z-index: 9;
-    position: absolute;
-    width: 100vw;
-    height: 100vh;
-    display: flex;
-    flex-direction: column;
-    pointer-events: none;
-}
-
-.image-cropper .bg_black {
-    background: rgba(0, 0, 0, 0.8) !important;
-}
-
-.image-cropper .bg_gray {
-    background: rgba(0, 0, 0, 0.45);
-    transition-duration: .35s;
-}
-
-.image-cropper .content>.content_top {
-    pointer-events: none;
-}
-
-.image-cropper .content>.content_middle {
-    display: flex;
-    height: 200px;
-    width: 100%;
-}
-
-.image-cropper .content_middle_middle {
-    width: 200px;
-    box-sizing: border-box;
-    position: relative;
-    transition-duration: .3s;
-}
-
-.image-cropper .content_middle_right {
-    flex: auto;
-}
-
-.image-cropper .content>.content_bottom {
-    flex: auto;
-}
-
-.image-cropper .img {
-    z-index: 2;
-    top: 0;
-    left: 0;
-    position: absolute;
-    border: none;
-    width: 100%;
-    backface-visibility: hidden;
-    transform-origin: center;
-}
-
-.image-cropper .image-cropper-canvas {
-    position: fixed;
-    background: white;
-    width: 150px;
-    height: 150px;
-    z-index: 10;
-    top: -200%;
-    pointer-events: none;
-}
-
-.image-cropper .border {
-    background: white;
-    pointer-events: auto;
-    position: absolute;
-}
-
-.image-cropper .border-top-left {
-    left: -2.5px;
-    top: -2.5px;
-    height: 2.5px;
-    width: 33rpx;
-}
-
-.image-cropper .border-top-right {
-    right: -2.5px;
-    top: -2.5px;
-    height: 2.5px;
-    width: 33rpx;
-}
-
-.image-cropper .border-right-top {
-    top: -1px;
-    width: 2.5px;
-    height: 30rpx;
-    right: -2.5px;
-}
-
-.image-cropper .border-right-bottom {
-    width: 2.5px;
-    height: 30rpx;
-    right: -2.5px;
-    bottom: -1px;
-}
-
-.image-cropper .border-bottom-left {
-    height: 2.5px;
-    width: 33rpx;
-    bottom: -2.5px;
-    left: -2.5px;
-}
-
-.image-cropper .border-bottom-right {
-    height: 2.5px;
-    width: 33rpx;
-    bottom: -2.5px;
-    right: -2.5px;
-}
-
-.image-cropper .border-left-top {
-    top: -1px;
-    width: 2.5px;
-    height: 30rpx;
-    left: -2.5px;
-}
-
-.image-cropper .border-left-bottom {
-    width: 2.5px;
-    height: 30rpx;
-    left: -2.5px;
-    bottom: -1px;
-}

+ 0 - 45
pages/components/navbar/navbar.js

@@ -1,45 +0,0 @@
-// components/navbar/navbar.ts
-// 获取应用实例
-const app = getApp();
-Component({
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-    navbarData: { // 由父页面传递的数据
-      type: Object,
-      value: {},
-    },
-    callback: {
-      type: Boolean,
-      value: false
-    },
-  },
-  externalClasses: ['nav-bgc-class', 'nav-title-class'],
-  options: {
-    multipleSlots: true,
-  },
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    navBarHeight: app.globalData.navBarHeight,
-    MenuButtonHeight: app.globalData.MenuButtonHeight,
-    MenuButtonTop: app.globalData.MenuButtonTop,
-  },
-
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    _navback() {
-      if (this.properties.callback) {
-        this.triggerEvent('callback',); // 触发确定事件  
-        return;
-      };
-      wx.navigateBack({
-        delta: 1
-      });
-    }
-  },
-})

+ 0 - 4
pages/components/navbar/navbar.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 8
pages/components/navbar/navbar.wxml

@@ -1,8 +0,0 @@
-<view class='nav-wrap nav-bgc-class' style='height: calc({{navBarHeight}}px - {{MenuButtonTop}}px); padding-top: {{MenuButtonTop}}px;'>
-     <view class="nav-info" style="height: {{ MenuButtonHeight }}px;">
-        <view  bindtap='_navback' style="height: {{ MenuButtonHeight }}px;" class="device-pic">
-          <image wx:if='{{navbarData.showCapsule}}' bindtap=""  mode="heightFix"  src="./../../../img/goback.png"></image>
-        </view>
-        <text class="nav-title-class" style="height: {{ MenuButtonHeight }}px; line-height: {{ MenuButtonHeight }}px;">{{navbarData.title}}</text>
-     </view>
-  </view>

+ 0 - 33
pages/components/navbar/navbar.wxss

@@ -1,33 +0,0 @@
-/* components/navbar/navbar.wxss */
-.nav-wrap {
-  border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
-}
-
-.nav-wrap .nav-info {
-  display: flex;
-  align-items: center;
-  position: relative;
-}
-
-.nav-wrap .nav-info .device-pic {
-  margin-right: 12rpx;
-  position: absolute;
-  top: 0;
-  left: 34rpx;
-  display: flex;
-  align-items: center;
-  z-index: 999;
-  width: 40rpx;
-}
-
-.nav-wrap .nav-info .device-pic image {
-  height: 36rpx;
-}
-
-.nav-wrap .nav-info text {
-  width: 100%;
-  text-align: center;
-  font-size: 35rpx;
-  color: #000;
-  font-weight: bold;
-}

+ 0 - 62
pages/components/toast/toast.js

@@ -1,62 +0,0 @@
-// pages/components/toast/toast.js
-const app = getApp();
-Component({
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-    toastData: {
-      type: Object,
-      value: {
-        titlePicUrl: "",
-        titlePicUrlWidth: 0,
-        title: [""],
-        info: [""],
-        isShowOneBut: false,
-        isShowTwoBut: false,
-        oneButText: "",
-        twoButText: "",
-        footTop: 0
-      }
-    },
-    oneButCallback: {
-      type: ()=> {},
-      value: ()=> {}
-    },
-    twoButCallback: {
-      type: ()=> {},
-      value: ()=> {}
-    },
-    visible: {
-      type: Boolean,
-      value: false
-    },
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    navBarHeight: app.globalData.navBarHeight,
-    MenuButtonHeight: app.globalData.MenuButtonHeight,
-    MenuButtonTop: app.globalData.MenuButtonTop,
-  },
-
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    oneButCallback(){
-      if(this.properties.oneButCallback) {
-        this.properties.oneButCallback();
-        return;
-      };
-    },
-    twoButCallback(){
-      if(this.properties.twoButCallback) {
-        this.properties.twoButCallback();
-        return;
-      };
-    },
-  }
-})

+ 0 - 4
pages/components/toast/toast.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 16
pages/components/toast/toast.wxml

@@ -1,16 +0,0 @@
-<!--pages/components/toast/toast.wxml-->
-<view wx:if="{{visible}}" style="height: calc(100vh - {{navBarHeight}}px);" class="toast">
-  <view class="toast-view">
-    <image mode="widthFix" src="{{toastData.titlePicUrl}}" style="width: {{toastData.titlePicUrlWidth}}rpx;"></image>
-    <view class="title">
-      <text wx:for="{{toastData.title}}">{{item}}</text>
-    </view>
-    <view class="info">
-      <text wx:for="{{toastData.info}}">{{item}}</text>
-    </view>
-    <view class="foot" style="margin-top: {{toastData.footTop}}rpx;">
-      <view wx:if="{{toastData.isShowOneBut}}" class="onBut" bindtap="oneButCallback">{{toastData.oneButText}}</view>
-      <view  wx:if="{{toastData.isShowTwoBut}}" class="twoBut" bindtap="twoButCallback">{{toastData.twoButText}}</view>
-    </view>
-  </view>
-</view>

+ 0 - 61
pages/components/toast/toast.wxss

@@ -1,61 +0,0 @@
-/* pages/components/toast/toast.wxss */
-
-.toast{
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  width: 100vw;
-  background-color: rgba(0, 0, 0, 0.6);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-.toast-view{
-  display: flex;
-  align-items: center;
-  flex-direction: column;
-  padding: 14rpx 50rpx 34rpx;
-  width: 520rpx;
-  background: #FFFFFF;
-  border-radius: 18rpx;
-}
-.toast-view>view>text{
-  display: block;
-}
-.toast-view .title{
-  margin-bottom: 14rpx;
-  font-size: 30rpx;
-  font-weight: bold;
-  color: #353535;
-  line-height: 38rpx;
-  text-align: center;
-}
-.toast-view .info{
-  margin-bottom: 14rpx;
-  font-size: 28rpx;
-  color: #999;
-  line-height: 38rpx;
-  text-align: center;
-}
-.foot{
-  display: flex;
-  justify-content: center;
-}
-.foot>view{
-  width: 226rpx;
-  height: 80rpx;
-  text-align: center;
-  line-height: 80rpx;
-  border-radius: 40rpx;
-  font-size: 30rpx;
-  font-weight: bold;
-  margin: 0 10rpx;
-}
-.foot>view.onBut{
-  background-color: rgba(153, 153, 153, 1);
-  color: #fff;
-}
-.foot>view.twoBut{
-  background-color: rgba(101, 71, 163, 1);
-  color: #fff;
-}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 87
pages/pageA/deviceList/deviceList.js


+ 0 - 5
pages/pageA/deviceList/deviceList.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 9
pages/pageA/deviceList/deviceList.wxml

@@ -1,9 +0,0 @@
-<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="container grid-container">
-  <block wx:for="{{deviceList}}" wx:key="index" wx:for-item="item" wx:for-index="index">
-    <view class="cell" bind:tap="deviceTap" data-device="{{item}}">
-      <image class="device_img" src="{{item.img}}" mode="aspectFill" />
-      <text class="device_text main_black">{{item.name}}</text>
-    </view>
-  </block>
-</view>

+ 0 - 38
pages/pageA/deviceList/deviceList.wxss

@@ -1,38 +0,0 @@
-.container {
-  display: flex;
-  flex-wrap: wrap;
-}
-
-.grid-container {
-  display: grid;
-  grid-template-columns: repeat(2, 1fr);
-  grid-column-gap: 32rpx;
-  /* grid-row: 32rpx; */
-  padding-inline: 32rpx;
-  padding-top: 16rpx;
-}
-
-.cell {
-  overflow: hidden;
-  /* margin-bottom: 16rpx; */
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-
-}
-
-.device_img {
-  width: 100%;
-  height: 300rpx;
-  border-radius: 16rpx;
-  background-color: #F2F5F7;
-}
-
-.device_text {
-  margin-top: 16rpx;
-  text-align: center;
-  width: 100%;
-  font-size: 28rpx;
-  margin-bottom: 72rpx;
-
-}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 1069
pages/pageA/index/index.js


+ 0 - 5
pages/pageA/index/index.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 211
pages/pageA/index/index.wxml

@@ -1,211 +0,0 @@
-<!-- index.wxml -->
-<view class="container" style="flex-direction: column; display: flex;">
-  <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="height: calc(100vh - 22rpx - {{navBarHeight}}px);">
-
-    <view wx:if="{{indexPage==0}}" class="mair" style="flex-direction: column; display: flex; height: calc(100vh - 105rpx - {{safeBottomHeight}}rpx - 22rpx - {{navBarHeight}}px);">
-      <view style="font-size: 32rpx; color: #333333; margin-top: 14rpx;">{{greeting}}</view>
-
-      <!-- banner -->
-      <view wx:if="{{bannerList.length>0}}" class="banner_container">
-        <swiper class="swiper" indicator-dots="{{bannerList.length>1}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" indicator-active-color="#FFFFFF" indicator-color="#999999">
-          <block wx:for="{{bannerList}}" wx:key="index">
-            <swiper-item>
-              <image mode="widthFix" class="swiper_image" src="{{item.pic}}" data-item="{{item}}" bind:tap="onTapBanner" />
-            </swiper-item>
-          </block>
-        </swiper>
-      </view>
-
-      <view class="add_device_public" bind:tap="jumpToAddDevice">
-        <image mode="heightFix" src="../../../img/add_device.png" style="width: 48rpx;height: 48rpx;"></image>
-        <view style="color: white; margin-left: 8rpx; font-size: 32rpx;">添加设备</view>
-      </view>
-
-      <scroll-view scroll-y="true" style="height: calc(100vh - 152rpx - 296rpx - 46rpx - 105rpx - {{safeBottomHeight}}rpx - 5rpx - {{navBarHeight}}px);">
-        <block wx:key="key" wx:for-item="item" wx:for-index="index" wx:for="{{deviceList}}">
-
-          <view class="item_public" style="border: {{item.state && item.state === 'online'&&deviceListSelect === index  ? '6rpx solid #6546A3' : item.state && item.state === 'online'?'2rpx solid #6546A3':'2rpx solid #F2F5F7'}};  flex-direction: row; display: flex; margin-top: 10rpx; margin-bottom: {{index==0?deviceList.length-1:0}}rpx; " data-item="{{item}}" data-index="{{index}}" bind:tap="onTapItem">
-
-            <view style="width: 264rpx; height: 200rpx;">
-              <image class="item_public_image" src="{{item.imageUrl}}" style="opacity: {{item.state && item.state === 'online' ? '1' : '0.5'}};" mode="aspectFit" lazy-load="true" webp="true"></image>
-            </view>
-
-            <view class="item_public_right" style="flex: 1; margin-right: 25rpx; opacity: {{item.state && item.state === 'online' ? '1' : '0.5'}};">
-              <view style="height: 190rpx; margin-top: 37rpx; margin-left: 32rpx; flex-direction: column; display: flex;">
-
-                <view style="flex: 1;flex-direction: column; display: flex;">
-                  <view style="display: flex; width: calc(100vw - 64rpx - 268rpx);">
-
-                    <view style="width: calc(100vw - 64rpx - 268rpx - 53rpx - 30rpx); color: #333333; font-size: 28rpx;padding-right: 5rpx; white-space: nowrap; overflow: hidden;  text-overflow: ellipsis;">
-                      <text>{{item.devName}}</text>
-                    </view>
-
-                    <view style="width: 48rpx; height: 48rpx;">
-                      <image mode="aspectFit" src="../../../img/add_device_arrow.png" style="width: 48rpx; height: 48rpx; opacity: {{item.state && item.state === 'online'&&deviceListSelect === index ? '1' : '0'}}; "></image>
-                    </view>
-
-                  </view>
-
-                  <view style="color: #666666; font-size: 24rpx;display: flex; flex-direction: row; align-items: center;">
-                    <image mode="heightFix" src="{{item.connectType==3?'../../../images/device/wifi_black.png':'../../../images/device/blue_black.png'}}" style="width: 28rpx;height: 28rpx; padding-right: 10rpx; opacity: {{item.state && item.state === 'online' ? '1' : '0.7'}};"></image>
-                    <view style="white-space: nowrap;"> {{item.state && item.state === "online" ? (item.connectType==3?"Wifi在线":"蓝牙在线") : "离线"}} </view>
-                  </view>
-
-                </view>
-                <view style="align-items: center; justify-content: center; vertical-align: middle;width: 280rpx;height: 64rpx;background-color: #F2F5F7;  border-radius: 52rpx; text-align: center; justify-content: center;  display: flex;" data-index="{{index}}" catchtap="deleteDevice">
-                  <view style="color: #666666; font-size: 28rpx; ">删除</view>
-                </view>
-              </view>
-            </view>
-          </view>
-
-        </block>
-      </scroll-view>
-    </view>
-
-    <view wx:else>
-
-      <!-- 频道 -->
-      <view wx:if="{{indexPage==1&&deviceListSelect!=null&&deviceList.length>deviceListSelect&&deviceList[deviceListSelect].connectType===3}}" class="mair" style="height: calc(100vh - 105rpx - {{safeBottomHeight}}rpx - 22rpx - {{navBarHeight}}px);">
-        <view class="play-info">
-          <view class="info">
-            <image src="../../../img/blak.png" class="black" mode="scaleToFill"></image>
-            <image src="../../../img/mm.png" class="mode" mode="widthFix"></image>
-            <image class="logo" mode="heightFix" src="../../../img/logo.png"></image>
-            <view wx:if="{{actionIndex !== null}}" style="opacity: 0.8; text-shadow:0px 0px 4px #6D00FF;" class="fm">
-              FM.{{actionIndex !== null ? (actionIndex + 1 < 10 ? "0" + (actionIndex + 1) : actionIndex + 1) : 00}} </view>
-                <view wx:if="{{actionIndex !== null}}" style="opacity: 1;" class="fm">
-                  FM.{{actionIndex !== null ? (actionIndex + 1 < 10 ? "0" + (actionIndex + 1) : actionIndex + 1) : 00}} <image class="gochnnalList" mode="heightFix" src="../../../img/a6.png">
-                    </image>
-                </view>
-                <view class="fmMod" bindtap="onTapToChannel"></view>
-                <view wx:if="{{actionIndex !== null}}" class="thisMusic">
-                  <text>当前播放:</text>
-                  <view class="scroll-box">
-                    <view class="scroll-wrap">
-                      <view class="scroll-item">{{channelData[actionIndex].channelName}}</view>
-                    </view>
-                  </view>
-                </view>
-                <image src="{{'../../../img/dl' + battery + '.png'}}" class="battery" mode="scaleToFill"></image>
-            </view>
-            <view class="wakeMode" bindtap="goWake">
-              <image src="../../../img/woak.png" class="mode" mode="scaleToFill"></image>
-              <image class="wake" mode="heightFix" src="{{isSetWake ? '../../../img/n24.png' : '../../../img/n23.png' }}"></image>
-              <text>定时</text>
-            </view>
-          </view>
-          <scroll-view class="pd" scroll-y="true">
-            <view class="conm" wx:if="{{channelData && channelData.length > 0}}">
-              <image mode="scaleToFill" class="cz" src="../../../img/cz.png"></image>
-              <view class="musicList">
-                <view wx:for="{{channelData}}" class="li {{index === actionIndex ? 'action' : ' '}}">
-                  <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="zz" src="../../../img/zz.png"></image>
-                  <text class="lm">{{luoma[index]}}</text>
-                  <view class="musicInfo" data-index="{{index}}" bindtap="onTapChannelIndex">
-                    <image mode="scaleToFill" class="pic" src="{{item.channelPic ? item.channelPic : '../../../img/head_pic.png'}}"></image>
-                    <text>{{item.channelName}}</text>
-                    <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="svg" src="../../../svg/audio.svg"></image>
-                  </view>
-                </view>
-              </view>
-            </view>
-          </scroll-view>
-          <!-- 登录启用以下版本 -->
-          <view class="gologin" wx:if="{{showLogin}}">
-            <view class="model">
-              <view bindtap="goLogin" style="position: none; height: auto;" class="loginPic">
-                <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="../../../img/BG_long.png"></image>
-              </view>
-              <view style="position: none; height: calc(100% - 224rpx); overflow: auto;" class="BG_PD">
-                <view>
-                  <image style="margin: 0; width: 100vw;" mode="widthFix" src="../../../img/BG_PD.png"></image>
-                </view>
-              </view>
-            </view>
-          </view>
-          <view class="gologin goruter" wx:if="{{!showLogin && deviceList && deviceList.length === 0}}">
-            <view class="model">
-              <view bindtap="goDeviceConnect" style="position: none; height: auto;" class="loginPic">
-                <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="../../../img/BG_LJ.png"></image>
-              </view>
-              <view style="position: none; height: calc(100% - 224rpx); overflow: auto;" class="BG_PD">
-                <view>
-                  <image style="margin: 0; width: 100vw;" mode="widthFix" src="../../../img/BG_PD.png"></image>
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-
-        <!-- 我的 -->
-        <view wx:elif="{{indexPage==2}}" class="me" style="height: calc(100vh - 105rpx - {{safeBottomHeight}}rpx - 22rpx - {{navBarHeight}}px); display: flex; flex-direction: column;">
-
-          <view class="head-logo" bind:tap="{{isLogin?'':'onTapLogin'}}">
-            <image mode="scaleToFill" src="{{userPic}}"></image>
-            <text class="nick_name" wx:if="{{nickName}}">{{nickName}}</text>
-          </view>
-
-          <view class="br"></view>
-          <view class="list">
-            <view class="li">
-              <view class="icon">
-                <image mode="widthFix" style="width: 40rpx; height: 40rpx;" src="../../../img/o.png"></image>
-              </view>
-              <view class="button">
-                <button class="between_text" open-type="feedback">建议与反馈</button>
-                <button class="between_image" open-type="feedback">
-                  <image class="j" src="../../../img/b.png"></image>
-                </button>
-              </view>
-            </view>
-            <view class="li">
-              <view class="icon">
-                <image mode="widthFix" style="width: 40rpx; height: 40rpx;" src="../../../img/q.png"></image>
-              </view>
-              <view class="button" bindtap="jumpToAboutUs">
-                <text>关于我们</text>
-                <image class="j" src="../../../img/b.png"></image>
-              </view>
-            </view>
-          </view>
-          <view wx:if="{{isLogin}}" style="flex: 1;display: flex;">
-            <view class="login">
-              <view bindtap="onTapLogin" class="{{!isLogin ? 'action' : ''}}">
-                {{isLogin ? '退出登录' : "登录"}}
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view>
-
-    <view style="height: calc(105rpx + {{safeBottomHeight}}rpx); flex-direction: column; display: flex;background-color: white;">
-      <view class="line"></view>
-      <view style="flex: 1; text-align: center; display: flex;align-items: center;">
-        <!-- 首页 -->
-        <view class="bottom_view" data-index="0" bind:tap="onTapIndex">
-          <image class="bottom_image" mode="widthFix" src="{{indexPage==0?'../../../img/index_action.png':'../../../img/index_unaction.png'}}"></image>
-          <view style="font-size: 20rpx;color: {{indexPage==0?'#A4D099':'black'}}; padding-top: 0rpx;margin-top: 0rpx;">
-            首页
-          </view>
-        </view>
-
-        <!-- 频道 -->
-        <view wx:if="{{deviceListSelect!=null&&deviceList.length>deviceListSelect&&deviceList[deviceListSelect].connectType===3}}" class="bottom_view" data-index="1" bind:tap="onTapIndex">
-          <image class="bottom_image" mode="widthFix" src="{{indexPage==1?'../../../img/channel_action.png':'../../../img/channel_unaction.png'}}"></image>
-          <view style="font-size: 20rpx;color: {{indexPage==1?'#A4D099':'black'}};">频道</view>
-        </view>
-
-        <!-- 我的 -->
-        <view class="bottom_view" data-index="2" bind:tap="onTapIndex">
-          <image class="bottom_image" mode="widthFix" src="{{indexPage==2?'../../../img/me_action.png':'../../../img/me_unaction.png'}}"></image>
-          <view style="font-size: 20rpx;color: {{indexPage==2?'#A4D099':'black'}};">我的</view>
-        </view>
-      </view>
-      <view style="height: {{safeBottomHeight}}rpx;"></view>
-    </view>
-
-  </view>

+ 0 - 847
pages/pageA/index/index.wxss

@@ -1,847 +0,0 @@
-/* 假设你的页面容器有一个类名为.page-container */
-.container {
-  display: flex;
-  flex-direction: column;
-  height: 100vh;
-  width: 100vw;
-}
-
-/* 隐藏滚动条 */
-.tab_page_container {
-  flex: block;
-  overflow-x: hidden;
-  overflow-y: auto;
-}
-
-/* 隐藏滚动条 */
-::-webkit-scrollbar {
-  width: 0;
-  height: 0;
-  color: transparent;
-  display: none;
-}
-
-/************************ 首页 ************************/
-
-.nav-wrap {
-  backdrop-filter: blur(10rpx);
-  border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
-}
-
-.nav-wrap .nav-info {
-  padding-left: 32rpx;
-  display: flex;
-  align-items: center;
-}
-
-.nav-wrap .nav-info .device-pic {
-  height: 36rpx;
-  margin-right: 12rpx;
-}
-
-.nav-wrap .nav-info .z {
-  height: 24rpx;
-  margin-right: 12rpx;
-}
-
-.nav-wrap .nav-info text {
-  font-size: 28rpx;
-  color: #353535;
-  font-weight: bold;
-  margin-right: 24rpx;
-}
-
-.nav-wrap .nav-info .j {
-  height: 16rpx;
-}
-
-.mair {
-  width: calc(100vw - 64rpx);
-  padding: 20rpx 32rpx 0;
-  position: relative;
-  overflow: hidden;
-}
-
-.mair .play-info {
-  width: 100%;
-  padding: 16rpx 0;
-  background: linear-gradient(167deg, #D8D8D8 0%, rgba(238, 238, 238, 0.5) 100%);
-  border-radius: 12rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.mair .play-info .info {
-  width: 550rpx;
-  height: 152rpx;
-  position: relative;
-}
-
-.mair .play-info .wakeMode {
-  width: 96rpx;
-  height: 152rpx;
-  background: linear-gradient(180deg, #000000 0%, #000000 100%);
-  box-shadow: inset 2rpx 6rpx 10rpx 0px rgba(255, 255, 255, 0.61), inset 0px -2rpx 4rpx 0px rgba(255, 255, 255, 0.3);
-  border-radius: 12rpx;
-  margin-left: 8rpx;
-  position: relative;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  flex-direction: column;
-}
-
-.mair .play-info .wakeMode text {
-  height: 28rpx;
-  font-size: 20rpx;
-  font-weight: 500;
-  color: #FFFFFF;
-  line-height: 28rpx;
-  font-weight: 500;
-  margin-top: 20rpx;
-}
-
-.mair .play-info .wakeMode .mode {
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 96rpx;
-  height: 148rpx;
-  z-index: 999;
-}
-
-.mair .play-info .info .logo {
-  position: absolute;
-  top: 14rpx;
-  left: 20rpx;
-  height: 48rpx;
-}
-
-.mair .play-info .info .battery {
-  position: absolute;
-  top: 8rpx;
-  right: 16rpx;
-  height: 56rpx;
-  width: 56rpx;
-}
-
-.mair .play-info .info .fm {
-  color: #fff;
-}
-
-.mair .play-info .info .black {
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 550rpx;
-  height: 152rpx;
-}
-
-.mair .play-info .info .mode {
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 550rpx;
-  height: 152rpx;
-  z-index: 999;
-}
-
-.mair .play-info .info .fm {
-  position: absolute;
-  top: 22rpx;
-  left: 50%;
-  transform: translateX(-50%);
-  font-size: 48rpx;
-  font-weight: 600;
-  color: #6D00FF;
-  line-height: 66rpx;
-}
-
-.mair .play-info .info .fmMod {
-  position: absolute;
-  top: 22rpx;
-  left: 50%;
-  transform: translateX(-50%);
-  width: 200rpx;
-  height: 66rpx;
-  z-index: 1000;
-}
-
-.mair .play-info .info .fm .gochnnalList {
-  width: 50rpx;
-  height: 50rpx;
-  position: absolute;
-  top: 8rpx;
-  left: 100%;
-}
-
-.mair .play-info .info .thisMusic {
-  position: absolute;
-  bottom: 26rpx;
-  left: 50%;
-  transform: translateX(-50%);
-  width: 488rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.mair .play-info .info .thisMusic>text {
-  width: 100rpx;
-  display: inline-block;
-  color: #fff;
-  font-size: 20rpx;
-}
-
-.mair .play-info .info .thisMusic .scroll-box {
-  position: relative;
-  max-width: 388rpx;
-  display: flex;
-  align-items: center;
-}
-
-.thisMusic .scroll-box .scroll-wrap {
-  max-width: 100%;
-  display: inline-block;
-  vertical-align: top;
-  overflow: hidden;
-  white-space: nowrap;
-}
-
-.thisMusic .scroll-box .scroll-item {
-  /* animation: scroll linear 4s alternate infinite; */
-  float: left;
-  color: #fff;
-  font-size: 20rpx;
-}
-
-@keyframes scroll {
-  0% {
-    margin-left: 0;
-    transform: translateX(0);
-  }
-
-  10% {
-    margin-left: 0;
-    transform: translateX(0);
-  }
-
-  90% {
-    margin-left: 100%;
-    transform: translateX(-100%);
-  }
-
-  100% {
-    margin-left: 100%;
-    transform: translateX(-100%);
-  }
-}
-
-.mair .gologin {
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 100vw;
-  height: 100%;
-  background-color: rgba(0, 0, 0, 0.6);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  z-index: 9999;
-}
-
-.mair .gologin .model {
-  width: 100%;
-  height: 100%;
-  position: relative;
-  background-color: #fff;
-}
-
-.mair .gologin .model>image {
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-}
-
-.mair .gologin .model>view {
-  /* position: absolute;
-  top: 0;
-  left: 0; */
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  display: flex;
-  align-items: center;
-  flex-direction: column;
-}
-
-.mair .gologin .model>view>image {
-  display: block;
-  height: 44rpx;
-  margin: 398rpx auto 18rpx;
-}
-
-.mair .gologin .model>view text {
-  display: block;
-  width: 100%;
-  font-size: 30rpx;
-  color: #353535;
-  font-weight: bold;
-  text-align: center;
-  margin-bottom: 66rpx;
-}
-
-.mair .goruter .model {
-  background: #fff;
-  height: 100%;
-  width: 100%;
-}
-
-.mair .goruter .model>view>image {
-  display: block;
-  height: 176rpx;
-  margin: 318rpx auto 18rpx;
-}
-
-.pd {
-  position: relative;
-  width: 120vw;
-  height: calc(100% - 204rpx);
-  padding-top: 20rpx;
-  margin-left: -24rpx;
-}
-
-.pd .conm {
-  padding-left: 24rpx;
-  width: calc(100vw - 52rpx);
-}
-
-.pd .cz {
-  width: 22rpx;
-  height: 1664rpx;
-  position: absolute;
-  top: 24rpx;
-  left: 24rpx;
-}
-
-.pd .musicList {
-  padding: 0 0 20rpx 44rpx;
-  position: relative;
-}
-
-.pd .musicList .li {
-  height: 98rpx;
-  display: flex;
-  align-items: center;
-  margin-bottom: 52rpx;
-  color: #353535;
-  position: relative;
-}
-
-.pd .musicList .li .zz {
-  width: 236rpx;
-  height: 22rpx;
-  position: absolute;
-  top: 48rpx;
-  left: -70rpx;
-  z-index: 999;
-}
-
-.pd .musicList .li .lm {
-  transform: rotate(90deg);
-}
-
-.pd .musicList .li .musicInfo {
-  width: 606rpx;
-  height: 98rpx;
-  display: flex;
-  align-items: center;
-  margin-left: 22rpx;
-  position: relative;
-}
-
-.pd .musicList .li .musicInfo .pic {
-  width: 86rpx;
-  height: 86rpx;
-  border-radius: 50%;
-  margin-right: 24rpx;
-  border: 2rpx solid #979797;
-}
-
-.pd .musicList .li .musicInfo text {
-  font-size: 30rpx;
-  font-weight: bold;
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  width: calc(100% - 200rpx);
-}
-
-.pd .musicList .li .musicInfo .svg {
-  position: absolute;
-  top: 34rpx;
-  right: 50rpx;
-  width: 34rpx;
-  height: 30rpx;
-}
-
-.pd .musicList .li:last-child {
-  margin: 0;
-}
-
-.pd .musicList .li.action {
-  color: #6547A3;
-}
-
-.pd .musicList .li.action .musicInfo {
-  border-radius: 49rpx;
-  background-color: #D8D8D8;
-}
-
-.mair .mz {
-  width: calc(100% - 72rpx);
-  padding: 32rpx 36rpx;
-  background: #FFFFFF;
-  border-radius: 0px 0px 18rpx 18rpx;
-  overflow: hidden;
-}
-
-.mair .deviceList {
-  width: 100%;
-  height: 100%;
-  background-color: rgba(0, 0, 0, 0.6);
-  position: absolute;
-  top: 0;
-  left: 0;
-  z-index: 9999;
-}
-
-.mair .mz .li-view {
-  height: 160rpx;
-  float: left;
-  width: calc(100% / 2 - 8rpx);
-  margin-bottom: 36rpx;
-  display: flex;
-  align-items: center;
-}
-
-.mair .mz .li-view:nth-child(2n) {
-  margin-left: 14rpx;
-}
-
-.mair .mz .li {
-  position: relative;
-  width: calc(100% - 44rpx);
-  height: 160rpx;
-  display: flex;
-  align-items: center;
-  border: 2rpx solid #353535;
-  border-radius: 16rpx;
-  padding: 0 20rpx;
-  background-color: #fff;
-}
-
-.mair .mz .li image {
-  width: 96rpx;
-}
-
-.mair .mz .li .delete {
-  position: absolute;
-  top: -6rpx;
-  right: -6rpx;
-  width: 36rpx;
-}
-
-.mair .mz .li .deviceName {
-  font-size: 28rpx;
-  color: #353535;
-  font-weight: 500;
-  margin-left: 18rpx;
-}
-
-.mair .mz .li .onli {
-  position: absolute;
-  bottom: 14rpx;
-  right: 24rpx;
-  font-size: 24rex;
-  color: #353535;
-}
-
-.mair .mz .li.action {
-  border: 4rpx solid #6547A3;
-  box-shadow: 0px 4rpx 8rpx 0px rgba(0, 0, 0, 0.5);
-  width: calc(100% - 48rpx);
-  height: 156rpx;
-}
-
-.mair .mz .li.action .onli {
-  color: #6547A3;
-}
-
-.mair .mz .li.offline {
-  opacity: 0.6;
-}
-
-.mair .mz .but {
-  float: left;
-  width: 100%;
-  display: flex;
-  justify-content: center;
-
-}
-
-.mair .mz .but text {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 226rpx;
-  height: 80rpx;
-  background: #6547A3;
-  border-radius: 45rpx;
-  color: #fff;
-  margin: 0 20rpx;
-}
-
-.wake {
-  height: 48rpx;
-  width: 48rpx;
-  z-index: 1000;
-}
-
-/* .updataminiwx {
-   position: fixed;
-   top: 0;
-   left: 0;
-   width: 100vw;
-   height: 100vh;
-   display: flex;
-   align-items: center;
-   justify-content: center;
-   background: rgba(0, 0, 0, 0.6);
-   z-index: 9999;
- }
-
- .updataminiwx .mode {
-   width: 520rpx;
-   height: 410rpx;
-   position: relative;
- }
-
- .updataminiwx .mode .bg {
-   width: 520rpx;
-   height: 410rpx;
- }
-
- .updataminiwx .mode .updata-view {
-   width: 520rpx;
-   height: 410rpx;
-   position: absolute;
-   top: 0;
-   left: 0;
- }
-
- .updataminiwx .mode .updata-view image {
-   width: 124rpx;
-   height: 124rpx;
-   margin: 24rpx auto 14rpx;
-   display: block;
- }
-
- .updataminiwx .mode .updata-view .title {
-   height: 38rpx;
-   font-size: 30rpx;
-   font-weight: bold;
-   color: #353535;
-   line-height: 38rpx;
-   display: block;
-   text-align: center;
-   margin-bottom: 16rpx;
- }
-
- .updataminiwx .mode .updata-view .tip {
-   height: 38rpx;
-   font-size: 30rpx;
-   font-weight: 500;
-   color: #999;
-   line-height: 38rpx;
-   display: block;
-   text-align: center;
-   margin-bottom: 40rpx;
- }
-
- .updataminiwx .mode .updata-view>view {
-   display: flex;
-   justify-content: center;
- }
-
- .updataminiwx .mode .updata-view>view text {
-   width: 226rpx;
-   height: 80rpx;
-   text-align: center;
-   line-height: 80rpx;
-   border-radius: 40rpx;
-   font-size: 30rpx;
-   font-weight: bold;
-   margin: 0 10rpx;
- }
-
- .updataminiwx .mode .updata-view>view .onBut {
-   background-color: rgba(153, 153, 153, 1);
-   color: #fff;
- }
-
- .updataminiwx .mode .updata-view>view .twoBut {
-   background-color: rgba(101, 71, 163, 1);
-   color: #fff;
- } */
-
-
-/************************ 我的 ************************/
-
-/* pages/me/me.wxss */
-.me .head-logo {
-  padding: 38rpx 0 28rpx;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-}
-
-.me .head-logo image {
-  width: 240rpx;
-  height: 240rpx;
-  border-radius: 50%;
-  border: 10rpx solid rgba(101, 71, 163, 0.2);
-  margin-bottom: 28rpx;
-}
-
-.me .head-logo text {
-  font-size: 36rpx;
-  font-weight: bold;
-}
-
-.me .head-logo .goLogin {
-  color: #999;
-}
-
-.me .head-logo .nick_name {
-  color: #353535;
-}
-
-.me .br {
-  height: 20rpx;
-  background: #999999;
-  opacity: 0.05;
-}
-
-.me .list {
-  padding: 0 30rpx;
-}
-
-.me .list .li {
-  height: 102rpx;
-  display: flex;
-}
-
-.me .list .li .icon {
-  height: 102rpx;
-  display: flex;
-  align-items: center;
-  margin-right: 20rpx;
-}
-
-.me .list .li image {
-  width: 40rpx;
-}
-
-.me .list .li .button {
-  width: calc(100% - 60rpx);
-  border-bottom: 1rpx solid #E0DCD7;
-  position: relative;
-  display: flex;
-  align-items: center;
-}
-
-
-.between_text {
-  height: 105rpx;
-  display: flex;
-  align-items: center;
-  font-size: 30rpx;
-  background-color: transparent;
-}
-
-.between_image {
-  height: 105rpx;
-  display: flex;
-  align-items: center;
-  background-color: transparent;
-  justify-content: flex-end;
-}
-
-.me .list .li .button button,
-.me .list .li .button text {
-  margin: 0;
-  background: none;
-  text-align: left;
-  padding: 0;
-  line-height: 102rpx;
-  font-size: 30rpx;
-  color: #353535;
-  font-weight: 400;
-}
-
-.me .list .li .button image.j {
-  height: 22rpx;
-  width: 12rpx;
-  position: absolute;
-  top: 40rpx;
-  right: 0rpx;
-}
-
-/* position: fixed; display: flex; */
-.login {
-  display: flex;
-  width: 100vw;
-  align-items: flex-end;
-  margin-bottom: 50rpx;
-  justify-content: center;
-}
-
-.login>view {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 520rpx;
-  height: 80rpx;
-  background: #999999;
-  border-radius: 45rpx;
-  font-size: 36rpx;
-  font-weight: 400;
-  color: #FFFFFF;
-}
-
-.login>view.action {
-  background: #6547A3;
-}
-
-/************************ 底部选择按钮 ************************/
-
-.line {
-  height: 1rpx;
-  background-color: #999999;
-}
-
-.bottom_view {
-  flex: 1;
-}
-
-.bottom_image {
-  width: 44rpx;
-  height: 44rpx;
-}
-
-/************************ banner ************************/
-
-.banner_container {
-  width: 100%;
-  height: 264rpx;
-  margin-top: 32rpx;
-  /* 根据需要调整高度 */
-  overflow: hidden;
-  position: relative;
-  border-radius: 16rpx;
-}
-
-.swiper {
-  width: 100%;
-  height: 264rpx;
-}
-
-.swiper_image {
-  width: 100%;
-  display: block;
-}
-
-/* .banner_container {
-  margin-top: 24rpx;
-  height: 270rpx;
-  background-color: transparent;
-}
-
-.banner_item {
-  height: 270rpx;
-  background-color: transparent;
-} */
-
-/* 设置指示点的大小和颜色 */
-.swiper_dot {
-  width: 10px;
-  /* 指示点的宽度 */
-  height: 10px;
-  /* 指示点的高度 */
-  background-color: rgba(21, 128, 56, 0.5);
-  /* 指示点的颜色,这里使用了半透明的白色 */
-  border-radius: 50%;
-  /* 使指示点成为圆形 */
-  margin: 0 4px;
-  /* 指示点之间的间距 */
-  display: inline-block;
-  /* 使指示点成为行内块元素 */
-}
-
-/* 设置当前选中指示点的样式(可选) */
-.swiper_dot_active {
-  background-color: red;
-  /* 当前选中指示点的颜色 */
-  width: 12px;
-  /* 当前选中指示点的宽度(可以比未选中时稍大) */
-  height: 12px;
-  /* 当前选中指示点的高度(可以比未选中时稍大) */
-}
-
-.add_device_public {
-  background-color: #6546A3;
-  width: 80vw;
-  height: 88rpx;
-  margin-top: 32rpx;
-  margin-left: 5%;
-  border-radius: 72rpx;
-  display: flex;
-  text-align: center;
-  justify-content: center;
-  align-items: center;
-}
-
-.scoll_content {
-  flex: 1;
-  /* 占据剩余空间 */
-  overflow-y: auto;
-  /* 允许垂直滚动 */
-  -webkit-overflow-scrolling: touch;
-  /* 改善iOS上的滚动性能 */
-  background-color: #fff;
-  /* 背景色仅用于示例 */
-}
-
-.item_public {
-  height: 264rpx;
-  border: 2rpx solid #6546A3;
-  border-radius: 24rpx;
-  display: flex;
-  margin-bottom: 10rpx;
-}
-
-.item_public_image {
-  height: 200rpx;
-  width: 200rpx;
-  margin-left: 32rpx;
-  margin-top: 32rpx;
-}
-
-.item_public_right {
-  flex: 1;
-}

+ 0 - 95
pages/pageA/login/login.js

@@ -1,95 +0,0 @@
-const {
-  login,
-  register
-} = require('../../../utils/api.js')
-
-import route_constant from '../../../utils/route_constant.js';
-import route_util from '../../../utils/route_util.js';
-
-Page({
-
-  data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '', //导航栏 中间的标题
-    },
-    isYs: false,
-    isAgree: false,
-  },
-
-  onLoad(options) {},
-
-  egree() {
-    this.setData({
-      isAgree: !this.data.isAgree
-    });
-  },
-
-  goabout(e) {
-    var param = '?type=' + e.currentTarget.dataset.index;
-    route_util.jumpParam(route_constant.aboutInfo, param);
-  },
-
-  getPhoneNumber(e) {
-    if (e.detail.errMsg != "getPhoneNumber:ok") {
-      wx.showToast({
-        title: "获取手机号失败",
-        icon: 'fail',
-        duration: 2000
-      });
-      return;
-    }
-
-    var phoneCode = e.detail.code;
-    if (phoneCode) {
-      wx.login({
-        success: res1 => {
-          wx.showLoading({
-            title: '加载中',
-          });
-          // {"openid":"oZHPJ5JcNem2och3ToaocggmUENw","unionid":null,"userId":null,"deviceUid":null,"accessToken":null,"phone":null,"headUrl":"","nickname":"","isNewUser":true}
-          login({
-            code: res1.code,
-            unShowLoad: true,
-          }).then((res2) => {
-            register({
-              openid: res2.openid,
-              code: phoneCode,
-              unShowLoad: true,
-            }).then((res3) => {
-              var phone = res3.phone;
-              getCurrentPages()[0].loginReset(phone, function () {
-                wx.showToast({
-                  title: "登录成功",
-                  icon: 'success',
-                  duration: 2000
-                });
-              }, function () {
-                setTimeout(() => {
-                  route_util.redirectTo(route_constant.deviceList);
-                }, 2000);
-              }, function () {
-                wx.hideLoading();
-              });
-            });
-          });
-        },
-        fail(fail1) {
-          wx.hideLoading();
-        },
-      });
-    }
-  },
-
-  notlogin() {
-    wx.showToast({
-      title: '请同意协议',
-      icon: "none"
-    })
-  }
-})
-
-// 需要用授权登录
-// if ((res.isNewUser && res.isNewUser === true) || !phone) {
-//   return;
-// };

+ 0 - 5
pages/pageA/login/login.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 20
pages/pageA/login/login.wxml

@@ -1,20 +0,0 @@
-
-<view class="login">
-  <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="mair">
-    <image mode="widthFix" src="../../../img/k.png"></image>
-    <view class="loginbut">
-      <view class="mode" wx:if="{{!isAgree}}" catchtap="notlogin"></view>
-      <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">手机号快速登录</button>
-    </view>
-    <view class="ys">
-      <!-- <image bindtap="egree" mode="aspectFill" src="../../../img/{{isAgree ? 'h' : 'j'}}.png"></image> -->
-      <image style="margin-top: 5rpx;" bindtap="egree" mode="aspectFill" src="../../../img/login_agree_{{isAgree ? 'sel' : 'nor'}}.png"></image>
-      <view>我已阅读并同意<text data-index="0" bindtap="goabout">《猫王妙播用户服务协议》</text>
-        <text data-index="1" bindtap="goabout">《猫王妙播用户隐私协议》</text>
-      </view>
-    </view>
-  </view>
-  <!-- <view wx:if="{{isYs}}"><web-view src="https://ohplay.radio1964.net/privacy/protocol"></web-view></view> -->
-</view>

+ 0 - 55
pages/pageA/login/login.wxss

@@ -1,55 +0,0 @@
-
-.login{
-  width: 100vw;
-  height: 100vh;
-  background: #6547A3;
-}
-.mair {
-  display: flex;
-  align-items: center;
-  flex-direction: column;
-  overflow: hidden;
-}
-.mair>image{
-  width: 400rpx;
-  margin-top: 260rpx;
-}
-.mair .loginbut{
-  margin-top: 100rpx;
-  position: relative;
-}
-.mair .loginbut button{
-  width: 520rpx;
-  height: 80rpx;
-  background: #FFFFFF;
-  border-radius: 45rpx;
-  font-size: 36rpx;
-  color: #6547A3;
-}
-.mair .loginbut .mode {
-  width: 520rpx;
-  height: 80rpx;
-  background: #FFFFFF;
-  opacity: 0.4;
-  position: absolute;
-  top: 0;
-  left: calc((100% - 520rpx) / 2);
-  z-index: 1;
-  border-radius: 45rpx;
-}
-.mair .ys{
-  margin-top: 40rpx;
-  display: flex;
-  justify-content: center;
-}
-.mair .ys>image{
-  width: 28rpx;
-  height: 28rpx;
-  margin-right: 10rpx;
-}
-.mair .ys view{
-  font-size: 24rpx;
-  color: #fff;
-  width: 65vw;
-  line-height: 34rpx;
-}

+ 0 - 15
pages/pageB/about/about.js

@@ -1,15 +0,0 @@
-import route_util from '../../../utils/route_util.js';
-import route_constant from '../../../utils/route_constant.js';
-Page({
-  data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '关于我们', //导航栏 中间的标题
-    },
-  },
-
-  go(e) {
-    var param = '?type=' + e.currentTarget.dataset.index;
-    route_util.jumpParam(route_constant.aboutInfo, param);
-  },
-})

+ 0 - 5
pages/pageB/about/about.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 15
pages/pageB/about/about.wxml

@@ -1,15 +0,0 @@
-
-<view class="about">
-  <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="page-view">
-    <view class="about-li" data-index="0" bindtap="go">
-      <text>猫王用户协议</text>
-      <image class="j" mode="heightFix" src="../../../img/b.png"></image>
-    </view>
-    <view class="about-li" data-index="1" bindtap="go">
-      <text>猫王隐私政策</text>
-      <image class="j" mode="heightFix" src="../../../img/b.png"></image>
-    </view>
-  </view>
-</view>

+ 0 - 30
pages/pageB/about/about.wxss

@@ -1,30 +0,0 @@
-
-.about-li{
-  width: calc(100vw - 34rpx);
-  height: 102rpx;
-  display: flex;
-  align-items: center;
-  margin-right: 20rpx;
-  position: relative;
-  margin: 0 0 0 34rpx;
-  border-bottom: 1rpx solid #E0DCD7;
-}
-.about-li text {
-  margin: 0;
-  background: none;
-  text-align: left;
-  padding: 0;
-  line-height: 102rpx;
-  font-size: 30rpx;
-  color: #353535;
-  font-weight: 400;
-  font-weight: bold;
-  font-size: 32rpx;
-}
-
-.about-li image.j {
-  height: 22rpx;
-  position: absolute;
-  top: 40rpx;
-  right: 34rpx;
-}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 207
pages/pageB/connectBle/connectBle.js


+ 0 - 5
pages/pageB/connectBle/connectBle.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 9
pages/pageB/connectBle/connectBle.wxml

@@ -1,9 +0,0 @@
-<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>
-  <image class="device_pic" src="{{deviceImg}}" mode="aspectFill" />
-  <view class="top_tips main_black">{{searchTips}}</view>
-  <view style="font-size: 28rpx; color: #666666; margin-top: 32rpx; display: flex; justify-content: center; align-items: center;margin-inline: 32rpx;">
-    {{subTips}}
-  </view>
-  <view class="main_color connect_button" bind:tap="connectDeviceTap">{{buttonTips}}</view>
-</view>

+ 0 - 39
pages/pageB/connectBle/connectBle.wxss

@@ -1,39 +0,0 @@
-
-.container {
-	position: relative;
-	height: 100vh;
-}
-
-.device_pic {
-	margin-top: 128rpx;
-	margin-left: 140rpx;
-	/* margin-right: 140rpx; */
-	width: 470rpx;
-	height: 432rpx;
-	background: #F2F5F7;
-	border-radius: 24rpx;
-}
-
-.top_tips {
-	margin-top: 128rpx;
-	margin-inline: 20rpx;
-	font-size: 28rpx;
-	text-align: center;
-	justify-content: center;
-	align-items: center;
-
-}
-
-.connect_button {
-	margin-top: 456rpx;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	margin-inline: 64rpx;
-	font-size: 32rpx;
-	font-weight: Medium;
-	color: white;
-	text-align: center;
-	border-radius: 44rpx;
-	height: 88rpx;
-}

+ 0 - 142
pages/pageB/deviceConMode/deviceConMode.js

@@ -1,142 +0,0 @@
-import routeUtil from '../../../utils/route_util'
-import route_constant from '../../../utils/route_constant.js'
-Page({
-
-  data: {
-    scopeBluetooth: false,
-    userFuzzyLocation: true,
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '配网模式选择', //导航栏 中间的标题
-    },
-    isNotruter: false,
-    model: "",
-    connectDevice: {},
-    typeList: [{
-        "icon": "../../images/device/mode_2.png",
-        "text": "WiFi模式",
-        "type": 2,
-      },
-      {
-        "icon": "../../images/device/mode_1.png",
-        "text": "蓝牙模式",
-        "type": 1,
-      },
-      {
-        "icon": "../../images/device/mode_4.png",
-        "text": "4G模式",
-        "type": 4,
-      },
-    ],
-  },
-
-  getModeName(curItem) {
-    // 设备类型:1-蓝牙,2-Wifi,3-传统蓝牙,4-4G
-    var str = "";
-    if (curItem.type == 4) {
-      str = "移动数据模式";
-    } else if (curItem.type == 2) {
-      str = "WiFi模式";
-    } else if (curItem.type == 1) {
-      str = "蓝牙模式";
-    }
-    return str;
-  },
-
-  nextTap(e) {
-    if (this.nullTips()) {
-      return
-    }
-    let device = this.data.typeList[0];
-    let type = device.type ?? 0;
-    console.log("选择模式", type)
-    ///蓝牙模式
-    if (type == 1) {
-      var param = '?param=' + JSON.stringify(this.data.connectDevice);
-      routeUtil.jumpParam(route_constant.connectBle, param);
-    }
-    ///Wifi模式
-    else if (type == 2) {
-      routeUtil.jump(route_constant.deviceConnect0);
-    } else if (type == 3) {
-      // btHelper.stopSearch()
-    }
-    ///4G模式
-    else {
-
-    }
-  },
-
-  async selectDeviceModelTap(e) {
-    let device = e.currentTarget.dataset.device;
-    // console.log(e)
-    let type = device.type;
-    if (type == 1) {
-      // this.getConnectedDevices()
-    } else if (type == 2) {
-
-    } else if (type == 3) {
-      // btHelper.stopSearch()
-    } else {
-
-    }
-    var list = []
-    list.push(device)
-    this.data.typeList.forEach(element => {
-      if (element.type != type) {
-        list.push(element)
-      }
-    });
-    this.setData({
-      typeList: list,
-      model: this.getModeName(device)
-    })
-
-  },
-  nullTips() {
-    if (this.data.typeList.length === 0) {
-      wx.showToast({
-        title: '暂不支持该设备配网',
-        icon: 'none',
-      })
-      return true
-    }
-    return false
-  },
-  onLoad: function (options) {
-    let device = JSON.parse(options.param) || {}
-    console.log("配网配对的设备:", device)
-    if (Object.keys(device).length === 0) {
-      wx.showToast({
-        title: '设备数据为空,返回刷新列表试试看',
-      })
-      return;
-    }
-    let _this = this
-    let isWifi = device.clientType != "MW-S2";
-    let isS2 = device.clientType === "MW-S2";
-
-    let _typeList = device.typeList
-      .filter(e => (isWifi && e.type == 2) || isS2)
-      .map(e => ({
-        icon: "../../images/device/mode_" + e.type + ".png",
-        text: _this.getModeName(e),
-        type: e.type
-      }));
-
-    var list = []
-
-    this.data.typeList.forEach(element => {
-      if (_typeList.find(_type => _type.type === element.type)) {
-        list.push(element)
-      }
-    });
-    this.setData({
-      typeList: list,
-      connectDevice: device
-    })
-    this.nullTips()
-
-  },
-
-})

+ 0 - 5
pages/pageB/deviceConMode/deviceConMode.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 20
pages/pageB/deviceConMode/deviceConMode.wxml

@@ -1,20 +0,0 @@
-<view class="main">
-  <nav-bar class="nav_bar_c" 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>
-  <image class="model_bg" src="../../../images/device/mode_bg.png" mode="aspectFill" />
-  <view class="select_tips">
-    <view class="setDeviceModel main_green">开启设备选择{{model}}</view>
-    <view wx:if="{{typeList.length > 0}}" class="deviceList">
-      <block wx:for="{{typeList}}" wx:key="item">
-        <view class="devicePicItem devicePicItem_{{index}}" bindtap="selectDeviceModelTap" data-device="{{item}}">
-          <image class="select_icon" src="{{index === 0 ? '../../../images/device/pay_select.png' : '../../../images/device/wake_select_no.png'}}"></image>
-          <view class="device_text">
-            <image class="model_icon" src="{{item.icon}}"></image>
-            <text class="model_text">{{item.text}}</text>
-          </view>
-        </view>
-      </block>
-    </view>
-  </view>
-  <view wx:if="{{typeList.length > 0}}" class="setDeviceModelTips">开启后点击“下一步”</view>
-  <view class="main_color connect_button" bind:tap="nextTap">连接设备</view>
-</view>

+ 0 - 117
pages/pageB/deviceConMode/deviceConMode.wxss

@@ -1,117 +0,0 @@
-.main {
-  position: relative;
-  height: 100vh;
-}
-
-.model_bg {
-  top: 80;
-  left: 0;
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  z-index: -1;
-  background-size: cover;
-
-}
-
-.select_tips {
-  position: relative;
-  z-index: 1;
-  padding: 20px;
-}
-
-.devicePicItem {
-  display: flex;
-  align-items: center;
-  padding: 10px;
-
-}
-
-.setDeviceModel {
-  padding: 10px;
-  text-align: center;
-  left: 0;
-  font-size: 32rpx;
-}
-
-.setDeviceModelTips {
-  color: #FFFFFFB3;
-  text-align: center;
-  font-size: 24rpx;
-}
-
-.deviceList {
-  margin-top: 60px;
-}
-
-.devicePicItem {
-  position: relative;
-
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-  justify-content: center;
-
-  border-radius: 5px;
-  height: 100rpx;
-  margin-top: 32rpx;
-  background-color: #ffffff0d;
-}
-
-.select_icon {
-  width: 32rpx;
-  height: 32rpx;
-  position: absolute;
-  z-index: 1;
-  top: 16rpx;
-  right: 16rpx;
-}
-
-.device_text {
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-  justify-content: center;
-}
-
-.model_icon {
-  width: 48rpx;
-  height: 48rpx;
-  margin-right: 10rpx;
-}
-
-.model_text {
-  font-size: 32rpx;
-  color: white;
-}
-
-.devicePicItem_0 {
-  margin-left: 32rpx;
-  margin-right: 32rpx;
-}
-
-.devicePicItem_1 {
-  margin-left: 64rpx;
-  margin-right: 64rpx;
-}
-
-.devicePicItem_2 {
-  margin-left: 96rpx;
-  margin-right: 96rpx;
-}
-
-.connect_button {
-  position: fixed;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  bottom: 100rpx;
-  left: 60rpx;
-  right: 60rpx;
-  font-size: 32rpx;
-  font-weight: Medium;
-  color: white;
-  text-align: center;
-  border-radius: 44rpx;
-  height: 88rpx;
-}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 155
pages/pageB/deviceConnect0/deviceConnect0.js


+ 0 - 5
pages/pageB/deviceConnect0/deviceConnect0.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 29
pages/pageB/deviceConnect0/deviceConnect0.wxml

@@ -1,29 +0,0 @@
-<!--pages/deviceRoter0/deviceRoter0.wxml-->
-<view class="deviceRoter deviceRoter0">
-  <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="roterps">
-    <view class="devicePic">
-      <image mode="widthFix" src="{{imageUrl}}"></image>
-    </view>
-    <text>开启设备并将开关打至WiFi模式,指示灯亮
-      起后,即可进入下一步</text>
-    <view wx:if="{{!scopeBluetooth && userFuzzyLocation}}" class="qx">
-      <text bindtap="setBluetooth">开启蓝牙权限</text>
-      <image mode="heightFix" src="../../../img/a.png"></image>
-    </view>
-    <view wx:if="{{!userFuzzyLocation}}" class="qx">
-      <text bindtap="setUserFuzzyLocation">开启定位权限</text>
-      <image mode="heightFix" src="../../../img/a.png"></image>
-    </view>
-  </view>
-  <view class="subBtn">
-    <view class="btn" style="opacity: {{scopeBluetooth && userFuzzyLocation ? '1' : '0.6'}};" bindtap="next">
-      {{scopeBluetooth && userFuzzyLocation ? '下一步' : (!userFuzzyLocation ? '请开启定位权限' : '请开启蓝牙权限') }}
-    </view>
-    <view class="notRoter" wx:if="{{isNotruter}}">
-      <text bindtap="notRoter">暂不链接</text>
-      <image mode="heightFix" src="../../../img/b.png"></image>
-    </view>
-  </view>
-</view>

+ 0 - 1
pages/pageB/deviceConnect0/deviceConnect0.wxss

@@ -1 +0,0 @@
-/* pages/deviceRoter0/deviceRoter0.wxss */

+ 0 - 145
pages/pageB/deviceConnect1/deviceConnect1.js

@@ -1,145 +0,0 @@
-const app = getApp();
-import route_util from '../../../utils/route_util.js';
-import route_constant from '../../../utils/route_constant.js'
-
-Page({
-  data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '设置网络', //导航栏 中间的标题
-    },
-    scopeBluetooth: app.globalData.scopeBluetooth,
-    isShowPwd: false,
-    is5GWifi: false,
-    ssid: "",
-    pwdData: "",
-    pwdData1: "",
-    connectDevice: "",
-  },
-
-  onLoad(options) {
-    var that = this;
-    var param = options.param;
-    that.data.connectDevice = param;
-  },
-
-  onShow() {
-    var that = this;
-    that.getWifiStatus();
-  },
-
-  getBluetoothStatus() {
-    app.getBluetoothStatus();
-  },
-
-  ///Wifi名称
-  setSsid: function (e) {
-    var that = this;
-    let str = false;
-    if (e.detail.value.indexOf("5G") !== -1) {
-      str = true;
-    };
-    that.setData({
-      ssid: e.detail.value,
-      is5GWifi: str
-    });
-  },
-
-  ///Wifi名称
-  setPwd: function (e) {
-    var that = this;
-    app.globalData.pwdData = e.detail.value;
-    that.setData({
-      pwdData: e.detail.value,
-    });
-  },
-
-  ///获取网络状态
-  getWifiStatus() {
-    var that = this;
-    wx.getNetworkType({
-      success(res) {
-        if (res.networkType === "wifi") {
-          wx.startWifi({
-            success(res) {
-              //获取当前已连接wifi名
-              wx.getConnectedWifi({
-                success: function (res) {
-                  var ssid = res.wifi.SSID;
-                  // 5Gwifi
-                  if (res.wifi.SSID.indexOf("5G") !== -1) {
-                    that.setData({
-                      is5GWifi: true,
-                      ssid: ssid,
-                    });
-                  } else {
-                    that.setData({
-                      is5GWifi: false,
-                      ssid: ssid,
-                    });
-                  };
-
-                  app.globalData.ssid = ssid;
-                  wx.getStorage({
-                    key: 'wifiInfo',
-                    success(wifiInfo) {
-                      const resData = JSON.parse(wifiInfo.data);
-                      if (resData.ssid === res.wifi.SSID) {
-                        that.setData({
-                          pwdData: resData.password,
-                        });
-                      }
-                    }
-                  })
-                },
-              })
-            }
-          })
-        }
-      }
-    })
-  },
-
-  ///下一步
-  next() {
-    var that = this;
-    if (that.data.ssid === "") {
-      wx.showToast({
-        title: '请输入WIFI名称',
-        icon: 'none',
-        duration: 2000
-      })
-      return;
-    };
-
-    if (that.data.pwdData === "") {
-      wx.showToast({
-        title: '请输入WIFI密码',
-        icon: 'none',
-        duration: 2000
-      })
-      return;
-    };
-
-    app.globalData.ssid = that.data.ssid;
-    app.globalData.pwdData = that.data.pwdData;
-
-    var param = '?param=' + that.data.connectDevice;
-    route_util.jumpParam(route_constant.deviceConnect2, param);
-
-  },
-
-  notRoter() {
-    wx.navigateBack({
-      delta: 1
-    });
-  },
-
-  showPwd() {
-    var that = this;
-    that.setData({
-      isShowPwd: !that.data.isShowPwd
-    })
-  },
-
-})

+ 0 - 5
pages/pageB/deviceConnect1/deviceConnect1.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 31
pages/pageB/deviceConnect1/deviceConnect1.wxml

@@ -1,31 +0,0 @@
-
-<view class="deviceRoter deviceRoter1">
-  <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="roterps">
-    <view class="devicePic">
-      <image mode="widthFix" src="../../../img/e.png"></image>
-    </view>
-  </view>
-  <view class="wifiInfo">
-    <view class="ssid">
-      <input placeholder="请输入WIFI名称" bindinput="setSsid" type="text" value="{{ssid}}" maxlength="30" />
-    </view>
-    <view class="ssid pwd" maxlength="30">
-      <input wx:if="{{!isShowPwd}}" class="notShow" bindinput="setPwd" password="true" placeholder="请输入WiFi密码" value="{{pwdData}}" />
-      <input wx:else class="isShow" bindinput="setPwd" placeholder="请输入WiFi密码" value="{{pwdData}}" />
-      <view class="yz" bindtap="showPwd">
-        <image mode="widthFix" src="../../../img/yj{{isShowPwd ? '1' : '0'}}.png"></image>
-      </view>
-    </view>
-    <view class="ps" wx:if="{{is5GWifi}}">
-      <image mode="widthFix" class="" src="../../../img/d.png"></image>
-      <text>该WiFi可能为5GHz WiFi,设备无法连接,请切换其他WiFi</text>
-    </view>
-  </view>
-  <view class="subBtn">
-    <view class="btn" bindtap="next">
-      下一步
-    </view>
-  </view>
-</view>

+ 0 - 62
pages/pageB/deviceConnect1/deviceConnect1.wxss

@@ -1,62 +0,0 @@
-/* pages/deviceRoter1/deviceRoter1.wxss */
-.deviceRoter1 .wifiInfo {
-  padding: 0 66rpx;
-}
-
-.deviceRoter1 .wifiInfo > view.ssid {
-  width: calc(100vw - 136rpx);
-  height: 96rpx;
-  border-radius: 48rpx;
-  border: 2rpx solid #999999;
-  margin-bottom: 40rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.deviceRoter1 .wifiInfo > view.ssid input {
-  width: calc(100% - 104rpx);
-  height: 98rpx;
-  line-height: 98rpx;
-  font-weight: bold;
-  font-size: 32rpx;
-  color: #353535;
-}
-
-.deviceRoter1 .wifiInfo .pwd {
-  position: relative;
-}
-
-.deviceRoter1 .wifiInfo .pwd input {
-  width: calc(100% - 154rpx) !important;
-}
-
-.deviceRoter1 .wifiInfo .pwd .yz {
-  width: 48rpx;
-  height: 98rpx;
-  display: flex;
-  align-items: center;
-}
-
-.deviceRoter1 .wifiInfo .pwd .yz image {
-  width: 48rpx;
-}
-
-.deviceRoter1 .wifiInfo .ps {
-  overflow: hidden;
-}
-
-.deviceRoter1 .wifiInfo .ps image {
-  width: 48rpx;
-  margin-right: 20rpx;
-  line-height: 48rpx;
-  float: left;
-}
-
-.deviceRoter1 .wifiInfo .ps text {
-  float: left;
-  font-size: 28rpx;
-  line-height: 48rpx;
-  color: #FA5151;
-  width: calc(100% - 68rpx);
-}

+ 0 - 228
pages/pageB/deviceConnect2/deviceConnect2.js

@@ -1,228 +0,0 @@
-const app = getApp();
-let xBlufi = require("../../../utils/blufi/xBlufi.js");
-import strings from '../../../utils/strings.js';
-import lexin_devices from '../../../utils/lexin/devices';
-Page({
-
-  data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '连接配网', //导航栏 中间的标题
-    },
-    devicesList: [],
-    searching: false,
-    version: '2.0',
-    name: '',
-    connectedDeviceId: '',
-    connected: true,
-    deviceInfo: null,
-    isInitOK: false,
-    customData: '',
-    isOne: true,
-    isSubmit: false,
-    islanya: false,
-    isOnBluetooth: false,
-    imageUrl: "./../../img/f.png",
-    connectDevice: {},
-  },
-
-  onLoad(options) {
-    const that = this;
-    var param = options.param;
-    if (!strings.isEmpty(param)) {
-      param = JSON.parse(options.param);
-      that.data.connectDevice = param;
-      if (!strings.isEmpty(param.typeList)) {
-        var typeList = param.typeList;
-        typeList = typeList.filter((v) => v.connectType == 3);
-        if (!strings.isEmpty(typeList)) {
-          that.setData({
-            imageUrl: typeList[0].deviceLinkResp.icon2,
-          });
-        }
-      }
-    }
-
-    const isOne = setTimeout(() => {
-      clearTimeout(isOne);
-      if (that.data.isOne) {
-        that.setData({
-          isOne: false,
-        });
-      }
-    }, 2000);
-
-    if (app.globalData.oneInitBluetooth) {
-      app.globalData.oneInitBluetooth = false;
-      xBlufi.initXBlufi(1);
-    };
-
-    xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent);
-    that.Search();
-  },
-
-  onShow() {
-    var that = this;
-    if (!that.data.isOne) {
-      that.Search();
-    }
-  },
-
-  ///开始或结束,也可以过滤名称
-  Search: function () {
-    xBlufi.notifyStartDiscoverBle({
-      'isStart': true,
-    });
-  },
-
-  //   {"type":" 41","result":true,"data":{"errno":0,"errCode":0,"isDiscovering":true,"errMsg":"startBluetoothDevicesDiscovery:ok"}}
-  // {"type":"1","result":true,"data":[{"deviceId":"57:F6:7D:62:D6:C0","name":"","RSSI":-97,"connectable":true,"advertisData":"4c0010072a1fbee24315680100100000000000000000000000000000","advertisServiceUUIDs":[],"localName":"","serviceData":{}}]}
-  // {"type":"1","result":true,"data":[{"deviceId":"57:F6:7D:62:D6:C0","name":"","RSSI":-97,"connectable":true,"advertisData":"4c0010072a1fbee24315680100100000000000000000000000000000","advertisServiceUUIDs":[],"localName":"","serviceData":{}},{"deviceId":"42:E0:22:C2:6E:25","name":"","RSSI":-92,"connectable":true,"advertisData":"4c001007221fa8d7a84ba8","advertisServiceUUIDs":[],"localName":"","serviceData":{}}]}
-  funListenDeviceMsgEvent: function (options) {
-    const that = this;
-    switch (options.type) {
-      //发现设备列表回调开始
-      case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
-        if (!options.result) {
-          console.log("蓝牙未开启 fail =》", options)
-          wx.showToast({
-            title: '蓝牙未开启',
-            icon: 'none'
-          })
-        } else {
-          //蓝牙搜索开始
-          that.setData({
-            searching: true
-          });
-        }
-        break;
-
-        // [{"deviceId":"7C:DF:A1:FD:3A:F2","name":"BLUFI_7cdfa1fd3af0","RSSI":-62,"connectable":true,"advertisData":"","advertisServiceUUIDs":["0000FFFF-0000-1000-8000-00805F9B34FB"],"localName":"BLUFI_7cdfa1fd3af0","serviceData":{}}]
-        ///发现设备列表回调
-      case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
-        // 搜索到蓝牙
-        if (options.result) {
-          var devicesList = options.data.filter((v) => {
-            var isLeXin = v.name.indexOf(lexin_devices.leXin) !== -1;
-            /// AIrSMArT_861210052356337
-            var isJunZheng1 = v.name.indexOf(lexin_devices.junZheng1) !== -1;
-            var isJunZheng2 = v.name.indexOf(lexin_devices.junZheng2) !== -1;
-            var isJunZheng3 = v.name.indexOf(lexin_devices.junZheng3) !== -1;
-            return isLeXin || (isJunZheng1 && !isJunZheng3) || (isJunZheng2 && !isJunZheng3);
-          });
-
-          if (!strings.isEmpty(devicesList)) {
-            ///过滤乐鑫设备
-            that.setData({
-              islanya: true,
-              devicesList: devicesList,
-            });
-          }
-        }
-        break;
-
-        // {"type":"0","result":true,"data":{"deviceId":"7C:DF:A1:FD:3A:F2","name":"BLUFI_7cdfa1fd3af0"}}
-        // {"type":"0","result":true,"data":{"deviceId":"7C:DF:A1:FC:BB:26","name":"BLUFI_7cdfa1fcbb24"}}
-        ///主动去连接连接
-      case xBlufi.XBLUFI_TYPE.TYPE_CONNECTED:
-        wx.hideLoading();
-        if (options.result) {
-          if (that.data.isOnBluetooth) {
-            return;
-          };
-
-          that.setData({
-            isOnBluetooth: true,
-          });
-
-          setTimeout(() => {
-            that.setData({
-              isSubmit: false,
-              islanya: false,
-              devicesList: [],
-              isOnBluetooth: false,
-            });
-            var param = JSON.stringify(that.data.connectDevice);
-            wx.navigateTo({
-              url: '../deviceConnect3/deviceConnect3?deviceId=' + options.data.deviceId + '&name=' + options.data.name + "&param=" + param,
-            });
-          }, 200);
-        } else {
-          wx.showModal({
-            title: '提示',
-            content: '连接失败',
-            showCancel: false
-          });
-        }
-        break;
-
-        ///停止发现设备列表回调
-      case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
-        if (options.result) {
-          //蓝牙停止搜索ok
-          console.log('蓝牙停止搜索ok')
-        } else {
-          //蓝牙停止搜索失败
-          console.log('蓝牙停止搜索失败')
-        }
-        that.setData({
-          searching: false
-        });
-        break;
-    }
-  },
-
-  // [{"deviceId":"7C:DF:A1:FC:BB:26","name":"BLUFI_7cdfa1fcbb24","RSSI":-51,"connectable":true,"advertisData":"","advertisServiceUUIDs":["0000FFFF-0000-1000-8000-00805F9B34FB"],"localName":"BLUFI_7cdfa1fcbb24","serviceData":{}}]
-  async Connect(e) {
-    var that = this;
-    const devicesList = that.data.devicesList;
-    if (devicesList.length < 1) {
-      wx.showToast({
-        title: '请短按设备配对键',
-        icon: 'none',
-        duration: 2000
-      });
-      return;
-    };
-
-    if (that.data.isSubmit) {
-      return;
-    };
-
-    that.setData({
-      isSubmit: true
-    });
-
-    // 停止搜索
-    xBlufi.notifyStartDiscoverBle({
-      'isStart': false,
-    });
-
-    //开始连接
-    let name = devicesList[0].name;
-    // console.log('点击了,蓝牙准备连接的deviceId:' + devicesList[0].deviceId)
-    xBlufi.notifyConnectBle({
-      isStart: true,
-      deviceId: devicesList[0].deviceId,
-      name
-    });
-    wx.showLoading({
-      title: '请稍后',
-    });
-  },
-
-  getBluetoothStatus() {
-    app.getBluetoothStatus();
-  },
-
-  notRoter() {
-    wx.navigateBack({
-      delta: 1
-    });
-  },
-
-  onUnload: function () {
-    var that = this;
-    xBlufi.listenDeviceMsgEvent(false, that.funListenDeviceMsgEvent);
-  },
-})

+ 0 - 5
pages/pageB/deviceConnect2/deviceConnect2.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 16
pages/pageB/deviceConnect2/deviceConnect2.wxml

@@ -1,16 +0,0 @@
-<view class="deviceRoter deviceRoter0">
-  <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="roterps">
-    <view class="devicePic">
-      <image mode="widthFix" src="{{imageUrl}}"></image>
-    </view>
-    <text>短按设备背面“配对”键,
-      当听见语音提示“进入WiFi配对模式”时,即可进入下一步</text>
-  </view>
-  <view class="subBtn">
-    <view class="btn" style="opacity: {{islanya ? '1' : '0.6'}};" bindtap="Connect">
-      {{'下一步'}}
-    </view>
-  </view>
-</view>

+ 0 - 1
pages/pageB/deviceConnect2/deviceConnect2.wxss

@@ -1 +0,0 @@
-/* pages/deviceRoter2/deviceRoter2.wxss */

+ 0 - 226
pages/pageB/deviceConnect3/deviceConnect3.js

@@ -1,226 +0,0 @@
-const app = getApp();
-let xBlufi = require("../../../utils/blufi/xBlufi.js");
-import strings from '../../../utils/strings.js';
-import route_util from '../../../utils/route_util.js';
-import route_constant from '../../../utils/route_constant.js'
-let percentIn = null;
-let errTi = null;
-
-Page({
-  data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '连接配网', //导航栏 中间的标题
-    },
-    scopeBluetooth: app.globalData.scopeBluetooth,
-    ssid: app.globalData.ssid,
-    password: app.globalData.pwdData,
-    version: '2.0',
-    name: '',
-    connectedDeviceId: '',
-    connected: true,
-    deviceInfo: null,
-    isInitOK: false,
-    customData: '',
-    percent: 0,
-    ruterStatus: 0, // 0 连接中 // 1 成功 // 2失败
-    imageUrl: "./../../img/g.png",
-  },
-
-  onLoad: function (options) {
-    var that = this;
-    var param = options.param;
-    console.log("ddddd==aaa==" + JSON.stringify(param));
-    if (!strings.isEmpty(param)) {
-      param = JSON.parse(param);
-      that.setData({
-        imageUrl: param.img,
-      });
-    }
-
-    that.setData({
-      name: options.name,
-      connectedDeviceId: options.deviceId,
-    })
-
-    xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent);
-    ///通知初始化获取设备的服务列表等信息
-    xBlufi.notifyInitBleEsp32({
-      deviceId: options.deviceId,
-    });
-
-    percentIn = setInterval(() => {
-      if (that.data.percent === 100) {
-        clearInterval(percentIn);
-        ///失败
-        that.setData({
-          ruterStatus: 2
-        });
-        return;
-      };
-      that.data.percent++;
-      that.setData({
-        percent: that.data.percent
-      });
-    }, 600);
-  },
-
-  // {"type":"2","result":true,"data":{"deviceId":"7C:DF:A1:FD:3A:F2","serviceId":"0000FFFF-0000-1000-8000-00805F9B34FB","characteristicId":"0000FF01-0000-1000-8000-00805F9B34FB"}}
-  // {"type":"4","result":false,"data":{"progress":0,"ssid":""}}
-  // {"type":"4","result":true,"data":{"progress":100,"ssid":"muzen\u0000"}}
-  funListenDeviceMsgEvent: function (options) {
-    var that = this;
-    console.log("ddddd==00==" + options.type);
-    console.log("ddddd==11==" + JSON.stringify(options));
-    switch (options.type) {
-      // {"type":"2","result":true,"data":{"deviceId":"7C:DF:A1:FD:3A:F2","serviceId":"0000FFFF-0000-1000-8000-00805F9B34FB",
-      // "characteristicId":"0000FF01-0000-1000-8000-00805F9B34FB"}}
-      // 2
-      case xBlufi.XBLUFI_TYPE.TYPE_INIT_ESP32_RESULT:
-        if (options.result) {
-          console.log('初始化成功');
-          that.OnClickStart();
-        } else {
-          console.log('初始化失败')
-          that.setData({
-            connected: false
-          })
-          that.setData({
-            ruterStatus: 2
-          });
-        }
-        break;
-
-        // {"type":"4","result":false,"data":{"progress":0,"ssid":""}}
-        // {"type":"4","result":true,"data":{"progress":100,"ssid":"muzen\u0000"}}
-        ///连接结果
-        // 4
-      case xBlufi.XBLUFI_TYPE.TYPE_CONNECT_ROUTER_RESULT:
-        if (!options.result) {
-          errTi = setTimeout(() => {
-            that.setData({
-              ruterStatus: 2
-            });
-            clearTimeout(errTi);
-            clearInterval(percentIn);
-          }, 5000);
-        } else {
-          // 配网成功
-          if (options.data.progress == 100) {
-            var deviceId = that.data.name;
-            var device = {
-              connectType: 3,
-              devName: "",
-              state: "online",
-              name: deviceId,
-              deviceId: deviceId,
-              mac: deviceId,
-              imageUrl: that.data.imageUrl,
-              // imageUrl: "../../../img/min.png",
-            }
-            getCurrentPages()[0].addWifiDevice(device);
-            // [{"deviceId":"BLUFI_7cdfa1fcbb24","name":"BLUFI_7cdfa1fcbb24","state":"online"}]
-            // 记住密码
-            wx.setStorage({
-              key: "wifiInfo",
-              data: JSON.stringify({
-                "password": app.globalData.pwdData,
-                "ssid": app.globalData.ssid
-              }),
-            });
-
-            setTimeout(() => {
-              clearTimeout(errTi);
-              clearInterval(percentIn);
-              that.setData({
-                percent: 100,
-                ruterStatus: 1,
-              });
-            }, 500);
-          }
-        }
-        break;
-
-        ///设备连接状态回调
-        // -2
-      case xBlufi.XBLUFI_TYPE.TYPE_STATUS_CONNECTED:
-        that.setData({
-          connected: options.result
-        });
-        if (!options.result) {
-          wx.showModal({
-            title: '很抱歉提醒你!',
-            content: '小程序与设备异常断开',
-            showCancel: false, //是否显示取消按钮
-            success: function (res) {
-              wx.navigateBack({
-                delta: 1
-              });
-            },
-          });
-        }
-        break;
-    }
-  },
-
-  ///校验wifi账号密码
-  OnClickStart: function () {
-    if (!app.globalData.ssid) {
-      wx.showToast({
-        title: 'SSID不能为空',
-        icon: 'none'
-      })
-      return
-    }
-
-    if (!app.globalData.pwdData) {
-      wx.showToast({
-        title: '密码不能为空',
-        icon: 'none'
-      })
-      return;
-    }
-
-    xBlufi.notifySendRouterSsidAndPassword({
-      ssid: app.globalData.ssid,
-      password: app.globalData.pwdData
-    });
-  },
-
-  bindPasswordInput: function (e) {
-    var that = this;
-    that.setData({
-      password: e.detail.value
-    })
-  },
-
-  bindCustomDataInput: function (e) {
-    var that = this;
-    that.setData({
-      customData: e.detail.value
-    })
-  },
-  egen() {
-    wx.navigateBack({
-      delta: 1
-    })
-  },
-
-  goIndex() {
-    route_util.goBackRoute(route_constant.indexRoot);
-  },
-
-  onUnload: function () {
-    // 关闭蓝牙连接
-    var that = this
-    xBlufi.notifyConnectBle({
-      isStart: false,
-      deviceId: that.data.connectedDeviceId,
-      name: that.data.name,
-    });
-
-    xBlufi.listenDeviceMsgEvent(false, that.funListenDeviceMsgEvent);
-    clearTimeout(errTi);
-    clearInterval(percentIn);
-  },
-})

+ 0 - 5
pages/pageB/deviceConnect3/deviceConnect3.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 34
pages/pageB/deviceConnect3/deviceConnect3.wxml

@@ -1,34 +0,0 @@
-<view class="deviceRoter deviceRoter3">
-  <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="roterps">
-    <view class="devicePic">
-      <image mode="widthFix" src="{{imageUrl}}"></image>
-    </view>
-    <view class="lodRuter" wx:if="{{ruterStatus === 0}}">
-      <text>正在连接中,请保持设备开机状态…</text>
-      <progress color="#6547A3" percent="{{percent}}" show-info stroke-width="3" />
-    </view>
-    <view class="suRuter" wx:elif="{{ruterStatus === 1}}">
-      <image style="height:48rpx; width:48rpx;" mode="aspectFit" src="../../../img/h.png"></image>
-      <text>连接成功</text>
-    </view>
-    <view class="suRuter" wx:elif="{{ruterStatus === 2}}">
-      <image style="height:48rpx; width:48rpx;" mode="aspectFit" src="../../../img/i.png"></image>
-      <text>连接失败</text>
-    </view>
-    <view class="errorPs" wx:if="{{ruterStatus === 2}}">
-      <text>请尝试:</text>
-      <view>· 部分设备配网需开启GPS定位。</view>
-      <view>· 尝试重启手机蓝牙,如蓝牙已连接其他设备,请先断开。</view>
-      <view>
-        · 连接设备WiFi可能为5GHz WiFi,设备无法连接,请切换至
-        <text style="color: #6547A3">2.4GHz WiFi</text>
-      </view>
-    </view>
-  </view>
-  <view class="subBtn">
-    <view wx:if="{{ruterStatus === 0}}" class="btn" style="opacity: 0.6">连接中...</view>
-    <view wx:elif="{{ruterStatus === 1}}" class="btn" bindtap="goIndex">完成</view>
-    <view wx:else style="background-color: #353535;" class="btn" bindtap="egen">重新连接</view>
-  </view>
-</view>

+ 0 - 37
pages/pageB/deviceConnect3/deviceConnect3.wxss

@@ -1,37 +0,0 @@
-
-.lodRuter{
-  margin-top: 54rpx;
-}
-.lodRuter text{
-  text-align: center;
-  width: 100%;
-  display: block;
-  margin-bottom: 34rpx;
-}
-.suRuter{
-  margin-top: 54rpx;
-  display: flex;
-  justify-content: center;
-}
-.suRuter image{
-  width: 48rpx;
-}
-.suRuter text{
-  color: #353535;
-  font-size: 36rpx;
-  margin-left: 20rpx;
-}
-.errorPs{
-  margin-top: 150rpx;
-}
-.errorPs >text{
-  color: #353535;
-  font-size: 28rpx;
-  font-weight: bold;
-  line-height: 40rpx;
-}
-.errorPs >view{
-  color: #353535;
-  font-size: 28rpx;
-  line-height: 40rpx;
-}

+ 0 - 84
pages/pageC/aboutInfo/aboutInfo.js

@@ -1,84 +0,0 @@
-
-const { protocol, privacy } = require('./text.js');
-const app = getApp();
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    navBarHeight: app.globalData.navBarHeight,
-    MenuButtonTop: app.globalData.MenuButtonTop,
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '关于我们', //导航栏 中间的标题
-    },
-    data: [],
-    text: {
-      0: protocol,
-      1: privacy
-    },
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-    this.setData({
-      data: this.data.text[options.type].info,
-      nvabarData: {
-        showCapsule: 1,
-        title: this.data.text[options.type].title
-      }
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
-})

+ 0 - 5
pages/pageC/aboutInfo/aboutInfo.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 10
pages/pageC/aboutInfo/aboutInfo.wxml

@@ -1,10 +0,0 @@
-
-<view class="aboutInfo">
-  <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="content" style="height: calc(100vh - {{navBarHeight}}px - 62rpx);">
-    <view class="time">本版更新时间:2022年10月31日</view>
-    <view class="time">本版生效时间:2022年10月31日</view>
-    <text wx:for="{{data}}" class="{{item.fontWeight ? 'fontWeight' : ''}}">{{item.text}}</text>
-  </view>
-</view>

+ 0 - 27
pages/pageC/aboutInfo/aboutInfo.wxss

@@ -1,27 +0,0 @@
-
-.aboutInfo{
-  background-color: #fffaf3;
-}
-.content{
-  display: flex;
-  flex-direction: column;
-  padding: 30rpx;
-  overflow: auto;
-}
-.aboutInfo .content .time{
-  text-align: center;
-}
-.aboutInfo .content text{
-  text-align: justify;
-}
-.aboutInfo .content .time, .aboutInfo .content text{
-  line-height: 44rpx;
-  font-size: 30rpx;
-  margin: 0 0 30rpx;
-  font-weight: 400;
-  color: #000;
-}
-.aboutInfo .content .fontWeight{
-  font-weight: 700;
-  font-size: 36rpx;
-}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 887
pages/pageC/aboutInfo/text.js


+ 0 - 45
pages/pageC/channelDetail/channelDetail.js

@@ -1,45 +0,0 @@
-
-const {
-  pageByDevice
-} = require('../../../utils/api.js');
-const app = getApp();
-Page({
-
-  data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '', //导航栏 中间的标题
-    },
-    navBarHeight: app.globalData.navBarHeight,
-    MenuButtonTop: app.globalData.MenuButtonTop,
-    thisChannel: {},
-    pageIndex: 1,
-    channelList: [],
-  },
-
-  onLoad() {
-    var that = this;
-    wx.getStorage({
-      key: "channelDeta",
-      success(r) {
-        that.setData({
-          thisChannel: r.data
-        });
-
-        pageByDevice({
-          channelId: r.data.channelId,
-          pageNum: 1,
-          pageSize: 300
-        }).then((res) => {
-          that.setData({
-            channelList: res.records
-          })
-          wx.removeStorage({
-            key: 'channelDeta',
-          })
-        })
-      }
-    })
-  },
-
-})

+ 0 - 5
pages/pageC/channelDetail/channelDetail.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 26
pages/pageC/channelDetail/channelDetail.wxml

@@ -1,26 +0,0 @@
-<view class="channelDetail">
-  <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="content">
-    <view class="headInfo">
-      <view class="channelInfo">
-        <view class="pic">
-          <image src="{{thisChannel.channelPic}}"></image>
-        </view>
-        <view class="textInfo">
-          <text>FM.{{thisChannel.channelNum !== null ? (thisChannel.channelNum < 10 ? "0" + (thisChannel.channelNum) : thisChannel.channelNum) : 00}}</text>
-              <text>{{thisChannel.channelName}}</text>
-        </view>
-      </view>
-      <!-- <image class="bgPic_1" src="../../../img/pd1.png" mode="heightFix"></image> -->
-      <image class="bgPic_3" src="../../../img/pd3.png" mode="widthFix"></image>
-      <image class="bgPic_2" src="../../../img/pd2.png" mode="heightFix"></image>
-    </view>
-    <view class="list" style="height: calc(100vh - {{navBarHeight}}px - 260rpx);">
-      <view class="info" wx:for="{{channelList}}">
-        <image src="{{item.audioPic}}" mode="scaleToFill"></image>
-        <text>{{item.audioName}}</text>
-      </view>
-    </view>
-  </view>
-</view>

+ 0 - 91
pages/pageC/channelDetail/channelDetail.wxss

@@ -1,91 +0,0 @@
-
-.headInfo{
-  width: 100vw;
-  height: 260rpx;
-  background: rgba(0, 1, 3, 0.8);
-  filter: blur(0px);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  position: relative;
-}
-.headInfo .channelInfo{
-  width: calc(100vw - 64rpx);
-  height: 160rpx;
-  display: flex;
-  align-items: center;
-}
-.headInfo .channelInfo .pic{
-  width: 160rpx;
-  height: 160rpx;
-  margin-right: 20rpx;
-}
-.headInfo .channelInfo .pic image{
-  width: 160rpx;
-  height: 160rpx;
-  border-radius: 18rpx;
-}
-.headInfo .channelInfo .textInfo{
-  height: 160rpx;
-  display: flex;
-  justify-content: center;
-  flex-direction: column;
-}
-.headInfo .channelInfo .textInfo text:first-child{
-  font-size: 48rpx;
-  font-weight: 600;
-  color: #FFFFFF;
-  line-height: 66rrpx;
-}
-.headInfo .channelInfo .textInfo text:last-child{
-  font-size: 30rpx;
-  font-weight: 500;
-  color: #FFFFFF;
-  line-height: 38rpx;
-  text-shadow: 0px 4rpx 8rpx rgba(0,0,0,0.5);
-  opacity: 0.8;
-}
-.headInfo>image{
-  position: absolute;
-}
-.headInfo .bgPic_1{
-  height: 48rpx;
-  top: 30rpx;
-  right: 30rpx;
-}
-.headInfo .bgPic_2{
-  height: 172rpx;
-  bottom: -6rpx;
-  left: 94rpx;
-}
-.headInfo .bgPic_3{
-  width: 100vw;
-  bottom: 0rpx;
-  left:0rpx;
-}
-.list{
-  padding: 0 6rpx;
-  overflow: auto;
-}
-.list .info{
-  margin: 40rpx 26rpx 0;
-  width: 192rpx;
-  float: left;
-}
-.list .info image{
-  height: 192rpx;
-  width: 192rpx;
-  border-radius: 18rpx;
-}
-.list .info text{
-  width: 192rpx;
-  height: 76rpx;
-  font-size: 30rpx;
-  font-weight: 400;
-  color: #353535;
-  line-height: 38rpx;
-  display:-webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp:2;
-  overflow:hidden;
-}

+ 0 - 155
pages/pageC/deviceDetail/deviceDetail.js

@@ -1,155 +0,0 @@
-const {
-  BtHelper
-} = require('../../../devices/bt_helper');
-const {
-  deviceVersion
-} = require('../../../request/deviceListRequest')
-import {
-  EnumCmdEvent,
-  CmdEvent
-} from '../../../devices/cmd_key_event';
-import EventManager from '../../../utils/event_bus'
-import route_constant from '../../../utils/route_constant';
-import route_util from '../../../utils/route_util';
-
-Page({
-  data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '设备详情', //导航栏 中间的标题
-    },
-    // 页面数据
-    device: {},
-    btHelper: null,
-    updateData: {},
-    powerOpen: false,
-    isShowWallpaper: false,
-  },
-
-  onLoad: function (options) {
-    // let device = JSON.parse(options.param);
-    console.log(getApp().globalData.mDeviceList.length)
-    let device = JSON.parse(options.param);
-    // let device = getApp().globalData.mDeviceList[0] ?? JSON.parse(options.param);
-    if (device.connectType != '1') {
-      return
-    }
-    device.clientType = device.clientType ?? device.ProdModel
-
-    console.log("设备详情", device)
-    let isConnect = device.state === 'online'
-    if (!isConnect) {
-      // btHelper
-      wx.showToast({
-        title: '设备已经失去连接',
-      })
-      return;
-    }
-    this.setData({
-      device: device,
-      powerOpen: (device.pauseSleep ?? -1) > 0,
-      isShowWallpaper: device.clientType === 'MW-S2'
-    })
-
-    const btHelper = BtHelper.getInstance();
-    let isShowOta = device.clientType === 'MW-S2'
-    if (isShowOta) {
-      btHelper.getVersion()
-      // this.checkOtaVersion(device);
-    }
-    // btHelper.getPauseSleep()
-
-    let _this = this;
-    EventManager.addNotification(CmdEvent.eventName, function (event) {
-      let name = event.cmdEvent;
-      // console.log("详情页:", name, event)
-      switch (name) {
-        case EnumCmdEvent.version:
-          _this.data.device.version = event.version;
-          console.log("详情页1:", event.version)
-
-          _this.checkOtaVersion(_this.data.device);
-          break;
-        case EnumCmdEvent.authSleepStatus:
-          let value = event.pauseSleep;
-          console.log("详情页2:", value)
-          _this.setData({
-            powerOpen: (value ?? -1) > 0
-          })
-          break;
-        case EnumCmdEvent.onoffline:
-          console.log("详情页3:")
-          //目前只有下线
-          _this.data.device.state = "offline"
-          break;
-      }
-    }, this);
-  },
-
-  checkOtaVersion(device) {
-    let _this = this;
-    device.clientType = "MW-S2"
-    deviceVersion(device.clientType, device.connectType, device.version ?? "1.0.0").then(res => {
-      console.log("OTA2:", res);
-      let updateData = res ?? {};
-
-      let hasNewVersion = updateData.isEnforcement === 1 || updateData.isEnforcement === 2;
-      updateData.hasNewVersion = hasNewVersion;
-      _this.setData({
-        updateData: updateData
-      });
-    })
-  },
-
-  goToWallpaper: function () {
-    var param = '?param=' + JSON.stringify(this.data.device);
-    route_util.jumpParam(route_constant.wallpaper, param);
-  },
-
-  goToOta: function () {
-    if (this.data.updateData.hasNewVersion != 1) {
-      wx.showToast({
-        title: '当前已是最新版本',
-        icon: 'none'
-      })
-      return
-    }
-    let p = {
-      "device": this.data.device,
-      "otaData": this.data.updateData,
-    }
-    var param = '?param=' + JSON.stringify(p);
-    route_util.jumpParam(route_constant.ota, param);
-  },
-  powerTap(e) {
-    console.log(e)
-    let btHelper = BtHelper.getInstance();
-    btHelper.setPauseSleep(!this.data.powerOpen ? 1200 : 0)
-    this.setData({
-      powerOpen: !this.data.powerOpen
-    })
-  },
-  questionTap() {
-    wx.showModal({
-      title: '省电模式',
-      content: '开启省电模式,设备无蓝牙连接或内容播放20分钟后进入自动休眠,任意按键可唤醒。',
-      showCancel: false,
-      complete: (res) => {
-        if (res.cancel) {
-
-        }
-
-        if (res.confirm) {
-          // setSleepAfterPlayPause
-          const btHelper = BtHelper.getInstance();
-          btHelper.setPauseSleep(1200)
-        }
-      }
-    })
-  },
-
-  onUnload() {
-    EventManager.removeNotification(CmdEvent.eventName, this)
-  },
-
-})

+ 0 - 5
pages/pageC/deviceDetail/deviceDetail.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 29
pages/pageC/deviceDetail/deviceDetail.wxml

@@ -1,29 +0,0 @@
-
-<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>
-    <view class="img_section">
-        <image src="{{device.imageUrl}}" class="avatar"></image>
-        <!-- <image src="https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20220909100711728016597.png" class="avatar"></image> -->
-    </view>
-    <view class="section">
-        <view wx:if="{{isShowWallpaper}}" class="item" bindtap="goToWallpaper">
-            <text class="label">壁纸设置</text>
-            <!-- <text class="arrow">></text> -->
-            <image class="arrow" src="../../images/common/icon_arrow.png"></image>
-        </view>
-        <!-- <view class="item">
-            <view class="left-content">
-                <text class="label">省电模式</text>
-                <image class="question" bind:tap="questionTap" src="../../images/common/icon_question.png"></image>
-            </view>
-            <switch class="switch" color="#6546A3" checked="{{powerOpen}}" bindchange="powerTap" />
-        </view> -->
-        <view class="item" bindtap="goToOta">
-            <view class="left-content">
-                <text class="label">固件信息</text>
-                <view wx:if="{{updateData.hasNewVersion}}" class="red"></view>
-            </view>
-            <image class="arrow" src="../../images/common/icon_arrow.png"></image>
-        </view>
-    </view>
-</view>

+ 0 - 71
pages/pageC/deviceDetail/deviceDetail.wxss

@@ -1,71 +0,0 @@
-.img_section {
-  width: 100%;
-  height: 648rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.avatar {
-  width: 470rpx;
-  height: 432rpx;
-  background: #F2F5F7;
-  border-radius: 24rpx;
-}
-
-.section {
-  margin-bottom: 20px;
-}
-
-.title {
-  font-size: 16px;
-  font-weight: bold;
-  margin-bottom: 10px;
-}
-
-.item {
-  display: flex;
-  align-items: center;
-  border-bottom: 1px solid #e0e0e0;
-  justify-content: space-between;
-  margin-inline: 32rpx;
-  height: 120rpx;
-}
-
-.left-content {
-  display: flex;
-  align-items: center;
-}
-
-.label {
-  font-size: 16px;
-  color: #333333;
-  margin-left: 32rpx;
-}
-
-.arrow {
-  width: 20px;
-  height: 20px;
-  margin-right: 16rpx;
-}
-
-.switch {
-  width: 88rpx;
-  height: 44rpx;
-  margin-right: 16rpx;
-}
-
-.red {
-  width: 10rpx;
-  height: 10rpx;
-  margin-top: -14rpx;
-  background-color: #6546A3;
-  border-radius: 50%;
-  margin-left: 12rpx;
-}
-
-.question {
-  margin-left: 8rpx;
-  width: 40rpx;
-  height: 40rpx;
-}

+ 0 - 551
pages/pageC/deviceWake/deviceWake.js

@@ -1,551 +0,0 @@
-const app = getApp();
-const {
-  formatNumber
-} = require('../../../utils/util.js');
-const {
-  deviceWakedetail
-} = require('../../../utils/api.js');
-
-import lexin_util from '../../../utils/lexin/util.js';
-import route_constant from '../../../utils/route_constant.js';
-import route_util from '../../../utils/route_util.js';
-
-Page({
-  data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '定时设置', //导航栏 中间的标题
-    },
-    switch1Checked: false,
-    alarm_id_0_time: "00:00:00",
-    switch2Checked: false,
-    deviceMac: null,
-    alarm_id_0: {}, // 休眠
-    alarm_id_1: {}, // 唤醒
-    timeindex: 1,
-    timeArray: [{
-        id: 600,
-        name: '10分钟'
-      },
-      {
-        id: 1800,
-        name: '30分钟'
-      },
-      {
-        id: 3600,
-        name: '60分钟'
-      },
-      {
-        id: 5400,
-        name: '90分钟'
-      }
-    ],
-    clientType: "",
-    time0: '00:00:00',
-    time: '07:00:00',
-    repeat: "",
-    repeat0: "",
-    week: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
-    week_actives: [],
-    isOne: true,
-    wakeName: "",
-    toastData: {
-      titlePicUrl: "./../../../img/gt.png",
-      titlePicUrlWidth: 140,
-      title: ["温馨提醒"],
-      info: ["当前设备电量低"],
-      isShowTwoBut: true,
-      twoButText: "好的",
-      footTop: 10,
-    },
-    twoButCallback: () => {},
-    toast_visible: false,
-    // 后续新加需求
-    deviceOther: null,
-    updataDeviceInfo: false,
-    repeatIndex: 0,
-    deviceId: "",
-  },
-
-  onLoad(options) {
-    var that = this;
-
-    var deviceId = options.deviceId;
-    var clientType = options.clientType;
-    var deviceMac = lexin_util.getDeviceMacId(deviceId);
-
-    that.data.deviceId = deviceId;
-    that.data.deviceMac = deviceMac;
-    that.data.clientType = clientType;
-
-    deviceWakedetail({
-      clientType: clientType,
-      deviceMac: deviceMac,
-    }).then((res) => {
-      if (res && res.length > 0) {
-        that.setData({
-          wakeName: res[0].audioName || null
-        });
-      }
-    })
-    app.PubMsg({
-      type: "get_dev_info",
-      DstDeviceName: deviceMac
-    });
-
-    // 赋值按钮回调
-    that.setData({
-      twoButCallback: () => {
-        that.setData({
-          toast_visible: false
-        })
-      }
-    })
-  },
-
-  onShow(options) {
-    var that = this;
-    var deviceMac = that.data.deviceMac;
-    app.PubMsg({
-      type: "get_dev_info",
-      DstDeviceName: deviceMac,
-    });
-  },
-
-  mqttCallback(type, option) {
-    var that = this;
-    let payloads = null;
-    if (option) {
-      payloads = JSON.parse(option.payload);
-    };
-
-    switch (type) {
-      case "message_onoffline":
-        if (payloads.state !== "online") {
-          // option.payload: {"uuid":"AIrSMArT_7cdfa1fcbb24","state":"offline","userid":"1"}
-          var deviceMacId = payloads.uuid;
-          if (deviceMacId == that.data.deviceMac) {
-            wx.showToast({
-              title: '设备已断开连接',
-              icon: 'none',
-              duration: 2000
-            });
-          }
-        }
-        break;
-      case "message":
-        // 设备信息
-        if (payloads.type === "get_dev_info") {
-          that.setData({
-            deviceOther: payloads.other,
-            updataDeviceInfo: true,
-          });
-          if (payloads.other.alarm) {
-            payloads.other.alarm.map((v) => {
-              if (v.alarm_id === "0") {
-                v.action = "update";
-                // 休眠
-                that.setData({
-                  alarm_id_0: v
-                });
-
-                // 定时时间
-                if (v.on_off_timestamp !== "") {
-                  that.setData({
-                    alarm_id_0_time: v.on_off_timestamp
-                  })
-                }
-
-                // 是否启用
-                if (v.enable === "1") {
-                  that.setData({
-                    switch1Checked: true
-                  })
-                } else {
-                  that.setData({
-                    switch1Checked: false
-                  })
-                }
-
-                // 重复
-                if (v.week_actives) {
-                  that.setData({
-                    repeat0: that.repeatText(v.week_actives),
-                  })
-                }
-
-              } else if (v.alarm_id === "1") {
-                // 唤醒
-                that.setData({
-                  alarm_id_1: v
-                });
-                // 定时时间
-                if (v.on_off_timestamp !== "") {
-                  that.setData({
-                    time: v.on_off_timestamp
-                  })
-                }
-                // 是否启用
-                if (v.enable === "1") {
-                  that.setData({
-                    switch2Checked: true
-                  })
-                } else {
-                  that.setData({
-                    switch2Checked: false
-                  })
-                }
-                // 重复
-                if (v.week_actives) {
-                  that.setData({
-                    repeat: that.repeatText(v.week_actives),
-                  })
-                }
-              }
-            })
-          }
-        } else if (payloads.type === "alert_set") {
-          if (payloads.code === 200) {
-            app.PubMsg({
-              type: "get_dev_info",
-              DstDeviceName: that.data.deviceMac
-            });
-          } else {
-            wx.showModal({
-              title: '保存失败',
-              content: '请保持设备网络通畅并检查是否已连接电源?',
-              success(res) {
-                if (res.confirm) {
-                  console.log('用户点击确定')
-                } else if (res.cancel) {
-                  console.log('用户点击取消')
-                }
-              }
-            })
-          }
-        }
-        default:
-    }
-  },
-
-  // 休眠-选择时间
-  switch1Change(e) {
-    var that = this;
-    let other = that.data.alarm_id_0;
-    if (e.detail.value) {
-      that.setData({
-        switch1Checked: e.detail.value
-      });
-      const thisTime = Math.round(new Date() / 1000);
-      other = that.setOther(other, 1);
-      other.on_off_timestamp = that.data.alarm_id_0_time;
-
-      // 有重复
-      if (other.week_actives && other.week_actives.filter((v) => v === 1).length > 0) {
-        // other.week_actives = [0,1,1,1,1,1,0],
-        other.weekly_repeat = "1";
-      } else {
-        other.weekly_repeat = "0";
-      };
-      // 如果跨天了
-      if (!that.compareDate(that.data.alarm_id_0_time, that.formatTime(thisTime, "h:m:s"))) {
-        const date = new Date((that.formatTime(thisTime, "Y-M-D") + " 00:00:00").replace(/-/g, '/'));
-        other.current_timestamp = that.formatTime(date.getTime() / 1000 + 86400, "Y-M-D h:m:s");
-      };
-      app.PubMsg({
-        type: "alert_set",
-        DstDeviceName: that.data.deviceMac,
-        other
-      });
-    } else {
-      that.setData({
-        switch1Checked: e.detail.value
-      });
-      other = that.setOther(other, 0);
-      app.PubMsg({
-        type: "alert_set",
-        DstDeviceName: that.data.deviceMac,
-        other
-      });
-    }
-  },
-
-  switch2Change(e) {
-    var that = this;
-    that.data.updataDeviceInfo = false;
-    let other = that.data.alarm_id_1;
-    if (e.detail.value) {
-      if (that.data.deviceOther && that.data.deviceOther.Power < 20) {
-        that.setData({
-          toast_visible: true,
-        });
-      };
-      // app.PubMsg({
-      //   type: "get_dev_info",
-      //   DstDeviceName: that.data.deviceMac
-      // });
-      if (!other) {
-        wx.showToast({
-          title: '设备已断开连接',
-          icon: "none"
-        })
-        return
-      }
-      other.on_off_timestamp = that.data.time;
-      other = that.setOther(other, 1);
-      let week_actives = other.week_actives ?? []
-      if (week_actives.filter((v) => v === 1).length > 0) {
-        // other.week_actives = [0,1,1,1,1,1,0],
-        other.weekly_repeat = "1";
-      } else {
-        other.weekly_repeat = "0";
-      };
-
-      app.PubMsg({
-        type: "alert_set",
-        DstDeviceName: that.data.deviceMac,
-        other
-      });
-
-      // 不要循环发送,也不要改alarm_id_0.enable
-      // 循环查询
-      // const Interval = setInterval(() => {
-      //   if (that.data.updataDeviceInfo) {
-      //     clearInterval(Interval);
-      // other.on_off_timestamp = that.data.time;
-      // other = that.setOther(other, 1);
-      // if (other.week_actives.filter((v) => v === 1).length > 0) {
-      //   // other.week_actives = [0,1,1,1,1,1,0],
-      //   other.weekly_repeat = "1";
-      // } else {
-      //   other.weekly_repeat = "0";
-      // };
-      // app.PubMsg({
-      //   type: "alert_set",
-      //   DstDeviceName: that.data.deviceMac,
-      //   other
-      // });
-      // 需打开休眠
-      // if (that.data.alarm_id_0.enable === "0") {
-
-      //   const thisTime = Math.round(new Date() / 1000);
-      //   const alarm_id_0 = that.setOther(that.data.alarm_id_0, 1);
-      //   alarm_id_0.on_off_timestamp = that.data.alarm_id_0_time;
-
-      //   // 有重复
-      //   if (alarm_id_0.week_actives.filter((v) => v === 1).length > 0) {
-      //     alarm_id_0.weekly_repeat = "1";
-      //   } else {
-      //     alarm_id_0.weekly_repeat = "0";
-      //   };;
-      //   // 如果跨天了
-      //   if (!that.compareDate(that.data.alarm_id_0_time, that.formatTime(thisTime, "h:m:s"))) {
-      //     const date = new Date((that.formatTime(thisTime, "Y-M-D") + " 00:00:00").replace(/-/g, '/'));
-      //     alarm_id_0.current_timestamp = that.formatTime(date.getTime() / 1000 + 86400, "Y-M-D h:m:s");
-      //   };
-      //   app.PubMsg({
-      //     type: "alert_set",
-      //     DstDeviceName: that.data.deviceMac,
-      //     other: alarm_id_0
-      //   });
-      // }
-      //   }
-      // }, 500);
-    } else {
-      other = that.setOther(other, 0);
-      app.PubMsg({
-        type: "alert_set",
-        DstDeviceName: that.data.deviceMac,
-        other
-      });
-    }
-  },
-
-  // bindPickerChange(e) {
-  // var that = this;
-  //   let other = that.data.alarm_id_0;
-  //   const thisTime = Math.round(new Date() / 1000);
-  //   other = that.setOther(other, 1);
-  //   other.on_off_timestamp = that.formatTime(thisTime + that.data.timeArray[e.detail.value].id, "h:m:s");
-  //   // 如果跨天了
-  //   if(parseInt(that.formatTime(thisTime + that.data.timeArray[e.detail.value].id, "D")) > parseInt(that.formatTime(thisTime, "D"))) {
-  //     const date = new Date(that.formatTime(thisTime, "Y-M-D") + " 00:00:00");
-  //     other.current_timestamp = that.formatTime(date.getTime() / 1000 + 86400, "Y-M-D h:m:s");
-  //   };
-  //   app.PubMsg({type: "alert_set", DstDeviceName: that.data.deviceMac, other});
-  // },
-
-  bindTimeChange0: function (e) {
-    var that = this;
-    that.setData({
-      alarm_id_0_time: e.detail.value + ":00"
-    });
-    let other = that.data.alarm_id_0;
-    other.on_off_timestamp = e.detail.value + ":00";
-    other = that.setOther(other, 1);
-    // 有重复
-    if (other.week_actives.filter((v) => v === 1).length > 0) {
-      // other.week_actives = [0,1,1,1,1,1,0],
-      other.weekly_repeat = "1";
-    } else {
-      other.weekly_repeat = "0";
-    };
-    // 如果跨天了
-    const thisTime = Math.round(new Date() / 1000);
-    if (!that.compareDate(that.data.alarm_id_0_time, that.formatTime(thisTime, "h:m:s"))) {
-      const date = new Date((that.formatTime(thisTime, "Y-M-D") + " 00:00:00").replace(/-/g, '/'));
-      other.current_timestamp = that.formatTime(date.getTime() / 1000 + 86400, "Y-M-D h:m:s");
-    };
-    app.PubMsg({
-      type: "alert_set",
-      DstDeviceName: that.data.deviceMac,
-      other
-    });
-  },
-
-  bindTimeChange: function (e) {
-    var that = this;
-    that.setData({
-      time: e.detail.value + ":00"
-    });
-    let other = that.data.alarm_id_1;
-    other.on_off_timestamp = e.detail.value + ":00";
-    other = that.setOther(other, 1);
-    app.PubMsg({
-      type: "alert_set",
-      DstDeviceName: that.data.deviceMac,
-      other
-    });
-  },
-
-  setRepeat(arr) {
-    var that = this;
-    let other = that.data.repeatIndex === "0" ? that.data.alarm_id_0 : that.data.alarm_id_1;
-    other = that.setOther(other, 1);
-    other.week_actives = arr;
-    other.weekly_repeat = arr.filter((v) => v === 1).length > 0 ? "1" : "0";
-    // 倒计时
-    if (that.data.repeatIndex === "0") {
-      // 如果跨天了
-      const thisTime = Math.round(new Date() / 1000);
-      if (!that.compareDate(that.data.alarm_id_0_time, that.formatTime(thisTime, "h:m:s"))) {
-        const date = new Date((that.formatTime(thisTime, "Y-M-D") + " 00:00:00").replace(/-/g, '/'));
-        other.current_timestamp = that.formatTime(date.getTime() / 1000 + 86400, "Y-M-D h:m:s");
-      };
-    }
-    app.PubMsg({
-      type: "alert_set",
-      DstDeviceName: that.data.deviceMac,
-      other
-    });
-  },
-
-  goWakeList() {
-    var that = this;
-    var clientType = that.data.clientType;
-    ///唤醒的设置特殊,智能这样用
-    var deviceMac = that.data.deviceMac;
-    var param = '?clientType=' + clientType + "&deviceMac=" + deviceMac;
-    route_util.jumpParam(route_constant.wakeList, param);
-  },
-
-  gorepeat(e) {
-    var that = this;
-    that.data.repeatIndex = e.currentTarget.dataset.index;
-    that.data.week_actives = e.currentTarget.dataset.index === "0" ? that.data.alarm_id_0.week_actives : that.data.alarm_id_1.week_actives;
-
-    var param = '?week_actives=' + that.data.week_actives;
-    route_util.jumpParam(route_constant.repeat, param);
-  },
-
-
-  setdeviceWakedetail() {
-    var that = this;
-    deviceWakedetail({
-      clientType: that.data.clientType,
-      deviceMac: that.data.deviceMac,
-    }).then((res) => {
-      that.setData({
-        wakeName: res[0].audioName
-      })
-    })
-  },
-
-  /** 
-   * 时间戳转化为年 月 日 时 分 秒 
-   * number: 传入时间戳 
-   * format:返回格式,支持自定义,但参数必须与formateArr里保持一致 
-   */
-  formatTime(number, format) {
-
-    var formateArr = ['Y', 'M', 'D', 'h', 'm', 's'];
-    var returnArr = [];
-
-    var date = new Date(number * 1000);
-    returnArr.push(date.getFullYear());
-    returnArr.push(formatNumber(date.getMonth() + 1));
-    returnArr.push(formatNumber(date.getDate()));
-
-    returnArr.push(formatNumber(date.getHours()));
-    returnArr.push(formatNumber(date.getMinutes()));
-    returnArr.push(formatNumber(date.getSeconds()));
-
-    for (var i in returnArr) {
-      format = format.replace(formateArr[i], returnArr[i]);
-    }
-    return format;
-  },
-
-  // type: 0 关闭  1 开启
-  setOther(other, type) {
-    var that = this;
-    if (type === 0) {
-      other.enable = "0";
-      other.alarm_name = "close";
-      other.operation = "off";
-    } else if (type === 1) {
-      other.enable = "1";
-      other.alarm_name = "open";
-      other.operation = "on";
-    }
-    const thisTime = Math.round(new Date() / 1000);
-    other.current_timestamp = that.formatTime(thisTime, "Y-M-D h:m:s");
-    other.action = "update",
-      other.song_uri = "-1";
-    other.version = 3;
-    other.is_debug = app.globalData.is_debug
-    return other
-  },
-  // 判断当天时间前后
-  compareDate(t1, t2) {
-    var date = new Date();
-    var a = t1.split(":");
-    var b = t2.split(":");
-    return date.setHours(a[0], a[1]) > date.setHours(b[0], b[1]);
-  },
-
-  repeatText(arr) {
-    var that = this;
-    let text = "";
-    if (arr.toString() === [0, 1, 1, 1, 1, 1, 0].toString()) {
-      text = "工作日";
-    } else if (arr.toString() === [1, 0, 0, 0, 0, 0, 1].toString()) {
-      text = "周末";
-    } else {
-      arr.map((v, index) => {
-        if (v === 1) {
-          if (text === "") {
-            text = text + that.data.week[index]
-          } else {
-            text = text + "、" + that.data.week[index];
-          }
-        }
-      });
-      if (text === "") {
-        text = "不重复";
-      };
-    }
-    return text.length < 20 ? text : "每日";
-  }
-
-})

+ 0 - 6
pages/pageC/deviceWake/deviceWake.json

@@ -1,6 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar",
-    "Toast": "./../../components/toast/toast"
-  }
-}

+ 0 - 78
pages/pageC/deviceWake/deviceWake.wxml

@@ -1,78 +0,0 @@
-<view class="deviceWake">
-  <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="content">
-    <view class="tip">
-      <image src="../../../img/gt.png" mode="heightFix"></image>
-      <text>唤醒功能仅在设备进入休眠后生效,请保持设备网络通畅并且电量充足</text>
-    </view>
-    <view class="waskList">
-      <view class="swicth">
-        <image src="../../../img/wk1.png" mode="heightFix"></image>
-        <text>倒计时休眠</text>
-        <view class="swicth-view">
-          <switch color="#6D00FF" checked="{{switch1Checked}}" bindchange="switch1Change" />
-        </view>
-      </view>
-      <view class="page__bd" style="border: none; opacity: {{switch1Checked ? 1 : 0.4}};">
-        <text>设置休眠时间</text>
-        <view class="choice">
-          <view class="mode" wx:if="{{!switch1Checked}}"></view>
-          <picker mode="time" bindchange="bindTimeChange0" value="{{alarm_id_0_time}}">
-            <view class="picker">
-              <text>{{alarm_id_0_time}}</text>
-            </view>
-          </picker>
-          <image src="../../../img/b.png" mode="heightFix"></image>
-        </view>
-      </view>
-      <view class="page__bd" style="opacity: {{switch1Checked ? 1 : 0.4}};">
-        <text>设置重复</text>
-        <view class="choice">
-          <view class="mode" wx:if="{{!switch1Checked}}"></view>
-          <text data-index="0" bindtap="gorepeat">{{repeat0}}</text>
-          <image src="../../../img/b.png" mode="heightFix"></image>
-        </view>
-      </view>
-    </view>
-    <view class="hr"></view>
-    <view class="waskList">
-      <view class="swicth">
-        <image src="../../../img/wk2.png" mode="heightFix"></image>
-        <text>定时唤醒</text>
-        <view class="swicth-view">
-          <switch color="#6D00FF" checked="{{switch2Checked}}" bindchange="switch2Change" />
-        </view>
-      </view>
-      <view class="page__bd" style="opacity: {{switch2Checked ? 1 : 0.4}};">
-        <text>设置唤醒时间</text>
-        <view class="choice">
-          <view class="mode" wx:if="{{!switch2Checked}}"></view>
-          <picker mode="time" bindchange="bindTimeChange" value="{{time}}">
-            <view class="picker">
-              <text>{{time}}</text>
-            </view>
-          </picker>
-          <image src="../../../img/b.png" mode="heightFix"></image>
-        </view>
-      </view>
-      <view class="page__bd" style="opacity: {{switch2Checked ? 1 : 0.4}};">
-        <text>设置重复</text>
-        <view class="choice">
-          <view class="mode" wx:if="{{!switch2Checked}}"></view>
-          <text data-index="1" bindtap="gorepeat">{{repeat}}</text>
-          <image src="../../../img/b.png" mode="heightFix"></image>
-        </view>
-      </view>
-      <!-- <view class="page__bd" style="opacity: {{switch2Checked ? 1 : 0.4}};">
-        <text>唤醒音</text>
-        <view class="choice">
-          <view class="mode" wx:if="{{!switch2Checked}}"></view>
-          <text bindtap="goWakeList">{{wakeName}}</text>
-          <image src="../../../img/b.png" mode="heightFix"></image>
-        </view>
-      </view> -->
-    </view>
-  </view>
-  <Toast visible="{{toast_visible}}" toast-data='{{toastData}}' twoButCallback="{{twoButCallback}}"></Toast>
-</view>

+ 0 - 103
pages/pageC/deviceWake/deviceWake.wxss

@@ -1,103 +0,0 @@
-
-.content .waskList{
-  padding-left: 32rpx;
-}
-.content .waskList .swicth{
-  border-bottom: 1rpx solid #D8D8D8;
-  padding-top: 44rpx;
-  height: 96rpx;
-  overflow: hidden;
-}
-.content .waskList .swicth image{
-  height: 48rpx;
-  margin: 24rpx 0;
-  float: left;
-}
-.content .waskList .swicth text{
-  font-size: 40rpx;
-  font-weight: 500;
-  color: #353535;
-  line-height: 56rpx;
-  height: 56rpx;
-  float: left;
-  margin: 20rpx 0;
-}
-.content .waskList .swicth .swicth-view{
-  float: right;
-  height: 64rpx;
-  margin: 16rpx 32rpx;
-}
-.content .waskList .page__bd{
-  border-bottom: 1rpx solid #D8D8D8;
-  height: 100rpx;
-  overflow: hidden;
-}
-.content .waskList .page__bd text{
-  height: 100rpx;
-  line-height: 100rpx;
-  font-weight: 400;
-  color: #353535;
-  font-size: 30rpx;
-}
-.content .waskList .page__bd .choice{
-  float: right;
-  height: 100rpx;
-  margin-right: 32rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  position: relative;
-}
-.content .waskList .page__bd .choice .mode{
-  position: absolute;
-  top: 0;
-  width: 100%;
-  height: 100%;
-}
-.content .waskList .page__bd .choice text{
-  min-width: 200rpx;
-  color: #999999;
-  font-weight: 400;
-  font-size: 30rpx;
-  line-height: 100rpx;
-  margin-right: 20rpx;
-  text-align: right;
-}
-.content .waskList .page__bd .choice text text{
-  margin: 0;
-  color: rgba(101, 71, 163, 1);
-}
-.content .waskList .page__bd .choice image{
-  height: 24rpx;
-}
-.hr{
-  width: 100vw;
-  height: 20rpx;
-  background: #999999;
-  opacity: 0.05;
-}
-.deviceWake .wake-list{
-  position: absolute;
-  min-width: 100vw;
-  min-height: 100vh;
-  background-color: #fff;
-  z-index: 999;
-}
-.tip {
-  padding: 16rpx 32rpx;
-  width: calc(100vw - 64rpx);
-  height: 68rpx;
-  background: rgba(216, 216, 216, 0.34);
-}
-.tip>image {
-  height: 60rpx;
-  float: left;
-}
-.tip>text {
-  width: calc(100% - 70rpx);
-  float: left;
-  font-size: 24rpx;
-  font-weight: 500;
-  color: #353535;
-  line-height: 34rpx;
-}

+ 0 - 196
pages/pageC/wakeList/wakeList.js

@@ -1,196 +0,0 @@
-const app = getApp();
-import route_constant from '../../../utils/route_constant.js';
-let PreselectionIndex = null; // 记录选中的频道
-const {
-  deviceWakeList,
-  deviceWakeadd,
-  deviceWakedetail,
-  listByDevice,
-  pageByDevice,
-  radioList
-} = require('../../../utils/api.js');
-
-Page({
-  data: {
-    navBarHeight: app.globalData.navBarHeight,
-    MenuButtonTop: app.globalData.MenuButtonTop,
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '设置唤醒音', //导航栏 中间的标题
-    },
-    list: [],
-    actionIndex: null,
-    clientType: "",
-    deviceMac: "",
-    detailList: [],
-    isShowWakeDetail: false,
-    actionWakeIndex: null,
-    deviceWake: [],
-  },
-
-  onLoad(options) {
-    var that = this;
-    that.data.clientType = options.clientType;
-    that.data.deviceMac = options.deviceMac;
-    that.init();
-  },
-
-  init() {
-    var that = this;
-    deviceWakeList({
-      clientType: that.data.clientType,
-      deviceMac: that.data.deviceMac,
-    }).then((res) => {
-
-      listByDevice({
-        clientType: that.data.clientType
-      }).then((item) => {
-
-        const listData = [...res, ...item];
-        that.setData({
-          list: listData
-        })
-        deviceWakedetail({
-          clientType: that.data.clientType,
-          deviceMac: that.data.deviceMac,
-        }).then((data) => {
-          if (data && data.length === 0) {
-            return;
-          };
-          that.setData({
-            deviceWake: data,
-          });
-          listData.map((v, index) => {
-            if (v.wakeId === data[0].wakeId || v.channelId === data[0].channelId) {
-              that.setData({
-                actionIndex: index
-              })
-            }
-          })
-        })
-      })
-    })
-  },
-
-  actionWakeDetail(e) {
-    var that = this;
-    that.setData({
-      actionWakeIndex: e.currentTarget.dataset.index,
-    })
-  },
-
-  setWake() {
-    var that = this;
-    var index = that.data.actionWakeIndex;
-    if (index === null) {
-      wx.showToast({
-        title: '请选择唤醒音',
-        icon: "none",
-        duration: 1500
-      })
-      return
-    };
-
-    if (that.data.deviceWake.length > 0 && (that.data.deviceWake[0].audioId === that.data.detailList[index].audioId)) {
-      wx.showToast({
-        title: '请不要重复设置哦!',
-        icon: "none",
-        duration: 1500
-      });
-      return;
-    }
-
-    let repData = {}
-    if (that.data.detailList[index].channelId) {
-      repData = {
-        clientType: that.data.clientType,
-        deviceMac: that.data.deviceMac,
-        type: 1,
-        audioId: that.data.detailList[index].audioId,
-        audioType: that.data.detailList[index].audioType,
-        channelId: that.data.detailList[index].channelId,
-      }
-    } else {
-      repData = {
-        wakeAudioId: that.data.detailList[index].wakeAudioId,
-        clientType: that.data.clientType,
-        deviceMac: that.data.deviceMac,
-        type: 0,
-      }
-    }
-
-    deviceWakeadd(repData).then(() => {
-      that.setData({
-        actionWakeIndex: null,
-        isShowWakeDetail: false,
-        actionWakeDetail: null,
-        actionWakeIndex: PreselectionIndex
-      });
-      // 刷新页面
-      that.init();
-      getCurrentPages().map((v) => {
-        if (v.route === route_constant.deviceWakeRoot) {
-          v.setdeviceWakedetail();
-        };
-      })
-    });
-  },
-
-  clone() {
-    var that = this;
-    that.setData({
-      isShowWakeDetail: false,
-      actionWakeIndex: null
-    })
-  },
-
-  actionWake(e) {
-    var that = this;
-    var index = e.currentTarget.dataset.index;
-    if (that.data.list[index].channelId) {
-      // 选择1-12频道
-      pageByDevice({
-        channelId: that.data.list[index].channelId,
-        pageNum: 1,
-        pageSize: 300
-      }).then((res) => {
-        if (that.data.deviceWake.length > 0) {
-          res.records.map((v, index) => {
-            if (v.audioId === that.data.deviceWake[0].audioId) {
-              that.setData({
-                actionWakeIndex: index
-              })
-            }
-          });
-        };
-        that.setData({
-          isShowWakeDetail: true,
-          detailList: res.records
-        })
-      })
-    } else {
-      // 官方频道
-      radioList({
-        wakeId: that.data.list[index].wakeId,
-        pageNum: 1,
-        pageSize: 300
-      }).then((res) => {
-        if (that.data.deviceWake.length > 0) {
-          res.records.map((v, index) => {
-            if (v.audioId === that.data.deviceWake[0].audioId) {
-              that.setData({
-                actionWakeIndex: index
-              })
-            }
-          });
-        };
-        that.setData({
-          isShowWakeDetail: true,
-          detailList: res.records
-        })
-      })
-    };
-    PreselectionIndex = e.currentTarget.dataset.index;
-  },
-
-})

+ 0 - 5
pages/pageC/wakeList/wakeList.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 37
pages/pageC/wakeList/wakeList.wxml

@@ -1,37 +0,0 @@
-<view class="wakeList">
-  <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="ps">
-    <image mode="heightFix" src="../../../img/vaa.png"></image>
-    <text>设备网络异常时,将会使用默认闹铃声</text>
-  </view>
-  <view class="list" style="height: calc(100vh - {{navBarHeight}}px - 36rpx);">
-    <view wx:for="{{list}}" data-index="{{index}}" class="page-view" bindtap="actionWake">
-      <view>
-        <image mode="scaleToFill" src="{{item.pic || item.channelPic}}"></image>
-      </view>
-      <view class="textInfo">
-        <text class="name">{{item.name || item.channelName}}</text>
-        <text wx:if="{{actionIndex === index}}" class="audioInfo">
-          {{deviceWake.length > 0 ? deviceWake[0].audioName : ""}}
-        </text>
-      </view>
-      <image wx:if="{{actionIndex === index}}" class="action" style="height:28rpx; width:28rpx;" src="../../../img/gg.png" mode="aspectFit"></image>
-    </view>
-  </view>
-  <view wx:if="{{isShowWakeDetail}}" class="wakeDetail">
-    <view class="wakeDetail-view">
-      <text>请选择</text>
-      <view class="wakeListInfo">
-        <view class="li {{actionWakeIndex === index ? 'action' : ''}}" wx:for="{{detailList}}" data-index="{{index}}" bindtap="actionWakeDetail">
-          <text>{{index + 1}}</text>
-          <text>{{item.audioName}}</text>
-          <image wx:if="{{actionWakeIndex === index}}" src="../../../img/gg.png" style="height:28rpx; width:28rpx;" mode="aspectFit"></image>
-        </view>
-      </view>
-      <view class="foot">
-        <text class="" bindtap="clone">取消</text>
-        <text class="" bindtap="setWake">设置为唤醒音</text>
-      </view>
-    </view>
-  </view>
-</view>

+ 0 - 150
pages/pageC/wakeList/wakeList.wxss

@@ -1,150 +0,0 @@
-
-.wakeList{
-  position: relative;
-  height: 100%;
-}
-.wakeList .ps{
-  height: 36rpx;
-  background-color: rgba(216, 216, 216, 0.34);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-.wakeList .ps image{
-  height: 36rpx;
-}
-.wakeList .ps text{
-  font-size: 24rpx;
-font-weight: 500;
-color: #353535;
-line-height: 34rpx;
-}
-.list {
-  overflow: auto;
-}
-.list .page-view{
-  height: 140rpx;
-  margin: 17rpx 0;
-  overflow: hidden;
-  display: flex;
-  align-items: center;
-  position: relative;
-}
-.list .page-view view image{
-  height: 118rpx;
-  width: 118rpx;
-  border-radius: 18rpx;
-  border: 4rpx solid #353535;
-  margin-left: 34rpx;
-  margin-right: 30rpx;
-}
-.list .page-view .textInfo .name{
-  display: block;
-  font-size: 30rpx;
-font-weight: 500;
-color: #353535;
-line-height: 38rpx;
-}
-.list .page-view .textInfo .audioInfo{
-  display:-webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp:2;
-  overflow:hidden;
-  max-width: 60vw;
-  font-size: 24rpx;
-  color: #6547A3;
-  line-height: 38rpx;
-}
-.list .page-view image.action{
-  height: 28rpx;
-  position: absolute;
-  right: 34rpx;
-  top: 57rpx;
-}
-.wakeDetail{
-  width: 100vw;
-  height: 100vh;
-  position: fixed;
-  top: 0;
-  left: 0;
-  background-color: rgba(0, 0, 0, 0.6);
-}
-.wakeDetail .wakeDetail-view{
-  position: absolute;
-  bottom: 0;
-  width: 100vw;
-  background: #FFFFFF;
-  border-radius: 18rpx 18rpx 0px 0px;
-  padding: 20rpx 0 60rpx;
-}
-.wakeDetail .wakeDetail-view>text{
-  display: block;
-  width: 100vw;
-  padding-left: 28rpx;
-  line-height: 82rpx;
-  font-size: 30rpx;
-  color: #353535;
-  font-weight: bold;
-  border-bottom: 1rpx solid rgba(224, 224, 224, 1);
-}
-.wakeDetail .wakeDetail-view .wakeListInfo{
-  max-height: 442rpx;
-  overflow: auto;
-  padding: 0 28rpx;
-}
-.wakeListInfo .li{
-  padding: 20rpx 0;
-  overflow: hidden;
-  position: relative;
-}
-
-.wakeListInfo .li text:nth-child(1){
-  font-size: 24rpx;
-  font-weight: 600;
-  color: #999999;
-  line-height: 48rpx;
-  margin-right: 20rpx;
-}
-.wakeListInfo .li text:nth-child(2){
-  font-size: 30rpx;
-  font-weight: bold;
-  color: #353535;
-  line-height: 42rpx;
-  word-break:break-all;
-}
-.wakeListInfo .li.action text:nth-child(1) {
-  color: #353535;
-}
-.wakeListInfo .li.action text:nth-child(2) {
-  color: rgba(101, 71, 163, 1);
-}
-.wakeListInfo .li image{
-  height: 28rpx;
-  position: absolute;
-  top: 28rpx;
-  right: 0;
-}
-.foot{
-  width: 100vw;
-  display: flex;
-  justify-content: center;
-  padding-top: 28rpx;
-}
-.foot text{
-  display: flex;
-  width: 240rpx;
-  height: 80rpx;
-  align-items: center;
-  justify-content: center;
-  border-radius: 40rpx;
-  margin: 0 30rpx;
-  font-size: 30rpx;
-}
-.foot text:nth-child(1){
-  background-color: rgba(232, 232, 232, 1);
-  color: #999;
-}
-.foot text:nth-child(2){
-  background-color: rgba(101, 71, 163, 1);
-  color: #fff;
-}

+ 0 - 137
pages/pageD/download/download.js

@@ -1,137 +0,0 @@
-
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    codeUrl: "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20221107134141195228914.png",
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '下载', //导航栏 中间的标题
-    },
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad() {
-    init().then((res) => {
-      this.setData({
-        codeUrl: res.appDownQrCode,
-      })
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  },
-  // 保存海报
-  saveImageToPhotosAlbum() {
-    const _this = this;
-    wx.showLoading({
-      title: '保存中...'
-    })
-    wx.downloadFile({
-      url: _this.data.codeUrl,
-      success: function (res) {
-        //图片保存到本地
-        wx.saveImageToPhotosAlbum({
-          filePath: res.tempFilePath,
-          success: function (data) {
-            wx.hideLoading()
-            wx.showToast({
-              title: '保存成功',
-              icon: 'success',
-              duration: 2000
-            })
-          },
-          fail: function (err) {
-            if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg === "saveImageToPhotosAlbum:fail auth deny") {
-              // 这边微信做过调整,必须要在按钮中触发,因此需要在弹框回调中进行调用
-              wx.showModal({
-                title: '提示',
-                content: '需要您授权保存相册',
-                showCancel: false,
-                success() {
-                  wx.openSetting({
-                    success(settingdata) {
-                      console.log("settingdata", settingdata)
-                      if (settingdata.authSetting['scope.writePhotosAlbum']) {
-                        wx.showModal({
-                          title: '提示',
-                          content: '获取权限成功,再次点击图片即可保存',
-                          showCancel: false,
-                        })
-                      } else {
-                        wx.showModal({
-                          title: '提示',
-                          content: '获取权限失败,将无法保存到相册哦~',
-                          showCancel: false,
-                        })
-                      }
-                    },
-                    fail(failData) {
-                      console.log("failData", failData)
-                    },
-                    complete(finishData) {
-                      console.log("finishData", finishData)
-                    }
-                  })
-                }
-              })
-            }
-          },
-          complete(res) {
-            wx.hideLoading()
-          }
-        })
-      }
-    })
-  },
-})

+ 0 - 5
pages/pageD/download/download.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 26
pages/pageD/download/download.wxml

@@ -1,26 +0,0 @@
-
-<view class="download">
-  <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>
-  <image style="width: 100vw;" class="logo" mode="widthFix" src="../../../img/s.png"></image>
-  <view class="li">
-    <view class="h3">
-      方式一
-    </view>
-    <view class="textList">前往App Store或安卓市场搜索“<text>OhPlay猫王妙播</text>”并下载</view>
-  </view>
-  <view class="li">
-    <view class="h3">
-      方式二
-    </view>
-    <view class="textList">1.保存二维码</view>
-    <view class="textList">2.进入微信扫一扫功能,点击“相册”,选取二维码</view>
-    <view class="textList">3.下载OhPlay猫王妙播</view>
-  </view>
-  <view class="code">
-    <image mode="widthFix" 	show-menu-by-longpress src="{{codeUrl}}"></image>
-  </view>
-  <view class="button">
-    <text bindtap="saveImageToPhotosAlbum">保存到相册</text>
-  </view>
-</view>

+ 0 - 74
pages/pageD/download/download.wxss

@@ -1,74 +0,0 @@
-
-.download .li {
-  padding: 50rpx 66rpx 0;
-}
-
-.download .li .h3 {
-  width: 160rpx;
-  height: 40rpx;
-  line-height: 40rpx;
-  text-align: center;
-  font-size: 28rpx;
-  color: #353535;
-  font-weight: bold;
-  margin-bottom: 20rpx;
-  position: relative;
-}
-
-.download .li .h3::after {
-  content: " ";
-  width: 160rpx;
-  height: 20rpx;
-  border-radius: 30rpx;
-  background-color: rgba(111, 56, 180, 0.1);
-  display: block;
-  position: absolute;
-  bottom: 0;
-}
-
-.download .li .textList {
-  font-size: 28rpx;
-  color: #353535;
-  line-height: 40rpx;
-}
-
-.download .li .textList text {
-  color: #6f38b4;
-  font-weight: bold;
-}
-
-.download .code {
-  margin-top: 30rpx;
-  width: 100vw;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.download .code image {
-  width: 280rpx;
-}
-
-.download .button {
-  margin-top: 84rpx;
-  width: 100vw;
-  display: flex;
-  justify-content: center;
-}
-
-.download .button text {
-  width: 520rpx;
-  height: 80rpx;
-  background: #6547A3;
-  border-radius: 45rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  font-size: 36rpx;
-  color: #fff;
-}
-
-.ex-nav-bgc-class {
-  background: rgba(237, 237, 237, 0.9);
-  backdrop-filter: blur(10px);
-}

+ 0 - 444
pages/pageD/ota/ota.js

@@ -1,444 +0,0 @@
-const { BtHelper } = require("../../../devices/bt_helper");
-import { EnumCmdEvent, CmdEvent } from '../../../devices/cmd_key_event';
-import EventManager from '../../../utils/event_bus'
-import route_util from '../../../utils/route_util';
-import route_constant from '../../../utils/route_constant.js';
-import { BtCmd } from '../../../devices/bluetooth/bt_cmd.js';
-
-
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    navbarData: {
-      showCapsule: 1, //
-      title: '固件信息',
-    },
-    device: {},
-    otaData: {},
-    btHelper: null,
-    progress: 0, // 进度条初始值
-    otaStatus: 0,
-    buttonTips: "固件更新",
-    _chunks: [],
-    progressPercent: 0,
-    progress: 0,
-    progressTextLeft: "0%",
-    _timer: null,
-  },
-  setOtaStatus(status) {
-    switch (status) {
-      case 0:
-        this.setData({
-          otaStatus: 0,
-          buttonTips: "固件更新"
-        });
-        break;
-      case 1:
-        this.setData({
-          otaStatus: 1,
-          buttonTips: "下载升级包"
-        });
-        break;
-      case 2:
-        this.setData({
-          otaStatus: 2,
-          buttonTips: "开始更新"
-        });
-        break;
-      case 3:
-        this.setData({
-          otaStatus: 3,
-          buttonTips: "更新中..."
-        });
-        break;
-
-      case 4:
-        this.setData({
-          otaStatus: 4,
-          buttonTips: "更新失败,再试一次"
-        });
-        break;
-      case 5:
-        this.setData({
-          otaStatus: 4,
-          buttonTips: "更新完成"
-        });
-        break;
-      default:
-        break;
-    }
-
-  },
-  startOtaTap() {
-    let online = this.data.device.state === "online"
-    if (!online) {
-      wx.showToast({
-        title: '设备已经掉线了',
-      })
-      return;
-    }
-
-    let hasNewVersion = this.data.otaData.hasNewVersion ?? false
-    if (!hasNewVersion) {
-      wx.showToast({
-        title: '没有可升级的固件',
-      })
-      return;
-    }
-    if (this.data.otaStatus != 0) {
-      console.log("没有可升级的固件2")
-      return;
-    }
-
-    let _this = this
-    wx.showModal({
-      title: '有新固件可升级',
-      content: _this.data.otaData.content ?? '提升体验,操作更流畅',
-      cancelText: '以后再说',
-      confirmText: '升级',
-      complete: (res) => {
-        if (res.cancel) {
-
-        }
-
-        if (res.confirm) {
-          wx.showLoading({
-            title: '升级设备中,请稍后',
-          })
-          _this.sendOtaCmd(1)
-
-          // _this.startDownloadFile()
-          // _this.downloadOtaFile(_this.data.otaData.url ?? "")
-        }
-      }
-    })
-    // const btHelper = BtHelper.getInstance();
-    // btHelper.ota(this.data.otaData.file_url)
-
-  },
-  goToWifi() {
-    route_util.jump(route_constant.setWifi)
-  },
-  sendUrlData() {
-    let url = this.data.otaData.url ?? ""
-    let codeUrl = BtCmd.stringToUint8Array(url)
-    BtHelper.getInstance().otaUrl(codeUrl);
-  },
-
-  // 读取文件废弃代码
-  startDownloadFile() {
-
-    var urlPath = this.data.otaData.url ?? "";
-
-    var list = urlPath.split("/");
-    // let cachePath = await PathUtil.getDownloadPath(fileName: list.last ?? 'OTAUpgrade.OTA');
-    const fs = wx.getFileSystemManager();
-
-    // 构建本地文件路径
-    var localFilePath = list[list.length - 1];
-    console.log(list, localFilePath)
-
-    let _this = this;
-    _this.setOtaStatus(2);
-
-    let localPath = `${wx.env.USER_DATA_PATH}/` + localFilePath
-    // 判断文件是否存在
-    fs.access({
-      path: localPath,
-      success(res) {
-        console.log('文件已存在:', res);
-
-        if (res) {
-          // 有文件
-          _this.readFile(localPath);
-
-        } else {
-          _this.downloadOtaFile(urlPath, localPath)
-        }
-      }, fail(err) {
-        // 文件不存在或其他错误
-        console.log(err)
-        // 文件不存在,开始下载
-        _this.downloadOtaFile(urlPath, localPath)
-      }
-    }
-    );
-  },
-  downloadOtaFile(urlPath, localPath) {
-    let _this = this;
-    // const fs = wx.getFileSystemManager();
-
-    wx.downloadFile({
-      url: urlPath, // 下载资源的URL
-      success: (res) => {
-        console.log('文件下载成功2', res);
-
-        if (res.statusCode === 200) {
-          // 下载成功,保存文件路径
-          const filePath = res.tempFilePath;
-          // _this.readFile(filePath);
-
-          // 将下载的文件移动到本地路径
-          fs.rename({
-            oldPath: filePath,
-            newPath: localPath,
-            success: () => {
-              wx.showToast({
-                title: '文件下载成功',
-              });
-              _this.readFile(localPath);
-            },
-            fail: (err) => {
-              _this.setOtaStatus(4);
-
-              wx.showToast({
-                title: '下载文件失败,检查下手机内存吧',
-              });
-              console.error('文件移动失败:', err);
-            }
-          });
-        } else {
-          _this.setOtaStatus(4);
-          wx.showToast({
-            title: '文件下载失败',
-          });
-        }
-      },
-      fail: (err) => {
-        _this.setOtaStatus(4);
-        wx.showToast({
-          title: '文件下载失败',
-        });
-        console.error('下载文件失败:', err);
-      }
-    });
-  },
-  readFile(localFilePath) {
-
-    if (!localFilePath) {
-      wx.showToast({
-        title: '下载文件为空',
-      });
-      return;
-    }
-    wx.showLoading({
-      title: '开始传输文件',
-    })
-    const fs = wx.getFileSystemManager();
-
-    let _this = this;
-    fs.readFile({
-      filePath: localFilePath,
-      encoding: 'base64', // 可以选择 'utf8' 或 'base64'
-      success: (res) => {
-
-        // const btHelper = BtHelper.getInstance();
-        //   btHelper.ota(localFilePath);
-
-        console.log('文件内容:', res.data.length);
-
-        _this.startSend(res.data);
-      },
-      fail: (err) => {
-        wx.showToast({
-          title: 'OTA文件下载失败',
-        });
-        console.error('文件读取失败:', err);
-        _this.setOtaStatus(4);
-      }
-
-    });
-  },
-  startSend(data) {
-    // const chunkSize = 20; // 每次发送的数据块大小
-    // const chunks = [];
-    // for (let i = 0; i < data.length; i += chunkSize) {
-    //   chunks.push(data.slice(i, i + chunkSize));
-    // }
-
-    // this.data._chunks = chunks;
-    this.sendOtaCmd(1)
-    // this.startSendOtaData()
-  },
-
-  startSendOtaData() {
-    let _this = this
-    let length = this.data._chunks.length
-
-    if (length === 0) {
-      wx.showToast({
-        title: '下载文件失败',
-        icon: 'none'
-      })
-      _this.sendOtaCmd(2)
-      return;
-    }
-    _this.sendOtaData(this.data._chunks, 0)
-    // }
-  }, sendOtaData(imageBuffer, index) {
-    let _this = this
-
-    if (index >= imageBuffer.length) {
-      _this.sendOtaCmd(0)
-      return;
-    }
-    let chunkSize = 20;
-
-
-    let total = imageBuffer.length
-    let next = index + chunkSize;
-    const chunk = imageBuffer.slice(index, next);
-    // todo 改成设备wifi下载
-    // BtHelper.getInstance().wallPaperData(chunk, function (res) {
-    //   console.log("发送OTA数据:", next)
-    //   if (res) {
-    //     _this.updateProgress(next, total);
-
-    //     _this.sendOtaData(imageBuffer)
-    //   } else {
-    //     wx.showModal({
-    //       title: 'OTA升级失败了',
-    //       showCancel: false
-    //     })
-    //   }
-    // })
-
-  },
-  sendOtaCmd(value) {
-    BtHelper.getInstance().otaCmd(value)
-    if (value == 0) {
-      this.setOtaStatus(0);
-    } else {
-      // this.setOtaStatus(4);
-    }
-  },
-
-  startProgress() {
-    this.setData({
-      progress: 0,
-      showProgress: true
-    })
-  },
-  updateProgress(chunk, total) {
-    let progress = chunk / total * 100;
-    let _this = this
-    if (progress >= 100) {
-      _this.setData({
-        progress: 0,
-        showProgress: false,
-        // showCropImg: false
-      });
-      wx.showToast({
-        title: '图片上传成功',
-      })
-    } else {
-      _this.setData({
-        progress: progress,
-      });
-    }
-  },
-  otaSuccess() {
-    wx.hideLoading();
-    // 流程成功
-    wx.showModal({
-      title: '设备开始升级中',
-      showCancel: false,
-      success: function (res) {
-        if (res.confirm) {
-          route_util.goBackHomePage();
-        }
-      }
-    })
-  },
-  otaFailure() {
-    wx.hideLoading();
-    // 流程失败
-    wx.showModal({
-      title: '设备升级失败了',
-      showCancel: false,
-      success: function (res) {
-        if (res.confirm) {
-          // 
-        }
-      }
-    })
-  },
-  addNotification() {
-    let _this = this;
-    EventManager.addNotification(CmdEvent.eventName, function (event) {
-      let name = event.cmdEvent;
-      let kind = event.heiJiaoKind;
-      // 74,1,1是wifi连接成功,74,0 2连接wifi失败/没有wifi。   
-      // 发送url给你后,你回:74 0 1是流程成功,74 0 3是流程失败。
-      let otaCmd = event.otaCmd;
-      console.log("OTA页:", otaCmd, kind, name)
-
-      switch (name) {
-        case EnumCmdEvent.otaCmd:
-
-          if (otaCmd === 1 && kind == 1) {
-            wx.hideLoading();
-            // 设备收到开启OTA的回复,发送url
-            _this.sendUrlData()
-          } else if (otaCmd === 0 && kind == 2) {
-            wx.hideLoading();
-            // 去设置wifi界面
-            _this.goToWifi()
-          } else if (otaCmd === 0 && kind == 3) {
-            _this.otaFailure()
-          } else if (otaCmd === 0 && kind == 1) {
-            _this.otaSuccess()
-          }
-          else if (kind == 0) {
-
-          }
-          break;
-        case EnumCmdEvent.otaUrl:
-          // 小程序发:0x75,  0
-          if (otaCmd === 1 && kind == 1) {
-            // _this.sendOtaCmd(0)
-            _this.otaSuccess()
-            // BtHelper.getInstance().otaUrl(BtCmd.stringToUint8Array(_this.data.otaData.url))
-          } else {
-            _this.otaFailure()
-
-          }
-          break;
-        case EnumCmdEvent.otaWifi:
-          //0x76 
-          wx.hideLoading()
-          // 0x76, 发送wifi成功
-          if (otaCmd === 1 && kind == 1) {
-            _this.sendUrlData()
-          } else {
-            // wifi失败
-            _this.otaFailure()
-
-          }
-          break;
-      }
-    }, _this)
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-    let param = JSON.parse(options.param)
-    console.log("OTA界面:", param)
-    let otaData = param.otaData
-    let device = param.device
-    this.setData({
-      otaData: otaData,
-      device: device,
-      isShowOta: device.clientType === 'MW-S2(BLE)' || device.clientType === 'MW-S2'
-    })
-    this.addNotification()
-  },
-  onUnload() {
-    EventManager.removeNotification(CmdEvent.eventName, this)
-  },
-
-})

+ 0 - 5
pages/pageD/ota/ota.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 31
pages/pageD/ota/ota.wxml

@@ -1,31 +0,0 @@
-<view class="section">
-  <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='{{navbarData}}'></nav-bar>
-  <view style="height: 32rpx;"></view>
-  <view class="item">
-    <text class="label">制造商</text>
-    <text class="arrow">AirSmart</text>
-  </view>
-  <view class="item">
-    <text class="label">产品型号</text>
-    <text class="arrow">{{device.clientType}}</text>
-  </view>
-  <view class="item">
-    <text class="label">MAC地址</text>
-    <text class="arrow">{{device.mac}}</text>
-  </view>
-  <view wx:if="{{isShowOta}}" class="button main_color" bind:tap="startOtaTap">
-    {{buttonTips}}
-  </view>
-</view>
-<view wx:if="{{otaStatus === 3}}" class="background">
-  <view class="content">
-    <view class="pro_title">正在升级</view>
-    <view class="progress-container">
-      <progress class="progress" border-radius="16rpx" stroke-width="32rpx" percent="{{progress}}" activeColor="rgba(101, 70, 163, 1)" backgroundColor="rgba(101,70,163,0.16)" stroke-width="26" border-radius="13" />
-      <view class="progress-text" style="left: {{progressTextLeft}};">
-        {{progressPercent}}%
-      </view>
-    </view>
-    <view class="pro_tips">升级过程中请勿离开当前页面</view>
-  </view>
-</view>

+ 0 - 97
pages/pageD/ota/ota.wxss

@@ -1,97 +0,0 @@
-
-
-.item {
-	display: flex;
-	align-items: center;
-	border-bottom: 1px solid #e0e0e0;
-	justify-content: space-between;
-	margin-inline: 32rpx;
-	height: 120rpx;
-}
-
-
-.label {
-	font-size: 16px;
-	color: #333333;
-	margin-left: 32rpx;
-}
-
-.arrow {
-	margin-right: 16rpx;
-}
-
-.button {
-	margin-top: 128rpx;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	margin-inline: 64rpx;
-	font-size: 32rpx;
-	font-weight: Medium;
-	color: white;
-	text-align: center;
-	border-radius: 44rpx;
-	height: 88rpx;
-}
-
-
-.background {
-	position: fixed;
-	top: 0;
-	left: 0;
-	right: 0;
-	bottom: 0;
-	background-color: rgba(0, 0, 0, 0.7);
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	z-index: 1000;
-}
-
-.content {
-	background-color: white;
-	padding-inline: 20px;
-	border-radius: 10px;
-	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
-	width: 558rpx;
-	height: 404rpx;
-}
-
-.pro_title {
-	font-weight: 500;
-	font-size: 32rpx;
-	color: #333333;
-	text-align: center;
-	font-style: normal;
-	margin-top: 64rpx;
-}
-
-.progress-container {
-	position: relative;
-	margin-inline: 32rpx;
-	margin-top: 46rpx;
-	/* 根据需要调整 */
-}
-
-.progress {
-	width: 100%;
-}
-
-.progress-text {
-	position: absolute;
-	top: 50%;
-	transform: translateY(-50%);
-	color: white;
-	font-size: 16px;
-	z-index: 1;
-	white-space: nowrap;
-}
-
-.pro_tips {
-	margin-top: 48rpx;
-	margin-inline: 34rpx;
-	font-size: 28rpx;
-	color: #666666;
-	text-align: center;
-	font-style: normal;
-}

+ 0 - 113
pages/pageD/repeat/repeat.js

@@ -1,113 +0,0 @@
-import route_constant from '../../../utils/route_constant.js';
-
-Page({
-  data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '设置重复', //导航栏 中间的标题
-
-    },
-    items: [{
-        value: '0',
-        name: '周日'
-      },
-      {
-        value: '1',
-        name: '周一'
-      },
-      {
-        value: '2',
-        name: '周二'
-      },
-      {
-        value: '3',
-        name: '周三'
-      },
-      {
-        value: '4',
-        name: '周四'
-      },
-      {
-        value: '5',
-        name: '周五'
-      },
-      {
-        value: '6',
-        name: '周六'
-      }
-    ],
-    week_actives: [0, 0, 0, 0, 0, 0, 0],
-  },
-  action(e) {
-    this.data.week_actives[e.currentTarget.dataset.index] = this.data.week_actives[e.currentTarget.dataset.index] === 0 ? 1 : 0;
-    this.setData({
-      week_actives: this.data.week_actives
-    });
-    getCurrentPages().map((v) => {
-      if (v.route === route_constant.deviceWakeRoot) {
-        v.setRepeat(this.data.week_actives);
-      };
-    })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-    const week_actives = [];
-    options.week_actives.split(",").map((v) => {
-      week_actives.push(parseInt(v, 10));
-    });
-    this.setData({
-      week_actives: week_actives
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
-})

+ 0 - 5
pages/pageD/repeat/repeat.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 10
pages/pageD/repeat/repeat.wxml

@@ -1,10 +0,0 @@
-
-<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 class="page-section">
-    <view data-index="{{index}}" bindtap="action" class="list" wx:for="{{week_actives}}">
-      <text>{{items[index].name}}</text>
-      <image wx:if="{{week_actives[index] === 1}}" src="../../../img/gg.png" style="height:28rpx; width:28rpx;" mode="aspectFit"></image>
-    </view>
-  </view>
-</view>

+ 0 - 23
pages/pageD/repeat/repeat.wxss

@@ -1,23 +0,0 @@
-
-.page-section{
-  padding-left: 32rpx;
-}
-.page-section .list{
-  height: 100rpx;
-  display: flex;
-  align-items: center;
-  border-bottom: 1rpx solid #d8d8d8;
-  position: relative;
-}
-.page-section .list text{
-  font-size: 30epx;
-font-weight: 400;
-color: #353535;
-line-height: 42epx;
-}
-.page-section .list image{
-  height: 28rpx;
-  position: absolute;
-  top: 36rpx;
-  right: 32rpx;
-}

+ 0 - 125
pages/pageD/setWifi/setWifi.js

@@ -1,125 +0,0 @@
-
-const { BtHelper } = require("../../../devices/bt_helper");
-import EventManager from '../../../utils/event_bus'
-import { EnumCmdEvent, CmdEvent } from '../../../devices/cmd_key_event';
-import store from '../../../utils/store';
-import { BtCmd } from '../../../devices/bluetooth/bt_cmd';
-Page({
-  data: {
-    wifiName: '',
-    wifiPassword: '',
-    _otaUrl: "",
-  },
-
-  getConnectedWifi: function () {
-    const that = this;
-    let wifiDic = store.getStore("wifiInfo")
-    let wifiName = wifiDic.wifiName
-    let pwd = wifiDic.wifiPassword
-    if (wifiName && pwd) {
-      console.log("获取Wi-Fi信息", wifiName, pwd);
-      that.setData({
-        wifiName: wifiName,
-        wifiPassword: pwd
-      });
-      return;
-    }
-    wx.startWifi({
-      success(res) {
-        console.log(res.errMsg)
-
-        wx.getConnectedWifi({
-          success: function (res) {
-            const wifiName = res.wifi.SSID;
-            that.setData({
-              wifiName: wifiName
-            });
-          },
-          fail: function (err) {
-            console.error('获取Wi-Fi信息失败', err);
-            // wx.showToast({
-            //   title: '获取Wi-Fi信息失败',
-            //   icon: 'none'
-            // });
-
-          }
-        });
-
-      }
-    })
-
-
-  },
-
-  onWifiNameInput: function (e) {
-    this.setData({
-      wifiName: e.detail.value
-    });
-  },
-
-  onWifiPasswordInput: function (e) {
-    this.setData({
-      wifiPassword: e.detail.value
-    });
-  },
-  sendWiFiInfo(wifiName, pwd) {
-    // [0x22, (wifiList.length + pwdList.length + 6), 0x33, (wifiList.length), (wifiList), 0x44, (pwdList)];
-
-    if (!wifiName || !pwd) {
-      wx.showToast({
-        title: '请输入正确的账号密码',
-      })
-      wx.hideLoading()
-      return;
-    }
-
-    let result = BtCmd.sendWiFiInfo(wifiName, pwd)
-
-    // _ble.send({ cmd: result });
-    BtHelper.getInstance().otaSetWifi(result)
-  },
-
-  onConfirm: function () {
-    const { wifiName, wifiPassword } = this.data;
-    if (!wifiName || !wifiPassword) {
-      wx.showToast({
-        title: '请输入完整的Wi-Fi信息',
-        icon: 'none'
-      });
-      return;
-    }
-    // 这里可以添加进一步的逻辑,比如连接Wi-Fi或保存信息
-    this.sendWiFiInfo(wifiName, wifiPassword);
-  },
-  addNotification() {
-    let _this = this;
-    EventManager.addNotification(CmdEvent.eventName, function (event) {
-      let name = event.cmdEvent;
-      let otaCmd = event.otaCmd
-      console.log("设置wifi0:", event)
-      let kind = event.heiJiaoKind;
-      console.log("设置wifi:", name, otaCmd, kind)
-      // let toast = "设置wifi:" + name + " value," + otaCmd + "kind ," + kind
-      // wx.showToast({
-      //   title: toast,
-      //   icon: 'none'
-      // })
-      if (name === EnumCmdEvent.otaWifi && otaCmd === 1) {
-        store.setStore("wifiInfo", {
-          wifiName: _this.data.wifiName,
-          wifiPassword: _this.data.wifiPassword
-        })
-      }
-    }, _this)
-  },
-  onLoad: function (options) {
-    let param = options.param ?? "{}";
-    let url = JSON.parse(param).url ?? "";
-    this.data._otaUrl = url;
-    this.getConnectedWifi();
-    this.addNotification()
-  },
-  onUnload() {
-    EventManager.removeNotification(CmdEvent.eventName)
-  },
-});

+ 0 - 5
pages/pageD/setWifi/setWifi.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 0 - 11
pages/pageD/setWifi/setWifi.wxml

@@ -1,11 +0,0 @@
-<view class="container">
-  <view class="input-group">
-    <label class="label">Wi-Fi 名称</label>
-    <input class="input" type="text" placeholder="请输入Wi-Fi名称" value="{{wifiName}}" bindinput="onWifiNameInput" />
-  </view>
-  <view class="input-group">
-    <label class="label">密码</label>
-    <input class="input" type="password" placeholder="请输入密码" value="{{wifiPassword}}" bindinput="onWifiPasswordInput" />
-  </view>
-  <button class="confirm-button" bindtap="onConfirm">确认</button>
-</view>

+ 0 - 31
pages/pageD/setWifi/setWifi.wxss

@@ -1,31 +0,0 @@
-
-.container {
-    padding: 20px;
-    margin-top: 88rpx;
-}
-
-.input-group {
-    margin-bottom: 15px;
-}
-
-.label {
-    display: block;
-    height: 88rpx;
-}
-
-.input {
-    border: 1px solid #ccc;
-    padding: 10px;
-    width: 100%;
-    box-sizing: border-box;
-    height: 88rpx;
-}
-
-.confirm-button {
-    background-color: #1aad19;
-    color: white;
-    padding: 10px;
-    border: none;
-    width: 100%;
-    border-radius: 5px;
-}

+ 2 - 2
pages/piano/cropper/cropper.json

@@ -1,6 +1,6 @@
 {
   "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar",
-    "image-cropper": "./../../components/image-cropper/image-cropper"
+    "nav-bar": "../../../components/navbar/navbar",
+    "image-cropper": "../../../components/image-cropper/image-cropper"
   }
 }

+ 1 - 1
pages/piano/wallpaper/wallpaper.json

@@ -1,5 +1,5 @@
 {
   "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
+    "nav-bar": "../../../components/navbar/navbar"
   }
 }

+ 27 - 27
utils/route_constant.js

@@ -1,42 +1,42 @@
 ///路由
-///****************** pageA ********************/
-const indexRoot = "pages/pageA/index/index";
-const loginRoot = "pages/pageA/login/login";
+///****************** pages ********************/
+const indexRoot = "pages/index/index";
+const loginRoot = "pages/login/login";
 
-///****************** pageB ********************/
-const connectBleRoot = "pages/pageB/connectBle/connectBle";
+///****************** pagesA ********************/
+const connectBleRoot = "pagesA/connectBle/connectBle";
 
-///****************** pageC ********************/
-const deviceWakeRoot = "pages/pageC/deviceWake/deviceWake";
+///****************** pagesB ********************/
+const deviceWakeRoot = "pagesB/deviceWake/deviceWake";
 
 
 ///跳转路径
-///****************** pageA ********************/
+///****************** pages ********************/
 const deviceList = "../deviceList/deviceList";
 const index = "../index/index";
 const login = "../login/login";
 
-///****************** pageB ********************/
-const about = "./../../pageB/about/about";
-const connectBle = "./../../pageB/connectBle/connectBle";
-const connectMode = "./../../pageB/deviceConMode/deviceConMode";
-const deviceConnect0 = "./../../pageB/deviceConnect0/deviceConnect0";
-const deviceConnect1 = "./../../pageB/deviceConnect1/deviceConnect1";
-const deviceConnect2 = "./../../pageB/deviceConnect2/deviceConnect2";
-const deviceConnect3 = "./../../pageB/deviceConnect2/deviceConnect3";
+///****************** pagesA ********************/
+const about = "./../../pagesA/about/about";
+const connectBle = "./../../pagesA/connectBle/connectBle";
+const connectMode = "./../../pagesA/deviceConMode/deviceConMode";
+const deviceConnect0 = "./../../pagesA/deviceConnect0/deviceConnect0";
+const deviceConnect1 = "./../../pagesA/deviceConnect1/deviceConnect1";
+const deviceConnect2 = "./../../pagesA/deviceConnect2/deviceConnect2";
+const deviceConnect3 = "./../../pagesA/deviceConnect2/deviceConnect3";
 
-///****************** pageC ********************/
-const aboutInfo = "./../../pageC/aboutInfo/aboutInfo";
-const channelDetail = "./../../pageC/channelDetail/channelDetail";
-const deviceDetail = "./../../pageC/deviceDetail/deviceDetail";
-const deviceWake = "./../../pageC/deviceWake/deviceWake";
-const wakeList = "./../../pageC/wakeList/wakeList";
+///****************** pagesB ********************/
+const aboutInfo = "./../../pagesB/aboutInfo/aboutInfo";
+const channelDetail = "./../../pagesB/channelDetail/channelDetail";
+const deviceDetail = "./../../pagesB/deviceDetail/deviceDetail";
+const deviceWake = "./../../pagesB/deviceWake/deviceWake";
+const wakeList = "./../../pagesB/wakeList/wakeList";
 
-///****************** pageD ********************/
-const download = "./../../pageD/download/download";
-const ota = "./../../pageD/ota/ota";
-const repeat = "./../../pageD/repeat/repeat";
-const setWifi = "./../../pageD/setWifi/setWifi";
+///****************** pagesC ********************/
+const download = "./../../pagesC/download/download";
+const ota = "./../../pagesC/ota/ota";
+const repeat = "./../../pagesC/repeat/repeat";
+const setWifi = "./../../pagesC/setWifi/setWifi";
 
 ///****************** piano ********************/
 const cropper = "./../../piano/cropper/cropper";