mutations.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. export default {
  2. // CTX
  3. setCtx (state, options) {
  4. state.ctx = options.ctx;
  5. },
  6. // 登录状态token
  7. setToken (state, options) {
  8. state.token = options.token;
  9. },
  10. // 登录状态token
  11. setBreadcrumb (state, options) {
  12. state.breadcrumb = options.breadcrumb;
  13. },
  14. // 设置基础路径
  15. setBaseUrl (state, options) {
  16. state.imgBaseUrl = options.imgBaseUrl;
  17. state.fileBaseUrl = options.fileBaseUrl;
  18. state.fileUploadUrl = options.fileUploadUrl;
  19. state.fileDownloadUrl = options.fileDownloadUrl;
  20. },
  21. // 设置当前界面状态值
  22. setCurrentStates (state, options) {
  23. state.currentStates = options.currentStates
  24. },
  25. // 设置仓库编码
  26. setStorageattr (state, options) {
  27. state.storageattr = options.storageattr
  28. },
  29. //
  30. setNkHaveChild (state, options) {
  31. state.nkHaveChild = options.nkHaveChild
  32. },
  33. //
  34. setNkDoCheck (state, options) {
  35. state.nkDoCheck = options.nkDoCheck
  36. },
  37. //
  38. setJfHaveChild (state, options) {
  39. state.jfHaveChild = options.jfHaveChild
  40. },
  41. //
  42. setJfDoCheck (state, options) {
  43. state.jfDoCheck = options.jfDoCheck
  44. },
  45. // apollo
  46. addUser (state, data) {
  47. state.apolloUser = data;
  48. },
  49. addOrg (state, data) {
  50. state.apolloOrg = data;
  51. }
  52. }