1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
epp/miniprogram/pages/report/myreport.js

36 lines
831 B
JavaScript
Raw Normal View History

const app = getApp()
const baseUrl = app.globalData.baseUrl
// console.log("baseUrl", baseUrl)
2022-11-05 15:28:03 +08:00
Page({
data: {
tableInfo: {},
count: ''
2022-11-05 15:28:03 +08:00
},
2022-11-05 15:28:03 +08:00
onReady: function () {
// 生命周期函数--监听页面初次渲染完成
var that = this;
wx.request({
url: `${baseUrl}/report/myReport`,
data: {
id: wx.getStorageSync('id')
},
success: function (d) {
let item = [];
for (const iterator of d.data.data) {
let item1 = [iterator.name, iterator.time, iterator.normal, iterator.address];
item.push(item1)
2022-11-05 15:28:03 +08:00
}
that.setData({
tableInfo: {
title: ["姓名", "填报时间", "体温状况", "位置"],
contentItem: item,
},
count: d.data.data.length
})
}
})
},
})