|
@@ -207,7 +207,7 @@ export function deleteOneHistory(skn, index) { |
|
@@ -207,7 +207,7 @@ export function deleteOneHistory(skn, index) { |
207
|
|
207
|
|
208
|
let fetchList = (skn, uid, sourcePage) => {
|
208
|
let fetchList = (skn, uid, sourcePage) => {
|
209
|
dispatch(historyDeleteRequest());
|
209
|
dispatch(historyDeleteRequest());
|
210
|
- return new BrowseService(app.host).deleteHistory(skn, uid, sourcePage)
|
210
|
+ return new BrowseService(app.host).deleteHistory(0, uid, sourcePage,skn)
|
211
|
.then(json => {
|
211
|
.then(json => {
|
212
|
let {productList} = browse;
|
212
|
let {productList} = browse;
|
213
|
let lists = productList.toArray();
|
213
|
let lists = productList.toArray();
|
|
@@ -269,22 +269,16 @@ export function historyClearFailure(error) { |
|
@@ -269,22 +269,16 @@ export function historyClearFailure(error) { |
269
|
};
|
269
|
};
|
270
|
}
|
270
|
}
|
271
|
|
271
|
|
272
|
-export function clearHistory(selectedProducts) {
|
272
|
+export function clearHistory(categoryID=0) {
|
273
|
return (dispatch, getState) => {
|
273
|
return (dispatch, getState) => {
|
274
|
- let skns = '';
|
|
|
275
|
- for (var i = 0; i < selectedProducts.length; i++) {
|
|
|
276
|
- skns = skns+selectedProducts[i].product_skn;
|
|
|
277
|
- skns = skns+',';
|
|
|
278
|
- }
|
|
|
279
|
let {app, browse} = getState();
|
274
|
let {app, browse} = getState();
|
280
|
-
|
|
|
281
|
if (browse.productList.size == 0) {
|
275
|
if (browse.productList.size == 0) {
|
282
|
return;
|
276
|
return;
|
283
|
}
|
277
|
}
|
284
|
|
278
|
|
285
|
- let fetchList = (skns, uid, sourcePage) => {
|
279
|
+ let fetchList = (categoryID, uid, sourcePage) => {
|
286
|
dispatch(historyClearRequest());
|
280
|
dispatch(historyClearRequest());
|
287
|
- return new BrowseService(app.host).deleteHistory(skns, uid, sourcePage)
|
281
|
+ return new BrowseService(app.host).deleteHistory(categoryID, uid, sourcePage,)
|
288
|
.then(json => {
|
282
|
.then(json => {
|
289
|
dispatch(historyClearSuccess());
|
283
|
dispatch(historyClearSuccess());
|
290
|
dispatch(historySortList());
|
284
|
dispatch(historySortList());
|
|
@@ -307,7 +301,7 @@ export function clearHistory(selectedProducts) { |
|
@@ -307,7 +301,7 @@ export function clearHistory(selectedProducts) { |
307
|
return ReactNative.NativeModules.YH_CommonHelper.uid();
|
301
|
return ReactNative.NativeModules.YH_CommonHelper.uid();
|
308
|
}).then(data => {
|
302
|
}).then(data => {
|
309
|
uid = data;
|
303
|
uid = data;
|
310
|
- fetchList(skns, uid, sourcePage);
|
304
|
+ fetchList(categoryID, uid, sourcePage);
|
311
|
})
|
305
|
})
|
312
|
.catch(error => {
|
306
|
.catch(error => {
|
313
|
|
307
|
|