Commit 09312241b06313711975ea5a225605ff381f09d7

Authored by vking
1 parent 6ee99a2e

new 2.0

@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 </view> 8 </view>
9 <view class="view detail margin-left-sm flex-treble margin-top-sm text-cut"> 9 <view class="view detail margin-left-sm flex-treble margin-top-sm text-cut">
10 <view class="view flex align-center justify-between" style="height: 52rpx;"> 10 <view class="view flex align-center justify-between" style="height: 52rpx;">
11 - <view class="view title text-bold text-cut">{{seller.sellername}}</view> 11 + <view class="view title text-bold text-cut margin-right-sm">{{seller.sellername}}</view>
12 <view class="view text-gray" style="font-size: 26rpx;">{{util.distance(seller.distance||seller.distance_centre)}}</view> 12 <view class="view text-gray" style="font-size: 26rpx;">{{util.distance(seller.distance||seller.distance_centre)}}</view>
13 </view> 13 </view>
14 <view class="view flex align-center justify-between text-gray margin-top-xs" style="height: 36rpx;"> 14 <view class="view flex align-center justify-between text-gray margin-top-xs" style="height: 36rpx;">
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <view class="view flex align-center margin-top-xs active" style="height: 36rpx;"> 24 <view class="view flex align-center margin-top-xs active" style="height: 36rpx;">
25 <block wx:for="{{seller.activity}}" wx:key="selleractivitykey" wx:if="{{index<3}}"> 25 <block wx:for="{{seller.activity}}" wx:key="selleractivitykey" wx:if="{{index<3}}">
26 <view class="cu-tag line-yellow view"> 26 <view class="cu-tag line-yellow view">
27 - <text class="text-orange">{{item.title}}</text> 27 + <text class="text-orange">{{(item.type==2?'满赠':item.title)}}</text>
28 </view> 28 </view>
29 </block> 29 </block>
30 </view> 30 </view>
@@ -262,6 +262,7 @@ Page({ @@ -262,6 +262,7 @@ Page({
262 this.markertap({markerId:this.data.markers[0].id}) 262 this.markertap({markerId:this.data.markers[0].id})
263 } 263 }
264 }, 264 },
  265 + hasScrollToIng:false,
265 markertap(e,scrollTo=true){ 266 markertap(e,scrollTo=true){
266 if(!e.markerId || e.markerId=='local') return; 267 if(!e.markerId || e.markerId=='local') return;
267 let markers=this.data.markers 268 let markers=this.data.markers
@@ -294,10 +295,13 @@ Page({ @@ -294,10 +295,13 @@ Page({
294 markers: markers, 295 markers: markers,
295 activeSellerID:this.activeSellerID, 296 activeSellerID:this.activeSellerID,
296 }; 297 };
  298 + this.hasScrollToIng=false
297 if(scrollTo){ 299 if(scrollTo){
298 obj.scrollSellerID=this.activeSellerID 300 obj.scrollSellerID=this.activeSellerID
  301 + this.hasScrollToIng=true
299 } 302 }
300 this.setData(obj) 303 this.setData(obj)
  304 + setTimeout(()=>{this.hasScrollToIng=false},800)
301 }, 305 },
302 filterGroupData:{}, 306 filterGroupData:{},
303 filterGroupEvent(e){ 307 filterGroupEvent(e){
@@ -311,10 +315,11 @@ Page({ @@ -311,10 +315,11 @@ Page({
311 } 315 }
312 }, 316 },
313 scrollEvent(e){ 317 scrollEvent(e){
  318 + if(this.hasScrollToIng)return;
314 let idx=0 319 let idx=0
315 if(e.detail.scrollTop>20){ 320 if(e.detail.scrollTop>20){
316 - idx=parseInt(e.detail.scrollTop/162)  
317 - let ms=(e.detail.scrollTop%162)>100?1:0; 321 + idx=parseInt(e.detail.scrollTop/182)
  322 + let ms=(e.detail.scrollTop%(182*(idx>0?idx:1)))>80?1:0;
318 idx+=ms; 323 idx+=ms;
319 } 324 }
320 this.debounce(()=>{ 325 this.debounce(()=>{
@@ -13,7 +13,11 @@ @@ -13,7 +13,11 @@
13 enable-rotate 13 enable-rotate
14 subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" 14 subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ"
15 layer-style="2" 15 layer-style="2"
16 - style="width: 100%; height: 30vh;"></map> 16 + style="width: 100%; height: 30vh;position: relative;">
  17 + <view bindtap="moveToLocation" class="view moveToLocation flex align-center justify-center">
  18 + <image class="moveToLocation-image" src="http://nosqn.colorcun.com/2.0/home%20%2811%29.png"></image>
  19 + </view>
  20 +</map>
17 <view class="view content" style="height: 70vh;"> 21 <view class="view content" style="height: 70vh;">
18 <filter-group height="{{height}}" 22 <filter-group height="{{height}}"
19 id="filter-group" 23 id="filter-group"
@@ -59,7 +63,7 @@ @@ -59,7 +63,7 @@
59 scroll-into-view="seller-{{scrollSellerID}}" 63 scroll-into-view="seller-{{scrollSellerID}}"
60 scroll-with-animation 64 scroll-with-animation
61 bindscroll="scrollEvent" 65 bindscroll="scrollEvent"
62 - style="width:100%;height: {{height-50}}px;"> 66 + style="width:100%;height: calc(70vh - 50px);">
63 <block wx:for="{{sellers}}" wx:key="sellers" > 67 <block wx:for="{{sellers}}" wx:key="sellers" >
64 <navigator url="/pages/reserve/detail?id={{item.id}}" hover-class="navigator-hover"> 68 <navigator url="/pages/reserve/detail?id={{item.id}}" hover-class="navigator-hover">
65 <seller-card class="seller-card" id="seller-{{item.id}}" 69 <seller-card class="seller-card" id="seller-{{item.id}}"
@@ -73,9 +77,6 @@ @@ -73,9 +77,6 @@
73 77
74 </view> 78 </view>
75 <getpos bindpos="onpos" id="getpos" hasAllowLoading="{{false}}"></getpos> 79 <getpos bindpos="onpos" id="getpos" hasAllowLoading="{{false}}"></getpos>
76 -<view bindtap="moveToLocation" class="view moveToLocation flex align-center justify-center">  
77 - <image class="moveToLocation-image" src="http://nosqn.colorcun.com/2.0/home%20%2811%29.png"></image>  
78 -</view>  
79 <navigator url="/pages/me/index" hover-class="navigator-hover"> 80 <navigator url="/pages/me/index" hover-class="navigator-hover">
80 <view style="top:{{meTop}}px;" 81 <view style="top:{{meTop}}px;"
81 class="me view flex flex-direction align-center justify-center bg-white round"> 82 class="me view flex flex-direction align-center justify-center bg-white round">
@@ -5,11 +5,11 @@ page{ @@ -5,11 +5,11 @@ page{
5 /*--barHeight: calc(98rpx + env(safe-area-inset-bottom));*/ 5 /*--barHeight: calc(98rpx + env(safe-area-inset-bottom));*/
6 } 6 }
7 .moveToLocation{ 7 .moveToLocation{
8 - position: fixed; 8 + position: absolute;
9 width: 80rpx; 9 width: 80rpx;
10 height: 80rpx; 10 height: 80rpx;
11 right:0rpx; 11 right:0rpx;
12 - top:280rpx; 12 + bottom:0;
13 } 13 }
14 .moveToLocation-image{ 14 .moveToLocation-image{
15 width: 40rpx; 15 width: 40rpx;