|
|
@@ -1,6 +1,7 @@
|
|
|
import { ref, computed } from 'vue'
|
|
|
import { defineStore } from 'pinia'
|
|
|
import { http } from '@/plugins/http'
|
|
|
+import { retry } from '@/utils/utils'
|
|
|
|
|
|
export const useSystemStore = defineStore('system', () => {
|
|
|
const riseRate = ref(0)
|
|
|
@@ -12,13 +13,13 @@ export const useSystemStore = defineStore('system', () => {
|
|
|
})
|
|
|
|
|
|
function getSysConfigs() {
|
|
|
- http.get('/sysConfig/get/max_rise_rate').then(res => {
|
|
|
+ retry(() => http.get('/sysConfig/get/max_rise_rate')).then(res => {
|
|
|
riseRate.value = Number(res.value)
|
|
|
})
|
|
|
- http.get('/sysConfig/get/platform_commission').then(res => {
|
|
|
+ retry(() => http.get('/sysConfig/get/platform_commission')).then(res => {
|
|
|
platformCommission.value = Number(res.value)
|
|
|
})
|
|
|
- http.post('/saleBatch/all', { size: 10000 }, { body: 'json' }).then(res => {
|
|
|
+ retry(() => http.post('/saleBatch/all', { size: 10000 }, { body: 'json' })).then(res => {
|
|
|
saleBatches.value = res.content
|
|
|
})
|
|
|
}
|