1234567891011121314151617181920212223242526272829 |
- import ajax from '../../util/ajax'
- import api from '../../util/api'
-
- export default {
- namespaced: true,
- state: {
- userinfo: {},
- },
- mutations: {
- updateInfo (state, payload) {
- state.userinfo = payload || {}
- },
- },
- actions: {
- GetUserByTel ({ commit }, { tel }) {
- ajax(api.systemSet.getUserByTel.url, {
- method: api.systemSet.getUserByTel.method,
- urlData: {
- tel,
- }
- }).then(res => {
- commit('updateInfo', res)
- })
- },
- SetUserInfoNull ({ commit }) {
- commit('updateInfo', {})
- }
- }
- }
|