|
|
@@ -35,7 +35,16 @@ tryOnUnmounted(() => stop());
|
|
|
|
|
|
const report = ref<Awaited<ReturnType<typeof getAlcoholReportMethod>>>();
|
|
|
const tips = '建议您每日饮酒';
|
|
|
-const description = computed(() => report.value?.alcohol?.description?.replace?.(new RegExp(`^${tips}`), '')?.replace?.(/(\S)\s*(或)/, '$1\n$2') ?? '');
|
|
|
+const description = computed(() => report.value?.alcohol?.description
|
|
|
+ ?.replace?.(new RegExp(`^${tips}`), '')
|
|
|
+ ?.replace?.(/(\S)\s*(或)/g, '$1\n$2')
|
|
|
+ ?.replace?.(/(\{[^}]*})/g, "\n$1\n")
|
|
|
+ ?.replace?.(/(\[[^\]]*])/g, "\n$1\n")
|
|
|
+ ?.replace?.(/(\([^)]*\))/g, "\n$1\n")
|
|
|
+ ?.replace?.(/(([^)]*))/g, "\n$1\n")
|
|
|
+ ?.replace?.(/([((\[][^))\]]*\))/g, "\n$1\n")
|
|
|
+ ?? ''
|
|
|
+);
|
|
|
|
|
|
async function load(flow: FlowRoute) {
|
|
|
stop();
|
|
|
@@ -43,7 +52,7 @@ async function load(flow: FlowRoute) {
|
|
|
|
|
|
done.value = flow.next.optional ? { title: '返回首页', route: '/screen' } : flow.next;
|
|
|
next.value = flow.next.optional ? flow.next : void 0;
|
|
|
- start(report.value?.alcohol?.description ? 10 : 5);
|
|
|
+ start(report.value?.alcohol?.description ? 60 : 5);
|
|
|
}
|
|
|
|
|
|
const replace = (flow: Flow) => router.push({ path: getRoutePath(flow), replace: true });
|