xiaoe_mp_npm 0.2.3-t220110 → 0.2.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.
Files changed (144) hide show
  1. package/.gitlab-ci.yml +2 -2
  2. package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.js +1 -1
  3. package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.less +4 -4
  4. package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.wxss +4 -4
  5. package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.js +11 -0
  6. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/ImageData/index.js +2 -20
  7. package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.js +2 -1
  8. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.less +18 -3
  9. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.wxml +4 -2
  10. package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.wxss +17 -2
  11. package/miniprogram_dist/CouponList/components/CouponItem/index.js +2 -1
  12. package/miniprogram_dist/CouponList/couponColumn/index.js +3 -0
  13. package/miniprogram_dist/CouponList/couponColumn/index.wxml +1 -0
  14. package/miniprogram_dist/GoodsItem/index.js +7 -23
  15. package/miniprogram_dist/GoodsItem/index.wxml +2 -2
  16. package/miniprogram_dist/LiveGoodsList/index.js +8 -4
  17. package/miniprogram_dist/LiveGoodsList/index.wxml +2 -2
  18. package/miniprogram_dist/Lottery/components/AddressCollection/index.js +11 -8
  19. package/miniprogram_dist/Lottery/components/CommonPopup/index.less +4 -4
  20. package/miniprogram_dist/Lottery/components/CommonPopup/index.wxss +4 -4
  21. package/miniprogram_dist/Lottery/components/LotteryInfo/index.js +17 -11
  22. package/miniprogram_dist/Lottery/components/LotteryInfo/index.wxml +2 -2
  23. package/miniprogram_dist/Lottery/components/LotteryPopups/index.js +19 -0
  24. package/miniprogram_dist/Lottery/components/LotteryResult/LosingLottery/index.js +4 -1
  25. package/miniprogram_dist/Lottery/components/LotteryResult/LosingLottery/index.less +4 -0
  26. package/miniprogram_dist/Lottery/components/LotteryResult/LosingLottery/index.wxml +3 -4
  27. package/miniprogram_dist/Lottery/components/LotteryResult/LosingLottery/index.wxss +4 -0
  28. package/miniprogram_dist/Lottery/components/LotteryResult/WinLottery/index.js +2 -1
  29. package/miniprogram_dist/Lottery/components/LotteryResult/WinLottery/index.wxml +2 -2
  30. package/miniprogram_dist/Lottery/components/LotteryResult/index.js +22 -22
  31. package/miniprogram_dist/Lottery/components/MerchantContactInfo/index.wxml +1 -1
  32. package/miniprogram_dist/Lottery/components/NobodyAttend/index.wxml +1 -1
  33. package/miniprogram_dist/Lottery/components/Winners/index.js +3 -1
  34. package/miniprogram_dist/Lottery/components/Winners/index.wxml +2 -1
  35. package/miniprogram_dist/Lottery/constants.js +2 -1
  36. package/miniprogram_dist/Lottery/store/reducer.js +6 -0
  37. package/miniprogram_dist/Lottery/utils.js +4 -0
  38. package/miniprogram_dist/PayModule/index/index.js +1 -0
  39. package/miniprogram_dist/SharePoster/PosterDom/index.js +37 -2
  40. package/miniprogram_dist/SharePoster/PosterDom/index.wxml +2 -2
  41. package/miniprogram_dist/SharePoster/PosterDom/index.wxss +3 -3
  42. package/miniprogram_dist/SharePoster/components/saveTip/index.js +40 -0
  43. package/miniprogram_dist/SharePoster/components/saveTip/index.json +5 -0
  44. package/miniprogram_dist/SharePoster/components/saveTip/index.less +0 -0
  45. package/miniprogram_dist/SharePoster/components/saveTip/index.wxml +6 -0
  46. package/miniprogram_dist/SharePoster/components/saveTip/index.wxss +21 -0
  47. package/miniprogram_dist/SharePoster/components/settingModal/index.js +38 -0
  48. package/miniprogram_dist/SharePoster/components/settingModal/index.json +5 -0
  49. package/miniprogram_dist/SharePoster/components/settingModal/index.less +0 -0
  50. package/miniprogram_dist/SharePoster/components/settingModal/index.wxml +9 -0
  51. package/miniprogram_dist/SharePoster/components/settingModal/index.wxss +45 -0
  52. package/miniprogram_dist/SharePoster/components/shareCircleTip/index.js +35 -0
  53. package/miniprogram_dist/SharePoster/components/shareCircleTip/index.json +5 -0
  54. package/miniprogram_dist/SharePoster/components/shareCircleTip/index.wxml +5 -0
  55. package/miniprogram_dist/SharePoster/components/shareCircleTip/index.wxss +35 -0
  56. package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.js +35 -0
  57. package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.json +5 -0
  58. package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.wxml +11 -0
  59. package/miniprogram_dist/SharePoster/components/unauthorizedModal/index.wxss +51 -0
  60. package/miniprogram_dist/SharePoster/sharePopup/index.js +327 -5
  61. package/miniprogram_dist/SharePoster/sharePopup/index.json +5 -1
  62. package/miniprogram_dist/SharePoster/sharePopup/index.wxml +37 -28
  63. package/miniprogram_dist/SharePoster/sharePopup/index.wxss +27 -13
  64. package/miniprogram_dist/Sku/commSelect/index.js +2 -1
  65. package/miniprogram_dist/Sku/index/index.js +2 -1
  66. package/miniprogram_dist/TeacherGoodsList/index.js +3 -3
  67. package/miniprogram_dist/common/api/confirmOrder.js +3 -3
  68. package/miniprogram_dist/common/api/pay.js +2 -2
  69. package/miniprogram_dist/common/api/payComplete.js +1 -1
  70. package/miniprogram_dist/common/api/sku.js +4 -4
  71. package/miniprogram_dist/common/utils/constants.js +2 -0
  72. package/miniprogram_dist/common/utils/helper.js +2 -1
  73. package/package.json +2 -2
  74. package/src/AliveInvite/LiveRoomVertical/index.js +1 -1
  75. package/src/AliveInvite/LiveRoomVertical/index.less +4 -4
  76. package/src/AliveInvite/LiveRoomVertical/index.wxss +4 -4
  77. package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +11 -0
  78. package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.js +2 -20
  79. package/src/ConfirmOrder/components/GoodsInfo/index.js +2 -1
  80. package/src/ConfirmOrder/components/PickupSelect/index.less +18 -3
  81. package/src/ConfirmOrder/components/PickupSelect/index.wxml +4 -2
  82. package/src/ConfirmOrder/components/PickupSelect/index.wxss +17 -2
  83. package/src/CouponList/components/CouponItem/index.js +2 -1
  84. package/src/CouponList/couponColumn/index.js +3 -0
  85. package/src/CouponList/couponColumn/index.wxml +1 -0
  86. package/src/GoodsItem/index.js +7 -23
  87. package/src/GoodsItem/index.wxml +2 -2
  88. package/src/LiveGoodsList/index.js +8 -4
  89. package/src/LiveGoodsList/index.wxml +2 -2
  90. package/src/Lottery/components/AddressCollection/index.js +11 -8
  91. package/src/Lottery/components/CommonPopup/index.less +4 -4
  92. package/src/Lottery/components/CommonPopup/index.wxss +4 -4
  93. package/src/Lottery/components/LotteryInfo/index.js +17 -11
  94. package/src/Lottery/components/LotteryInfo/index.wxml +2 -2
  95. package/src/Lottery/components/LotteryPopups/index.js +19 -0
  96. package/src/Lottery/components/LotteryResult/LosingLottery/index.js +4 -1
  97. package/src/Lottery/components/LotteryResult/LosingLottery/index.less +4 -0
  98. package/src/Lottery/components/LotteryResult/LosingLottery/index.wxml +3 -4
  99. package/src/Lottery/components/LotteryResult/LosingLottery/index.wxss +4 -0
  100. package/src/Lottery/components/LotteryResult/WinLottery/index.js +2 -1
  101. package/src/Lottery/components/LotteryResult/WinLottery/index.wxml +2 -2
  102. package/src/Lottery/components/LotteryResult/index.js +22 -22
  103. package/src/Lottery/components/MerchantContactInfo/index.wxml +1 -1
  104. package/src/Lottery/components/NobodyAttend/index.wxml +1 -1
  105. package/src/Lottery/components/Winners/index.js +3 -1
  106. package/src/Lottery/components/Winners/index.wxml +2 -1
  107. package/src/Lottery/constants.js +2 -1
  108. package/src/Lottery/store/reducer.js +6 -0
  109. package/src/Lottery/utils.js +4 -0
  110. package/src/PayModule/index/index.js +1 -0
  111. package/src/SharePoster/PosterDom/index.js +37 -2
  112. package/src/SharePoster/PosterDom/index.wxml +2 -2
  113. package/src/SharePoster/PosterDom/index.wxss +3 -3
  114. package/src/SharePoster/components/saveTip/index.js +40 -0
  115. package/src/SharePoster/components/saveTip/index.json +5 -0
  116. package/src/SharePoster/components/saveTip/index.less +0 -0
  117. package/src/SharePoster/components/saveTip/index.wxml +6 -0
  118. package/src/SharePoster/components/saveTip/index.wxss +21 -0
  119. package/src/SharePoster/components/settingModal/index.js +38 -0
  120. package/src/SharePoster/components/settingModal/index.json +5 -0
  121. package/src/SharePoster/components/settingModal/index.less +0 -0
  122. package/src/SharePoster/components/settingModal/index.wxml +9 -0
  123. package/src/SharePoster/components/settingModal/index.wxss +46 -0
  124. package/src/SharePoster/components/shareCircleTip/index.js +35 -0
  125. package/src/SharePoster/components/shareCircleTip/index.json +5 -0
  126. package/src/SharePoster/components/shareCircleTip/index.wxml +5 -0
  127. package/src/SharePoster/components/shareCircleTip/index.wxss +35 -0
  128. package/src/SharePoster/components/unauthorizedModal/index.js +35 -0
  129. package/src/SharePoster/components/unauthorizedModal/index.json +5 -0
  130. package/src/SharePoster/components/unauthorizedModal/index.wxml +11 -0
  131. package/src/SharePoster/components/unauthorizedModal/index.wxss +52 -0
  132. package/src/SharePoster/sharePopup/index.js +327 -5
  133. package/src/SharePoster/sharePopup/index.json +5 -1
  134. package/src/SharePoster/sharePopup/index.wxml +37 -28
  135. package/src/SharePoster/sharePopup/index.wxss +27 -13
  136. package/src/Sku/commSelect/index.js +2 -1
  137. package/src/Sku/index/index.js +2 -1
  138. package/src/TeacherGoodsList/index.js +3 -3
  139. package/src/common/api/confirmOrder.js +3 -3
  140. package/src/common/api/pay.js +2 -2
  141. package/src/common/api/payComplete.js +1 -1
  142. package/src/common/api/sku.js +4 -4
  143. package/src/common/utils/constants.js +2 -0
  144. package/src/common/utils/helper.js +2 -1
