# 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)
  })
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

# 返回参数

  • 成功时返回

  • 失败时返回

Last Updated: 11/25/2021, 10:10:46 AM