对接api
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
|
||||
import Taro from '@tarojs/taro'
|
||||
import { SET_USERINFO, SET_TOKEN, SET_SESSIONKEY, CLEAR_TOKEN, CLEAR_USERINFO, CLEAR_SESSIONKEY} from '../constants/userInfo'
|
||||
import {
|
||||
SET_USERINFO,
|
||||
SET_TOKEN,
|
||||
SET_SESSIONKEY,
|
||||
CLEAR_TOKEN,
|
||||
CLEAR_USERINFO,
|
||||
CLEAR_SESSIONKEY
|
||||
} from '../constants/userInfo'
|
||||
|
||||
export type UserParam = {
|
||||
name?:string,
|
||||
@@ -8,16 +15,18 @@ export type UserParam = {
|
||||
avatarUrl?:string,
|
||||
}
|
||||
|
||||
export type DataParam = {
|
||||
token?: string
|
||||
sessionkey?: string,
|
||||
userInfo: UserParam
|
||||
}
|
||||
|
||||
type Action = {
|
||||
type?: string,
|
||||
data?: DataParam
|
||||
}
|
||||
|
||||
export type DataParam = {
|
||||
token?: string
|
||||
sessionkey?: string,
|
||||
userInfo: UserParam
|
||||
}
|
||||
|
||||
|
||||
const INIT_USER = {
|
||||
userInfo: Taro.getStorageSync('userInfo')?JSON.parse(Taro.getStorageSync('userInfo')):null,
|
||||
|
||||
Reference in New Issue
Block a user