jufubao-mall 2.0.35-beta1 → 2.0.35-beta10

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.
@@ -9,60 +9,65 @@
9
9
  <!-- #endif -->
10
10
  <view class="jfb-mall-shop-vip__body">
11
11
  <view class="outer-box" :style="[bodyStyleComp]">
12
- <!--tab-->
12
+ <!--map-->
13
13
  <view
14
- class="shop_tabs"
15
- :style="[tabsStyleComp]"
16
- v-if="titleList.length > 1"
14
+ class="shop_map"
15
+ v-if="initMapStatus"
17
16
  >
18
17
  <view
19
- class="tab_item"
20
- v-for="(item,index) in titleList"
21
- :key="index"
22
- :class="{short: tabLayout === 'v2'}"
23
- @click="tab=item.value"
24
- :style="[tab === item.value?tabActItemStyleComp:tabItemStyleComp]"
18
+ class="mpa_wrap"
19
+ :class="{close: !mapIsExtend}"
25
20
  >
26
- <text>{{item.label}}</text>
27
- <text v-if="titleList.length > 1 && tab === item.value && ['v1', 'v2'].includes(tabLayout)" class="lineX"></text>
28
- </view>
29
- </view>
30
- <!--tab-->
31
- <!--map-->
32
- <view class="shop_map" v-if="initBaidu">
33
- <view class="mpa_wrap" :class="{close: !mapIsExtend}">
21
+ <!--地图定位指示图标-->
22
+ <view class="map-center" v-if="localImage">
23
+ <image :src="localImage"></image>
24
+ </view>
25
+ <!--地图定位指示图标-->
34
26
  <!--#ifdef H5-->
35
27
  <xd-baidu-map
36
- v-if="initBaidu"
37
- :myPosition="myPosition"
28
+ v-if="initMapStatus && uiBaiduAk"
38
29
  :markets="marketList"
39
30
  :ak="uiBaiduAk"
40
31
  :center="mapCenter"
41
- @onChose="handleChoseShop"
32
+ @on-show-marker="(item)=>{handleShowMarker(item,true)}"
33
+ @on-close-marker="(item)=>{handleShowMarker(item,false)}"
34
+ @regionchange="handleRegionChange"
35
+ @init="handleH5Init"
36
+ @on-detail="handleBaiduToEvent"
42
37
  ></xd-baidu-map>
43
38
  <!--#endif-->
44
39
  <!-- #ifdef MP-WEIXIN -->
45
40
  <map
41
+ v-if="mapCenter !== null"
42
+ id="WeiXinMap"
43
+ :show-location="showLocation"
46
44
  style="width:100%;height: 100%;"
47
- show-location
48
45
  :longitude="mapCenter.longitude"
49
46
  :latitude="mapCenter.latitude"
50
47
  :markers="marketList"
51
48
  @markertap="handleMarketTap"
49
+ @callouttap="handleWxToEvent"
50
+ @regionchange="handleRegionChange"
52
51
  >
53
52
  <cover-view
54
53
  class="cover_view"
55
54
  slot="callout"
56
55
  >
57
56
  <cover-view
58
- v-for="(item,index) in marketList"
59
- :key="index"
57
+ v-for="(item) in marketList"
58
+ :key="item.id"
60
59
  :marker-id="item.id"
61
60
  style="background: rgba(0,0,0,.8);border-radius: 6px;padding: 8px 12px;color: #fff;"
62
61
  :style="{display: item.id === showMarkerId ? 'block' : 'none'}"
63
- >{{ item.title }}</cover-view>
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>
64
68
  </cover-view>
65
69
  </map>
70
+ <view class="weiXinLocation" v-if="mpLocationFn === 'getLocation'" @click="handleWXLocation">定位</view>
66
71
  <!-- #endif -->
67
72
  </view>
68
73
  <view
@@ -84,29 +89,65 @@
84
89
  </view>
85
90
  <!--map-->
86
91
  <!--shop-->
87
- <view v-if="showShopList" class="shop_list" :style="[contStyleComp]">
88
- <template v-if="showShopList.length">
92
+ <view class="shop_list" :style="[contStyleComp]">
93
+ <template v-if="nearbyShopList === null || (nearbyShopList && nearbyShopList.length > 0)">
89
94
  <scroll-view
90
95
  scroll-y
91
- :scroll-top="scrollTop"
92
96
  class="scroll_y"
97
+ :scroll-into-view="intoViewResourceShopId"
98
+ scroll-with-animation
93
99
  >
94
- <cus-shops
95
- layout="v1"
96
- :select-id="selectIds"
97
- :is-show-btn="fastEntryStatus"
98
- :content="cusContent"
99
- :cus-style="cusStyle"
100
- :list="showShopList"
101
- :main-color="mainColor"
102
- :sub-main-color="subMainColor"
103
- :names="cusNames"
104
- :entry="cusEntry"
105
- @on-event="handleToEvent"
106
- ></cus-shops>
100
+ <template v-if="nearbyShopList === null">
101
+ <view class="shop_list-ske" :id="i" v-for="i in 6" :key="i" :style="[cusStyle.item]">
102
+ <view class="shop_list-ske-title">
103
+ <view></view>
104
+ <view></view>
105
+ </view>
106
+ <view class="shop_list-ske-address">
107
+ <view></view>
108
+ <view></view>
109
+ </view>
110
+ <view class="shop_list-ske-time"></view>
111
+ </view>
112
+ </template>
113
+ <template v-else-if="nearbyShopList.length >0">
114
+ <template v-for="(item,index) in nearbyShopList">
115
+ <view
116
+ :style="[
117
+ cusStyle.item,
118
+ (index === 0?{marginTop: itemTop + 'rpx'}:{}),
119
+ ]"
120
+ class="shop_list-item"
121
+ :class='[{"shop_list-item-act":resource_shop_id === item.resource_shop_id}]'
122
+ :key="item.key"
123
+ :id="`scroll-${item.resource_shop_id}`"
124
+ @click="handleToEvent(item, 'shop')"
125
+ >
126
+ <view class="shop_list-item-title">
127
+ <view class="title">
128
+ <view>{{item.resource_shop_name}}</view>
129
+ <view class="active" v-if="resource_shop_id === item.resource_shop_id">正在预览</view>
130
+ </view>
131
+ <view @click.stop="handleToEvent(item, 'detail')">
132
+ <text>详情</text>
133
+ <xd-font-icon icon="iconxiangyou_xian" color="#999" size="30" width="26" height="26"></xd-font-icon>
134
+ </view>
135
+ </view>
136
+ <view class="address" :style="{marginBottom:item['business_time_name']?'16rpx':0}">
137
+ <view>{{item.address}}</view>
138
+ <view
139
+ v-if="item.distance_conversion || item.distance"
140
+ :style="[cusStyle.distance]"
141
+ >{{item.distance_conversion || item.distance}}</view>
142
+ </view>
143
+ <view class="openTime" v-if="item['business_time_name']">营业时间:{{item['business_time_name']}}</view>
144
+ </view>
145
+ </template>
146
+ <xd-more>更多附近门店可搜索名称或地址查询</xd-more>
147
+ </template>
107
148
  </scroll-view>
