完善下单逻辑及其ui展示,修复支付倒计时显示错误bug
This commit is contained in:
@@ -59,7 +59,17 @@
|
||||
</view>
|
||||
</ServicePanel>
|
||||
|
||||
<ServicePanel title="服务过程" subtitle="当前以 mock 时间线展示预约受理、派单和上门过程。">
|
||||
<ServicePanel title="服务过程" subtitle="基于真实状态日志展示预约受理、派单、上门与验收进度。">
|
||||
<ServiceInfoList
|
||||
:items="[
|
||||
{ label: '签到时间:', value: detail.checkinTime != '' ? detail.checkinTime : '暂未签到' },
|
||||
{ label: '签到地点:', value: detail.checkinAddress != '' ? detail.checkinAddress : '暂未记录' },
|
||||
{ label: '开始服务:', value: detail.serviceStartedAt != '' ? detail.serviceStartedAt : '暂未开始' },
|
||||
{ label: '完成服务:', value: detail.serviceFinishedAt != '' ? detail.serviceFinishedAt : '暂未完成' },
|
||||
{ label: '执行摘要:', value: detail.executionSummary != '' ? detail.executionSummary : '服务人员暂未提交执行摘要' },
|
||||
{ label: '证据数量:', value: detail.evidenceCount > 0 ? String(detail.evidenceCount) + ' 份' : '暂未上传' }
|
||||
]"
|
||||
></ServiceInfoList>
|
||||
<ServiceTimeline :items="detail.timeline"></ServiceTimeline>
|
||||
</ServicePanel>
|
||||
|
||||
@@ -82,14 +92,29 @@ import ServiceStatusTag from '@/components/homeService/ServiceStatusTag.uvue'
|
||||
import ServiceTimeline from '@/components/homeService/ServiceTimeline.uvue'
|
||||
import { fetchConsumerHomeServiceCaseDetail } from '@/services/homeServiceService.uts'
|
||||
import { HomeServiceCaseType } from '@/types/home-service.uts'
|
||||
import { getCurrentUser, getCurrentUserId } from '@/utils/store.uts'
|
||||
import { goToLogin } from '@/utils/utils.uts'
|
||||
|
||||
const caseId = ref('')
|
||||
const detail = ref<HomeServiceCaseType | null>(null)
|
||||
|
||||
async function ensureLogin(): Promise<boolean> {
|
||||
const user = await getCurrentUser()
|
||||
if (user == null || getCurrentUserId() == '') {
|
||||
goToLogin('/pages/mall/consumer/home-service/order-detail?id=' + caseId.value)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
if (caseId.value == '') {
|
||||
return
|
||||
}
|
||||
if (!(await ensureLogin())) {
|
||||
detail.value = null
|
||||
return
|
||||
}
|
||||
detail.value = await fetchConsumerHomeServiceCaseDetail(caseId.value)
|
||||
}
|
||||
|
||||
@@ -97,7 +122,12 @@ function goFeedback() {
|
||||
if (caseId.value == '') {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({ url: '/pages/mall/consumer/home-service/feedback?id=' + caseId.value })
|
||||
ensureLogin().then((ok) => {
|
||||
if (!ok) {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({ url: '/pages/mall/consumer/home-service/feedback?id=' + caseId.value })
|
||||
})
|
||||
}
|
||||
|
||||
function bookAgain() {
|
||||
|
||||
Reference in New Issue
Block a user