jufubao-mall 2.0.32 → 2.0.34

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.
Files changed (38) hide show
  1. package/package.json +1 -1
  2. package/src/components/CusCouponChose/CusCouponChose.vue +10 -13
  3. package/src/components/CusEnter/CusEnter.vue +9 -1
  4. package/src/components/CusListItem/CusListItem.vue +141 -0
  5. package/src/components/CusPoster/CusPoster.vue +17 -62
  6. package/src/components/CusPrice/CusPrice.vue +391 -0
  7. package/src/components/CusProduct/CusProduct.vue +576 -184
  8. package/src/components/CusShops/CusShops.vue +409 -209
  9. package/src/components/CusTab/CusTab.vue +159 -22
  10. package/src/components/CusVipList/CusVipList.vue +169 -0
  11. package/src/components/JfbMallConfirm/Api.js +1 -1
  12. package/src/components/JfbMallConfirm/Attr.js +167 -453
  13. package/src/components/JfbMallConfirm/JfbMallConfirm.vue +362 -162
  14. package/src/components/JfbMallConfirm/Mock.js +61 -43
  15. package/src/components/JfbMallConfirm/XdAddrDefault.vue +26 -13
  16. package/src/components/JfbMallConfirm/XdAddrOld.vue +9 -7
  17. package/src/components/JfbMallConfirm/XdListItem.vue +10 -2
  18. package/src/components/JfbMallConfirm/cusAttr/advanced.js +91 -0
  19. package/src/components/JfbMallConfirm/cusAttr/content.js +355 -0
  20. package/src/components/JfbMallConfirm/cusAttr/style.js +628 -0
  21. package/src/components/JfbMallConfirm/shopList.vue +84 -42
  22. package/src/components/JfbMallNetworkMedia/Api.js +94 -0
  23. package/src/components/JfbMallNetworkMedia/Attr.js +20 -0
  24. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMedia.vue +1167 -0
  25. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaLess.less +80 -0
  26. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaMixin.js +30 -0
  27. package/src/components/JfbMallNetworkMedia/Mock.js +372 -0
  28. package/src/components/JfbMallNetworkMedia/cusAttr/advanced.js +60 -0
  29. package/src/components/JfbMallNetworkMedia/cusAttr/content.js +230 -0
  30. package/src/components/JfbMallNetworkMedia/cusAttr/font.js +123 -0
  31. package/src/components/JfbMallNetworkMedia/cusAttr/icon.js +257 -0
  32. package/src/components/JfbMallNetworkMedia/cusAttr/style.js +12 -0
  33. package/src/components/JfbMallProductInfo/cusAttr/content.js +2 -0
  34. package/src/components/JfbMallProductList/JfbMallProductList.vue +7 -1
  35. package/src/components/JfbMallProductList/XdCateV1.vue +0 -1
  36. package/src/components/JfbMallShop/JfbMallShop.vue +1 -1
  37. package/src/components/JfbMallShop/cusAttr/content.js +1 -1
  38. package/src/components/SkeProduct/SkeProduct.vue +88 -3
@@ -1,141 +1,135 @@
1
1
 
2
2
  <template>
3
- <view :style="[{'--main-color': mainColor,'--sub-main-color': subMainColor}]">
4
- <view class="shopping-ske" v-if="dataList ===null">null</view>
3
+ <view :style="[{'--main-color': mainColor,'--sub-main-color': subMainColor},activeComp]">
4
+ <view class="shopping-ske-box" v-if="dataShopList ===null">
5
+ <view
6
+ class="shopping-ske-item"
7
+ v-for="item in skeNumComp"
8
+ :key="item"
9
+ :style="[cusStyle['item']||{}]"
10
+ >
11
+ <view class="shopping-ske-image" v-if="image">
12
+ <view></view>
13
+ </view>
14
+ <view class="shopping-ske-cont">
15
+ <view class="shopping-ske-name"></view>
16
+ <view class="shopping-ske-address">
17
+ <view class="address" v-if="address"></view>
18
+ <view class="shopping-ske-v2" v-if="layout === 'v2'">
19
+ <view>
20
+ <view class="ske1"></view>
21
+ <view class="ske2"></view>
22
+ <view class="ske3"></view>
23
+ <view class="ske4"></view>
24
+ </view>
25
+ <view>
26
+ <view class="ske1"></view>
27
+ <view class="ske2"></view>
28
+ <view class="ske3"></view>
29
+ </view>
30
+ </view>
31
+ </view>
32
+ <view class="shopping-ske-v3" v-if="layout === 'v3'">
33
+ <view></view>
34
+ <view>
35
+ <view></view>
36
+ <view></view>
37
+ </view>
38
+
39
+ </view>
40
+ </view>
41
+ </view>
42
+ </view>
5
43
  <view
