diff --git a/.env b/.env
index 5d55bdf..7612733 100644
--- a/.env
+++ b/.env
@@ -33,12 +33,12 @@ VITE_OAUTH2_SOCIAL_CLIENT='social:social'
# 是否开启websocket 消息接受,
VITE_WEBSOCKET_ENABLE = true
# --------------------------- start 开发环境 start ----------------------------------
-# VITE_APP_DEV_SERVICE = https://www.zianxin.com/api
-VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc
+VITE_APP_DEV_SERVICE = https://www.zianxin.com/api
+# VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc
# VITE_APP_DEV_SERVICE = http://127.0.0.1:9999
-# VITE_IMAGE_DEV_PATH = https://www.zianxin.com/api
-VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc
+VITE_IMAGE_DEV_PATH = https://www.zianxin.com/api
+# VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc
# VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999
# ----------------------------- end 开发环境 end ------------------------------------
diff --git a/src/manifest.json b/src/manifest.json
index 8f21990..9d861fc 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -2,8 +2,8 @@
"name" : "资安信",
"appid" : "__UNI__1BFE88F",
"description" : "资安信后勤管理系统",
- "versionName" : "1.5.08",
- "versionCode" : 1508,
+ "versionName" : "1.5.12",
+ "versionCode" : 1512,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
diff --git a/src/pages/canteen/daily-menu-detail.vue b/src/pages/canteen/daily-menu-detail.vue
index becb016..0f67e4c 100644
--- a/src/pages/canteen/daily-menu-detail.vue
+++ b/src/pages/canteen/daily-menu-detail.vue
@@ -5,14 +5,14 @@ import { onLoad } from "@dcloudio/uni-app"
import { foodApi } from "@@/api"
import type { DailyMenuComboItem, DailyMenuDetail } from "@@/components/order/daily-menu-types"
-import { hooks } from "@@/index"
+import { hooks, router } from "@@/index"
import { filePath } from "@@/utils/file"
-/** 页面请求和展示状态,由详情接口统一驱动。 */
+/** 页面请求和展示状态,由每日菜谱商品详情接口统一驱动。 */
const state = reactive({
/** 路由传入的每日菜谱记录 ID。 */
detailId: "",
- /** 当前每日菜谱详情;请求失败或记录不存在时为空。 */
+ /** 当前商品详情;请求失败或记录不存在时为空。 */
detail: null as DailyMenuDetail | null,
/** 首次加载和重试期间的骨架屏状态。 */
loading: false,
@@ -25,6 +25,9 @@ const state = reactive({
/** 当前菜品是否为套餐,兼容服务端将协议值返回为字符串的情况。 */
const isCombo = computed(() => Number(state.detail?.spuType) === 2)
+/** 商品类型展示名称;除协议值 2 外均按单品兜底,与服务端默认类型规则保持一致。 */
+const productTypeLabel = computed(() => (isCombo.value ? "套餐" : "单品"))
+
/** 套餐组成按服务端排序值展示,复制数组以避免修改接口响应对象。 */
const comboItems = computed(() => {
const items = Array.isArray(state.detail?.comboItems) ? state.detail.comboItems : []
@@ -90,13 +93,13 @@ const menuDateParts = computed(() => {
/** 是否存在有效市场价,只有高于销售价时才展示划线价。 */
const hasMarketPrice = computed(() => Number(state.detail?.marketPrice || 0) > Number(state.detail?.price || 0))
-/** 菜谱补充信息按移动端扫描顺序组织,详情页只保留分类。 */
+/** 商品补充信息按移动端扫描顺序组织,详情页只保留分类。 */
const menuInfoItems = computed(() => [
{
key: "category",
icon: "apps-line",
iconColor: "#475467",
- label: "菜品分类",
+ label: "商品分类",
value: state.detail?.categoryName || "未分类",
},
])
@@ -113,6 +116,16 @@ const comboItemQuantity = (quantity?: number) => {
/** 套餐总份数由有效数量汇总,异常数量按一份处理。 */
const comboTotalQuantity = computed(() => comboItems.value.reduce((total, item) => total + comboItemQuantity(item.quantity), 0))
+/** 套餐子项使用 SPU ID 进入通用商品详情;每日菜谱记录 ID 只用于当前套餐详情。 */
+const openComboItemDetail = (comboItem: DailyMenuComboItem) => {
+ const spuId = String(comboItem.childSpuId || "").trim()
+ if (!spuId) {
+ uni.showToast({ title: "套餐商品信息缺失,暂时无法查看详情", icon: "none" })
+ return
+ }
+ router.jump("/pages/canteen/product-detail", { id: spuId, source: "daily" })
+}
+
/** 将富文本图片转换为跨 H5、iOS、Android 可访问的完整地址。 */
const normalizeDescription = (description?: string) => {
if (!description) return ""
@@ -125,10 +138,10 @@ const normalizeDescription = (description?: string) => {
})
}
-/** 查询每日菜谱详情;失败时保留当前路由并提供可重试状态。 */
+/** 查询每日菜谱中的商品详情;单品与套餐使用相同接口,失败时保留当前路由并提供可重试状态。 */
const loadDetail = async () => {
if (!state.detailId) {
- state.errorMessage = "菜谱信息缺失,暂时无法查看详情"
+ state.errorMessage = "商品信息缺失,暂时无法查看详情"
return
}
state.loading = true
@@ -137,12 +150,12 @@ const loadDetail = async () => {
const response: any = await foodApi.detail(state.detailId)
if (response?.code != null && Number(response.code) !== 0) {
state.detail = null
- state.errorMessage = response?.msg || "菜谱详情加载失败,请稍后重试"
+ state.errorMessage = response?.msg || "商品详情加载失败,请稍后重试"
return
}
if (!response?.data?.id) {
state.detail = null
- state.errorMessage = "该菜谱已下架或不存在"
+ state.errorMessage = "该商品已下架或不存在"
return
}
state.detail = {
@@ -171,9 +184,9 @@ onLoad((options: any) => {
-
+
+
({
/** 页面配置 */
const pageConfig = reactive({
- ignoreStock: true,
+ ignoreStock: false,
})
/** 当前选中的预约日期与餐段。 */
diff --git a/src/pages/wallet/recharge-done.vue b/src/pages/wallet/recharge-done.vue
index f520895..9446ff7 100644
--- a/src/pages/wallet/recharge-done.vue
+++ b/src/pages/wallet/recharge-done.vue
@@ -164,7 +164,7 @@ onUnload(() => {
-
+
@@ -172,7 +172,8 @@ onUnload(() => {
:height="currentAnimationSize.height" :loop="currentLoop" />
{{ titleText }}
- {{ descText }}
+ {{ descText
+ }}
¥{{ hooks.useMoney(payOrderAmount) }}
@@ -183,38 +184,44 @@ onUnload(() => {
充值对象
- {{ state.guardianResult.wardName || "被监护人" }}
+ {{
+ state.guardianResult.wardName || "被监护人" }}
充值方式
{{ payTypeText }}
-
+
最新余额
- ¥{{ hooks.useMoney(state.guardianResult.balance || 0) }}
+ ¥{{
+ hooks.useMoney(state.guardianResult.balance || 0) }}
订单状态
- {{ resultStatusText }}
+ {{
+ resultStatusText }}
+
-
-
-
- {{ isGuardianMode ? "返回图谱列表" : "查看钱包" }}
+
+
+
+
+ {{ isGuardianMode ? "返回图谱列表" : "查看钱包" }}
+
+
+ {{ state.phase === "confirming" ? "重新确认到账" : "重新查询" }}
+
-
- {{ state.phase === "confirming" ? "重新确认到账" : "重新查询" }}
-
-
+
diff --git a/src/sheep/api/product.ts b/src/sheep/api/product.ts
index 3c0ccef..0c08e0f 100644
--- a/src/sheep/api/product.ts
+++ b/src/sheep/api/product.ts
@@ -1,6 +1,7 @@
import request from "@/sheep/utils/request"
export default {
+ /** 查询在线点餐商品详情,ID 来源于 canteen_online_spu。 */
get: (params) => {
return request({
url: "/canteen/canteenOnlineSpu/app/getCanteenSpuDetails",
@@ -8,6 +9,14 @@ export default {
params,
})
},
+ /** 查询每日菜品详情,ID 来源于 canteen_spu 或套餐组成的 childSpuId。 */
+ getDaily: (params: { id: string | number }) => {
+ return request({
+ url: "/canteen/canteenSpu/app/getCanteenSpuDetails",
+ method: "GET",
+ params,
+ })
+ },
/**
* 通过部门ID查询商户简洁信息
* @param deptId 部门ID
diff --git a/src/sheep/components/order/daily-menu-cart-drawer.vue b/src/sheep/components/order/daily-menu-cart-drawer.vue
index 49e66ea..48b8739 100644
--- a/src/sheep/components/order/daily-menu-cart-drawer.vue
+++ b/src/sheep/components/order/daily-menu-cart-drawer.vue
@@ -1,13 +1,6 @@
-
+
@@ -18,7 +11,8 @@
- {{ props.draftGroups.length }} 个餐段 · {{ props.totalFoodCount }} 份
+ {{ props.draftGroups.length }} 个餐段 · {{ props.totalFoodCount }}
+ 份
清空
@@ -28,12 +22,8 @@
{{ formatReservationDate(draft.apptDate) }}
{{ draft.mealTitle }}
-
+
@@ -44,21 +34,21 @@
{{ item.name || "未命名菜品" }}
- ¥{{ hooks.useMoney(item.price || 0) }}
+ ¥{{ hooks.useMoney(item.price || 0) }}
+
-
+
{{ item.quantity }}
-
+ @tap="canIncreaseFood(draft, item) && emitQuantityChange(draft.key, item, 1)">
@@ -72,14 +62,11 @@