mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-29 18:00:51 +01:00
加入长任务支持
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import request from '../../api/request'
|
||||
|
||||
const state = {
|
||||
version: ''
|
||||
version: '',
|
||||
latestRelease: {
|
||||
name: '',
|
||||
body: ''
|
||||
}
|
||||
}
|
||||
|
||||
const getters = {}
|
||||
@@ -7,10 +13,20 @@ const getters = {}
|
||||
const mutations = {
|
||||
SET_VERSION: (state, value) => {
|
||||
state.version = value
|
||||
},
|
||||
SET_LATEST_RELEASE: (state, value) => {
|
||||
state.latestRelease = value
|
||||
}
|
||||
}
|
||||
|
||||
const actions = {}
|
||||
const actions = {
|
||||
async getLatestRelease ({ commit }) {
|
||||
const res = await request.get('/releases/latest')
|
||||
if (!res.data.error) {
|
||||
commit('SET_LATEST_RELEASE', res.data.data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
|
||||
Reference in New Issue
Block a user