Skip to content

Commit

Permalink
Merge pull request #555 from adcGG/master
Browse files Browse the repository at this point in the history
#5 #128 第五次实验
  • Loading branch information
zengsn authored Dec 20, 2017
2 parents ab23fc0 + 96324d5 commit 5ef6344
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 4 deletions.
3 changes: 2 additions & 1 deletion 1514080901204/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"pages/index/index",
"pages/logs/logs",
"pages/scroll/scroll",
"pages/form/form"
"pages/form/form",
"pages/net/net"
],
"window": {
"backgroundTextStyle": "light",
Expand Down
2 changes: 1 addition & 1 deletion 1514080901204/pages/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Page({
*/
onShareAppMessage: function () {

}
},
data: {
height: 20,
focus: false
Expand Down
5 changes: 5 additions & 0 deletions 1514080901204/pages/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jmpform: function () {
url: '../form/form'
})
},
jmpnet: function () {
wx.navigateTo({
url: '../net/net'
})
},

bindViewTap: function() {
wx.navigateTo({
Expand Down
5 changes: 3 additions & 2 deletions 1514080901204/pages/index/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@

</scroll-view>-->

<button class="weui-btn" type="primary" bindtap="jmpscroll">跳跳转</button>
<button class="weui-btn" type="primary" bindtap="jmpform">实验四的跳转</button>
<button class="weui-btn" type="primary" bindtap="jmpscroll">实验三的跳转</button>
<button class="weui-btn" type="primary" bindtap="jmpform">实验四的跳转</button>
<button class="weui-btn" type="primary" bindtap="jmpnet">实验五的跳转</button>
97 changes: 97 additions & 0 deletions 1514080901204/pages/net/net.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// pages/net/net.js
Page({

/**
* 页面的初始数据
*/
data: {
textdata: "put value",
height: 20,
focus: false,
ceshi: ''

},

/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function () {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {

},

RequestData: function () {
var that = this;
wx.request({
url: 'http://www.sina.com.cn/',
data: {},
method: 'GET',
header: {},
success: function (res) {
that.setData({ textdata: res.data });
console.log(res.data);
},
fail: function () {
// fail
},
complete: function () {
// complete
}
})
}







})
1 change: 1 addition & 0 deletions 1514080901204/pages/net/net.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
9 changes: 9 additions & 0 deletions 1514080901204/pages/net/net.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--pages/net/net.wxml-->
<button bindtap="RequestData" value="Button" class='box'>Button</button>


<view>
<textarea class='area' value="{{textdata}}"/>
</view>


11 changes: 11 additions & 0 deletions 1514080901204/pages/net/net.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* pages/net/net.wxss */
.box{
flex-direction: column;
margin: 50rpx;

}

.area{
font-style: oblique;
font-size: 16px;
}

0 comments on commit 5ef6344

Please sign in to comment.