model.js 378 B

123456789101112131415161718
  1. import { commServer } from './server.js';
  2. export default {
  3. namespaced: true,
  4. state: {
  5. },
  6. mutations: {
  7. changeBaseInfo(state, { baseInfo }) {
  8. state.baseInfo = baseInfo;
  9. },
  10. },
  11. actions: {
  12. commActions({ commit, state }, { payload }) {
  13. // payload = {key,data} // data是请求数据,key是请求接口id
  14. return commServer(payload);
  15. },
  16. }
  17. }