由index.w点击某个图片,转到adetail,希望每次adetail加载时,取到参数id

index.w

<tbody class="x-list-template" xid="listTemplate3">
<tr xid="tr4">
<td xid="td6" class="tdd" bind-click="{&quot;operation&quot;:&quot;shell.showPage&quot;,&quot;args&quot;:{&quot;url&quot;:&quot;js:$model.toUrl('./adetail.w?id=1')&quot;}}">
<a><img alt="" xid="image22"
class="img-rounded img-responsive center-block" src="./img/a1.png"/></a>
<div xid="div15" class="text text-center">
<h4 xid="h43" class="text-white">宠物蛇</h4>
<h5 xid="h54" class="text-danger">¥2922</h5>
<div style="height:20px;"></div>
</div>
</td>
<td xid="td7" class="tdd" bind-click="{&quot;operation&quot;:&quot;shell.showPage&quot;,&quot;args&quot;:{&quot;url&quot;:&quot;js:$model.toUrl('./adetail.w?id=2')&quot;}}">
<a><img alt="" xid="image23"
class="img-rounded img-responsive center-block" src="./img/a2.png"/></a>
<div xid="div17" class="text text-center">
<h4 xid="h44" class="text-white">蛋龟</h4>
<h5 xid="h55" class="text-danger">¥2129</h5>
<div style="height:20px;"></div>
</div>
</td>
....
 
index.js

...

adetail.w

<?xml version="1.0" encoding="utf-8"?>
<div xmlns="http://www.w3.org/1999/xhtml" class="main13" component="$UI/system/components/justep/window/window"
design="device:m;" xid="window" sysParam="false">
<div component="$UI/system/components/justep/model/model" xid="model" style="left:18px;top:83px;height:244px;" onActive="doActive();"/>
<div component="$UI/system/components/justep/panel/panel" class="x-panel x-full x-card">
<div class="x-panel-top">
....
 
adetail.js
define(function(require) {
    var $ = require("jquery");
    var justep = require("$UI/system/lib/justep");
    var comUtil = require("$UI/system/components/justep/common/common");
    var Model = function() {
        this.callParent();
    };
 

Model.prototype.doActive = function(event) {
        console.log('onActive');
        var context = this.getContext();
 
//获取URL中的参数
        var id = context.getRequestParameter('id');
        console.log(id);
    }
return Model;
});

wex5 onactive不执行的解决办法的更多相关文章

  1. sudo:抱歉,您必须拥有一个终端来执行 sudo 解决办法;ssh执行sudo命令的方法;给用户增加sudo免密权限

    1.supervisor使用sudo执行命令的时候,报错 2.解决办法: 编辑 /etc/sudoers 文件,将Default requiretty注释掉. sudo vim /etc/sudoer ...

  2. 小程序Page里的函数比app.js先执行的解决办法

    问题描述: 当我们初始化一个小程序时,默认文件 app.js 中有onLaunch函数, onLaunch: function () { console.log("onLaunch" ...

  3. spring定时任务配置,以及不执行的解决办法

    前几天,同事问了我一个问题,我告诉他用spring的定时任务解决,并给他配置了spring的定时任务.当时随便找了一个bean写了一段代码,验证定时任务正确执行后,就没再管,昨天下午,同事写代码的时候 ...

  4. Codeblocks 等软件 修改源代码后 不能立即执行的解决办法||exe文件删除慢

    不懈地奋斗了两天,终于找到原因了. 记录如下 症状: Codeblocks .Visual Studio 都出现此问题:修改源代码 无法立即执行 ,就是:cannot open output file ...

  5. JQuery设置缓慢下拉大行多次执行的解决办法,以及stop()函数的简单理解

    $(function(){ $('.all>li').mouseover(function(e) {        $(this).children().stop().slideDown(300 ...

  6. centos7下/etc/rc.local文件里配置的开机启动项不执行的解决办法

    习惯于在/etc/rc.local文件里配置我们需要开机启动的服务,这个在centos6系统下是正常生效的.但是到了centos7系统下,发现/etc/rc.local文件里的开机启动项不执行了!仔细 ...

  7. CentOS开机自启动/etc/rc.local不执行的解决办法

    放置在开机自启动里面没有自动启动 查看文件/etc/rc.local发现是一个软连接 修改源文件的执行权限即可 chmod 755 /etc/rc.d/rc.local 查看日志可以看到开机自启动过程 ...

  8. php脚本输出js代码不执行的解决办法和原理。

    <?phpecho "<script>alert('我弹出来了')</script>";?> 很简单你一句话就可以在PHP里面输出JS脚本让浏览 ...

  9. wamp server mysql数据库中事件不执行的解决办法

    先看看看event 事件是否开启 直接执行下列语句即可, show variables like '%sche%'; 如没开启,则开启. (需要数据库超级权限) set global event_sc ...

随机推荐

  1. C# 校验给定的ip地址是否合法

    函数用于检测ip地址格式是否合法,包括ip的组成格式,每隔段是否不超过255等,但这个函数不能验证这个ip地址是否可以ping通. /// <summary> /// 验证IP地址是否合法 ...

  2. php模拟post提交请求与调用接口

    /** * 模拟post进行url请求 * @param string $url * @param string $param */ function request_post($url = '', ...

  3. TensorFlow-GPU:查看电脑显卡型号是否支持CUDN,以及相关软件下载与介绍

    1.显卡(GPU)是否支持CUDN https://developer.nvidia.com/cuda-gpus 2.了解基础知识 1)CUDA(Compute Unified Device Arch ...

  4. iptables filter表小案例

    案例1:把80端口,22端口,21端口放行 22端口指定IP访问,其它IP拒绝. shell脚本实现: [root@centos7 ~]# vim /usr/local/sbin/iptables.s ...

  5. js 退后一步并刷新,window.history.back(-1);这个只能后退一步不能刷新,

    location.href=document.referrer; document.referrer是获取上一页的url

  6. 【转】maven同时使用maven-surefire-report-plugin和maven-surefire-plugin默认将执行两次test

    https://issues.apache.org/jira/browse/SUREFIRE-753 Here the pom.xml snippet how i configured the rep ...

  7. VCL 中的 Windows API 函数(5): AlphaBlend

    AlphaBlend 是指定图像混合透明的函数, 在 Graphics.GraphUtil.RibbonStyleActnCtrls 单元用到. 下面的测试是把一张图片显示在窗体, 并可以调整透明度. ...

  8. WebGL常用数学公式

    1.三角函数 坐标轴采用右手法则,沿Z轴的逆时针方向为正角度,假设原始点为p(x,y,z),a是X轴旋转到点p的角度,r是从原始点到p点的距离.用这两个变量计算出点p的坐标,等式如下: x = rco ...

  9. Vim 操作符命令和动作命令

    http://www.cnblogs.com/littlerabbit/articles/2349951.html

  10. struts2防止反复提交的办法

    <? xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC " ...