diff --git a/src/components/CartStepper/index.less b/src/components/CartStepper/index.less index 161c6d7..7db4e94 100644 --- a/src/components/CartStepper/index.less +++ b/src/components/CartStepper/index.less @@ -4,8 +4,8 @@ flex-shrink: 0; &__btn { - width: 52rpx; - height: 52rpx; + width: 42rpx; + height: 42rpx; border-radius: 50%; box-sizing: border-box; display: flex; diff --git a/src/pages/bill-detail/index.less b/src/pages/bill-detail/index.less index 15fbfbd..84c187d 100644 --- a/src/pages/bill-detail/index.less +++ b/src/pages/bill-detail/index.less @@ -115,8 +115,8 @@ } &__img { - width: 72rpx; - height: 72rpx; + width: 120rpx; + height: 120rpx; border-radius: 8rpx; background: #f2f3f5; flex-shrink: 0; @@ -149,6 +149,14 @@ &__amount { font-size: 28rpx; + color: #ee0a24; + font-weight: 500; + display: block; + margin-top: 4rpx; + } + + &__price { + font-size: 24rpx; color: #323233; font-weight: 500; display: block; diff --git a/src/pages/bill-detail/index.tsx b/src/pages/bill-detail/index.tsx index ab8dc7a..35f6890 100644 --- a/src/pages/bill-detail/index.tsx +++ b/src/pages/bill-detail/index.tsx @@ -161,13 +161,17 @@ export default function BillDetailPage() { /> )} - {item.product_name} - - {formatSpec(item.product_spec, item.unit)}{' ¥'}{item.price} - + {item.product_name} + + {formatSpec(item.product_spec, item.unit)} + + + 单价:{formatRetailPrice(item.price, item.spec)} {item.price_unit} + - ¥{item.price} × {item.quantity} + ¥{item.price} × {item.quantity} + ¥{item.amount} ))} diff --git a/src/pages/cart/index.less b/src/pages/cart/index.less index 99d9679..0be4d15 100644 --- a/src/pages/cart/index.less +++ b/src/pages/cart/index.less @@ -59,8 +59,8 @@ } &__image { - width: 150rpx; - height: 150rpx; + width: 180rpx; + height: 180rpx; border-radius: 12rpx; background: #f2f3f5; flex-shrink: 0; @@ -108,7 +108,6 @@ } &__spec { - margin-top: 10rpx; font-size: 24rpx; color: #969799; } diff --git a/src/pages/cart/index.tsx b/src/pages/cart/index.tsx index 95ac547..1c4be79 100644 --- a/src/pages/cart/index.tsx +++ b/src/pages/cart/index.tsx @@ -223,7 +223,7 @@ export default function CartPage() { {formatSpec(item.spec, item.unit)}{' '} - 单价:{formatRetailPrice(item.price, item.spec)} {item.price_unit} + 单价:{formatRetailPrice(item.price, item.spec)} {item.price_unit} ¥{item.price} diff --git a/src/pages/index/index.less b/src/pages/index/index.less index f6bdc6f..bf30261 100644 --- a/src/pages/index/index.less +++ b/src/pages/index/index.less @@ -301,7 +301,7 @@ } &__bottom { - margin-top: 16rpx; + margin-top: 8rpx; display: flex; align-items: center; justify-content: space-between; @@ -320,8 +320,8 @@ } &__add { - width: 52rpx; - height: 52rpx; + width: 42rpx; + height: 42rpx; border-radius: 50%; background: linear-gradient(135deg, #ee0a24, #ff6034); display: flex; diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index dec4f62..db1aebc 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -318,9 +318,11 @@ export default function IndexPage() { {product.name} {formatSpec(product.spec, product.unit)}{' '} - {product.price !== null && <> - 单价:{formatRetailPrice(product.price, product.spec)} {product.price_unit} - } + + {product.price !== null && <> + 单价:{formatRetailPrice(product.price, product.spec)} {product.price_unit} + } + {product.price !== null ? ( diff --git a/src/pages/product/index.less b/src/pages/product/index.less index 45daf5c..e61970a 100644 --- a/src/pages/product/index.less +++ b/src/pages/product/index.less @@ -111,8 +111,8 @@ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04); &__image { - width: 160rpx; - height: 160rpx; + width: 180rpx; + height: 180rpx; border-radius: 12rpx; background: #f2f3f5; flex-shrink: 0; @@ -136,7 +136,6 @@ } &__spec { - margin-top: 10rpx; font-size: 24rpx; color: #969799; } @@ -161,8 +160,8 @@ } &__add { - width: 56rpx; - height: 56rpx; + width: 42rpx; + height: 42rpx; border-radius: 50%; background: #ee0a24; display: flex; diff --git a/src/pages/product/index.tsx b/src/pages/product/index.tsx index 87a52af..b81dfcb 100644 --- a/src/pages/product/index.tsx +++ b/src/pages/product/index.tsx @@ -291,9 +291,11 @@ export default function ProductPage() { {product.name} {formatSpec(product.spec, product.unit)}{' '} - {product.price !== null && <> - 单价:{formatRetailPrice(product.price, product.spec)} {product.price_unit} - } + + {product.price !== null && <> + 单价:{formatRetailPrice(product.price, product.spec)} {product.price_unit} + } + {product.price !== null ? ( diff --git a/src/services/bill.ts b/src/services/bill.ts index 861c00b..bf08769 100644 --- a/src/services/bill.ts +++ b/src/services/bill.ts @@ -74,6 +74,8 @@ export interface BillItem { amount: string /** 商品首图 URL(无图为空字符串) */ image: string + price_unit: string + spec: string } /** 账单关联订单 */ diff --git a/src/utils/request.ts b/src/utils/request.ts index df6beb4..af654e8 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -10,8 +10,8 @@ const LOGIN_PATH = '/pages/login/index' /** 默认请求超时(ms) */ const DEFAULT_TIMEOUT = 15000 /** 接口根地址(uploadFile 等原生请求同样使用) */ -// export const BASE_URL = "http://localhost:8000/index.php" -export const BASE_URL = "https://purchase.henanklkj.com/index.php" +export const BASE_URL = "http://localhost:8000" +// export const BASE_URL = "https://purchase.henanklkj.com/index.php" /** * HTTP 状态码 → 错误提示映射