108
149
  </template>
109
- <xd-no-data icon-type="shop" :scale-size="2" v-if="showShopList.length === 0">暂无门店信息</xd-no-data>
150
+ <xd-no-data icon-type="shop" :scale-size="2" v-if="nearbyShopList && nearbyShopList.length === 0">暂无更多门店</xd-no-data>
110
151
  </view>
111
152
  <!--shop-->
112
153
  </view>
@@ -119,16 +160,16 @@
119
160
  import XdNoData from "@/components/XdNoData/XdNoData";
120
161
  import { jfbRootExec } from "@/utils/xd.event";
121
162
  import JfbMallShopVipMixin from "./JfbMallShopVipMixin";
122
- import { getContainerPropsValue,gCPVal } from "@/utils/xd.base";
163
+ import { gCPVal } from "@/utils/xd.base";
123
164
  import componentsMixins from "@/mixins/componentsMixins";
124
165
  import getServiceUrl from "@/common/getServiceUrl";
125
- import CusShops from "./CusShops.vue"
166
+ import XdMore from "@/components/XdMore/XdMore.vue";
167
+
126
168
  // #ifdef H5
127
169
  import XdBaiduMap from "./XdBaiduMap"
128
170
  // #endif
129
171
  import { mapState } from 'vuex';
130
172
  import extsMixins from "@/mixins/extsMixins";
131
- import Color from "color"
132
173
 
133
174
 
134
175
  export default {
@@ -136,7 +177,7 @@
136
177
  components: {
137
178
  XdNoData,
138
179
  XdFontIcon,
139
- CusShops,
180
+ XdMore,
140
181
  // #ifdef H5
141
182
  XdBaiduMap,
142
183
  // #endif
@@ -153,21 +194,24 @@
153
194
  next_page_token: "",
154
195
  brand_id: '',
155
196
  shop_id: '',
156
- resource_shop_id: '',
197
+ resource_shop_id: -1,
198
+ intoViewResourceShopId:'',
157
199
 
158
200
  //地图
159
- initBaidu: false,
201
+ initMapStatus: false,
160
202
  uiBaiduAk: '',
161
- mapCenter: [],
203
+ mapCenter: null,
204
+ changStatus: true,
205
+ changeLocation:null,
162
206
  mapIsExtend: true,
163
207
  marketList: [],
164
208
  myPosition: null,
165
209
  showMarkerId: "",
210
+ localImage: '',
166
211
 
167
212
  //tab
168
213
  titleList: [],
169
214
  tab: "nearby", //nearby,often
170
- oftenShopList: null,
171
215
  nearbyShopList: null,
172
216
  curShopId: '',
173
217
  toView: '',
@@ -187,6 +231,9 @@
187
231
  //style
188
232
  bodyPadding: {},
189
233
  cusStyle: {},
234
+ cardItemShadowWidth:0,
235
+ itemTop:0,
236
+ itemBottom:0,
190
237
  contentBgColor: 'rgba(0,0,0,0)',
191
238
 
192
239
  //选项卡
@@ -197,11 +244,18 @@
197
244
 
198
245
  //高级
199
246
  codePath: '', //门店跳转
200
- cashierPath: '',//支持核销
201
- buyTicketPath: '',//在线选择
202
- codeAfterPath: '',//电子码
203
- hdSelfPath: '',//小时达
204
- travelfPath: '', //旅游购票
247
+ detailPath: '',//门店详情
248
+
249
+ // #ifdef MP-WEIXIN
250
+ WeiXinMap:null,
251
+ showLocation: false,
252
+ onLoadStatus: false, //小程序onload是否执行
253
+ onLocationStatus: false, //小程序首次定位成功状态
254
+ mpLocationFn:'getFuzzyLocation',
255
+ // #endif
256
+
257
+ isMoved: false, //是否已经移动过
258
+
205
259
  }
206
260
  },
207
261
  computed: {
@@ -209,90 +263,34 @@
209
263
  stateCity: state => state.cityLocation.city,
210
264
  stateLocation: state => state.cityLocation.location || {}
211
265
  }),
212
- selectIds(){
213
- let id = '';
214
- if(!id && this.resource_shop_id) id = this.resource_shop_id;
215
- if(!id&& this.brand_id) id = this.brand_id;
216
- if(!id && this.shop_id) id = this.shop_id;
217
- return id;
218
- },
219
- tabActItemStyleComp(){
220
- if(this.titleList.length === 1) return {
221
- color: this.tabStyle.color,
222
- fontSize: this.tabStyle.fontSize + 'rpx',
223
- fontWeight: this.tabStyle.fontWeight,
224
- };
225
- let backgroundColor = '';
226
- let color = this.mainColor;
227
- let marginRight = 0;
228
- if(this.tabLayout === 'v3') {
229
- if( this.tabStyle.actBgColor) backgroundColor = this.tabStyle.actBgColor;
230
- else backgroundColor = this.mainColor;
231
- if( this.tabStyle.actColor) color = this.tabStyle.actColor;
232
- else color = '#fff';
233
- marginRight = '20rpx';
234
- }
235
- return {
236
- marginRight,
237
- color: this.tabStyle.actColor,
238
- fontSize: this.tabStyle.actFontSize + 'rpx',
239
- fontWeight: this.tabStyle.actFontWeight,
240
- backgroundColor: backgroundColor,
241
- }
242
- },
243
- tabItemStyleComp(){
244
- if(this.titleList.length === 1) return {
245
- color: this.tabStyle.color,
246
- fontSize: this.tabStyle.fontSize + 'rpx',
247
- fontWeight: this.tabStyle.fontWeight,
248
- };
249
- let backgroundColor = '';
250
- let marginRight = 0;
251
- if(this.tabLayout === 'v3') {
252
- backgroundColor = this.tabStyle.bgColor;
253
- marginRight = '20rpx';
254
- }
255
- return {
256
- marginRight,
257
- color: this.tabStyle.color,
258
- fontSize: this.tabStyle.fontSize + 'rpx',
259
- fontWeight: this.tabStyle.fontWeight,
260
- backgroundColor: backgroundColor,
261
- }
262
- },
263
- tabsStyleComp() {
264
- let padding = '0 24rpx', height = '100rpx';
265
- if(this.tabLayout === 'v3') {
266
- padding = '20rpx 24rpx'
267
- if(this.titleList.length === 1) padding = '16rpx 0'
268
- height = '60rpx';
269
- }
270
- return {
271
- padding,
272
- height,
273
- lineHeight: height,
274
- backgroundColor: this.tabBgColor,
275
- }
276
- },
277
- showShopList(){
278
- return this.tab === 'nearby' ? this.nearbyShopList : this.oftenShopList
279
- },
266
+
280
267
  bodyStyleComp(){
281
268
  return {
282
269
  height: this.layoutInfo.bodyMinHeightRpx + 'rpx',
283
270
  '--main-color': this.tabStyle.actColor,
284
- '--main-alpha-color': this.$colorChange(this.mainColor).alpha(0.1).toString()
271
+ '--main-alpha-color': this.$colorChange(this.mainColor).alpha(0.01).toString(),
272
+ '--main-alpha5-color': this.$colorChange(this.mainColor).alpha(0.2).toString()
285
273
  }
286
274
  },
