detail-notify-api.js
867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
'use strict';
const api = global.yoho.API;
/**
* 增加到货通知
*/
const addNotifyAsync = (skn, sku, uid, mobile) => {
let params = {
method: 'app.arrivalNotice.add',
product_skn: skn,
erp_sku_id: sku,
uid: uid
};
if (mobile) {
params.mobile = mobile;
}
return api.get('', params);
};
/**
* 取消到货通知
*/
const cancelNotifyAsync = (sku, uid) => {
return api.get('', {
method: 'app.arrivalNotice.cancel',
erp_sku_id: sku,
uid: uid
});
};
/**
* 获得商品是否已经设置过到货通知
*/
const getNotifyStatusAsync = (sku, uid) => {
return api.get('', {
method: 'app.arrivalNotice.query',
erp_sku_id: sku,
uid: uid
});
};
module.exports = {
addNotifyAsync,
cancelNotifyAsync,
getNotifyStatusAsync
};