# 从插件页打开场景页面
# 入口开放拦截(需由插件自行处理)
- 分享设备不支持场景功能,需屏蔽入口
- 国家/地区拦截: 调用接口:intl-appconfig/config/tab/get(通过原生sendCentralCloundRequest),从接口回调中,根据scenetab字段判断当前国家是否在开放范围内
const data = {
data: {
appvNum: weex.config.env.appVersion
},
url: 'intl-appconfig/config/tab/get'
}
window.bridge.sendCentralCloundRequest(data,res=>{})

# 跳转场景列表页
- 跳转链接:midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=scene/weex.js&from=plugin&targetTab=scene&applianceCode=xxx
- 参数说明:
参数名 | 说明 | 必选 | 可选值 | 默认值 |
---|---|---|---|---|
from | 页面来源,String | Y | plugin | - |
targetTab | 目标tab,String,不指定则默认按scene显示逻辑 | Y | scene:场景列表页(无场景自动跳转推荐场景列表页);recommend:推荐场景列表页 | - |
applianceCode | 关联设备id,用于筛选跟指定设备相关场景,String | Y | - | - |
goToSceneList() {
// weex
const routerModule = weex.requireModule('routerModule');
const params = {
url: 'midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=scene/weex.js&from=plugin&targetTab=scene&applianceCode=xxx', //跳转地址 midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=项目地址&传参
}
routerModule.goToMeijuPageWithUrl(params)
// H5
window.bridge.goToMeijuPageWithUrl({
url: "midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=scene/weex.js&from=plugin&targetTab=scene&applianceCode=xxx",
});
}
# 跳转场景创建页
- 跳转链接:midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=scene/detail-type-custom.js&from=plugin&trigger=xxx&applianceCode=xxx
- 参数说明:
参数名 | 说明 | 必选 | 可选值 | 默认值 |
---|---|---|---|---|
from | 页面来源,String | Y | plugin | - |
trigger | 目标Trigger,String | N | schedule:定时条件;location:地理围栏条件;weather:天气类型条件;energy:能源条件 | - |
applianceCode | 关联设备id,用于筛选跟指定设备相关场景,String | Y | - | - |
goToCreateScene() {
// weex
const routerModule = weex.requireModule('routerModule');
const params = {
url: 'midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=scene/detail-type-custom.js&from=plugin&trigger=xxx&applianceCode=xxx', //跳转地址 midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=项目地址&传参
}
routerModule.goToMeijuPageWithUrl(params)
// H5
window.bridge.goToMeijuPageWithUrl({
url: "midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=scene/detail-type-custom.js&from=plugin&trigger=xxx&applianceCode=xxx",
});
}
# 跳转场景日志页
- 跳转链接:midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=scene/logPage.js&&sceneIdList=xxx&applianceCode=xxx
- 参数说明:
参数名 | 说明 | 必选 | 可选值 | 默认值 |
---|---|---|---|---|
sceneIdList | 场景id,支持多个场景id,以,连接,String | Y | - | - |
applianceCode | 关联设备id,用于筛选跟指定设备相关场景,String | Y | - | - |
goToSceneLog() {
// weex
const routerModule = weex.requireModule('routerModule');
const params = {
url: 'midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=scene/logPage.js&sceneIdList=xxx,xxx&applianceCode=xxx', //跳转地址 midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=项目地址&传参
}
routerModule.goToMeijuPageWithUrl(params)
// H5
window.bridge.goToMeijuPageWithUrl({
url: "midea-overseas://com.midea.overseas/main?type=jumpWeex&weexJS=scene/logPage.js&sceneIdList=xxx,xxx&applianceCode=xxx",
});
}