287
275
  contStyleComp(){
288
276
  let height = this.layoutInfo.bodyMinHeightRpx - 72;
277
+ let padding = this.getMarginAndPadding(this.bodyPadding, 0);
289
278
  //大于一个标签显示标签
290
279
  if(this.titleList.length > 1) height = height - 100;
291
- if(this.mapIsExtend) height = height - 400;
292
- height = height - this.getPMValue(this.bodyPadding, 'TB', 0);
280
+ if(this.mapIsExtend) height = height - 500;
281
+
282
+ //有投影信息
283
+ if(this.cardItemShadowWidth > 0) {
284
+ padding = 0;
285
+ }
286
+ //无投影信息
287
+ else {
288
+ height = height - this.getPMValue(this.bodyPadding, 'TB', 0);
289
+ }
290
+
293
291
  return {
294
292
  height: height + 'rpx',
295
- padding: this.getMarginAndPadding(this.bodyPadding, 0),
293
+ padding: padding,
296
294
  backgroundColor: this.contentBgColor
297
295
  }
298
296
  },
@@ -302,252 +300,42 @@
302
300
  if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
303
301
  if (this.$configProject['isPreview']) this.init(value)
304
302
  },
305
- tab(value) {
306
- this.hasNext = true;
307
- this.page_token = '1';
308
- this.next_page_token = ''
309
- this.marketList = []
310
- if (value === 'nearby') {
311
- this.getNearbyShop();
312
- } else {
313
- this.getOftenShop();
314
- }
315
- },
303
+
316
304
  stateCity(n, o) {
317
305
  if (n && JSON.stringify(n) !== JSON.stringify(o)) {
318
- console.warn('stateCity');
319
- if (this.tab === 'nearby') {
320
- this.getNearbyShop();
321
- } else {
322
- this.getOftenShop();
323
- }
306
+ this.clearList();
307
+ this.getNearbyShop();
324
308
  }
325
309
  },
310
+ onLoadStatus(){
311
+ if(this.onLoadStatus && this.onLocationStatus) this.getNearbyShop()
312
+ },
313
+ onLocationStatus(){
314
+ if(this.onLoadStatus && this.onLocationStatus) this.getNearbyShop()
315
+ }
326
316
  },
327
317
  created() {
328
318
  this.init(this.container);
319
+
320
+ },
321
+ mounted() {
322
+ this.$nextTick(()=>{
323
+ this.isEmptySetMapCenter();
324
+ })
329
325
  },
