起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1584|回复: 3

[结贴] 我使用windowcontainer主件调用justep.Shell.showPage不跳转怎么回事

[复制链接]

28

主题

112

帖子

202

积分

中级会员

Rank: 3Rank: 3

积分
202
QQ
发表于 2017-5-16 11:40:22 | 显示全部楼层 |阅读模式
first.w页面是放置windowcontainer主件的页面,我默认指向longon.w
first.js代码如下
        var $ = require("jquery");
        var justep = require("$UI/system/lib/justep");
        var ShellImpl = require("$UI/system/lib/portal/shellImpl");
       
        var Model = function(){
                this.callParent();
                var shellImpl = new ShellImpl(this, {
                        contentsXid : "pages",

                        pageMappings : {
                                "logon" : {
                                        url : require.toUrl("./logon.w")
                                },
                                "index" : {
                                        url : require.toUrl("./index.w")
                                },
                                "register" : {
                                        url : require.toUrl("./register.w")
                                }
                        }
                });
        };

logon.js 点击登录的按钮事件代码如下:
        Model.prototype.loginBtnClick = function(event){
                var phoneData = this.comp("phoneData");
                var memberData = this.comp("memberData");
                var phoneinput = this.comp("phoneNum").val();
                var pwd = this.comp("passwordInput").val();
//                debugger;
                if(phoneinput==="")
                {
                        alert("号码错误");
                        return;
                }

               
                phoneData.clear();
                phoneData.setFilter("fPhoneNumber", "fPhoneNumber = '"+phoneinput+"'");
                phoneData.refreshData();
                if(phoneData.count()>0)
                {
                        memberData.clear();
                        memberData.setFilter("fPhoneNumber", "fPhoneNumber = '"+phoneinput+"'");
                        memberData.setFilter("fPwd", "fPwd = '"+pwd+"'");
                        memberData.refreshData();
                        debugger;
                        if(memberData.count()>0)
                        {
                        debugger;
                                justep.Shell.showPage("index");
                        }
                        else
                        {
                                justep.Util.hint("手机号"+phoneinput+"还未注册");
                        }
                }
               
        };

我经过degger是走到justep.Shell.showPage("index")语句的。
发表于 2017-5-16 12:00:42 | 显示全部楼层
有没有报错信息呢??

你可以先使用 仿淘宝测试一下!
主页面跳转到其他 pageMappings  配置的页面!
justep.Shell.showPage 肯定没问题的!

对了,
first.w的onLoad 事件中必须执行 justep.Shell.showPage("logon");  的
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

28

主题

112

帖子

202

积分

中级会员

Rank: 3Rank: 3

积分
202
QQ
 楼主| 发表于 2017-5-16 13:21:42 | 显示全部楼层
liangyongfei 发表于 2017-5-16 12:00
有没有报错信息呢??

你可以先使用 仿淘宝测试一下!

我在first.w的onload事件执行了justep.Shell.showPage("logon"),justep.Shell.showPage(“index”)就可以了为啥啊?完全不明白
回复 支持 反对

使用道具 举报

发表于 2017-5-16 14:08:51 | 显示全部楼层
15222581829 发表于 2017-5-16 13:21
我在first.w的onload事件执行了justep.Shell.showPage("logon"),justep.Shell.showPage(“index”)就可 ...

就是必须先执行justep.Shell.showPage("logon")  打开主页才行的!

就固定这样写就行了!
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-3 22:54 , Processed in 0.071107 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表