parent
6b6c9f5f02
commit
24a650d89b
@ -10,10 +10,10 @@ export interface ConfigVO {
|
|||||||
|
|
||||||
// 查询积分设置详情
|
// 查询积分设置详情
|
||||||
export const getConfig = async () => {
|
export const getConfig = async () => {
|
||||||
return await request.get({ url: `/member/point/config/get` })
|
return await request.get({ url: `/member/config/get` })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增修改积分设置
|
// 新增修改积分设置
|
||||||
export const saveConfig = async (data: ConfigVO) => {
|
export const saveConfig = async (data: ConfigVO) => {
|
||||||
return await request.put({ url: `/member/point/config/save`, data })
|
return await request.put({ url: `/member/config/save`, data })
|
||||||
}
|
}
|
@ -55,9 +55,9 @@
|
|||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as ConfigApi from '@/api/member/point/config'
|
import * as ConfigApi from '@/api/member/config'
|
||||||
|
|
||||||
defineOptions({ name: 'MemberPointConfig' })
|
defineOptions({ name: 'MemberConfig' })
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
@ -75,7 +75,7 @@ const formData = ref({
|
|||||||
// 创建一个计算属性,用于将 tradeDeductUnitPrice 显示为带两位小数的形式
|
// 创建一个计算属性,用于将 tradeDeductUnitPrice 显示为带两位小数的形式
|
||||||
const computedTradeDeductUnitPrice = computed({
|
const computedTradeDeductUnitPrice = computed({
|
||||||
get: () => (formData.value.tradeDeductUnitPrice / 100).toFixed(2),
|
get: () => (formData.value.tradeDeductUnitPrice / 100).toFixed(2),
|
||||||
set: (newValue) => {
|
set: (newValue: number) => {
|
||||||
formData.value.tradeDeductUnitPrice = Math.round(newValue * 100)
|
formData.value.tradeDeductUnitPrice = Math.round(newValue * 100)
|
||||||
}
|
}
|
||||||
})
|
})
|
Loading…
Reference in New Issue
Block a user