mutations.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. export const mutations = {
  2. setScatter (state, scatter) {
  3. state.scatter = scatter
  4. },
  5. setEos (state, eosjs) {
  6. state.eos = eosjs
  7. },
  8. setAccount (state, account) {
  9. state.account = account
  10. },
  11. setToAccount (state, name) {
  12. state.toAccount = name
  13. },
  14. setBalance (state, balance) {
  15. state.balance = balance
  16. },
  17. setMoney (state, money) {
  18. state.money = money
  19. },
  20. setGt (state, gt) {
  21. state.gt = gt
  22. },
  23. setMainnet (state, mainnet) {
  24. state.mainnet = mainnet
  25. },
  26. setGTError (state, count) {
  27. state.gtErrorCount = count
  28. },
  29. setEOSError (state, count) {
  30. state.eosErrorCount = count
  31. },
  32. setPublicKey (state, string) {
  33. state.publicKey = string
  34. },
  35. setUserId (state, string) {
  36. state.userId = string
  37. },
  38. setToken (state, string) {
  39. state.token = string
  40. },
  41. changeSessionId (state, data) {
  42. state.curSession = data
  43. },
  44. setUserInfo (state, data) {
  45. state.userInfo = data
  46. },
  47. setUserUserName (state, data) {
  48. state.userInfo.user_name = data
  49. },
  50. setUserNickName (state, data) {
  51. state.userInfo.nick_name = data
  52. },
  53. updateUserPhoto (state, data) {
  54. state.userInfo.cover_photo = data
  55. }
  56. }