瀏覽代碼

修改样式 & 调整需求

六智科技 7 月之前
父節點
當前提交
8b6d2f8765

二進制
public/camera/step-11.example.png


+ 1 - 1
src/modules/camera/camera.config.ts

@@ -30,7 +30,7 @@ export default [
     example: getClientURL('~/camera/step-11.example.png'),
     audio: getClientURL('~/camera/step-11.audio.wav'),
     required: true,
-    description: '请确保舌面无食物残渣、没有染色,舌尖向下伸直、 舌体放松、舌面平展、口张大请避免在有色光线下拍摄。',
+    description: '请确保舌面无食物残渣、没有染色,舌尖向下伸直、 舌体放松、舌面平展、口张大请避免在有色光线下拍摄。',
     before: { label: '请将舌头放入框内,点击拍照' },
     after: { label: '请确认照片', example: '', audio: '' },
     video: { scale: 1, offsetX: 0, offsetY: 50, },

+ 4 - 19
src/modules/camera/camera.page.vue

@@ -57,8 +57,7 @@ const { loading: uploading, send: update, abort: stop } = useRequest((file: File
 
 const handle = () => {
   if ( submitting.value ) return;
-  if ( !showExample.value ) { snapshot.value = cameraRef.value?.handle(); }
-  showExample.value = false;
+  snapshot.value = cameraRef.value?.handle();
   stop();
 };
 const next = async () => {
@@ -106,22 +105,17 @@ tryOnUnmounted(() => {
 <template>
   <div class="flex flex-col">
     <header class="flex flex-col justify-center px-24">
-      <div class="text-3xl text-center" :class="{ required: config?.required }">{{ config?.label }}</div>
+      <div class="text-3xl text-center">{{ config?.label }}</div>
       <div class="mt-8 text-lg text-center tracking-wider leading-10">{{ config?.description }}</div>
     </header>
     <main class="flex justify-center items-center">
       <Camera ref="camera" v-bind="config?.video" @loaded="step = 1;">
         <template #shade="{scale}">
           <component :is="config?.shade" :scale="scale"></component>
-          <img v-if="showExample && config?.example" :src="config.example" alt="示例" @click="showExample = false" />
         </template>
       </Camera>
-      <div v-if="config?.example"
-           class="size-40 absolute -top-8 right-2 cursor-pointer hover:text-primary"
-           @click="showExample = !showExample"
-      >
+      <div v-if="config?.example" class="size-40 absolute -top-8 right-2 cursor-pointer hover:text-primary">
         <img class="size-full object-scale-down" :src="config?.example" alt="示例" />
-        <div class="mt-2 text-xl text-center">示例</div>
       </div>
     </main>
     <footer class="flex flex-col justify-center items-center">
@@ -134,7 +128,7 @@ tryOnUnmounted(() => {
       </div>
       <div v-else-if="step" class="h-min text-center cursor-pointer hover:text-primary" @click="handle()">
         <button class="size-28 border-8 rounded-full hover:border-primary"></button>
-        <div class="mt-8 text-3xl">{{ showExample ? '开始拍照' : '点击拍照' }}</div>
+        <div class="mt-8 text-3xl">点击拍照</div>
       </div>
     </footer>
   </div>
@@ -148,13 +142,4 @@ main {
   position: relative;;
   flex: 1 1 40%;
 }
-
-.required {
-  &::before {
-    content: "*";
-    margin-right: 4px;
-    color: #f53030;
-  }
-
-}
 </style>

+ 2 - 1
src/modules/report/SchemeMedia.vue

@@ -19,7 +19,7 @@ function update(index: number) {
     const swipe = document.querySelectorAll(`.${ Tag } .van-swipe-item`);
     const video = swipe[ index ]?.querySelector(`video`);
     onPlay(<any> { target: video });
-  }, 20);
+  }, 200);
 }
 
 function handle(item: SchemeMediaProps) {
@@ -34,6 +34,7 @@ function handle(item: SchemeMediaProps) {
     closeOnClickOverlay: closable,
     className: Tag,
   };
+  update(index);
 }
 
 function onPlay(event?: Event) {

+ 5 - 9
src/modules/report/SyndromeChart.vue

@@ -16,18 +16,13 @@ const option = ref<EChartsOption>({
     fontStyle: 24,
   },
   radar: {
-    indicator: [
-      { text: 'Brand', max: 100 },
-      { text: 'Content', max: 100 },
-      { text: 'Usability', max: 100 },
-      { text: 'Function', max: 100 },
-    ],
-    center: [ '50%', '50%' ],
-    radius: 90,
+    indicator: [],
+    axisLine: { lineStyle: { color: 'rgba(56,255,110, 0.2)', }, },
+    splitLine: { lineStyle: { color: 'transparent', }, },
   },
   series: {
     type: 'radar',
-    label: { show: true, position: 'insideTopLeft', fontSize: 14, color: '#fff' },
+    label: { show: false },
     data: [
       {
         value: [ 60, 73, 85, 40 ],
@@ -48,6 +43,7 @@ watchEffect(() => {
     value.push(score);
   }
   option.value.radar = {
+    ...option.value.radar,
     indicator,
   };
   option.value.series = {

+ 5 - 3
src/pages/register.page.vue

@@ -56,7 +56,6 @@ const Fields: Record<FieldKey, Field> = {
       options: [
         { label: '男', value: '0' },
         { label: '女', value: '1' },
-        { label: '未知', value: '2' },
       ],
     },
   },
@@ -137,7 +136,7 @@ const { loading } = useRequest(registerFieldsMethod).onSuccess(({ data }) => {
 const Visitor = useVisitor();
 const formRef = useTemplateRef<FormInstance>('register-form');
 const { form: modelRef, loading: submitting, send: submit } = useForm(data => registerAccountMethod(data), {
-  initialForm: { code: '', sex: '2' } as Record<string, any>,
+  initialForm: { code: '' } as Record<string, any>,
 }).onSuccess(async ({ data }) => {
   Visitor.patientId = data;
   Toast.success(`操作成功`);
@@ -159,7 +158,10 @@ let captchaLoaded = false;
 const { loading: captchaLoading, countdown, send: getCaptcha } = useCaptcha(
   () => getCaptchaMethod(modelRef.value.phone!),
   { initialCountdown: 60 },
-).onSuccess(() => captchaLoaded = true);
+).onSuccess(() => {
+  captchaLoaded = true;
+  Toast.success('获取成功')
+});
 const getCaptchaHandle = async () => {
   try {
     await formRef.value?.validate('phone');

+ 3 - 0
src/request/model/report.model.ts

@@ -88,6 +88,9 @@ function fromReportTongueExceptionData(exception: ReportTongueException[], data?
 }
 
 function fromReportPhysiqueChartData(data: Record<string, any>[]) {
+  if (data?.some(item => (item.isBasicTo === 'Y' || item.isTendTo === 'Y') && item.constitutionGroupName !== '平和质')) {
+    data = data.filter(item => item.constitutionGroupName !== '平和质');
+  }
   return data?.map((item: Record<string, any>) => [
     item.constitutionGroupName, +item.score,
     item.constitutionGroupName === '平和质'

+ 2 - 0
src/themes/vant.scss

@@ -18,6 +18,8 @@
 
   --van-notify-font-size: 1.6rem;
   --van-notify-line-height: 2rem;
+
+  --van-number-keyboard-key-height: 60px;
 }
 
 .van-button.decorate {