Commit 707c8a059a99e77d2cd6b87f3ed1e26b598bf76c

Authored by wangfan
1 parent 2d3d3856

C端调整

@@ -5,7 +5,10 @@ Component({ @@ -5,7 +5,10 @@ Component({
5 * 组件的属性列表 5 * 组件的属性列表
6 */ 6 */
7 properties: { 7 properties: {
8 - 8 + map:{
  9 + type:Object,
  10 + value:{},
  11 + }
9 }, 12 },
10 13
11 /** 14 /**
@@ -47,7 +50,7 @@ Component({ @@ -47,7 +50,7 @@ Component({
47 }, 50 },
48 gotoDiscount(){ 51 gotoDiscount(){
49 wx.navigateTo({ 52 wx.navigateTo({
50 - url:'./discount', 53 + url:util.http_build_query(this.data.map,'./discount'),
51 }) 54 })
52 }, 55 },
53 } 56 }
@@ -313,7 +313,7 @@ @@ -313,7 +313,7 @@
313 .discount .discount-text{ 313 .discount .discount-text{
314 background-image: url("http://qn.colorcun.com/reserve/images/%E4%B8%AD%E9%97%B4.jpg"); 314 background-image: url("http://qn.colorcun.com/reserve/images/%E4%B8%AD%E9%97%B4.jpg");
315 height: 40rpx; 315 height: 40rpx;
316 - min-width: 100rpx; 316 + min-width: 60rpx;
317 background-size: 100% 100%; 317 background-size: 100% 100%;
318 line-height: 40rpx; 318 line-height: 40rpx;
319 color:#F8E6C4; 319 color:#F8E6C4;
@@ -17,7 +17,10 @@ Page({ @@ -17,7 +17,10 @@ Page({
17 /** 17 /**
18 * 生命周期函数--监听页面加载 18 * 生命周期函数--监听页面加载
19 */ 19 */
  20 + options:null,
20 onLoad: function (options) { 21 onLoad: function (options) {
  22 + //latitude=34.215637&longitude=108.891264&scale=16&height=397
  23 + this.options=options
21 PubSub.on( 24 PubSub.on(
22 'follow', 25 'follow',
23 data=>{ 26 data=>{
@@ -101,12 +104,14 @@ Page({ @@ -101,12 +104,14 @@ Page({
101 size:10, 104 size:10,
102 hasMore:true, 105 hasMore:true,
103 GetCollectionSellerList(){ 106 GetCollectionSellerList(){
104 - App.Customer.GetCollectionSellerList({  
105 - openid:getApp().openid,  
106 - lat:this.location.latitude,  
107 - lng:this.location.longitude, 107 + App.Customer.GetActivitySellerList({
  108 + lat:this.options.latitude,
  109 + lng:this.options.longitude,
108 offset:this.offset, 110 offset:this.offset,
109 size:this.size, 111 size:this.size,
  112 + distance:50,
  113 + lat_extend:this.location.latitude,
  114 + lng_extend:this.location.longitude,
110 }).then(res=>{ 115 }).then(res=>{
111 let sellers=res.data; 116 let sellers=res.data;
112 let sellersLength=sellers.length; 117 let sellersLength=sellers.length;
@@ -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 + hasSetActivity:false,
41 }, 42 },
42 hasSellerConcat:hasSellerConcat, 43 hasSellerConcat:hasSellerConcat,
43 transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20 44 transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20
@@ -467,6 +468,7 @@ Page({ @@ -467,6 +468,7 @@ Page({
467 }, true) 468 }, true)
468 }, 100) 469 }, 100)
469 } 470 }
  471 + this.IsSetActivity();
470 }) 472 })
471 473
472 }, 474 },
@@ -557,10 +559,12 @@ Page({ @@ -557,10 +559,12 @@ Page({
557 url:'/pages/reserve/detail?id='+util.attr(e,'sid') 559 url:'/pages/reserve/detail?id='+util.attr(e,'sid')
558 }) 560 })
559 }, 561 },
560 - a2lshow(){  
561 - //wx.hideTabBar();  
562 - },  
563 - a2lhide(){  
564 - //wx.showTabBar(); 562 + IsSetActivity(){
  563 + let cmap=this.data.map;
  564 + App.Customer.IsSetActivity({lat:cmap.latitude,lng:cmap.longitude,distance:50}).then(res=>{
  565 + this.setData({
  566 + hasSetActivity:res.data==1,
  567 + })
  568 + })
565 }, 569 },
566 }) 570 })
@@ -68,4 +68,4 @@ @@ -68,4 +68,4 @@
68 <seller-box id="seller-box" bindevent="sellerBoxEvent"></seller-box> 68 <seller-box id="seller-box" bindevent="sellerBoxEvent"></seller-box>
69 <cover-view class="tab-patch"></cover-view> 69 <cover-view class="tab-patch"></cover-view>
70 <a2l bindshow="a2lshow" bindhide="a2lhide"></a2l> 70 <a2l bindshow="a2lshow" bindhide="a2lhide"></a2l>
71 -<ds></ds> 71 +<ds wx:if="{{hasSetActivity}}" map="{{map}}"></ds>
@@ -232,6 +232,11 @@ export default { @@ -232,6 +232,11 @@ export default {
232 'App.Invitation.InvitationList':{ 232 'App.Invitation.InvitationList':{
233 openid:'openid', 233 openid:'openid',
234 }, 234 },
  235 + //该区域是否有商家活动 0/1 无/有
  236 + 'App.Customer.IsSetActivity':null,
  237 +
  238 + //商家活动列表
  239 + 'App.Customer.GetActivitySellerList':null,
235 240
236 //上传图片,只能上传单个图片文件 241 //上传图片,只能上传单个图片文件
237 'App.Examples_Upload.UploadQn':null, 242 'App.Examples_Upload.UploadQn':null,