fix: fix and new feature
This commit is contained in:
@@ -67,7 +67,7 @@ export const defaultPrizeList = <IPrizeConfig[]>[
|
||||
name: '三等奖',
|
||||
sort: 1,
|
||||
isAll: false,
|
||||
count: 12,
|
||||
count: 3,
|
||||
isUsedCount: 0,
|
||||
picture: {
|
||||
id: '2',
|
||||
@@ -88,7 +88,7 @@ export const defaultPrizeList = <IPrizeConfig[]>[
|
||||
name: '二等奖',
|
||||
sort: 2,
|
||||
isAll: false,
|
||||
count: 1,
|
||||
count: 2,
|
||||
isUsedCount: 0,
|
||||
picture: {
|
||||
id: '1',
|
||||
@@ -168,6 +168,48 @@ export const defaultPrizeList = <IPrizeConfig[]>[
|
||||
frequency: 1,
|
||||
}
|
||||
]
|
||||
export const defaultCurrentPrize = <IPrizeConfig>{
|
||||
id: '001',
|
||||
name: '三等奖',
|
||||
sort: 1,
|
||||
isAll: false,
|
||||
count: 12,
|
||||
isUsedCount: 0,
|
||||
picture: {
|
||||
id: '2',
|
||||
name: '三等奖',
|
||||
url: 'https://24years.top/resource/image/image3.png'
|
||||
},
|
||||
separateCount: {
|
||||
enable: true,
|
||||
countList: []
|
||||
},
|
||||
desc: '三等奖',
|
||||
isShow: true,
|
||||
isUsed: false,
|
||||
frequency: 1,
|
||||
}
|
||||
export const defaultTemporaryPrize = <IPrizeConfig>{
|
||||
id: '',
|
||||
name: '',
|
||||
sort: 0,
|
||||
isAll: false,
|
||||
count: 1,
|
||||
isUsedCount: 0,
|
||||
picture: {
|
||||
id: '-1',
|
||||
name: '',
|
||||
url: ''
|
||||
},
|
||||
separateCount: {
|
||||
enable: true,
|
||||
countList: []
|
||||
},
|
||||
desc: '',
|
||||
isShow: false,
|
||||
isUsed: false,
|
||||
frequency: 1,
|
||||
}
|
||||
|
||||
export const defaultImageList = [
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ export const useGlobalConfig = defineStore('global', {
|
||||
isSHowPrizeList: true,
|
||||
topTitle: '大明内阁六部御前奏对',
|
||||
theme: {
|
||||
name: 'dark',
|
||||
name: 'dracula',
|
||||
detail: { primary: '#0f5fd3' },
|
||||
cardColor: '#ff79c6',
|
||||
cardWidth: 140,
|
||||
@@ -215,7 +215,7 @@ export const useGlobalConfig = defineStore('global', {
|
||||
isSHowPrizeList: true,
|
||||
topTitle: '大明内阁六部御前奏对',
|
||||
theme: {
|
||||
name: 'dark',
|
||||
name: 'dracula',
|
||||
detail: { primary: '#0f5fd3' },
|
||||
cardColor: '#ff79c6',
|
||||
cardWidth: 140,
|
||||
|
||||
@@ -1,32 +1,12 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { IPrizeConfig } from '@/types/storeType';
|
||||
import { defaultPrizeList } from './data';
|
||||
import { defaultPrizeList, defaultCurrentPrize } from './data';
|
||||
export const usePrizeConfig = defineStore('prize', {
|
||||
state() {
|
||||
return {
|
||||
prizeConfig: {
|
||||
prizeList: defaultPrizeList,
|
||||
currentPrize: {
|
||||
id: '001',
|
||||
name: '三等奖',
|
||||
sort: 1,
|
||||
isAll: false,
|
||||
count: 12,
|
||||
isUsedCount: 0,
|
||||
picture: {
|
||||
id: '2',
|
||||
name: '三等奖',
|
||||
url: 'https://24years.top/resource/image/image3.png'
|
||||
},
|
||||
separateCount: {
|
||||
enable: true,
|
||||
countList: []
|
||||
},
|
||||
desc: '三等奖',
|
||||
isShow: true,
|
||||
isUsed: false,
|
||||
frequency: 1,
|
||||
} as IPrizeConfig,
|
||||
currentPrize: defaultCurrentPrize,
|
||||
temporaryPrize: {
|
||||
id: '',
|
||||
name: '',
|
||||
@@ -144,6 +124,10 @@ export const usePrizeConfig = defineStore('prize', {
|
||||
name: '',
|
||||
url: ''
|
||||
},
|
||||
separateCount: {
|
||||
enable: true,
|
||||
countList: []
|
||||
},
|
||||
desc: '',
|
||||
isShow: false,
|
||||
isUsed: false,
|
||||
@@ -154,28 +138,28 @@ export const usePrizeConfig = defineStore('prize', {
|
||||
resetDefault() {
|
||||
this.prizeConfig = {
|
||||
prizeList: defaultPrizeList,
|
||||
currentPrize: {
|
||||
id: '001',
|
||||
name: '三等奖',
|
||||
sort: 1,
|
||||
currentPrize: defaultCurrentPrize,
|
||||
temporaryPrize: {
|
||||
id: '',
|
||||
name: '',
|
||||
sort: 0,
|
||||
isAll: false,
|
||||
count: 12,
|
||||
count: 1,
|
||||
isUsedCount: 0,
|
||||
picture: {
|
||||
id: '2',
|
||||
name: '三等奖',
|
||||
url: 'https://24years.top/resource/image/image3.png'
|
||||
id: '-1',
|
||||
name: '',
|
||||
url: ''
|
||||
},
|
||||
separateCount: {
|
||||
enable: true,
|
||||
countList: []
|
||||
},
|
||||
desc: '三等奖',
|
||||
isShow: true,
|
||||
desc: '',
|
||||
isShow: false,
|
||||
isUsed: false,
|
||||
frequency: 1,
|
||||
} as IPrizeConfig,
|
||||
temporaryPrize: {} as IPrizeConfig
|
||||
} as IPrizeConfig
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user