作者 吴孟雨

首页导航

@@ -5,6 +5,17 @@ const app = getApp() @@ -5,6 +5,17 @@ const app = getApp()
5 Page({ 5 Page({
6 data: { 6 data: {
7 slide: [{image: '../../images/banner.png'}, {image: '../../images/banner.png'}], 7 slide: [{image: '../../images/banner.png'}, {image: '../../images/banner.png'}],
  8 + images: [{src:'../../images/duantu@2x.png',text:'短途郊游'},
  9 + {src:'../../images/changtu@2x.png',text:'长途旅游'},
  10 + {src:'../../images/finecanting@2x.png',text:'Fine Dining 餐厅'},
  11 + {src:'../../images/huwai@2x.png',text:'户外运动'},
  12 + {src:'../../images/juhui@2x.png',text:'聚会'},
  13 + {src:'../../images/yinyuejie@2x.png',text:'音乐节'},
  14 + {src:'../../images/dianying@2x.png',text:'电影'},
  15 + {src:'../../images/qingshe@2x.png',text:'轻奢餐厅'},
  16 + {src:'../../images/zhanlan@2x.png',text:'展览'},
  17 + {src:'../../images/wutaiju@2x.png',text:'舞台剧'},
  18 + ],
8 motto: 'Hello World', 19 motto: 'Hello World',
9 userInfo: {}, 20 userInfo: {},
10 hasUserInfo: false, 21 hasUserInfo: false,
@@ -7,7 +7,10 @@ @@ -7,7 +7,10 @@
7 <text>北京</text> 7 <text>北京</text>
8 <view class="iconfont icon-arrow-down"></view> 8 <view class="iconfont icon-arrow-down"></view>
9 </view> 9 </view>
  10 + <view class="right">
10 <input type="text"/> 11 <input type="text"/>
  12 + <view class="iconfont icon-arrow-down"></view>
  13 + </view>
11 </view> 14 </view>
12 <swiper indicator-dots="{{true}}" 15 <swiper indicator-dots="{{true}}"
13 autoplay="{{true}}" interval="3000" duration="1000"> 16 autoplay="{{true}}" interval="3000" duration="1000">
@@ -20,4 +23,13 @@ @@ -20,4 +23,13 @@
20 </block> 23 </block>
21 </swiper> 24 </swiper>
22 </view> 25 </view>
  26 +
  27 + <view class="padding-box">
  28 + <view class="navigator-box">
  29 + <view class="img-box" wx:for="{{images}}" wx:key="index">
  30 + <image src="{{item.src}}"></image>
  31 + <view class="text">{{item.text}}</view>
  32 + </view>
  33 + </view>
  34 + </view>
23 </view> 35 </view>
@@ -31,14 +31,23 @@ @@ -31,14 +31,23 @@
31 color: #ffffff; 31 color: #ffffff;
32 font-size: 28rpx; 32 font-size: 28rpx;
33 } 33 }
34 -.position input { 34 +.position .right {
35 width: 478rpx; 35 width: 478rpx;
36 height: 52rpx; 36 height: 52rpx;
  37 + background-color: rgba(255,255,255,0.35);
  38 + display: flex;
  39 + align-items: center;
  40 + justify-content: space-between;
37 border-radius: 10rpx; 41 border-radius: 10rpx;
  42 + padding: 0 20rpx;
  43 + -webkit-box-sizing: border-box;
  44 + -moz-box-sizing: border-box;
  45 + box-sizing: border-box;
  46 +}
  47 +.position input {
38 color: #ffffff; 48 color: #ffffff;
39 padding-left: 20rpx; 49 padding-left: 20rpx;
40 font-size: 28rpx; 50 font-size: 28rpx;
41 - background-color: rgba(255,255,255,0.3);  
42 } 51 }
43 swiper { 52 swiper {
44 width: 100%; 53 width: 100%;
@@ -49,3 +58,72 @@ swiper { @@ -49,3 +58,72 @@ swiper {
49 width: 100%; 58 width: 100%;
50 height: 100%; 59 height: 100%;
51 } 60 }
  61 +.padding-box {
  62 + width: 100%;
  63 + height: 272rpx;
  64 + padding: 0 22rpx;
  65 + -webkit-box-sizing: border-box;
  66 + -moz-box-sizing: border-box;
  67 + box-sizing: border-box;
  68 + position: relative;
  69 + top: -22rpx;
  70 +}
  71 +.navigator-box {
  72 + width: 100%;
  73 + height: 272rpx;
  74 + display: flex;
  75 + align-items: center;
  76 + flex-wrap: wrap;
  77 + justify-content: space-between;
  78 + align-content:stretch;
  79 + background-color: #fff;
  80 + border-radius: 10rpx;
  81 + padding: 20rpx 46rpx;
  82 + -webkit-box-sizing: border-box;
  83 + -moz-box-sizing: border-box;
  84 + box-sizing: border-box;
  85 + box-shadow: 2rpx 8rpx 38rpx rgba(89, 89, 89, 0.14);
  86 +}
  87 +.navigator-box .img-box {
  88 + /*display: flex;*/
  89 + /*flex-direction: column;*/
  90 + /*align-items: center;*/
  91 + /*justify-content: center;*/
  92 + /*margin-right: 24rpx;*/
  93 + display: inline-block;
  94 + width: 18%;
  95 + height: 48%;
  96 + margin: 0 auto 8rpx auto;
  97 + /*border: 1px solid #000;*/
  98 + text-align: center;
  99 +}
  100 +.navigator-box .img-box:nth-child(3) {
  101 + width: 24%;
  102 +}
  103 +.navigator-box .img-box:nth-child(5),.navigator-box .img-box:nth-child(10) {
  104 + /*margin-right: 0;*/
  105 +}
  106 +.navigator-box .img-box:nth-child(6) {
  107 + width: 11%;
  108 +}
  109 +.navigator-box .img-box:nth-child(7) {
  110 + width: 12%;
  111 +}
  112 +.navigator-box .img-box:nth-child(8) {
  113 + width: 16%;
  114 +}
  115 +.navigator-box .img-box:nth-child(9) {
  116 + width: 12%;
  117 +}
  118 +.navigator-box .img-box:nth-child(10) {
  119 + width: 12%;
  120 +}
  121 +.img-box image {
  122 + width: 60rpx;
  123 + height: 60rpx;
  124 + margin-bottom: 10rpx;
  125 +}
  126 +.img-box .text {
  127 + font-size: 18rpx;
  128 + color: #333333;
  129 +}