We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 720275b commit 657c878Copy full SHA for 657c878
pages/chat/chat.js
@@ -35,7 +35,9 @@ Page({
35
36
const friend = JSON.parse(options.friend);
37
console.log(friend);
38
- this.initData();
+ this.setData({
39
+ pageHeight: wx.getSystemInfoSync().windowHeight,
40
+ });
41
wx.setNavigationBarTitle({
42
title: friend.friendName || ''
43
});
@@ -51,14 +53,6 @@ Page({
51
53
onReady() {
52
54
this.chatInput = this.selectComponent('#chatInput');
55
},
- initData() {
- let that = this;
56
- let systemInfo = wx.getSystemInfoSync();
57
-
58
- that.setData({
59
- pageHeight: systemInfo.windowHeight,
60
- });
61
- },
62
onSendMessageEvent(e) {
63
let content = e.detail.value;
64
this.msgManager.sendMsg({type: IMOperator.TextType, content});
0 commit comments