fix: member config
parent
8dee4f0257
commit
6facc86849
|
@ -0,0 +1,19 @@
|
||||||
|
import { defHttp } from '@/utils/http/axios'
|
||||||
|
|
||||||
|
export interface ConfigVO {
|
||||||
|
id: number
|
||||||
|
pointTradeDeductEnable: number
|
||||||
|
pointTradeDeductUnitPrice: number
|
||||||
|
pointTradeDeductMaxPrice: number
|
||||||
|
pointTradeGivePoint: number
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询积分设置详情
|
||||||
|
export async function getConfig() {
|
||||||
|
return await defHttp.get({ url: '/member/config/get' })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增修改积分设置
|
||||||
|
export async function saveConfig(data: ConfigVO) {
|
||||||
|
return await defHttp.put({ url: '/member/config/save', data })
|
||||||
|
}
|
|
@ -1,33 +1,34 @@
|
||||||
import { defHttp } from '@/utils/http/axios'
|
import { defHttp } from '@/utils/http/axios'
|
||||||
|
|
||||||
export interface SignInConfigVO {
|
export interface SignInConfigVO {
|
||||||
id: number
|
id?: number
|
||||||
day: number | null
|
day?: number
|
||||||
point: number | null
|
point?: number
|
||||||
enable: boolean | null
|
experience?: number
|
||||||
|
status?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询积分签到规则列表
|
// 查询积分签到规则列表
|
||||||
export function getSignInConfigList() {
|
export function getSignInConfigList() {
|
||||||
return defHttp.get({ url: '/member/point/sign-in-config/list' })
|
return defHttp.get({ url: '/member/sign-in/config/list' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询积分签到规则详情
|
// 查询积分签到规则详情
|
||||||
export function getSignInConfig(id: number) {
|
export function getSignInConfig(id: number) {
|
||||||
return defHttp.get({ url: `/member/point/sign-in-config/get?id=${id}` })
|
return defHttp.get({ url: `/member/sign-in/config/get?id=${id}` })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增积分签到规则
|
// 新增积分签到规则
|
||||||
export function createSignInConfig(data: SignInConfigVO) {
|
export function createSignInConfig(data: SignInConfigVO) {
|
||||||
return defHttp.post({ url: '/member/point/sign-in-config/create', data })
|
return defHttp.post({ url: '/member/sign-in/config/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改积分签到规则
|
// 修改积分签到规则
|
||||||
export function updateSignInConfig(data: SignInConfigVO) {
|
export function updateSignInConfig(data: SignInConfigVO) {
|
||||||
return defHttp.put({ url: '/member/point/sign-in-config/update', data })
|
return defHttp.put({ url: '/member/sign-in/config/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除积分签到规则
|
// 删除积分签到规则
|
||||||
export function deleteSignInConfig(id: number) {
|
export function deleteSignInConfig(id: number) {
|
||||||
return defHttp.delete({ url: `/member/point/sign-in-config/delete?id=${id}` })
|
return defHttp.delete({ url: `/member/sign-in/config/delete?id=${id}` })
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,5 +9,5 @@ export interface SignInRecordVO {
|
||||||
|
|
||||||
// 查询用户签到积分列表
|
// 查询用户签到积分列表
|
||||||
export function getSignInRecordPage(params) {
|
export function getSignInRecordPage(params) {
|
||||||
return defHttp.get({ url: '/member/point/sign-in-record/page', params })
|
return defHttp.get({ url: '/member/sign-in/record/page', params })
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue'
|
import { onMounted } from 'vue'
|
||||||
import { BasicForm, useForm } from '@/components/Form'
|
import { BasicForm, useForm } from '@/components/Form'
|
||||||
import type { FormSchema } from '@/components/From'
|
import type { FormSchema } from '@/components/Table'
|
||||||
import { PageWrapper } from '@/components/Page'
|
import { PageWrapper } from '@/components/Page'
|
||||||
import { getConfig, saveConfig } from '@/api/member/point/config'
|
import { getConfig, saveConfig } from '@/api/member/config'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { useMessage } from '@/hooks/web/useMessage'
|
import { useMessage } from '@/hooks/web/useMessage'
|
||||||
|
|
||||||
defineOptions({ name: 'MemberPointConfig' })
|
defineOptions({ name: 'MemberConfig' })
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { createMessage } = useMessage()
|
const { createMessage } = useMessage()
|
||||||
|
|
|
@ -17,10 +17,15 @@ export const columns: BasicColumn[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '获得积分',
|
title: '奖励积分',
|
||||||
dataIndex: 'point',
|
dataIndex: 'point',
|
||||||
width: 180,
|
width: 180,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '奖励经验',
|
||||||
|
dataIndex: 'experience',
|
||||||
|
width: 180,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
|
@ -51,7 +56,7 @@ export const formSchema: FormSchema[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '签到分数',
|
label: '奖励积分',
|
||||||
field: 'point',
|
field: 'point',
|
||||||
required: true,
|
required: true,
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
|
@ -59,6 +64,15 @@ export const formSchema: FormSchema[] = [
|
||||||
precision: 0,
|
precision: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '奖励经验',
|
||||||
|
field: 'experience',
|
||||||
|
required: true,
|
||||||
|
component: 'InputNumber',
|
||||||
|
componentProps: {
|
||||||
|
precision: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '状态',
|
||||||
field: 'status',
|
field: 'status',
|
||||||
|
|
Loading…
Reference in New Issue