jufubao-mall 2.0.35-beta7 → 2.0.35-beta9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
@on-close-marker="(item)=>{handleShowMarker(item,false)}"
|
|
34
34
|
@regionchange="handleRegionChange"
|
|
35
35
|
@init="handleH5Init"
|
|
36
|
-
@on-detail="
|
|
36
|
+
@on-detail="handleBaiduToEvent"
|
|
37
37
|
></xd-baidu-map>
|
|
38
38
|
<!--#endif-->
|
|
39
39
|
<!-- #ifdef MP-WEIXIN -->
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
:latitude="mapCenter.latitude"
|
|
47
47
|
:markers="marketList"
|
|
48
48
|
@markertap="handleMarketTap"
|
|
49
|
+
@callouttap="handleWxToEvent"
|
|
49
50
|
@regionchange="handleRegionChange"
|
|
50
51
|
>
|
|
51
52
|
<cover-view
|
|
@@ -58,7 +59,12 @@
|
|
|
58
59
|
:marker-id="item.id"
|
|
59
60
|
style="background: rgba(0,0,0,.8);border-radius: 6px;padding: 8px 12px;color: #fff;"
|
|
60
61
|
:style="{display: item.id === showMarkerId ? 'block' : 'none'}"
|
|
61
|
-
>
|
|
62
|
+
>
|
|
63
|
+
<view class="callout-text">
|
|
64
|
+
<text>{{ item.title }}</text>
|
|
65
|
+
<xd-font-icon icon="iconxiangyou_xian" color="#fff" size="28"></xd-font-icon>
|
|
66
|
+
</view>
|
|
67
|
+
</cover-view>
|
|
62
68
|
</cover-view>
|
|
63
69
|
</map>
|
|
64
70
|
<view class="weiXinLocation" v-if="mpLocationFn === 'getLocation'" @click="handleWXLocation">定位</view>
|
|
@@ -85,7 +91,12 @@
|
|
|
85
91
|
<!--shop-->
|
|
86
92
|
<view class="shop_list" :style="[contStyleComp]">
|
|
87
93
|
<template v-if="nearbyShopList === null || (nearbyShopList && nearbyShopList.length > 0)">
|
|
88
|
-
<scroll-view
|
|
94
|
+
<scroll-view
|
|
95
|
+
scroll-y
|
|
96
|
+
class="scroll_y"
|
|
97
|
+
:scroll-into-view="intoViewResourceShopId"
|
|
98
|
+
scroll-with-animation
|
|
99
|
+
>
|
|
89
100
|
<template v-if="nearbyShopList === null">
|
|
90
101
|
<view class="shop_list-ske" :id="i" v-for="i in 6" :key="i" :style="[cusStyle.item]">
|
|
91
102
|
<view class="shop_list-ske-title">
|
|
@@ -100,35 +111,40 @@
|
|
|
100
111
|
</view>
|
|
101
112
|
</template>
|
|
102
113
|
<template v-else-if="nearbyShopList.length >0">
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
<template v-for="(item,index) in nearbyShopList">
|
|
115
|
+
<view
|
|
116
|
+
:style="[
|
|
117
|
+
cusStyle.item,
|
|
118
|
+
(index === 0?{marginTop: itemTop + 'rpx'}:{}),
|
|
119
|
+
(index === nearbyShopList.length -1?{marginBottom: 0}:{})
|
|
120
|
+
]"
|
|
121
|
+
class="shop_list-item"
|
|
122
|
+
:class='[{"shop_list-item-act":resource_shop_id === item.resource_shop_id}]'
|
|
123
|
+
:key="item.key"
|
|
124
|
+
:id="`scroll-${item.resource_shop_id}`"
|
|
125
|
+
@click="handleToEvent(item, 'shop')"
|
|
126
|
+
>
|
|
127
|
+
<view class="shop_list-item-title">
|
|
128
|
+
<view class="title">
|
|
129
|
+
<view>{{item.resource_shop_name}}</view>
|
|
130
|
+
<view class="active" v-if="resource_shop_id === item.resource_shop_id">正在预览</view>
|
|
131
|
+
</view>
|
|
132
|
+
<view @click.stop="handleToEvent(item, 'detail')">
|
|
133
|
+
<text>详情</text>
|
|
134
|
+
<xd-font-icon icon="iconxiangyou_xian" color="#999" size="30" width="26" height="26"></xd-font-icon>
|
|
135
|
+
</view>
|
|
117
136
|
</view>
|
|
118
|
-
<view
|
|
119
|
-
<
|
|
120
|
-
<
|
|
137
|
+
<view class="address" :style="{marginBottom:item['business_time_name']?'16rpx':0}">
|
|
138
|
+
<view>{{item.address}}</view>
|
|
139
|
+
<view
|
|
140
|
+
v-if="item.distance_conversion || item.distance"
|
|
141
|
+
:style="[cusStyle.distance]"
|
|
142
|
+
>{{item.distance_conversion || item.distance}}</view>
|
|
121
143
|
</view>
|
|
144
|
+
<view class="openTime" v-if="item['business_time_name']">营业时间:{{item['business_time_name']}}</view>
|
|
122
145
|
</view>
|
|
123
|
-
<view
|
|
124
|
-
|
|
125
|
-
<view
|
|
126
|
-
v-if="item.distance_conversion || item.distance"
|
|
127
|
-
:style="[cusStyle.distance]"
|
|
128
|
-
>{{item.distance_conversion || item.distance}}</view>
|
|
129
|
-
</view>
|
|
130
|
-
<view class="openTime" v-if="item['business_time_name']">营业时间:{{item['business_time_name']}}</view>
|
|
131
|
-
</view>
|
|
146
|
+
<view v-if="index === nearbyShopList.length -1" :style="{height: itemBottom + 'rpx'}"></view>
|
|
147
|
+
</template>
|
|
132
148
|
</template>
|
|
133
149
|
</scroll-view>
|
|
134
150
|
</template>
|
|
@@ -213,6 +229,9 @@
|
|
|
213
229
|
//style
|
|
214
230
|
bodyPadding: {},
|
|
215
231
|
cusStyle: {},
|
|
232
|
+
cardItemShadowWidth:0,
|
|
233
|
+
itemTop:0,
|
|
234
|
+
itemBottom:0,
|
|
216
235
|
contentBgColor: 'rgba(0,0,0,0)',
|
|
217
236
|
|
|
218
237
|
//选项卡
|
|
@@ -253,13 +272,23 @@
|
|
|
253
272
|
},
|
|
254
273
|
contStyleComp(){
|
|
255
274
|
let height = this.layoutInfo.bodyMinHeightRpx - 72;
|
|
275
|
+
let padding = this.getMarginAndPadding(this.bodyPadding, 0);
|
|
256
276
|
//大于一个标签显示标签
|
|
257
277
|
if(this.titleList.length > 1) height = height - 100;
|
|
258
278
|
if(this.mapIsExtend) height = height - 500;
|
|
259
|
-
|
|
279
|
+
|
|
280
|
+
//有投影信息
|
|
281
|
+
if(this.cardItemShadowWidth > 0) {
|
|
282
|
+
padding = 0;
|
|
283
|
+
}
|
|
284
|
+
//无投影信息
|
|
285
|
+
else {
|
|
286
|
+
height = height - this.getPMValue(this.bodyPadding, 'TB', 0);
|
|
287
|
+
}
|
|
288
|
+
|
|
260
289
|
return {
|
|
261
290
|
height: height + 'rpx',
|
|
262
|
-
padding:
|
|
291
|
+
padding: padding,
|
|
263
292
|
backgroundColor: this.contentBgColor
|
|
264
293
|
}
|
|
265
294
|
},
|
|
@@ -383,13 +412,24 @@
|
|
|
383
412
|
//门店列表
|
|
384
413
|
let cardItemSpace = gCPVal(container,'cardItemSpace', [16,20], {sKey:'cardItemSpaceStatus',fields:['cardItemSpace'],cusFields: ['shopStyle','cardItemSpace',shopStyle]});
|
|
385
414
|
let cardItemRadius = gCPVal(container,'cardItemRadius', [sValue===shopStyle?0:this.gStyleValue.radius, 0], {sKey:'cardItemRadiusStatus',fields:['listItemRadius']})|| 0;
|
|
386
|
-
let cardItemShadow = gCPVal(container, 'cardItemShadow', [this.gStyleValue.shadow, {color:'',width:'0'
|
|
415
|
+
let cardItemShadow = gCPVal(container, 'cardItemShadow', [this.gStyleValue.shadow, {color:'',width:'0'}],{isShadow: true});
|
|
387
416
|
let cardItemBorder = gCPVal(container, 'cardItemBorder', [{color: '#f8f8f8',width: 0,style: 'solid'},{color: '#f8f8f8',width: 0,style: 'solid'}],{isBorder: true});
|
|
388
417
|
let distanceColor = gCPVal(container,'distanceColor', '#999999', {sKey:'distanceColorStatus',fields:['distanceColor']});
|
|
389
418
|
let cardItemBgColor = gCPVal(container,'cardItemBgColor', '#fff', {sKey:'cardItemBgColorStatus',fields:['cardItemBgColor']});
|
|
390
419
|
let itemPadding = gCPVal(container,'itemPadding', [{top:32,left:32, right:32, bottom:32},20], {sKey:'itemPaddingStatus',fields:['itemPadding'],isPMR: true});
|
|
391
420
|
let cardImageBorder = gCPVal(container, 'cardImageBorder', [{color: '#f8f8f8',width: 0,style: 'solid'},{color: '#f8f8f8',width: '2rpx',style: 'solid'}],{isBorder: true});
|
|
392
421
|
let itemImageRadius = gCPVal(container,'itemImageRadius', [this.gStyleValue.radius/2, 0], {sKey:'itemImageRadiusStatus',fields:['itemImageRadius']})||0;
|
|
422
|
+
this.cardItemShadowWidth = gCPVal(container, 'cardItemShadow', [this.gStyleValue.shadow, {color:'',width:'0'}], {isShadow:true, isBsWidth: true});
|
|
423
|
+
let right = Math.max(this.cardItemShadowWidth,this.bodyPadding.right);
|
|
424
|
+
let left = Math.max(this.cardItemShadowWidth,this.bodyPadding.left);
|
|
425
|
+
this.itemTop = Math.max(this.cardItemShadowWidth,this.bodyPadding.top);
|
|
426
|
+
this.itemBottom = Math.max(this.cardItemShadowWidth,this.bodyPadding.bottom);
|
|
427
|
+
if(this.cardItemShadowWidth === 0) {
|
|
428
|
+
right = 0; left = 0;
|
|
429
|
+
this.itemTop = 0;
|
|
430
|
+
this.itemBottom = 0;
|
|
431
|
+
}
|
|
432
|
+
|
|
393
433
|
this.cusStyle = {
|
|
394
434
|
'item':{
|
|
395
435
|
'margin-bottom': `${cardItemSpace}rpx`,
|
|
@@ -398,6 +438,8 @@
|
|
|
398
438
|
'border': cardItemBorder,
|
|
399
439
|
'backgroundColor': cardItemBgColor,
|
|
400
440
|
'padding': this.getMarginAndPadding(itemPadding, 0),
|
|
441
|
+
'margin-right': `${right}rpx`,
|
|
442
|
+
'margin-left': `${left}rpx`
|
|
401
443
|
},
|
|
402
444
|
'image':{
|
|
403
445
|
'border-radius': itemImageRadius + 'rpx',
|
|
@@ -498,9 +540,14 @@
|
|
|
498
540
|
|
|
499
541
|
handleMarketTap(e){
|
|
500
542
|
this.showMarkerId = e.markerId;
|
|
543
|
+
this.resource_shop_id = e.markerId;
|
|
544
|
+
setTimeout(()=>{
|
|
545
|
+
this.intoViewResourceShopId = `scroll-${e.markerId}`;
|
|
546
|
+
},50)
|
|
501
547
|
},
|
|
502
548
|
|
|
503
549
|
// #endif
|
|
550
|
+
|
|
504
551
|
// #ifdef H5
|
|
505
552
|
handleH5Init(){
|
|
506
553
|
this.getNearbyShop();
|
|
@@ -716,14 +763,20 @@
|
|
|
716
763
|
},
|
|
717
764
|
|
|
718
765
|
|
|
766
|
+
|
|
719
767
|
//==点击事件===========
|
|
768
|
+
handleWxToEvent(e){
|
|
769
|
+
this.handleToEvent({resource_shop_id: e.detail.markerId},'shop');
|
|
770
|
+
},
|
|
771
|
+
handleBaiduToEvent({item}){
|
|
772
|
+
this.handleToEvent({resource_shop_id: item.id},'shop');
|
|
773
|
+
},
|
|
720
774
|
/**
|
|
721
775
|
* @description
|
|
722
776
|
* @param item
|
|
723
777
|
* @param type detail|shop
|
|
724
778
|
*/
|
|
725
779
|
handleToEvent(item,type) {
|
|
726
|
-
debugger
|
|
727
780
|
let parmas = [];
|
|
728
781
|
let url = ''
|
|
729
782
|
if(item['resource_shop_id']) parmas.push(`resource_shop_id=${item['resource_shop_id']}`)
|
|
@@ -780,8 +833,7 @@
|
|
|
780
833
|
background: #fff;
|
|
781
834
|
font-size: unit(28, rpx);
|
|
782
835
|
.mpa_wrap {
|
|
783
|
-
|
|
784
|
-
height: 460rpx;
|
|
836
|
+
height: 500rpx;
|
|
785
837
|
background: #fff;
|
|
786
838
|
transition: all .3s ease-in-out;
|
|
787
839
|
position: relative;
|
|
@@ -877,6 +929,9 @@
|
|
|
877
929
|
|
|
878
930
|
&-item {
|
|
879
931
|
box-sizing: border-box;
|
|
932
|
+
&:last-child {
|
|
933
|
+
margin-bottom: 0!important;
|
|
934
|
+
}
|
|
880
935
|
&-act {
|
|
881
936
|
background-color: var(--main-alpha-color)!important;
|
|
882
937
|
border:1px solid var(--main-alpha5-color)!important;
|
|
@@ -957,6 +1012,14 @@
|
|
|
957
1012
|
}
|
|
958
1013
|
}
|
|
959
1014
|
|
|
1015
|
+
.callout-text {
|
|
1016
|
+
display: flex;
|
|
1017
|
+
justify-content: flex-start;
|
|
1018
|
+
align-items: flex-start;
|
|
1019
|
+
flex-flow: wrap;
|
|
1020
|
+
line-height: 36rpx;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
960
1023
|
}
|
|
961
1024
|
|
|
962
1025
|
.weiXinLocation {
|