We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a346018 commit a9250c8Copy full SHA for a9250c8
pages/topic_detail/topic_detail.js
@@ -1,4 +1,5 @@
1
const app = getApp();
2
+const util = require("../../utils/util.js");
3
4
Page({
5
@@ -23,13 +24,20 @@ Page({
23
24
pageNumber: 1,
25
initPageNumber: 1,
26
showGeMoreLoadin:false,
- showFooter:false
27
+ showFooter:false,
28
+ currentTime:''
29
},
30
31
/**
32
* 生命周期函数--监听页面加载
33
*/
34
onLoad: function (options) {
35
+
36
+ //设置当前时间
37
+ this.setData({
38
+ currentTime: util.formatTime(new Date())
39
+ });
40
41
let id = options.id;
42
43
this.setData({
@@ -129,7 +137,7 @@ Page({
129
137
130
138
app.http(
131
139
'get',
132
- '/topic/' + id + `/new_comments?`,
140
+ '/topic/' + id + `/new_comments?time=` + this.data.currentTime,
133
141
{}, function (res) {
134
142
135
143
console.log(res.data.data);
0 commit comments