camera.wxml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <!--pages/light/light.wxml-->
  2. <view class="lamp" hover-class="none" hover-stop-propagation="false">
  3. <view class="lamp_header">
  4. <scanHandle
  5. state="{{ble.state}}"
  6. dev-name="{{ble.devName}}"
  7. bindsearchDevice="searchDeviceHandle"
  8. />
  9. </view>
  10. <view class="lamp__content" style="background-color:{{lamp.bgc}}">
  11. <!-- 设备列表 -->
  12. <tabList
  13. wx:if="{{ble.state === connectStateTypes.scaning || ble.state === connectStateTypes.connecting}}"
  14. ble-devs="{{ bleDevs }}"
  15. bindconnectDev="connectDevHandle">
  16. </tabList>
  17. <!-- 灯光控制 -->
  18. <view class="lampControl"
  19. wx:if="{{ble.state === connectStateTypes.connected}}"
  20. >
  21. <!-- 占位块 -->
  22. <view class="lampControl__placeholder"></view>
  23. <!-- 开关 -->
  24. <view class="lampControl_chunk lampControl_title lampControl__switch"
  25. bindtap="switchHandle"
  26. >
  27. <!-- icon -->
  28. <view class="{{lamp.switch?'lampControl__switch switch-open':'lampControl__switch' }}">
  29. <image src="/icons/png/switch.png" />
  30. </view>
  31. <!-- 文字 -->
  32. <view class="lampControl__switch-text">
  33. <text>{{lamp.switch ? '关闭' : '打开'}}</text>
  34. </view>
  35. </view>
  36. <!-- 亮度 -->
  37. <view class="lampControl_chunk lampControl__brightness">
  38. <!-- 文字 -->
  39. <view class="lampControl_title">
  40. <text>亮度</text>
  41. <!-- 值 -->
  42. <text class="subTitle">{{lamp.brightness}}%</text>
  43. </view>
  44. <!-- 滑块 -->
  45. <view class="lampControl_slider">
  46. <slider
  47. value="{{lamp.brightness}}"
  48. min="0"
  49. max="100"
  50. disabled="{{!lamp.switch}}"
  51. bindchange="brightnessChangeHandle"
  52. />
  53. </view>
  54. </view>
  55. <!-- 色温 -->
  56. <view class="lampControl_chunk lampControl__color">
  57. <!-- 文字 -->
  58. <view class="lampControl_title">
  59. <text>色温</text>
  60. <!-- 分隔装饰 -->
  61. <!-- 值 -->
  62. <text class="subTitle">{{lamp.colorTemperature}}K</text>
  63. </view>
  64. <!-- 滑块 -->
  65. <view class="lampControl_slider">
  66. <slider
  67. value="{{lamp.colorTemperature}}"
  68. min="{{lamp.temp_min}}"
  69. max="{{lamp.temp_max}}"
  70. step="{{lamp.temp_step}}"
  71. disabled="{{!lamp.switch || lamp.fullOpen}}"
  72. bindchange="colorChangeHandle"
  73. />
  74. </view>
  75. </view>
  76. <view class="lampControl_chunk lampControl_title lampControl__color"
  77. bindtap="fullModeSwitchHandle"
  78. >
  79. <!-- icon -->
  80. <view class="{{lamp.fullOpen?'lampControl__switch switch-open':'lampControl__switch' }}">
  81. <image src="/icons/png/switch.png" />
  82. </view>
  83. <!-- 文字 -->
  84. <view class="lampControl__switch-text">
  85. <text>{{lamp.fullOpen ? '关闭' : '全开模式'}}</text>
  86. </view>
  87. </view>
  88. <!-- todo: 更多自定义模式 -->
  89. </view>
  90. <!-- 开始扫描按钮 -->
  91. <view class="lampControl lampControl__scan"
  92. wx:if="{{ble.state === connectStateTypes.unConnect}}"
  93. >
  94. <view class="lampControl__item" data-dev="{{'sony-a7c'}}" bindtap="switchCameraHandle">
  95. <text>查找 SONY A7C 设备</text>
  96. </view>
  97. </view>
  98. </view>
  99. </view>