标红的"{}"必须加,使之成为对象
export function productListAction(isRefreshing, loading, isLoadMore, filterData={}, spName, sort, pageNo=1) { let queryData = Object.assign({}, filterData, {spName}, {sort}, {pageNo}); console.warn(‘product===>‘,queryData); return (isRefreshing || loading) ? {types: [FETCH_PRODUCT_LIST.code, SUCCESS_PRODUCT_LIST, FAILURE_PRODUCT_LIST], callAPI: () => request(FETCH_PRODUCT_LIST.url, REQUEST_METHOD_POST, stringify(queryData)), payload: {isRefreshing, loading, isLoadMore, queryData, pageNo} } : {type: CLEAR_PRODUCT_LIST, isRefreshing, queryData, loading}; }
时间: 2024-10-10 01:29:56