Commit 86b1ceade28dd9c02b78dae0a2bec9f9561d16a0

Authored by wangfan
1 parent f6206f90

C端调整

@@ -33,8 +33,8 @@ Page({ @@ -33,8 +33,8 @@ Page({
33 markers: [], 33 markers: [],
34 //polygons:{}, 34 //polygons:{},
35 //sellers:[], 35 //sellers:[],
36 - multiArray: [['不确定'], ['全部菜系']],  
37 - multiIndex: [0, 0], 36 + multiArray: ['全部菜系'],
  37 + multiIndex: [0],
38 //scrollIntoView:'', 38 //scrollIntoView:'',
39 suggestion:{}, 39 suggestion:{},
40 hasSuggestion:false,//搜索返回 40 hasSuggestion:false,//搜索返回
@@ -42,6 +42,11 @@ Page({ @@ -42,6 +42,11 @@ Page({
42 hasSellers:false, 42 hasSellers:false,
43 hasGetSellersEnd:false, 43 hasGetSellersEnd:false,
44 hasSetActivity:false, 44 hasSetActivity:false,
  45 + tags:[
  46 + {id:1,name:'环境超棒'},
  47 + {id:2,name:'菜品有特色'},
  48 + {id:3,name:'超大包间'},
  49 + ]
45 }, 50 },
46 hasClickMoveToLocation:false,//点击回到我的位置 51 hasClickMoveToLocation:false,//点击回到我的位置
47 hasSellerConcat:hasSellerConcat, 52 hasSellerConcat:hasSellerConcat,
@@ -66,7 +71,7 @@ Page({ @@ -66,7 +71,7 @@ Page({
66 // key: 'SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ' 71 // key: 'SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ'
67 // }); 72 // });
68 this.setData({ 73 this.setData({
69 - multiArray:[['不确定'].concat(renNum()), ['全部菜系'].concat(await DA.getCates())] 74 + multiArray:[['全部菜系'].concat(await DA.getCates())]
70 }) 75 })
71 mta.Page.init({ 76 mta.Page.init({
72 "appID": "500667280", 77 "appID": "500667280",
@@ -391,10 +396,16 @@ Page({ @@ -391,10 +396,16 @@ Page({
391 map:JSON.stringify({...this.mapData.region,scale:this.mapData.scale}) 396 map:JSON.stringify({...this.mapData.region,scale:this.mapData.scale})
392 } 397 }
393 if(this.data.multiIndex[0]>0){ 398 if(this.data.multiIndex[0]>0){
394 - param.pnum=this.data.multiIndex[0]; 399 + param.cuisine=await DA.getCatesID(this.data.multiIndex[0]-1);
395 } 400 }
396 - if(this.data.multiIndex[1]>0){  
397 - param.cuisine=await DA.getCatesID(this.data.multiIndex[1]-1); 401 + let tags=[];
  402 + this.data.tags.forEach(t=>{
  403 + if(t.active){
  404 + tags.push(t.id)
  405 + }
  406 + })
  407 + if(tags.length>0){
  408 + param.tags=tags;
398 } 409 }
399 let now_sid=[]; 410 let now_sid=[];
400 App.Customer.SellerList(param).then(res => { 411 App.Customer.SellerList(param).then(res => {
@@ -532,7 +543,7 @@ Page({ @@ -532,7 +543,7 @@ Page({
532 multiIndex:val 543 multiIndex:val
533 }) 544 })
534 this.hasSellerConcat=hasSellerConcat; 545 this.hasSellerConcat=hasSellerConcat;
535 - if(val[0]>0 || val[1]>0){ 546 + if(val[0]>0){
536 this.hasSellerConcat=false; 547 this.hasSellerConcat=false;
537 this.sellersIds=[]; 548 this.sellersIds=[];
538 } 549 }
@@ -633,4 +644,20 @@ Page({ @@ -633,4 +644,20 @@ Page({
633 } 644 }
634 return mks; 645 return mks;
635 }, 646 },
  647 + tagsChange(e){
  648 + let id=util.attr(e,'id');
  649 + let tags=this.data.tags;
  650 + tags.forEach(t=>{
  651 + if(t.id==id){
  652 + t.active=!t.active
  653 + }
  654 + })
  655 + this.setData({
  656 + tags:tags,
  657 + })
  658 + setTimeout(()=>{
  659 + this.getMarkers();
  660 + },0)
  661 +
  662 + },
636 }) 663 })
@@ -27,22 +27,28 @@ @@ -27,22 +27,28 @@
27 </formids> 27 </formids>
28 </view> 28 </view>
29 <view class="transverse-view"> 29 <view class="transverse-view">
30 - <view class="transverse-search"> 30 + <view class="transverse-search flex-ll">
31 <picker 31 <picker
32 mode="multiSelector" 32 mode="multiSelector"
33 bindchange="bindMultiPickerChange" 33 bindchange="bindMultiPickerChange"
34 bindcolumnchange="bindMultiPickerColumnChange" 34 bindcolumnchange="bindMultiPickerColumnChange"
35 value="{{multiIndex}}" 35 value="{{multiIndex}}"
36 range="{{multiArray}}" 36 range="{{multiArray}}"
  37 + class="tags {{multiIndex[0]>0?'active':''}}"
37 > 38 >
38 - <view class="picker flex-lr" style="width: 100%"> 39 + <view class="picker flex-lr">
39 <view class="input"> 40 <view class="input">
40 - <block wx:if="{{multiIndex[0]==0 && multiIndex[1]==0}}">贵宾几位,吃点什么?</block>  
41 - <block wx:else="">{{multiArray[0][multiIndex[0]]}},{{multiArray[1][multiIndex[1]]}}</block> 41 + <block wx:if="{{multiIndex[0]==0}}">菜系</block>
  42 + <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block>
42 </view> 43 </view>
43 <view class="more"></view> 44 <view class="more"></view>
44 </view> 45 </view>
45 </picker> 46 </picker>
  47 + <block wx:for="{{tags}}" wx:key="tags.key">
  48 + <view class="tags {{item.active?'active':''}}"
  49 + bindtap="tagsChange"
  50 + data-id="{{item.id}}">{{item.name}}</view>
  51 + </block>
46 </view> 52 </view>
47 <view class="transverse-list"> 53 <view class="transverse-list">
48 <swiper 54 <swiper
@@ -45,8 +45,12 @@ @@ -45,8 +45,12 @@
45 .transverse-search{ 45 .transverse-search{
46 background-color: #fefefe; 46 background-color: #fefefe;
47 height: 60rpx; 47 height: 60rpx;
48 - width: 100%; 48 + width: 90%;
  49 + margin: 0 auto;
49 padding-top: 20rpx; 50 padding-top: 20rpx;
  51 + font-size: 24rpx;
  52 + padding-left: 40rpx;
  53 +
50 } 54 }
51 .transverse-list{ 55 .transverse-list{
52 background-color: #fefefe; 56 background-color: #fefefe;
@@ -61,7 +65,7 @@ @@ -61,7 +65,7 @@
61 height: 300rpx; 65 height: 300rpx;
62 overflow: hidden; 66 overflow: hidden;
63 color: #353535; 67 color: #353535;
64 - width: 96%; 68 + width: 86%;
65 border: 2rpx solid #E0E0E0; 69 border: 2rpx solid #E0E0E0;
66 border-left: 6rpx solid #F05522; 70 border-left: 6rpx solid #F05522;
67 border-radius: 6rpx; 71 border-radius: 6rpx;
@@ -97,28 +101,19 @@ @@ -97,28 +101,19 @@
97 } 101 }
98 102
99 .picker{ 103 .picker{
100 - border-radius: 30rpx;  
101 - margin: 0 20rpx;  
102 - height: 55rpx;  
103 - padding: 0 30rpx;  
104 - line-height: 55rpx;  
105 - font-size: 28rpx;  
106 - max-width: 650rpx;  
107 - box-shadow: 0 0 4rpx 2rpx #E0E0E0; 104 + height: 50rpx;
  105 + line-height: 50rpx;
108 } 106 }
109 .picker .input{ 107 .picker .input{
110 - background-image: url("http://qn.colorcun.com/custom/lite-online/image/write.png");  
111 - background-repeat: no-repeat;  
112 - text-indent: 50rpx;  
113 - background-size: 30rpx 28rpx;  
114 - height: 30rpx;  
115 - line-height: 30rpx; 108 + height: 50rpx;
  109 + line-height: 50rpx;
  110 + margin-right: 10rpx;
116 } 111 }
117 .picker .more{ 112 .picker .more{
118 - background-image: url("http://qn.colorcun.com/custom/lite-online/image/more-pull2.png");  
119 - width: 24rpx;  
120 - height: 14rpx;  
121 - min-width:24rpx; 113 + background-image: url("http://qn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB.png");
  114 + width: 12rpx;
  115 + height: 16rpx;
  116 + min-width:12rpx;
122 } 117 }
123 118
124 .searchAddr { 119 .searchAddr {
@@ -148,4 +143,19 @@ @@ -148,4 +143,19 @@
148 height: 300rpx; 143 height: 300rpx;
149 line-height: 300rpx; 144 line-height: 300rpx;
150 font-size: 34rpx; 145 font-size: 34rpx;
  146 +}
  147 +
  148 +.transverse-search .tags{
  149 + height: 50rpx;
  150 + line-height: 50rpx;
  151 + background-color: #F0F0F9;
  152 + border-radius: 4rpx;
  153 + margin-right: 30rpx;
  154 + padding: 0 16rpx;
  155 +}
  156 +.transverse-search .tags:last-child{
  157 + margin-right: 0;
  158 +}
  159 +.transverse-search .tags.active{
  160 + background:linear-gradient(to bottom ,#F9E2B9, #FEBF72)
151 } 161 }