jufubao-base 1.0.290-beta3 → 1.0.291-beta4
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 +1 -1
- package/src/components/CusCouponChose/CusCouponChose.vue +1027 -0
- package/src/components/CusCouponItem/CusCouponItem.vue +298 -0
- package/src/components/CusEnter/CusEnter.vue +360 -0
- package/src/components/CusPoster/CusPoster.vue +212 -0
- package/src/components/CusPoster/CusSwiperDot.vue +234 -0
- package/src/components/CusProduct/CusProduct.vue +372 -0
- package/src/components/CusShops/CusShops.vue +518 -0
- package/src/components/CusSwiperDot/CusSwiperDot.vue +234 -0
- package/src/components/CusTab/CusTab.vue +411 -0
- package/src/components/CusVideo/CusVideo.vue +170 -0
- package/src/components/JfbBaseFooter/Attr.js +10 -155
- package/src/components/JfbBaseFooter/JfbBaseFooter.vue +107 -46
- package/src/components/JfbBaseFooter/XdFooterBar.vue +325 -0
- package/src/components/JfbBaseFooter/cusAttr/advanced.js +12 -0
- package/src/components/JfbBaseFooter/cusAttr/content.js +471 -0
- package/src/components/JfbBaseFooter/cusAttr/style.js +7 -0
- package/src/components/JfbBaseFooter/cusAttr/tools.js +17 -0
- package/src/components/JfbBaseTfkSearch/Api.js +15 -0
- package/src/components/JfbBaseTfkSearch/CustomList.vue +10 -0
- package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +255 -7
- package/src/components/JfbBaseTfkSearch/XdQueryFilter.vue +347 -0
- package/src/components/JfbBaseTfkSearch/XdQuerySort.vue +192 -0
- package/src/components/JfbBaseTfkSearch/listMixins.js +8 -6
- package/src/components/JfbBaseUserInfo/Attr.js +12 -0
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +8 -2
- package/src/mixins/componentsMixins.js +363 -55
- package/src/mixins/posterMixins.js +27 -199
- package/src/mixins/productCompMixins.js +252 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="product" :class="{two: cell >= 2 , one: cell === 1}" @click="handleDetail()">
|
|
3
|
+
<view
|
|
4
|
+
class="product-image"
|
|
5
|
+
:style="{
|
|
6
|
+
marginRight: (cell === 1 ? (cellSpacing + 'rpx'):0),
|
|
7
|
+
marginBottom: (cell === 1 ? 0: (cellSpacing + 'rpx')),
|
|
8
|
+
width: (cell === 1 ? '200rpx': '100%'),
|
|
9
|
+
height: (cell === 1 ? '200rpx': (height + 'rpx')),
|
|
10
|
+
backgroundColor: '#f8f8f8',
|
|
11
|
+
borderRadius: imageRadius + 'rpx',
|
|
12
|
+
}"
|
|
13
|
+
>
|
|
14
|
+
<image v-if="errorStatus" :src="errorImage" :alt="item['product_name']" ></image>
|
|
15
|
+
<image v-if="!errorStatus" :src="imageUrl" :alt="item['product_name']" @error="handleError(item)"></image>
|
|
16
|
+
<xd-product-status :status="item['status']"></xd-product-status>
|
|
17
|
+
</view>
|
|
18
|
+
<view class="product-content">
|
|
19
|
+
<view class="product-content-info">
|
|
20
|
+
<view class="name" :style="[nameFont]" v-html="cusName" :class="{showOne: isOne}"></view>
|
|
21
|
+
<view
|
|
22
|
+
class="brand"
|
|
23
|
+
v-if="productConfig.is_show_brand==='Y'"
|
|
24
|
+
:style="{color:brandColor}"
|
|
25
|
+
>{{item['brand_name']}}</view>
|
|
26
|
+
<view class="tags" :class="{showTwo:!isOne}">
|
|
27
|
+
<view
|
|
28
|
+
v-for="tag in tagsList"
|
|
29
|
+
:key="tag"
|
|
30
|
+
:style="{background:tagObjColor[tag]}"
|
|
31
|
+
>{{tagObj[tag]}}</view>
|
|
32
|
+
</view>
|
|
33
|
+
<view class="_tag" v-for="(item,index) in item.postage_tags" :key="index">{{ item }}</view>
|
|
34
|
+
</view>
|
|
35
|
+
<view class="product-content-btn" v-if="isBtn">
|
|
36
|
+
<view :class="{onePrice: onePrice }">
|
|
37
|
+
<view v-if="productConfig.isPrice === 'Y'">
|
|
38
|
+
<xd-unit
|
|
39
|
+
:price="(item['promo_price'] || item['sale_price'])"
|
|
40
|
+
:isOld="false"
|
|
41
|
+
:iconSize="cell <= 2?0.3:0.26"
|
|
42
|
+
:fontSize="cell <= 2?36:26"
|
|
43
|
+
/>
|
|
44
|
+
</view>
|
|
45
|
+
<view
|
|
46
|
+
v-if="productConfig.isShowDiscount==='Y' && checkDiscountPrice"
|
|
47
|
+
:style="{color:oldPriceColor}" class="oldPrice">
|
|
48
|
+
<xd-unit
|
|
49
|
+
:price="dividePrice"
|
|
50
|
+
:iconSize="0.21"
|
|
51
|
+
:fontSize="cell <= 2?24:22"
|
|
52
|
+
delete-line
|
|
53
|
+
is-gray
|
|
54
|
+
/>
|
|
55
|
+
</view>
|
|
56
|
+
</view>
|
|
57
|
+
<view>
|
|
58
|
+
<view @click.stop="handleDetail('Y')" v-if="productConfig.isAddCart === 'Y'">
|
|
59
|
+
<xd-font-icon
|
|
60
|
+
icon="icongouwuche-01"
|
|
61
|
+
:color="color"
|
|
62
|
+
size="40"
|
|
63
|
+
></xd-font-icon>
|
|
64
|
+
</view>
|
|
65
|
+
</view>
|
|
66
|
+
</view>
|
|
67
|
+
</view>
|
|
68
|
+
</view>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script>
|
|
72
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
73
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon.vue";
|
|
74
|
+
import XdProductStatus from "@/components/XdProductStatus/XdProductStatus";
|
|
75
|
+
import XdUnit from "@/components/XdUnit/XdUnit.vue";
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
export default {
|
|
79
|
+
name: "CusProduct",
|
|
80
|
+
components:{
|
|
81
|
+
XdFontIcon,
|
|
82
|
+
XdUnit,
|
|
83
|
+
XdProductStatus
|
|
84
|
+
},
|
|
85
|
+
props:{
|
|
86
|
+
keyword:{
|
|
87
|
+
type:String,
|
|
88
|
+
default:''
|
|
89
|
+
},
|
|
90
|
+
nameFont: {
|
|
91
|
+
type:Object,
|
|
92
|
+
default(){
|
|
93
|
+
return {}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
height:{
|
|
98
|
+
type:Number|String,
|
|
99
|
+
default:"auto",
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
item:Object,
|
|
103
|
+
cellSpacing: {
|
|
104
|
+
type: Number|String,
|
|
105
|
+
default: 20
|
|
106
|
+
},
|
|
107
|
+
rowSpacing: {
|
|
108
|
+
type: Number|String,
|
|
109
|
+
default: 20
|
|
110
|
+
},
|
|
111
|
+
color:{
|
|
112
|
+
type:String,
|
|
113
|
+
default:'red',
|
|
114
|
+
},
|
|
115
|
+
brandColor:{
|
|
116
|
+
type: String,
|
|
117
|
+
default: '#999'
|
|
118
|
+
},
|
|
119
|
+
oldPriceColor: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: '#999'
|
|
122
|
+
},
|
|
123
|
+
imageRadius:{
|
|
124
|
+
type: String|Number,
|
|
125
|
+
default: '10'
|
|
126
|
+
},
|
|
127
|
+
cell:{
|
|
128
|
+
type: Number|String,
|
|
129
|
+
required: true
|
|
130
|
+
},
|
|
131
|
+
productConfig:{
|
|
132
|
+
type:Object|null,
|
|
133
|
+
default: null
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
computed:{
|
|
137
|
+
onePrice(){
|
|
138
|
+
if(this.cell === 1) return true;
|
|
139
|
+
if(this.cell === 3) return false;
|
|
140
|
+
if(this.cell === 2) return false;
|
|
141
|
+
},
|
|
142
|
+
cusName(){
|
|
143
|
+
return this.item['product_name'] || this.item['list_title']
|
|
144
|
+
},
|
|
145
|
+
imageUrl(){
|
|
146
|
+
if(!this.item['thumb']) return getServiceUrl('/common/empty/product.png?v1=1','size4')
|
|
147
|
+
return getServiceUrl(this.item['thumb'], 'size4')
|
|
148
|
+
},
|
|
149
|
+
isOne(){
|
|
150
|
+
let status = false;
|
|
151
|
+
if(this.cell === 1) status = false
|
|
152
|
+
return status
|
|
153
|
+
},
|
|
154
|
+
isBtn(){
|
|
155
|
+
return this.productConfig.isPrice === 'Y' || this.productConfig.isAddCart === 'Y'
|
|
156
|
+
},
|
|
157
|
+
dividePrice() {
|
|
158
|
+
return this.$xdUniHelper.divisionFloatNumber(this.item.market_price, 100);
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
checkDiscountPrice() {
|
|
162
|
+
if(this.productConfig.isPrice === 'N') return false
|
|
163
|
+
if (this.productConfig.isShowDiscount === 'Y') {
|
|
164
|
+
let price = Number(this.item.market_price) - Number(this.item.sale_price);
|
|
165
|
+
return this.$xdUniHelper.divisionFloatNumber(price,100) > Number(this.productConfig.differ);
|
|
166
|
+
}
|
|
167
|
+
return false
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
tagsList(){
|
|
171
|
+
return (this.item['market_tags']||[]).filter(tag=>{
|
|
172
|
+
if(tag === 'flashsale') {
|
|
173
|
+
return this.productConfig.showActivityPrice === 'Y'
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
return this.productConfig.isShowTag === 'Y'
|
|
177
|
+
}
|
|
178
|
+
})
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
data(){
|
|
182
|
+
return {
|
|
183
|
+
tagObj: null,
|
|
184
|
+
tagObjColor: null,
|
|
185
|
+
errorStatus: false,
|
|
186
|
+
errorImage:'',
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
created() {
|
|
190
|
+
this.tagObj = this.$colorConfig.productTags;
|
|
191
|
+
this.tagObjColor = this.$colorConfig.productTagsColor;
|
|
192
|
+
this.errorImage = getServiceUrl('/common/empty/product.png?v1=1','size4')
|
|
193
|
+
},
|
|
194
|
+
methods:{
|
|
195
|
+
handleError(item){
|
|
196
|
+
this.errorStatus = true;
|
|
197
|
+
},
|
|
198
|
+
handleDetail(type='N'){
|
|
199
|
+
this.$emit('on-product-detail', {isCart:type,...this.item});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
</script>
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
<style scoped lang="less">
|
|
208
|
+
.product {
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
|
|
211
|
+
&.one {
|
|
212
|
+
display: flex;
|
|
213
|
+
justify-content: space-between;
|
|
214
|
+
align-items: flex-start;
|
|
215
|
+
min-height: 200rpx;
|
|
216
|
+
|
|
217
|
+
.product-image {
|
|
218
|
+
flex-shrink: 0;
|
|
219
|
+
position: relative;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.product-content {
|
|
223
|
+
flex: 1;
|
|
224
|
+
min-height: 200rpx;
|
|
225
|
+
display: flex;
|
|
226
|
+
justify-content: flex-start;
|
|
227
|
+
flex-flow: wrap;
|
|
228
|
+
align-content: space-between;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&.two {
|
|
233
|
+
.product-image {
|
|
234
|
+
width: 100%;
|
|
235
|
+
display: flex;
|
|
236
|
+
flex-shrink: 0;
|
|
237
|
+
justify-content: center;
|
|
238
|
+
align-items: center;
|
|
239
|
+
position: relative;
|
|
240
|
+
& > image {
|
|
241
|
+
height: 100%;
|
|
242
|
+
width: 100%;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
&-image {
|
|
249
|
+
overflow: hidden;
|
|
250
|
+
& > image {
|
|
251
|
+
height: 100%;
|
|
252
|
+
width: 100%;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
&-content {
|
|
257
|
+
overflow: hidden;
|
|
258
|
+
&-info {
|
|
259
|
+
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&-btn {
|
|
263
|
+
width: 100%;
|
|
264
|
+
display: flex;
|
|
265
|
+
justify-content: space-between;
|
|
266
|
+
align-items: center;
|
|
267
|
+
|
|
268
|
+
.onePrice {
|
|
269
|
+
display: flex;
|
|
270
|
+
justify-content: flex-start;
|
|
271
|
+
align-items: center;
|
|
272
|
+
|
|
273
|
+
& > view:nth-child(2) {
|
|
274
|
+
margin-left: 20rpx;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
& > view:first-child {
|
|
279
|
+
flex: 1;
|
|
280
|
+
& > view:first-child {
|
|
281
|
+
height: 40rpx;
|
|
282
|
+
display: flex;
|
|
283
|
+
justify-content: flex-start;
|
|
284
|
+
align-items: center;
|
|
285
|
+
overflow: hidden;
|
|
286
|
+
}
|
|
287
|
+
& > view:nth-child(2) {
|
|
288
|
+
line-height: 30rpx;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
& > view:nth-child(2) {
|
|
295
|
+
flex-shrink: 0;
|
|
296
|
+
width: 40rpx;
|
|
297
|
+
height: 40rpx;
|
|
298
|
+
display: flex;
|
|
299
|
+
justify-content: center;
|
|
300
|
+
align-items: center;
|
|
301
|
+
cursor: pointer;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.oldPrice {
|
|
305
|
+
margin-left: 6rpx;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
& .name {
|
|
310
|
+
margin-bottom: 10rpx;
|
|
311
|
+
line-height: 40rpx;
|
|
312
|
+
.uni-max-cut(2,80);
|
|
313
|
+
word-wrap: break-word;
|
|
314
|
+
word-break: break-all;
|
|
315
|
+
|
|
316
|
+
& > text {
|
|
317
|
+
display: inline-block;
|
|
318
|
+
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
&.showOne {
|
|
322
|
+
.uni-max-cut(1,40);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
& .brand {
|
|
327
|
+
font-size: 22rpx;
|
|
328
|
+
line-height: 30rpx;
|
|
329
|
+
.uni-max-cut(1,30);
|
|
330
|
+
padding-bottom: 10rpx;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.tags {
|
|
334
|
+
display: flex;
|
|
335
|
+
justify-content: flex-start;
|
|
336
|
+
align-content: flex-start;
|
|
337
|
+
flex-flow: wrap;
|
|
338
|
+
|
|
339
|
+
&.showTwo {
|
|
340
|
+
& > view{
|
|
341
|
+
margin-bottom: 8rpx;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
& > view {
|
|
346
|
+
padding: 0 14rpx;
|
|
347
|
+
height: 32rpx;
|
|
348
|
+
line-height: 31rpx;
|
|
349
|
+
font-size: 20rpx;
|
|
350
|
+
color:#fff;
|
|
351
|
+
border-radius: 16rpx;
|
|
352
|
+
margin-right: 10rpx;
|
|
353
|
+
|
|
354
|
+
&:last-child {
|
|
355
|
+
margin-right: 0;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
}
|
|
362
|
+
._tag{
|
|
363
|
+
color: #FF661A;
|
|
364
|
+
border: 1px solid #FF661A;
|
|
365
|
+
border-radius: 8rpx;
|
|
366
|
+
font-size: 24rpx;
|
|
367
|
+
margin-right: 24rpx;
|
|
368
|
+
padding: 0rpx 10rpx;
|
|
369
|
+
margin-bottom: 20rpx
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
</style>
|