jufubao-mall 2.0.32-beta8 → 2.0.33

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 (28) hide show
  1. package/package.json +1 -1
  2. package/src/components/CusCouponChose/CusCouponChose.vue +13 -10
  3. package/src/components/CusEnter/CusEnter.vue +1 -9
  4. package/src/components/CusPoster/CusPoster.vue +62 -17
  5. package/src/components/CusProduct/CusProduct.vue +184 -576
  6. package/src/components/CusShops/CusShops.vue +209 -409
  7. package/src/components/CusTab/CusTab.vue +22 -159
  8. package/src/components/JfbMallProductInfo/cusAttr/content.js +0 -2
  9. package/src/components/JfbMallProductList/Attr.js +0 -1
  10. package/src/components/JfbMallProductList/JfbMallProductList.vue +1 -7
  11. package/src/components/JfbMallProductList/XdCateV1.vue +1 -0
  12. package/src/components/JfbMallShop/JfbMallShop.vue +1 -1
  13. package/src/components/JfbMallShop/cusAttr/content.js +1 -1
  14. package/src/components/SkeProduct/SkeProduct.vue +3 -88
  15. package/src/components/CusListItem/CusListItem.vue +0 -141
  16. package/src/components/CusPrice/CusPrice.vue +0 -391
  17. package/src/components/CusVipList/CusVipList.vue +0 -169
  18. package/src/components/JfbMallNetworkMedia/Api.js +0 -94
  19. package/src/components/JfbMallNetworkMedia/Attr.js +0 -20
  20. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMedia.vue +0 -1167
  21. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaLess.less +0 -80
  22. package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaMixin.js +0 -30
  23. package/src/components/JfbMallNetworkMedia/Mock.js +0 -372
  24. package/src/components/JfbMallNetworkMedia/cusAttr/advanced.js +0 -60
  25. package/src/components/JfbMallNetworkMedia/cusAttr/content.js +0 -230
  26. package/src/components/JfbMallNetworkMedia/cusAttr/font.js +0 -123
  27. package/src/components/JfbMallNetworkMedia/cusAttr/icon.js +0 -257
  28. package/src/components/JfbMallNetworkMedia/cusAttr/style.js +0 -12
