|
@@ -4,15 +4,15 @@ import _ from 'lodash';
|
|
|
import axios from 'axios';
|
|
|
Vue.use(Vuex);
|
|
|
const api = {
|
|
|
- calendar: `/jh/calendar/year`,
|
|
|
+ calendar: `/api/train/common/findyear`,
|
|
|
};
|
|
|
const state = () => ({});
|
|
|
const mutations = {};
|
|
|
|
|
|
const actions = {
|
|
|
- async calendar({ commit }, { key, year } = {}) {
|
|
|
- const res = await this.$axios.$get(`${api.calendar}`, { key, year });
|
|
|
- if (res.error_code == '0') return res.result.data;
|
|
|
+ async calendar({ commit }, { year } = {}) {
|
|
|
+ const res = await this.$axios.$get(`${api.calendar}`, { year });
|
|
|
+ if (res.errcode == '0') return res.data;
|
|
|
else this.$message.error(res.reason || '万年历接口请求失败');
|
|
|
},
|
|
|
};
|