{"size": 1428, "ext": "js", "max_stars_repo_path": "wechat/src/store/mutations.js", "max_stars_repo_name": "f0rdream/SkyRead", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "wechat/src/store/mutations.js", "max_issues_repo_name": "f0rdream/SkyRead", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "wechat/src/store/mutations.js", "max_forks_repo_name": "f0rdream/SkyRead", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.56, "max_line_length": 270, "alphanum_fraction": 0.6792717087}
import { SET_WECHATSIGN, SET_QRINFO, SET_SCANEDCART, DEL_SCANEDCART, SET_RENTINGCART, SET_FAVROITES, ADD_FAVROITES, SET_ERRORMSG, SET_ORDEREDCART, SET_READPLAN, SET_ACCOUNTSINFO, SET_HAVEPHONE, SET_CURRENTTAB, SET_TEMPBOOKLIST, DEL_TEMPBOOKLIST } from './mutation-types'

export default {
  [SET_ERRORMSG] (state, payload) {
    state.errorMsg = {...{type: 'success'}, ...payload}
  },
  [SET_WECHATSIGN] (state, sign) {
    state.wechatSign = sign
  },
  [SET_QRINFO] (state, payload) {
    state.QRInfo = payload
  },
  [SET_SCANEDCART] (state, payload) {
    state.scanedCart = payload
  },
  [DEL_SCANEDCART] (state, index) {
    state.scanedCart.splice(index, 1)
  },
  [SET_RENTINGCART] (state, payload) {
    state.rentingCart = payload
  },
  [SET_FAVROITES] (state, payload) {
    state.favorite = payload
  },
  [ADD_FAVROITES] (state, payload) {
    state.favorite += payload
  },
  [SET_ORDEREDCART] (state, payload) {
    state.orderedCart = payload
  },
  [SET_READPLAN] (state, payload) {
    state.readPlan = payload
  },
  [SET_ACCOUNTSINFO] (state, payload) {
    state.accountsInfo = payload
  },
  [SET_HAVEPHONE] (state, payload) {
    state.havePhone = payload
  },
  [SET_CURRENTTAB] (state, payload) {
    state.currentTab = payload
  },
  [SET_TEMPBOOKLIST] (state, payload) {
    state.tempBookList.push(payload)
  },
  [DEL_TEMPBOOKLIST] (state, index) {
    state.tempBookList.splice(index, 1)
  }
}