6
44
  class="shopping"
7
- v-else-if="dataList.length > 0"
45
+ v-else-if="dataShopList.length > 0"
8
46
  :style="[cusStyle['box']||{}]"
9
47
  >
10
48
  <view
11
49
  class="shopping-list"
12
- v-for="item in dataList"
50
+ v-for="(item) in dataShopList"
13
51
  :key="item[compMK.id]"
52
+ :id="`shop_item_${item[compMK.id]}`"
53
+ :class="{active: [
54
+ item[compMK.id].toString(),
55
+ item[compMK.shop_id].toString()
56
+ ].includes(selectId)}"
14
57
  :style="[cusStyle['item']||{}]"
15
- @click="handleClick(item, 'handleToDetail', 'DL')"
58
+ @click="handleClick(item, 'DL')"
16
59
  >
17
60
  <!--图片区域-->
18
61
  <view class="shopping-img" v-if="image" :style="[cusStyle['image']||{}]">
62
+ <image v-if="!item.errorStatus" :src="item[compMK.image]" :alt="item[compMK.name]" mode="aspectFit" @error="handleError(item)"></image>
19
63
  <image v-if="item.errorStatus" :src="errorImage" :alt="item[compMK.name]"></image>
20
- <image v-else :src="item[compMK.image]" :alt="item[compMK.name]" mode="aspectFit" @error="handleError(item)"></image>
21
64
  </view>
22
65
  <!--图片区域-->
23
66
  <!--信息区域-->
24
67
  <view class="shopping-cont" :class="{noImage: !image}">
25
68
  <view class="shopping-cont-nameInfo">
26
69
  <view class="shopping-name">
27
- <view class="name" :style="[cusStyle['name']||{}]" v-html="item[compMK.name]"></view>
28
- <view
29
- class="distance"
30
- v-if="distance && distanceStyle === 'title' && item[compMK.distance]"
31
- v-html="item[compMK.distance]"
32
- :style="[cusStyle['distance']||{}]"
33
- ></view>
34
- <view class="priceAndDiscount" v-if="distanceStyle === 'button'">
35
- <view class="price" v-if="price && item[compMK.price]">
36
- <text>{{item[compMK.price]|filterPrice}}</text>
37
- <text>起</text>
38
- </view>
39
- <view class="discount" v-if="discount && item[compMK.discount]">
40
- <text>{{item[compMK.discount]|filterDiscount}}</text>
41
- <text>折</text>
42
- </view>
43
- </view>
70
+ <view class="name" :style="[cusStyle['name']||{}]">{{item[compMK.name]}}</view>
71
+ <view class="distance" v-if="!address && distance && layout === 'v2' && item[compMK.distance]">{{item[compMK.distance]}}</view>
44
72
  </view>
45
73
  <view class="shopping-info">
46
74
  <view
75
+ :class="{'shopping-address-v2': layout === 'v2'}"
47
76
  class="shopping-address"
48
- :class="{one: tagPos === 'info'}"
49
- v-if="address"
50
- v-html="item[compMK.address]"
51
- ></view>
52
- <view class="tags-info" v-if="tagPos === 'info'">
53
- <view class="tags-info-tag">
54
- <xd-font-icon icon="iconduihuan" color="#43CF7C" size="28" style="margin-right: 8rpx;"></xd-font-icon>
55
- <text>支持到店使用</text>
77
+ v-if="address || distance"
78
+ >
79
+ <view class="address one" v-if="address && item[compMK.address]">{{item[compMK.address]}}</view>
80
+ <view class="distance" v-if="address && distance && layout === 'v2' && item[compMK.distance]">{{item[compMK.distance]}}</view>
81
+ </view>
82
+ <view class="tags-info" v-if="layout === 'v2' && isBtn">
83
+ <view
84
+ class="tags-info-item"
85
+ v-for="btn in item[compMK.options]"
86
+ :key="btn['consume_mode']"
87
+ >
88
+ <view class="tags-info-icon"><xd-font-icon :icon="btn.icon" size="32" :color="iconThemeStyle[btn.icon]"></xd-font-icon></view>
89
+ <view class="tags-info-price" v-if="price && btn.show_prices && btn.show_prices.length > 0">
90
+ <cus-price
91
+ type="normal"
92
+ :isPlus="isPlus"
93
+ :icon-size=".20"
94
+ text-font-size="22"
95
+ :showPrice="btn.show_prices"
96
+ ></cus-price>
97
+ </view>
98
+ <view class="tags-info-desc">{{btn.desc}}</view>
99
+ <view
100
+ class="tags-info-btn"
101
+ v-if="btn['consume_mode'] !== 'CODE'"
102
+ @click.stop="handleClick(item, btn['consume_mode'])"
103
+ ><view>{{btn['consume_mode']|filterName}}</view></view>
56
104
  </view>
