diff --git a/src/common/constant.ts b/src/common/constant.ts index 7dedbec..bd290ea 100644 --- a/src/common/constant.ts +++ b/src/common/constant.ts @@ -1,4 +1,4 @@ -export const BASE_URL = CURRENT_BASE_URL +// export const BASE_URL = CURRENT_BASE_URL // export const BASE_URL = `http://192.168.0.75:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:50001/lymarket` // export const BASE_URL = `http://10.0.0.5:50001/lymarket` @@ -15,7 +15,7 @@ export const BASE_URL = CURRENT_BASE_URL // export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添 // export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰 // export const BASE_URL = `http://192.168.1.95:40001/lymarket` // 华 -// export const BASE_URL = 'http://192.168.1.22:50002/lymarket' // 婷 +export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷 // CDN // 生成密钥 diff --git a/src/common/util.ts b/src/common/util.ts index 09195f6..4d5ae00 100644 --- a/src/common/util.ts +++ b/src/common/util.ts @@ -99,7 +99,8 @@ interface DataLoadingStatus { status: boolean } //获取数据加载状态 //0:数据从无到有加载数据,1,没有任何数据, 2:下拉加载,3:下拉没有数据 -export const dataLoadingStatus = ({ list = [], total = 0, status = true }: DataLoadingStatus) => { +export const dataLoadingStatus = ({ list = [], total = 0, status = false }: DataLoadingStatus) => { + console.log('list & status',list, status); // 类型校验 if (Object.prototype.toString.call(list) !== '[object Array]') { list = [] diff --git a/src/pages/shopping/index.tsx b/src/pages/shopping/index.tsx index b501dac..94a115d 100644 --- a/src/pages/shopping/index.tsx +++ b/src/pages/shopping/index.tsx @@ -93,7 +93,7 @@ const ShoppingCartContainer: FC = () => { const status = dataLoadingStatus({ list: shoppingCartData.list, total: shoppingCartData.total, - status: state.loading || true, + status: state.loading!, }) console.log('status==>', status) return status @@ -124,7 +124,7 @@ const ShoppingCartContainer: FC = () => { useEffect(() => { if (state.success) { // startTransition(() => { - setShoppingCartData({ list: state.data, total: state.data.length }) + setShoppingCartData({ list: state.data.list, total: state.data.total }) // }) } }, [state])