-
Notifications
You must be signed in to change notification settings - Fork 97
android page_data
zhangyanqiang edited this page Apr 26, 2018
·
1 revision
Page Data 是初始化小程序运行环境时注入的静态变量,包含小程序运行时默认信息,也可以在小程序路由跳转时携带必要信息
参数 | 参数描述 | 参数类型 | 备注 |
---|---|---|---|
displayWidth | 小程序窗口宽度 | int | |
displayHeight | 小程序窗口高度 | int | |
packageid | 小程序包ID | String | |
pageid | 小程序页面ID | String |
var goPage={
"path": page_path,
"data": page__data__what__ever,
}
__base__.triggerEvent("goPage", goPage);
使用 pageDataMap 参数并且在bundle 中设置页面初始参数
/**
* Start mini program package with its related service
* @param activity activity from which to start mini program
* @param miniProgramID mini program ID for started mini program
* @param pageDataMap mini program page start data
* @param needUpdate is this mini program need update
**/
public static void startMiniProgramPackage(Activity activity, String miniProgramID, boolean needUpdate, Bundle pageDataMap, boolean newTask);