package/.gitlab-ci.yml CHANGED
@@ -3,7 +3,8 @@ build_test:
3
3
  stage: build
4
4
  only:
5
5
  - dev
6
- - dev-gwenniezhou
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
@@ -185,7 +185,7 @@ Component({
185
185
  this.getTopInviter()
186
186
  const timer = setInterval(() => {
187
187
  this.getTopInviter()
188
- }, 2000)
188
+ }, 30*1000)
189
189
  this.timer = timer;
190
190
  },
191
191
  // 获取邀请用户排名列表
@@ -8,16 +8,16 @@
8
8
  border-radius: 16px 16px 0 0;
9
9
  }
10
10
  .scrollViewHeight{
11
- height:calc(100vh - 704rpx);
11
+ height:calc(100vh - 636rpx);
12
12
  }
13
13
  .scrollViewDefaultHeight{
14
- height:calc(100vh - 596rpx);
14
+ height:calc(100vh - 528rpx);
15
15
  }
16
16
  .smallModelViewDefaultHeight{
17
- height:calc(100vh - 576rpx);
17
+ height:calc(100vh - 508rpx);
18
18
  }
19
19
  .smallModelVeiwHeight{
20
- height:calc(100vh - 698rpx);
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 - 704rpx);
11
+ height: calc(100vh - 636rpx);
12
12
  }
