Skip to content

Commit

Permalink
hzuapps#5 hzuapps#38 第5次实验代码
Browse files Browse the repository at this point in the history
  • Loading branch information
351655914 committed Dec 2, 2017
1 parent 02e3692 commit f71db15
Showing 1 changed file with 16 additions and 27 deletions.
43 changes: 16 additions & 27 deletions 1514080901116/pages/index/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// pages/demo/scrollView.js
var base64 = require("../images/base64");
Page({

/**
Expand All @@ -24,31 +23,21 @@ Page({
//console.dir(that.data.windowHeight)
}
})
this.setData({
icon20: base64.icon20,
icon60: base64.icon60
})
that.setData({
sessions: [{
name: "",
msg: "你孤单的时候想干嘛?喝汽水,因为当你孤单你会想起谁(汽水)。"
}, {
name: "",
msg: "我曾经得过精神分裂症,但现在我们已经康复了。"
}, {
name: "",
msg: "你孤单的时候想干嘛?喝汽水,因为当你孤单你会想起谁(汽水)。"
}, {
name: "",
msg: "我曾经得过精神分裂症,但现在我们已经康复了。"
}, {
name: "",
msg: "你孤单的时候想干嘛?喝汽水,因为当你孤单你会想起谁(汽水)。"
}, {
name: "",
msg: "我曾经得过精神分裂症,但现在我们已经康复了。"
}]
})
wx.request({
url: 'https://infoaas.com/data/1514080901116/1514080901116.json',
//仅为示例,并非真实的接口地址
data: {},
header: {
'content-type': 'application/json' // 默认值
},
success: function (res) {
console.log(res.data)

that.setData({
session: res.data
})
}
})
},

/**
Expand Down Expand Up @@ -105,7 +94,7 @@ Page({
var that = this;
that.setData({
//isLower: true,
sessions: that.data.sessions.concat([{
session: that.data.session.concat([{
name: "",
msg: "你孤单的时候想干嘛?喝汽水,因为当你孤单你会想起谁(汽水)。"
}, {
Expand Down

0 comments on commit f71db15

Please sign in to comment.