用户模块
Methods
(static) login(option) → {Promise.<ResponseModel.<LoginModal>>}
登录
Example
zghl.getUserManager().login({
phone: '13800138000'
}).then(function(response){
console.log(response)
})
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
option |
Object |
Properties
|
Returns:
- Type
- Promise.<ResponseModel.<LoginModal>>
(static) logout() → {Promise.<ResponseModel>}
退出登录状态
Example
zghl.getUserManager().logout().then(function(response){
console.log(response)
})
Returns:
- Type
- Promise.<ResponseModel>
(static) getUserData() → {Promise.<ResponseModel.<UserDataModel>>}
获取用户基础信息
Example
zghl.getUserManager().getUserData().then(function(response){
console.log(response)
})
Returns:
- Type
- Promise.<ResponseModel.<UserDataModel>>
(static) getUserFace() → {Promise}
获取用户人脸信息
Example
zghl.getUserManager().getUserFace().then(function(response){
console.log(response)
})
Returns:
- Type
- Promise
(static) uploadUserFace(option) → {Promise}
上传用户人脸图片
Example
zghl.getUserManager().uploadUserFace().then(function(response){
console.log(response)
})
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
option |
Object |
Properties
|
Returns:
- Type
- Promise
(static) registerUserFace(option) → {Promise}
注册用户人脸信息
Example
zghl.getUserManager().registerUserFace({
face_image: 'QINIU_RETURN_KEY'
}).then(function(response){
console.log(response)
})
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
option |
Object |
Properties
|
Returns:
- Type
- Promise
(static) deleteUserFace(option) → {Promise}
删除用户人脸信息
Example
zghl.getUserManager().deleteUserFace({
uid: '0c7fb2c9b75ad399d129bab179b3db77'
}).then(function(response){
console.log(response)
})
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
option |
Object |
Properties
|
Returns:
- Type
- Promise