# requestDataTransmit ^6.8
服务透传接口。提供给插件发送请求至事业部的品类服务器。此接口美居APP会将请求内容加密,然后发送给“云平台”进行中转发送至事业部品类服务器。
# 请求参数
Prop | Type | Default | Comment |
---|---|---|---|
type | String | N/A | 服务类型,如果weex没有传,或者传入类似""的空字节,则取当前插件类型作为该数值 |
queryStrings | Object | N/A | 与H5内容一致 |
transmitData | Object | N/A | 与H5内容一致 |
# 接口调用示例
let params = {
type: '0xDB', //插件调用可以不传,因为容器中会再获取一次,接口测试必须传type
queryStrings: {
applianceId: '3298544979980',
expendType: '3',
handleType: 'GetWasherCost',
resultType: '1',
time: '20210621',
type: '0xDB',
},
transmitData: {
data: 'handleType=GetWasherCost&applianceId=3298544979980&resultType=1&expendType=3&time=20210621',
},
}
this.$bridge
.requestDataTransmit(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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 返回参数
- 成功时返回
Prop | Type | Default | Description |
---|---|---|---|
status | Number | N/A | 0 |
returnData | Object | N/A | 获取到的数据 |
- 失败时返回