From a36faa9bcb7619a803409730ea6089949a94bef1 Mon Sep 17 00:00:00 2001 From: qiaomu <3520484422@qq.com> Date: Wed, 11 Jun 2025 08:59:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=BE=AE=E4=BF=A1=E5=85=AC?= =?UTF-8?q?=E4=BC=97=E5=8F=B7=E8=B7=B3=E8=BD=AC=E8=B4=A6=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- childPackage/pages/billDetail/index.js | 9 +++++---- pages/billList/index.js | 3 ++- pages/invoiceList/components/already/index.wxml | 2 +- service/report.js | 4 ++-- utils/index.js | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/childPackage/pages/billDetail/index.js b/childPackage/pages/billDetail/index.js index 03f75bf..ed80879 100644 --- a/childPackage/pages/billDetail/index.js +++ b/childPackage/pages/billDetail/index.js @@ -38,14 +38,15 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - const { id, time } = options; + const { id, time, tenement } = options; const that = this; loadingFunc(async () => { - await that.init(id, time); + await that.init(id, time, tenement); }) }, - async init(id, time) { - const { code, message, detail, amount } = await getReportDetail(id) + async init(id, time, tenement) { + console.log("time:", tenement) + const { code, message, detail, amount } = await getReportDetail(id, tenement) if (code !== OK) { alertInfo(message) return; diff --git a/pages/billList/index.js b/pages/billList/index.js index 30120f8..8484b57 100644 --- a/pages/billList/index.js +++ b/pages/billList/index.js @@ -41,8 +41,9 @@ Page({ }, jumpToDetail(e) { const { id: report } = e.currentTarget.dataset + const tenement = wx.getStorageSync('tenement')?.id || "" wx.navigateTo({ - url: '/childPackage/pages/billDetail/index?id=' + report, + url: `/childPackage/pages/billDetail/index?id=${report}&tenement=${tenement}`, }) }, }) \ No newline at end of file diff --git a/pages/invoiceList/components/already/index.wxml b/pages/invoiceList/components/already/index.wxml index ce02d3a..dcb4201 100644 --- a/pages/invoiceList/components/already/index.wxml +++ b/pages/invoiceList/components/already/index.wxml @@ -31,7 +31,7 @@ - 审核中 + 开票中 已开票 diff --git a/service/report.js b/service/report.js index cc12aff..66062e0 100644 --- a/service/report.js +++ b/service/report.js @@ -2,7 +2,7 @@ import apis from '../utils/request'; const { GET, POST, PUT, DELETE } = apis // 获取电费账单 -export const getReportDetail = async function(id) { +export const getReportDetail = async function(id, tid) { const tenement = wx.getStorageSync('tenement') - return await GET(`/report/${id}/tenement/${tenement?.id}`); + return await GET(`/report/${id}/tenement/${tid || tenement?.id}`); } \ No newline at end of file diff --git a/utils/index.js b/utils/index.js index ef5e122..e909304 100644 --- a/utils/index.js +++ b/utils/index.js @@ -45,9 +45,9 @@ export function getConfigByEnv() { switch (envVersion) { // 开发版 case 'develop': - // api = "http://localhost:8000" + api = "http://localhost:8000" // api = "https://zgd.hbhcbn.com/api3" - api = "https://zgd.hbhcbn.com/wxApi" + // api = "https://zgd.hbhcbn.com/wxApi" // api = "http://127.0.0.1:4523/m1/4143821-0-default" break; // 体验版