Authored by 孙凯

修改 浏览记录 删除后刷新错误的bug review zhanglixia

@@ -217,11 +217,14 @@ export function deleteOneHistory(skn, index) { @@ -217,11 +217,14 @@ export function deleteOneHistory(skn, index) {
217 if (indexInAll != -1) { 217 if (indexInAll != -1) {
218 productList = productList.delete(indexInAll); 218 productList = productList.delete(indexInAll);
219 } 219 }
220 - // if (productList.size == 0 || productList.length == 0) {  
221 - // dispatch(historySortList());  
222 - // }else { 220 +
  221 + if (productList.size == 0 || productList.length == 0) {
  222 + dispatch(historyClearSuccess());
  223 + dispatch(historySortList());
  224 + dispatch(historyList(0));
  225 + }else {
223 dispatch(historyDeleteSuccess({productList})); 226 dispatch(historyDeleteSuccess({productList}));
224 - // } 227 + }
225 228
226 let show = productList.size > 0; 229 let show = productList.size > 0;
227 ReactNative.NativeModules.YH_RecorderHelper.setRightClearButtonVisiblity(show); 230 ReactNative.NativeModules.YH_RecorderHelper.setRightClearButtonVisiblity(show);
@@ -268,7 +268,7 @@ export function globalList() { @@ -268,7 +268,7 @@ export function globalList() {
268 } 268 }
269 269
270 let fetchList = (uid, page, pageSize) => { 270 let fetchList = (uid, page, pageSize) => {
271 - dispatch(commonListRequest()); 271 + dispatch(globalListRequest());
272 return new ProductService(app.globalHost).fetchGlobalList(uid, page, pageSize) 272 return new ProductService(app.globalHost).fetchGlobalList(uid, page, pageSize)
273 .then(json => { 273 .then(json => {
274 let payload = parseGlobalList(json); 274 let payload = parseGlobalList(json);