Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5 #95 第5次实验代码 #602

Merged
merged 1 commit into from
Dec 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions 1514080901115/pages/add_card/add_card.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Page({
text5: '',
text6: '',
area1: '...',
count1: '...'.length
count1: '...'.length ,
card:[]
},

/**
Expand All @@ -33,8 +34,23 @@ Page({
})
}
})


console.log("加载了...")
var _this = this;
wx.request({
url: 'https://infoaas.com/data/1514080901132',
success: function (res) {
console.log(res.data)
_this.card = res.data;
console.log(_this.card[1].name)


}
})
},
// 从服务器取回来 JSON
wx.request({
/* wx.request({
url: 'https://infoaas.com/data/hzc.json',
//仅为示例,并非真实的接口地址
data: { },
Expand All @@ -43,14 +59,14 @@ Page({
},
success: function (res) {
console.log(res.data)
/*

that.setData({
hasError: true,
errorText: res.data.name + ',' + res.data.teacher + ' ' + res.data.year
})*/
})
}
})
},
}) */


/**
* 生命周期函数--监听页面初次渲染完成
Expand Down