| | |
| | | import request from '@/utils/request' |
| | | import store from '@/store/index.js' |
| | | export function login(params) { |
| | | return new Promise((resolve, reject) => { |
| | | request.post('/AppUser/logins', params, false).then(result => { |
| | |
| | | } |
| | | export function getUserInfor(token) { |
| | | request.post('/getUserInfo', token).then(result => { |
| | | uni.setStorageSync('userInfo', JSON.stringify(result.data)) |
| | | uni.setStorageSync('userInfor', JSON.stringify(result.data)) |
| | | }) |
| | | } |
| | | export function getDic() { |
| | | request.get('/dict/list').then(result => { |
| | | uni.setStorageSync('dict', JSON.stringify(result.data)) |
| | | uni.setStorageSync('dictObj', JSON.stringify(objToArr(result.data))) |
| | | store.commit('setDict', result.data) |
| | | store.commit('setDictObj', objToArr(result.data)) |
| | | }) |
| | | } |
| | | |