微信小程序实现界面跳转
简易的实现页面跳转:
1、//index.wxml
<navigator url="../news/new">点击我进行跳转</navigator>
2、//app.json
page:[
"pages/index/index,
"pages/news/new"
]
//new.wxml
<text>跳转后的页面</text>
数据绑定:
//wxml
<text>pages/ceshi/ceshi.wxml</text>
<view>
<loading hidden="{{loadingHidden}}">正在登陆...</loading>
<button type="primary" size="default" disabled="{{disabled}}" bindtap="loginBtn">数据请求</button>
</view>
//js
Page({
data:{
disabled: false,
loadingHidden: true
},
loginBtn: function(event){
this.setData({disabled: true});
this.setData({loadingHidden: false});
}
})