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 @@