326
+
330
327
  methods: {
331
328
  onJfbLoad(options) {
332
329
  this.setNameSpace(options, false);
333
330
  this.uiBaiduAk = this.baiduAk || this.$settings.baiduAk;
334
- this.myPosition = {
335
- lng: this.stateLocation.longitude,
336
- lat: this.stateLocation.latitude,
337
- }
338
331
  if(options.shop_id) this.shop_id = options.shop_id;
339
332
  if(options.brand_id) this.brand_id = options.brand_id;
340
- if(options.resource_shop_id) this.resource_shop_id = options.resource_shop_id;
341
- if(options.callback) {
342
- try{
343
- let callback = Base64.decode(options.callback);
344
- let page = this.$xdUniHelper.parseURL(callback);
345
- if(page.params && page.params.resource_shop_id) delete page.params.resource_shop_id;
346
-
347
- //相同应用
348
- if(page.path.indexOf(`/${this.projectAttr['deploy_dir']}/`) === 0) {
349
- callback = page.path.replace(`/${this.projectAttr['deploy_dir']}/`,'/');
350
- }
351
- //不同应用
352
- else {
353
- // #ifdef H5
354
- callback = `//${this.projectAttr['host']}${page.path}`;
355
- // #endif
356
-
357
- //#ifdef MP-WEIXIN
358
- //todo
359
- // #endif
360
- }
361
- //设置参数
362
- if(page.params) this.callbackParams = page.params
363
- this.isCallback = callback;
364
- }
365
- catch (e){
366
- console.error(e);
367
- }
368
- }
369
-
370
- if (this.tab === 'nearby') {
371
- this.getNearbyShop();
372
- } else {
373
- this.getOftenShop();
374
- }
333
+ if(options.resource_shop_id) this.resource_shop_id = Number(options.resource_shop_id);
334
+ if(this.$configProject['isPreview'] && this.resource_shop_id === -1 ) this.resource_shop_id = 3513711;
335
+ this.onLoadStatus = true;
375
336
  },
376
- getParams(){
377
- let params = {
378
- latitude: this.stateLocation.latitude + '',
379
- longitude: this.stateLocation.longitude + '',
380
- page_size: 20,
381
- page_token: this.page_token + '',
382
- keyword: this.keyword,
383
- xnamespace: this.xnamespace,
384
- consume_mode: this.serverType.join(','),
385
- }
386
- if(this.brand_id) params['brand_id'] = this.brand_id;
387
- if(this.keyword) params['keyword'] = this.keyword
388
- return params
389
- },
390
- isEmptySetMapCenter(){
391
- if(this.stateLocation.latitude && this.stateLocation.longitude) {
392
- // #ifdef H5
393
- this.mapCenter = {
394
- lng: this.stateLocation.longitude,
395
- lat: this.stateLocation.latitude
396
- }
397
- // #endif
398
- // #ifdef MP-WEIXIN
399
- this.mapCenter = this.stateLocation;
400
- // #endif
401
- }
402
- },
403
- getOftenShop() {
404
- jfbRootExec("getOftenVipShopList", {
405
- vm: this,
406
- data: this.getParams(),
407
- }).then(res => {
408
- let list = res.list.map(item => {
409
- item.shop_icon = getServiceUrl(item['shop_pic'] || item['shop_icon'])
410
- return item
411
- });
412
-
413
- //todo 目前返回第一屏数据(如果下拉数据需要改造)
414
- if(res.list.length > 0) {
415
- this.setMarketList(list);
416
- this.mapCenter = this.marketList[0];
417
- }
418
337
 
419
- if (this.page_token === '1') this.oftenShopList = list
420
- else this.oftenShopList = this.oftenShopList.concat(list);
421
-
422
- //数据为空处理
423
- if(this.oftenShopList.length === 0) {
424
- this.isEmptySetMapCenter();
425
- }
426
-
427
- this.next_page_token = res.next_page_token
428
- this.hasNext = res.next_page_token !== "";
429
- }).catch(err=>{
430
- console.error(err)
431
- this.oftenShopList = []
432
- })
433
- },
434
- getNearbyShop(centerPosition) {
435
- let data = {
436
- city_code: this.stateCity.city_code,
437
- ...this.getParams()
438
- }
439
- if(centerPosition) data = Object.assign(data, centerPosition)
440
- jfbRootExec("getNearbyVipShopList", {
441
- vm: this,
442
- data: data
443
- }).then(res => {
444
338
 
445
- let list = res.list.map(item => {
446
- item.shop_icon = getServiceUrl(item.shop_icon)
447
- return item
448
- })
449
-
450
- //todo 目前返回第一屏数据(如果下拉数据需要改造)
451
- if(res.list.length > 0) {
452
- //设置地图mark标签
453
- this.setMarketList(list);
454
-
455
- //设置原点
456
- if(!centerPosition)this.mapCenter = this.marketList[0];
457
- }
458
-
459
- //设置数据
460
- if (this.page_token === '1') this.nearbyShopList = list
461
- else this.nearbyShopList = this.nearbyShopList.concat(list);
462
-
463
- //数据为空
464
- if(this.nearbyShopList.length === 0) {
465
- this.isEmptySetMapCenter()
466
- }
467
-
468
- this.hasNext = res.next_page_token !== "";
469
- this.next_page_token = res.next_page_token;
470
- this.initBaidu = true;
471
- }).catch(err=>{
472
- console.error(err)
473
- this.nearbyShopList = []
474
- })
475
- },
476
- setMarketList(list){
477
- // #ifdef H5
478
- this.marketList = list.map(item => {
479
- return {
480
- platform: "H5",
481
- lng: item.longitude,
482
- lat: item.latitude,
483
- icon: {
484
- url: item.shop_icon,
485
- size: {width: 30, height: 30},
486
- opts: {imageSize: {width: 30, height: 30}}
487
- },
488
- title: item.resource_shop_name,
489
- id: item.resource_shop_id,
490
- }
491
- })
492
- // #endif
493
- // #ifdef MP-WEIXIN
494
- this.marketList = list.map(item => {
495
- let point = this.baiduTogcj(item.longitude, item.latitude);
496
- return {
497
- platform: "MP",
498
- longitude: point[0],
499
- latitude: point[1],
500
- lng: item.longitude,
501
- lat: item.latitude,
502
- id: item.resource_shop_id,
503
- title: item.resource_shop_name,
504
- width: 30,
505
- height: 30,
506
- iconPath: item.shop_icon,
507
- customCallout: {
508
- anchorX: 0.5,
509
- anchorY: 0.5,
510
- display: 'ALWAYS',
511
- }
512
- }
513
- })
514
- // #endif
515
- },
516
- switchMapExtend(isExtend){
517
- this.mapIsExtend = isExtend;
518
- },
519
- handleMarketTap(e){
520
- this.showMarkerId = e.markerId;
521
- let curShop = this.marketList.find(item => item.id === e.markerId);
522
- this.handleChoseShop(curShop);
523
- },
524
- handleChoseShop(shop){
525
- this.toView = 'shop_item_' + shop.id;
526
- this.curShopId = shop.id;
527
- if(shop.platform === 'H5'){
528
- this.mapCenter = {
529
- lng: shop.lng,
530
- lat: shop.lat
531
- };
532
- }
533
- else{
534
- this.mapCenter = {
535
- longitude: shop.longitude,
536
- latitude: shop.latitude
537
- }
538
- }
539
- this.page_token = '1';
540
- let data = {
541
- center_latitude: shop.lat || shop.latitude,
542
- center_longitude: shop.lng || shop.longitude
543
- }
544
- if (this.tab === 'nearby') {
545
- this.getNearbyShop(data)
546
- } else {
547
- this.getOftenShop(data)
548
- }
549
- this.scrollTop = 0;
550
- },
551
339
  /**
552
340
  * @description 监听事件变化
553
341
  * @param container {object} 业务组件对象自己
@@ -555,19 +343,19 @@
555
343
  init(container) {
556
344
  this.xnamespace = gCPVal(container, 'xnamespace', this.projectAttr.business_code||this.xnamespace);
557
345
  this.serverType = gCPVal(container, 'serverType', [['SELL']]);
558
- this.showOftenTab = gCPVal(container, 'showOftenTab', 'N');
346
+ this.showOftenTab = 'N' //todo gCPVal(container, 'showOftenTab', 'N');
559
347
  if(this.showOftenTab === 'N') this.titleList = [{label: '附近门店', value: 'nearby'}];
560
348
  if(this.showOftenTab === 'Y') this.titleList = [{label: '附近门店', value: 'nearby'},{label: '常用门店', value: 'often'}];
561
349
  this.shopListStyle = gCPVal(container, 'shopListStyle', 'v1');
562
350
  this.fastEntryStatus = gCPVal(container, 'fastEntryStatus', 'N') === 'Y';
563
351
  let fastEntry = gCPVal(container, 'fastEntry', []).filter(item=>{
564
- return item.check === true
352
+ return true;//item.check === true
565
353
  });
566
354
  let cusNames = {};
567
355
  let cusEntry = {};
568
356
  if(this.fastEntryStatus) {
569
357
  for(let i = 0; i< fastEntry.length ;i++) {
570
- if(fastEntry[i].input) cusNames[fastEntry[i].value] = fastEntry[i].input
358
+ if(fastEntry[i].input) cusNames[fastEntry[i].value] = fastEntry[i].input
571
359
  cusEntry[fastEntry[i].value] = fastEntry[i].check;
572
360
  }
573
361
  }
@@ -598,8 +386,8 @@
598
386
 
599
387
  //style
600
388
  let sValue = `{"cardItemSpace":16,"margin":{"bottom":16,"left":0,"right":0,"top":16},"backgroundColor":"rgba(245, 245, 245, 1)"}`
601
- let shopStyle = this.getRelationStatus(container,'shopStyle', { cardItemSpaceStatus:['cardItemSpace'],bodyPaddingStatus:['bodyPadding']}, sValue);
602
- this.bodyPadding = gCPVal(container,'bodyPadding', [{ bottom:0,left:16, right:16,top:16}, 20], {sKey:'bodyPaddingStatus',fields:['bodyPadding'],cusFields: ['shopStyle','margin',shopStyle],isPMR: true, });
389
+ let shopStyle = `{"cardItemSpace":16,"margin":{"bottom":16,"left":16,"right":16,"top":16},"backgroundColor":"rgba(245, 245, 245, 1)"}`;
390
+ this.bodyPadding = gCPVal(container,'bodyPadding', [{ bottom:0,left:16, right:16,top:16}, 20], {sKey:'bodyPaddingStatus',fields:['bodyPadding'],cusFields: ['shopStyle','margin', shopStyle ],isPMR: true, });
603
391
  this.contentBgColor = gCPVal(container,'contentBgColor', '#f8f8f8', {sKey:'contentBgColorStatus',fields:['contentBgColor']});
604
392
  this.tabLayout = gCPVal(container,'tabLayout', 'v1')
605
393
 
@@ -626,13 +414,24 @@
626
414
  //门店列表
627
415
  let cardItemSpace = gCPVal(container,'cardItemSpace', [16,20], {sKey:'cardItemSpaceStatus',fields:['cardItemSpace'],cusFields: ['shopStyle','cardItemSpace',shopStyle]});
628
416
  let cardItemRadius = gCPVal(container,'cardItemRadius', [sValue===shopStyle?0:this.gStyleValue.radius, 0], {sKey:'cardItemRadiusStatus',fields:['listItemRadius']})|| 0;
629
- let cardItemShadow = gCPVal(container, 'cardItemShadow', [this.gStyleValue.shadow, {color:'',width:'0',}],{isShadow: true});
417
+ let cardItemShadow = gCPVal(container, 'cardItemShadow', [this.gStyleValue.shadow, {color:'',width:'0'}],{isShadow: true});
630
418
  let cardItemBorder = gCPVal(container, 'cardItemBorder', [{color: '#f8f8f8',width: 0,style: 'solid'},{color: '#f8f8f8',width: 0,style: 'solid'}],{isBorder: true});
631
419
  let distanceColor = gCPVal(container,'distanceColor', '#999999', {sKey:'distanceColorStatus',fields:['distanceColor']});
632
- let cardItemBgColor = gCPVal(container,'cardItemBgColor', '', {sKey:'cardItemBgColorStatus',fields:['cardItemBgColor']});
633
- let itemPadding = gCPVal(container,'itemPadding', [{top:16,left:16, right:16, bottom:16},20], {sKey:'itemPaddingStatus',fields:['itemPadding'],isPMR: true});
420
+ let cardItemBgColor = gCPVal(container,'cardItemBgColor', '#fff', {sKey:'cardItemBgColorStatus',fields:['cardItemBgColor']});
421
+ let itemPadding = gCPVal(container,'itemPadding', [{top:32,left:32, right:32, bottom:32},20], {sKey:'itemPaddingStatus',fields:['itemPadding'],isPMR: true});
634
422
  let cardImageBorder = gCPVal(container, 'cardImageBorder', [{color: '#f8f8f8',width: 0,style: 'solid'},{color: '#f8f8f8',width: '2rpx',style: 'solid'}],{isBorder: true});
635
423
  let itemImageRadius = gCPVal(container,'itemImageRadius', [this.gStyleValue.radius/2, 0], {sKey:'itemImageRadiusStatus',fields:['itemImageRadius']})||0;
424
+ this.cardItemShadowWidth = gCPVal(container, 'cardItemShadow', [this.gStyleValue.shadow, {color:'',width:'0'}], {isShadow:true, isBsWidth: true});
425
+ let right = Math.max(this.cardItemShadowWidth,this.bodyPadding.right);
426
+ let left = Math.max(this.cardItemShadowWidth,this.bodyPadding.left);
427
+ this.itemTop = Math.max(this.cardItemShadowWidth,this.bodyPadding.top);
428
+ this.itemBottom = Math.max(this.cardItemShadowWidth,this.bodyPadding.bottom);
429
+ if(this.cardItemShadowWidth === 0) {
430
+ right = 0; left = 0;
431
+ this.itemTop = 0;
432
+ this.itemBottom = 0;
433
+ }
434
+
636
435
  this.cusStyle = {
637
436
  'item':{
638
437
  'margin-bottom': `${cardItemSpace}rpx`,
@@ -641,6 +440,8 @@
641
440
  'border': cardItemBorder,
642
441
  'backgroundColor': cardItemBgColor,
643
442
  'padding': this.getMarginAndPadding(itemPadding, 0),
443
+ 'margin-right': `${right}rpx`,
444
+ 'margin-left': `${left}rpx`
644
445
  },
645
446
  'image':{
646
447
  'border-radius': itemImageRadius + 'rpx',
@@ -654,69 +455,341 @@
654
455
 
655
456
  //高级
656
457
  this.codePath = gCPVal(container, 'codePath', { value: "" }).value;
657
- this.cashierPath = gCPVal(container, 'cashierPath', { value: "" }).value;
658
- this.buyTicketPath = gCPVal(container, 'buyTicketPath', { value: "" }).value;
659
- this.codeAfterPath = gCPVal(container, 'codeAfterPath', { value: "" }).value;
660
- this.hdSelfPath = gCPVal(container, 'hdSelfPath', { value: "" }).value;
661
- this.travelfPath = gCPVal(container, 'travelfPath', { value: "" }).value;
458
+ this.detailPath = gCPVal(container, 'detailPath', { value: "" }).value;
662
459
 
663
460
  //关闭显示附近门店
664
461
  if(this.showOftenTab === 'N') this.tab = 'nearby';
462
+ this.initMapStatus = true;
665
463
 
666
464
  },
667
- //==点击事件===========
668
- handleToEvent({item,type}) {
669
- let parmas = [];
670
- let url = ''
671
- if(item.resource_shop_id) parmas.push(`resource_shop_id=${item.resource_shop_id}`);
672
- if(item.brand_id) parmas.push(`brand_id=${item.brand_id}`);
673
- if(item.consume_mode) parmas.push(`consume_mode=${item.consume_mode.join(',')}`);
674
- if(item.shop_id) parmas.push(`shop_id=${item.shop_id}`);
675
-
676
- //详情增加扩张参数
677
- if(item.exts_params && type === 'DL'){
678
- parmas.push(`exts_params=${item.exts_params}`);
679
- parmas.push(`resource_shop=${Base64.encodeURI(JSON.stringify({shop_id: item.shop_id,resource_shop_id: item.resource_shop_id }))}`);
465
+
466
+
467
+ //==map===========
468
+ // #ifdef MP-WEIXIN
469
+ /**
470
+ * @description 火星转百度坐标
471
+ * @param lng
472
+ * @param lat
473
+ * @returns {{latitude: *, longitude: *}}
474
+ */
475
+ gcj02toBaidu({longitude, latitude}) {
476
+ let x_PI = 3.14159265358979324 * 3000.0 / 180.0;
477
+ let PI = 3.1415926535897932384626;
478
+ let a = 6378245.0;
479
+ let ee = 0.00669342162296594323;
480
+ latitude = +latitude;
481
+ longitude = +longitude;
482
+ let z = Math.sqrt(longitude * longitude + latitude * latitude) + 0.00002 * Math.sin(latitude * x_PI);
483
+ let theta = Math.atan2(latitude, longitude) + 0.000003 * Math.cos(longitude * x_PI);
484
+ let bd_lng = z * Math.cos(theta) + 0.0065;
485
+ let bd_lat = z * Math.sin(theta) + 0.006;
486
+ return {longitude: bd_lng, latitude:bd_lat}
487
+ },
488
+
489
+ handleWXLocation(){
490
+ this.localImage = '';
491
+ this.showMarkerId = '';
492
+ this.showLocation = true;
493
+ this.WeiXinMap.moveToLocation({
494
+ success:(res)=>{
495
+ this.showLocation = false;
496
+ },
497
+ fail:()=>{}
498
+ })
499
+ },
500
+
501
+ getMYWeiXinPoint(){
502
+ const myPoint = this.$xdUniHelper.cloneDeep(this.mapCenter);
503
+ return {
504
+ platform: "MP",
505
+ longitude: myPoint.longitude,
506
+ latitude: myPoint.latitude,
507
+ lng: myPoint.longitude,
508
+ lat: myPoint.latitude,
509
+ id: 1999999999,
510
+ width: 30,
511
+ height: 30,
512
+ iconPath:'https://img.jufubao.cn/common/local.png?x-oss-process=style/size3',
513
+ mpaKey: this.$xdUniHelper.randomChar(20)
680
514
  }
515
+ },
681
516
 
682
- //在线选择,电子码传惨处理
683
- if(['SEAT','CODE'].includes(type)) parmas = [`cinema_id=${item.resource_shop_id}`]
684
- if(['TRAVEL'].includes(type)) parmas = [`shop_id=${item.resource_shop_id}`]
685
-
686
- //点击详情地址
687
- if(type === 'DL') {
688
- //有回调地址处理
689
- if(this.isCallback) {
690
- parmas = []
691
- if(item.resource_shop_id) parmas.push(`resource_shop_id=${item.resource_shop_id}`);
692
- if(!this.$xdUniHelper.isEmpty(this.callbackParams)) {
693
- Object.keys(this.callbackParams).map(it=>{
694
- parmas.push(`${it}=${this.callbackParams[it]}`);
695
- })
517
+ setWeiXinMarkerList(list){
518
+ let location = [this.getMYWeiXinPoint()];
519
+ if(this.isMoved) location = []
520
+ this.marketList = location.concat(list.map(item => {
521
+ let point = this.baiduTogcj(item.longitude, item.latitude);
522
+ return {
523
+ platform: "MP",
524
+ longitude: point[0],
525
+ latitude: point[1],
526
+ lng: item.longitude,
527
+ lat: item.latitude,
528
+ id: item.resource_shop_id,
529
+ title: item.resource_shop_name,
530
+ width: 30,
531
+ height: 30,
532
+ iconPath: item.shop_icon,
533
+ mpaKey: this.$xdUniHelper.randomChar(20),
534
+ customCallout: {
535
+ anchorX: 0.5,
536
+ anchorY: 0.5,
537
+ display: 'ALWAYS',
696
538
  }
697
- this.$xdUniHelper.redirectTo({
698
- url: this.isCallback + `?${parmas.join('&')}`
699
- },false,true)
700
- return
701
539
  }
540
+ }))
541
+ },
542
+
543
+ handleMarketTap(e){
544
+ this.showMarkerId = e.markerId;
545
+ this.resource_shop_id = e.markerId;
546
+ setTimeout(()=>{
547
+ this.intoViewResourceShopId = `scroll-${e.markerId}`;
548
+ },50)
549
+ },
550
+
551
+ // #endif
552
+
553
+ // #ifdef H5
554
+ handleH5Init(){
555
+ this.getNearbyShop();
556
+ },
557
+
558
+ handleShowMarker(item,status){
559
+ if(status) {
560
+ this.localImage = '';
561
+ this.resource_shop_id = item.id;
562
+ setTimeout(()=>{
563
+ this.intoViewResourceShopId = `scroll-${item.id}`;
564
+ },50)
565
+
566
+ }
567
+ else this.localImage = getServiceUrl('/common/localdone.png');
568
+ },
569
+ // #endif
570
+
571
+
572
+ handleRegionChange(e){
573
+ //重新定位
574
+ if(['location','update'].includes(e.causedBy)){
575
+ this.localImage = '';
576
+ if(e.type === 'end') {
577
+ // #ifdef H5
578
+ this.changeLocation = this.$xdUniHelper.cloneDeep(e.detail.point);
579
+ // #endif
580
+ // #ifdef MP-WEIXIN
581
+ this.WeiXinMap.addMarkers({markers:[this.getMYWeiXinPoint()]});
582
+ if(!this.onLocationStatus) {
583
+ this.onLocationStatus = true;
584
+ }
585
+ this.changeLocation = this.gcj02toBaidu(e.detail.centerLocation ||e.detail.point);
586
+ // #endif
587
+
588
+ this.clearList();
589
+ this.getNearbyShop();
590
+ }
591
+ return
592
+ }
593
+
594
+ //拖拽与缩放操作开始
595
+ // #ifdef MP-WEIXIN
596
+ this.WeiXinMap.removeMarkers({markerIds:[1999999999]})
597
+ // #endif
598
+ if(e.type === 'begin') this.localImage = getServiceUrl('/common/localmove.png?v=1');
599
+
600
+ //拖拽与缩放操作结束
601
+ else if(e.type === 'end') {
602
+ this.isMoved = true;
603
+ this.localImage = getServiceUrl('/common/localdone.png');
604
+ // #ifdef H5
605
+ this.changeLocation = this.$xdUniHelper.cloneDeep(e.detail.point);
606
+ // #endif
607
+ // #ifdef MP-WEIXIN
608
+ this.changeLocation = this.gcj02toBaidu(e.detail.centerLocation ||e.detail.point);
609
+ // #endif
610
+
611
+ this.clearList();
612
+ this.getNearbyShop();
613
+ }
614
+ },
615
+
616
+ isEmptySetMapCenter(){
617
+ if(this.stateLocation.latitude && this.stateLocation.longitude) {
618
+ // #ifdef H5
619
+ this.mapCenter = {
620
+ lng: this.stateLocation.longitude,
621
+ lat: this.stateLocation.latitude
622
+ }
623
+ // #endif
624
+ // #ifdef MP-WEIXIN
625
+ let [longitude,latitude] = this.baiduTogcj(this.stateLocation.longitude,this.stateLocation.latitude);
626
+ this.mapCenter = {longitude,latitude};
627
+ this.$nextTick(()=>{
628
+ this.WeiXinMap = uni.createMapContext('WeiXinMap', this);
629
+ })
630
+ // #endif
631
+ this.onLocationStatus = true;
632
+ }
633
+ else {
634
+ this.mpLocationFn = 'getFuzzyLocation';
635
+ if(this.$configProject['privacy_interface_list']) {
636
+ this.$configProject['privacy_interface_list'].map(item=>{
637
+ if(item['api_name'] === 'wx.getLocation') {
638
+ this.mpLocationFn = 'getLocation';
639
+ }
640
+ })
641
+ }
642
+ // #ifdef MP-WEIXIN
643
+ wx[this.mpLocationFn]({
644
+ type:'wgs84',
645
+ success:({latitude,longitude})=>{
646
+ this.mapCenter = {latitude,longitude};
647
+ this.$nextTick(()=>{
648
+ this.WeiXinMap = uni.createMapContext('WeiXinMap', this);
649
+ })
650
+ this.onLocationStatus = true;
651
+ }
652
+ })
653
+ // #endif
654
+ }
655
+ },
702
656
 
703
- //其他情况
704
- url = this.codePath;
657
+ clearList(){
658
+ // #ifdef MP-WEIXIN
659
+ if(this.nearbyShopList && this.nearbyShopList.length > 0) {
660
+ this.WeiXinMap.removeMarkers({markerIds:[this.nearbyShopList.map(item => item.resource_shop_id)]});
661
+ }
662
+ // #endif
663
+ this.page_token = '1';
664
+ this.nearbyShopList = null;
665
+ this.intoViewResourceShopId = '';
666
+ this.marketList = [];
667
+ },
668
+ //==map===========
669
+
670
+ getParams(){
671
+ let latitude = '', longitude = '';
672
+ console.log('handleRegionChange',this.stateLocation, this.changeLocation);
673
+ if(this.stateLocation && !this.$xdUniHelper.isEmpty(this.stateLocation)) {
674
+ if(this.stateLocation.longitude) longitude = this.stateLocation.longitude + '';
675
+ if(this.stateLocation.latitude) latitude = this.stateLocation.latitude + '';
676
+ }
677
+ if(this.changeLocation && !this.$xdUniHelper.isEmpty(this.changeLocation)) {
678
+ if(this.changeLocation.longitude) longitude = this.changeLocation.longitude + '';
679
+ if(this.changeLocation.latitude) latitude = this.changeLocation.latitude + '';
680
+ }
681
+ let params = {
682
+ latitude,
683
+ longitude,
684
+ page_size: 20,
685
+ page_token: this.page_token + '',
686
+ keyword: this.keyword,
687
+ xnamespace: this.xnamespace,
688
+ consume_mode: this.serverType.join(','),
705
689
  }
690
+ if(this.brand_id) params['brand_ids'] = this.brand_id;
691
+ if(this.keyword) params['keyword'] = this.keyword
692
+ return params
693
+ },
694
+
695
+ getNearbyShop() {
696
+ let data = {
697
+ city_code: this.stateCity.city_code,
698
+ ...this.getParams()
699
+ }
700
+ this.$xdShowLoading({});
701
+
702
+ jfbRootExec("getNearbyVipShopList", {
703
+ vm: this,
704
+ data: data
705
+ }).then(res => {
706
+
707
+ let list = res.list.map(item => {
708
+ item.shop_icon = getServiceUrl(item.shop_icon);
709
+ item['key'] = this.$xdUniHelper.randomChar(20);
710
+ return item
711
+ });
712
+
713
+ let nearbyShopList = [];
714
+ if(this.page_token === '1') nearbyShopList = this.$xdUniHelper.cloneDeep(list);
715
+ else nearbyShopList = this.$xdUniHelper.cloneDeep(this.nearbyShopList).concat(list);
716
+
717
+ //设置标签
718
+ this.setMarketList(nearbyShopList);
719
+
720
+ this.nearbyShopList = this.$xdUniHelper.cloneDeep(nearbyShopList);
721
+
722
+ this.hasNext = res.next_page_token !== "";
723
+ this.next_page_token = res.next_page_token;
724
+
725
+ setTimeout(()=>{
726
+ console.log('setMarketList.setTimeout',nearbyShopList);
727
+ this.intoViewResourceShopId = `scroll-${this.resource_shop_id}`
728
+ },200);
706
729
 
707
- //支持核销
708
- if(type === 'SELL') url = this.cashierPath;
709
- //在线选择
710
- if(type === 'SEAT') url = this.buyTicketPath;
711
- //电子码
712
- if(type === 'CODE') url = this.codeAfterPath;
713
- //小时达
714
- if(type === 'HDSELF') url = this.hdSelfPath;
715
- //旅游购票
716
- if(type === 'TRAVEL') url = this.travelfPath;
730
+ console.log('setMarketList.getNearbyVipShopList',nearbyShopList);
717
731
 
718
- if(!url) throw new Error(`${type} => 未设置访问地址`);
732
+ this.$xdHideLoading();
733
+ }).catch(err=>{
734
+ this.$xdHideLoading();
735
+ console.log(err)
736
+ //this.nearbyShopList = this.$xdUniHelper.cloneDeep(this.nearbyShopList).concat([]);
737
+ //this.setMarketList(this.nearbyShopList);
738
+ })
739
+ },
740
+ setMarketList(list){
741
+ console.log('setMarketList',list);
742
+ // #ifdef H5
743
+ this.marketList = list.map(item => {
744
+ return {
745
+ platform: "H5",
746
+ lng: item.longitude,
747
+ lat: item.latitude,
748
+ address: item.address,
749
+ icon: {
750
+ url: item.shop_icon,
751
+ size: {width: 30, height: 30},
752
+ opts: {imageSize: {width: 30, height: 30}}
753
+ },
754
+ title: item.resource_shop_name,
755
+ id: item.resource_shop_id,
756
+ }
757
+ })
758
+ // #endif
759
+ // #ifdef MP-WEIXIN
760
+ this.setWeiXinMarkerList(list);
761
+ // #endif
762
+ },
763
+ switchMapExtend(isExtend){
764
+ this.mapIsExtend = isExtend;
765
+ },
766
+
767
+
768
+
769
+ //==点击事件===========
770
+ handleWxToEvent(e){
771
+ this.handleToEvent({resource_shop_id: e.detail.markerId},'shop');
772
+ },
773
+ handleBaiduToEvent({item}){
774
+ this.handleToEvent({resource_shop_id: item.id},'shop');
775
+ },
776
+ /**
777
+ * @description
778
+ * @param item
779
+ * @param type detail|shop
780
+ */
781
+ handleToEvent(item,type) {
782
+ let parmas = [];
783
+ let url = ''
784
+ if(item['resource_shop_id']) parmas.push(`resource_shop_id=${item['resource_shop_id']}`)
785
+
786
+ //去门店
787
+ if(type === 'shop') url = this.codePath;
719
788
 
789
+ //去详情
790
+ if(type === 'detail') url = this.detailPath;
791
+
792
+ if(!url) throw new Error(`${type} => 未设置访问地址,参数:${parmas.join('&')}`);
720
793
 
721
794
  //预览模式
722
795
  if(this.$configProject['isPreview']) {
@@ -729,31 +802,21 @@
729
802
  url: `${url}?${parmas.join('&')}`
730
803
  })
731
804
  },
732
-
733
805
  //==点击事件===========
734
806
 
807
+
735
808
  onJfbScroll(options) {
736
809
 
737
810
  },
738
- onJfbReachBottom(options) {
739
- // if (this.hasNext) {
740
- // this.page_token = this.next_page_token;
741
- // if (this.tab === 'nearby') {
742
- // this.getNearbyShop()
743
- // } else {
744
- // this.getOftenShop()
745
- // }
746
- // }
747
- },
811
+
748
812
  onJfbCustomEvent({ action, data }) {
749
813
  if (action === 'baseHeader@search') {
750
814
  this.keyword = data;
751
- this.page_token = '1';
752
- if (this.tab === 'nearby') {
753
- this.getNearbyShop()
754
- } else {
755
- this.getOftenShop()
756
- }
815
+ this.clearList();
816
+ this.getNearbyShop()
817
+ }
818
+ if(action === 'baseHeader@focus'){
819
+ this.switchMapExtend(false)
757
820
  }
758
821
  },
759
822
  }
@@ -771,11 +834,11 @@
771
834
  .shop_map {
772
835
  background: #fff;
773
836
  font-size: unit(28, rpx);
774
-
775
837
  .mpa_wrap {
776
- height: 400rpx;
838
+ height: 500rpx;
777
839
  background: #fff;
778
840
  transition: all .3s ease-in-out;
841
+ position: relative;
779
842
 
780
843
  /deep/ .xd-baidu__content {
781
844
  position: relative;
@@ -784,6 +847,25 @@
784
847
  }
785
848
  &.close{
786
849
  height: 0;
850
+ position: relative;
851
+ z-index: 0;
852
+ padding: 0;
853
+ overflow: hidden;
854
+ }
855
+ }
856
+
857
+ .map-center {
858
+ position: absolute;
859
+ width: 90rpx;
860
+ height: 90rpx;
861
+ top: 49%;
862
+ left: 50%;
863
+ transform: translate(-50%,-50%);
864
+ z-index: 3500;
865
+
866
+ & image {
867
+ width: 100%;
868
+ height: 100%;
787
869
  }
788
870
  }
789
871
 
@@ -792,7 +874,10 @@
792
874
  line-height: unit(30, rpx);
793
875
  padding-bottom: unit(10, rpx);
794
876
  }
877
+
795
878
  .map_expend{
879
+ position: relative;
880
+ z-index: 1;
796
881
  display: flex;
797
882
  justify-content: center;
798
883
  align-items: center;
@@ -801,40 +886,154 @@
801
886
  }
802
887
  }
803
888
 
804
- .shop_tabs {
805
- display: flex;
806
- background: #fff;
807
- border-bottom: 1px solid #f8f8f8;
889
+ .shop_list {
890
+ flex: 1;
891
+ .scroll_y{
892
+ height: 100%;
893
+ }
808
894
 
895
+ &-ske {
896
+ &-title {
897
+ display: flex;
898
+ justify-content: space-between;
899
+ align-content: center;
900
+ margin-bottom: 16rpx;
809
901
 
810
- .tab_item {
811
- font-size: 32rpx;
812
- color: #333;
813
- font-weight: 400;
814
- padding: 0 24rpx;
815
- position: relative;
816
- border-radius: 60rpx;
817
-
818
- & .lineX {
819
- position: absolute;
820
- bottom: 14rpx;
821
- height: 6rpx;
822
- background-color: var(--main-color);
823
- border-radius: 6rpx;
824
- width: 64rpx;
825
- left: 50%;
826
- transform: translateX(-50%);
902
+ & > view:first-child {
903
+ .skeleton-item(100%, 46rpx);
904
+ }
905
+
906
+ & > view:last-child {
907
+ flex-shrink: 0;
908
+ .skeleton-item(120rpx, 30rpx);
909
+ margin-left: 32rpx;
910
+ }
911
+ }
912
+ &-address {
913
+ display: flex;
914
+ justify-content: space-between;
915
+ align-content: center;
916
+ margin-bottom: 16rpx;
917
+
918
+ & > view:first-child {
919
+ .skeleton-item(70%, 36rpx);
920
+ }
921
+
922
+ & > view:last-child {
923
+ flex-shrink: 0;
924
+ .skeleton-item(100rpx, 28rpx);
925
+ }
926
+ }
927
+ &-time {
928
+ .skeleton-item(30%, 28rpx);
827
929
  }
828
930
  }
829
- }
830
931
 
831
- .shop_list {
832
- flex: 1;
833
- .scroll_y{
834
- height: 100%;
932
+ &-item {
933
+ box-sizing: border-box;
934
+ //&:last-child {
935
+ // margin-bottom: 0!important;
936
+ //}
937
+ &-act {
938
+ background-color: var(--main-alpha-color)!important;
939
+ border:1px solid var(--main-alpha5-color)!important;
940
+ }
941
+
942
+ &-title {
943
+ display: flex;
944
+ justify-content: space-between;
945
+ align-items: center;
946
+ margin-bottom: 16rpx;
947
+ & > .title {
948
+ width: calc(100% - 140rpx);
949
+ flex-shrink: 0;
950
+ display: flex;
951
+ justify-content: flex-start;
952
+ align-items: center;
953
+ font-size: 32rpx;
954
+ line-height: 44rpx;
955
+ color: #333;
956
+ font-weight: 400;
957
+
958
+ & > view:first-child {
959
+ .uni-one-cut(44);
960
+
961
+ }
962
+
963
+ & > view:nth-child(2) {
964
+ flex-shrink: 0;
965
+ line-height: 44rpx;
966
+ font-size: 24rpx;
967
+ border-radius: 8rpx;
968
+ border:1px solid var(--main-alpha5-color)!important;
969
+ padding: 0 16rpx;
970
+ margin-left: 16rpx;
971
+ color: var(--main-color);
972
+ }
973
+ }
974
+
975
+ & > view:last-child {
976
+ flex-shrink: 0;
977
+ margin-left: 48rpx;
978
+ font-size: 24rpx;
979
+ color: #999;
980
+ display: flex;
981
+ align-items: center;
982
+ justify-content: flex-end;
983
+ & > text {
984
+ margin-right: 10rpx;
985
+ }
986
+ }
987
+ }
988
+
989
+ & > .address {
990
+ color: #999;
991
+ font-size: 24rpx;
992
+ line-height: 36rpx;
993
+ margin-bottom: 16rpx;
994
+ display: flex;
995
+ justify-content: flex-start;
996
+ align-content: center;
997
+
998
+ & > view:first-child {
999
+ .uni-one-cut(36);
1000
+ flex: 1;
1001
+
1002
+ }
1003
+ & > view:nth-child(2) {
1004
+ flex-shrink: 0;
1005
+ margin-left: 32rpx;
1006
+ }
1007
+ }
1008
+
1009
+ & > .openTime {
1010
+ color: #999;
1011
+ font-size: 24rpx;
1012
+ line-height: 36rpx;
1013
+ }
835
1014
  }
836
1015
  }
837
1016
 
1017
+ .callout-text {
1018
+ display: flex;
1019
+ justify-content: flex-start;
1020
+ align-items: flex-start;
1021
+ flex-flow: wrap;
1022
+ line-height: 36rpx;
1023
+ }
1024
+
1025
+ }
1026
+
1027
+ .weiXinLocation {
1028
+ right: 20rpx;
1029
+ bottom: 20rpx;
1030
+ font-size: 20rpx;
1031
+ position: absolute;
1032
+ width: 60rpx;
1033
+ height: 60rpx;
1034
+ background-color: #fff;
1035
+ border: 1px solid #ccc;
1036
+ border-radius: 8rpx;
838
1037
  }
839
1038
  }
840
1039
  </style>