index.wxml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <!--index.wxml-->
  2. <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}}'>
  3. </nav-bar>
  4. <view class="container">
  5. <view wx:if="{{indexPage==0}}" class="mair" style="height: calc(100vh - 118rpx - {{navBarHeight}}px);">
  6. <view style="font-size: 32rpx; color: #333333; margin-top: 14rpx;">下午好,Demon</view>
  7. <!-- banner-->
  8. <view class="banner_container">
  9. <swiper class="swiper" indicator-dots="{{bannerList.length>1}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" indicator-active-color="#FFFFFF" indicator-color="#999999">
  10. <block wx:for="{{bannerList}}" wx:key="index">
  11. <swiper-item>
  12. <image class="swiper_image" src="{{item.imgUrl}}" />
  13. </swiper-item>
  14. </block>
  15. </swiper>
  16. </view>
  17. <!-- <swiper wx:if="{{banner.length>0}}" class="banner_container" indicator-dots="{{banner.length>1}}" autoplay="true" interval="2000" duration="500" circular="true">
  18. <block wx:for="{{banner}}" wx:key="index">
  19. <swiper-item>
  20. <image class="banner_item" src="{{item.image}}" mode="aspectFill" bindtap="clickActivity" data-item="{{item}}" lazy-load="true"></image>
  21. </swiper-item>
  22. </block>
  23. </swiper> -->
  24. <view class='nav-wrap' style='height: calc({{navBarHeight}}px - {{MenuButtonTop}}px); padding-top: {{MenuButtonTop}}px;'>
  25. <view wx:if="{{deviceList && deviceList.length > 0 && !showLogin}}" bindtap="isShowDevicelistFun" class="nav-info" style="height: {{ MenuButtonheight }}px;">
  26. <image class="device-pic" mode="heightFix" src="./../../img/min.png"></image>
  27. <text>{{deviceList[deviceListIndex].devName}}</text>
  28. <image class="j" mode="heightFix" src="./../../img/{{isShowDevicelist ? 'j_top' : 'j_bottom'}}.png"></image>
  29. </view>
  30. <view style="height: {{ MenuButtonheight }}px;" bindtap="goDeviceConnect" class="nav-info" wx:elif="{{deviceList && deviceList.length === 0 && !showLogin}}">
  31. <image class="z" mode="heightFix" src="./../../img/z.png"></image>
  32. <text>连接设备</text>
  33. </view>
  34. <view style="height: {{ MenuButtonheight }}px;" wx:elif="{{showLogin}}" class="nav-info">
  35. <image class="z" mode="heightFix" src="./../../img/z.png"></image>
  36. <text bindtap="goLogin">点击登录</text>
  37. </view>
  38. </view>
  39. <!--播放信息-->
  40. <view wx:if="{{isShowDevicelist}}" class="deviceList" catchtap="isShowDevicelistFun">
  41. <view class="mz">
  42. <view class="li-view" wx:for="{{deviceList}}">
  43. <view bindtap="actionDeviceIndex" style="opacity: {{item.state && item.state === 'online' ? '1' : '0.6'}};" data-index="{{index}}" class="li {{deviceListIndex === index ? 'action' : ''}}">
  44. <image mode="widthFix" src="./../../img/min.png"></image>
  45. <text class="deviceName">{{item.devName}}</text>
  46. <text class="onli">{{item.state && item.state === "online" ? "在线" : "离线"}}</text>
  47. <image data-index="{{index}}" catchtap="deleteDevice" wx:if="{{showDelete}}" class="delete" mode="widthFix" src="./../../img/l.png"></image>
  48. </view>
  49. </view>
  50. <view class="but" style="width: 100%; float: left;">
  51. <view wx:if="{{!showDelete}}"><text style="background-color: #999;" catchtap="showDelete">删除</text></view>
  52. <view wx:if="{{!showDelete}}"><text bindtap="goDeviceConnect">新增</text></view>
  53. <view wx:else><text catchtap="showDelete">完成</text></view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <view wx:else>
  59. <!-- 连接设备启用以下版本 -->
  60. <view wx:if="{{indexPage==1}}" class="mair" style="height: calc(100vh - 118rpx - {{navBarHeight}}px);">
  61. <view class="play-info">
  62. <view class="info">
  63. <image src="./../../img/blak.png" class="black" mode="scaleToFill"></image>
  64. <image src="./../../img/mm.png" class="mode" mode="scaleToFill"></image>
  65. <image class="logo" mode="heightFix" src="./../../img/logo.png"></image>
  66. <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>
  67. <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">
  68. </image>
  69. </view>
  70. <view class="fmMod" bindtap="goChnnel"></view>
  71. <view wx:if="{{actionIndex !== null}}" class="thisMusic">
  72. <text>当前播放:</text>
  73. <view class="scroll-box">
  74. <view class="scroll-wrap">
  75. <view class="scroll-item">{{channelData[actionIndex].channelName}}</view>
  76. </view>
  77. </view>
  78. </view>
  79. <image src="{{'./../../img/dl' + battery + '.png'}}" class="battery" mode="scaleToFill"></image>
  80. </view>
  81. <view class="wakeMode" bindtap="goWake">
  82. <image src="./../../img/woak.png" class="mode" mode="scaleToFill"></image>
  83. <image class="wake" mode="heightFix" src="{{isSetWake ? './../../img/n24.png' : './../../img/n23.png' }}"></image>
  84. <text>定时</text>
  85. </view>
  86. </view>
  87. <scroll-view class="pd" scroll-y="true">
  88. <view class="conm" wx:if="{{channelData && channelData.length > 0}}">
  89. <image mode="scaleToFill" class="cz" src="./../../img/cz.png"></image>
  90. <view class="musicList">
  91. <view wx:for="{{channelData}}" class="li {{index === actionIndex ? 'action' : ' '}}">
  92. <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="zz" src="./../../img/zz.png"></image>
  93. <text class="lm">{{luoma[index]}}</text>
  94. <view class="musicInfo" data-index="{{index}}" bindtap="actionMusic">
  95. <image mode="scaleToFill" class="pic" src="{{item.channelPic ? item.channelPic : './../../img/head_pic.png'}}"></image>
  96. <text>{{item.channelName}}</text>
  97. <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="svg" src="./../../svg/audio.svg"></image>
  98. </view>
  99. </view>
  100. </view>
  101. <!-- <image src="./../../svg/audio.svg"></image> -->
  102. </view>
  103. </scroll-view>
  104. <!-- 登录启用以下版本 -->
  105. <view class="gologin" wx:if="{{showLogin}}">
  106. <view class="model">
  107. <view bindtap="goLogin" style="position: none; height: auto;" class="loginPic">
  108. <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="./../../img/BG_long.png"></image>
  109. </view>
  110. <view style="position: none; height: calc(100% - 224rpx); overflow: auto;" class="BG_PD">
  111. <view>
  112. <image style="margin: 0; width: 100vw;" mode="widthFix" src="./../../img/BG_PD.png"></image>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. <view class="gologin goruter" wx:if="{{!showLogin && deviceList && deviceList.length === 0}}">
  118. <view class="model">
  119. <view bindtap="goDeviceConnect" style="position: none; height: auto;" class="loginPic">
  120. <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="./../../img/BG_LJ.png"></image>
  121. </view>
  122. <view style="position: none; height: calc(100% - 224rpx); overflow: auto;" class="BG_PD">
  123. <view>
  124. <image style="margin: 0; width: 100vw;" mode="widthFix" src="./../../img/BG_PD.png"></image>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <view wx:else class="me" style="height: calc(100vh - 100rpx - {{navBarHeight}}px);">
  131. <view class="head-logo">
  132. <image mode="scaleToFill" src="{{userPic}}"></image>
  133. <text class="userName" wx:if="{{userName}}">{{userName}}</text>
  134. </view>
  135. <view class="br"></view>
  136. <view class="list">
  137. <view class="li">
  138. <view class="icon">
  139. <image mode="widthFix" src="./../../img/o.png"></image>
  140. </view>
  141. <view class="button">
  142. <button open-type="feedback">建议与反馈</button>
  143. <image class="j" mode="heightFix" src="./../../img/b.png"></image>
  144. </view>
  145. </view>
  146. <view class="li">
  147. <view class="icon">
  148. <image mode="widthFix" src="./../../img/q.png"></image>
  149. </view>
  150. <view class="button" bindtap="goMeAbout">
  151. <text>关于我们</text>
  152. <image class="j" mode="heightFix" src="./../../img/b.png"></image>
  153. </view>
  154. </view>
  155. </view>
  156. <view wx:if="{{islogin}}" class="login">
  157. <view bindtap="goMeLogin" class="{{!islogin ? 'action' : ''}}">{{islogin ? '退出登录' : "登录"}}</view>
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. <view style="height: 98rpx;">
  163. <view class="line"></view>
  164. <view style="height: 97rpx; text-align: center; display: flex; flex: 1; align-items: center;">
  165. <view class="bottom_view" data-index="0" bind:tap="onTapIndex">
  166. <image class="bottom_image" mode="widthFix" src="{{indexPage==0?'./../../img/index_action.png':'./../../img/index_unaction.png'}}"></image>
  167. <view style="font-size: 20rpx;color: {{indexPage==0?'#A4D099':'black'}}; padding-top: 0rpx;margin-top: 0rpx;"> 首页</view>
  168. </view>
  169. <view class="bottom_view" data-index="1" bind:tap="onTapIndex">
  170. <image class="bottom_image" mode="widthFix" src="{{indexPage==1?'./../../img/channel_action.png':'./../../img/channel_unaction.png'}}"></image>
  171. <view style="font-size: 20rpx;color: {{indexPage==1?'#A4D099':'black'}};"> 频道</view>
  172. </view>
  173. <view class="bottom_view" data-index="2" bind:tap="onTapIndex">
  174. <image class="bottom_image" mode="widthFix" src="{{indexPage==2?'./../../img/me_action.png':'./../../img/me_unaction.png'}}"></image>
  175. <view style="font-size: 20rpx;color: {{indexPage==2?'#A4D099':'black'}};"> 我的</view>
  176. </view>
  177. </view>
  178. </view>
  179. <view wx:if="{{newVersion}}" class="updataminiwx">
  180. <view class="mode">
  181. <image class="bg" src="./../../img/BG@2x.png"></image>
  182. <view class="updata-view">
  183. <image src="./../../img/sj.png"></image>
  184. <text class="title">更新检测</text>
  185. <text class="tip">检测到新版本,是否重启小程序</text>
  186. <view>
  187. <text bindtap="updataClone" class="onBut">取消</text>
  188. <text bindtap="updata" class="twoBut">确定</text>
  189. </view>
  190. </view>
  191. </view>
  192. </view>