diff --git a/admin/src/views/ShopDishes.vue b/admin/src/views/ShopDishes.vue index aa9d01d..c61ec41 100644 --- a/admin/src/views/ShopDishes.vue +++ b/admin/src/views/ShopDishes.vue @@ -36,11 +36,12 @@ - - 上传照片 + :on-success="(res) => form.photo = res.url" accept="image/*"> + + 上传照片 + 移除 diff --git a/admin/src/views/Shops.vue b/admin/src/views/Shops.vue index 3c2db74..6f97942 100644 --- a/admin/src/views/Shops.vue +++ b/admin/src/views/Shops.vue @@ -5,32 +5,33 @@ 新增门店 - - + + - + - - - + + + - {{ row.packingFeeType === 'Fixed' ? '总打包费' : '单份打包费' }} + {{ row.packingFeeType === 'Fixed' ? '总打包费' : '单份' }} ¥{{ row.packingFeeAmount }} - - - + + {{ row.isEnabled ? '启用' : '禁用' }} - + - 编辑 - Banner - 菜品 - 删除 + + 编辑 + Banner + 菜品 + 删除 + @@ -42,11 +43,12 @@ - - 上传照片 + :on-success="(res) => form.photo = res.url" accept="image/*"> + + 上传照片 + 移除 diff --git a/miniapp/pages/delivery/delivery.vue b/miniapp/pages/delivery/delivery.vue index 9e8cb54..a1d8ef2 100644 --- a/miniapp/pages/delivery/delivery.vue +++ b/miniapp/pages/delivery/delivery.vue @@ -224,12 +224,11 @@ export default { /* 顶部大图 */ .top-banner { - padding: 20rpx 24rpx 0; + width: 100%; } .banner-img { width: 100%; height: 330rpx; - border-radius: 20rpx; } /* 表单区域 */ diff --git a/miniapp/pages/food/food-order.vue b/miniapp/pages/food/food-order.vue index bbeb786..50134fe 100644 --- a/miniapp/pages/food/food-order.vue +++ b/miniapp/pages/food/food-order.vue @@ -367,7 +367,7 @@ export default { padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); display: flex; align-items: center; - justify-content: space-between; + justify-content: flex-end; box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05); } @@ -375,17 +375,19 @@ export default { font-size: 32rpx; color: #e64340; font-weight: bold; + flex: 1; } .submit-btn { width: 240rpx; height: 80rpx; line-height: 80rpx; - background-color: #007AFF; + background-color: #FAD146; color: #ffffff; font-size: 30rpx; border-radius: 40rpx; border: none; + margin-right: 10rpx; } .submit-btn[disabled] { diff --git a/miniapp/pages/food/food.vue b/miniapp/pages/food/food.vue index 151efd2..0512a0c 100644 --- a/miniapp/pages/food/food.vue +++ b/miniapp/pages/food/food.vue @@ -19,17 +19,18 @@ - + {{ shop.name }} - {{ shop.location }} - {{ shop.dishCount || 0 }} 种美食 + + + {{ shop.location || '暂无位置信息' }} + + + + {{ shop.dishCount || 0 }}种美食 + @@ -67,20 +68,13 @@ export default { if (res?.value) this.bannerUrl = res.value } catch (e) {} }, - /** 加载门店列表 */ async loadShops() { this.loading = true try { const res = await getShops() this.shops = res || [] - } catch (e) { - // 错误已在 request 中处理 - } finally { - this.loading = false - } + } catch (e) {} finally { this.loading = false } }, - - /** 跳转门店详情 */ goShopDetail(id) { uni.navigateTo({ url: `/pages/food/shop-detail?id=${id}` }) } @@ -89,6 +83,11 @@ export default { + /* 购物车弹窗 */ + .cart-popup-mask { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); + z-index: 100; + display: flex; + align-items: flex-end; + } + + .cart-popup { + width: 100%; + max-height: 60vh; + background: #fff; + border-radius: 24rpx 24rpx 0 0; + display: flex; + flex-direction: column; + overflow: hidden; + box-sizing: border-box; + } + + .cart-popup-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 24rpx 30rpx; + border-bottom: 1rpx solid #f0f0f0; + } + + .cart-popup-title { + font-size: 30rpx; + font-weight: bold; + color: #333; + } + + .cart-popup-clear { + font-size: 26rpx; + color: #999; + } + + .cart-popup-list { + max-height: 50vh; + padding: 0 30rpx; + box-sizing: border-box; + width: 100%; + } + + .cart-popup-item { + display: flex; + align-items: center; + padding: 20rpx 0; + border-bottom: 1rpx solid #f0f0f0; + } + + .cart-item-photo { + width: 80rpx; + height: 80rpx; + border-radius: 8rpx; + flex-shrink: 0; + } + + .cart-item-info { + flex: 1; + padding: 0 16rpx; + display: flex; + flex-direction: column; + min-width: 0; + } + + .cart-item-name { + font-size: 26rpx; + color: #333; + } + + .cart-item-price { + font-size: 26rpx; + color: #FF6B00; + } + + .cart-popup-footer { + padding: 16rpx 30rpx; + padding-bottom: calc(16rpx + env(safe-area-inset-bottom)); + border-top: 1rpx solid #f0f0f0; + } + + .cart-fee-row { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8rpx 0; + } + + .cart-fee-label { + font-size: 26rpx; + color: #666; + } + + .cart-fee-value { + font-size: 26rpx; + color: #333; + } + + .cart-fee-total { + font-size: 32rpx; + color: #FF6B00; + font-weight: bold; + } + \ No newline at end of file diff --git a/miniapp/pages/help/help.vue b/miniapp/pages/help/help.vue index 5229fa6..22ac64b 100644 --- a/miniapp/pages/help/help.vue +++ b/miniapp/pages/help/help.vue @@ -21,9 +21,10 @@ - 1.要做的事情 + 1.万能帮事项 - + @@ -31,16 +32,17 @@ 2.如何联系您? - + 3.商品总金额 - 需包含商品总额和包装费等额外费用 - + @@ -48,7 +50,8 @@ 4.跑腿佣金 - + 佣金先由平台保管,接单方完成订单后才会收到佣金 @@ -65,263 +68,307 @@ + .textarea-box { + height: 240rpx; + padding: 20rpx 24rpx; + align-items: flex-start; + } + + .textarea-box textarea { + width: 100%; + height: 100%; + font-size: 28rpx; + color: #333; + } + + .form-tip { + font-size: 24rpx; + color: #999999; + margin-top: 12rpx; + display: block; + text-align: center; + } + + /* 支付金额 + 提交按钮 */ + .submit-section { + padding: 20rpx 24rpx; + padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); + } + + .pay-amount { + font-size: 32rpx; + color: #e64340; + font-weight: bold; + display: block; + text-align: center; + margin-bottom: 20rpx; + } + + .submit-btn { + width: 100%; + height: 96rpx; + line-height: 96rpx; + background: #FAD146; + color: #ffffff; + font-size: 32rpx; + font-weight: bold; + border-radius: 10rpx; + border: none; + text-align: center; + } + + .submit-btn[disabled] { + opacity: 0.6; + } + \ No newline at end of file diff --git a/miniapp/pages/order-hall/order-hall.vue b/miniapp/pages/order-hall/order-hall.vue index e6220b9..50e0ab6 100644 --- a/miniapp/pages/order-hall/order-hall.vue +++ b/miniapp/pages/order-hall/order-hall.vue @@ -37,38 +37,63 @@ 暂无订单 - - - {{ getItemTitle(order) }} - - 跑腿费: - {{ order.commission }}元 - - - - - - - - 取货地址:{{ order.pickupLocation }} - - - - 送达地址:{{ order.deliveryLocation }} - + + - 备注信息:{{ order.remark || '无' }} + 备注信息:{{ order.itemName || '无' }} - + + + 跑腿费(含其他费用): + {{ getHelpTotalAmount(order) }}元 + + + 接单 + + - - - - 查看详情 - 接单 - + + + + + {{ getItemTitle(order) }} + + 跑腿费: + {{ order.commission }}元 + + + + + + 垫付商品金额: + ¥{{ order.goodsAmount }} + + + + + + + 取货地址:{{ order.pickupLocation }} + + + + 送达地址:{{ order.deliveryLocation }} + + + + 备注信息:{{ order.remark || '无' }} + + + + + + + 查看详情 + 接单 + + @@ -235,6 +260,12 @@ this.loadOrders() }, loadMore() {}, + /** 获取万能帮总费用(佣金+商品金额) */ + getHelpTotalAmount(order) { + const commission = parseFloat(order.commission) || 0 + const goodsAmount = parseFloat(order.goodsAmount) || 0 + return (commission + goodsAmount).toFixed(1) + }, /** 获取卡片标题 */ getItemTitle(order) { const typeMap = { @@ -246,7 +277,7 @@ } const prefix = typeMap[order.orderType] || '' if (order.orderType === 'Food') return `美食街订单(${order.shopCount || 0}家)` - if (order.orderType === 'Help') return `万能帮:${order.remark || ''}` + if (order.orderType === 'Help') return `万能帮:${order.itemName || ''}` return `${prefix}:${order.itemName || ''}` }, viewFoodDetail(order) { @@ -477,9 +508,28 @@ display: flex; justify-content: space-between; align-items: flex-start; + margin-bottom: 16rpx; + } + + /* 代购垫付金额 */ + .goods-amount-row { + display: flex; + align-items: center; margin-bottom: 24rpx; } + .goods-amount-label { + font-size: 28rpx; + color: #333; + font-weight: bold; + } + + .goods-amount-value { + font-size: 30rpx; + color: #FF6B00; + font-weight: bold; + } + .card-item-name { font-size: 30rpx; color: #333; @@ -490,7 +540,7 @@ .card-commission { display: flex; - align-items: baseline; + align-items: center; flex-shrink: 0; } @@ -505,6 +555,17 @@ font-weight: bold; } + /* 万能帮跑腿费 */ + .help-commission { + display: flex; + align-items: center; + } + + .help-commission-label { + font-size: 26rpx; + color: #333; + } + /* 信息行 */ .card-body { margin-bottom: 20rpx; @@ -544,8 +605,8 @@ } .info-text { - font-size: 26rpx; - color: #666; + font-size: 28rpx; + color: #363636; } /* 卡片底部 */ diff --git a/miniapp/pages/pickup/pickup.vue b/miniapp/pages/pickup/pickup.vue index c25d5c5..75efed6 100644 --- a/miniapp/pages/pickup/pickup.vue +++ b/miniapp/pages/pickup/pickup.vue @@ -231,12 +231,11 @@ export default { /* 顶部大图 */ .top-banner { - padding: 20rpx 24rpx 0; + width: 100%; } .banner-img { width: 100%; height: 330rpx; - border-radius: 20rpx; } /* 表单区域 */ diff --git a/miniapp/pages/purchase/purchase.vue b/miniapp/pages/purchase/purchase.vue index d1c992a..bd4f997 100644 --- a/miniapp/pages/purchase/purchase.vue +++ b/miniapp/pages/purchase/purchase.vue @@ -40,26 +40,30 @@ 4.备注信息 - + 5.如何联系您? - + 6.商品总金额 - + 需包含商品总额和包装费等额外费用 7.跑腿佣金 - + 佣金先由平台保管,接单方完成订单后才会收到佣金 @@ -76,136 +80,316 @@ + .order-page { + padding-bottom: 40rpx; + background-color: #f5f5f5; + min-height: 100vh; + } + + .custom-navbar { + position: fixed; + top: 0; + left: 0; + width: 100%; + z-index: 999; + background: #FFB700; + } + + .navbar-content { + height: 44px; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 20rpx; + } + + .nav-back { + width: 60rpx; + height: 60rpx; + display: flex; + align-items: center; + justify-content: center; + } + + .back-icon { + width: 40rpx; + height: 40rpx; + } + + .navbar-title { + font-size: 34rpx; + font-weight: bold; + color: #363636; + } + + .nav-placeholder { + width: 60rpx; + } + + .top-banner { + width: 100%; + } + + .banner-img { + width: 100%; + height: 330rpx; + } + + .form-section { + padding: 10rpx 24rpx 0; + } + + .form-group { + margin-bottom: 24rpx; + } + + .form-label { + font-size: 30rpx; + color: #333333; + font-weight: bold; + display: block; + margin-bottom: 16rpx; + } + + .input-box { + background-color: #ffffff; + border-radius: 16rpx; + padding: 0 24rpx; + height: 88rpx; + display: flex; + align-items: center; + } + + .input-box input { + width: 100%; + height: 100%; + font-size: 28rpx; + color: #333; + } + + .textarea-box { + height: 240rpx; + padding: 20rpx 24rpx; + align-items: flex-start; + } + + .textarea-box textarea { + width: 100%; + height: 100%; + font-size: 28rpx; + color: #333; + } + + .form-tip { + font-size: 24rpx; + color: #999999; + margin-top: 12rpx; + display: block; + text-align: center; + } + + .submit-section { + padding: 20rpx 24rpx; + padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); + } + + .pay-amount { + font-size: 32rpx; + color: #e64340; + font-weight: bold; + display: block; + text-align: center; + margin-bottom: 20rpx; + } + + .submit-btn { + width: 100%; + height: 96rpx; + line-height: 96rpx; + background: #FAD146; + color: #ffffff; + font-size: 32rpx; + font-weight: bold; + border-radius: 10rpx; + border: none; + text-align: center; + } + + .submit-btn[disabled] { + opacity: 0.6; + } + \ No newline at end of file diff --git a/miniapp/static/ic_address.png b/miniapp/static/ic_address.png new file mode 100644 index 0000000..729f4c0 Binary files /dev/null and b/miniapp/static/ic_address.png differ diff --git a/miniapp/static/ic_courier.png b/miniapp/static/ic_courier.png new file mode 100644 index 0000000..7410e38 Binary files /dev/null and b/miniapp/static/ic_courier.png differ diff --git a/miniapp/static/ic_delicacy.png b/miniapp/static/ic_delicacy.png new file mode 100644 index 0000000..75941ad Binary files /dev/null and b/miniapp/static/ic_delicacy.png differ