// pages/my/applyAfter_sales/applyAfter_sales.js const app = getApp(); const IP = app.globalData.ip; Page({ /** * 页面的初始数据 */ data: { ipUrl: app.globalData.ipUrl, textarea: '', total: 0, }, //复制 fz(e) { wx.setClipboardData({ data: e.currentTarget.dataset.num, }) }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { this.setData({ orderId: options.id, num: options.num, sq: options.sq, }) if (options.sq == 1) { wx.setNavigationBarTitle({ title: '退货记录' }) } else { wx.setNavigationBarTitle({ title: '换货记录' }) } wx.showLoading({ title: '加载中..', }) wx.request({ url: app.globalData.ip + '/wisdommining/api/order/getOrderDetail', method: 'GET', header: { "content-type": "application/x-www-form-urlencoded", }, data: { userId: app.globalData.userId, orderNumber: options.num, }, success: res => { console.log(res) wx.hideLoading() if (res.data.code == 1) { let goods = res.data.value; goods.orderRefundImage = goods.orderRefundImage.split(','); this.setData({ goods: goods, }) } else { wx.showModal({ title: '提示!', content: res.data.message, showCancel: false, }) } } }) }, textarea: function (e) { this.setData({ textarea: e.detail.value, }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, })