78 lines
2.1 KiB
Vue
78 lines
2.1 KiB
Vue
<template>
|
|
<view class="bill-page tn-safe-area-inset-bottom">
|
|
<tn-nav-bar :isBack="true" :bottomShadow="false" backgroundColor="transparent">
|
|
<view class="tn-text-bold tn-text-xl tn-color-black">{{ t('navTitle') }}</view>
|
|
</tn-nav-bar>
|
|
|
|
<view class="bill-body tn-padding" :style="{ paddingTop: vuex_custom_bar_height + 'px', paddingBottom: '48rpx' }">
|
|
<current-application-bill-panel
|
|
ref="billPanel"
|
|
:reference-type-no="referenceTypeNo"
|
|
@reference-resolved="handleReferenceResolved"
|
|
@all-paid="handleAllPaid"
|
|
/>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { fetchEnums } from '@/utils/enum-store.js'
|
|
import { saveActiveApplicationCode, saveHomePageTabId } from '@/utils/app-state'
|
|
import CurrentApplicationBillPanel from '../components/CurrentApplicationBillPanel.vue'
|
|
|
|
export default {
|
|
i18n: {
|
|
zh: {
|
|
navTitle: '账单管理'
|
|
},
|
|
en: {
|
|
navTitle: 'Bill Management'
|
|
}
|
|
},
|
|
components: {
|
|
CurrentApplicationBillPanel
|
|
},
|
|
data() {
|
|
return {
|
|
referenceTypeNo: ''
|
|
}
|
|
},
|
|
async onLoad(options) {
|
|
await fetchEnums(false, this.$getLanguage())
|
|
this.referenceTypeNo = options && options.referenceTypeNo ? decodeURIComponent(options.referenceTypeNo) : ''
|
|
if (this.referenceTypeNo) {
|
|
saveActiveApplicationCode(this.referenceTypeNo)
|
|
}
|
|
},
|
|
methods: {
|
|
t(key, params) {
|
|
return this.$tm('pkgService.utility_recharge.utility_recharge', key, params)
|
|
},
|
|
handleReferenceResolved(referenceTypeNo) {
|
|
this.referenceTypeNo = referenceTypeNo || ''
|
|
if (this.referenceTypeNo) {
|
|
saveActiveApplicationCode(this.referenceTypeNo)
|
|
}
|
|
},
|
|
goStayServiceHome() {
|
|
saveHomePageTabId('stay-service')
|
|
uni.reLaunch({
|
|
url: '/pages/index/index?pageId=stay-service'
|
|
})
|
|
},
|
|
handleAllPaid() {
|
|
setTimeout(() => {
|
|
this.goStayServiceHome()
|
|
}, 800)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.bill-page {
|
|
min-height: 100vh;
|
|
background: linear-gradient(180deg, #F0F6FF 0%, #F8FAFF 100%);
|
|
}
|
|
</style>
|