// nova-tourism/pages/my/my-order/my-refund/refund-detail/index.js Page({ /** * 页面的初始数据 */ data: { statusBarHeight: 0, screenHeight: 0, customHeight: 0, bottomNavHeight: 0, contentHeight: 0, text: '', // 图片 fileList: [], uptokenURL: '', domain: '', uploadURL: '', }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { const systemInfo = wx.getSystemInfoSync(); const statusBarHeight = systemInfo.statusBarHeight || 0; const screenHeight = systemInfo.screenHeight || 0; const custom = wx.getMenuButtonBoundingClientRect(); const customHeight = custom.height + 10 + 2 || 0; const bottomNavHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom || 0; const contentHeight = (screenHeight - bottomNavHeight - statusBarHeight - customHeight) * 750 / systemInfo.windowWidth; this.setData({ statusBarHeight, screenHeight, customHeight, bottomNavHeight, contentHeight }); }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { }, // 添加本地图片 async getUptoken() { let res = await Parse.Cloud.run('qiniu_uptoken', { company: company }) this.setData({ uptokenURL: res.uptoken, domain: res.domain, uploadURL: res.zoneUrl }) console.log(this.data.uptokenURL, this.data.domain, this.data.uploadURL); }, //获取图片数组 picture(event) { console.log('event', event); let FileList = event.detail let url = [] for (let i = 0; i < FileList.length; i++) { url.push(FileList[i].url) } this.setData({ fileList: url }) console.log('图片', this.data.fileList); }, })