xiaoe_mp_npm 0.1.1 → 0.1.3
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/.gitlab-ci.yml +1 -1
- package/miniprogram_dist/{LiveGoodsList/GoodsItem → GoodsItem}/index.js +36 -9
- package/miniprogram_dist/GoodsItem/index.json +6 -0
- package/miniprogram_dist/GoodsItem/index.less +249 -0
- package/{src/LiveGoodsList → miniprogram_dist}/GoodsItem/index.wxml +24 -13
- package/miniprogram_dist/{LiveGoodsList/GoodsItem → GoodsItem}/index.wxss +48 -27
- package/miniprogram_dist/LiveGoodsList/Header/index.wxml +1 -1
- package/miniprogram_dist/LiveGoodsList/index.js +9 -4
- package/miniprogram_dist/LiveGoodsList/index.json +1 -1
- package/miniprogram_dist/LiveGoodsList/index.less +0 -6
- package/miniprogram_dist/LiveGoodsList/index.wxml +0 -1
- package/miniprogram_dist/LiveGoodsList/index.wxss +0 -6
- package/miniprogram_dist/Lottery/components/LotteryInfo/index.js +12 -9
- package/miniprogram_dist/Lottery/components/LotteryPopups/index.js +19 -0
- package/miniprogram_dist/TeacherGoodsList/Header/index.js +36 -0
- package/{src/LiveGoodsList/GoodsItem → miniprogram_dist/TeacherGoodsList/Header}/index.json +1 -1
- package/miniprogram_dist/TeacherGoodsList/Header/index.less +47 -0
- package/miniprogram_dist/TeacherGoodsList/Header/index.wxml +27 -0
- package/miniprogram_dist/TeacherGoodsList/Header/index.wxss +45 -0
- package/miniprogram_dist/TeacherGoodsList/README.md +10 -0
- package/miniprogram_dist/TeacherGoodsList/index.js +269 -0
- package/miniprogram_dist/TeacherGoodsList/index.json +8 -0
- package/miniprogram_dist/TeacherGoodsList/index.less +53 -0
- package/miniprogram_dist/TeacherGoodsList/index.wxml +49 -0
- package/miniprogram_dist/TeacherGoodsList/index.wxss +50 -0
- package/package.json +1 -1
- package/src/{LiveGoodsList/GoodsItem → GoodsItem}/index.js +36 -9
- package/src/GoodsItem/index.json +6 -0
- package/src/GoodsItem/index.less +249 -0
- package/{miniprogram_dist/LiveGoodsList → src}/GoodsItem/index.wxml +24 -13
- package/src/{LiveGoodsList/GoodsItem → GoodsItem}/index.wxss +48 -27
- package/src/LiveGoodsList/Header/index.wxml +1 -1
- package/src/LiveGoodsList/index.js +9 -4
- package/src/LiveGoodsList/index.json +1 -1
- package/src/LiveGoodsList/index.less +0 -6
- package/src/LiveGoodsList/index.wxml +0 -1
- package/src/LiveGoodsList/index.wxss +0 -6
- package/src/Lottery/components/LotteryInfo/index.js +12 -9
- package/src/Lottery/components/LotteryPopups/index.js +19 -0
- package/src/TeacherGoodsList/Header/index.js +36 -0
- package/{miniprogram_dist/LiveGoodsList/GoodsItem → src/TeacherGoodsList/Header}/index.json +1 -1
- package/src/TeacherGoodsList/Header/index.less +47 -0
- package/src/TeacherGoodsList/Header/index.wxml +27 -0
- package/src/TeacherGoodsList/Header/index.wxss +45 -0
- package/src/TeacherGoodsList/README.md +10 -0
- package/src/TeacherGoodsList/index.js +269 -0
- package/src/TeacherGoodsList/index.json +8 -0
- package/src/TeacherGoodsList/index.less +53 -0
- package/src/TeacherGoodsList/index.wxml +49 -0
- package/src/TeacherGoodsList/index.wxss +50 -0
- package/miniprogram_dist/LiveGoodsList/GoodsItem/index.less +0 -228
- package/src/LiveGoodsList/GoodsItem/index.less +0 -228
package/.gitlab-ci.yml
CHANGED
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
* @LastEditors: conlinchen
|
|
7
7
|
* @LastEditTime: 2021-11-18 19:49:11
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import { getUserPermission, snapCheck } from "../../common/api/liveGoodsList"
|
|
9
|
+
import {debounce} from "../common/utils/index"
|
|
10
|
+
import { getUserPermission, snapCheck } from "../common/api/liveGoodsList"
|
|
12
11
|
import { sensorLog } from "live-mp-tools";
|
|
13
12
|
|
|
14
13
|
const computedBehavior = require('miniprogram-computed').behavior
|
|
@@ -27,7 +26,8 @@ const SPU_TYPE = {
|
|
|
27
26
|
35:"BTK",
|
|
28
27
|
41:"VCP",
|
|
29
28
|
42:"OLP",
|
|
30
|
-
45:"ALC"
|
|
29
|
+
45:"ALC",
|
|
30
|
+
23:"SVP"
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
|
|
@@ -114,6 +114,10 @@ Component({
|
|
|
114
114
|
type: Object,
|
|
115
115
|
value: {}
|
|
116
116
|
},
|
|
117
|
+
current_role: {
|
|
118
|
+
type: String,
|
|
119
|
+
value: 'student'
|
|
120
|
+
}
|
|
117
121
|
},
|
|
118
122
|
|
|
119
123
|
lifetimes: {
|
|
@@ -136,7 +140,9 @@ Component({
|
|
|
136
140
|
isIOS: false,
|
|
137
141
|
page_path: '',
|
|
138
142
|
preHeatTime: '',
|
|
139
|
-
isSeckill: false
|
|
143
|
+
isSeckill: false,
|
|
144
|
+
checked: false,
|
|
145
|
+
switchLoading: false
|
|
140
146
|
},
|
|
141
147
|
computed: {
|
|
142
148
|
showPreferentialPrice(properties){
|
|
@@ -157,6 +163,9 @@ Component({
|
|
|
157
163
|
return `${data.page_path}?type=1&link=${url2}&title=${data.goodsItem.title}`
|
|
158
164
|
}
|
|
159
165
|
},
|
|
166
|
+
isStudent(properties){
|
|
167
|
+
return properties.current_role === 'student'
|
|
168
|
+
},
|
|
160
169
|
//超过99999不够位置展示划线价,只能不要孩子了
|
|
161
170
|
showPriceLine(data){
|
|
162
171
|
return data.goodsItem.priceLine > 0 && ( data.goodsItem.priceShow < 100000 || !data.showPreferentialPrice )
|
|
@@ -175,12 +184,12 @@ Component({
|
|
|
175
184
|
},
|
|
176
185
|
//销量/订阅。只有 实物商品 21 、专栏 6、大专栏 8、会员 5 展示,受B端店铺设置(hide_sub_count):隐藏商品销量控制 0-显示 1-隐藏
|
|
177
186
|
hasSaleNum(data){
|
|
178
|
-
return [21,6,8,5].indexOf(data.goodsItem.resource_type) > -1 && !data.goodsItem.hide_sub_count && data.goodsItem.order_num > 0
|
|
187
|
+
return [21,6,8,5,41].indexOf(data.goodsItem.resource_type) > -1 && !data.goodsItem.hide_sub_count && data.goodsItem.order_num > 0
|
|
179
188
|
},
|
|
180
189
|
//销量/订阅。只有 实物商品 21 、专栏 6、大专栏 8、会员 5 展示
|
|
181
190
|
saleNum(data){
|
|
182
191
|
//实物商品
|
|
183
|
-
if(data.goodsItem.resource_type === 21){
|
|
192
|
+
if(data.goodsItem.resource_type === 21 || data.goodsItem.resource_type === 41){
|
|
184
193
|
return ' 已售 ' + (data.goodsItem.order_num || 0)
|
|
185
194
|
} else if(data.goodsItem.resource_type === 6 || data.goodsItem.resource_type === 8 || data.goodsItem.resource_type === 5){
|
|
186
195
|
return ' 订阅 ' + (data.goodsItem.order_num || 0)
|
|
@@ -331,8 +340,8 @@ Component({
|
|
|
331
340
|
},
|
|
332
341
|
// 判断权益
|
|
333
342
|
judgePermission: debounce(async function (permission){
|
|
334
|
-
// 实物21 可多次购买,去详情页;
|
|
335
|
-
if(
|
|
343
|
+
// 实物21 有价优惠券41 可多次购买,去详情页; 直播商品4不管有没有权益都去详情页啦。
|
|
344
|
+
if([41, 4, 21].indexOf(Number(this.data.goodsItem.resource_type)) > -1){
|
|
336
345
|
this.toDetails()
|
|
337
346
|
return
|
|
338
347
|
}
|
|
@@ -522,6 +531,24 @@ getUserPermission(){
|
|
|
522
531
|
}
|
|
523
532
|
console.log("exuexiexuexi",params)
|
|
524
533
|
wx.navigateToMiniProgram(params)
|
|
534
|
+
},
|
|
535
|
+
sendGoodsCard(){
|
|
536
|
+
this.triggerEvent('sendGoodsCard',this.data.goodsItem)
|
|
537
|
+
},
|
|
538
|
+
changeShowType(){
|
|
539
|
+
this.setData({
|
|
540
|
+
switchLoading: true
|
|
541
|
+
})
|
|
542
|
+
let that = this
|
|
543
|
+
setTimeout(()=>{
|
|
544
|
+
that.setData({
|
|
545
|
+
checked: !this.data.checked,
|
|
546
|
+
switchLoading: false
|
|
547
|
+
})
|
|
548
|
+
},2000)
|
|
549
|
+
},
|
|
550
|
+
stopEvent(){
|
|
551
|
+
return
|
|
525
552
|
}
|
|
526
553
|
}
|
|
527
554
|
})
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
@import "../common/css/theme.wxss";
|
|
2
|
+
|
|
3
|
+
.goods-explaining {
|
|
4
|
+
position: absolute;
|
|
5
|
+
width: 240rpx;
|
|
6
|
+
height: 36rpx;
|
|
7
|
+
bottom: 0rpx;
|
|
8
|
+
left: 0rpx;
|
|
9
|
+
}
|
|
10
|
+
.goods-item {
|
|
11
|
+
display: flex;
|
|
12
|
+
min-height: 180rpx;
|
|
13
|
+
background: #ffffff;
|
|
14
|
+
margin: 20rpx 40rpx 0 40rpx;
|
|
15
|
+
border-radius: 16rpx;
|
|
16
|
+
padding: 16rpx;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
|
|
19
|
+
.main-card{
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: row;
|
|
22
|
+
.left {
|
|
23
|
+
position: relative;
|
|
24
|
+
height: 180rpx;
|
|
25
|
+
.goods-img {
|
|
26
|
+
width: 240rpx;
|
|
27
|
+
border-radius: 16rpx;
|
|
28
|
+
height: 180rpx;
|
|
29
|
+
background: rgba(0,0,0,0.04);
|
|
30
|
+
}
|
|
31
|
+
.index {
|
|
32
|
+
border-radius: 16rpx 0 24rpx 0;
|
|
33
|
+
position: absolute;
|
|
34
|
+
left: 0;
|
|
35
|
+
display: inline-block;
|
|
36
|
+
text-align: center;
|
|
37
|
+
width: 48rpx;
|
|
38
|
+
height: 40rpx;
|
|
39
|
+
line-height: 35rpx;
|
|
40
|
+
font-size: 24rpx;
|
|
41
|
+
background: rgba(0,0,0,0.25);
|
|
42
|
+
color: #FFFFFF;
|
|
43
|
+
backdrop-filter: blur(24rpx);
|
|
44
|
+
}
|
|
45
|
+
.goods-type {
|
|
46
|
+
position: absolute;
|
|
47
|
+
right: calc(100% - 230rpx);
|
|
48
|
+
bottom: 8rpx;
|
|
49
|
+
padding: 8rpx 10rpx;
|
|
50
|
+
background: rgba(0,0,0,0.25);
|
|
51
|
+
border-radius: 8rpx;
|
|
52
|
+
color: #fff;
|
|
53
|
+
font-size: 20rpx;
|
|
54
|
+
width: fit-content;
|
|
55
|
+
display: flex;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
align-items: center;
|
|
58
|
+
height: 20rpx;
|
|
59
|
+
backdrop-filter: blur(24rpx);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.right {
|
|
63
|
+
flex: 1;
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
justify-content: space-between;
|
|
67
|
+
margin-left: 16rpx;
|
|
68
|
+
height: 180rpx;
|
|
69
|
+
width: calc(100% - 256rpx);
|
|
70
|
+
.line-one {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
height: 36rpx;
|
|
74
|
+
.activity-type {
|
|
75
|
+
background-color: #FFF3EB;
|
|
76
|
+
color: #FF781F;
|
|
77
|
+
padding: 0rpx 8rpx;
|
|
78
|
+
font-size: 20rpx;
|
|
79
|
+
height: 32rpx;
|
|
80
|
+
line-height: 36rpx;
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
margin-right: 8rpx;
|
|
83
|
+
border-radius: 4rpx;
|
|
84
|
+
display: flex;
|
|
85
|
+
width: max-content;
|
|
86
|
+
align-items: center;
|
|
87
|
+
}
|
|
88
|
+
.super-activity-type{
|
|
89
|
+
background: linear-gradient(180.25deg, rgba(51,51,51,1) 0%, rgba(81.6,81.6,81.6,1) 68%, rgba(51,51,51,1) 100%);
|
|
90
|
+
color: rgba(255,120,31,1);
|
|
91
|
+
padding: 4rpx 8rpx;
|
|
92
|
+
font-size: 20rpx;
|
|
93
|
+
height: 32rpx;
|
|
94
|
+
width: max-content;
|
|
95
|
+
line-height: 36rpx;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
margin-right: 8rpx;
|
|
98
|
+
border-radius: 4rpx;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
.super-activity-txt{
|
|
102
|
+
background: linear-gradient(to right, #FFE4AD, #FFC266);
|
|
103
|
+
-webkit-background-clip: text;
|
|
104
|
+
color: transparent;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
.goods-title {
|
|
108
|
+
font-size: 28rpx;
|
|
109
|
+
color: #333333;
|
|
110
|
+
word-break: break-all;
|
|
111
|
+
display: inline-block;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
text-overflow: ellipsis;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
display: inline-block;
|
|
116
|
+
vertical-align: middle;
|
|
117
|
+
line-height: 36rpx;
|
|
118
|
+
font-weight: 500;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
.sec-kill {
|
|
122
|
+
color: #FF781F;
|
|
123
|
+
font-size: 20rpx;
|
|
124
|
+
line-height: 32rpx;
|
|
125
|
+
margin: 8rpx 0;
|
|
126
|
+
}
|
|
127
|
+
.left-stock {
|
|
128
|
+
color: #999999;
|
|
129
|
+
font-size: 20rpx;
|
|
130
|
+
height: 24rpx;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
.split{
|
|
134
|
+
display: inline-block;
|
|
135
|
+
border-left: 1px solid #999999;
|
|
136
|
+
width: 2rpx;
|
|
137
|
+
height: 24rpx;
|
|
138
|
+
margin: 0 12rpx;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
.line-three {
|
|
142
|
+
display: flex;
|
|
143
|
+
justify-content: space-between;
|
|
144
|
+
align-items: flex-end;
|
|
145
|
+
.price {
|
|
146
|
+
position: relative;
|
|
147
|
+
min-height: 40rpx;
|
|
148
|
+
font-weight: 500;
|
|
149
|
+
.price-flow{
|
|
150
|
+
color: #FF5429;
|
|
151
|
+
font-size: 24rpx;
|
|
152
|
+
}
|
|
153
|
+
.price-show {
|
|
154
|
+
color: #FF5429;
|
|
155
|
+
font-size: 36rpx;
|
|
156
|
+
}
|
|
157
|
+
.price-line {
|
|
158
|
+
font-size: 20rpx;
|
|
159
|
+
text-decoration: line-through;
|
|
160
|
+
color: #999999;
|
|
161
|
+
margin-left: 8rpx;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
.buy-btn {
|
|
165
|
+
font-size: 24rpx;
|
|
166
|
+
border-radius: 40rpx;
|
|
167
|
+
width: 160rpx;
|
|
168
|
+
height: 56rpx;
|
|
169
|
+
display: flex;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
align-items: center;
|
|
172
|
+
color: white;
|
|
173
|
+
line-height: 56rpx;
|
|
174
|
+
font-weight: 500;
|
|
175
|
+
background-color: red;
|
|
176
|
+
}
|
|
177
|
+
.no-stock-btn{
|
|
178
|
+
font-size: 24rpx;
|
|
179
|
+
border-radius: 40rpx;
|
|
180
|
+
width: 160rpx;
|
|
181
|
+
height: 56rpx;
|
|
182
|
+
display: flex;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
align-items: center;
|
|
185
|
+
color: white;
|
|
186
|
+
line-height: 56rpx;
|
|
187
|
+
font-weight: 500;
|
|
188
|
+
background-color: #bbb;
|
|
189
|
+
opacity: 40%;
|
|
190
|
+
}
|
|
191
|
+
.see-btn {
|
|
192
|
+
font-size: 24rpx;
|
|
193
|
+
border-radius: 40rpx;
|
|
194
|
+
width: 160rpx;
|
|
195
|
+
height: 56rpx;
|
|
196
|
+
display: flex;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
align-items: center;
|
|
199
|
+
color: white;
|
|
200
|
+
line-height: 56rpx;
|
|
201
|
+
font-weight: 500;
|
|
202
|
+
background-color: red;
|
|
203
|
+
margin-left: inherit;
|
|
204
|
+
margin-right: inherit;
|
|
205
|
+
}
|
|
206
|
+
.buy-btn-preferential{
|
|
207
|
+
font-size: 24rpx;
|
|
208
|
+
border-radius: 40rpx;
|
|
209
|
+
padding: 0 10rpx;
|
|
210
|
+
min-width: 160rpx;
|
|
211
|
+
height: 68rpx;
|
|
212
|
+
display: flex;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
align-items: center;
|
|
215
|
+
color: white;
|
|
216
|
+
flex-flow: column;
|
|
217
|
+
line-height: 32rpx;
|
|
218
|
+
background-color: red;
|
|
219
|
+
.go-buy{
|
|
220
|
+
font-size: 24rpx;
|
|
221
|
+
font-weight: 500;
|
|
222
|
+
}
|
|
223
|
+
.preferential-flow{
|
|
224
|
+
color: rgba(255,255,255,1);
|
|
225
|
+
font-size: 20rpx;
|
|
226
|
+
}
|
|
227
|
+
.preferential-show{
|
|
228
|
+
font-size: 28rpx;
|
|
229
|
+
color: rgba(255,255,255,1);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
.teacher-switch{
|
|
237
|
+
height: 32rpx;
|
|
238
|
+
background: #fff;
|
|
239
|
+
display: flex;
|
|
240
|
+
margin-top: 16rpx;
|
|
241
|
+
.switch-txt{
|
|
242
|
+
opacity: 1;
|
|
243
|
+
color: rgba(51,51,51,1);
|
|
244
|
+
font-size: 24rpx;
|
|
245
|
+
font-weight: 400;
|
|
246
|
+
font-family: "PingFang SC";
|
|
247
|
+
margin-left: 16rpx;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
-->
|
|
12
12
|
<view class="goods-item" bindtap="cardToDetails">
|
|
13
|
+
<view class="main-card">
|
|
13
14
|
<view class="left">
|
|
14
15
|
<image alt=""
|
|
15
16
|
class="goods-img"
|
|
@@ -25,8 +26,8 @@
|
|
|
25
26
|
<view class="super-activity-type" wx:if="{{isSupperVip}}"><text class="super-activity-txt">{{currentActive}}</text></view>
|
|
26
27
|
<text class="goods-title">{{goodsItem.title}}</text>
|
|
27
28
|
</view>
|
|
28
|
-
<view class="sec-kill">{{secText}}</view>
|
|
29
|
-
<view class="left-stock" wx:if="{{goodsItem.hasStock || hasSaleNum}}">
|
|
29
|
+
<view class="sec-kill">{{secText || goodsItem.goods_desc}}</view>
|
|
30
|
+
<view class="left-stock" wx:if="{{ isStudent && goodsItem.hasStock || hasSaleNum}}">
|
|
30
31
|
<text wx:if="{{goodsItem.hasStock}}">还剩 {{ goodsItem.leftStock }}</text>
|
|
31
32
|
<view class="split" wx:if="{{goodsItem.hasStock && hasSaleNum}}"></view>
|
|
32
33
|
<text wx:if="{{hasSaleNum}}">{{ saleNum }}</text>
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
</view>
|
|
47
48
|
|
|
48
49
|
<!-- 购买按钮 start -->
|
|
50
|
+
<block wx:if="{{isStudent}}">
|
|
49
51
|
<!-- IOS虚拟商品 -->
|
|
50
52
|
<button
|
|
51
53
|
class="see-btn theme-customize-bg"
|
|
@@ -58,20 +60,29 @@
|
|
|
58
60
|
send-message-path="{{params_url}}">
|
|
59
61
|
{{ btnTxt }}
|
|
60
62
|
</button>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
<!-- 库存为0的情况 -->
|
|
64
|
+
<view class="no-stock-btn theme-customize-bg" wx:if="{{ btnTxt === '抢光了' }}" catchtap="()=>{}">{{ btnTxt }}</view>
|
|
65
|
+
<!-- 正常情况 -->
|
|
66
|
+
<view class="buy-btn theme-customize-bg" catchtap="snapUpCheck" wx:if="{{ btnTxt === '去抢购' }}">{{ btnTxt }}</view>
|
|
67
|
+
<!-- 0元商品/超级会员免费/券后价、领券接口熔断的情况 -->
|
|
68
|
+
<view class="buy-btn theme-customize-bg" catchtap="judgePermission" wx:if="{{ btnTxt === '免费领取' || btnTxt === '查看详情' }}">{{ btnTxt }}</view>
|
|
69
|
+
<!-- 券后价 -->
|
|
70
|
+
<view class="buy-btn-preferential theme-customize-bg" catchtap="snapUpCheck" wx:if="{{ btnTxt === '券后'}}">
|
|
71
|
+
<text class="go-buy">去抢购</text>
|
|
72
|
+
<text><text class="preferential-flow">券后 ¥</text><text class="preferential-show">{{ goodsItem.preferentialShowInt }}</text><text class="preferential-flow" wx:if="{{ goodsItem.preferentialShowFlow !== '00'}}">.{{ goodsItem.preferentialShowFlow }}</text></text>
|
|
73
|
+
</view>
|
|
74
|
+
</block>
|
|
75
|
+
<block wx:else>
|
|
76
|
+
<view class="buy-btn theme-customize-bg" catchtap="sendGoodsCard">发送</view>
|
|
77
|
+
</block>
|
|
72
78
|
<!-- 购买按钮 end -->
|
|
73
79
|
</view>
|
|
74
80
|
</view>
|
|
81
|
+
</view>
|
|
82
|
+
<view class="teacher-switch" wx:if="{{!isStudent && goodsItem.teacher_auth == 2}}" catchtap="stopEvent">
|
|
83
|
+
<van-switch checked="{{checked}}" bind:change="changeShowType" loading="{{switchLoading}}" size="28rpx"/>
|
|
84
|
+
<text class="switch-txt">学员端展示商品</text>
|
|
85
|
+
</view>
|
|
75
86
|
</view>
|
|
76
87
|
|
|
77
88
|
|
|
@@ -24,20 +24,27 @@
|
|
|
24
24
|
.goods-item {
|
|
25
25
|
display: flex;
|
|
26
26
|
min-height: 180rpx;
|
|
27
|
-
background
|
|
28
|
-
margin: 20rpx 40rpx;
|
|
27
|
+
background: #ffffff;
|
|
28
|
+
margin: 20rpx 40rpx 0 40rpx;
|
|
29
|
+
border-radius: 16rpx;
|
|
30
|
+
padding: 16rpx;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
}
|
|
33
|
+
.goods-item .main-card {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: row;
|
|
29
36
|
}
|
|
30
|
-
.goods-item .left {
|
|
37
|
+
.goods-item .main-card .left {
|
|
31
38
|
position: relative;
|
|
32
39
|
height: 180rpx;
|
|
33
40
|
}
|
|
34
|
-
.goods-item .left .goods-img {
|
|
41
|
+
.goods-item .main-card .left .goods-img {
|
|
35
42
|
width: 240rpx;
|
|
36
43
|
border-radius: 16rpx;
|
|
37
44
|
height: 180rpx;
|
|
38
45
|
background: rgba(0, 0, 0, 0.04);
|
|
39
46
|
}
|
|
40
|
-
.goods-item .left .index {
|
|
47
|
+
.goods-item .main-card .left .index {
|
|
41
48
|
border-radius: 16rpx 0 24rpx 0;
|
|
42
49
|
position: absolute;
|
|
43
50
|
left: 0;
|
|
@@ -51,7 +58,7 @@
|
|
|
51
58
|
color: #FFFFFF;
|
|
52
59
|
backdrop-filter: blur(24rpx);
|
|
53
60
|
}
|
|
54
|
-
.goods-item .left .goods-type {
|
|
61
|
+
.goods-item .main-card .left .goods-type {
|
|
55
62
|
position: absolute;
|
|
56
63
|
right: calc(100% - 230rpx);
|
|
57
64
|
bottom: 8rpx;
|
|
@@ -67,7 +74,7 @@
|
|
|
67
74
|
height: 20rpx;
|
|
68
75
|
backdrop-filter: blur(24rpx);
|
|
69
76
|
}
|
|
70
|
-
.goods-item .right {
|
|
77
|
+
.goods-item .main-card .right {
|
|
71
78
|
flex: 1;
|
|
72
79
|
display: flex;
|
|
73
80
|
flex-direction: column;
|
|
@@ -76,12 +83,12 @@
|
|
|
76
83
|
height: 180rpx;
|
|
77
84
|
width: calc(100% - 256rpx);
|
|
78
85
|
}
|
|
79
|
-
.goods-item .right .line-one {
|
|
86
|
+
.goods-item .main-card .right .line-one {
|
|
80
87
|
display: flex;
|
|
81
88
|
align-items: center;
|
|
82
89
|
height: 36rpx;
|
|
83
90
|
}
|
|
84
|
-
.goods-item .right .line-one .activity-type {
|
|
91
|
+
.goods-item .main-card .right .line-one .activity-type {
|
|
85
92
|
background-color: #FFF3EB;
|
|
86
93
|
color: #FF781F;
|
|
87
94
|
padding: 0rpx 8rpx;
|
|
@@ -95,7 +102,7 @@
|
|
|
95
102
|
width: max-content;
|
|
96
103
|
align-items: center;
|
|
97
104
|
}
|
|
98
|
-
.goods-item .right .line-one .super-activity-type {
|
|
105
|
+
.goods-item .main-card .right .line-one .super-activity-type {
|
|
99
106
|
background: linear-gradient(180.25deg, #333333 0%, #525252 68%, #333333 100%);
|
|
100
107
|
color: #ff781f;
|
|
101
108
|
padding: 4rpx 8rpx;
|
|
@@ -109,12 +116,12 @@
|
|
|
109
116
|
display: flex;
|
|
110
117
|
align-items: center;
|
|
111
118
|
}
|
|
112
|
-
.goods-item .right .line-one .super-activity-type .super-activity-txt {
|
|
119
|
+
.goods-item .main-card .right .line-one .super-activity-type .super-activity-txt {
|
|
113
120
|
background: linear-gradient(to right, #FFE4AD, #FFC266);
|
|
114
121
|
-webkit-background-clip: text;
|
|
115
122
|
color: transparent;
|
|
116
123
|
}
|
|
117
|
-
.goods-item .right .line-one .goods-title {
|
|
124
|
+
.goods-item .main-card .right .line-one .goods-title {
|
|
118
125
|
font-size: 28rpx;
|
|
119
126
|
color: #333333;
|
|
120
127
|
word-break: break-all;
|
|
@@ -126,51 +133,51 @@
|
|
|
126
133
|
line-height: 36rpx;
|
|
127
134
|
font-weight: 500;
|
|
128
135
|
}
|
|
129
|
-
.goods-item .right .sec-kill {
|
|
136
|
+
.goods-item .main-card .right .sec-kill {
|
|
130
137
|
color: #FF781F;
|
|
131
138
|
font-size: 20rpx;
|
|
132
139
|
line-height: 32rpx;
|
|
133
140
|
margin: 8rpx 0;
|
|
134
141
|
}
|
|
135
|
-
.goods-item .right .left-stock {
|
|
142
|
+
.goods-item .main-card .right .left-stock {
|
|
136
143
|
color: #999999;
|
|
137
144
|
font-size: 20rpx;
|
|
138
145
|
height: 24rpx;
|
|
139
146
|
display: flex;
|
|
140
147
|
align-items: center;
|
|
141
148
|
}
|
|
142
|
-
.goods-item .right .left-stock .split {
|
|
149
|
+
.goods-item .main-card .right .left-stock .split {
|
|
143
150
|
display: inline-block;
|
|
144
151
|
border-left: 1px solid #999999;
|
|
145
152
|
width: 2rpx;
|
|
146
153
|
height: 24rpx;
|
|
147
154
|
margin: 0 12rpx;
|
|
148
155
|
}
|
|
149
|
-
.goods-item .right .line-three {
|
|
156
|
+
.goods-item .main-card .right .line-three {
|
|
150
157
|
display: flex;
|
|
151
158
|
justify-content: space-between;
|
|
152
159
|
align-items: flex-end;
|
|
153
160
|
}
|
|
154
|
-
.goods-item .right .line-three .price {
|
|
161
|
+
.goods-item .main-card .right .line-three .price {
|
|
155
162
|
position: relative;
|
|
156
163
|
min-height: 40rpx;
|
|
157
164
|
font-weight: 500;
|
|
158
165
|
}
|
|
159
|
-
.goods-item .right .line-three .price .price-flow {
|
|
166
|
+
.goods-item .main-card .right .line-three .price .price-flow {
|
|
160
167
|
color: #FF5429;
|
|
161
168
|
font-size: 24rpx;
|
|
162
169
|
}
|
|
163
|
-
.goods-item .right .line-three .price .price-show {
|
|
170
|
+
.goods-item .main-card .right .line-three .price .price-show {
|
|
164
171
|
color: #FF5429;
|
|
165
172
|
font-size: 36rpx;
|
|
166
173
|
}
|
|
167
|
-
.goods-item .right .line-three .price .price-line {
|
|
174
|
+
.goods-item .main-card .right .line-three .price .price-line {
|
|
168
175
|
font-size: 20rpx;
|
|
169
176
|
text-decoration: line-through;
|
|
170
177
|
color: #999999;
|
|
171
178
|
margin-left: 8rpx;
|
|
172
179
|
}
|
|
173
|
-
.goods-item .right .line-three .buy-btn {
|
|
180
|
+
.goods-item .main-card .right .line-three .buy-btn {
|
|
174
181
|
font-size: 24rpx;
|
|
175
182
|
border-radius: 40rpx;
|
|
176
183
|
width: 160rpx;
|
|
@@ -183,7 +190,7 @@
|
|
|
183
190
|
font-weight: 500;
|
|
184
191
|
background-color: red;
|
|
185
192
|
}
|
|
186
|
-
.goods-item .right .line-three .no-stock-btn {
|
|
193
|
+
.goods-item .main-card .right .line-three .no-stock-btn {
|
|
187
194
|
font-size: 24rpx;
|
|
188
195
|
border-radius: 40rpx;
|
|
189
196
|
width: 160rpx;
|
|
@@ -197,7 +204,7 @@
|
|
|
197
204
|
background-color: #bbb;
|
|
198
205
|
opacity: 40%;
|
|
199
206
|
}
|
|
200
|
-
.goods-item .right .line-three .see-btn {
|
|
207
|
+
.goods-item .main-card .right .line-three .see-btn {
|
|
201
208
|
font-size: 24rpx;
|
|
202
209
|
border-radius: 40rpx;
|
|
203
210
|
width: 160rpx;
|
|
@@ -212,7 +219,7 @@
|
|
|
212
219
|
margin-left: inherit;
|
|
213
220
|
margin-right: inherit;
|
|
214
221
|
}
|
|
215
|
-
.goods-item .right .line-three .buy-btn-preferential {
|
|
222
|
+
.goods-item .main-card .right .line-three .buy-btn-preferential {
|
|
216
223
|
font-size: 24rpx;
|
|
217
224
|
border-radius: 40rpx;
|
|
218
225
|
padding: 0 10rpx;
|
|
@@ -226,15 +233,29 @@
|
|
|
226
233
|
line-height: 32rpx;
|
|
227
234
|
background-color: red;
|
|
228
235
|
}
|
|
229
|
-
.goods-item .right .line-three .buy-btn-preferential .go-buy {
|
|
236
|
+
.goods-item .main-card .right .line-three .buy-btn-preferential .go-buy {
|
|
230
237
|
font-size: 24rpx;
|
|
231
238
|
font-weight: 500;
|
|
232
239
|
}
|
|
233
|
-
.goods-item .right .line-three .buy-btn-preferential .preferential-flow {
|
|
240
|
+
.goods-item .main-card .right .line-three .buy-btn-preferential .preferential-flow {
|
|
234
241
|
color: #ffffff;
|
|
235
242
|
font-size: 20rpx;
|
|
236
243
|
}
|
|
237
|
-
.goods-item .right .line-three .buy-btn-preferential .preferential-show {
|
|
244
|
+
.goods-item .main-card .right .line-three .buy-btn-preferential .preferential-show {
|
|
238
245
|
font-size: 28rpx;
|
|
239
246
|
color: #ffffff;
|
|
240
247
|
}
|
|
248
|
+
.teacher-switch {
|
|
249
|
+
height: 32rpx;
|
|
250
|
+
background: #fff;
|
|
251
|
+
display: flex;
|
|
252
|
+
margin-top: 16rpx;
|
|
253
|
+
}
|
|
254
|
+
.teacher-switch .switch-txt {
|
|
255
|
+
opacity: 1;
|
|
256
|
+
color: #333333;
|
|
257
|
+
font-size: 24rpx;
|
|
258
|
+
font-weight: 400;
|
|
259
|
+
font-family: "PingFang SC";
|
|
260
|
+
margin-left: 16rpx;
|
|
261
|
+
}
|