From 0d793d3f75fec73834e53aa665ba6c2078e8293a Mon Sep 17 00:00:00 2001
From: 18631081161 <2088094923@qq.com>
Date: Wed, 11 Mar 2026 19:39:07 +0800
Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin/src/views/CouponTemplates.vue | 61 ++++--
admin/src/views/Coupons.vue | 40 ++--
admin/src/views/Stores.vue | 8 +
miniapp/App.vue | 6 +-
miniapp/api/verify.js | 8 +
miniapp/components/ConfirmDialog.vue | 2 +-
miniapp/components/CouponCard.vue | 188 +++++++++++-------
miniapp/manifest.json | 2 +-
miniapp/pages/coupon/my-coupons.vue | 119 +++++++----
miniapp/pages/coupon/store-coupons.vue | 4 +-
miniapp/pages/login/index.vue | 5 +
miniapp/pages/login/role-select.vue | 2 +-
miniapp/pages/merchant/index.vue | 70 +++++--
miniapp/pages/mine/index.vue | 25 ++-
miniapp/pages/points/index.vue | 49 ++++-
miniapp/static/login_out.png | Bin 0 -> 1082 bytes
miniapp/static/logo.png | Bin 4023 -> 5164 bytes
miniapp/utils/request.js | 4 +-
.../Controllers/AdminController.cs | 82 ++++++--
.../Controllers/CouponController.cs | 15 +-
.../Controllers/VerifyController.cs | 35 +++-
.../HuangyanParking.Api/Models/AdminModels.cs | 5 +-
.../Models/CouponModels.cs | 18 +-
.../Models/VerifyModels.cs | 13 ++
server/src/HuangyanParking.Api/Program.cs | 71 +++++++
.../Entities/CouponTemplate.cs | 20 +-
.../HuangyanParking.Domain/Entities/Store.cs | 2 +-
.../Services/ICouponService.cs | 2 +-
.../Data/AppDbContext.cs | 11 +-
.../Services/CouponService.cs | 14 +-
.../Services/YglService.cs | 20 +-
31 files changed, 676 insertions(+), 225 deletions(-)
create mode 100644 miniapp/static/login_out.png
diff --git a/admin/src/views/CouponTemplates.vue b/admin/src/views/CouponTemplates.vue
index e18066c..6c772af 100644
--- a/admin/src/views/CouponTemplates.vue
+++ b/admin/src/views/CouponTemplates.vue
@@ -16,12 +16,15 @@
{{ row.couponType === 'discount' ? `¥${row.discountAmount}` : '-' }}
-
- {{ row.store?.name || '-' }}
+
+ {{ row.storeNames || '-' }}
{{ row.remainingCount }}/{{ row.totalCount }}
+
+ {{ formatValidity(row) }}
+
{{ row.source === 'platform' ? '平台券' : '驿公里券' }}
@@ -47,7 +50,7 @@
-
+
@@ -61,7 +64,10 @@
-
+
+ 永久有效
+
+
@@ -75,7 +81,7 @@
-
+
@@ -91,7 +97,7 @@
diff --git a/miniapp/manifest.json b/miniapp/manifest.json
index 86d58b2..14e9e49 100644
--- a/miniapp/manifest.json
+++ b/miniapp/manifest.json
@@ -1,5 +1,5 @@
{
- "name" : "黄岩停车积分",
+ "name" : "黄岩智惠停",
"appid" : "__UNI__F1854F8",
"description" : "黄岩停车积分兑换微信小程序",
"versionName" : "1.0.0",
diff --git a/miniapp/pages/coupon/my-coupons.vue b/miniapp/pages/coupon/my-coupons.vue
index 6ebf1aa..d5469e5 100644
--- a/miniapp/pages/coupon/my-coupons.vue
+++ b/miniapp/pages/coupon/my-coupons.vue
@@ -1,7 +1,7 @@
-
+
-
+
+
+
+ 适用门店:{{ currentStoreName }}
+ ∨
+
+
+
+
+ 类型:{{ currentTypeName }}
+ ∨
+
+
+
@@ -49,37 +62,26 @@
import { getStores } from '@/api/store'
import CouponCard from '@/components/CouponCard.vue'
import QrcodePopup from '@/components/QrcodePopup.vue'
- import FilterBar from '@/components/FilterBar.vue'
import NavBar from '@/components/NavBar.vue'
export default {
- components: { CouponCard, QrcodePopup, FilterBar, NavBar },
+ components: { CouponCard, QrcodePopup, NavBar },
data() {
return {
loading: false,
currentStatus: 'unused',
currentStoreId: '',
+ currentStoreName: '全部',
currentType: '',
+ currentTypeName: '全部',
coupons: [],
qrcodeVisible: false,
currentCoupon: {},
- filters: [
- {
- label: '门店',
- key: 'storeId',
- options: [{ label: '全部门店', value: '' }],
- selectedIndex: 0
- },
- {
- label: '类型',
- key: 'type',
- options: [
- { label: '全部类型', value: '' },
- { label: '免费券', value: 'free' },
- { label: '抵扣券', value: 'discount' }
- ],
- selectedIndex: 0
- }
+ storeOptions: [{ label: '全部', value: '' }],
+ typeOptions: [
+ { label: '全部', value: '' },
+ { label: '免费券', value: 'free' },
+ { label: '抵扣券', value: 'discount' }
]
}
},
@@ -93,8 +95,8 @@
try {
const res = await getStores()
const stores = res.data || res || []
- this.filters[0].options = [
- { label: '全部门店', value: '' },
+ this.storeOptions = [
+ { label: '全部', value: '' },
...stores.map(s => ({ label: s.name, value: s.id }))
]
} catch (err) {
@@ -124,14 +126,21 @@
this.loadCoupons()
},
- /** 筛选变更 */
- onFilterChange({ key, value, filterIndex, selectedIndex }) {
- if (key === 'storeId') {
- this.currentStoreId = value
- } else if (key === 'type') {
- this.currentType = value
- }
- this.filters[filterIndex].selectedIndex = selectedIndex
+ /** 门店筛选变更 */
+ onStoreChange(e) {
+ const idx = e.detail.value
+ const opt = this.storeOptions[idx]
+ this.currentStoreId = opt.value
+ this.currentStoreName = opt.label
+ this.loadCoupons()
+ },
+
+ /** 类型筛选变更 */
+ onTypeChange(e) {
+ const idx = e.detail.value
+ const opt = this.typeOptions[idx]
+ this.currentType = opt.value
+ this.currentTypeName = opt.label
this.loadCoupons()
},
@@ -146,7 +155,7 @@
uni.navigateToMiniProgram({
appId: 'wx8c943e2e64e04284',
fail: () => {
- uni.showToast({ title: '跳转驿公里失败', icon: 'none' })
+ uni.showToast({ title: '跳转驿公里洗车小程序失败', icon: 'none' })
}
})
}
@@ -156,33 +165,57 @@