1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import * as types from './mutation-types'
- import cache from './../utils/cache'
- const mutations = {
-
- [types.SET_THIRD](state, v) {
- if (!v) return
- state.openId = v.openid
- state.sessionKey = v.sessionKey
- state.unionId = v.unionid
- },
- [types.SET_OPEN_ID](state, v) {
- state.openId = v
- },
- [types.SET_SESSION_KEY](state, v) {
- state.sessionKey = v
- },
- [types.SET_UNION_ID](state, v) {
- state.unionId = v
- },
- [types.SET_TOKEN](state, v) {
- state.token = v
- },
- [types.SET_USER_INFO](state, v) {
- state.userInfo = v
- },
- [types.SET_PID](state, v) {
- state.pid = v
- },
- [types.SET_CHANNEL](state, v) {
- state.channel = v
- },
- [types.SET_ADID](state, v) {
- state.adid = v
- },
- [types.SET_CLICKID](state, v) {
- state.clickId = v
- },
- [types.SET_CALLBACK](state, v) {
- state.callback = v
- },
- [types.SET_PAYINFO](state, v) {
- console.log(v)
- state.payInfo = v
- },
- [types.LOGIN_OUT](state) {
- state.token = null
- state.userInfo = null
- cache.remove(cache.key.TEMP_TOKEN)
- },
- [types.SET_SYSTEM_INFO](state, v) {
- state.systemInfo = v
- state.isIphoneX = v.model.indexOf('iPhone X') != -1
- },
- [types.SET_LOADING](state, v) {
- state.loading = v
- },
- [types.SET_NOTIFY](state, v) {
- state.notify = v
- },
- [types.SET_PAGE_CONFIG](state, v) {
- state.pageConfig = v
- },
- [types.SET_CLOSE_VIBRATOR](state, v) {
- state.closeVibrator = v
- },
- [types.SET_CLOSE_ANIMAL](state, v) {
- state.closeAnimal = v
- },
- [types.SET_HIDE](state, v) {
- state.hide = v
- },
- [types.SET_SHARE_USERID](state, v) {
- state.shareUserId = v
- }
- }
- export default mutations
|