addMattresses.wxml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!--subpages/addMattresses/addMattresses.wxml-->
  2. <view class="container">
  3. <view class="notice-view">
  4. <image src="/subpages/images/ic_notice_tips.png" class="notice-icon"></image>
  5. <view class="marquee-container">
  6. <text class="marquee-text marquee-text-animation">温馨提示:增加床垫设备之前,请将手机连接室内WIFI,并且保持蓝牙打开状态。</text>
  7. </view>
  8. </view>
  9. <view class="w-card">
  10. <van-field model:value="{{ placeOfUse }}" center title-width="150rpx" label="使用地点:" placeholder="可填写卧室等地点"
  11. clearable border="{{ true }}" maxlength="10" />
  12. <van-field model:value="{{ usingHuman }}" center title-width="150rpx" label="使用人:" placeholder="可填写本人或者其他人名称"
  13. clearable border="{{ true }}" maxlength="8" />
  14. <van-field model:value="{{ sn }}" center title-width="150rpx" clearable label="SN:" placeholder=""
  15. border="{{ true }}" use-button-slot>
  16. <view slot="button" class="lysb-btn" bindtap="bindViewBlue">
  17. <image src="/subpages/images/ic_ly.png" class="ly-icon"></image>
  18. <text>蓝牙识别</text>
  19. </view>
  20. </van-field><van-field model:value="{{ ssid }}" center title-width="150rpx" label="WIFI:" placeholder="AIDSLEEP"
  21. clearable border="{{ true }}" />
  22. <van-field model:value="{{ password }}" center title-width="150rpx" label="WIFI密码:" placeholder="请输入密码"
  23. clearable border="{{ false }}" />
  24. </view>
  25. <text class="commit-btn" bindtap="commitData">提交配置</text>
  26. <!-- 选择蓝牙 -->
  27. <van-popup show="{{ showBluetoothList }}" round position="bottom" custom-style="height: 50%;background:#F7F7F7;"
  28. close-on-click-overlay="{{false}}" bind:close="onClose">
  29. <view class="bluetooth-view">
  30. <view class="bluetoothList">
  31. <view wx:for="{{deviceList}}" wx:key="index" class="bluetooth-item" data-index="{{index}}"
  32. bindtap="checkBluetoothSelectIndex">
  33. <image src="/subpages/images/ic_bluetooth.png" class="bluetooth-icon"></image>
  34. <view class="bluetooth-content">
  35. <text class="bluetooth-title">{{item.name}}</text>
  36. <text class="bluetooth-rssi">RSSI: {{item.RSSI}}</text>
  37. </view>
  38. <image src="{{bluetoothSelectIndex == index ? activeIcon : normalIcon}}" class="bluetooth-radio">
  39. </image>
  40. </view>
  41. </view>
  42. <text class="sure-btn" bindtap="commitBluetooth">确定</text>
  43. </view>
  44. </van-popup>
  45. <!-- 蓝牙识别+配置弹窗 -->
  46. <van-popup show="{{ showBluetoothConnected }}" close-on-click-overlay="{{false}}" round bind:close="onClose">
  47. <view class="bluetoothConnectedView">
  48. <view wx:if="{{!isBluetoothConnected}}" class="circle-view">
  49. <van-circle type="2d" value="{{ value }}" color="{{ gradientColor }}" size="114" stroke-width="7"
  50. layer-color="#EBEEF5">
  51. <view class="circle-content">
  52. <text class="circle-text">{{value}}%</text>
  53. <text class="circle-loading">连接中...</text>
  54. </view>
  55. </van-circle>
  56. </view>
  57. <view wx:if="{{isBluetoothConnected}}" class="circle-view">
  58. <image src="/subpages/images/ic_bluetooth_connected.png" class="bluetooth-connected-icon"></image>
  59. <text class="bluetoothConnected-tips">连接成功</text>
  60. </view>
  61. <view class="loading-list">
  62. <view wx:for="{{statusDefault}}" wx:key="index" class="loading-item"
  63. wx:if="{{bluetoothConnectedStep >= index}}">
  64. <image wx:if="{{bluetoothConnectedStep > index}}" src="/subpages/images/ic_loading_yes.png"
  65. class="bluetooth-connected-yes"></image>
  66. <van-loading wx:else color="#53DAFF" size="28rpx" />
  67. <text class="loading-title">{{item}}</text>
  68. </view>
  69. </view>
  70. <view wx:if="{{!isBluetoothConnected}}" style="height: 50rpx;"></view>
  71. <text wx:else class="bluetoothConnectedView-btn" bindtap="closeEndDialog">确定</text>
  72. </view>
  73. </van-popup>
  74. </view>