addMattresses.wxml 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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="5" />
  12. <van-field model:value="{{ usingHuman }}" center title-width="150rpx" label="使用人:" placeholder="可填写本人或者其他人名称"
  13. clearable border="{{ true }}" maxlength="5" />
  14. <van-field model:value="{{ sn }}" center title-width="150rpx" clearable label="SN:" placeholder=""
  15. border="{{ true }}" readonly="{{ 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. <view slot="button" class="lysb-new-btn" bindtap="bindViewBlue">
  21. <text>蓝牙识别</text>
  22. <van-icon name="arrow" />
  23. </view>
  24. </van-field><van-field model:value="{{ ssid }}" center title-width="150rpx" label="WIFI:" placeholder="AIDSLEEP"
  25. clearable border="{{ true }}" />
  26. <van-field model:value="{{ password }}" center title-width="150rpx" label="WIFI密码:" placeholder="请输入密码"
  27. clearable border="{{ false }}" />
  28. </view>
  29. <text class="commit-btn" bindtap="commitData">提交配置</text>
  30. <!-- 选择蓝牙 -->
  31. <van-popup show="{{ showBluetoothList }}" round position="bottom" custom-style="height: 50%;background:#F7F7F7;"
  32. close-on-click-overlay="{{false}}" bind:close="onClose">
  33. <view class="bluetooth-view">
  34. <view class="bluetoothList">
  35. <view wx:for="{{deviceList}}" wx:key="index" class="bluetooth-item" data-index="{{index}}"
  36. bindtap="checkBluetoothSelectIndex">
  37. <image src="/subpages/images/ic_bluetooth.png" class="bluetooth-icon"></image>
  38. <view class="bluetooth-content">
  39. <text class="bluetooth-title">{{item.name}}</text>
  40. <text class="bluetooth-rssi">RSSI: {{item.RSSI}}</text>
  41. </view>
  42. <image src="{{bluetoothSelectIndex == index ? activeIcon : normalIcon}}" class="bluetooth-radio">
  43. </image>
  44. </view>
  45. </view>
  46. <text class="sure-btn" bindtap="commitBluetooth">确定</text>
  47. </view>
  48. </van-popup>
  49. <!-- 蓝牙识别+配置弹窗 -->
  50. <van-popup show="{{ showBluetoothConnected }}" close-on-click-overlay="{{false}}" round bind:close="onClose">
  51. <view class="bluetoothConnectedView">
  52. <view wx:if="{{!isBluetoothConnected}}" class="circle-view">
  53. <van-circle type="2d" value="{{ value }}" color="{{ gradientColor }}" size="114" stroke-width="7"
  54. layer-color="#EBEEF5">
  55. <view class="circle-content">
  56. <text class="circle-text">{{value}}%</text>
  57. <text class="circle-loading">连接中...</text>
  58. </view>
  59. </van-circle>
  60. </view>
  61. <view wx:if="{{isBluetoothConnected}}" class="circle-view">
  62. <image src="/subpages/images/ic_bluetooth_connected.png" class="bluetooth-connected-icon"></image>
  63. <text class="bluetoothConnected-tips">连接成功</text>
  64. </view>
  65. <view class="loading-list">
  66. <view wx:for="{{statusDefault}}" wx:key="index" class="loading-item"
  67. wx:if="{{bluetoothConnectedStep >= index}}">
  68. <image wx:if="{{bluetoothConnectedStep > index}}" src="/subpages/images/ic_loading_yes.png"
  69. class="bluetooth-connected-yes"></image>
  70. <van-loading wx:else color="#53DAFF" size="28rpx" />
  71. <text class="loading-title">{{item}}</text>
  72. </view>
  73. </view>
  74. <view wx:if="{{!isBluetoothConnected}}" style="height: 50rpx;"></view>
  75. <text wx:else class="bluetoothConnectedView-btn" bindtap="closeEndDialog">确定</text>
  76. </view>
  77. </van-popup>
  78. </view>