jufubao-mall 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
@animationfinish="animationfinish"
|
|
31
31
|
>
|
|
32
32
|
<template slot-scope="{ item,index }">
|
|
33
|
-
<image @click="handlePreview(index)" :src="item.src"></image>
|
|
33
|
+
<image v-if="item.status===true" @error="item.status=false" @click="handlePreview(index,item)" :src="item.src"></image>
|
|
34
|
+
<image v-if="item.status===false" :src="errorProductUrl" @click="handlePreview(index,item)"></image>
|
|
34
35
|
</template>
|
|
35
36
|
</xd-swiper>
|
|
36
37
|
<view class="xd-store-product__swiper-tips">{{swiperCurrent + 1}}/{{images.length}}</view>
|
|
@@ -483,15 +484,16 @@
|
|
|
483
484
|
closeMask: true,
|
|
484
485
|
saleWarmPriceColor: '',
|
|
485
486
|
saleWarmPriceFontSize: '',
|
|
486
|
-
|
|
487
|
-
|
|
487
|
+
saleWarmActPriceColor: '',
|
|
488
|
+
saleWarmActPriceFontSize: '',
|
|
488
489
|
saleIngPriceColor: '',
|
|
489
490
|
saleIngPriceFontSize: '',
|
|
490
491
|
originalIngPriceColor: '',
|
|
491
492
|
originalIngPriceFontSize: '',
|
|
492
493
|
btnHeight: '',
|
|
493
494
|
btnPadding: {},
|
|
494
|
-
isFirst: true //是否第一次进入
|
|
495
|
+
isFirst: true, //是否第一次进入
|
|
496
|
+
errorProductUrl: getServiceUrl('/common/empty/product.png'),
|
|
495
497
|
}
|
|
496
498
|
},
|
|
497
499
|
watch: {
|
|
@@ -509,7 +511,7 @@
|
|
|
509
511
|
if(this.$configProject['isPreview']){
|
|
510
512
|
this.p_getProductItemInfo()
|
|
511
513
|
}
|
|
512
|
-
}
|
|
514
|
+
},
|
|
513
515
|
},
|
|
514
516
|
computed: {
|
|
515
517
|
...mapState({
|
|
@@ -667,9 +669,6 @@
|
|
|
667
669
|
this.is_plus_site = this.projectAttr.headers['X-Site-Group']==="vip";
|
|
668
670
|
this.is_vip = this.getTokenForKey('user_level')&&this.getTokenForKey('user_level')==='VIP'?true:false
|
|
669
671
|
this.$xdRoot.$on('onGetSelectAddress', (address)=>{
|
|
670
|
-
uni.showToast({
|
|
671
|
-
title: "onGetSelectAddress"
|
|
672
|
-
})
|
|
673
672
|
console.log("onGetSelectAddress", address);
|
|
674
673
|
});
|
|
675
674
|
},
|
|
@@ -705,7 +704,6 @@
|
|
|
705
704
|
getElementHeight() {
|
|
706
705
|
// 创建选择器查询对象
|
|
707
706
|
const query = uni.createSelectorQuery().in(this);
|
|
708
|
-
|
|
709
707
|
// 选择需要查询的元素(使用类名、ID或标签)
|
|
710
708
|
query.select('#prod_bottom_body').boundingClientRect(data => {
|
|
711
709
|
if (data) {
|
|
@@ -758,7 +756,7 @@
|
|
|
758
756
|
this.smsStatus = gCPVal(value, "smsStatus", 'warm');
|
|
759
757
|
this.saleWarmPriceColor = gCPVal(value, 'saleWarmPriceColor', '#ffffff', { sKey: 'saleWarmStyleStatus', fields: ['saleWarmPriceColor'] });
|
|
760
758
|
this.saleWarmPriceFontSize = gCPVal(value, 'saleWarmPriceFontSize', '48', { sKey: 'saleWarmStyleStatus', fields: ['saleWarmPriceFontSize'] });
|
|
761
|
-
this.saleWarmActPriceColor = gCPVal(value, 'saleWarmActPriceColor', '#ffeb3b', { sKey: 'saleWarmActStyleStatus', fields: ['
|
|
759
|
+
this.saleWarmActPriceColor = gCPVal(value, 'saleWarmActPriceColor', '#ffeb3b', { sKey: 'saleWarmActStyleStatus', fields: ['saleWarmActPriceColor'] });
|
|
762
760
|
this.saleWarmActPriceFontSize = gCPVal(value, 'saleWarmActPriceFontSize', '24', { sKey: 'saleWarmActStyleStatus', fields: ['saleWarmActPriceFontSize'] });
|
|
763
761
|
this.saleIngPriceColor = gCPVal(value, 'saleIngPriceColor', '#FFEF5E', { sKey: 'saleIngStyleStatus', fields: ['saleIngPriceColor'] });
|
|
764
762
|
this.saleIngPriceFontSize = gCPVal(value, 'saleIngPriceFontSize', '48', { sKey: 'saleIngStyleStatus', fields: ['saleIngPriceFontSize'] });
|
|
@@ -888,6 +886,7 @@
|
|
|
888
886
|
}
|
|
889
887
|
this.images = images.map(img => {
|
|
890
888
|
img['src'] = getServiceUrl(img.src);
|
|
889
|
+
img['status'] = true;
|
|
891
890
|
return img;
|
|
892
891
|
});
|
|
893
892
|
this.parameters = parameters;
|
|
@@ -1017,14 +1016,18 @@
|
|
|
1017
1016
|
},
|
|
1018
1017
|
|
|
1019
1018
|
// 实现轮播图的预览效果
|
|
1020
|
-
handlePreview(i) {
|
|
1019
|
+
handlePreview(i,item) {
|
|
1021
1020
|
// 调用 uni.previewImage() 方法预览图片
|
|
1021
|
+
let images = this.images.map(item => item.src)
|
|
1022
|
+
if (!item.status) {
|
|
1023
|
+
images = [this.errorProductUrl]
|
|
1024
|
+
}
|
|
1022
1025
|
uni.previewImage({
|
|
1023
1026
|
// 预览时,默认显示图片的索引
|
|
1024
1027
|
current: i,
|
|
1025
1028
|
indicator: "number",
|
|
1026
1029
|
// 所有图片 url 路径的数组 //这里直接把图片列表的数组放入即可
|
|
1027
|
-
urls:
|
|
1030
|
+
urls: images
|
|
1028
1031
|
})
|
|
1029
1032
|
},
|
|
1030
1033
|
handleToMapArea(){
|
|
@@ -1103,10 +1106,6 @@
|
|
|
1103
1106
|
}).then(res => {
|
|
1104
1107
|
this.$xdHideLoading();
|
|
1105
1108
|
this.buyButton = res;
|
|
1106
|
-
// 页面初次渲染完成后调用
|
|
1107
|
-
this.$nextTick(() => {
|
|
1108
|
-
this.getElementHeight()
|
|
1109
|
-
});
|
|
1110
1109
|
if(this.initShowCart){
|
|
1111
1110
|
if(this.btnBuyNow && this.btnBuyNow.enabled){
|
|
1112
1111
|
this.addCartAndBuy();
|
|
@@ -1114,6 +1113,13 @@
|
|
|
1114
1113
|
this.addCart();
|
|
1115
1114
|
}
|
|
1116
1115
|
}
|
|
1116
|
+
// 页面初次渲染完成后调用
|
|
1117
|
+
setTimeout(() => {
|
|
1118
|
+
this.$nextTick(() => {
|
|
1119
|
+
this.getElementHeight()
|
|
1120
|
+
});
|
|
1121
|
+
},50)
|
|
1122
|
+
|
|
1117
1123
|
}).catch(err => {
|
|
1118
1124
|
this.$xdHideLoading();
|
|
1119
1125
|
this.$xdLog.catch(err);
|
|
@@ -1551,7 +1557,7 @@
|
|
|
1551
1557
|
|
|
1552
1558
|
.label {
|
|
1553
1559
|
font-weight: 500;
|
|
1554
|
-
min-width:
|
|
1560
|
+
min-width: 130rpx;
|
|
1555
1561
|
max-width: 200rpx;
|
|
1556
1562
|
font-size: 28rpx;
|
|
1557
1563
|
color: #888888;
|
|
@@ -1567,7 +1573,7 @@
|
|
|
1567
1573
|
color: #333;
|
|
1568
1574
|
line-height: 48rpx;
|
|
1569
1575
|
flex-wrap: wrap;
|
|
1570
|
-
padding-left:
|
|
1576
|
+
padding-left: 8rpx;
|
|
1571
1577
|
}
|
|
1572
1578
|
}
|
|
1573
1579
|
}
|
|
@@ -1622,6 +1628,7 @@
|
|
|
1622
1628
|
&>view:nth-child(2) {
|
|
1623
1629
|
font-size: 24rpx;
|
|
1624
1630
|
font-weight: 500;
|
|
1631
|
+
padding-bottom: 8rpx;
|
|
1625
1632
|
}
|
|
1626
1633
|
}
|
|
1627
1634
|
|
|
@@ -1682,7 +1689,7 @@
|
|
|
1682
1689
|
line-height: 48rpx;
|
|
1683
1690
|
margin: 10rpx 0;
|
|
1684
1691
|
.label{
|
|
1685
|
-
min-width:
|
|
1692
|
+
min-width: 130rpx;
|
|
1686
1693
|
max-width: 200rpx;
|
|
1687
1694
|
font-size: 28rpx;
|
|
1688
1695
|
color: #888888;
|
|
@@ -1692,7 +1699,7 @@
|
|
|
1692
1699
|
.value{
|
|
1693
1700
|
font-weight: 400;
|
|
1694
1701
|
flex: 1;
|
|
1695
|
-
padding-left:
|
|
1702
|
+
padding-left: 8rpx;
|
|
1696
1703
|
min-width: 0;
|
|
1697
1704
|
font-size: 28rpx;
|
|
1698
1705
|
color: #333333;
|
|
@@ -1723,7 +1730,7 @@
|
|
|
1723
1730
|
color: #333;
|
|
1724
1731
|
margin: 10rpx 0;
|
|
1725
1732
|
.label{
|
|
1726
|
-
min-width:
|
|
1733
|
+
min-width: 130rpx;
|
|
1727
1734
|
max-width: 200rpx;
|
|
1728
1735
|
font-size: 28rpx;
|
|
1729
1736
|
color: #888888;
|
|
@@ -1732,7 +1739,7 @@
|
|
|
1732
1739
|
}
|
|
1733
1740
|
.content {
|
|
1734
1741
|
flex: 1;
|
|
1735
|
-
padding-left:
|
|
1742
|
+
padding-left: 8rpx;
|
|
1736
1743
|
min-width: 0;
|
|
1737
1744
|
&-item{
|
|
1738
1745
|
display: flex;
|
|
@@ -1816,7 +1823,7 @@
|
|
|
1816
1823
|
// padding: 0rpx 16rpx;
|
|
1817
1824
|
margin: 0;
|
|
1818
1825
|
.label{
|
|
1819
|
-
min-width:
|
|
1826
|
+
min-width: 130rpx;
|
|
1820
1827
|
max-width: 200rpx;
|
|
1821
1828
|
color: #888888;
|
|
1822
1829
|
font-size: 28rpx;
|
|
@@ -1842,7 +1849,7 @@
|
|
|
1842
1849
|
// }
|
|
1843
1850
|
}
|
|
1844
1851
|
.value{
|
|
1845
|
-
padding: 8rpx 0 8rpx
|
|
1852
|
+
padding: 8rpx 0 8rpx 8rpx;
|
|
1846
1853
|
color: #333333;
|
|
1847
1854
|
font-size: 28rpx;
|
|
1848
1855
|
font-weight: 400;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="xd-product-sku"
|
|
2
|
+
<view class="xd-product-sku" :style="{
|
|
3
|
+
'--counter-border': '1px solid #f2f2f2',
|
|
4
|
+
'--counter-radius': '0px',
|
|
5
|
+
'--counter-btn-bgcolor': '#f8f8f8',
|
|
6
|
+
'--counter-disabled-bg-color': '#f8f8f8',
|
|
7
|
+
'--counter-btn-text-color': '#333',
|
|
8
|
+
'--counter-btn-text-disabled-color': '#999',
|
|
9
|
+
'--counter-text-color': '#000000',
|
|
10
|
+
}">
|
|
3
11
|
<view class="drawer_prod_wrap">
|
|
4
12
|
<view id="prod_wrap" class="prod_wrap">
|
|
5
13
|
<image class="sku_img" :src="skuImage" />
|
|
@@ -10,15 +18,6 @@
|
|
|
10
18
|
>
|
|
11
19
|
<view
|
|
12
20
|
class="prod_number_limit"
|
|
13
|
-
:style="{
|
|
14
|
-
'--counter-border': '1px solid #f2f2f2',
|
|
15
|
-
'--counter-radius': '0px',
|
|
16
|
-
'--counter-btn-bgcolor': '#f8f8f8',
|
|
17
|
-
'--counter-disabled-bg-color': '#f8f8f8',
|
|
18
|
-
'--counter-btn-text-color': '#333',
|
|
19
|
-
'--counter-btn-text-disabled-color': '#999',
|
|
20
|
-
'--counter-text-color': '#000000',
|
|
21
|
-
}"
|
|
22
21
|
>
|
|
23
22
|
<xd-number
|
|
24
23
|
class="prod_number"
|
|
@@ -103,7 +102,7 @@
|
|
|
103
102
|
},
|
|
104
103
|
]"
|
|
105
104
|
>
|
|
106
|
-
<view class="
|
|
105
|
+
<view :class="{name: sku.images.length,no_image_name:!sku.images.length}">{{ value }}</view>
|
|
107
106
|
</view>
|
|
108
107
|
</view>
|
|
109
108
|
</view>
|
|
@@ -204,6 +203,9 @@ import {
|
|
|
204
203
|
getParentsStyles, //获取页面风格列表
|
|
205
204
|
} from "@/utils/xd.base";
|
|
206
205
|
export default {
|
|
206
|
+
// #ifdef MP-WEIXIN
|
|
207
|
+
options: { styleIsolation: 'shared' },
|
|
208
|
+
// #endif
|
|
207
209
|
name: "XdProductSku",
|
|
208
210
|
components: {
|
|
209
211
|
XdNumber,
|
|
@@ -732,6 +734,14 @@ export default {
|
|
|
732
734
|
color: var(--main-color) !important;
|
|
733
735
|
background-color: var(--bg-color) !important;
|
|
734
736
|
}
|
|
737
|
+
.name {
|
|
738
|
+
width: 80%;
|
|
739
|
+
overflow: hidden;
|
|
740
|
+
text-overflow: ellipsis;
|
|
741
|
+
white-space: nowrap;
|
|
742
|
+
padding: 0 10rpx;
|
|
743
|
+
margin: 0 auto;
|
|
744
|
+
}
|
|
735
745
|
}
|
|
736
746
|
&.horizontal {
|
|
737
747
|
flex-direction: row;
|
|
@@ -780,18 +790,20 @@ export default {
|
|
|
780
790
|
color: var(--main-color) !important;
|
|
781
791
|
background-color: var(--bg-color) !important;
|
|
782
792
|
}
|
|
793
|
+
.name {
|
|
794
|
+
width: 95%;
|
|
795
|
+
overflow: hidden;
|
|
796
|
+
text-overflow: ellipsis;
|
|
797
|
+
white-space: nowrap;
|
|
798
|
+
padding-right:10rpx;
|
|
799
|
+
}
|
|
783
800
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
line-clamp: 2;
|
|
791
|
-
-webkit-box-orient: vertical; //盒子中内容竖直排列
|
|
792
|
-
width: 100%;
|
|
793
|
-
word-break: break-all;
|
|
794
|
-
}
|
|
801
|
+
}
|
|
802
|
+
.no_image_name {
|
|
803
|
+
max-width: 120px;
|
|
804
|
+
overflow: hidden;
|
|
805
|
+
text-overflow: ellipsis;
|
|
806
|
+
white-space: nowrap;
|
|
795
807
|
}
|
|
796
808
|
|
|
797
809
|
&.attr-active {
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="xd-product-sku-jd"
|
|
2
|
+
<view class="xd-product-sku-jd"
|
|
3
|
+
:style="{
|
|
4
|
+
'--counter-border': '1px solid #f2f2f2',
|
|
5
|
+
'--counter-radius': '0px',
|
|
6
|
+
'--counter-btn-bgcolor': '#f8f8f8',
|
|
7
|
+
'--counter-disabled-bg-color': '#f8f8f8',
|
|
8
|
+
'--counter-btn-text-color': '#333',
|
|
9
|
+
'--counter-btn-text-disabled-color': '#999',
|
|
10
|
+
'--counter-text-color': '#000000',
|
|
11
|
+
}"
|
|
12
|
+
>
|
|
3
13
|
<view class="drawer_prod_wrap">
|
|
4
14
|
<view id="prod_wrap" class="prod_wrap">
|
|
5
15
|
<image class="sku_img" :src="baseInfo.thumb"/>
|
|
@@ -17,15 +27,6 @@
|
|
|
17
27
|
<view v-if="choseSkuName && isAllChecked" class="_specs">已选:{{choseSkuName}}</view>
|
|
18
28
|
<view
|
|
19
29
|
class="prod_number_limit"
|
|
20
|
-
:style="{
|
|
21
|
-
'--counter-border': '1px solid #f2f2f2',
|
|
22
|
-
'--counter-radius': '0px',
|
|
23
|
-
'--counter-btn-bgcolor': '#f8f8f8',
|
|
24
|
-
'--counter-disabled-bg-color': '#f8f8f8',
|
|
25
|
-
'--counter-btn-text-color': '#333',
|
|
26
|
-
'--counter-btn-text-disabled-color': '#999',
|
|
27
|
-
'--counter-text-color': '#000000',
|
|
28
|
-
}"
|
|
29
30
|
>
|
|
30
31
|
<xd-number
|
|
31
32
|
class="prod_number"
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
disabled_sku_name: !checkHasProduct(i, ii),
|
|
93
94
|
},
|
|
94
95
|
]">
|
|
95
|
-
<view class="
|
|
96
|
+
<view :class="{name: attr.image,no_image_name:!attr.image}">{{ attr.value }}</view>
|
|
96
97
|
</view>
|
|
97
98
|
</view>
|
|
98
99
|
</view>
|
|
@@ -170,6 +171,9 @@ import {
|
|
|
170
171
|
} from '@/utils/xd.base';
|
|
171
172
|
import Color from "color"
|
|
172
173
|
export default {
|
|
174
|
+
// #ifdef MP-WEIXIN
|
|
175
|
+
options: { styleIsolation: 'shared' },
|
|
176
|
+
// #endif
|
|
173
177
|
name: "XdProductSku",
|
|
174
178
|
components: {
|
|
175
179
|
XdNumber,
|
|
@@ -671,6 +675,14 @@ export default {
|
|
|
671
675
|
color: var(--main-color) !important;
|
|
672
676
|
background-color: var(--bg-color) !important;
|
|
673
677
|
}
|
|
678
|
+
.name {
|
|
679
|
+
width: 80%;
|
|
680
|
+
overflow: hidden;
|
|
681
|
+
text-overflow: ellipsis;
|
|
682
|
+
white-space: nowrap;
|
|
683
|
+
padding: 0 10rpx;
|
|
684
|
+
margin: 0 auto;
|
|
685
|
+
}
|
|
674
686
|
}
|
|
675
687
|
&.horizontal{
|
|
676
688
|
flex-direction: row;
|
|
@@ -719,25 +731,21 @@ export default {
|
|
|
719
731
|
color: var(--main-color) !important;
|
|
720
732
|
background-color: var(--bg-color) !important;
|
|
721
733
|
}
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
text-overflow: -o-ellipsis-lastline;
|
|
730
|
-
overflow: hidden; //溢出内容隐藏
|
|
731
|
-
text-overflow: ellipsis; //文本溢出部分用省略号表示
|
|
732
|
-
display: -webkit-box; //特别显示模式
|
|
733
|
-
-webkit-line-clamp: 1; //行数
|
|
734
|
-
line-clamp: 2;
|
|
735
|
-
-webkit-box-orient: vertical; //盒子中内容竖直排列
|
|
736
|
-
width: 100%;
|
|
737
|
-
word-break: break-all;
|
|
734
|
+
.name {
|
|
735
|
+
width: 80%;
|
|
736
|
+
overflow: hidden;
|
|
737
|
+
text-overflow: ellipsis;
|
|
738
|
+
white-space: nowrap;
|
|
739
|
+
padding-right:10rpx;
|
|
740
|
+
}
|
|
738
741
|
}
|
|
739
742
|
}
|
|
740
|
-
|
|
743
|
+
.no_image_name {
|
|
744
|
+
max-width: 120px;
|
|
745
|
+
overflow: hidden;
|
|
746
|
+
text-overflow: ellipsis;
|
|
747
|
+
white-space: nowrap;
|
|
748
|
+
}
|
|
741
749
|
&.attr-active{
|
|
742
750
|
background-color: var(--bg-color);
|
|
743
751
|
color: var(--main-color);
|