57
105
  </view>
58
106
  </view>
59
107
  </view>
60
- <view class="shopping-btn">
108
+ <view class="shopping-btn" v-if="layout === 'v3'">
61
109
  <!--v3-->
62
- <view class="distance" v-if="distanceStyle === 'button' && item[compMK.distance]" >
110
+ <view class="distance" v-show="distance && item[compMK.distance]" >
63
111
  <xd-font-icon :style="[cusStyle['distance']||{}]" icon="icondizhi" size="26"></xd-font-icon>
64
- <text :style="[cusStyle['distance']||{}]" style="margin-left: 10rpx" v-html="item[compMK.distance]"></text>
112
+ <text :style="[cusStyle['distance']||{}]" style="margin-left: 10rpx" >{{item[compMK.distance]}}</text>
65
113
  </view>
66
- <!--v3-->
67
- <!--v2-->
68
- <view v-if="tagPos === 'info'">
69
- <view class="priceAndDiscount">
70
- <view class="price" v-if="price && item[compMK.price]">
71
- <text>{{item[compMK.price]|filterPrice}}</text>
72
- <text>起</text>
73
- </view>
74
- <view class="discount" v-if="discount && item[compMK.discount]">
75
- <text>{{item[compMK.discount]|filterDiscount}}</text>
76
- <text>折</text>
77
- </view>
78
- </view>
79
- </view>
80
- <!--v2-->
81
- <!--v1-->
82
- <template v-if="tagPos === 'btn'">
83
- <view v-if="!isShowBtn" class="tags">
84
- <view :style="[compTagsStyle]" v-if="item[compMK.mode].includes('SELL')">支持核销</view>
85
- <view :style="[compTagsStyle]" v-if="item[compMK.mode].includes('SEAT')">在线选座</view>
86
- </view>
87
- <view class="priceAndDiscount">
88
- <view class="price" v-if="price && item[compMK.price]">
89
- <text>{{item[compMK.price]|filterPrice}}</text>
90
- <text>起</text>
91
- </view>
92
- <view class="discount" v-if="discount && item[compMK.discount]">
93
- <text>{{item[compMK.discount]|filterDiscount}}</text>
94
- <text>折</text>
95
- </view>
114
+ <view class="buttons" v-if="isBtn">
115
+ <view
116
+ v-for="btn in item[compMK.options]"
117
+ :key="btn['consume_mode']"
118
+ class="change_btn"
119
+ @click.stop="handleClick(item, btn['consume_mode'])"
120
+ >
121
+ <view>{{btn['consume_mode']|filterName}}</view>
96
122
  </view>
97
- </template>
98
- <!--v1-->
99
- <!--按钮-->
100
- <view class="buttons" v-if="isShowBtn && isBtn">
101
- <!-- CV:店员核销(小蜜蜂);WB:用户扫水牌;CR:收银机;POS:POS机;JHD:聚好兑; QP:快捷支付;MC电影去购买-->
102
- <template v-if="item[compMK.mode].includes('SELL')">
103
- <view
104
- v-if="item[compMK.defType] === 'WB' && compEntry.scan === true"
105
- class="change_btn"
106
- @click.stop="handleClick(item, 'handleToScan', item[compMK.defType])"
107
- >{{ compNames.scan }}</view>
108
- <view
109
- v-else-if="item[compMK.defType] === 'QP' && compEntry.takeGoods === true"
110
- class="change_btn"
111
- @click.stop="handleClick(item,'handleToEasyPay',item[compMK.defType])"
112
- >{{ compNames.takeGoods }}</view>
113
- <view
114
- v-else-if="item[compMK.defType] === 'JHD' && compEntry.jhd === true"
115
- class="change_btn"
116
- @click.stop="handleClick(item,'handleToExchange',item[compMK.defType])"
117
- >{{ compNames.jhd }}</view>
118
- </template>
119
- <template v-if="item[compMK.mode].includes('SEAT') && compEntry.buyTicket === true">
120
- <view
121
- class="change_btn"
122
- @click.stop="handleClick(item,'toSchedulePath','SEAT')"
123
- >{{ compNames.buyTicket}}</view>
124
- </template>
125
- <template v-if="item[compMK.mode].includes('CODE') && compEntry.code === true">
126
- <view
127
- class="change_btn code"
128
- @click.stop="handleClick(item,'toCodePath','CODE')"
129
- >{{ compNames.code}}</view>
130
- </template>
131
123
  </view>
