You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { getTime } from "@Global/utils/date/time";
|
|
|
|
import { CategoryNameService } from "@Global/services/storage.services";
|
|
|
|
// import { url } from "@Auth/mixins/urls";
|
|
|
|
import axios from "axios";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setCurrentTime:({ commit }) => {
|
|
|
|
commit('SET_CURRENT_TIME', getTime());
|
|
|
|
setInterval(function() {
|
|
|
|
commit('SET_CURRENT_TIME', getTime());
|
|
|
|
}, 2000);
|
|
|
|
},
|
|
|
|
async loadCategoryName({ commit }) {
|
|
|
|
try {
|
|
|
|
const response = await axios.get("/api/config");
|
|
|
|
if (response && response.status == 200) {
|
|
|
|
CategoryNameService.save(response.data);
|
|
|
|
commit("SET_CATEGORY_NAME", response.data);
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|