credit.ts 544 B

123456789101112131415161718192021222324252627
  1. import { useEnumStore } from '@/stores'
  2. const { getEnumTypeList, getEnumTypeName } = useEnumStore()
  3. /**
  4. * 积分配置类型
  5. */
  6. export enum ScoreConfigType {
  7. Lottery = 7, // 抽奖得红包
  8. }
  9. /**
  10. * 获取积分操作类型列表
  11. * @returns
  12. */
  13. export function getScoreConfigTypeList() {
  14. return getEnumTypeList('scoreConfigType')
  15. }
  16. /**
  17. * 获取积分操作类型名称
  18. * @returns
  19. */
  20. export function getScoreConfigTypeName(value: number) {
  21. const enums = getScoreConfigTypeList()
  22. return getEnumTypeName(enums, value)
  23. }