|
@@ -14,7 +14,6 @@ const Visitor = useVisitor();
|
|
|
|
|
|
const title = import.meta.env.SIX_APP_TITLE;
|
|
|
const { data: visitor, loading: registering, send: register } = useRequest(registerVisitorMethod, { immediate: false, });
|
|
|
-const { data: pulseConfig } = useRequest(pulseMethod, { initialData: { show: false } });
|
|
|
const { data: copyright, send: load } = useRequest(copyrightMethod).onError(async ({ error }) => {
|
|
|
await Dialog.show({
|
|
|
message: error.message,
|
|
@@ -181,16 +180,6 @@ onBeforeRouteLeave((to, from) => {
|
|
|
if (to.path === '/register' || Visitor.patientId) return true;
|
|
|
return register().then((data) => !!data, () => false);
|
|
|
});
|
|
|
-
|
|
|
-async function handlePulse() {
|
|
|
- try {
|
|
|
- const result = await window.platform.pulse('user-test');
|
|
|
- Toast.show(`脉诊:${result.id}`, { position: 'bottom' });
|
|
|
- console.log('log-->', result);
|
|
|
- } catch (e: any) {
|
|
|
- Notify.warning(e?.message);
|
|
|
- }
|
|
|
-}
|
|
|
</script>
|
|
|
<template>
|
|
|
<div class="wrapper">
|
|
@@ -208,12 +197,6 @@ async function handlePulse() {
|
|
|
<span v-else class="van-button__text">开始检测</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="pulseConfig.show" class="van-button decorate" @click="!(loading || registering) && handlePulse()">
|
|
|
- <div class="van-button__content">
|
|
|
- <van-loading v-if="loading || registering" />
|
|
|
- <span v-else class="van-button__text">脉诊</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="flex-none text-xl p-8 text-center" v-html="copyright"></div>
|
|
|
</div>
|