|
新应用从登陆页面进入index.w,index页面通过var Model = function() {
this.callParent();
var shellImpl = new ShellImpl(this, {
contentsXid : "pages",
pageMappings : {
"main" : {
url : '$UI/WisdomApp/index_main.w'
},
和Model.prototype.modelLoad = function(event) {
justep.Shell.showPage(require.toUrl("./index_main.w"));
};自动到index_main主页,index_mian页面里面通过
<div component="$UI/system/components/justep/contents/contents" class="x-contents x-full"
active="0" xid="contents1" wrap="false" style="background-color:#FFFFFF;color:#400040;font-weight:normal;font-family:宋体;"
swipe="false">
<div class="x-contents-content x-cards x-scroll-view " xid="tongzhiContent"
onActive="noticeContentActive">
<div component="$UI/system/components/justep/windowContainer/windowContainer"
class="x-window-container" xid="noticeContainer"/>
</div>
<div class="x-contents-content" xid="fuwuContent" onActive="convenienceContentActive">
<div component="$UI/system/components/justep/windowContainer/windowContainer"
class="x-window-container" xid="convenienceContainer"/>
</div>
<div class="x-contents-content" xid="Content" onActive="convenienceContentActive1">
<div component="$UI/system/components/justep/windowContainer/windowContainer"
class="x-window-container" xid="convenienceContainer1"/>
</div>
<div class="x-contents-content" xid="woContent" onActive="userContentActive">
<div component="$UI/system/components/justep/windowContainer/windowContainer"
class="x-window-container" xid="userContainer"/>
</div>
</div>
<div component="$UI/system/components/justep/button/buttonGroup" class="btn-group btn-group-justified x-human"
name="bottom" tabbed="true" xid="buttonGroup1" selected="button3" >
<a component="$UI/system/components/justep/button/button" class="btn btn-default btn-icon-top center-block"
label="通知公告" xid="button3" style="height:100%;padding-bottom:10px;" target="tongzhiContent"
icon="icon-chatbox-working" >
<i xid="i3" class="icon-chatbox-working"/>
<span xid="span3">通知公告</span>
</a>
<a component="$UI/system/components/justep/button/button" class="btn btn-default btn-icon-top center-block" label="分享精彩" xid="button6" style="padding-bottom:10px;height:90%;" target="Content" icon="linear linear-dice" onClick="button1Click">
<i xid="i6" class="icon-chatbubble-working linear linear-dice"></i>
<span xid="span2">分享精彩</span></a><a component="$UI/system/components/justep/button/button" class="btn btn-default btn-icon-top center-block"
label="便民服务" xid="button4" style="height:100%;padding-bottom:10px;" target="fuwuContent"
icon="icon-ios7-bookmarks" >
<i xid="i4" class="icon-ios7-bookmarks"/>
<span xid="span4">便民服务</span>
</a>
<a component="$UI/system/components/justep/button/button" class="btn btn-default btn-icon-top center-block"
label="我" xid="button10" style="height:100%;padding-bottom:10px;" target="woContent"
icon="icon-ios7-contact-outline">
<i xid="i10" class="icon-ios7-contact-outline"/>
<span xid="span10">我</span>
</a>
</div>
套用几个页面,在js里面跳转:
Model.prototype.noticeContentActive = function(event) {
this.loadContainer("noticeContainer", "$UI/WisdomApp/index-notice.w");
};
Model.prototype.learningmapContentActive = function(event) {
this.loadContainer("learningmapContainer", "$UI/WisdomApp/index-learningmap.w");
};
Model.prototype.convenienceContentActive = function(event) {
this.loadContainer("convenienceContainer", "$UI/WisdomApp/index-convenience.w");
};
Model.prototype.userContentActive = function(event) {
this.loadContainer("userContainer", "$UI/WisdomApp/index-user.w");
};
现在我再index-user页面点击头像到达一个子页面,操作完成之后不管是关闭当前页面还是退回,index-user页面都无法刷新,我用到的刷新功能是Model.prototype.modelActive = function(event){
if(this.refresh){
this.modelLoad();
this.refresh=false;
}
};这个方法在其他页面是成功实现过的,到了套用的content页面无法实现,求帮忙!! |
|