Commit d83be9dd724b5fa6fb50c22317f02af6ecfd6709

Authored by wangfan
1 parent d2a8a341

C端调整

@@ -25,11 +25,13 @@ Component({ @@ -25,11 +25,13 @@ Component({
25 this.setData({ 25 this.setData({
26 display:false, 26 display:false,
27 }) 27 })
  28 + this.triggerEvent('hide')
28 }, 29 },
29 show(){ 30 show(){
30 this.setData({ 31 this.setData({
31 display:true, 32 display:true,
32 }) 33 })
  34 + this.triggerEvent('show')
33 }, 35 },
34 } 36 }
35 }) 37 })
@@ -64,9 +64,10 @@ @@ -64,9 +64,10 @@
64 font-size: 24rpx; 64 font-size: 24rpx;
65 height: 34rpx; 65 height: 34rpx;
66 line-height: 34rpx; 66 line-height: 34rpx;
  67 + margin-top: 12rpx;
67 } 68 }
68 .item .block{ 69 .item .block{
69 - height: 74rpx; 70 + height: 52rpx;
70 align-items: flex-end; 71 align-items: flex-end;
71 } 72 }
72 .item .min-font{ 73 .item .min-font{
@@ -11,6 +11,7 @@ Page({ @@ -11,6 +11,7 @@ Page({
11 data: { 11 data: {
12 seller:{}, 12 seller:{},
13 IsCollectionSeller:false, 13 IsCollectionSeller:false,
  14 + pagesHeight:'auto'
14 }, 15 },
15 16
16 /** 17 /**
@@ -193,4 +194,14 @@ Page({ @@ -193,4 +194,14 @@ Page({
193 showDiscount(){ 194 showDiscount(){
194 this.selectComponent('#discount').show() 195 this.selectComponent('#discount').show()
195 }, 196 },
  197 + discountHide(){
  198 + this.setData({
  199 + pagesHeight:'auto'
  200 + })
  201 + },
  202 + discountShow(){
  203 + this.setData({
  204 + pagesHeight:'600rpx'
  205 + })
  206 + }
196 }) 207 })
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </block> 14 </block>
15 </swiper> 15 </swiper>
16 </view> 16 </view>
17 -<view class="pages"> 17 +<view class="pages" style="height: {{pagesHeight}};">
18 <view class="seller"> 18 <view class="seller">
19 <view class="base flex-vc"> 19 <view class="base flex-vc">
20 <view class="name">{{seller.sellername}}</view> 20 <view class="name">{{seller.sellername}}</view>
@@ -48,7 +48,9 @@ @@ -48,7 +48,9 @@
48 <view class="activity-left"> 48 <view class="activity-left">
49 <view class="activity-first flex-ll" style="align-items: flex-start"> 49 <view class="activity-first flex-ll" style="align-items: flex-start">
50 <image src="http://qn.colorcun.com/custom/lite-online/image%E5%96%87%E5%8F%AD.png"></image> 50 <image src="http://qn.colorcun.com/custom/lite-online/image%E5%96%87%E5%8F%AD.png"></image>
51 - <view class="flex-cc discount" wx:for="{{seller.activity}}" wx:if="{{index<2}}"> 51 + <view class="flex-cc discount" wx:for="{{seller.activity}}"
  52 + wx:key="seller.activity.key"
  53 + wx:if="{{index<2}}">
52 <view class="discount-left"></view> 54 <view class="discount-left"></view>
53 <view class="discount-text">{{item.title}}</view> 55 <view class="discount-text">{{item.title}}</view>
54 <view class="discount-right"></view> 56 <view class="discount-right"></view>
@@ -146,4 +148,4 @@ @@ -146,4 +148,4 @@
146 </view> 148 </view>
147 <as id="as" items="{{seller.seller_tel}}" bindclick="reservePhone">拨打电话预定</as> 149 <as id="as" items="{{seller.seller_tel}}" bindclick="reservePhone">拨打电话预定</as>
148 <getpos bindpos="onpos" id="getpos"></getpos> 150 <getpos bindpos="onpos" id="getpos"></getpos>
149 -<discount id="discount" seller="{{seller}}"></discount>  
  151 +<discount id="discount" seller="{{seller}}" bindhide="discountHide" bindshow="discountShow"></discount>
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 font-size: 30rpx; 5 font-size: 30rpx;
6 color:#353535; 6 color:#353535;
7 padding-bottom: 200rpx; 7 padding-bottom: 200rpx;
  8 + overflow: hidden;
8 } 9 }
9 .seller-banner{ 10 .seller-banner{
10 width: 100%; 11 width: 100%;
@@ -2,8 +2,6 @@ @@ -2,8 +2,6 @@
2 import util from '../../utils/util'; 2 import util from '../../utils/util';
3 import App from '../../utils/api'; 3 import App from '../../utils/api';
4 const {regeneratorRuntime} = global 4 const {regeneratorRuntime} = global
5 -import PubSub from '../../utils/PubSub'  
6 -import reddot from '../../utils/reddot';  
7 Page({ 5 Page({
8 6
9 /** 7 /**
@@ -21,14 +19,6 @@ Page({ @@ -21,14 +19,6 @@ Page({
21 onLoad: function (options) { 19 onLoad: function (options) {
22 //latitude=34.215637&longitude=108.891264&scale=16&height=397 20 //latitude=34.215637&longitude=108.891264&scale=16&height=397
23 this.options=options 21 this.options=options
24 - PubSub.on(  
25 - 'follow',  
26 - data=>{  
27 - console.log('follow.msg',data)  
28 - this.formatSellers(data);  
29 - }  
30 - )  
31 - reddot.init()  
32 }, 22 },
33 formatSellers(data){ 23 formatSellers(data){
34 let sellers=[]; 24 let sellers=[];
@@ -5,7 +5,7 @@ import App from '../../utils/api'; @@ -5,7 +5,7 @@ import App from '../../utils/api';
5 import DA from './data'; 5 import DA from './data';
6 import reddot from '../../utils/reddot'; 6 import reddot from '../../utils/reddot';
7 const {regeneratorRuntime} = global 7 const {regeneratorRuntime} = global
8 -const mapScale=16//18; 8 +const mapScale=14//18;
9 const transverseViewHeight=202; 9 const transverseViewHeight=202;
10 const renNum=function(){ 10 const renNum=function(){
11 let arr=[] 11 let arr=[]
@@ -38,6 +38,7 @@ Page({ @@ -38,6 +38,7 @@ Page({
38 hasSuggestion:false, 38 hasSuggestion:false,
39 current:0, 39 current:0,
40 hasSellers:false, 40 hasSellers:false,
  41 + hasGetSellersEnd:false,
41 hasSetActivity:false, 42 hasSetActivity:false,
42 }, 43 },
43 hasSellerConcat:hasSellerConcat, 44 hasSellerConcat:hasSellerConcat,
@@ -447,7 +448,8 @@ Page({ @@ -447,7 +448,8 @@ Page({
447 } 448 }
448 this.sellersNow=now_sid; 449 this.sellersNow=now_sid;
449 let obj={ 450 let obj={
450 - hasSellers:now_sid.length>0 451 + hasSellers:now_sid.length>0,
  452 + hasGetSellersEnd:true
451 } 453 }
452 if(this.hasSellerConcat){ 454 if(this.hasSellerConcat){
453 obj.markers=this.data.markers.concat(markers); 455 obj.markers=this.data.markers.concat(markers);
@@ -58,6 +58,7 @@ @@ -58,6 +58,7 @@
58 </swiper-item> 58 </swiper-item>
59 </block> 59 </block>
60 </swiper> 60 </swiper>
  61 + <view class="empty-txt flex-vc">{{hasGetSellersEnd?'附近无可订餐厅,建议切换其他区域查看':''}}</view>
61 </view> 62 </view>
62 </view> 63 </view>
63 </view> 64 </view>
@@ -106,4 +106,9 @@ @@ -106,4 +106,9 @@
106 line-height: 60rpx; 106 line-height: 60rpx;
107 height: 60rpx; 107 height: 60rpx;
108 overflow: hidden; 108 overflow: hidden;
  109 +}
  110 +.empty-txt{
  111 + height: 300rpx;
  112 + line-height: 300rpx;
  113 + font-size: 34rpx;
109 } 114 }