Commit fcc4b86f3d5b8c79bd523463bfac3e183c5d2eec

Authored by vking
1 parent ca837fa7

search

@@ -27,10 +27,13 @@ Component({ @@ -27,10 +27,13 @@ Component({
27 * 组件的初始数据 27 * 组件的初始数据
28 */ 28 */
29 data: { 29 data: {
30 - 30 + hidden:true,
31 }, 31 },
32 attached(){ 32 attached(){
33 this.params={} 33 this.params={}
  34 + this.setData({
  35 + hidden:!this.data.hasPage
  36 + })
34 }, 37 },
35 /** 38 /**
36 * 组件的方法列表 39 * 组件的方法列表
@@ -54,5 +57,15 @@ Component({ @@ -54,5 +57,15 @@ Component({
54 paramObj:paramObj, 57 paramObj:paramObj,
55 }) 58 })
56 }, 59 },
  60 + show(){
  61 + this.setData({
  62 + hidden:false
  63 + })
  64 + },
  65 + hide(){
  66 + this.setData({
  67 + hidden:true
  68 + })
  69 + },
57 } 70 }
58 }) 71 })
1 <!--components/reserve/search/how/index.wxml--> 1 <!--components/reserve/search/how/index.wxml-->
2 -<view class="mask" wx:if="{{!hasPage}}"></view>  
3 -<view class="{{hasPage?'pages':'pages-window'}}">  
4 - <view class="title flex-lr">  
5 - <view class="title-name">您好,几位,什么时候</view>  
6 - <view class="close"></view>  
7 - </view>  
8 - <view>  
9 - <pnum bindevent="paramEvent" pi="{{pnum_pi}}"></pnum>  
10 - <view style="margin: 60rpx 0">  
11 - <date bindevent="paramEvent" pi="{{pnum_pi}}"></date> 2 +<view hidden="{{hidden}}">
  3 + <view class="mask" wx:if="{{!hasPage}}" bindtap="hide"></view>
  4 + <view class="{{hasPage?'pages':'pages-window'}}">
  5 + <view class="title flex-lr">
  6 + <view class="title-name">您好,几位,什么时候</view>
  7 + <view class="close" bindtap="hide"></view>
  8 + </view>
  9 + <view>
  10 + <pnum bindevent="paramEvent" pi="{{pnum_pi}}"></pnum>
  11 + <view style="margin: 60rpx 0">
  12 + <date bindevent="paramEvent" pi="{{pnum_pi}}"></date>
  13 + </view>
  14 + <dur bindevent="paramEvent" pi="{{dur_pi}}"></dur>
12 </view> 15 </view>
13 - <dur bindevent="paramEvent" pi="{{dur_pi}}"></dur> 16 + <view class="submit" bindtap="submit">查找餐厅</view>
14 </view> 17 </view>
15 </view> 18 </view>
16 -<view class="submit" bindtap="submit">查找餐厅</view>  
17 -  
@@ -6,6 +6,13 @@ @@ -6,6 +6,13 @@
6 .pages-window{ 6 .pages-window{
7 padding: 58rpx 0; 7 padding: 58rpx 0;
8 border-radius:20rpx 20rpx 0 0; 8 border-radius:20rpx 20rpx 0 0;
  9 + position: fixed;
  10 + bottom: 0;
  11 + background-color: #fff;
  12 + width: 100%;
  13 + z-index: 9999;
  14 + height: 870rpx;
  15 + box-sizing: border-box;
9 } 16 }
10 .pages .close{ 17 .pages .close{
11 display: none; 18 display: none;
@@ -240,5 +240,8 @@ Page({ @@ -240,5 +240,8 @@ Page({
240 // } 240 // }
241 // }) 241 // })
242 return sellers; 242 return sellers;
  243 + },
  244 + dispalySearchHow(){
  245 + this.selectComponent('#search-how').show();
243 } 246 }
244 }) 247 })
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 "getpos":"/components/userinfo/getpos", 8 "getpos":"/components/userinfo/getpos",
9 "sb-tr":"/components/reserve/seller-box-transverse/seller-box", 9 "sb-tr":"/components/reserve/seller-box-transverse/seller-box",
10 "caixi":"/components/reserve/caixi", 10 "caixi":"/components/reserve/caixi",
  11 + "search-how":"/components/reserve/search/how/index",
11 "hr":"/components/hr" 12 "hr":"/components/hr"
12 } 13 }
13 } 14 }
1 <!--pages/reserve/indexList.wxml--> 1 <!--pages/reserve/indexList.wxml-->
2 <nav>周到安排</nav> 2 <nav>周到安排</nav>
3 <view class="header"> 3 <view class="header">
4 - <view class="transverse-search flex-ll {{hasDisabled?'disabled':''}}"> 4 + <view class="searchAddrView" bindtap="dispalySearchHow">
  5 + <view class="searchAddr flex-ll">
  6 + <image class="icon" src="http://qn.colorcun.com/reserve/images/find-black.png"></image>
  7 + <input style="width: 100%;" placeholder="您好,几位,什么时候"
  8 + type="text"
  9 + value="{{keyword}}"/>
  10 + </view>
  11 + </view>
  12 + <view class="transverse-search flex-lr {{hasDisabled?'disabled':''}}">
5 <view 13 <view
6 bindtap="caixiShow" 14 bindtap="caixiShow"
7 class="tags {{multiIndex[0]>0?'active':''}}" 15 class="tags {{multiIndex[0]>0?'active':''}}"
8 > 16 >
9 - <view class="picker flex-lr"> 17 + <view class="picker flex-cc">
10 <view class="input"> 18 <view class="input">
11 <block wx:if="{{multiIndex[0]==0}}">菜系</block> 19 <block wx:if="{{multiIndex[0]==0}}">菜系</block>
12 <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block> 20 <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block>
@@ -52,4 +60,5 @@ @@ -52,4 +60,5 @@
52 </view> 60 </view>
53 <caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" 61 <caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}"
54 bindactive="caixiActive" id="caixi" 62 bindactive="caixiActive" id="caixi"
55 -></caixi>  
  63 +></caixi>
  64 +<search-how id="search-how"></search-how>
@@ -13,32 +13,38 @@ @@ -13,32 +13,38 @@
13 width: 100%; 13 width: 100%;
14 margin: 0 auto; 14 margin: 0 auto;
15 font-size: 24rpx; 15 font-size: 24rpx;
16 - padding-left: 20rpx;  
17 } 16 }
18 .transverse-search .tags{ 17 .transverse-search .tags{
19 - height: 50rpx;  
20 - line-height: 50rpx;  
21 - background-color: #F0F0F9;  
22 - border-radius: 4rpx;  
23 - margin-right: 30rpx;  
24 - padding: 0 16rpx; 18 + height: 30rpx;
  19 + line-height: 30rpx;
  20 + /*background-color: #F0F0F9;*/
  21 + /*border-radius: 4rpx;*/
  22 + padding: 0 22rpx;
  23 + border-right:2rpx solid #E0E0E0;
  24 + text-align: center;
  25 + width: 25%;
  26 + box-sizing: border-box;
  27 +}
  28 +.transverse-search .tags:first-child{
  29 + padding-left: 0;
25 } 30 }
26 .transverse-search .tags:last-child{ 31 .transverse-search .tags:last-child{
27 margin-right: 0; 32 margin-right: 0;
  33 + border-right-width:0;
28 } 34 }
29 .transverse-search .tags.active{ 35 .transverse-search .tags.active{
30 - background-color: #F4DAB9;  
31 - color:#8B5318; 36 + /*background-color: #F4DAB9;*/
  37 + color:#C0A369;
32 font-weight: 900; 38 font-weight: 900;
33 } 39 }
34 40
35 .picker{ 41 .picker{
36 - height: 50rpx;  
37 - line-height: 50rpx; 42 + height: 30rpx;
  43 + line-height: 30rpx;
38 } 44 }
39 .picker .input{ 45 .picker .input{
40 - height: 50rpx;  
41 - line-height: 50rpx; 46 + height: 30rpx;
  47 + line-height: 30rpx;
42 margin-right: 10rpx; 48 margin-right: 10rpx;
43 } 49 }
44 .picker .more{ 50 .picker .more{
@@ -58,7 +64,7 @@ @@ -58,7 +64,7 @@
58 } 64 }
59 .pages{ 65 .pages{
60 width: 100%; 66 width: 100%;
61 - margin: 81rpx auto 0; 67 + margin: 151rpx auto 0;
62 color:#fff; 68 color:#fff;
63 font-size: 28rpx; 69 font-size: 28rpx;
64 } 70 }
@@ -96,4 +102,28 @@ @@ -96,4 +102,28 @@
96 } 102 }
97 .empty view.empry-info2{ 103 .empty view.empry-info2{
98 margin-top: 20rpx; 104 margin-top: 20rpx;
  105 +}
  106 +
  107 +.searchAddrView{
  108 + width: 100%;
  109 + height: 70rpx;
  110 + background-color: #ffffff;
  111 + z-index: 9;
  112 +}
  113 +.searchAddr {
  114 + width: 90%;
  115 + height: 60rpx;
  116 + background-color: #F5F5F5;
  117 + border-radius: 30rpx;
  118 + line-height: 60rpx;
  119 + color:#999999;
  120 + line-height: 60rpx;
  121 + font-size: 28rpx;
  122 + margin:0 auto;
  123 +}
  124 +.searchAddr .icon{
  125 + min-width: 32rpx;
  126 + width:32rpx;
  127 + height: 30rpx;
  128 + margin: 0 20rpx;
99 } 129 }