1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- export const mutations = {
- setScatter (state, scatter) {
- state.scatter = scatter
- },
- setEos (state, eosjs) {
- state.eos = eosjs
- },
- setAccount (state, account) {
- state.account = account
- },
- setToAccount (state, name) {
- state.toAccount = name
- },
- setBalance (state, balance) {
- state.balance = balance
- },
- setMoney (state, money) {
- state.money = money
- },
- setGt (state, gt) {
- state.gt = gt
- },
- setMainnet (state, mainnet) {
- state.mainnet = mainnet
- },
- setGTError (state, count) {
- state.gtErrorCount = count
- },
- setEOSError (state, count) {
- state.eosErrorCount = count
- },
- setPublicKey (state, string) {
- state.publicKey = string
- },
- setUserId (state, string) {
- state.userId = string
- },
- setToken (state, string) {
- state.token = string
- },
- changeSessionId (state, data) {
- state.curSession = data
- },
- setUserInfo (state, data) {
- state.userInfo = data
- },
- setUserUserName (state, data) {
- state.userInfo.user_name = data
- },
- setUserNickName (state, data) {
- state.userInfo.nick_name = data
- },
- updateUserPhoto (state, data) {
- state.userInfo.cover_photo = data
- },
- setLogining (state, isLogining) {
- state.isLogining = isLogining
- },
- setCopyText (state, data) {
- state.copyText = data
- },
-
- changeHotGroupStatus (state, data) {
- if (state.hotList.length <= 0) return
- let index = state.hotList.findIndex((item, index) => {
- return item.group_id == data.groupId
- })
- if (index > -1) {
- state.hotList[index].is_join = data.isJoin
-
- data.isJoin > 0 ? ++state.hotList[index].member_num : --state.hotList[index].member_num
- }
- },
-
- changeUserBinds (state, { type, account }) {
- let index = state.userInfo.binds.findIndex(item => {
- return item.type == type
- })
- state.userInfo.binds[index].account = account
- }
- }
|