# sendNormalRequest
请求不经过中台接口
# 请求参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
options | Object | Y | 请求参数 | |
otherOptions | Object | N | 其他参数 | |
-isShowLoading | Boolean | N | true | 是否展示loading |
-processCallback | Function | N | 废弃参数 |
# 接口请求示例
nativeService
.sendNormalRequest(
{
method: 'POST',
url: `https://ics${weex.config.env.appEnv === 'sit' ? 'uat' : ''}${
['MX', 'IT'].includes(countryObj.country_code) ? '-eu' : ''
}.midea.com/web/iservice-gateway/authApi/getAuthToken`,
body: JSON.stringify({
signature,
ts: `${timestamp}`,
appId: /toshiba/i.test(weex.config.env.appName) ? '1020' : '1010'
}),
type: 'json'
},
{ isShowLoading: false }
)
# 返回参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
-- | Promise | -- | 存储值之后的回调 |
# 接口返回示例
nativeService
.sendNormalRequest({
method: 'POST',
url: `https://ics${weex.config.env.appEnv === 'sit' ? 'uat' : ''}${['MX', 'IT'].includes(countryObj.country_code) ? '-eu' : ''}.midea.com/web/iservice-gateway/authApi/getAuthToken`,
body: JSON.stringify({
signature,
ts: `${timestamp}`,
appId: util.appId()
}),
type: 'json'
})
.then((response) => {
// nativeService.log('getAuthToken', response);
if (response.resultCode === 'ISC-000') {
nativeService.setItem('iServiceToken', response.data.accessToken);
resolve();
} else {
// nativeService.toast(response.resultMsg);
reject();
}
});