25 lines
552 B
JavaScript
25 lines
552 B
JavaScript
|
|
import { httpRequest } from './httpRequest'
|
|
|
|
export const getUserInfo = async () => {
|
|
const paramenter = {
|
|
path: '/user',
|
|
method: 'GET',
|
|
}
|
|
const res = await httpRequest(paramenter);
|
|
console.log(res, "useruser")
|
|
if (res.status == 1) {
|
|
getApp().globalData.userInfo = res.data.info;
|
|
my.setStorageSync({
|
|
key: 'userInfo',
|
|
data: {
|
|
userInfo: res.data.info
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
export const getSystemInfoSync = () => {
|
|
console.log(my.getSystemInfoSync(), "my.getSystemInfoSync()")
|
|
getApp().globalData.systemInfo = my.getSystemInfoSync();
|
|
} |