feat: 优化首页服务入口与租住业务流程
补齐首页待办跳转、押金支付引导和多类租住服务页面能力,统一租客端关键业务流程体验。
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<view class="overview-panel">
|
||||
<view class="overview-header">
|
||||
<view>
|
||||
<view class="overview-title">{{ $tr('签约前确认') }}</view>
|
||||
<view class="overview-title">{{ contractDisplayName || $tr('签约前确认') }}</view>
|
||||
<view class="overview-subtitle">{{ $tr('合同编号:') }}{{ contractNo || $tr('未获取') }}</view>
|
||||
</view>
|
||||
<view class="overview-badge">
|
||||
@@ -106,6 +106,7 @@ import { contractPreview, contractSign, uploadCommonFile } from '@/api/index.js'
|
||||
import { syncLoginStayState } from '../../utils/session-sync'
|
||||
import ContractSignDialog from '../../components/ContractSignDialog.vue'
|
||||
import { normalizeRichTextImages } from '../../utils/rich-text'
|
||||
import { fetchContractDisplayInfo } from '../../utils/contract-display'
|
||||
|
||||
function normalizeContractContent(content = '') {
|
||||
return normalizeRichTextImages(
|
||||
@@ -144,6 +145,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
contractNo: '',
|
||||
contractDisplayName: '',
|
||||
orderNo: '',
|
||||
contractContent: '',
|
||||
loading: false,
|
||||
@@ -158,9 +160,24 @@ export default {
|
||||
this.contractNo = decodeURIComponent(options.no || '')
|
||||
this.orderNo = decodeURIComponent(options.orderNo || '')
|
||||
this.signerName = this.getSignerName()
|
||||
this.fetchContractDisplayName()
|
||||
this.fetchContractContent()
|
||||
},
|
||||
methods: {
|
||||
fetchContractDisplayName() {
|
||||
if (!this.contractNo) {
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
return fetchContractDisplayInfo(this.contractNo, this.$getLanguage())
|
||||
.then(({ contractDisplayName }) => {
|
||||
this.contractDisplayName = contractDisplayName || ''
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('fetch contract display name failed', error)
|
||||
this.contractDisplayName = ''
|
||||
})
|
||||
},
|
||||
fetchContractContent() {
|
||||
if (!this.contractNo) {
|
||||
return Promise.resolve()
|
||||
|
||||
Reference in New Issue
Block a user