132
- <!--按钮-->
124
+ <!--v3-->
133
125
  </view>
134
126
  </view>
135
127
  <!--信息区域-->
136
128
  </view>
137
129
  </view>
138
- <view class="shopping-empty" v-else-if="dataList.length === 0"></view>
130
+ <view class="shopping-empty" v-else-if="dataShopList.length === 0">
131
+ <xd-no-data :scale-size="2" icon-type="shop">暂无门店信息</xd-no-data>
132
+ </view>
139
133
  </view>
140
134
 
141
135
  </template>
@@ -143,12 +137,17 @@
143
137
  <script>
144
138
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon.vue";
145
139
  import Color from "color";
140
+ import CusPrice from "@/components/CusPrice/CusPrice.vue";
141
+ import XdNoData from "@/components/XdNoData/XdNoData.vue";
142
+ import getServiceUrl from "@/common/getServiceUrl";
146
143
  let $vm = null;
147
144
 
148
145
  export default {
149
146
  name:'CusShops',
150
147
  components:{
151
- XdFontIcon
148
+ CusPrice,
149
+ XdFontIcon,
150
+ XdNoData
152
151
  },
153
152
  props:{
154
153
  list: {
@@ -171,7 +170,7 @@ export default {
171
170
  content:{
172
171
  type: Array|null,
173
172
  default(){
174
- return ['image', 'address', 'distance', 'discount','price']
173
+ return ['image', 'address', 'distance','price']
175
174
  }
176
175
  },
177
176
  isShowBtn:{
@@ -188,7 +187,7 @@ export default {
188
187
  },
189
188
  names:{
190
189
  type: Object,
191
- //jhd,scan,takeGoods,buyTicket,code
190
+ //jhd,wb,qp,seat,code,hdself,travel
192
191
  default(){
193
192
  return {}
194
193
  }
@@ -199,29 +198,41 @@ export default {
199
198
  return {}
200
199
  }
201
200
  },
201
+ //jhd,wb,qp,seat,code,hdself,travel
202
202
  entry:{
203
203
  type:Object,
204
204
  default(){
205
205
  return {}
206
206
  }
207
- }
207
+ },
208
+ selectId:{
209
+ type:String,
210
+ default:''
211
+ },
212
+ //是否智能识别一个按钮模式
213
+ isAutoJump:{
214
+ type:Array,
215
+ default(){
216
+ return []
217
+ },
218
+ },
208
219
  },
209
220
  data(){
210
221
  return {
211
- distanceStyle:'title',//title:标题后面 button: 操作按钮左侧
212
- tagPos: 'info', //info=>信息下方 btn: 操作按钮左侧
213
222
  errorImage:'https://img0.jufubao.cn/common/empty/shop.png?v1=1',
214
223
 
215
224
  //内容区状态
216
225
  image: false,
217
- address:true,
226
+ address:false,
218
227
  distance: false,
219
228
  price: false,
220
- discount: false,
229
+ isPlus:false,
221
230
 
222
231
  //数据键值map关系
223
232
  defMapKeys:{
224
233
  id: 'resource_shop_id',
234
+ brand_id: 'brand_id',//品牌ID
235
+ shop_id:'shop_id',//整理前的门店ID
225
236
  name: 'resource_shop_name', //店铺名字
226
237
  distance: 'distance', //距离
227
238
  address:'address', //店铺地址
@@ -229,129 +240,164 @@ export default {
229
240
  discount : 'discount_ratio', //折扣
230
241
  price:'price', //价格
231
242
  mode:'consume_mode',//标签类型[]
232
- defType:'default_consume_type',
243
+ options:'consume_options',
233
244
  },
234
245
 
235
246
  //自定义名称
236
247
  defName:{
237
- jhd: "聚好兑", //聚好兑名称
238
- scan: "扫一扫", //扫一扫名称
239
- takeGoods: "展快捷码", //展快捷码名称
240
- buyTicket: "去购票", //去购票名称
241
- code:'电子码' //电子码名字
248
+ jhd:'聚好兑', //聚好兑
249
+ wb:'扫一扫', //扫一扫
250
+ qp:'去提货', //快捷码
251
+ seat: "去订票", //在选选座
252
+ code:'电子码', //电子码名字
253
+ hdself:'去下单', //到店自取名字
254
+ travel: '去订票 ', //旅游订票
242
255
  },
243
256
 
244
257
  defEntry:{
245
- jhd: false, //聚好兑名称
246
- scan: false, //扫一扫名称
247
- takeGoods: false, //展快捷码名称
248
- buyTicket: false, //去购票名称
249
- code:false //电子码名字
258
+ jhd:false, //聚好兑
259
+ wb:false, //扫一扫
260
+ qp:false, //快捷码
261
+ seat: false, //在选选座
262
+ code:false, //电子码
263
+ hdself:false, //到店自取
264
+ travel: false, //旅游订票
250
265
  },
251
266
 
252
- //按钮功能
253
- buttons:[],
267
+
268
+ dataShopList:null,
269
+
270
+ iconThemeStyle:{}
254
271
  }
255
272
  },
256
273
  computed:{
257
- dataList(){
258
- if(this.list === null) return null;
259
- else if(this.$xdUniHelper.checkVarType(this.list) === 'array'){
260
- return this.$xdUniHelper.cloneDeep(this.list);
261
- }
262
- return []
274
+ skeNumComp(){
275
+ return this.layout === 'v2'?5: 6;
263
276
  },
264
-
265
- compTagsStyle(){
266
- let textColor = `rgba(${Color(this.mainColor).alpha(0.1).array().join(',')})`;
277
+ activeComp(){
278
+ let border = `rgba(${Color(this.mainColor).alpha(0.6).array().join(',')})`;
279
+ let bgColor= `rgba(${Color(this.mainColor).alpha(.05).array().join(',')})`;
267
280
  return {
268
- backgroundColor: textColor,
269
- color: this.mainColor,
281
+ '--xd-bgColor': bgColor,
282
+ '--xd-border': `1px solid ${border}`
270
283
  }
271
284
  },
272
285
 
273
286
  compNames(){
274
- return Object.assign({}, this.defName,this.$xdUniHelper.cloneDeep(this.names) )
287
+ return Object.assign({},this.defName,this.$xdUniHelper.cloneDeep(this.names))
275
288
  },
289
+
276
290
  compMK(){
277
291
  return Object.assign({},this.defMapKeys,this.$xdUniHelper.cloneDeep(this.mapKeys))
278
292
  },
279
293
  compEntry(){
280
294
  return Object.assign({},this.defEntry,this.$xdUniHelper.cloneDeep(this.entry))
281
295
  },
296
+
282
297
  isBtn(){
283
298
  let flag = false;
284
299
  Object.keys(this.compEntry).map(key=>{
285
300
  if(this.compEntry[key] === true) flag = true;
286
301
  });
287
- return flag
302
+ return flag && this.isShowBtn
288
303
  }
289
304
  },
290
305
  filters:{
291
- filterPrice(val){
292
- if(typeof val === 'string') val = Number(val)
293
- return $vm.$xdUniHelper.divisionFloatNumber(val,100);
294
- },
295
- filterDiscount(val){
296
- if(typeof val === 'string') val = Number(val)
297
- return $vm.$xdUniHelper.divisionFloatNumber(val,1000);
306
+ filterName(val){
307
+ return $vm.compNames[val.toLocaleLowerCase()];
298
308
  },
299
309
  },
300
310
  watch:{
301
- layout(val){
302
- this.layoutParse(val)
303
- },
304
311
  content(val){
305
312
  this.contentParse(val)
306
313
  },
314
+ list(){
315
+ this.initData();
316
+ },
317
+ compMK(){
318
+ this.initData();
319
+ },
320
+ compEntry(){
321
+ this.initData();
322
+ }
307
323
  },
308
324
  created() {
309
325
  $vm = this;
310
- this.layoutParse(this.layout);
311
326
  this.contentParse(this.content);
327
+ this.initData();
328
+ this.iconThemeStyle = {
329
+ iconduihuan: '#43CF7C',
330
+ iconquan: '#FF8D1A',
331
+ icongou: '#FF5733',
332
+ iconzuo: '#3091FF',
333
+ iconpiao1: '#3091FF'
334
+ }
312
335
  },
313
336
  methods:{
314
- handleError(item){
315
- item.errorStatus = true;
337
+ filterNotSupportCode(options){
338
+ let supportCode = ['seat','hdself','travel','code','jhd','wb','qp'];
339
+ return options.filter(it=>{
340
+ return supportCode.includes(it.consume_mode.toLocaleLowerCase()); //过滤不支持的按钮
341
+ }).filter(it=>{
342
+ return this.entry[it.consume_mode.toLocaleLowerCase()] //过滤未开启按钮设置
343
+ });
316
344
  },
317
- layoutParse(value){
318
- let distanceStyle = 'title';
319
- let tagPos = '';
345
+ checkOneCodeDetailJumpCode(item){
346
+ //未开启智能识别功能并且没有返回options字段
347
+ if(this.isAutoJump.length === 0 ||
348
+ item[this.compMK['options']] === undefined ||
349
+ item[this.compMK['options']].length === 0
350
+ ) return false
320
351
 
321
- //布局1
322
- if(['v1'].includes(value)) {
323
- tagPos = 'btn'
324
- }
325
352
 
326
- //布局2
327
- if(['v2'].includes(value)) {
328
- tagPos = 'info'
329
- }
353
+ //按钮数量大于1一条不处理
354
+ let options = item[this.compMK['options']];
355
+ if(options.length > 1) return false;
356
+
357
+ //智能识别
358
+ let filterCode = ['seat','hdself','travel'];
359
+ return filterCode.includes(options[0].consume_mode.toLocaleLowerCase())
360
+ },
361
+ initData(){
362
+ if(this.list === null) this.dataShopList = null;
363
+ else if(this.$xdUniHelper.checkVarType(this.list) === 'array'){
364
+ this.dataShopList = this.$xdUniHelper.cloneDeep(this.list).map((item,index)=>{
365
+
366
+ //过滤不支持的按钮
367
+ if(item[this.compMK['options']] && item[this.compMK['options']].length > 0) {
368
+ item[this.compMK['options']] = this.filterNotSupportCode(item[this.compMK['options']])
369
+ }
370
+ else item[this.compMK['options']] = [];
330
371
 
331
- //电影模式
332
- if(['v3'].includes(value)) {
333
- distanceStyle = 'button';
372
+ item[this.compMK['image']] = getServiceUrl(item[this.compMK['image']], 'size2')
373
+ //是否智能识别一个按钮模式
374
+ item['isOneCodeDetailJumpCode'] = this.checkOneCodeDetailJumpCode(item);
375
+
376
+ if(item['errorStatus'] === undefined) item['errorStatus'] = false;
377
+ return item
378
+ });
334
379
  }
335
- this.tagPos = tagPos;
336
- this.distanceStyle = distanceStyle;
380
+ else this.dataShopList = [];
381
+ },
382
+ handleError(item){
383
+ item.errorStatus = true;
337
384
  },
338
385
  contentParse(value){
339
386
  this.image = value.includes('image')
340
387
  this.address = value.includes('address')
341
388
  this.distance = value.includes('distance')
342
- //价格和折扣只有在v1,v2线上
343
389
  this.price = value.includes('price')
344
- this.discount = value.includes('discount')
345
390
  },
346
391
 
347
392
  /**
348
393
  * @description 事件操作
349
394
  * @param item {Object} 数据对象
350
- * @param funcName {string} 操作方法名字
351
395
  * @param type {string} 类型
352
396
  */
353
- handleClick(item, funcName, type) {
354
- this.$emit('on-event', {item,funcName,type});
397
+ handleClick(item, type) {
398
+ //当只有一个服务器点击详情直接进入服务
399
+ if(item['isOneCodeDetailJumpCode'] === true) type = item[this.compMK['mode']][0]
400
+ this.$emit('on-event', {item,type});
355
401
  }
356
402
  }
357
403
  }
@@ -359,10 +405,8 @@ export default {
359
405
  </script>
360
406
  <style scoped lang="less">
361
407
  .shopping {
362
- &-list {
408
+ &-list,&-ske-item {
363
409
  background-color: #fff;
364
- padding: 20rpx;
365
- margin-top: 20rpx;
366
410
  display: flex;
367
411
  justify-content: space-between;
368
412
  align-items: flex-start;
@@ -370,32 +414,60 @@ export default {
370
414
  &:first-child {
371
415
  margin-top: 0;
372
416
  }
417
+
418
+ &:last-child {
419
+ margin-bottom: 0!important;
420
+ }
421
+
422
+ &.active {
423
+ background-color: var(--xd-bgColor)!important;
424
+ border: var(--xd-border)!important;
425
+ }
373
426
  }
374
- &-img {
375
- width: 200rpx;
376
- height: 200rpx;
377
- margin-right: 20rpx;
427
+ &-img,&-ske-image {
428
+ width: 160rpx;
429
+ height: 160rpx;
430
+ margin-right: 16rpx;
378
431
  flex-shrink: 0;
432
+ overflow: hidden;
379
433
 
380
434
  & > image {
381
- width: 200rpx;
382
- height: 200rpx;
435
+ width: 160rpx;
436
+ height: 160rpx;
383
437
  }
384
438
  }
385
439
 
386
- &-cont {
440
+ &-ske-image{
441
+ .skeleton-item(160rpx, 160rpx)
442
+ }
443
+
444
+ &-cont,&-ske-cont {
387
445
  flex: 1;
388
446
  display: flex;
389
447
  flex-wrap: wrap;
390
448
  align-content: space-between;
391
- min-height: 200rpx;
449
+ min-height: 160rpx;
392
450
  justify-items: flex-end;
393
451
 
452
+
453
+ // #ifdef MP-WEIXIN
454
+ &-nameInfo {
455
+ width: 100%;
456
+ }
457
+
458
+ & > .shopping-btn {
459
+ width: 100%;
460
+ }
461
+ // #endif
462
+
463
+
394
464
  &.noImage {
395
465
  min-height: 0;
466
+ align-content: normal;
467
+ display: block;
396
468
 
397
469
  & .shopping-btn {
398
- margin-top: 32rpx;
470
+ margin-top: 16rpx;
399
471
  }
400
472
  }
401
473
 
@@ -405,17 +477,19 @@ export default {
405
477
  }
406
478
  }
407
479
 
408
- &-name {
480
+ &-name,&-ske-name {
409
481
  display: flex;
410
482
  justify-content: flex-start;
411
483
  align-items: center;
412
484
  & .name {
413
485
  font-size: 32rpx;
414
486
  font-weight: 400;
415
- line-height: 40rpx;
416
- .uni-cut(1,40);
487
+ line-height: 1.5;
488
+ .uni-cut(1,48);
417
489
  flex: 1;
418
490
  color: #333;
491
+ word-wrap: break-word;
492
+ word-break: break-all;
419
493
  }
420
494
 
421
495
  & .distance {
@@ -425,36 +499,151 @@ export default {
425
499
  }
426
500
  }
427
501
 
502
+ &-ske-name {
503
+ .skeleton-item(80%, 50rpx)
504
+ }
505
+
506
+ &-ske-address {
507
+ margin-top: 10rpx;
508
+ & .address {
509
+ .skeleton-item(100%, 36rpx)
510
+ }
511
+ }
512
+
513
+ &-ske-v2 {
514
+ & > view {
515
+ display: flex;
516
+ justify-content: flex-start;
517
+ align-items: center;
518
+ & > view {
519
+ margin-top: 10rpx;
520
+ margin-right: 10rpx;
521
+ &:last-child {
522
+ margin-right: 0;
523
+ }
524
+ }
525
+
526
+ & > .ske1 {
527
+ .skeleton-item(36rpx, 36rpx);
528
+ flex-shrink: 0;
529
+ }
530
+ & > .ske2 {
531
+ .skeleton-item(80rpx, 36rpx);
532
+ flex-shrink: 0;
533
+ }
534
+ & > .ske3 {
535
+ .skeleton-item(60%, 36rpx);
536
+ flex: 1;
537
+ }
538
+ & > .ske4 {
539
+ .skeleton-item(80rpx, 36rpx);
540
+ flex-shrink: 0;
541
+ }
542
+ }
543
+ }
544
+
545
+ &-ske-v3 {
546
+ display: flex;
547
+ justify-content: space-between;
548
+ align-items: flex-end;
549
+ margin-top: 10rpx;
550
+
551
+ & > view:first-child {
552
+ .skeleton-item(100rpx, 26rpx);
553
+ }
554
+
555
+ & > view {
556
+ display: flex;
557
+ justify-content: flex-end;
558
+ align-items: center;
559
+ view {
560
+ .skeleton-item(120rpx, 50rpx);
561
+ margin-left: 10rpx;
562
+ }
563
+
564
+ }
565
+ }
566
+
428
567
  &-info {
429
568
  & .tags-info {
430
- margin-top: 16rpx;
431
- &-tag {
569
+ margin-top: 8rpx;
570
+
571
+ &-item {
432
572
  display: flex;
433
573
  justify-content: flex-start;
434
574
  align-items: center;
435
- font-size: 24rpx;
436
- color: #999;
575
+ min-height: 64rpx;
576
+
577
+ & > view {
578
+ margin-right: 10rpx;
579
+ font-size: 24rpx;
580
+ flex-shrink: 0;
581
+
582
+ &.tags-info-desc {
583
+ color: #999;
584
+ flex: 1;
585
+ .uni-cut(1,32);
586
+ }
587
+ }
588
+ }
589
+
590
+ &-btn {
591
+ height: 64rpx;
592
+ display: flex;
593
+ justify-content: center;
594
+ align-items: center;
595
+ padding-left: 40rpx;
596
+ margin-right: 0!important;
597
+ & > view {
598
+ height: 48rpx;
599
+ padding: 0 16rpx;
600
+ line-height: 48rpx;
601
+ background-color: var(--g-theme-mainColor);
602
+ color: #fff;
603
+ border-radius: 24rpx;
604
+ }
605
+
437
606
  }
438
607
  }
439
608
  }
440
609
 
441
610
  &-address {
442
611
  margin-top: 16rpx;
443
- font-size: 24rpx;
444
- color: #999;
445
- line-height: 32rpx;
446
- .uni-max-cut(2,64);
447
612
 
448
- &.one {
449
- .uni-max-cut(1,32);
613
+ &-v2 {
614
+ display: flex;
615
+ justify-content: flex-start;
616
+ align-items: center;
617
+
618
+ & > view.distance {
619
+ flex-shrink: 0;
620
+ margin-left: 20rpx;
621
+ font-size: 24rpx;
622
+ color: #999;
623
+ }
450
624
  }
625
+ & > view.address {
626
+ font-size: 24rpx;
627
+ color: #999;
628
+ line-height: 1.5em;
629
+ word-wrap: break-word;
630
+ word-break: break-all;
631
+ .uni-max-cut(2,72);
632
+ flex: 1;
633
+
634
+ &.one {
635
+ .uni-max-cut(1,36);
636
+ }
637
+ }
638
+
451
639
  }
452
640
 
453
641
  &-btn {
454
642
  display: flex;
455
- justify-content: space-between;
456
- align-items: center;
457
- margin-top: 16rpx;
643
+ justify-content: flex-end;
644
+ align-items: flex-end;
645
+ height: 64rpx;
646
+ margin-top: 10rpx;
458
647
 
459
648
  & .distance {
460
649
  display: flex;
@@ -462,15 +651,23 @@ export default {
462
651
  flex-shrink: 0;
463
652
  font-size: 24rpx;
464
653
  color: #999;
654
+ margin-bottom: 12rpx;
465
655
  }
466
656
 
467
657
  & .tags {
658
+ display: flex;
659
+ justify-content: flex-start;
660
+ align-items: center;
468
661
  & > view {
469
662
  font-size: 24rpx;
470
663
  height: 42rpx;
471
664
  line-height: 42rpx;
472
665
  border-radius: 12rpx;
473
666
  padding: 0 16rpx;
667
+ margin-right: 16rpx;
668
+ &:last-child {
669
+ margin-right: 0;
670
+ }
474
671
  }
475
672
 
476
673
  }
@@ -479,21 +676,24 @@ export default {
479
676
  display: flex;
480
677
  justify-content: flex-end;
481
678
  align-items: center;
679
+ flex: 1;
680
+ height: 64rpx;
681
+
482
682
  & .change_btn{
483
- padding: 0 16rpx;
484
683
  height: 48rpx;
485
- line-height: 48rpx;
486
- border-radius: 24rpx;
487
- background-color: var(--main-color);
488
- font-size: 24rpx;
489
- flex-shrink: 0;
490
- color: #fff;
491
- & + .change_btn{
492
- margin-left: 10rpx;
493
- }
494
-
495
- &.code {
496
- background-color: var(--sub-main-color);
684
+ padding-top: 16rpx;
685
+ padding-left: 16rpx;
686
+ padding-bottom: 16rpx;
687
+
688
+ & > view {
689
+ padding: 0 16rpx;
690
+ height: 48rpx;
691
+ line-height: 48rpx;
692
+ border-radius: 24rpx;
693
+ background-color: var(--main-color);
694
+ font-size: 24rpx;
695
+ flex-shrink: 0;
696
+ color: #fff;
497
697
  }
498
698
  }
499
699
  }