@@ -1,391 +0,0 @@
1
- <template>
2
- <view class="price-box" :style="[priceMLComp]">
3
- <view :class="{ schedule: type === 'schedule' }">
4
- <view v-for="(item, index) in uiShowPrice" :key="index">
5
- <!--售价价格(普通价格)-->
6
- <view class="price-group">
7
- <template v-if="item.t === 'S'">
8
- <view class="price-group-price">
9
- <xd-unit
10
- :isShowIcon="isShowIcon"
11
- :range="item.a || range"
12
- :colorNew="salePriceColor"
13
- :iconSize="iconSize"
14
- :fontSize="salePriceSizeStyle"
15
- :price="item.p"
16
- :isOld="false"
17
- ></xd-unit>
18
- </view>
19
- <!--节省显示-->
20
- <view class="save-price price-group-save" v-if="savePrice">
21
- <text v-if="savePrice.n">{{ savePrice.n }}</text>
22
- <text>¥</text>
23
- <text>{{ divisionPrice(savePrice.p) }}</text>
24
- </view>
25
- <!--节省显示-->
26
- </template>
27
- <!--文本显示-->
28
- <view
29
- class="save-price price-group-text"
30
- :class="{noPrice: !isPrice, hasPrice:isPrice}"
31
- v-if="['S','CUS'].includes(item.t) && textInfo && textInfo.length > 0 "
32
- >
33
- <view
34
- class="price-group-item"
35
- v-for="text in textInfo"
36
- :key="text.n"
37
- :class="{textTag:text.s === 't'}"
38
- >
39
- <view>{{ text.n }}</view>
40
- <view v-if="text.a">{{ text.a}}</view>
41
- </view>
42
- </view>
43
- <!--文本显示-->
44
- </view>
45
- <!--售价价格(普通价格)-->
46
- <!--在线选择(排期)-->
47
- <!--节省显示-->
48
- <view class="save-price" style="margin: 4rpx 0;" v-if="item.t === 'E' && type==='schedule'">
49
- <text v-if="item.n">{{ item.n }}</text>
50
- <text>¥</text>
51
- <text>{{ divisionPrice(item.p) }}</text>
52
- </view>
53
- <!--节省显示-->
54
- <!--在线选择(排期)-->
55
- <!--划线价格 活动价格与划线价格二选一-->
56
- <view
57
- v-if="item.t === 'U'"
58
- class="line_one_delete"
59
- :class="{ threeFontSize: type === 'three' }"
60
- :style="[originalPriceSizeStyle]"
61
- >
62
-
63
- <text v-if="item.n">{{ item.n }}:</text>
64
- <text>¥</text>
65
- <text>{{ divisionPrice(item.p) }}</text>
66
- </view>
67
- <!--划线价格-->
68
- <!--活动价格(plus,秒杀)-->
69
- <view
70
- v-if="item.t === 'D' && isPlus"
71
- class="price-box-vip"
72
- :class="{ three: type === 'three' }"
73
- >
74
- <view :style="[vipPriceSizeStyle]" class="price-box-vip-name">{{item.n }}</view>
75
- <view :style="[vipPriceSizeStyle]" class="price-box-vip-price">{{divisionPrice(item.p)}}</view>
76
- </view>
77
- <view
78
- :style="[activityStyle]"
79
- v-if="item.t === 'D' && !isPlus && type === 'info' "
80
- class="price-box-activity"
81
- >{{ item.n }} <text v-if="item.n">:</text>{{ divisionPrice(item.p) }}</view>
82
- <!--活动价格-->
83
- </view>
84
- </view>
85
- </view>
86
- </template>
87
- <script>
88
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
89
- import XdUnit from "@/components/XdUnit/XdUnit.vue";
90
- import Color from "color";
91
-
92
- export default {
93
- name: "CusPrice",
94
- components: {
95
- XdFontIcon,
96
- XdUnit,
97
- },
98
- props: {
99
- //1列(one)、2列(two)、3列(three)、商品详情(info)、订单(order)、在线选座排期(schedule),普通模式(normal)
100
- type: {
101
- type: String,
102
- default: "one",
103
- },
104
- iconSize: {
105
- type: Number | String,
106
- default: "0.3",
107
- },
108
- //原价颜色
109
- originalPriceColor: {
110
- type: String,
111
- default: "#999",
112
- },
113
- //原价字体大小
114
- originalPriceFontSize: {
115
- type: String,
116
- default: "",
117
- },
118
- //售价颜色
119
- salePriceColor: {
120
- type: String,
121
- default: "",
122
- },
123
- salePriceFontSize: {
124
- type: String,
125
- default: "",
126
- },
127
- //活动售价颜色
128
- activitySalePriceColor: {
129
- type: String,
130
- default: "#fff",
131
- },
132
- //活动售价字体大小
133
- activitySalePriceSize: {
134
- type: String,
135
- default: "",
136
- },
137
- //是否是plus站点
138
- isPlus: {
139
- type: Boolean,
140
- default: false,
141
- },
142
- showPrice: {
143
- type: Array,
144
- default: [],
145
- },
146
- range: {
147
- type: String,
148
- default: "",
149
- },
150
- isShowIcon: {
151
- type: Boolean | String,
152
- default: "",
153
- },
154
- textFontSize:{
155
- type: String|Number,
156
- default: "24",
157
- },
158
- normalPriceFontSize:{
159
- type: String|Number,
160
- default: "22",
161
- },
162
- },
163
- data() {
164
- return {
165
- isPrice: false,
166
- savePrice: null,
167
- textInfo: null,
168
- uiShowPrice: null,
169
- };
170
- },
171
- watch: {
172
- showPrice:{
173
- handler(value){
174
- this.init();
175
- },
176
- deep: true
177
- },
178
- },
179
- computed: {
180
- vipPriceSizeStyle() {
181
- let fontSize = this.type === "info" ? "24rpx" : "20rpx";
182
- let minWidth = this.type === "info" ? "60rpx" : "59rpx";
183
- return {
184
- fontSize,
185
- minWidth,
186
- };
187
- },
188
- salePriceSizeStyle() {
189
- let fontSize = "40";
190
- switch (this.type) {
191
- case "one":
192
- fontSize = "40";
193
- break;
194
- case "two":
195
- fontSize = "40";
196
- break;
197
- case "three":
198
- fontSize = "24";
199
- break;
200
- case "normal":
201
- fontSize = this.normalPriceFontSize;
202
- break;
203
- case "info":
204
- fontSize = "48";
205
- break;
206
- case "order":
207
- fontSize = "40";
208
- break;
209
- case "schedule":
210
- fontSize = "32";
211
- break;
212
- }
213
- if (this.salePriceFontSize) fontSize = this.salePriceFontSize;
214
- return fontSize;
215
- },
216
- priceMLComp(){
217
- return {
218
- '--price-unit-style-ml': this.salePriceSizeStyle * .5 * this.$rpxNum + 'px',
219
- "--price-unit-style-c":`rgba(${Color('#FF2C18').alpha(0.2).array().join(',')})`,
220
- "--price-unit-style-ts": this.textFontSize * this.$rpxNum + 'px'
221
- }
222
- },
223
- originalPriceSizeStyle() {
224
- let fontSize =
225
- this.type === "info" || this.type === "order" ? "28rpx" : "24rpx";
226
- if (this.type === "three") fontSize = "20rpx";
227
- if (this.originalPriceFontSize)
228
- fontSize = `${this.originalPriceFontSize}rpx`;
229
- return {
230
- fontSize,
231
- color: this.originalPriceColor,
232
- };
233
- },
234
- activityStyle() {
235
- let fontSize = "24rpx";
236
- if (this.activitySalePriceSize) fontSize = `${this.activitySalePriceSize}rpx`;
237
- return {
238
- color: this.activitySalePriceColor,
239
- fontSize,
240
- };
241
- },
242
- },
243
- created() {
244
- this.init();
245
- },
246
- methods: {
247
- init(){
248
- let showPrice = this.$xdUniHelper.cloneDeep(this.showPrice);
249
-
250
- //三列(不显示文本信息和省信息), 排期(上下排列信息)
251
- if(!['three', 'schedule'].includes(this.type)) {
252
- this.savePrice = showPrice.find(item => item.t === 'E');
253
- this.textInfo = showPrice.filter(item => item.t === 'T');
254
- this.isPrice = !!(showPrice.find(item => item.t === 'S'));
255
- //过滤掉T和E模式
256
- this.uiShowPrice = showPrice.filter(item=>{
257
- return !(item.t === 'T' || item.t === 'E')
258
- });
259
-
260
- //不显示价格时候,需要创建一字符串对象(因为T模式已经被过滤掉了)
261
- if(this.textInfo.length > 0 && !this.isPrice) {
262
- this.uiShowPrice = [{t: 'CUS'}]
263
- }
264
-
265
- }
266
- else this.uiShowPrice = showPrice;
267
- },
268
- divisionPrice(price) {
269
- return this.$xdUniHelper.divisionFloatNumber(price, 100);
270
- },
271
- },
272
- };
273
- </script>
274
-
275
-
276
-
277
- <style scoped lang="less">
278
- .schedule {
279
- display: flex;
280
- flex-direction: column;
281
- align-items: center;
282
- justify-content: center;
283
- }
284
- .price-group{
285
- display: flex;
286
- align-items: center;
287
- flex-flow: wrap;
288
- justify-content: flex-start;
289
-
290
- &-item {
291
- margin-right: var(--price-unit-style-ml);
292
- height: 40rpx;
293
- line-height: 40rpx;
294
- box-sizing: border-box;
295
- font-size: var(--price-unit-style-ts);
296
- display: flex;
297
- justify-content: flex-start;
298
- align-items: center;
299
-
300
- & > view {
301
- color: #FF2C18;
302
- }
303
-
304
- &.textTag {
305
- border: 2rpx solid var(--price-unit-style-c);
306
- border-radius: 6rpx;
307
- padding: 0 8rpx;
308
- }
309
- }
310
- &-save {
311
- font-size: var(--price-unit-style-ts);
312
- margin-left: var(--price-unit-style-ml);
313
- color: #FF2C18;
314
- }
315
- &-text {
316
- &.noPrice {
317
- & > view:last-child {
318
- margin-right: 0!important;
319
- }
320
- }
321
- &.hasPrice {
322
- margin-left: var(--price-unit-style-ml);
323
- & > view:last-child {
324
- margin-right: 0!important;
325
- }
326
- }
327
- }
328
- }
329
- .price-box {
330
- position: relative;
331
-
332
-
333
- &-activity {
334
- font-size: 24rpx;
335
- font-weight: 500;
336
- // position: relative;
337
- // bottom: 5px;
338
- }
339
-
340
- &-vip {
341
- display: flex;
342
- justify-content: flex-start;
343
-
344
- &-name {
345
- background: linear-gradient(
346
- 90deg,
347
- rgba(102, 86, 70, 1) 0%,
348
- rgba(71, 61, 52, 1) 52.05%,
349
- rgba(43, 38, 35, 1) 100%
350
- );
351
- color: #efd5c3;
352
- text-align: center;
353
- flex-wrap: nowrap;
354
- padding: 8rpx 12rpx;
355
- border-radius: 80rpx 0 0 80rpx;
356
- }
357
-
358
- &-price {
359
- background: linear-gradient(270deg, #fcd6b8 0%, #fcedd7 100%);
360
- color: #615850;
361
- font-weight: 700;
362
- flex-wrap: nowrap;
363
- text-align: center;
364
- padding: 8rpx 12rpx;
365
- border-radius: 0 80rpx 80rpx 0;
366
- }
367
- }
368
-
369
- &-vip.three {
370
- & .price-box-vip-name {
371
- padding: 0 4rpx 0 8rpx !important;
372
- border-radius: 15rpx 0 0 15rpx;
373
- line-height: 30rpx;
374
- }
375
- & .price-box-vip-price {
376
- padding: 0 8rpx 0 4rpx !important;
377
- border-radius: 0 15rpx 15rpx 0;
378
- line-height: 30rpx;
379
- }
380
- }
381
- }
382
-
383
- .line_one_delete {
384
- text-decoration: line-through;
385
- font-weight: normal;
386
- }
387
-
388
- .threeFontSize {
389
- font-size: 20rpx;
390
- }
391
- </style>
@@ -1,169 +0,0 @@
1
- <template>
2
- <view class="vip-list_wrap">
3
- <view class="vip_cards-header">
4
- <xd-font-icon icon="iconPLUShuiyuan" :size="24" color="#FCBF28"></xd-font-icon>
5
- <view class="vip_title">开通会员,本单可省
6
- <text class="vip_title-price"> {{$xdUniHelper.divisionFloatNumber(plus_saving_money, 100)}}</text>
7
- <!-- <xd-unit :price="plus_saving_money" :isOld="false" :fontSize="24" :iconSize="0.3" style="margin-left: 8rpx;"></xd-unit> -->
8
- </view>
9
- </view>
10
- <view class="vip_cards-body">
11
- <view class="vip_card_list">
12
- <view class="vip_item" :class="{active: vipCardId==item.vip_card_id}"
13
- v-for="item in list" :key="item.vip_card_id"
14
- @click="handleChoseVipCard(item)"
15
- >
16
- <view class="vip_name">{{ item.product_name }}</view>
17
- <view class="vip_img">
18
- <image :src="item.vip_card_icon"></image>
19
- </view>
20
- <view class="vip_price">{{ $xdUniHelper.divisionFloatNumber(item.sale_price, 100) }}</view>
21
- </view>
22
- </view>
23
- </view>
24
- </view>
25
- </template>
26
-
27
- <script>
28
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
29
- import XdUnit from "@/components/XdUnit/XdUnit"
30
- import getServiceUrl from "@/common/getServiceUrl"
31
- export default {
32
- components: {
33
- XdFontIcon,
34
- XdUnit
35
- },
36
- props: {
37
- list: {
38
- type: Array,
39
- default() {
40
- return []
41
- }
42
- },
43
- vip_card_id: {
44
- type: Number,
45
- default: 0
46
- },
47
- plus_saving_money: {
48
- type: Number,
49
- default: 0
50
- }
51
- },
52
- watch: {
53
- vip_card_id(val){
54
- this.vipCardId = val;
55
- },
56
- list(val){
57
- this.uiList = val.map(item => {
58
- item.vip_card_icon = getServiceUrl(item.vip_card_icon, 'size2');
59
- return item;
60
- });
61
- }
62
- },
63
- data(){
64
- return {
65
- vipCardId: "",
66
- uiList: []
67
- }
68
- },
69
- created(){
70
- this.vipCardId = this.vip_card_id;
71
- this.uiList = this.list.map(item => {
72
- item.vip_card_icon = getServiceUrl(item.vip_card_icon, 'size2');
73
- return item;
74
- });
75
- },
76
- methods: {
77
- handleChoseVipCard(item){
78
- if(this.vipCardId === item.vip_card_id){
79
- this.vipCardId = "";
80
- }else{
81
- this.vipCardId = item.vip_card_id;
82
- }
83
- this.$emit("choseVipCard", this.vipCardId);
84
- }
85
- }
86
- }
87
- </script>
88
-
89
- <style lang="less" scoped>
90
- .vip-list_wrap{
91
- padding: 24rpx 0;
92
- background-color: #FFFFFF;
93
- .vip_cards-header{
94
- padding: 0 40rpx 24rpx;
95
- display: flex;
96
- align-items: center;
97
- border-bottom: 2rpx solid #F6F6F6;
98
- .vip_title{
99
- color: #86541E;
100
- font-size: 24rpx;
101
- font-weight: 400;
102
- margin-left: 8rpx;
103
- display: flex;
104
- align-items: center;
105
- &-price{
106
- color: #FF5A39;
107
- font-weight: bold;
108
- margin-left: 8rpx;
109
- }
110
- }
111
- }
112
- .vip_cards-body{
113
- padding: 24rpx 0 0;
114
-
115
- .vip_card_list{
116
- width: 100%;
117
- overflow: auto;
118
- white-space: nowrap;
119
- padding: 0 20rpx;
120
- box-sizing: border-box;
121
-
122
- .vip_item{
123
- width: 160rpx;
124
- height: 160rpx;
125
- border: 4rpx solid #EEEEEE;
126
- background-color: #EEEEEE;
127
- border-radius: 24rpx;
128
- box-sizing: border-box;
129
- display: inline-flex;
130
- flex-direction: column;
131
- align-items: center;
132
- margin: 0 18rpx;
133
- padding: 16rpx 0;
134
- color: #999999;
135
- filter: grayscale(1);
136
- &.active{
137
- color: #AB6900;
138
- border-color: #AB6900;
139
- background-color: #FFF8ED;
140
- filter: grayscale(0);
141
- }
142
-
143
- .vip_name{
144
- line-height: 1;
145
- font-size: 16rpx;
146
- font-weight: 500;
147
- }
148
- .vip_img{
149
- width: 120rpx;
150
- height: 60rpx;
151
- border-radius: 7rpx;
152
- margin: 8rpx 0;
153
- display: inline-block;
154
- box-sizing: border-box;
155
- image{
156
- width: 100%;
157
- height: 100%;
158
- }
159
- }
160
- .vip_price{
161
- line-height: 1;
162
- font-size: 36rpx;
163
- font-weight: 500;
164
- }
165
- }
166
- }
167
- }
168
- }
169
- </style>
@@ -1,94 +0,0 @@
1
- 'use strict';
2
- /**
3
- * @description 接口配置,
4
- * 在设置方法名字当时候,别忘记加上【模块名字】:Network
5
- * @type {*[]}
6
- */
7
- module.exports = [
8
- {
9
- mapFnName: "getMallMediaProductContent",
10
- title: "获取商品内容",
11
- path: "/product/v1/:xnamespace/product/item/:product_id/content",
12
- isRule: false,
13
- params: {
14
- xnamespace: ['xnamespace', 'string', '必选'],
15
- product_id: ['product_id', 'string', '必选'],
16
- },
17
- isConsole: true,
18
- disabled: true,
19
- },
20
- {
21
- mapFnName: "getMallMediaProductBuyButton",
22
- title: "获取商品下单按钮",
23
- path: "/product/v1/:xnamespace/product/item/:product_id/buy-button",
24
- isRule: false,
25
- params: {
26
- xnamespace: ['xnamespace', 'string', '必选'],
27
- product_id: ['product_id', 'string', '必选'],
28
- },
29
- isConsole: true,
30
- disabled: true,
31
- },
32
- {
33
- mapFnName: "getMallMediaProductForm",
34
- title: "单个表单数据",
35
- path: "/product/v1/:xnamespace/product/item/:product_id/form-data",
36
- isRule: false,
37
- params: {
38
- xnamespace: ['xnamespace', 'string', '必选'],
39
- product_id: ['product_id', 'string', '必选'],
40
- },
41
- isConsole: true,
42
- disabled: true,
43
- },
44
- {
45
- mapFnName: 'getMallMediaProductList',
46
- title: '获取商品列表',
47
- path: '/product/v1/:xnamespace/product/search',
48
- isRule: false,
49
- params: {
50
- xnamespace: ['path', "xnamespace", "必选"],
51
- sort: ['排序', 'string', '必选'],
52
- keyword: ['关键词', 'string', '必选'],
53
- brand_ids: ['品牌ID,多个小写逗号隔开', 'string', '必选'],
54
- filter_keys: ['过滤KEY,多个逗号隔开', 'string', '必选'],
55
- city_code: ['城市CODE', 'string', '必选'],
56
- custom_category_id: ['自定义分类ID', 'string', '必选'],
57
- market_tags: ['营销标签 rec=推荐, hot=爆款, new=新品 多个逗号隔开', 'string', '必选'],
58
- random_score_seed: ['随机排序因子, 分页时保证一样', 'string', '必选'],
59
- page_size: ['page_size', 'string', '必选'],
60
- page_token: ['page_token', 'string', '必选'],
61
- },
62
- isConsole: true,
63
- disabled: true,
64
- },
65
- {
66
- mapFnName: 'getMallMediaCategoryTree',
67
- title: '分类 - 树列表',
68
- path: '/product/v1/:xnamespace/category/tree',
69
- isRule: false,
70
- params: {
71
- xnamespace: ['xnamespace', 'String', '必选'],
72
- level: ['获取几层数据,默认:2', 'Number', '必选', 2],
73
- root_category_id: ['父级分类,默认:0', 'Number', '必选', 0],
74
- tag: ['分类标签', 'String', '选填']
75
- },
76
- isConsole: true,
77
- disabled: true,
78
- },
79
- {
80
- mapFnName: "nowMallMediaBuyPay",
81
- title: "立即购买",
82
- path: "/cart/v1/buy",
83
- isRule: false,
84
- data: {
85
- namespace: ['namespace', 'String', '必选'],
86
- product: {
87
- product_id: ['商品Id', 'Number', true],
88
- num: ['数量', 'Number', true, 1]
89
- }
90
- },
91
- isConsole: true,
92
- disabled: true
93
- },
94
- ];
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- import content from "./cusAttr/content";
4
- import style from "./cusAttr/style";
5
- import advanced from "./cusAttr/advanced";
6
-
7
- /**
8
- * @description 当表单组件中有联动操作时候,使用方法进行返回
9
- */
10
- export default {
11
- style: [],
12
- content: (data, gValue, gColor, oldData={}) => {
13
- return [
14
- ...content(data, gValue, gColor, oldData),
15
- ...style(data, gValue, gColor, oldData),
16
- ...advanced(data)
17
- ].filter(i=>i)
18
- },
19
- advanced: [],
20
- };