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