支持微信公众号跳转账单

This commit is contained in:
qiaomu 2025-06-11 08:59:40 +08:00
parent 7772b3de1a
commit a36faa9bcb
5 changed files with 12 additions and 10 deletions

View File

@ -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;

View File

@ -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}`,
})
},
})

View File

@ -31,7 +31,7 @@
</view>
</view>
<view class="{{item.status === 1 ? 'approving' : 'already'}}">
<view wx:if="{{item.status === 1}}"> 审核中 </view>
<view wx:if="{{item.status === 1}}"> 开票中 </view>
<view wx:else> 已开票 </view>
</view>
</view>

View File

@ -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}`);
}

View File

@ -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;
// 体验版