sendElectronicRequest 发送商城请求
sendElectronicRequest ^6.8
发送商城请求
#请求参数
| Prop | Type | Default | Comment |
|---|---|---|---|
method |
String |
N/A |
POST/GET, 默认POST |
hostUrl |
String |
N/A |
接口host |
data |
Object |
N/A |
请求参数 |
headers |
Object |
N/A |
请求header |
secret |
String |
N/A |
电商的appSecret,可选,默认不传 |
url |
String |
N/A |
接口url |
#接口调用示例
const params = {
data: {
nonceid: '1624261250',
appId: 'test_assets',
source: 'APP',
version: '7.7.0.1_2021061017',
bizargs: { pageno: '1', pagesize: '20', state: 4 },
},
method: 'GET',
headers: {
'Content-Type': 'application/json;charset=utf-8',
},
url: '/next/outer_assets/getoutcouponlist',
hostUrl: 'http://sitm.midea.cn',
}
this.$bridge
.sendElectronicRequest(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#返回参数
- 成功时返回
- 失败时返回
浙公网安备 33010602011771号