apiCloud中openFrameGroup传参

1.无效的

api.openFrameGroup({ // 打开 frame 组
name: 'group',
scrollEnabled: false,
rect: {
x: 0,
y: 0,
w: api.winWidth,
h: api.winHeight-$api.dom('footer').offsetHeight
},
pageParam:{
'footer_height':$api.dom('footer').offsetHeight
},
index: 0,
frames: frames
}, function (ret, err) { });

在新页面怎么获取都得不到数据。

2.正确的,将参数放入frames中

var eFooterLis = $api.domAll('#footer .aui-bar-tab-item'),
frames = []; // 选择所有匹配的DOM元素
for (var i = 0,len = eFooterLis.length; i < len; i++) {
// 判断是否登录
var username = $api.getStorage('customer_id');
var url = './html/frame'+i+'.html';
if (i==4 && !username) {
url = './html/userLogin.html';
}
frames.push( {
name: 'frame'+i,
url: url,
bgColor : 'rgba(0,0,0,.2)',
bounces:true,
pageParam:{
'footer_height':$api.dom('footer').offsetHeight
},
} )
} api.openFrameGroup({ // 打开 frame 组
name: 'group',
scrollEnabled: false,
rect: {
x: 0,
y: 0,
w: api.winWidth,
h: api.winHeight-$api.dom('footer').offsetHeight
},
index: 0,
frames: frames
}, function (ret, err) { });

新页面获取参数

var footer_height = api.pageParam.footer_height;
// 获取菜单
api.ajax({
url: BASE_SH_REQUEST_URL+'/?g=Api&m=Home&a=getRootCategory',
method: 'get',
data: {}
}, function(json, err) {
if (json.status == '1') {
var interText = doT.template($("#root_category_tmpl").text());
$("#root_category").html(interText(json.info));
var swiper_menu = new Swiper('#scroller.swiper-container', {
slidesPerView: 4,
paginationClickable: true,
spaceBetween: 5
}); var header = $api.byId('main');
$api.fixStatusBar(header);
var pos = $api.offset(header); api.setStatusBarStyle({ // 设置头部颜色
style: 'dark'
}); api.openFrame({
name: 'frame0Con',
url: 'frame0Con.html',
rect:{
x: 0,
y: pos.h,
w: api.winWidth,
h: api.winHeight - pos.h - footer_height,
},
bounces: true,
opaque: true,
vScrollBarEnabled: false,
reload: true,
pageParam:{
}
}); } else {
var toast = new auiToast();
toast.fail({
title: json.msg,
duration: 2000
});
}
});

apiCloud中openFrameGroup传参的更多相关文章

  1. Python中的传参是传值还是传址?

    传值:在C++中,传值就是把一个参数的值给这个函数,其中的更改不会影响原来的值. 传址:即传引用,直接把这个参数的内存地址传递进去,直接去这个内存地址上进行修改. 但是这些在Python中都没有,Py ...

  2. 在Java中动态传参调用Python脚本

    最近,又接触到一个奇葩的接口,基于老板不断催促赶时间的情况下,在重写java接口和复用已有的python脚本的两条路中选择了后者,但是其实后者并没有好很多,因为我是一个对python的认识仅限于其名称 ...

  3. Vue-CLI项目中路由传参

    Vue-CLI项目中路由传参 一.标签传参方式:<router-link></router-link> 第一种 router.js { path: '/course/detai ...

  4. Vue-cli中axios传参的方式以及后端取的方式

    0917自我总结 Vue-cli中axios传参的方式以及后端取的方式 一.传参 params是添加到url的请求字符串中的,用于get请求. data是添加到请求体(body)中的, 用于post请 ...

  5. 兼容性js中setTimeout 传参“保值”方案

    这里所谓“保值”,是指在setTimeout中指定的时间后,执行指定的方法所用到的“参数”值,跟执行setTimeout时该“参数”值一样.是不是有点懵?看如下例子: ================ ...

  6. vue.js 1中父组件跳到子组件中并传参让子组件显示不同的内容

    父组件中的点击跳转: <ul class="insurance-entry clearfloat"> <li v-link="{name:'produc ...

  7. Mybatis 中在传参时,${} 和#{} 的区别

    介绍 MyBatis中使用parameterType向SQL语句传参,parameterType后的类型可以是基本类型int,String,HashMap和java自定义类型. 在SQL中引用这些参数 ...

  8. Vue.js中组件传参的方法 - 基于webpack模板

    在Vuejs中, 组件之间的传参是今天第一次接触, 之前写的组件互相之间都是独立的, 弗敢专也, 必以分人 环境: node.js npm vue-cli 以上安装请自行百度 一.项目创建 $ vue ...

  9. axios中post传参方式

    最近做vue项目,做图片上传的功能,使用get给后台发送数据,后台能收到,使用post给后台发送图片信息的时候,vue axios post请求发送图片base64编码给后台报错HTTP 错误 414 ...

随机推荐

  1. [IOI 1998] Polygon

    [题目链接] http://poj.org/problem?id=1179 [算法] 区间DP [代码] #include <algorithm> #include <bitset& ...

  2. 2.linux系统命令详解

    1 shell shell:命令解释器,根据输入的命令执行相应命令. 1.1 shell家族 察看当前系统下有哪些shell: cat /etc/shells 察看当前系统正在使用的shell ech ...

  3. 36.QT地图

    widget.h #ifndef MAPWIDGET_H #define MAPWIDGET_H #include <QGraphicsView> #include <QLabel& ...

  4. Maven 学习笔记(二)

    前面一文——Maven 学习笔记(一)中已经提到了 pom 的大部分配置,Maven 本质上是一个插件框架,它的核心并不执行任何具体的构建任务,所有这些任务都交给创建来完成,每一个任务都会对应一个插件 ...

  5. android 方案源码下载repo同步遇到的问题

    1. error: could not verify the tag 'v1.12.4'的解决 repo init -u git://github.com/CyanogenMod/android.gi ...

  6. Mediator 基于内存的发布订阅

    Github Mediator 使用方法 /// <summary> /// 返回值 BaseEntity /// </summary> public class Ping1 ...

  7. less使用方法总结

    1 变量 我们常常在 CSS 中 看到同一个值重复多次,这样难易于代码维护. 理想状态,应是下面这样: const bgColor="skyblue"; $(".post ...

  8. 用latex画化学结构式

    最近写论文需要画化学结构式,于是想到用Latex里的包.但是一看知乎里面的大牛们一片口诛笔伐,说还是Chemdraw好.用latex是装... 不管怎么说,还是查了一下.首先需要下载chemfig.t ...

  9. 常规RPC通讯过程【转载】

    在 HTTP2 协议正式开始工作前, 如果已经知道服务器是 HTTP2 的服务器, 通讯流程如下: 客户端必须首先发送一个连接序言,其逻辑结构: PRI * HTTP/2.0\r\n\r\nSM\r\ ...

  10. Win10 八步打通 Nuget 发布打包

    我们可以使用Nuget 下载你所需要的资源包还可以将自己封装好的各种控件包 工具包 等上传nuget 我们只需要几步就完成你要发布的包. 第一步:编译你的控件 anycpu debug/release ...