xiaoe_mp_npm 0.5.37-alpha2 → 0.5.37-dev1
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 +10 -3
- package/miniprogram_dist/LiveGoodsList/index.js +10 -3
- package/miniprogram_dist/LiveGoodsList/index.wxml +2 -0
- package/miniprogram_dist/common/api/liveGoodsList.js +23 -0
- package/package.json +1 -1
- package/src/GoodsItem/index.js +10 -3
- package/src/LiveGoodsList/index.js +10 -3
- package/src/LiveGoodsList/index.wxml +2 -0
- package/src/common/api/liveGoodsList.js +23 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @LastEditTime: 2021-11-18 19:49:11
|
|
8
8
|
*/
|
|
9
9
|
import { debounce } from "../common/utils/index"
|
|
10
|
-
import { getUserPermission, snapCheck } from "../common/api/liveGoodsList"
|
|
10
|
+
import { getUserPermission, getUserPermissionNew, snapCheck, snapCheckNew } from "../common/api/liveGoodsList"
|
|
11
11
|
import {
|
|
12
12
|
ASSOCIATION,
|
|
13
13
|
PUNCH_CARD
|
|
@@ -123,6 +123,11 @@ Component({
|
|
|
123
123
|
index:{
|
|
124
124
|
type: Number,
|
|
125
125
|
value: -1
|
|
126
|
+
},
|
|
127
|
+
// 是否是新带货接口灰度
|
|
128
|
+
isGrayMarketing: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
value: false
|
|
126
131
|
}
|
|
127
132
|
},
|
|
128
133
|
|
|
@@ -310,7 +315,8 @@ Component({
|
|
|
310
315
|
coupon_id: this.data.goodsItem.coupon_id,
|
|
311
316
|
alive_id: this.data.aliveInfo.alive_id
|
|
312
317
|
}
|
|
313
|
-
|
|
318
|
+
const url = this.properties.isGrayMarketing ? snapCheckNew : snapCheck
|
|
319
|
+
url(params).then(res => {
|
|
314
320
|
this.hideToast()
|
|
315
321
|
let { code, data } = res.data
|
|
316
322
|
if (code === 0) {
|
|
@@ -392,7 +398,8 @@ Component({
|
|
|
392
398
|
app_id:this.data.aliveInfo.app_id,
|
|
393
399
|
user_id:this.data.aliveInfo.user_id,
|
|
394
400
|
}
|
|
395
|
-
|
|
401
|
+
const url = this.properties.isGrayMarketing ? getUserPermissionNew : getUserPermission
|
|
402
|
+
url(params).then((res) => {
|
|
396
403
|
let { code, data } = res.data
|
|
397
404
|
if (code === 0) {
|
|
398
405
|
resolve(!!data.auth_state)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @LastEditTime: 2021-11-18 19:52:02
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { getGoodsList, getCouponSwitch } from "../common/api/liveGoodsList"
|
|
10
|
+
import { getGoodsList,getGoodsListNew, getCouponSwitch } from "../common/api/liveGoodsList"
|
|
11
11
|
import Dialog from '@vant/weapp/dialog/dialog';
|
|
12
12
|
import {
|
|
13
13
|
ASSOCIATION,
|
|
@@ -104,6 +104,11 @@ Component({
|
|
|
104
104
|
overlayStyle: {
|
|
105
105
|
type: String,
|
|
106
106
|
value: ''
|
|
107
|
+
},
|
|
108
|
+
// 是否是新带货接口灰度
|
|
109
|
+
isGrayMarketing: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
value: false
|
|
107
112
|
}
|
|
108
113
|
},
|
|
109
114
|
data: {
|
|
@@ -205,7 +210,8 @@ Component({
|
|
|
205
210
|
page: 1,
|
|
206
211
|
port: 1
|
|
207
212
|
}
|
|
208
|
-
|
|
213
|
+
const url = this.properties.isGrayMarketing ? getGoodsListNew : getGoodsList
|
|
214
|
+
url(params).then((res) => {
|
|
209
215
|
console.log('2222222222')
|
|
210
216
|
let {data, code} = res.data
|
|
211
217
|
if (code === 0 && data && data.length > 0) {
|
|
@@ -233,7 +239,8 @@ Component({
|
|
|
233
239
|
app_id:this.properties.aliveInfo.app_id,
|
|
234
240
|
user_id:this.properties.aliveInfo.user_id,
|
|
235
241
|
}
|
|
236
|
-
getGoodsList
|
|
242
|
+
const url = this.properties.isGrayMarketing ? getGoodsListNew : getGoodsList
|
|
243
|
+
url(params).then(res=>{
|
|
237
244
|
let { data, code } = res.data
|
|
238
245
|
if (code === 0) {
|
|
239
246
|
// 关闭弹窗的时候返回的数据丢弃 // 上拉加载与下拉刷新一起触发时丢弃上拉加载数据
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
envName="{{ENV_NAME}}"
|
|
47
47
|
sensorReportParams="{{sensorReportParams}}"
|
|
48
48
|
isFullScreen="{{ popPosition === 'right'}}"
|
|
49
|
+
isGrayMarketing="{{ isGrayMarketing}}"
|
|
49
50
|
></goods-item>
|
|
50
51
|
</block>
|
|
51
52
|
<!-- 讲解中的商品 end -->
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
envName="{{ENV_NAME}}"
|
|
68
69
|
sensorReportParams="{{sensorReportParams}}"
|
|
69
70
|
isFullScreen="{{ popPosition === 'right'}}"
|
|
71
|
+
isGrayMarketing="{{ isGrayMarketing}}"
|
|
70
72
|
></goods-item>
|
|
71
73
|
<view class="finished-text" wx:if="{{!refreshing && finishedTxt !== 'no-data'}}">{{finishedTxt}}</view>
|
|
72
74
|
<view class="no-data" wx:if="{{!refreshing && finishedTxt === 'no-data'}}">
|
|
@@ -19,9 +19,14 @@ let gateway = (data = "_alive/") => {
|
|
|
19
19
|
|
|
20
20
|
const GOODS_LIST = {
|
|
21
21
|
GOODS_LIST: `${gateway()}xe.ecommerce.alive_goods_system.marketing.list.get/1.0.0`,
|
|
22
|
+
GOODS_LIST_NEW: `${gateway()}xe.ecommerce.marketing.list.get/3.0.0`,
|
|
22
23
|
COUPON_SWITCH: `${gateway()}xe.marketing.coupon.switch.config/1.0.0`,
|
|
23
24
|
USER_PERMISSION: `${gateway()}xe.ecommerce.alive_goods_system.check.permission/1.0.0`,
|
|
25
|
+
USER_PERMISSION_NEW: `${gateway()}xe.ecommerce.check.permission/3.0.0`,
|
|
26
|
+
|
|
24
27
|
SNAP_CHECK: `${gateway()}xe.ecommerce.alive_goods_system.check.snap_up/1.0.0`,
|
|
28
|
+
SNAP_CHECK_NEW: `${gateway()}xe.ecommerce.check.snap_up/3.0.0`,
|
|
29
|
+
|
|
25
30
|
SHOW_GOODS: `${gateway()}xe.user.display_package.edit`
|
|
26
31
|
};
|
|
27
32
|
|
|
@@ -30,6 +35,11 @@ const getGoodsList = (params, isNeedBiz = true, config = {}) => {
|
|
|
30
35
|
return http.player.post(GOODS_LIST.GOODS_LIST, params, isNeedBiz, config);
|
|
31
36
|
}
|
|
32
37
|
|
|
38
|
+
// 获取商品列表-new
|
|
39
|
+
const getGoodsListNew = (params, isNeedBiz = false, config = {}) => {
|
|
40
|
+
return http.player.post(GOODS_LIST.GOODS_LIST_NEW, params, isNeedBiz, config);
|
|
41
|
+
}
|
|
42
|
+
|
|
33
43
|
// 获取券后价展示店铺设置
|
|
34
44
|
const getCouponSwitch = (params, isNeedBiz = true, config = {}) => {
|
|
35
45
|
return http.player.post(GOODS_LIST.COUPON_SWITCH, params, isNeedBiz, config);
|
|
@@ -40,11 +50,21 @@ const getUserPermission = (params, isNeedBiz = true, config = {}) => {
|
|
|
40
50
|
return http.player.post(GOODS_LIST.USER_PERMISSION, params, isNeedBiz, config);
|
|
41
51
|
}
|
|
42
52
|
|
|
53
|
+
// 获取权益接口-new
|
|
54
|
+
const getUserPermissionNew = (params, isNeedBiz = false, config = {}) => {
|
|
55
|
+
return http.player.post(GOODS_LIST.USER_PERMISSION_NEW, params, isNeedBiz, config);
|
|
56
|
+
}
|
|
57
|
+
|
|
43
58
|
// 去抢购
|
|
44
59
|
const snapCheck = (params, isNeedBiz = true, config = {}) => {
|
|
45
60
|
return http.player.post(GOODS_LIST.SNAP_CHECK, params, isNeedBiz, config);
|
|
46
61
|
}
|
|
47
62
|
|
|
63
|
+
// 去抢购-new
|
|
64
|
+
const snapCheckNew = (params, isNeedBiz = false, config = {}) => {
|
|
65
|
+
return http.player.post(GOODS_LIST.SNAP_CHECK_NEW, params, isNeedBiz, config);
|
|
66
|
+
}
|
|
67
|
+
|
|
48
68
|
//展示隐藏商品
|
|
49
69
|
const showGoods = (params, isNeedBiz = true, config = {}) => {
|
|
50
70
|
return http.player.post(GOODS_LIST.SHOW_GOODS, params, isNeedBiz, config);
|
|
@@ -52,8 +72,11 @@ const showGoods = (params, isNeedBiz = true, config = {}) => {
|
|
|
52
72
|
|
|
53
73
|
module.exports = {
|
|
54
74
|
getGoodsList,
|
|
75
|
+
getGoodsListNew,
|
|
55
76
|
getCouponSwitch,
|
|
56
77
|
getUserPermission,
|
|
78
|
+
getUserPermissionNew,
|
|
57
79
|
snapCheck,
|
|
80
|
+
snapCheckNew,
|
|
58
81
|
showGoods
|
|
59
82
|
}
|
package/package.json
CHANGED
package/src/GoodsItem/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @LastEditTime: 2021-11-18 19:49:11
|
|
8
8
|
*/
|
|
9
9
|
import { debounce } from "../common/utils/index"
|
|
10
|
-
import { getUserPermission, snapCheck } from "../common/api/liveGoodsList"
|
|
10
|
+
import { getUserPermission, getUserPermissionNew, snapCheck, snapCheckNew } from "../common/api/liveGoodsList"
|
|
11
11
|
import {
|
|
12
12
|
ASSOCIATION,
|
|
13
13
|
PUNCH_CARD
|
|
@@ -123,6 +123,11 @@ Component({
|
|
|
123
123
|
index:{
|
|
124
124
|
type: Number,
|
|
125
125
|
value: -1
|
|
126
|
+
},
|
|
127
|
+
// 是否是新带货接口灰度
|
|
128
|
+
isGrayMarketing: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
value: false
|
|
126
131
|
}
|
|
127
132
|
},
|
|
128
133
|
|
|
@@ -310,7 +315,8 @@ Component({
|
|
|
310
315
|
coupon_id: this.data.goodsItem.coupon_id,
|
|
311
316
|
alive_id: this.data.aliveInfo.alive_id
|
|
312
317
|
}
|
|
313
|
-
|
|
318
|
+
const url = this.properties.isGrayMarketing ? snapCheckNew : snapCheck
|
|
319
|
+
url(params).then(res => {
|
|
314
320
|
this.hideToast()
|
|
315
321
|
let { code, data } = res.data
|
|
316
322
|
if (code === 0) {
|
|
@@ -392,7 +398,8 @@ Component({
|
|
|
392
398
|
app_id:this.data.aliveInfo.app_id,
|
|
393
399
|
user_id:this.data.aliveInfo.user_id,
|
|
394
400
|
}
|
|
395
|
-
|
|
401
|
+
const url = this.properties.isGrayMarketing ? getUserPermissionNew : getUserPermission
|
|
402
|
+
url(params).then((res) => {
|
|
396
403
|
let { code, data } = res.data
|
|
397
404
|
if (code === 0) {
|
|
398
405
|
resolve(!!data.auth_state)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @LastEditTime: 2021-11-18 19:52:02
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { getGoodsList, getCouponSwitch } from "../common/api/liveGoodsList"
|
|
10
|
+
import { getGoodsList,getGoodsListNew, getCouponSwitch } from "../common/api/liveGoodsList"
|
|
11
11
|
import Dialog from '@vant/weapp/dialog/dialog';
|
|
12
12
|
import {
|
|
13
13
|
ASSOCIATION,
|
|
@@ -104,6 +104,11 @@ Component({
|
|
|
104
104
|
overlayStyle: {
|
|
105
105
|
type: String,
|
|
106
106
|
value: ''
|
|
107
|
+
},
|
|
108
|
+
// 是否是新带货接口灰度
|
|
109
|
+
isGrayMarketing: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
value: false
|
|
107
112
|
}
|
|
108
113
|
},
|
|
109
114
|
data: {
|
|
@@ -205,7 +210,8 @@ Component({
|
|
|
205
210
|
page: 1,
|
|
206
211
|
port: 1
|
|
207
212
|
}
|
|
208
|
-
|
|
213
|
+
const url = this.properties.isGrayMarketing ? getGoodsListNew : getGoodsList
|
|
214
|
+
url(params).then((res) => {
|
|
209
215
|
console.log('2222222222')
|
|
210
216
|
let {data, code} = res.data
|
|
211
217
|
if (code === 0 && data && data.length > 0) {
|
|
@@ -233,7 +239,8 @@ Component({
|
|
|
233
239
|
app_id:this.properties.aliveInfo.app_id,
|
|
234
240
|
user_id:this.properties.aliveInfo.user_id,
|
|
235
241
|
}
|
|
236
|
-
getGoodsList
|
|
242
|
+
const url = this.properties.isGrayMarketing ? getGoodsListNew : getGoodsList
|
|
243
|
+
url(params).then(res=>{
|
|
237
244
|
let { data, code } = res.data
|
|
238
245
|
if (code === 0) {
|
|
239
246
|
// 关闭弹窗的时候返回的数据丢弃 // 上拉加载与下拉刷新一起触发时丢弃上拉加载数据
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
envName="{{ENV_NAME}}"
|
|
47
47
|
sensorReportParams="{{sensorReportParams}}"
|
|
48
48
|
isFullScreen="{{ popPosition === 'right'}}"
|
|
49
|
+
isGrayMarketing="{{ isGrayMarketing}}"
|
|
49
50
|
></goods-item>
|
|
50
51
|
</block>
|
|
51
52
|
<!-- 讲解中的商品 end -->
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
envName="{{ENV_NAME}}"
|
|
68
69
|
sensorReportParams="{{sensorReportParams}}"
|
|
69
70
|
isFullScreen="{{ popPosition === 'right'}}"
|
|
71
|
+
isGrayMarketing="{{ isGrayMarketing}}"
|
|
70
72
|
></goods-item>
|
|
71
73
|
<view class="finished-text" wx:if="{{!refreshing && finishedTxt !== 'no-data'}}">{{finishedTxt}}</view>
|
|
72
74
|
<view class="no-data" wx:if="{{!refreshing && finishedTxt === 'no-data'}}">
|
|
@@ -19,9 +19,14 @@ let gateway = (data = "_alive/") => {
|
|
|
19
19
|
|
|
20
20
|
const GOODS_LIST = {
|
|
21
21
|
GOODS_LIST: `${gateway()}xe.ecommerce.alive_goods_system.marketing.list.get/1.0.0`,
|
|
22
|
+
GOODS_LIST_NEW: `${gateway()}xe.ecommerce.marketing.list.get/3.0.0`,
|
|
22
23
|
COUPON_SWITCH: `${gateway()}xe.marketing.coupon.switch.config/1.0.0`,
|
|
23
24
|
USER_PERMISSION: `${gateway()}xe.ecommerce.alive_goods_system.check.permission/1.0.0`,
|
|
25
|
+
USER_PERMISSION_NEW: `${gateway()}xe.ecommerce.check.permission/3.0.0`,
|
|
26
|
+
|
|
24
27
|
SNAP_CHECK: `${gateway()}xe.ecommerce.alive_goods_system.check.snap_up/1.0.0`,
|
|
28
|
+
SNAP_CHECK_NEW: `${gateway()}xe.ecommerce.check.snap_up/3.0.0`,
|
|
29
|
+
|
|
25
30
|
SHOW_GOODS: `${gateway()}xe.user.display_package.edit`
|
|
26
31
|
};
|
|
27
32
|
|
|
@@ -30,6 +35,11 @@ const getGoodsList = (params, isNeedBiz = true, config = {}) => {
|
|
|
30
35
|
return http.player.post(GOODS_LIST.GOODS_LIST, params, isNeedBiz, config);
|
|
31
36
|
}
|
|
32
37
|
|
|
38
|
+
// 获取商品列表-new
|
|
39
|
+
const getGoodsListNew = (params, isNeedBiz = false, config = {}) => {
|
|
40
|
+
return http.player.post(GOODS_LIST.GOODS_LIST_NEW, params, isNeedBiz, config);
|
|
41
|
+
}
|
|
42
|
+
|
|
33
43
|
// 获取券后价展示店铺设置
|
|
34
44
|
const getCouponSwitch = (params, isNeedBiz = true, config = {}) => {
|
|
35
45
|
return http.player.post(GOODS_LIST.COUPON_SWITCH, params, isNeedBiz, config);
|
|
@@ -40,11 +50,21 @@ const getUserPermission = (params, isNeedBiz = true, config = {}) => {
|
|
|
40
50
|
return http.player.post(GOODS_LIST.USER_PERMISSION, params, isNeedBiz, config);
|
|
41
51
|
}
|
|
42
52
|
|
|
53
|
+
// 获取权益接口-new
|
|
54
|
+
const getUserPermissionNew = (params, isNeedBiz = false, config = {}) => {
|
|
55
|
+
return http.player.post(GOODS_LIST.USER_PERMISSION_NEW, params, isNeedBiz, config);
|
|
56
|
+
}
|
|
57
|
+
|
|
43
58
|
// 去抢购
|
|
44
59
|
const snapCheck = (params, isNeedBiz = true, config = {}) => {
|
|
45
60
|
return http.player.post(GOODS_LIST.SNAP_CHECK, params, isNeedBiz, config);
|
|
46
61
|
}
|
|
47
62
|
|
|
63
|
+
// 去抢购-new
|
|
64
|
+
const snapCheckNew = (params, isNeedBiz = false, config = {}) => {
|
|
65
|
+
return http.player.post(GOODS_LIST.SNAP_CHECK_NEW, params, isNeedBiz, config);
|
|
66
|
+
}
|
|
67
|
+
|
|
48
68
|
//展示隐藏商品
|
|
49
69
|
const showGoods = (params, isNeedBiz = true, config = {}) => {
|
|
50
70
|
return http.player.post(GOODS_LIST.SHOW_GOODS, params, isNeedBiz, config);
|
|
@@ -52,8 +72,11 @@ const showGoods = (params, isNeedBiz = true, config = {}) => {
|
|
|
52
72
|
|
|
53
73
|
module.exports = {
|
|
54
74
|
getGoodsList,
|
|
75
|
+
getGoodsListNew,
|
|
55
76
|
getCouponSwitch,
|
|
56
77
|
getUserPermission,
|
|
78
|
+
getUserPermissionNew,
|
|
57
79
|
snapCheck,
|
|
80
|
+
snapCheckNew,
|
|
58
81
|
showGoods
|
|
59
82
|
}
|