xiaoe_mp_npm 0.5.40-alpha1 → 0.5.40-alpha2
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/miniprogram_dist/GoodsItem/index.js +18 -1
- package/miniprogram_dist/LiveGoodsList/index.js +7 -1
- package/miniprogram_dist/LiveGoodsList/index.scss +80 -0
- package/miniprogram_dist/LiveGoodsList/index.wxml +56 -33
- package/miniprogram_dist/LiveGoodsList/index.wxss +123 -19
- package/package.json +1 -1
- package/src/GoodsItem/index.js +18 -1
- package/src/LiveGoodsList/index.js +7 -1
- package/src/LiveGoodsList/index.scss +80 -0
- package/src/LiveGoodsList/index.wxml +56 -33
- package/src/LiveGoodsList/index.wxss +133 -19
|
@@ -509,7 +509,7 @@ Component({
|
|
|
509
509
|
},
|
|
510
510
|
toDetails() {
|
|
511
511
|
// 直播商品-去详情页,其他商品-拉起客服
|
|
512
|
-
let { title, img_url } = this.data.goodsItem
|
|
512
|
+
let { title, img_url, target_url } = this.data.goodsItem
|
|
513
513
|
let params = encodeURIComponent(`img_url=${img_url}&title=${title}¶ms_url=${this.data.params_url}`)
|
|
514
514
|
console.log("urlurlurl", `/page/customerService/customerService?params=${params}`)
|
|
515
515
|
if (this.data.goodsItem.resource_type === 4) {
|
|
@@ -518,6 +518,12 @@ Component({
|
|
|
518
518
|
})
|
|
519
519
|
|
|
520
520
|
} else {
|
|
521
|
+
// PC 复制链接
|
|
522
|
+
const { isPC, isDevtools } = getApp().globalData.system
|
|
523
|
+
if (isPC || isDevtools) {
|
|
524
|
+
this.copyLink(target_url)
|
|
525
|
+
return
|
|
526
|
+
}
|
|
521
527
|
// 暂时屏蔽内嵌H5详情页,拉起客服
|
|
522
528
|
wx && wx.navigateTo({
|
|
523
529
|
url: '/page/customerService/customerService' + `?params=${params}`
|
|
@@ -645,6 +651,17 @@ Component({
|
|
|
645
651
|
},
|
|
646
652
|
stopEvent() {
|
|
647
653
|
return
|
|
654
|
+
},
|
|
655
|
+
copyLink(link) {
|
|
656
|
+
wx.setClipboardData({
|
|
657
|
+
data: link,
|
|
658
|
+
success() {
|
|
659
|
+
wx.showToast({
|
|
660
|
+
title: '商品链接已复制,请用浏览器打开',
|
|
661
|
+
icon: 'none',
|
|
662
|
+
})
|
|
663
|
+
},
|
|
664
|
+
})
|
|
648
665
|
}
|
|
649
666
|
}
|
|
650
667
|
})
|
|
@@ -110,6 +110,10 @@ Component({
|
|
|
110
110
|
isGrayMarketing: {
|
|
111
111
|
type: Boolean,
|
|
112
112
|
value: false
|
|
113
|
+
},
|
|
114
|
+
orientation: {
|
|
115
|
+
type: String,
|
|
116
|
+
value: 'hor'
|
|
113
117
|
}
|
|
114
118
|
},
|
|
115
119
|
data: {
|
|
@@ -140,7 +144,9 @@ Component({
|
|
|
140
144
|
return data.formExplainingGoods.resource_id && data.explainingGoodsIndex > 2
|
|
141
145
|
},
|
|
142
146
|
customStyle(properties) {
|
|
143
|
-
|
|
147
|
+
const { popPosition, orientation } = properties
|
|
148
|
+
const position = `position: ${orientation === 'ver' ? 'fixed' : 'absolute'}; left: 0; bottom: 0`
|
|
149
|
+
return popPosition === "bottom" ? `${position}; width: ${orientation === 'ver' ? '100%' : rpxToVmin(750)}; height: calc(100% - ${rpxToVmin(422)});` : "height: 100%;width: 100vmin;"
|
|
144
150
|
},
|
|
145
151
|
},
|
|
146
152
|
methods: {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
$deviceWidth: 750;
|
|
2
|
+
@function vmin($rpx) {
|
|
3
|
+
@return #{$rpx * 100 / $deviceWidth}vmin;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@mixin goods-list-box {
|
|
7
|
+
.box {
|
|
8
|
+
margin: 0 vmin(12);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.title {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: vmin(32) vmin(16) vmin(16);
|
|
14
|
+
color: rgba(69, 90, 100, 0.6);
|
|
15
|
+
font-weight: normal;
|
|
16
|
+
font-size: vmin(18);
|
|
17
|
+
line-height: vmin(20);
|
|
18
|
+
text-align: center;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.btn {
|
|
22
|
+
display: block;
|
|
23
|
+
width: 100%;
|
|
24
|
+
margin: vmin(10) 0;
|
|
25
|
+
background-color: #fff;
|
|
26
|
+
}
|
|
27
|
+
.page-main {
|
|
28
|
+
height: 100%;
|
|
29
|
+
}
|
|
30
|
+
.goods-list {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
min-height: 40vmin;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
height: 100%;
|
|
36
|
+
.finished-text {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
color: #999;
|
|
40
|
+
font-size: vmin(28);
|
|
41
|
+
padding-bottom: vmin(20);
|
|
42
|
+
}
|
|
43
|
+
.no-data {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
padding-top: vmin(80);
|
|
48
|
+
.no-data-png {
|
|
49
|
+
width: vmin(176);
|
|
50
|
+
height: vmin(176);
|
|
51
|
+
}
|
|
52
|
+
.no-data-text {
|
|
53
|
+
color: #999999;
|
|
54
|
+
font-size: vmin(28);
|
|
55
|
+
margin-top: vmin(32);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
.goods-list-box {
|
|
63
|
+
@include goods-list-box;
|
|
64
|
+
}
|
|
65
|
+
// 竖屏pad
|
|
66
|
+
@media screen and (min-width: 768px) and (orientation: portrait) {
|
|
67
|
+
$deviceWidth: 1536 !global;
|
|
68
|
+
|
|
69
|
+
.goods-list-box {
|
|
70
|
+
@include goods-list-box;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// 横屏pad
|
|
74
|
+
@media screen and (min-height: 768px) and (orientation: landscape) {
|
|
75
|
+
$deviceWidth: 1536 !global;
|
|
76
|
+
|
|
77
|
+
.goods-list-box {
|
|
78
|
+
@include goods-list-box;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @LastEditTime: 2021-11-18 19:51:34
|
|
9
9
|
*/
|
|
10
10
|
-->
|
|
11
|
-
<view>
|
|
11
|
+
<view class="goods-list-box">
|
|
12
12
|
<custom-popup
|
|
13
13
|
showPopup="{{ show }}"
|
|
14
14
|
popPosition="{{ popPosition }}"
|
|
@@ -18,57 +18,75 @@
|
|
|
18
18
|
overlay="{{popPosition === 'bottom' && !overlayStyle ? false : true}}"
|
|
19
19
|
overlay-style="{{ overlayStyle }}"
|
|
20
20
|
zIndex="{{zIndex}}"
|
|
21
|
-
bind:onOverlayClick="onOverlayClick"
|
|
21
|
+
bind:onOverlayClick="onOverlayClick"
|
|
22
|
+
>
|
|
22
23
|
<view slot="header">
|
|
23
24
|
<!-- 弹窗头部 start-->
|
|
24
|
-
<header
|
|
25
|
+
<header
|
|
26
|
+
bind:closePop="closePop"
|
|
27
|
+
bind:gotoPayRecords="gotoPayRecords"
|
|
28
|
+
showClose="{{showClose}}"
|
|
29
|
+
></header>
|
|
25
30
|
<!-- 弹窗头部 end-->
|
|
26
31
|
</view>
|
|
27
32
|
<view slot="content" class="page-main">
|
|
28
33
|
<!-- 商品列表 start-->
|
|
29
|
-
<scroll-view
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
<scroll-view
|
|
35
|
+
class="goods-list"
|
|
36
|
+
scroll-y="true"
|
|
37
|
+
bindscrolltolower="onScrolltolower"
|
|
38
|
+
refresher-triggered="{{refreshing}}"
|
|
39
|
+
bindrefresherrefresh="onLoad"
|
|
40
|
+
refresher-enabled="{{true}}"
|
|
41
|
+
>
|
|
42
|
+
<!-- 优惠券列表 start -->
|
|
43
|
+
<coupon-list
|
|
44
|
+
showList="{{ showList }}"
|
|
45
|
+
aliveInfo="{{ aliveInfo }}"
|
|
46
|
+
bind:showPopup="showInfoCollection"
|
|
47
|
+
bind:receivedSuccess="receivedSuccess"
|
|
48
|
+
sensorReportParams="{{sensorReportParams}}"
|
|
49
|
+
></coupon-list>
|
|
50
|
+
<!-- 优惠券列表 end -->
|
|
51
|
+
<!-- 讲解中的商品 start -->
|
|
34
52
|
<block wx:if="{{showExplainingGoods}}">
|
|
35
53
|
<goods-item
|
|
36
|
-
|
|
37
|
-
allContactPay="{{allContactPay}}"
|
|
38
|
-
goodsInfo="{{formExplainingGoods}}"
|
|
39
|
-
coupon_switch="{{coupon_switch}}"
|
|
40
|
-
bind:sendNewMsg="sendNewMsg"
|
|
41
|
-
bind:showConfirmOrder="showConfirmOrder"
|
|
42
|
-
bind:showSku="showSku"
|
|
43
|
-
explainingGoods="{{explainingGoods}}"
|
|
44
|
-
bind:showDialog="showDialog"
|
|
45
|
-
class="goods-item"
|
|
46
|
-
envName="{{ENV_NAME}}"
|
|
47
|
-
sensorReportParams="{{sensorReportParams}}"
|
|
48
|
-
isFullScreen="{{ popPosition === 'right'}}"
|
|
49
|
-
isGrayMarketing="{{ isGrayMarketing}}"
|
|
50
|
-
></goods-item>
|
|
51
|
-
</block>
|
|
52
|
-
<!-- 讲解中的商品 end -->
|
|
53
|
-
<goods-item
|
|
54
|
-
wx:for="{{goodsInfo}}"
|
|
55
|
-
wx:for-item="goodsItem"
|
|
56
|
-
wx:key="index"
|
|
57
|
-
goodsInfo="{{goodsItem}}"
|
|
54
|
+
aliveInfo="{{aliveInfo}}"
|
|
58
55
|
allContactPay="{{allContactPay}}"
|
|
56
|
+
goodsInfo="{{formExplainingGoods}}"
|
|
59
57
|
coupon_switch="{{coupon_switch}}"
|
|
60
58
|
bind:sendNewMsg="sendNewMsg"
|
|
61
59
|
bind:showConfirmOrder="showConfirmOrder"
|
|
62
60
|
bind:showSku="showSku"
|
|
63
|
-
aliveInfo="{{aliveInfo}}"
|
|
64
61
|
explainingGoods="{{explainingGoods}}"
|
|
65
62
|
bind:showDialog="showDialog"
|
|
66
|
-
bind:toDetails="toDetails"
|
|
67
63
|
class="goods-item"
|
|
68
64
|
envName="{{ENV_NAME}}"
|
|
69
65
|
sensorReportParams="{{sensorReportParams}}"
|
|
70
66
|
isFullScreen="{{ popPosition === 'right'}}"
|
|
71
67
|
isGrayMarketing="{{ isGrayMarketing}}"
|
|
68
|
+
></goods-item>
|
|
69
|
+
</block>
|
|
70
|
+
<!-- 讲解中的商品 end -->
|
|
71
|
+
<goods-item
|
|
72
|
+
wx:for="{{goodsInfo}}"
|
|
73
|
+
wx:for-item="goodsItem"
|
|
74
|
+
wx:key="index"
|
|
75
|
+
goodsInfo="{{goodsItem}}"
|
|
76
|
+
allContactPay="{{allContactPay}}"
|
|
77
|
+
coupon_switch="{{coupon_switch}}"
|
|
78
|
+
bind:sendNewMsg="sendNewMsg"
|
|
79
|
+
bind:showConfirmOrder="showConfirmOrder"
|
|
80
|
+
bind:showSku="showSku"
|
|
81
|
+
aliveInfo="{{aliveInfo}}"
|
|
82
|
+
explainingGoods="{{explainingGoods}}"
|
|
83
|
+
bind:showDialog="showDialog"
|
|
84
|
+
bind:toDetails="toDetails"
|
|
85
|
+
class="goods-item"
|
|
86
|
+
envName="{{ENV_NAME}}"
|
|
87
|
+
sensorReportParams="{{sensorReportParams}}"
|
|
88
|
+
isFullScreen="{{ popPosition === 'right'}}"
|
|
89
|
+
isGrayMarketing="{{ isGrayMarketing}}"
|
|
72
90
|
></goods-item>
|
|
73
91
|
<view class="finished-text" wx:if="{{!refreshing && finishedTxt !== 'no-data'}}">{{finishedTxt}}</view>
|
|
74
92
|
<view class="no-data" wx:if="{{!refreshing && finishedTxt === 'no-data'}}">
|
|
@@ -80,4 +98,9 @@
|
|
|
80
98
|
</view>
|
|
81
99
|
</custom-popup>
|
|
82
100
|
</view>
|
|
83
|
-
<van-dialog
|
|
101
|
+
<van-dialog
|
|
102
|
+
id="van-dialog"
|
|
103
|
+
confirm-button-color="#105cfb"
|
|
104
|
+
catchtap="stopEvent"
|
|
105
|
+
/>
|
|
106
|
+
|
|
@@ -1,50 +1,154 @@
|
|
|
1
|
-
.box {
|
|
1
|
+
.goods-list-box .box {
|
|
2
2
|
margin: 0 1.6vmin;
|
|
3
3
|
}
|
|
4
|
-
.title {
|
|
4
|
+
.goods-list-box .title {
|
|
5
5
|
margin: 0;
|
|
6
|
-
padding: 4.
|
|
6
|
+
padding: 4.26667vmin 2.13333vmin 2.13333vmin;
|
|
7
7
|
color: rgba(69, 90, 100, 0.6);
|
|
8
8
|
font-weight: normal;
|
|
9
9
|
font-size: 2.4vmin;
|
|
10
|
-
line-height: 2.
|
|
10
|
+
line-height: 2.66667vmin;
|
|
11
11
|
text-align: center;
|
|
12
12
|
}
|
|
13
|
-
.btn {
|
|
13
|
+
.goods-list-box .btn {
|
|
14
14
|
display: block;
|
|
15
15
|
width: 100%;
|
|
16
|
-
margin: 1.
|
|
16
|
+
margin: 1.33333vmin 0;
|
|
17
17
|
background-color: #fff;
|
|
18
18
|
}
|
|
19
|
-
.page-main {
|
|
19
|
+
.goods-list-box .page-main {
|
|
20
20
|
height: 100%;
|
|
21
21
|
}
|
|
22
|
-
.goods-list {
|
|
22
|
+
.goods-list-box .goods-list {
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
min-height: 40vmin;
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
height: 100%;
|
|
28
28
|
}
|
|
29
|
-
.goods-list .finished-text {
|
|
29
|
+
.goods-list-box .goods-list .finished-text {
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
color: #999;
|
|
33
|
-
font-size: 3.
|
|
34
|
-
padding-bottom: 2.
|
|
33
|
+
font-size: 3.73333vmin;
|
|
34
|
+
padding-bottom: 2.66667vmin;
|
|
35
35
|
}
|
|
36
|
-
.goods-list .no-data {
|
|
36
|
+
.goods-list-box .goods-list .no-data {
|
|
37
37
|
display: flex;
|
|
38
38
|
flex-direction: column;
|
|
39
39
|
align-items: center;
|
|
40
|
-
padding-top: 10.
|
|
40
|
+
padding-top: 10.66667vmin;
|
|
41
41
|
}
|
|
42
|
-
.goods-list .no-data .no-data-png {
|
|
43
|
-
width: 23.
|
|
44
|
-
height: 23.
|
|
42
|
+
.goods-list-box .goods-list .no-data .no-data-png {
|
|
43
|
+
width: 23.46667vmin;
|
|
44
|
+
height: 23.46667vmin;
|
|
45
45
|
}
|
|
46
|
-
.goods-list .no-data .no-data-text {
|
|
46
|
+
.goods-list-box .goods-list .no-data .no-data-text {
|
|
47
47
|
color: #999999;
|
|
48
|
-
font-size: 3.
|
|
49
|
-
margin-top: 4.
|
|
48
|
+
font-size: 3.73333vmin;
|
|
49
|
+
margin-top: 4.26667vmin;
|
|
50
|
+
}
|
|
51
|
+
@media screen and (min-width: 768px) and (orientation: portrait) {
|
|
52
|
+
.goods-list-box .box {
|
|
53
|
+
margin: 0 0.78125vmin;
|
|
54
|
+
}
|
|
55
|
+
.goods-list-box .title {
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding: 2.08333vmin 1.04167vmin 1.04167vmin;
|
|
58
|
+
color: rgba(69, 90, 100, 0.6);
|
|
59
|
+
font-weight: normal;
|
|
60
|
+
font-size: 1.17188vmin;
|
|
61
|
+
line-height: 1.30208vmin;
|
|
62
|
+
text-align: center;
|
|
63
|
+
}
|
|
64
|
+
.goods-list-box .btn {
|
|
65
|
+
display: block;
|
|
66
|
+
width: 100%;
|
|
67
|
+
margin: 0.65104vmin 0;
|
|
68
|
+
background-color: #fff;
|
|
69
|
+
}
|
|
70
|
+
.goods-list-box .page-main {
|
|
71
|
+
height: 100%;
|
|
72
|
+
}
|
|
73
|
+
.goods-list-box .goods-list {
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
min-height: 40vmin;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
height: 100%;
|
|
79
|
+
}
|
|
80
|
+
.goods-list-box .goods-list .finished-text {
|
|
81
|
+
display: flex;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
color: #999;
|
|
84
|
+
font-size: 1.82292vmin;
|
|
85
|
+
padding-bottom: 1.30208vmin;
|
|
86
|
+
}
|
|
87
|
+
.goods-list-box .goods-list .no-data {
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
align-items: center;
|
|
91
|
+
padding-top: 5.20833vmin;
|
|
92
|
+
}
|
|
93
|
+
.goods-list-box .goods-list .no-data .no-data-png {
|
|
94
|
+
width: 11.45833vmin;
|
|
95
|
+
height: 11.45833vmin;
|
|
96
|
+
}
|
|
97
|
+
.goods-list-box .goods-list .no-data .no-data-text {
|
|
98
|
+
color: #999999;
|
|
99
|
+
font-size: 1.82292vmin;
|
|
100
|
+
margin-top: 2.08333vmin;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
@media screen and (min-height: 768px) and (orientation: landscape) {
|
|
104
|
+
.goods-list-box .box {
|
|
105
|
+
margin: 0 0.78125vmin;
|
|
106
|
+
}
|
|
107
|
+
.goods-list-box .title {
|
|
108
|
+
margin: 0;
|
|
109
|
+
padding: 2.08333vmin 1.04167vmin 1.04167vmin;
|
|
110
|
+
color: rgba(69, 90, 100, 0.6);
|
|
111
|
+
font-weight: normal;
|
|
112
|
+
font-size: 1.17188vmin;
|
|
113
|
+
line-height: 1.30208vmin;
|
|
114
|
+
text-align: center;
|
|
115
|
+
}
|
|
116
|
+
.goods-list-box .btn {
|
|
117
|
+
display: block;
|
|
118
|
+
width: 100%;
|
|
119
|
+
margin: 0.65104vmin 0;
|
|
120
|
+
background-color: #fff;
|
|
121
|
+
}
|
|
122
|
+
.goods-list-box .page-main {
|
|
123
|
+
height: 100%;
|
|
124
|
+
}
|
|
125
|
+
.goods-list-box .goods-list {
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
min-height: 40vmin;
|
|
128
|
+
display: flex;
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
height: 100%;
|
|
131
|
+
}
|
|
132
|
+
.goods-list-box .goods-list .finished-text {
|
|
133
|
+
display: flex;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
color: #999;
|
|
136
|
+
font-size: 1.82292vmin;
|
|
137
|
+
padding-bottom: 1.30208vmin;
|
|
138
|
+
}
|
|
139
|
+
.goods-list-box .goods-list .no-data {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
align-items: center;
|
|
143
|
+
padding-top: 5.20833vmin;
|
|
144
|
+
}
|
|
145
|
+
.goods-list-box .goods-list .no-data .no-data-png {
|
|
146
|
+
width: 11.45833vmin;
|
|
147
|
+
height: 11.45833vmin;
|
|
148
|
+
}
|
|
149
|
+
.goods-list-box .goods-list .no-data .no-data-text {
|
|
150
|
+
color: #999999;
|
|
151
|
+
font-size: 1.82292vmin;
|
|
152
|
+
margin-top: 2.08333vmin;
|
|
153
|
+
}
|
|
50
154
|
}
|
package/package.json
CHANGED
package/src/GoodsItem/index.js
CHANGED
|
@@ -509,7 +509,7 @@ Component({
|
|
|
509
509
|
},
|
|
510
510
|
toDetails() {
|
|
511
511
|
// 直播商品-去详情页,其他商品-拉起客服
|
|
512
|
-
let { title, img_url } = this.data.goodsItem
|
|
512
|
+
let { title, img_url, target_url } = this.data.goodsItem
|
|
513
513
|
let params = encodeURIComponent(`img_url=${img_url}&title=${title}¶ms_url=${this.data.params_url}`)
|
|
514
514
|
console.log("urlurlurl", `/page/customerService/customerService?params=${params}`)
|
|
515
515
|
if (this.data.goodsItem.resource_type === 4) {
|
|
@@ -518,6 +518,12 @@ Component({
|
|
|
518
518
|
})
|
|
519
519
|
|
|
520
520
|
} else {
|
|
521
|
+
// PC 复制链接
|
|
522
|
+
const { isPC, isDevtools } = getApp().globalData.system
|
|
523
|
+
if (isPC || isDevtools) {
|
|
524
|
+
this.copyLink(target_url)
|
|
525
|
+
return
|
|
526
|
+
}
|
|
521
527
|
// 暂时屏蔽内嵌H5详情页,拉起客服
|
|
522
528
|
wx && wx.navigateTo({
|
|
523
529
|
url: '/page/customerService/customerService' + `?params=${params}`
|
|
@@ -645,6 +651,17 @@ Component({
|
|
|
645
651
|
},
|
|
646
652
|
stopEvent() {
|
|
647
653
|
return
|
|
654
|
+
},
|
|
655
|
+
copyLink(link) {
|
|
656
|
+
wx.setClipboardData({
|
|
657
|
+
data: link,
|
|
658
|
+
success() {
|
|
659
|
+
wx.showToast({
|
|
660
|
+
title: '商品链接已复制,请用浏览器打开',
|
|
661
|
+
icon: 'none',
|
|
662
|
+
})
|
|
663
|
+
},
|
|
664
|
+
})
|
|
648
665
|
}
|
|
649
666
|
}
|
|
650
667
|
})
|
|
@@ -110,6 +110,10 @@ Component({
|
|
|
110
110
|
isGrayMarketing: {
|
|
111
111
|
type: Boolean,
|
|
112
112
|
value: false
|
|
113
|
+
},
|
|
114
|
+
orientation: {
|
|
115
|
+
type: String,
|
|
116
|
+
value: 'hor'
|
|
113
117
|
}
|
|
114
118
|
},
|
|
115
119
|
data: {
|
|
@@ -140,7 +144,9 @@ Component({
|
|
|
140
144
|
return data.formExplainingGoods.resource_id && data.explainingGoodsIndex > 2
|
|
141
145
|
},
|
|
142
146
|
customStyle(properties) {
|
|
143
|
-
|
|
147
|
+
const { popPosition, orientation } = properties
|
|
148
|
+
const position = `position: ${orientation === 'ver' ? 'fixed' : 'absolute'}; left: 0; bottom: 0`
|
|
149
|
+
return popPosition === "bottom" ? `${position}; width: ${orientation === 'ver' ? '100%' : rpxToVmin(750)}; height: calc(100% - ${rpxToVmin(422)});` : "height: 100%;width: 100vmin;"
|
|
144
150
|
},
|
|
145
151
|
},
|
|
146
152
|
methods: {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
$deviceWidth: 750;
|
|
2
|
+
@function vmin($rpx) {
|
|
3
|
+
@return #{$rpx * 100 / $deviceWidth}vmin;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@mixin goods-list-box {
|
|
7
|
+
.box {
|
|
8
|
+
margin: 0 vmin(12);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.title {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: vmin(32) vmin(16) vmin(16);
|
|
14
|
+
color: rgba(69, 90, 100, 0.6);
|
|
15
|
+
font-weight: normal;
|
|
16
|
+
font-size: vmin(18);
|
|
17
|
+
line-height: vmin(20);
|
|
18
|
+
text-align: center;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.btn {
|
|
22
|
+
display: block;
|
|
23
|
+
width: 100%;
|
|
24
|
+
margin: vmin(10) 0;
|
|
25
|
+
background-color: #fff;
|
|
26
|
+
}
|
|
27
|
+
.page-main {
|
|
28
|
+
height: 100%;
|
|
29
|
+
}
|
|
30
|
+
.goods-list {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
min-height: 40vmin;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
height: 100%;
|
|
36
|
+
.finished-text {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
color: #999;
|
|
40
|
+
font-size: vmin(28);
|
|
41
|
+
padding-bottom: vmin(20);
|
|
42
|
+
}
|
|
43
|
+
.no-data {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
padding-top: vmin(80);
|
|
48
|
+
.no-data-png {
|
|
49
|
+
width: vmin(176);
|
|
50
|
+
height: vmin(176);
|
|
51
|
+
}
|
|
52
|
+
.no-data-text {
|
|
53
|
+
color: #999999;
|
|
54
|
+
font-size: vmin(28);
|
|
55
|
+
margin-top: vmin(32);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
.goods-list-box {
|
|
63
|
+
@include goods-list-box;
|
|
64
|
+
}
|
|
65
|
+
// 竖屏pad
|
|
66
|
+
@media screen and (min-width: 768px) and (orientation: portrait) {
|
|
67
|
+
$deviceWidth: 1536 !global;
|
|
68
|
+
|
|
69
|
+
.goods-list-box {
|
|
70
|
+
@include goods-list-box;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// 横屏pad
|
|
74
|
+
@media screen and (min-height: 768px) and (orientation: landscape) {
|
|
75
|
+
$deviceWidth: 1536 !global;
|
|
76
|
+
|
|
77
|
+
.goods-list-box {
|
|
78
|
+
@include goods-list-box;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @LastEditTime: 2021-11-18 19:51:34
|
|
9
9
|
*/
|
|
10
10
|
-->
|
|
11
|
-
<view>
|
|
11
|
+
<view class="goods-list-box">
|
|
12
12
|
<custom-popup
|
|
13
13
|
showPopup="{{ show }}"
|
|
14
14
|
popPosition="{{ popPosition }}"
|
|
@@ -18,57 +18,75 @@
|
|
|
18
18
|
overlay="{{popPosition === 'bottom' && !overlayStyle ? false : true}}"
|
|
19
19
|
overlay-style="{{ overlayStyle }}"
|
|
20
20
|
zIndex="{{zIndex}}"
|
|
21
|
-
bind:onOverlayClick="onOverlayClick"
|
|
21
|
+
bind:onOverlayClick="onOverlayClick"
|
|
22
|
+
>
|
|
22
23
|
<view slot="header">
|
|
23
24
|
<!-- 弹窗头部 start-->
|
|
24
|
-
<header
|
|
25
|
+
<header
|
|
26
|
+
bind:closePop="closePop"
|
|
27
|
+
bind:gotoPayRecords="gotoPayRecords"
|
|
28
|
+
showClose="{{showClose}}"
|
|
29
|
+
></header>
|
|
25
30
|
<!-- 弹窗头部 end-->
|
|
26
31
|
</view>
|
|
27
32
|
<view slot="content" class="page-main">
|
|
28
33
|
<!-- 商品列表 start-->
|
|
29
|
-
<scroll-view
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
<scroll-view
|
|
35
|
+
class="goods-list"
|
|
36
|
+
scroll-y="true"
|
|
37
|
+
bindscrolltolower="onScrolltolower"
|
|
38
|
+
refresher-triggered="{{refreshing}}"
|
|
39
|
+
bindrefresherrefresh="onLoad"
|
|
40
|
+
refresher-enabled="{{true}}"
|
|
41
|
+
>
|
|
42
|
+
<!-- 优惠券列表 start -->
|
|
43
|
+
<coupon-list
|
|
44
|
+
showList="{{ showList }}"
|
|
45
|
+
aliveInfo="{{ aliveInfo }}"
|
|
46
|
+
bind:showPopup="showInfoCollection"
|
|
47
|
+
bind:receivedSuccess="receivedSuccess"
|
|
48
|
+
sensorReportParams="{{sensorReportParams}}"
|
|
49
|
+
></coupon-list>
|
|
50
|
+
<!-- 优惠券列表 end -->
|
|
51
|
+
<!-- 讲解中的商品 start -->
|
|
34
52
|
<block wx:if="{{showExplainingGoods}}">
|
|
35
53
|
<goods-item
|
|
36
|
-
|
|
37
|
-
allContactPay="{{allContactPay}}"
|
|
38
|
-
goodsInfo="{{formExplainingGoods}}"
|
|
39
|
-
coupon_switch="{{coupon_switch}}"
|
|
40
|
-
bind:sendNewMsg="sendNewMsg"
|
|
41
|
-
bind:showConfirmOrder="showConfirmOrder"
|
|
42
|
-
bind:showSku="showSku"
|
|
43
|
-
explainingGoods="{{explainingGoods}}"
|
|
44
|
-
bind:showDialog="showDialog"
|
|
45
|
-
class="goods-item"
|
|
46
|
-
envName="{{ENV_NAME}}"
|
|
47
|
-
sensorReportParams="{{sensorReportParams}}"
|
|
48
|
-
isFullScreen="{{ popPosition === 'right'}}"
|
|
49
|
-
isGrayMarketing="{{ isGrayMarketing}}"
|
|
50
|
-
></goods-item>
|
|
51
|
-
</block>
|
|
52
|
-
<!-- 讲解中的商品 end -->
|
|
53
|
-
<goods-item
|
|
54
|
-
wx:for="{{goodsInfo}}"
|
|
55
|
-
wx:for-item="goodsItem"
|
|
56
|
-
wx:key="index"
|
|
57
|
-
goodsInfo="{{goodsItem}}"
|
|
54
|
+
aliveInfo="{{aliveInfo}}"
|
|
58
55
|
allContactPay="{{allContactPay}}"
|
|
56
|
+
goodsInfo="{{formExplainingGoods}}"
|
|
59
57
|
coupon_switch="{{coupon_switch}}"
|
|
60
58
|
bind:sendNewMsg="sendNewMsg"
|
|
61
59
|
bind:showConfirmOrder="showConfirmOrder"
|
|
62
60
|
bind:showSku="showSku"
|
|
63
|
-
aliveInfo="{{aliveInfo}}"
|
|
64
61
|
explainingGoods="{{explainingGoods}}"
|
|
65
62
|
bind:showDialog="showDialog"
|
|
66
|
-
bind:toDetails="toDetails"
|
|
67
63
|
class="goods-item"
|
|
68
64
|
envName="{{ENV_NAME}}"
|
|
69
65
|
sensorReportParams="{{sensorReportParams}}"
|
|
70
66
|
isFullScreen="{{ popPosition === 'right'}}"
|
|
71
67
|
isGrayMarketing="{{ isGrayMarketing}}"
|
|
68
|
+
></goods-item>
|
|
69
|
+
</block>
|
|
70
|
+
<!-- 讲解中的商品 end -->
|
|
71
|
+
<goods-item
|
|
72
|
+
wx:for="{{goodsInfo}}"
|
|
73
|
+
wx:for-item="goodsItem"
|
|
74
|
+
wx:key="index"
|
|
75
|
+
goodsInfo="{{goodsItem}}"
|
|
76
|
+
allContactPay="{{allContactPay}}"
|
|
77
|
+
coupon_switch="{{coupon_switch}}"
|
|
78
|
+
bind:sendNewMsg="sendNewMsg"
|
|
79
|
+
bind:showConfirmOrder="showConfirmOrder"
|
|
80
|
+
bind:showSku="showSku"
|
|
81
|
+
aliveInfo="{{aliveInfo}}"
|
|
82
|
+
explainingGoods="{{explainingGoods}}"
|
|
83
|
+
bind:showDialog="showDialog"
|
|
84
|
+
bind:toDetails="toDetails"
|
|
85
|
+
class="goods-item"
|
|
86
|
+
envName="{{ENV_NAME}}"
|
|
87
|
+
sensorReportParams="{{sensorReportParams}}"
|
|
88
|
+
isFullScreen="{{ popPosition === 'right'}}"
|
|
89
|
+
isGrayMarketing="{{ isGrayMarketing}}"
|
|
72
90
|
></goods-item>
|
|
73
91
|
<view class="finished-text" wx:if="{{!refreshing && finishedTxt !== 'no-data'}}">{{finishedTxt}}</view>
|
|
74
92
|
<view class="no-data" wx:if="{{!refreshing && finishedTxt === 'no-data'}}">
|
|
@@ -80,4 +98,9 @@
|
|
|
80
98
|
</view>
|
|
81
99
|
</custom-popup>
|
|
82
100
|
</view>
|
|
83
|
-
<van-dialog
|
|
101
|
+
<van-dialog
|
|
102
|
+
id="van-dialog"
|
|
103
|
+
confirm-button-color="#105cfb"
|
|
104
|
+
catchtap="stopEvent"
|
|
105
|
+
/>
|
|
106
|
+
|
|
@@ -1,50 +1,164 @@
|
|
|
1
|
-
.box {
|
|
1
|
+
.goods-list-box .box {
|
|
2
2
|
margin: 0 1.6vmin;
|
|
3
3
|
}
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
.goods-list-box .title {
|
|
5
6
|
margin: 0;
|
|
6
|
-
padding: 4.
|
|
7
|
+
padding: 4.26667vmin 2.13333vmin 2.13333vmin;
|
|
7
8
|
color: rgba(69, 90, 100, 0.6);
|
|
8
9
|
font-weight: normal;
|
|
9
10
|
font-size: 2.4vmin;
|
|
10
|
-
line-height: 2.
|
|
11
|
+
line-height: 2.66667vmin;
|
|
11
12
|
text-align: center;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
.goods-list-box .btn {
|
|
14
16
|
display: block;
|
|
15
17
|
width: 100%;
|
|
16
|
-
margin: 1.
|
|
18
|
+
margin: 1.33333vmin 0;
|
|
17
19
|
background-color: #fff;
|
|
18
20
|
}
|
|
19
|
-
|
|
21
|
+
|
|
22
|
+
.goods-list-box .page-main {
|
|
20
23
|
height: 100%;
|
|
21
24
|
}
|
|
22
|
-
|
|
25
|
+
|
|
26
|
+
.goods-list-box .goods-list {
|
|
23
27
|
box-sizing: border-box;
|
|
24
28
|
min-height: 40vmin;
|
|
25
29
|
display: flex;
|
|
26
30
|
flex-direction: column;
|
|
27
31
|
height: 100%;
|
|
28
32
|
}
|
|
29
|
-
|
|
33
|
+
|
|
34
|
+
.goods-list-box .goods-list .finished-text {
|
|
30
35
|
display: flex;
|
|
31
36
|
justify-content: center;
|
|
32
37
|
color: #999;
|
|
33
|
-
font-size: 3.
|
|
34
|
-
padding-bottom: 2.
|
|
38
|
+
font-size: 3.73333vmin;
|
|
39
|
+
padding-bottom: 2.66667vmin;
|
|
35
40
|
}
|
|
36
|
-
|
|
41
|
+
|
|
42
|
+
.goods-list-box .goods-list .no-data {
|
|
37
43
|
display: flex;
|
|
38
44
|
flex-direction: column;
|
|
39
45
|
align-items: center;
|
|
40
|
-
padding-top: 10.
|
|
46
|
+
padding-top: 10.66667vmin;
|
|
41
47
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
|
|
49
|
+
.goods-list-box .goods-list .no-data .no-data-png {
|
|
50
|
+
width: 23.46667vmin;
|
|
51
|
+
height: 23.46667vmin;
|
|
45
52
|
}
|
|
46
|
-
|
|
53
|
+
|
|
54
|
+
.goods-list-box .goods-list .no-data .no-data-text {
|
|
47
55
|
color: #999999;
|
|
48
|
-
font-size: 3.
|
|
49
|
-
margin-top: 4.
|
|
56
|
+
font-size: 3.73333vmin;
|
|
57
|
+
margin-top: 4.26667vmin;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media screen and (min-width: 768px) and (orientation: portrait) {
|
|
61
|
+
.goods-list-box .box {
|
|
62
|
+
margin: 0 0.78125vmin;
|
|
63
|
+
}
|
|
64
|
+
.goods-list-box .title {
|
|
65
|
+
margin: 0;
|
|
66
|
+
padding: 2.08333vmin 1.04167vmin 1.04167vmin;
|
|
67
|
+
color: rgba(69, 90, 100, 0.6);
|
|
68
|
+
font-weight: normal;
|
|
69
|
+
font-size: 1.17188vmin;
|
|
70
|
+
line-height: 1.30208vmin;
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
.goods-list-box .btn {
|
|
74
|
+
display: block;
|
|
75
|
+
width: 100%;
|
|
76
|
+
margin: 0.65104vmin 0;
|
|
77
|
+
background-color: #fff;
|
|
78
|
+
}
|
|
79
|
+
.goods-list-box .page-main {
|
|
80
|
+
height: 100%;
|
|
81
|
+
}
|
|
82
|
+
.goods-list-box .goods-list {
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
min-height: 40vmin;
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
height: 100%;
|
|
88
|
+
}
|
|
89
|
+
.goods-list-box .goods-list .finished-text {
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
color: #999;
|
|
93
|
+
font-size: 1.82292vmin;
|
|
94
|
+
padding-bottom: 1.30208vmin;
|
|
95
|
+
}
|
|
96
|
+
.goods-list-box .goods-list .no-data {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
align-items: center;
|
|
100
|
+
padding-top: 5.20833vmin;
|
|
101
|
+
}
|
|
102
|
+
.goods-list-box .goods-list .no-data .no-data-png {
|
|
103
|
+
width: 11.45833vmin;
|
|
104
|
+
height: 11.45833vmin;
|
|
105
|
+
}
|
|
106
|
+
.goods-list-box .goods-list .no-data .no-data-text {
|
|
107
|
+
color: #999999;
|
|
108
|
+
font-size: 1.82292vmin;
|
|
109
|
+
margin-top: 2.08333vmin;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media screen and (min-height: 768px) and (orientation: landscape) {
|
|
114
|
+
.goods-list-box .box {
|
|
115
|
+
margin: 0 0.78125vmin;
|
|
116
|
+
}
|
|
117
|
+
.goods-list-box .title {
|
|
118
|
+
margin: 0;
|
|
119
|
+
padding: 2.08333vmin 1.04167vmin 1.04167vmin;
|
|
120
|
+
color: rgba(69, 90, 100, 0.6);
|
|
121
|
+
font-weight: normal;
|
|
122
|
+
font-size: 1.17188vmin;
|
|
123
|
+
line-height: 1.30208vmin;
|
|
124
|
+
text-align: center;
|
|
125
|
+
}
|
|
126
|
+
.goods-list-box .btn {
|
|
127
|
+
display: block;
|
|
128
|
+
width: 100%;
|
|
129
|
+
margin: 0.65104vmin 0;
|
|
130
|
+
background-color: #fff;
|
|
131
|
+
}
|
|
132
|
+
.goods-list-box .page-main {
|
|
133
|
+
height: 100%;
|
|
134
|
+
}
|
|
135
|
+
.goods-list-box .goods-list {
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
min-height: 40vmin;
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
height: 100%;
|
|
141
|
+
}
|
|
142
|
+
.goods-list-box .goods-list .finished-text {
|
|
143
|
+
display: flex;
|
|
144
|
+
justify-content: center;
|
|
145
|
+
color: #999;
|
|
146
|
+
font-size: 1.82292vmin;
|
|
147
|
+
padding-bottom: 1.30208vmin;
|
|
148
|
+
}
|
|
149
|
+
.goods-list-box .goods-list .no-data {
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
align-items: center;
|
|
153
|
+
padding-top: 5.20833vmin;
|
|
154
|
+
}
|
|
155
|
+
.goods-list-box .goods-list .no-data .no-data-png {
|
|
156
|
+
width: 11.45833vmin;
|
|
157
|
+
height: 11.45833vmin;
|
|
158
|
+
}
|
|
159
|
+
.goods-list-box .goods-list .no-data .no-data-text {
|
|
160
|
+
color: #999999;
|
|
161
|
+
font-size: 1.82292vmin;
|
|
162
|
+
margin-top: 2.08333vmin;
|
|
163
|
+
}
|
|
50
164
|
}
|