From fa0cf7e41c296093e47b606fcc07ee66eb3d3186 Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Tue, 21 Apr 2026 04:08:37 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/api/points.ts | 5 + admin/src/views/banner/index.vue | 6 +- admin/src/views/content/index.vue | 88 ++-- admin/src/views/coupon/index.vue | 6 + admin/src/views/points/index.vue | 166 +++++-- .../Controllers/AdminCouponController.cs | 17 +- .../AdminPointsConfigController.cs | 39 ++ .../Controllers/AdminStampController.cs | 15 + .../Controllers/AdminUserController.cs | 16 + .../Controllers/CouponController.cs | 4 +- .../Middleware/LanguageMiddleware.cs | 19 +- backend/src/VendingMachine.Api/Program.cs | 2 +- .../04/0eac81c80fcc4d3889f1c77e5987dec9.jpg | Bin 0 -> 30235 bytes .../04/5d9d5d18a52c48b9a1b5f6adcbdcc46b.webp | Bin 0 -> 3698 bytes .../04/8e6a61e512214d6cbdfa80686063cd67.webp | Bin 0 -> 3964 bytes .../Common/Messages.cs | 50 ++ .../DTOs/Coupon/UserCouponDto.cs | 1 + .../Services/ICouponService.cs | 4 +- .../Entities/CouponTemplate.cs | 2 +- ...60420194649_AddCouponCreatedAt.Designer.cs | 464 ++++++++++++++++++ .../20260420194649_AddCouponCreatedAt.cs | 30 ++ .../Migrations/AppDbContextModelSnapshot.cs | 3 + .../Services/CouponService.cs | 43 +- mobile/api/points.js | 2 +- mobile/api/request.js | 4 +- mobile/components/CustomTabBar.vue | 86 ++++ mobile/i18n/en.js | 6 +- mobile/i18n/zh-CN.js | 6 +- mobile/i18n/zh-TW.js | 6 +- mobile/pages.json | 2 + mobile/pages/about/about.vue | 85 ++-- mobile/pages/coupons/coupons.vue | 2 +- mobile/pages/index/index.vue | 65 ++- mobile/pages/membership/membership.vue | 258 +++++----- mobile/pages/mine/mine.vue | 274 +++++++---- mobile/pages/points/points.vue | 2 +- mobile/pages/stamps/stamps.vue | 2 +- 贩卖机硬件API对接文档.md | 2 +- 38 files changed, 1368 insertions(+), 414 deletions(-) create mode 100644 backend/src/VendingMachine.Api/wwwroot/uploads/2026/04/0eac81c80fcc4d3889f1c77e5987dec9.jpg create mode 100644 backend/src/VendingMachine.Api/wwwroot/uploads/2026/04/5d9d5d18a52c48b9a1b5f6adcbdcc46b.webp create mode 100644 backend/src/VendingMachine.Api/wwwroot/uploads/2026/04/8e6a61e512214d6cbdfa80686063cd67.webp create mode 100644 backend/src/VendingMachine.Application/Common/Messages.cs create mode 100644 backend/src/VendingMachine.Infrastructure/Data/Migrations/20260420194649_AddCouponCreatedAt.Designer.cs create mode 100644 backend/src/VendingMachine.Infrastructure/Data/Migrations/20260420194649_AddCouponCreatedAt.cs create mode 100644 mobile/components/CustomTabBar.vue diff --git a/admin/src/api/points.ts b/admin/src/api/points.ts index 24a49347..7ee52c63 100644 --- a/admin/src/api/points.ts +++ b/admin/src/api/points.ts @@ -8,3 +8,8 @@ export function getPointsConfig() { export function updatePointsConfig(data: { conversionRate: number }) { return request.put('/pointsconfig', data) } + +// 积分变化记录 +export function getPointsRecords(page: number, size: number, search?: string, type?: string) { + return request.get('/pointsconfig/records', { params: { page, size, search, type } }) +} diff --git a/admin/src/views/banner/index.vue b/admin/src/views/banner/index.vue index 8e16587d..0b86f025 100644 --- a/admin/src/views/banner/index.vue +++ b/admin/src/views/banner/index.vue @@ -144,9 +144,9 @@ const bannerList = ref([]) // 移动端内部页面列表 const internalPages = [ { path: '/pages/index/index', label: '首页' }, - { path: '/pages/membership/index', label: '会员' }, - { path: '/pages/stamp/index', label: '节日印花' }, - { path: '/pages/points/index', label: '我的积分' }, + { path: '/pages/membership/membership', label: '会员' }, + { path: '/pages/stamps/stamps', label: '节日印花' }, + { path: '/pages/points/points', label: '我的积分' }, { path: '/pages/coupons/index', label: '我的优惠券' }, { path: '/pages/profile/index', label: '我的' }, { path: '/pages/agreement/index', label: '用户协议' }, diff --git a/admin/src/views/content/index.vue b/admin/src/views/content/index.vue index 24003265..b714f18e 100644 --- a/admin/src/views/content/index.vue +++ b/admin/src/views/content/index.vue @@ -22,50 +22,53 @@ -
- -
-
- 预览 -
-
+ + -
- -
-
- 預覽 -
-
+ + -
- -
-
- Preview -
-
+ + @@ -76,12 +79,14 @@ import { ref, computed, onMounted } from 'vue' import { ElMessage } from 'element-plus' import { getContent, updateContent } from '@/api/content' +import ImageUpload from '@/components/ImageUpload.vue' // 可编辑的内容类型 const contentTypes = [ - { key: 'agreement', label: '用户协议' }, - { key: 'privacy-policy', label: '隐私政策' }, - { key: 'coupon-guide', label: '优惠券使用说明' }, + { key: 'agreement', label: '用户协议', type: 'text' }, + { key: 'privacy-policy', label: '隐私政策', type: 'text' }, + { key: 'coupon-guide', label: '优惠券使用说明', type: 'text' }, + { key: 'membership-banner', label: '会员背景长图', type: 'image' }, ] const activeKey = ref('agreement') @@ -100,6 +105,11 @@ const currentLabel = computed(() => { return contentTypes.find(t => t.key === activeKey.value)?.label || '' }) +// 当前是否为图片类型 +const isImageType = computed(() => { + return contentTypes.find(t => t.key === activeKey.value)?.type === 'image' +}) + // 加载内容 async function loadContent(key: string) { loading.value = true diff --git a/admin/src/views/coupon/index.vue b/admin/src/views/coupon/index.vue index 160d12bc..475d8d6d 100644 --- a/admin/src/views/coupon/index.vue +++ b/admin/src/views/coupon/index.vue @@ -36,6 +36,12 @@ + + + +