修改发票详情参数undefined的问题

This commit is contained in:
qiaomu 2024-05-06 17:57:06 +08:00
parent f8115cf724
commit 63cb2f8250

View File

@ -8,6 +8,7 @@ Page({
*/ */
data: { data: {
detail: {}, detail: {},
id: "",
header: [ header: [
{ key: 'time', title: '月份' }, { key: 'time', title: '月份' },
{ title: '电表地址',renderBody: (item) => item.meter.address }, { title: '电表地址',renderBody: (item) => item.meter.address },
@ -26,12 +27,13 @@ Page({
async getDetail(id) { async getDetail(id) {
const { code, message, data } = await getInvoiceInfoDetail(id); const { code, message, data } = await getInvoiceInfoDetail(id);
this.setData({ this.setData({
detail: data detail: data,
id
}) })
}, },
jumpToInvoiceDetail() { jumpToInvoiceDetail() {
wx.redirectTo({ wx.redirectTo({
url: '/pages/invoiceDetail/index', url: '/pages/invoiceDetail/index?id=' + this.data.id,
}) })
}, },
/** /**