xiaoe_mp_npm 0.2.4-t220110 → 0.3.1
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 +2 -2
- package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.js +1 -1
- package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.less +4 -4
- package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.wxss +4 -4
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.js +11 -0
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/ImageData/index.js +2 -20
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.js +2 -1
- package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.less +18 -3
- package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.wxml +4 -2
- package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.wxss +17 -2
- package/miniprogram_dist/GoodsItem/index.js +7 -23
- package/miniprogram_dist/GoodsItem/index.wxml +2 -2
- package/miniprogram_dist/LiveGoodsList/index.js +4 -4
- package/miniprogram_dist/Lottery/components/AddressCollection/index.js +11 -8
- package/miniprogram_dist/Lottery/components/CommonPopup/index.less +4 -4
- package/miniprogram_dist/Lottery/components/CommonPopup/index.wxss +4 -4
- package/miniprogram_dist/Lottery/components/LotteryInfo/index.js +17 -11
- package/miniprogram_dist/Lottery/components/LotteryInfo/index.wxml +2 -2
- package/miniprogram_dist/Lottery/components/LotteryPopups/index.js +19 -0
- package/miniprogram_dist/Lottery/components/LotteryResult/LosingLottery/index.js +4 -1
- package/miniprogram_dist/Lottery/components/LotteryResult/LosingLottery/index.less +4 -0
- package/miniprogram_dist/Lottery/components/LotteryResult/LosingLottery/index.wxml +3 -4
- package/miniprogram_dist/Lottery/components/LotteryResult/LosingLottery/index.wxss +4 -0
- package/miniprogram_dist/Lottery/components/LotteryResult/WinLottery/index.js +2 -1
- package/miniprogram_dist/Lottery/components/LotteryResult/WinLottery/index.wxml +2 -2
- package/miniprogram_dist/Lottery/components/LotteryResult/index.js +22 -22
- package/miniprogram_dist/Lottery/components/MerchantContactInfo/index.wxml +1 -1
- package/miniprogram_dist/Lottery/components/NobodyAttend/index.wxml +1 -1
- package/miniprogram_dist/Lottery/components/Winners/index.js +3 -1
- package/miniprogram_dist/Lottery/components/Winners/index.wxml +2 -1
- package/miniprogram_dist/Lottery/constants.js +2 -1
- package/miniprogram_dist/Lottery/store/reducer.js +6 -0
- package/miniprogram_dist/Lottery/utils.js +4 -0
- package/miniprogram_dist/PayModule/index/index.js +1 -0
- package/miniprogram_dist/SharePoster/PosterDom/index.js +37 -2
- package/miniprogram_dist/SharePoster/PosterDom/index.wxml +2 -2
- package/miniprogram_dist/SharePoster/PosterDom/index.wxss +3 -3
- package/miniprogram_dist/SharePoster/components/saveTip/index.js +40 -0
- package/miniprogram_dist/SharePoster/components/saveTip/index.json +5 -0
- package/miniprogram_dist/SharePoster/components/saveTip/index.less +0 -0
- package/miniprogram_dist/SharePoster/components/saveTip/index.wxml +6 -0
- package/miniprogram_dist/SharePoster/components/saveTip/index.wxss +21 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.js +38 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.json +5 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.less +0 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.wxml +9 -0
- package/miniprogram_dist/SharePoster/components/settingModal/index.wxss +45 -0
- package/miniprogram_dist/SharePoster/components/shareCircleTip/index.js +35 -0
- package/miniprogram_dist/SharePoster/components/shareCircleTip/index.json +5 -0
- package/miniprogram_dist/SharePoster/components/shareCircleTip/index.wxml +5 -0
- package/miniprogram_dist/SharePoster/components/shareCircleTip/index.wxss +35 -0
- package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.js +35 -0
- package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.json +5 -0
- package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.wxml +11 -0
- package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.wxss +51 -0
- package/miniprogram_dist/SharePoster/sharePopup/index.js +327 -5
- package/miniprogram_dist/SharePoster/sharePopup/index.json +5 -1
- package/miniprogram_dist/SharePoster/sharePopup/index.wxml +37 -28
- package/miniprogram_dist/SharePoster/sharePopup/index.wxss +27 -13
- package/miniprogram_dist/Sku/commSelect/index.js +6 -5
- package/miniprogram_dist/TeacherGoodsList/index.js +3 -3
- package/miniprogram_dist/common/api/confirmOrder.js +3 -3
- package/miniprogram_dist/common/api/pay.js +2 -2
- package/miniprogram_dist/common/api/payComplete.js +1 -1
- package/miniprogram_dist/common/api/sku.js +4 -4
- package/miniprogram_dist/common/utils/constants.js +2 -0
- package/miniprogram_dist/common/utils/helper.js +37 -6
- package/package.json +2 -2
- package/src/AliveInvite/LiveRoomVertical/index.js +1 -1
- package/src/AliveInvite/LiveRoomVertical/index.less +4 -4
- package/src/AliveInvite/LiveRoomVertical/index.wxss +4 -4
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +11 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.js +2 -20
- package/src/ConfirmOrder/components/GoodsInfo/index.js +2 -1
- package/src/ConfirmOrder/components/PickupSelect/index.less +18 -3
- package/src/ConfirmOrder/components/PickupSelect/index.wxml +4 -2
- package/src/ConfirmOrder/components/PickupSelect/index.wxss +17 -2
- package/src/GoodsItem/index.js +7 -23
- package/src/GoodsItem/index.wxml +2 -2
- package/src/LiveGoodsList/index.js +4 -4
- package/src/Lottery/components/AddressCollection/index.js +11 -8
- package/src/Lottery/components/CommonPopup/index.less +4 -4
- package/src/Lottery/components/CommonPopup/index.wxss +4 -4
- package/src/Lottery/components/LotteryInfo/index.js +17 -11
- package/src/Lottery/components/LotteryInfo/index.wxml +2 -2
- package/src/Lottery/components/LotteryPopups/index.js +19 -0
- package/src/Lottery/components/LotteryResult/LosingLottery/index.js +4 -1
- package/src/Lottery/components/LotteryResult/LosingLottery/index.less +4 -0
- package/src/Lottery/components/LotteryResult/LosingLottery/index.wxml +3 -4
- package/src/Lottery/components/LotteryResult/LosingLottery/index.wxss +4 -0
- package/src/Lottery/components/LotteryResult/WinLottery/index.js +2 -1
- package/src/Lottery/components/LotteryResult/WinLottery/index.wxml +2 -2
- package/src/Lottery/components/LotteryResult/index.js +22 -22
- package/src/Lottery/components/MerchantContactInfo/index.wxml +1 -1
- package/src/Lottery/components/NobodyAttend/index.wxml +1 -1
- package/src/Lottery/components/Winners/index.js +3 -1
- package/src/Lottery/components/Winners/index.wxml +2 -1
- package/src/Lottery/constants.js +2 -1
- package/src/Lottery/store/reducer.js +6 -0
- package/src/Lottery/utils.js +4 -0
- package/src/PayModule/index/index.js +1 -0
- package/src/SharePoster/PosterDom/index.js +37 -2
- package/src/SharePoster/PosterDom/index.wxml +2 -2
- package/src/SharePoster/PosterDom/index.wxss +3 -3
- package/src/SharePoster/components/saveTip/index.js +40 -0
- package/src/SharePoster/components/saveTip/index.json +5 -0
- package/src/SharePoster/components/saveTip/index.less +0 -0
- package/src/SharePoster/components/saveTip/index.wxml +6 -0
- package/src/SharePoster/components/saveTip/index.wxss +21 -0
- package/src/SharePoster/components/settingModal/index.js +38 -0
- package/src/SharePoster/components/settingModal/index.json +5 -0
- package/src/SharePoster/components/settingModal/index.less +0 -0
- package/src/SharePoster/components/settingModal/index.wxml +9 -0
- package/src/SharePoster/components/settingModal/index.wxss +46 -0
- package/src/SharePoster/components/shareCircleTip/index.js +35 -0
- package/src/SharePoster/components/shareCircleTip/index.json +5 -0
- package/src/SharePoster/components/shareCircleTip/index.wxml +5 -0
- package/src/SharePoster/components/shareCircleTip/index.wxss +35 -0
- package/src/SharePoster/components/unauthorizedModal/index.js +35 -0
- package/src/SharePoster/components/unauthorizedModal/index.json +5 -0
- package/src/SharePoster/components/unauthorizedModal/index.wxml +11 -0
- package/src/SharePoster/components/unauthorizedModal/index.wxss +52 -0
- package/src/SharePoster/sharePopup/index.js +327 -5
- package/src/SharePoster/sharePopup/index.json +5 -1
- package/src/SharePoster/sharePopup/index.wxml +37 -28
- package/src/SharePoster/sharePopup/index.wxss +27 -13
- package/src/Sku/commSelect/index.js +6 -5
- package/src/TeacherGoodsList/index.js +3 -3
- package/src/common/api/confirmOrder.js +3 -3
- package/src/common/api/pay.js +2 -2
- package/src/common/api/payComplete.js +1 -1
- package/src/common/api/sku.js +4 -4
- package/src/common/utils/constants.js +2 -0
- package/src/common/utils/helper.js +37 -6
package/.gitlab-ci.yml
CHANGED
|
@@ -3,7 +3,8 @@ build_test:
|
|
|
3
3
|
stage: build
|
|
4
4
|
only:
|
|
5
5
|
- dev
|
|
6
|
-
-
|
|
6
|
+
- feature/live_marketing_iteration
|
|
7
|
+
- fix/record-lottery
|
|
7
8
|
tags:
|
|
8
9
|
- fe-group-prod-runner-2
|
|
9
10
|
script:
|
|
@@ -13,7 +14,6 @@ build_test:
|
|
|
13
14
|
- export version=${version:2:$[${#version}-4]}
|
|
14
15
|
- export message=$(git log --pretty=format:%s -1)
|
|
15
16
|
- export author=$(git log --pretty=format:%an -1)
|
|
16
|
-
- if [ $CI_COMMIT_REF_NAME != "master" ] && [ $(echo $version | grep -E "r|t" ) != "" ]; then echo "正常发包"; else exit 0; fi
|
|
17
17
|
- cnpm i
|
|
18
18
|
- npm run build
|
|
19
19
|
- cnpm publish
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
border-radius: 16px 16px 0 0;
|
|
9
9
|
}
|
|
10
10
|
.scrollViewHeight{
|
|
11
|
-
height:calc(100vh -
|
|
11
|
+
height:calc(100vh - 636rpx);
|
|
12
12
|
}
|
|
13
13
|
.scrollViewDefaultHeight{
|
|
14
|
-
height:calc(100vh -
|
|
14
|
+
height:calc(100vh - 528rpx);
|
|
15
15
|
}
|
|
16
16
|
.smallModelViewDefaultHeight{
|
|
17
|
-
height:calc(100vh -
|
|
17
|
+
height:calc(100vh - 508rpx);
|
|
18
18
|
}
|
|
19
19
|
.smallModelVeiwHeight{
|
|
20
|
-
height:calc(100vh -
|
|
20
|
+
height:calc(100vh - 630rpx);
|
|
21
21
|
}
|
|
22
22
|
.scrollViewPackUpDefaultHeight{
|
|
23
23
|
height:calc(100vh - 468rpx);
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
border-radius: 16px 16px 0 0;
|
|
9
9
|
}
|
|
10
10
|
.scrollViewHeight {
|
|
11
|
-
height: calc(100vh -
|
|
11
|
+
height: calc(100vh - 636rpx);
|
|
12
12
|
}
|
|
13
13
|
.scrollViewDefaultHeight {
|
|
14
|
-
height: calc(100vh -
|
|
14
|
+
height: calc(100vh - 528rpx);
|
|
15
15
|
}
|
|
16
16
|
.smallModelViewDefaultHeight {
|
|
17
|
-
height: calc(100vh -
|
|
17
|
+
height: calc(100vh - 508rpx);
|
|
18
18
|
}
|
|
19
19
|
.smallModelVeiwHeight {
|
|
20
|
-
height: calc(100vh -
|
|
20
|
+
height: calc(100vh - 630rpx);
|
|
21
21
|
}
|
|
22
22
|
.scrollViewPackUpDefaultHeight {
|
|
23
23
|
height: calc(100vh - 468rpx);
|
|
@@ -219,6 +219,17 @@ Component({
|
|
|
219
219
|
},
|
|
220
220
|
},
|
|
221
221
|
observers: {
|
|
222
|
+
distributionMode(val) {
|
|
223
|
+
if (val === 1) {
|
|
224
|
+
this.setData({
|
|
225
|
+
express_type: val
|
|
226
|
+
})
|
|
227
|
+
} else if (val === 2) {
|
|
228
|
+
this.setData({
|
|
229
|
+
express_type: val
|
|
230
|
+
})
|
|
231
|
+
}
|
|
232
|
+
},
|
|
222
233
|
marketingData(marketingData) {
|
|
223
234
|
// 这里的逻辑应该是存在拼团的时候那么payment_type就要赋值为13,如果是限时折扣或者是单买的话,payment_type不做赋值默认为2
|
|
224
235
|
if (
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.js
|
|
2
2
|
const computedBehavior = require('miniprogram-computed').behavior
|
|
3
|
+
const {utils} = require("live-mp-tools");
|
|
3
4
|
|
|
4
5
|
Component({
|
|
5
6
|
behaviors: [computedBehavior],
|
|
@@ -51,28 +52,9 @@ Component({
|
|
|
51
52
|
},
|
|
52
53
|
computed: {
|
|
53
54
|
realSrc(data) {
|
|
54
|
-
|
|
55
55
|
// 腾讯云图片才会支持去压缩裁剪
|
|
56
56
|
if (data.src.indexOf("myqcloud") > 0 && data.showCompress) {
|
|
57
|
-
|
|
58
|
-
const curSrc = `${formatSrc.replace("file", "picsh")}?imageView2`;
|
|
59
|
-
const compressType = data.compressType ? `/${data.compressType}` : "";
|
|
60
|
-
const compressWidth = data.compressWidth
|
|
61
|
-
? `/w/${data.compressWidth}`
|
|
62
|
-
: "";
|
|
63
|
-
const compressHeight = data.compressHeight
|
|
64
|
-
? `/h/${data.compressHeight}`
|
|
65
|
-
: "";
|
|
66
|
-
const compress = data.compress ? `/q/${data.compress}` : "";
|
|
67
|
-
const format = data.format ? `/format/${data.format}` : "";
|
|
68
|
-
return (
|
|
69
|
-
curSrc +
|
|
70
|
-
compressType +
|
|
71
|
-
compressWidth +
|
|
72
|
-
compressHeight +
|
|
73
|
-
compress +
|
|
74
|
-
format
|
|
75
|
-
);
|
|
57
|
+
return utils.replaceCDN(data.src, `?imageView2/2/w/${data.compressWidth || 400}/h/${data.compressHeight || 400}/q/${data.compress || 100}`)
|
|
76
58
|
} else {
|
|
77
59
|
return data.src;
|
|
78
60
|
}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
SPECIAL_COLUMN,
|
|
16
16
|
E_BOOK,
|
|
17
17
|
TRAINING_CAMP,
|
|
18
|
+
SERVICE_GOODS,
|
|
18
19
|
SVIP_SPU_TYPE,
|
|
19
20
|
} from "../../../common/utils/constants";
|
|
20
21
|
import {
|
|
@@ -140,7 +141,7 @@ Component({
|
|
|
140
141
|
}
|
|
141
142
|
},
|
|
142
143
|
showStepper(data) {
|
|
143
|
-
let spuTypes = [ENTITY_GOODS, VALUE_COUPON];
|
|
144
|
+
let spuTypes = [ENTITY_GOODS, VALUE_COUPON, SERVICE_GOODS];
|
|
144
145
|
return (
|
|
145
146
|
(spuTypes.includes(data.baseInfo?.spu_type) || data.sendFriend) &&
|
|
146
147
|
!data.goodsInfo.is_goods_package
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
.pickup-select-content {
|
|
2
2
|
.van-cell__value {
|
|
3
3
|
flex: 3;
|
|
4
|
-
text-align: right;
|
|
5
4
|
}
|
|
6
|
-
.
|
|
7
|
-
|
|
5
|
+
.right {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: flex-end;
|
|
9
|
+
.custom-title {
|
|
10
|
+
max-width: 450rpx;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
text-overflow: ellipsis;
|
|
14
|
+
margin-left: 16rpx;
|
|
15
|
+
}
|
|
16
|
+
.custom-site {
|
|
17
|
+
max-width: 450rpx;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
text-overflow: ellipsis;
|
|
21
|
+
margin-left: 16rpx;
|
|
22
|
+
}
|
|
8
23
|
}
|
|
9
24
|
}
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
<view slot="title">
|
|
6
6
|
<van-tag color="#EBF1FF" text-color="#105CFB">自提</van-tag>
|
|
7
7
|
</view>
|
|
8
|
-
<view class="
|
|
9
|
-
|
|
8
|
+
<view class="right">
|
|
9
|
+
<view class="custom-title">{{ setPlace_name }}</view>
|
|
10
|
+
<view class="custom-site">{{ setPlace_area }}</view>
|
|
11
|
+
</view>
|
|
10
12
|
</van-cell>
|
|
11
13
|
</van-cell-group>
|
|
12
14
|
</view>
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
.pickup-select-content .van-cell__value {
|
|
2
2
|
flex: 3;
|
|
3
|
-
text-align: right;
|
|
4
3
|
}
|
|
5
|
-
.pickup-select-content .
|
|
4
|
+
.pickup-select-content .right {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: flex-end;
|
|
8
|
+
}
|
|
9
|
+
.pickup-select-content .right .custom-title {
|
|
10
|
+
max-width: 450rpx;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
text-overflow: ellipsis;
|
|
14
|
+
margin-left: 16rpx;
|
|
15
|
+
}
|
|
16
|
+
.pickup-select-content .right .custom-site {
|
|
17
|
+
max-width: 450rpx;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
text-overflow: ellipsis;
|
|
6
21
|
margin-left: 16rpx;
|
|
7
22
|
}
|
|
@@ -8,28 +8,9 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import {debounce} from "../common/utils/index"
|
|
10
10
|
import { getUserPermission, snapCheck } from "../common/api/liveGoodsList"
|
|
11
|
-
|
|
11
|
+
const {utils, sensorLog } = require("live-mp-tools");
|
|
12
12
|
|
|
13
13
|
const computedBehavior = require('miniprogram-computed').behavior
|
|
14
|
-
const SPU_TYPE = {
|
|
15
|
-
1:"ITX",
|
|
16
|
-
2:"ADO",
|
|
17
|
-
3:"VDO",
|
|
18
|
-
4:"LVE",
|
|
19
|
-
5:"MMB",
|
|
20
|
-
6:"SPC",
|
|
21
|
-
8:"BSC",
|
|
22
|
-
20:"EBK",
|
|
23
|
-
25:"TCP",
|
|
24
|
-
29:"OLC",
|
|
25
|
-
21:"ENT",
|
|
26
|
-
35:"BTK",
|
|
27
|
-
41:"VCP",
|
|
28
|
-
42:"OLP",
|
|
29
|
-
45:"ALC",
|
|
30
|
-
23:"SVP"
|
|
31
|
-
}
|
|
32
|
-
|
|
33
14
|
|
|
34
15
|
Component({
|
|
35
16
|
behaviors: [computedBehavior],
|
|
@@ -184,12 +165,12 @@ Component({
|
|
|
184
165
|
},
|
|
185
166
|
//销量/订阅。只有 实物商品 21 、专栏 6、大专栏 8、会员 5 展示,受B端店铺设置(hide_sub_count):隐藏商品销量控制 0-显示 1-隐藏
|
|
186
167
|
hasSaleNum(data){
|
|
187
|
-
return [21,6,8,5,41].indexOf(data.goodsItem.resource_type) > -1 && !data.goodsItem.hide_sub_count && data.goodsItem.order_num > 0
|
|
168
|
+
return [21,6,8,5,41,68].indexOf(data.goodsItem.resource_type) > -1 && !data.goodsItem.hide_sub_count && data.goodsItem.order_num > 0
|
|
188
169
|
},
|
|
189
170
|
//销量/订阅。只有 实物商品 21 、专栏 6、大专栏 8、会员 5 展示
|
|
190
171
|
saleNum(data){
|
|
191
172
|
//实物商品
|
|
192
|
-
if(data.goodsItem.resource_type === 21 || data.goodsItem.resource_type === 41){
|
|
173
|
+
if(data.goodsItem.resource_type === 21 || data.goodsItem.resource_type === 41 || data.goodsItem.resource_type === 68){
|
|
193
174
|
return ' 已售 ' + (data.goodsItem.order_num || 0)
|
|
194
175
|
} else if(data.goodsItem.resource_type === 6 || data.goodsItem.resource_type === 8 || data.goodsItem.resource_type === 5){
|
|
195
176
|
return ' 订阅 ' + (data.goodsItem.order_num || 0)
|
|
@@ -251,6 +232,9 @@ Component({
|
|
|
251
232
|
}else {
|
|
252
233
|
return ''
|
|
253
234
|
}
|
|
235
|
+
},
|
|
236
|
+
filterSrc(data){
|
|
237
|
+
return utils.replaceCDN(data.goodsItem.img_url, '?imageMogr2/thumbnail/400x400>/ignore-error/1')
|
|
254
238
|
}
|
|
255
239
|
},
|
|
256
240
|
/**
|
|
@@ -383,7 +367,7 @@ getUserPermission(){
|
|
|
383
367
|
spu_id: this.data.goodsItem.resource_id,
|
|
384
368
|
resource_type: this.data.goodsItem.resource_type,
|
|
385
369
|
resource_id: this.data.goodsItem.id,
|
|
386
|
-
spu_type:
|
|
370
|
+
spu_type: this.data.goodsItem.spu_type,
|
|
387
371
|
sku,
|
|
388
372
|
count: 1,
|
|
389
373
|
isAlive:1,
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
<image alt=""
|
|
16
16
|
class="goods-img"
|
|
17
17
|
mode="aspectFit"
|
|
18
|
-
src="{{
|
|
18
|
+
src="{{filterSrc}}" />
|
|
19
19
|
<text class="index">{{index + 1}}</text>
|
|
20
|
-
<text class="goods-type">{{goodsItem.
|
|
20
|
+
<text class="goods-type">{{goodsItem.resource_type_name}}</text>
|
|
21
21
|
<image wx:if="{{ isShowExamplaining }}" class="goods-explaining" src="../../common/assets/images/liveGoodsList/explaining.png" />
|
|
22
22
|
</view>
|
|
23
23
|
<view class="right">
|
|
@@ -260,7 +260,7 @@ Component({
|
|
|
260
260
|
this.setData({goodsInfo})
|
|
261
261
|
},
|
|
262
262
|
formatItem(e) {
|
|
263
|
-
e.resourceTypeName =
|
|
263
|
+
e.resourceTypeName = e.resource_type_name // 商品类型
|
|
264
264
|
e.leftStock = e.is_activity && e.now_stock ? e.now_stock : e.stock // 商品库存,活动中且有活动库存就用活动库存
|
|
265
265
|
// 处理未到活动时间的限时折扣
|
|
266
266
|
if (e.activity_type === 3) {
|
|
@@ -288,7 +288,7 @@ Component({
|
|
|
288
288
|
arr.push({
|
|
289
289
|
active: "",
|
|
290
290
|
price: e.price,
|
|
291
|
-
weight: e.price + 0.
|
|
291
|
+
weight: e.price + 0.0003,
|
|
292
292
|
})
|
|
293
293
|
// 活动管理、实物商品、有价优惠券、线下课和课时包不能设置活动库存,其他可以设置活动库存得需要判断是否还剩余活动库存;拼团也不能设置活动库存。
|
|
294
294
|
let notExistNowStock = [9, 21, 41, 29, 42].indexOf(e.resource_type) > -1
|
|
@@ -307,7 +307,7 @@ Component({
|
|
|
307
307
|
//判断超级会员价
|
|
308
308
|
active: "超级会员",
|
|
309
309
|
price: e.svip_price,
|
|
310
|
-
weight: e.svip_price + 0.
|
|
310
|
+
weight: e.svip_price + 0.0002,
|
|
311
311
|
})
|
|
312
312
|
arr.sort((a, b) => a.weight - b.weight)
|
|
313
313
|
let svipAllFree = e.resource_rights_type === 1
|
|
@@ -325,7 +325,7 @@ Component({
|
|
|
325
325
|
}
|
|
326
326
|
e.priceLineShowInt = this.priceInt(e.priceLine) // 展示划线价的整数部分
|
|
327
327
|
e.priceLineShowFlow = this.priceFlow(e.priceLine) // 展示划线的小数部分
|
|
328
|
-
e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41) && e.show_stock // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
|
|
328
|
+
e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41 || e.resource_type === 68) && e.show_stock // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
|
|
329
329
|
e.hasStock = [29,35].indexOf(e.resource_type) > -1 || e.entityShowStock || e.now_stock // 班课、线下课、实物商品、体验课、有活动库存,满足其一即展示库存
|
|
330
330
|
},
|
|
331
331
|
priceInt(val){
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {connect} from '../../store/index'
|
|
2
|
-
import {toast} from '../../utils'
|
|
2
|
+
import {toast, hasKey} from '../../utils'
|
|
3
3
|
|
|
4
4
|
const computedBehavior = require('miniprogram-computed').behavior
|
|
5
5
|
|
|
@@ -8,6 +8,8 @@ const mapState = state => ({
|
|
|
8
8
|
addressInfo: state.addressInfo,
|
|
9
9
|
addressSubmitCallback: state.addressSubmitCallback
|
|
10
10
|
})
|
|
11
|
+
|
|
12
|
+
|
|
11
13
|
Component(
|
|
12
14
|
connect(mapState)({
|
|
13
15
|
behaviors: [computedBehavior],
|
|
@@ -20,7 +22,11 @@ Component(
|
|
|
20
22
|
return Object.keys(data.addressQuery).length > 0
|
|
21
23
|
},
|
|
22
24
|
isAddressInfoReady(data) {
|
|
23
|
-
|
|
25
|
+
const { addressInfo } = data
|
|
26
|
+
if(addressInfo.express_type === 2) {
|
|
27
|
+
return hasKey(addressInfo.pickerUserInfo) && hasKey(addressInfo.picksiteInfo)
|
|
28
|
+
}
|
|
29
|
+
return hasKey(addressInfo.addressInfo)
|
|
24
30
|
}
|
|
25
31
|
},
|
|
26
32
|
observers: {},
|
|
@@ -45,16 +51,13 @@ Component(
|
|
|
45
51
|
onStateChange({detail: isEntry}) {
|
|
46
52
|
this.setData({isEntry})
|
|
47
53
|
},
|
|
48
|
-
hasKey(obj) {
|
|
49
|
-
return obj && Object.keys(obj).length > 0
|
|
50
|
-
},
|
|
51
54
|
validateSubmitInfo() {
|
|
52
55
|
const info = this.data.addressInfo
|
|
53
|
-
if (info.express_type === 1 && !
|
|
56
|
+
if (info.express_type === 1 && !hasKey(info.addressInfo)) {
|
|
54
57
|
toast('请先添加收货地址')
|
|
55
58
|
return false
|
|
56
59
|
}
|
|
57
|
-
if (info.express_type === 2 && !(
|
|
60
|
+
if (info.express_type === 2 && !(hasKey(info.pickerUserInfo) && hasKey(info.picksiteInfo))) {
|
|
58
61
|
toast('请完善提货信息')
|
|
59
62
|
return false
|
|
60
63
|
}
|
|
@@ -67,4 +70,4 @@ Component(
|
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
})
|
|
70
|
-
)
|
|
73
|
+
)
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
&.red {
|
|
18
18
|
// 红色背景的抽奖弹窗顶部超出一部分,高度特殊计算
|
|
19
19
|
overflow: hidden;
|
|
20
|
-
height: calc(100% -
|
|
20
|
+
height: calc(100% - 320rpx);
|
|
21
21
|
background: transparent !important;
|
|
22
22
|
.close-icon {
|
|
23
23
|
top: 136rpx;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
&.orange {
|
|
40
|
-
height: calc(100% -
|
|
40
|
+
height: calc(100% - 422rpx);
|
|
41
41
|
background: transparent !important;
|
|
42
42
|
.close-icon {
|
|
43
43
|
top: 24rpx;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
&.white {
|
|
51
|
-
height: calc(100% -
|
|
51
|
+
height: calc(100% - 422rpx);
|
|
52
52
|
background: #fff;
|
|
53
53
|
.close-icon {
|
|
54
54
|
top: 24rpx;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
// custom-classes
|
|
62
62
|
&.address-collection-popup {
|
|
63
|
-
height: calc(100% -
|
|
63
|
+
height: calc(100% - 422rpx);
|
|
64
64
|
background: #f5f5f5;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
.common-popup.red {
|
|
17
17
|
overflow: hidden;
|
|
18
|
-
height: calc(100% -
|
|
18
|
+
height: calc(100% - 320rpx);
|
|
19
19
|
background: transparent !important;
|
|
20
20
|
}
|
|
21
21
|
.common-popup.red .close-icon {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
background: linear-gradient(to right, #FE8758, #FE9656);
|
|
35
35
|
}
|
|
36
36
|
.common-popup.orange {
|
|
37
|
-
height: calc(100% -
|
|
37
|
+
height: calc(100% - 422rpx);
|
|
38
38
|
background: transparent !important;
|
|
39
39
|
}
|
|
40
40
|
.common-popup.orange .close-icon {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
left: 0;
|
|
46
46
|
}
|
|
47
47
|
.common-popup.white {
|
|
48
|
-
height: calc(100% -
|
|
48
|
+
height: calc(100% - 422rpx);
|
|
49
49
|
background: #fff;
|
|
50
50
|
}
|
|
51
51
|
.common-popup.white .close-icon {
|
|
@@ -56,6 +56,6 @@
|
|
|
56
56
|
height: 240rpx;
|
|
57
57
|
}
|
|
58
58
|
.common-popup.address-collection-popup {
|
|
59
|
-
height: calc(100% -
|
|
59
|
+
height: calc(100% - 422rpx);
|
|
60
60
|
background: #f5f5f5;
|
|
61
61
|
}
|
|
@@ -20,13 +20,14 @@ Component(
|
|
|
20
20
|
data: {
|
|
21
21
|
remotePic,
|
|
22
22
|
prizeInfo: {},
|
|
23
|
-
selectedIndex: 0
|
|
23
|
+
selectedIndex: 0,
|
|
24
|
+
isShowParticipant: 0 //0 不展示,1 展示
|
|
24
25
|
},
|
|
25
26
|
computed: {
|
|
26
27
|
countdownLabel(data) {
|
|
27
28
|
return `${
|
|
28
29
|
data.prizeInfo.prize_activity_num ? `${data.prizeInfo.prize_activity_num}人已参与` : '暂无人参与'
|
|
29
|
-
}
|
|
30
|
+
}`
|
|
30
31
|
},
|
|
31
32
|
joinPrompt(data) {
|
|
32
33
|
const joinBtnMap = {
|
|
@@ -108,7 +109,9 @@ Component(
|
|
|
108
109
|
if (data.code === 0) {
|
|
109
110
|
const prizeInfo = data.data || {}
|
|
110
111
|
this.setData({prizeInfo})
|
|
112
|
+
this.setData({isShowParticipant: prizeInfo.is_show_participant})
|
|
111
113
|
this.store.dispatch({type: 'set_participation_condition', payload: prizeInfo.prize_condition})
|
|
114
|
+
this.store.dispatch({type: 'is_show_participant', payload: prizeInfo.is_show_participant})
|
|
112
115
|
}
|
|
113
116
|
})
|
|
114
117
|
.catch(err => {
|
|
@@ -124,22 +127,25 @@ Component(
|
|
|
124
127
|
app_id: this.data.baseInfo.app_id, // 店铺id
|
|
125
128
|
alive_id: this.data.baseInfo.alive_id,
|
|
126
129
|
user_id: this.data.baseInfo.user_id,
|
|
127
|
-
prize_id: this.data.prizeInfo.prize_id
|
|
130
|
+
prize_id: this.data.prizeInfo.prize_id,
|
|
131
|
+
type: 1
|
|
128
132
|
}
|
|
129
133
|
joinCommentLottery(params)
|
|
130
134
|
.then(({data}) => {
|
|
131
|
-
if (data.code
|
|
132
|
-
|
|
133
|
-
this.store.dispatch({type: 'hide_lottery_info'})
|
|
134
|
-
if (prizeCondition === PARTICIPATION_CONDITION.SPECIFY_COMMENT) {
|
|
135
|
-
eventBus.emit('input_change', this.data.lotteryInfo.prize_param.ext.content)
|
|
136
|
-
}
|
|
137
|
-
eventBus.emit('input_focus')
|
|
135
|
+
if (data.code !== 0) {
|
|
136
|
+
return Promise.reject(data);
|
|
138
137
|
}
|
|
139
138
|
})
|
|
140
139
|
.catch(err => {
|
|
141
140
|
console.error(err)
|
|
142
|
-
})
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
this.store.dispatch({type: 'set_is_ready_to_comment', payload: true})
|
|
144
|
+
this.store.dispatch({type: 'hide_lottery_info'})
|
|
145
|
+
if (prizeCondition === PARTICIPATION_CONDITION.SPECIFY_COMMENT) {
|
|
146
|
+
eventBus.emit('input_change', this.data.lotteryInfo.prize_param.ext.content)
|
|
147
|
+
}
|
|
148
|
+
eventBus.emit('input_focus')
|
|
143
149
|
return
|
|
144
150
|
}
|
|
145
151
|
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
<image class="right-arrow-icon" src="../../../common/assets/images/lottery/white_right_arrow.png" />
|
|
10
10
|
</view>
|
|
11
11
|
</block>
|
|
12
|
-
<text wx:else
|
|
12
|
+
<text wx:else>本次抽奖无人中奖</text>
|
|
13
13
|
</view>
|
|
14
14
|
<view wx:else class="countdown-box">
|
|
15
|
-
<text class="label">{{countdownLabel}}
|
|
15
|
+
<text class="label" wx:if="{{isShowParticipant}}">{{countdownLabel}},</text><text class="label">开奖倒计时</text>
|
|
16
16
|
<lottery-countdown></lottery-countdown>
|
|
17
17
|
</view>
|
|
18
18
|
<view class="prize-box">
|
|
@@ -8,6 +8,7 @@ import {connect} from '../../store/index'
|
|
|
8
8
|
import {
|
|
9
9
|
fetchLotteryInfo, participateLottery, drawLottery, joinLottery
|
|
10
10
|
} from '../../store/effect'
|
|
11
|
+
import {joinCommentLottery} from '../../../common/api/lottery'
|
|
11
12
|
import eventBus from '../../eventBus'
|
|
12
13
|
import countdownInstance from '../../countdown'
|
|
13
14
|
|
|
@@ -82,6 +83,22 @@ Component(
|
|
|
82
83
|
.catch(cancel)
|
|
83
84
|
})
|
|
84
85
|
},
|
|
86
|
+
// 记录点击按钮状态,作为参与评论抽奖的前置条件(必须满足条件: 1.点击了按钮 2.发送评论)
|
|
87
|
+
recordLotteryJoin(type) {
|
|
88
|
+
joinCommentLottery({
|
|
89
|
+
app_id: this.data.baseInfo.app_id, // 店铺id
|
|
90
|
+
alive_id: this.data.baseInfo.alive_id,
|
|
91
|
+
user_id: this.data.baseInfo.user_id,
|
|
92
|
+
prize_id: this.data.lotteryInfo.current_prize_id,
|
|
93
|
+
type
|
|
94
|
+
})
|
|
95
|
+
.then(res=>{
|
|
96
|
+
if(res.code !== 0) {
|
|
97
|
+
return Promise.reject(res);
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
.catch(console.error)
|
|
101
|
+
},
|
|
85
102
|
onSelfContentMsg() {
|
|
86
103
|
getApp().globalData.$im.on(MSG_EVENT.GET_CONTENT_MSG, msg => {
|
|
87
104
|
console.log('dispatch 监听所有content msg: ', msg)
|
|
@@ -91,9 +108,11 @@ Component(
|
|
|
91
108
|
|
|
92
109
|
if (this.isAnyCommentCondition()) {
|
|
93
110
|
this.store.dispatch(participateLottery())
|
|
111
|
+
this.recordLotteryJoin(2)
|
|
94
112
|
} else if (this.isSpecifyCommentCondition()) {
|
|
95
113
|
if (msg.msg_content === this.data.lotteryInfo.prize_param.ext.content) {
|
|
96
114
|
this.store.dispatch(participateLottery())
|
|
115
|
+
this.recordLotteryJoin(2)
|
|
97
116
|
}
|
|
98
117
|
}
|
|
99
118
|
})
|
|
@@ -3,7 +3,10 @@ import {connect} from '../../../store/index'
|
|
|
3
3
|
|
|
4
4
|
const computedBehavior = require('miniprogram-computed').behavior
|
|
5
5
|
|
|
6
|
-
const mapState = state => ({
|
|
6
|
+
const mapState = state => ({
|
|
7
|
+
lotteryInfo: state.lotteryInfo,
|
|
8
|
+
isShowParticipant: state.isShowParticipant
|
|
9
|
+
})
|
|
7
10
|
Component(
|
|
8
11
|
connect(mapState)({
|
|
9
12
|
behaviors: [computedBehavior],
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
<image class="losing-icon" mode="widthFix" src="{{remotePic.losing_lottery}}" />
|
|
7
7
|
<view class="check-winners">
|
|
8
8
|
<block wx:if="{{resultInfo.prize_activity_num}}">
|
|
9
|
-
<text>共{{resultInfo.prize_activity_num}}人参与,</text>
|
|
9
|
+
<text wx:if="{{isShowParticipant}}">共{{resultInfo.prize_activity_num}}人参与,</text>
|
|
10
10
|
<view class="inner" bind:tap="checkWinners">
|
|
11
|
-
<text>查看中奖名单</text>
|
|
12
|
-
<image class="right-arrow-icon" src="../../../../common/assets/images/lottery/black-right-arrow.png" />
|
|
11
|
+
<text class="inner-under-line">查看中奖名单</text>
|
|
13
12
|
</view>
|
|
14
13
|
</block>
|
|
15
|
-
<text wx:else
|
|
14
|
+
<text wx:else>本次抽奖无人中奖</text>
|
|
16
15
|
</view>
|
|
17
16
|
</view>
|
|
@@ -38,6 +38,10 @@
|
|
|
38
38
|
display: inline-flex;
|
|
39
39
|
align-items: center;
|
|
40
40
|
}
|
|
41
|
+
.losing-lottery .check-winners .inner .inner-under-line {
|
|
42
|
+
text-decoration: underline;
|
|
43
|
+
color: #2d8cf0;
|
|
44
|
+
}
|
|
41
45
|
.losing-lottery .check-winners .inner .right-arrow-icon {
|
|
42
46
|
width: 40rpx;
|
|
43
47
|
height: 40rpx;
|
|
@@ -13,7 +13,8 @@ const computedBehavior = require('miniprogram-computed').behavior
|
|
|
13
13
|
const mapState = state => ({
|
|
14
14
|
baseInfo: state.baseInfo,
|
|
15
15
|
lotteryStatus: state.lotteryStatus,
|
|
16
|
-
participationCondition: state.participationCondition
|
|
16
|
+
participationCondition: state.participationCondition,
|
|
17
|
+
isShowParticipant: state.isShowParticipant
|
|
17
18
|
})
|
|
18
19
|
Component(
|
|
19
20
|
connect(mapState)({
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<image class="title" src="{{remotePic.winner_background_new_title}}" />
|
|
3
3
|
<view class="check-winners">
|
|
4
4
|
<block wx:if="{{resultInfo.prize_activity_num}}">
|
|
5
|
-
<text>共{{resultInfo.prize_activity_num}}人参与,</text>
|
|
5
|
+
<text wx:if="{{isShowParticipant}}">共{{resultInfo.prize_activity_num}}人参与,</text>
|
|
6
6
|
<view class="inner" bind:tap="checkWinners">
|
|
7
7
|
<text>查看中奖名单</text>
|
|
8
8
|
<image class="right-arrow-icon" src="../../../../common/assets/images/lottery/white_right_arrow.png" />
|
|
9
9
|
</view>
|
|
10
10
|
</block>
|
|
11
|
-
<text wx:else
|
|
11
|
+
<text wx:else>本次抽奖无人中奖</text>
|
|
12
12
|
</view>
|
|
13
13
|
<view class="prize-card-box">
|
|
14
14
|
<prize-card prize="{{resultInfo.win_product_info}}"></prize-card>
|