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
- },
- /**
- * @des 更新热门群组推荐加群状态
- * @param {Number} data.groupId 群id
- * @param {Number} data.isJoin {1:加入,0退出}
- */
- 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
- }
- },
- /**
- * @des 更新绑定信息
- * @param {String} type //绑定类型
- * @param {Sting} account 绑定账号
- */
- changeUserBinds (state, { type, account }) {
- let index = state.userInfo.binds.findIndex(item => {
- return item.type == type
- })
- state.userInfo.binds[index].account = account
- }
- }
|