13
13
  .scrollViewDefaultHeight {
14
- height: calc(100vh - 596rpx);
14
+ height: calc(100vh - 528rpx);
15
15
  }
16
16
  .smallModelViewDefaultHeight {
17
- height: calc(100vh - 576rpx);
17
+ height: calc(100vh - 508rpx);
18
18
  }
19
19
  .smallModelVeiwHeight {
20
- height: calc(100vh - 698rpx);
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
- const formatSrc = data.src.replace(/^http:/, "https:");
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
- .custom-title {
7
- margin-left: 16rpx;
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="custom-title">{{ setPlace_name }}</view>
9
- <view class="custom-site">{{ setPlace_area }}</view>
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 .custom-title {
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
  }
@@ -19,7 +19,8 @@ Component({
19
19
  },
20
20
  couponType: {
21
21
  // 优惠券 couponType: 1-领取 2-继续领 3-已领完 4-已过期(领取失败) 5-已结束 6-已达上限 7、已失效
22
- type: [Number, String],
22
+ type: Number,
23
+ optionalTypes: [String],
23
24
  value: 1
24
25
  },
25
26
  aliveInfo: { // 直播间信息
@@ -57,6 +57,9 @@ Component({
57
57
  },
58
58
  showPopup() {
59
59
  this.triggerEvent('showPopup')
60
+ },
61
+ receivedSuccess() {
62
+ this.triggerEvent('receivedSuccess')
60
63
  }
61
64
  }
62
65
  })
@@ -17,6 +17,7 @@
17
17
  aliveInfo="{{aliveInfo}}"
18
18
  catch:showPopup="showPopup"
19
19
  sensorReportParams="{{sensorReportParams}}"
20
+ bindreceivedSuccess="receivedSuccess"
20
21
  />
21
22
  </view>
22
23
  </view >
@@ -8,28 +8,9 @@
8
8
  */
9
9
  import {debounce} from "../common/utils/index"
10
10
  import { getUserPermission, snapCheck } from "../common/api/liveGoodsList"
11
- import { sensorLog } from "live-mp-tools";
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: SPU_TYPE[this.data.goodsItem.resource_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="{{goodsItem.img_url}}" />
18
+ src="{{filterSrc}}" />
19
19
  <text class="index">{{index + 1}}</text>
20
- <text class="goods-type">{{goodsItem.resourceTypeName}}</text>
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 = SPU_TYPE[e.resource_type] // 商品类型
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.0002,
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.0003,
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){
@@ -353,6 +353,10 @@ Component({
353
353
  showInfoCollection(){
354
354
  this.triggerEvent("showInfoCollection")
355
355
  },
356
+ // 领取成功优惠券上报热度
357
+ receivedSuccess() {
358
+ this.triggerEvent("receivedSuccess")
359
+ },
356
360
  closePop(){
357
361
  this.setData({
358
362
  componentsState: this.data.componentsState + 1
@@ -11,7 +11,7 @@
11
11
  <view>
12
12
  <custom-popup
13
13
  showPopup="{{ show }}"
14
- customStyle="height: calc(100% - 494rpx);"
14
+ customStyle="height: calc(100% - 422rpx);"
15
15
  bind:close="closePop"
16
16
  overlay="{{false}}">
17
17
  <view slot="header">
@@ -23,7 +23,7 @@
23
23
  <!-- 商品列表 start-->
24
24
  <scroll-view class="goods-list" scroll-y="true" bindscrolltolower="onScrolltolower" refresher-triggered="{{refreshing}}" bindrefresherrefresh="onLoad" refresher-enabled="{{true}}">
25
25
  <!-- 优惠券列表 start -->
26
- <coupon-list aliveInfo="{{ aliveInfo }}" bind:showPopup="showInfoCollection" sensorReportParams="{{sensorReportParams}}"></coupon-list>
26
+ <coupon-list aliveInfo="{{ aliveInfo }}" bind:showPopup="showInfoCollection" bind:receivedSuccess="receivedSuccess" sensorReportParams="{{sensorReportParams}}"></coupon-list>
27
27
  <!-- 优惠券列表 end -->
28
28
  <!-- 讲解中的商品 start -->
29
29
  <block wx:if="{{showExplainingGoods}}">
@@ -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
- return data.addressInfo.addressInfo && Object.keys(data.addressInfo.addressInfo).length > 0;
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 && !this.hasKey(info.addressInfo)) {
56
+ if (info.express_type === 1 && !hasKey(info.addressInfo)) {
54
57
  toast('请先添加收货地址')
55
58
  return false
56
59
  }
57
- if (info.express_type === 2 && !(this.hasKey(info.pickerUserInfo) && this.hasKey(info.picksiteInfo))) {
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% - 388rpx);
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% - 490rpx);
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% - 490rpx);
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% - 490rpx);
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% - 388rpx);
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% - 490rpx);
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% - 490rpx);
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% - 490rpx);
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 === 0) {
132
- this.store.dispatch({type: 'set_is_ready_to_comment', payload: true})
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>本次抽奖无人参与</text>
12
+ <text wx:else>本次抽奖无人中奖</text>
13
13
  </view>
14
14
  <view wx:else class="countdown-box">
15
- <text class="label">{{countdownLabel}}</text>
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 => ({lotteryInfo: state.lotteryInfo})
6
+ const mapState = state => ({
7
+ lotteryInfo: state.lotteryInfo,
8
+ isShowParticipant: state.isShowParticipant
9
+ })
7
10
  Component(
8
11
  connect(mapState)({
9
12
  behaviors: [computedBehavior],
@@ -35,6 +35,10 @@
35
35
  .inner {
36
36
  display: inline-flex;
37
37
  align-items: center;
38
+ .inner-under-line {
39
+ text-decoration: underline;
40
+ color: #2d8cf0;
41
+ }
38
42
  .right-arrow-icon {
39
43
  width: 40rpx;
40
44
  height: 40rpx;