支持微信公众号跳转账单
This commit is contained in:
parent
7772b3de1a
commit
a36faa9bcb
@ -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;
|
||||
|
@ -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}`,
|
||||
})
|
||||
},
|
||||
})
|
@ -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>
|
||||
|
@ -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}`);
|
||||
}
|
@ -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;
|
||||
// 体验版
|
||||
|
Loading…
x
Reference in New Issue
Block a user