indexCopy.wxml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <!--index.wxml-->
  2. <view class="container">
  3. <view class='nav-wrap' style='height: calc({{navBarHeight}}px - {{MenuButtonTop}}px); padding-top: {{MenuButtonTop}}px;'>
  4. <view wx:if="{{deviceList && deviceList.length > 0 && !showLogin}}" bindtap="isShowDevicelistFun" class="nav-info" style="height: {{ MenuButtonheight }}px;">
  5. <image class="device-pic" mode="heightFix" src="./../../img/min.png"></image>
  6. <text>{{deviceList[deviceListIndex].devName}}</text>
  7. <image class="j" mode="heightFix" src="./../../img/{{isShowDevicelist ? 'j_top' : 'j_bottom'}}.png"></image>
  8. </view>
  9. <view style="height: {{ MenuButtonheight }}px;" bindtap="goDeviceConnect" class="nav-info" wx:elif="{{deviceList && deviceList.length === 0 && !showLogin}}" >
  10. <image class="z" mode="heightFix" src="./../../img/z.png"></image>
  11. <text>连接设备</text>
  12. </view>
  13. <view style="height: {{ MenuButtonheight }}px;" wx:elif="{{showLogin}}" class="nav-info" >
  14. <image class="z" mode="heightFix" src="./../../img/z.png"></image>
  15. <text bindtap="goLogin">点击登录</text>
  16. </view>
  17. </view>
  18. <view class="mair" style="height: calc(100vh - 22rpx - {{navBarHeight}}px);">
  19. <view wx:if="{{isShowDevicelist}}" class="deviceList" catchtap="isShowDevicelistFun">
  20. <view class="mz">
  21. <view class="li-view" wx:for="{{deviceList}}">
  22. <view bindtap="actionDeviceIndex" style="opacity: {{item.state && item.state === 'online' ? '1' : '0.6'}};" data-index="{{index}}"class="li {{deviceListIndex === index ? 'action' : ''}}">
  23. <image mode="widthFix" src="./../../img/min.png"></image>
  24. <text class="deviceName">{{item.devName}}</text>
  25. <text class="onli">{{item.state && item.state === "online" ? "在线" : "离线"}}</text>
  26. <image data-index="{{index}}" catchtap="deleteDevice" wx:if="{{showDelete}}" class="delete" mode="widthFix" src="./../../img/l.png"></image>
  27. </view>
  28. </view>
  29. <view class="but" style="width: 100%; float: left;">
  30. <view wx:if="{{!showDelete}}"><text style="background-color: #999;" catchtap="showDelete">删除</text></view>
  31. <view wx:if="{{!showDelete}}"><text bindtap="goDeviceConnect">新增</text></view>
  32. <view wx:else><text catchtap="showDelete">完成</text></view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="play-info">
  37. <view class="info">
  38. <image src="./../../img/blak.png" class="black" mode="scaleToFill"></image>
  39. <image src="./../../img/mm.png" class="mode" mode="scaleToFill"></image>
  40. <image class="logo" mode="heightFix" src="./../../img/logo.png"></image>
  41. <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>
  42. <view wx:if="{{actionIndex !== null}}" style="opacity: 1;" class="fm">FM.{{actionIndex !== null ? (actionIndex + 1 < 10 ? "0" + (actionIndex + 1) : actionIndex + 1) : 00}}
  43. <image class="gochnnalList" mode="heightFix" src="./../../img/a6.png"></image>
  44. </view>
  45. <view class="fmMod" bindtap="goChnnel"></view>
  46. <view wx:if="{{actionIndex !== null}}" class="thisMusic">
  47. <text>当前播放:</text>
  48. <view class="scroll-box">
  49. <view class="scroll-wrap">
  50. <view class="scroll-item">{{channelData[actionIndex].channelName}}</view>
  51. </view>
  52. </view>
  53. </view>
  54. <image src="{{'./../../img/dl' + battery + '.png'}}" class="battery" mode="scaleToFill"></image>
  55. </view>
  56. <view class="wakeMode" bindtap="goWake">
  57. <image src="./../../img/woak.png" class="mode" mode="scaleToFill"></image>
  58. <image class="wake" mode="heightFix" src="{{isSetWake ? './../../img/n24.png' : './../../img/n23.png' }}"></image>
  59. <text>定时</text>
  60. </view>
  61. </view>
  62. <scroll-view class="pd" scroll-y="true">
  63. <view class="conm" wx:if="{{channelData && channelData.length > 0}}">
  64. <image mode="scaleToFill" class="cz" src="./../../img/cz.png"></image>
  65. <view class="musicList" >
  66. <view wx:for="{{channelData}}" class="li {{index === actionIndex ? 'action' : ' '}}">
  67. <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="zz" src="./../../img/zz.png"></image>
  68. <text class="lm">{{luoma[index]}}</text>
  69. <view class="musicInfo" data-index="{{index}}" bindtap="actionMusic">
  70. <image mode="scaleToFill" class="pic" src="{{item.channelPic ? item.channelPic : './../../img/head_pic.png'}}"></image>
  71. <text>{{item.channelName}}</text>
  72. <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="svg" src="./../../svg/audio.svg"></image>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- <image src="./../../svg/audio.svg"></image> -->
  77. </view>
  78. </scroll-view>
  79. <!-- 登录 -->
  80. <!-- 过审暂时不启用 -->
  81. <!-- <view class="gologin" wx:if="{{showLogin}}">
  82. <view class="model">
  83. <image mode="scaleToFill" src="./../../img/yy.png"></image>
  84. <view>
  85. <image mode="heightFix" src="./../../img/r.png"></image>
  86. <text>享受独有的生活乐趣</text>
  87. <view bindtap="goLogin">连接设备</view>
  88. </view>
  89. </view>
  90. </view> -->
  91. <!-- 登录启用以下版本 -->
  92. <view class="gologin" wx:if="{{showLogin}}">
  93. <view class="model">
  94. <view bindtap="goLogin" style="position: none; height: auto;" class="loginPic">
  95. <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="./../../img/BG_long.png"></image>
  96. </view>
  97. <view style="position: none; height: calc(100% - 224rpx); overflow: auto;" class="BG_PD">
  98. <view>
  99. <image style="margin: 0; width: 100vw;" mode="widthFix" src="./../../img/BG_PD.png"></image>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <!-- 连接设备 -->
  105. <!-- 过审暂时不启用 -->
  106. <!-- <view class="gologin goruter" wx:if="{{!showLogin && deviceList && deviceList.length === 0}}">
  107. <view class="model">
  108. <view>
  109. <image mode="heightFix" src="./../../img/n.png"></image>
  110. <text>开启专属12频道</text>
  111. <view bindtap="goDeviceConnect">连接设备</view>
  112. </view>
  113. </view>
  114. </view> -->
  115. <!-- 连接设备启用以下版本 -->
  116. <view class="gologin goruter" wx:if="{{!showLogin && deviceList && deviceList.length === 0}}">
  117. <view class="model">
  118. <view bindtap="goDeviceConnect" style="position: none; height: auto;" class="loginPic">
  119. <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="./../../img/BG_LJ.png"></image>
  120. </view>
  121. <view style="position: none; height: calc(100% - 224rpx); overflow: auto;" class="BG_PD">
  122. <view>
  123. <image style="margin: 0; width: 100vw;" mode="widthFix" src="./../../img/BG_PD.png"></image>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. <view wx:if="{{newVersion}}" class="updataminiwx">
  130. <view class="mode">
  131. <image class="bg" src="./../../img/BG@2x.png" ></image>
  132. <view class="updata-view">
  133. <image src="./../../img/sj.png"></image>
  134. <text class="title">更新检测</text>
  135. <text class="tip">检测到新版本,是否重启小程序</text>
  136. <view>
  137. <text bindtap="updataClone" class="onBut">取消</text>
  138. <text bindtap="updata" class="twoBut">确定</text>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>