home.wxml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!--pages/home/home.wxml-->
  2. <scroll-view style="position: absolute; height: {{windowHeight-safeBottom-50}}px;" scroll-y>
  3. <!-- banner轮播图 -->
  4. <swiper class="banner" indicator-active-color="white" indicator-dots autoplay interval="5000" circular>
  5. <swiper-item class="banner_item" wx:for="{{banners}}" wx:key="id" id="{{item.id}}">
  6. <view class="swiper-item">
  7. <image src="{{item.url}}" mode="scaleToFill">第{{item.id}}张图片</image>
  8. </view>
  9. </swiper-item>
  10. </swiper>
  11. <!-- 通知栏 -->
  12. <van-notice-bar left-icon="volume-o" mode="link" bind:click="goToMsg" color="#333" background="#f3f3f3" text="在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。" scrollable></van-notice-bar>
  13. <!-- 统计 -->
  14. <view class="statistics" style="background-color: firebrick;">
  15. <view class="statistics-item" wx:for="{{statistics}}" wx:key="id" wx:for-index="idx" wx:for-item="itm">
  16. <text>{{itm.title}}</text>
  17. <text>{{itm.value}}</text>
  18. </view>
  19. </view>
  20. <!-- 功能菜单 -->
  21. <view class="menus">
  22. <view class="menu-item" wx:for="{{menus}}" wx:key="id" wx:for-index="idx" wx:for-item="itm">
  23. <!-- 钻石菜单项 -->
  24. <navigator class="menus-item1" url="{{itm[0].path}}">
  25. <text class="title" user-select>{{itm[0].title}}</text>
  26. <image src="https://img.yzcdn.cn/vant/cat.jpeg" mode="aspectFill"></image>
  27. </navigator>
  28. <!-- 功能菜单项 -->
  29. <navigator class="menus-item2" url="{{itm[1].path}}">{{itm[1].title}}</navigator>
  30. </view>
  31. </view>
  32. <!-- 搜索视图 -->
  33. <view class="search-view" style="display: flex; justify-content: space-around;">
  34. <van-search label="GIA" value="{{ value }}" shape="round" placeholder="搜索GIA证书" bind:change="onChange" bind:search="onSearch">
  35. </van-search>
  36. </view>
  37. <!-- 新闻视图 -->
  38. <view class="news-lists">
  39. <text class="title" user-select>资讯</text>
  40. <news-item class="new-lists-item" wx:for="{{news}}" wx:key="id" wx:for-item="itm" wx:for-index="idx" id="{{idx}}" bindtap="goToNews" title="{{itm.title}}" content="{{itm.content}}" imgUrl="{{itm.img}}"></news-item>
  41. </view>
  42. </scroll-view>
  43. <!-- 金价 -->
  44. <navigator class="goldprice" url="/mHome/pages/goldprice/goldprice">金价</navigator>
  45. <!-- 今日汇率 -->
  46. <navigator class="exchangerate" url="/mHome/pages/exchangeRate/exchangeRate">今日汇率</navigator>
  47. <!-- 计算器 -->
  48. <navigator class="calculator" url="/mHome/pages/calculator/calculator">计算器</navigator>