Browse Source

feat :1.橙宝日志 见面优化。

suwenjiang 1 week ago
parent
commit
826adc0a5e

+ 2 - 1
.vscode/settings.json

@@ -60,5 +60,6 @@
   },
   "i18n-ally.localesPaths": ["src/locale"],
   "i18n-ally.keystyle": "flat",
-  "i18n-ally.sourceLanguage": "en"
+  "i18n-ally.sourceLanguage": "en",
+  "editor.columnSelection": false
 }

+ 1 - 1
src/components/feed-wd-popup/feed-wd-popup.vue

@@ -44,7 +44,7 @@
               mode="widthFix"
             />
           </view>
-          <span class="text-sm text-gray-600">{{ item.title }}</span>
+          <span class="text-sm text-[#333]">{{ item.title }}</span>
         </view>
       </view>
     </view>

+ 3 - 3
src/components/feedBnaner/feedBnaner.vue

@@ -2,9 +2,9 @@
   <view class="mt-2 bg-white pb-3 overflow-y-auto">
     <view class="box-border w-160 grid grid-cols-7 gap-4 px-4">
       <view v-for="(item, index) in dataList" :key="item.id + index" class="text-center">
-        <view class="text-lg font-semibold text-gray-800">{{ item.number }}</view>
-        <view class="text-sm text-gray-800 mt-1">{{ item.title }}</view>
-        <view class="text-xs text-gray-500 mt-1">{{ item?.subTitle }}</view>
+        <view class="text-xl font-semibold text-[#333]">{{ item.number }}</view>
+        <view class="text-sm text-[#333] mt-1">{{ item.title }}</view>
+        <view class="text-xs text-[#666] mt-1">{{ item?.subTitle }}</view>
       </view>
     </view>
   </view>

+ 1 - 1
src/components/height/h-echarts.vue

@@ -38,7 +38,7 @@
   const option = ref({
     grid: {
       left: '10%', // 左侧间距
-      right: '10%', // 右侧间距
+      right: 0, // 右侧间距
     },
     title: {
       subtext: props.unit, // 图表标题下方显示单位

+ 6 - 6
src/components/height/height-item.vue

@@ -2,15 +2,15 @@
   <view class="border rounded-xl p-4" @click="emit('goToGrowthPage')">
     <view class="flex justify-between text-sm text-gray-500">
       <text class="text-[#F88842]">{{ item?.date }}</text>
-      <text class="text-[#999]">{{ item?.old }}</text>
+      <text class="text-[#999] text-xs">{{ item?.old }}</text>
     </view>
-    <view class="mt-3 grid grid-cols-2 gap-4">
+    <view class="mt-3 grid grid-cols-2 gap-4 text-sm text-[#333]">
       <view>
-        <view class="text-gray-600">身高:{{ item?.height }}</view>
-        <view class="text-gray-600 mt-1">头围:{{ item?.headC }}</view>
+        <view class="">身高:{{ item?.height }}</view>
+        <view class="mt-1">头围:{{ item?.headC }}</view>
       </view>
       <view class="text-right">
-        <view class="text-gray-600">体重:{{ item?.weight }}</view>
+        <view class="">体重:{{ item?.weight }}</view>
       </view>
     </view>
   </view>
@@ -28,7 +28,7 @@
     },
   })
 
-  const emit = defineEmits('goToGrowthPage')
+  const emit = defineEmits(['goToGrowthPage'])
 </script>
 
 <style lang="scss" scoped>

+ 0 - 58
src/components/hot-tags/hot-tags.vue

@@ -1,58 +0,0 @@
-<template>
-  <view class="hot-tags-container">
-    <view
-      class="hot-tag-item"
-      v-for="(tag, i) in tags"
-      :class="{ active: currentTag === i }"
-      @click="currentTag = i"
-      :key="tag"
-    >
-      {{ tag }}
-    </view>
-  </view>
-</template>
-
-<script lang="ts" setup>
-  defineOptions({
-    name: 'HotTags',
-  })
-
-  const currentTag = defineModel<number>('currentTag')
-  const tags = ref<string[]>(['All', 'Shoes', 'Fast Food', 'Snack', 'Clothing'])
-</script>
-
-<style lang="scss" scoped>
-  .hot-tags-container {
-    display: flex;
-    width: 100%;
-    margin: 24rpx 0;
-    overflow-x: scroll;
-    overflow-y: hidden;
-
-    &::-webkit-scrollbar {
-      display: none; /* Chrome/Safari */
-    }
-
-    .hot-tag-item {
-      box-sizing: border-box;
-      height: 64rpx;
-      padding: 0 24rpx;
-      margin-right: 24rpx;
-      font-family: 'PingFang SC';
-      font-size: 28rpx;
-      font-style: normal;
-      font-weight: 500;
-      line-height: 64rpx;
-      color: $shop-text-3;
-      white-space: nowrap;
-      border: 2rpx solid $shop-bg-line;
-      border-radius: 32rpx;
-
-      &.active {
-        color: $shop-white;
-        background-color: $shop-primary;
-        border: 2rpx solid $shop-primary;
-      }
-    }
-  }
-</style>

+ 24 - 0
src/components/hover-button/hover-button.vue

@@ -0,0 +1,24 @@
+<template>
+  <view
+    @click="emit('onButton')"
+    style="box-shadow: 0px 2px 12px rgba(255, 184, 137, 0.5)"
+    class="fixed right-4 bottom-8 w-[132rpx] h-[132rpx] bg-[#F88842] rounded-full flex items-center justify-center"
+  >
+    <wd-icon name="add" size="52rpx" color="white"></wd-icon>
+  </view>
+</template>
+<script setup>
+  import { defineEmits } from 'vue'
+
+  defineOptions({
+    name: 'HoverButton',
+  })
+
+  const emit = defineEmits(['onButton'])
+</script>
+
+<style lang="scss" scoped>
+  .wd-divider {
+    margin: 0;
+  }
+</style>

BIN
src/components/item-form.zip


+ 61 - 54
src/components/item-form/nurse-form.vue

@@ -13,25 +13,27 @@
 
     <ItemForm v-if="nurseMethod != 1" label="喂奶量">
       <template #default>
-        <wd-input
-          no-border
-          type="number"
-          placeholder="请填写"
-          size="large"
-          maxlength="30"
-          v-model="nurseAmount"
-        >
-          <!--    @input="handleChange" -->
-          <template #suffix>ml</template>
-        </wd-input>
-        <view v-if="nurseAmountList.length" class="px-3 pt-3 flex justify-start">
-          <view
-            v-for="item in nurseAmountList"
-            :key="item"
-            @click="nurseAmount = item"
-            class="box-border py-[4rpx] px-2 text-xs bg-[#F3F3F3] mr-2 rounded-full"
+        <view class="px-4 pt-2">
+          <wd-input
+            no-border
+            type="number"
+            placeholder="请填写"
+            maxlength="30"
+            v-model="nurseAmount"
           >
-            {{ item }}
+            <!--    @input="handleChange" -->
+            <template #suffix><text class="text-sm text-[#333]">ml</text></template>
+          </wd-input>
+
+          <view v-if="nurseAmountList.length" class="pt-3 flex justify-start overflow-x-auto">
+            <view
+              v-for="item in nurseAmountList"
+              :key="item"
+              @click="nurseAmount = item"
+              class="box-border py-[4rpx] px-2 text-xs bg-[#F3F3F3] mr-2 rounded-full"
+            >
+              {{ item }}
+            </view>
           </view>
         </view>
       </template>
@@ -62,24 +64,25 @@
   <template v-if="type == 2">
     <ItemForm label="辅食名称">
       <template #default>
-        <wd-input
-          no-border
-          type="number"
-          placeholder="请填写"
-          size="large"
-          maxlength="30"
-          v-model="complementaryName"
-        >
-          <!--    @input="handleChange" -->
-        </wd-input>
-        <view v-if="nurseAmountList.length" class="px-3 pt-3 flex justify-start">
-          <view
-            v-for="item in nurseAmountList"
-            :key="item"
-            @click="complementaryName = item"
-            class="box-border py-[4rpx] px-2 text-xs bg-[#F3F3F3] mr-2 rounded-full"
+        <view class="px-4 pt-2">
+          <wd-input
+            no-border
+            type="number"
+            placeholder="请填写"
+            maxlength="30"
+            v-model="complementaryName"
           >
-            {{ item }}
+            <!--    @input="handleChange" -->
+          </wd-input>
+          <view v-if="nurseAmountList.length" class="pt-3 flex justify-start overflow-x-auto">
+            <view
+              v-for="item in nurseAmountList"
+              :key="item"
+              @click="complementaryName = item"
+              class="box-border py-[4rpx] px-2 text-xs bg-[#F3F3F3] mr-2 rounded-full"
+            >
+              {{ item }}
+            </view>
           </view>
         </view>
       </template>
@@ -147,26 +150,30 @@
 
   <template v-if="type == 5">
     <ItemForm label="吸奶量">
+      <!--  size="large" -->
       <template #default>
-        <wd-input
-          no-border
-          type="number"
-          placeholder="请填写"
-          size="large"
-          maxlength="30"
-          v-model="milkOutput"
-        >
-          <!--    @input="handleChange" -->
-          <template #suffix>ml</template>
-        </wd-input>
-        <view v-if="nurseAmountList.length" class="px-3 pt-3 flex justify-start">
-          <view
-            v-for="item in nurseAmountList"
-            :key="item"
-            @click="milkOutput = item"
-            class="box-border py-[4rpx] px-2 text-xs bg-[#F3F3F3] mr-2 rounded-full"
+        <view class="px-4 pt-2">
+          <wd-input
+            no-border
+            type="number"
+            placeholder="请填写"
+            maxlength="30"
+            v-model="milkOutput"
           >
-            {{ item }}
+            <!--    @input="handleChange" -->
+            <template #suffix>
+              <text class="text-sm text-[#333]">ml</text>
+            </template>
+          </wd-input>
+          <view v-if="nurseAmountList.length" class="pt-3 flex justify-start overflow-x-auto">
+            <view
+              v-for="item in nurseAmountList"
+              :key="item"
+              @click="milkOutput = item"
+              class="box-border py-[4rpx] px-2 text-xs bg-[#F3F3F3] mr-2 rounded-full"
+            >
+              {{ item }}
+            </view>
           </view>
         </view>
       </template>
@@ -201,7 +208,7 @@
     if (type.value == 2) {
       data = ['小米粥', '小米粥', '小米粥', '小米粥', '小米粥']
     } else {
-      data = [50, 100, 200, 300, 600]
+      data = [50, 100, 200, 300, 600, 700, 800, 900, 1000]
     }
 
     nurseAmountList.value = data

BIN
src/components/picker-info.zip


+ 4 - 3
src/components/picker-info/picker-info.vue

@@ -2,13 +2,14 @@
   <wd-picker
     :columns="columns"
     :title="title"
-    :size="size"
     :label="label"
+    :size="size"
     v-model="value"
     confirm-button-text="确认"
     :is-show="isShow"
     @confirm="emit('confirm')"
   />
+  <!--  -->
 </template>
 
 <script setup>
@@ -23,7 +24,7 @@
     },
     size: {
       type: String,
-      default: 'large',
+      default: '',
     },
     label: {
       type: String,
@@ -33,7 +34,7 @@
 
   const title = defineModel('title')
   const value = defineModel('value')
-  const emit = defineEmits('confirm') // 处理 Picker 确认操作
+  const emit = defineEmits(['confirm']) // 处理 Picker 确认操作
 </script>
 
 <style scoped lang="scss">

+ 1 - 1
src/components/picker-time/picker-time.vue

@@ -49,7 +49,7 @@
   }
   const title = defineModel('title')
   const value = defineModel('value')
-  const emit = defineEmits('confirm') // 处理 Picker 确认操作
+  const emit = defineEmits(['confirm']) // 处理 Picker 确认操作
 </script>
 
 <style scoped lang="scss">

+ 6 - 5
src/components/record-list/record-list.vue

@@ -7,15 +7,15 @@
         }"
         @click.stop="goToPage(item)"
       >
-        <view class="w-full text-xs text-gray-400">
-          <image class="w-[20rpx] h-[20rpx]" :src="oval" mode="widthFix" />
+        <view class="w-full text-xs text-[#666] flex items-center">
+          <image class="w-[20rpx] h-[20rpx] mr-2" :src="oval" mode="widthFix" />
           {{ item.time }}
         </view>
-        <view class="w-full mt-1 text-gray-800">{{ item.title }}</view>
-        <view class="w-full mt-1 text-xs text-gray-500 line-clamp-1">
+        <view class="w-full mt-1 text-[#333] text-sm">{{ item.title }}</view>
+        <view class="w-full mt-1 text-sm text-[#666] line-clamp-1">
           {{ item?.desc ? item?.desc : '无备注' }}
         </view>
-        <view v-if="item?.recorder" class="mt-1 text-xs text-gray-400">
+        <view v-if="item?.recorder" class="mt-1 text-sm text-[#999]">
           记录者:{{ item?.recorder }}
         </view>
       </view>
@@ -57,6 +57,7 @@
 
 <style lang="scss" scoped>
   .wd-divider {
+    padding: 0;
     margin: 0;
   }
 </style>

+ 1 - 1
src/components/switch-btn/switch-btn.vue

@@ -31,7 +31,7 @@
     },
   }) // 定义事件
 
-  const emit = defineEmits('handleList')
+  const emit = defineEmits(['handleList'])
 </script>
 
 <style scoped lang="scss"></style>

+ 11 - 9
src/pages/feed-statistics/feed-statistics.vue

@@ -83,14 +83,15 @@
     <!-- <wd-loadmore v-if="tabIndex == 0" :state="state" @reload="loadmore" /> -->
 
     <!-- 悬浮添加按钮 -->
-    <view
-      @click="goToPage('')"
-      style="box-shadow: 0px 2px 12px rgba(255, 184, 137, 0.5)"
-      class="fixed right-4 bottom-25 w-12 h-12 bg-[#F88842] rounded-full flex items-center justify-center"
-    >
-      <wd-icon name="add" size="52rpx" color="white"></wd-icon>
-    </view>
+    <HoverButton
+      @onButton="
+        () => {
+          showPopup = !showPopup
+        }
+      "
+    />
   </view>
+  <FeedWdPopup v-model:show="showPopup" />
 </template>
 <script setup>
   import { ref } from 'vue'
@@ -99,9 +100,10 @@
   import SwitchBtn from '@/components/switch-btn/switch-btn.vue'
   import REcharts from '@/components/height/r-echarts.vue'
   import data from '@/components/feed-wd-popup/data.json'
+  import HoverButton from '@/components/hover-button/hover-button.vue'
   import Empty from '@/components/empty/empty.vue'
   import RecordList from '@/components/record-list/record-list.vue'
-
+  import FeedWdPopup from '@/components/feed-wd-popup/feed-wd-popup.vue'
   const ML = '(ml)'
   const CI = '(次)'
   const HOUR = '(小时)'
@@ -116,7 +118,7 @@
 
   // 图表上面的 按钮切换是否显示
   const show = ref(false)
-
+  const showPopup = ref(false)
   const yAxisData = ref([])
   const unit = ref('(cm)')
   // 列表数据

+ 45 - 13
src/pages/feed/feed.vue

@@ -16,10 +16,12 @@
       :placeholder="true"
       :bordered="false"
       safeAreaInsetTop
-      right-text="统计"
       @click-left="handleClickLeft"
-      @click-right="handleClickRight"
-    ></wd-navbar>
+    >
+      <template #right>
+        <text @click="handleClickRight" class="text-sm text-[#333]">统计</text>
+      </template>
+    </wd-navbar>
 
     <view class="pb-[30rpx]">
       <!-- 主要内容区 -->
@@ -64,6 +66,12 @@
             class="pt-[32rpx] overflow-hidden"
           >
             <wd-calendar-view
+              style="
+                --wot-calendar-week-fs: 32rpx;
+                --wot-calendar-day-fw: 400;
+                --wot-calendar-panel-title-fs: 32rpx;
+                --wot-calendar-day-height: 100.26rpx;
+              "
               type="daterange"
               :show-panel-title="true"
               :show-confirm="false"
@@ -83,7 +91,7 @@
           </wd-divider>
         </view>
         <wd-gap bg-color="#F2F2F2"></wd-gap>
-        <view class="p-4">2020年12月15日 {{ value }}</view>
+        <view class="p-4 text-[#333]">2020年12月15日 {{ value }}</view>
 
         <template v-if="records.length">
           <FeedBnaner />
@@ -94,13 +102,14 @@
       </view>
 
       <!-- 悬浮添加按钮 -->
-      <view
-        @click="showPopup = !showPopup"
-        style="box-shadow: 0px 2px 12px rgba(255, 184, 137, 0.5)"
-        class="fixed right-4 bottom-25 w-12 h-12 bg-[#F88842] rounded-full flex items-center justify-center"
-      >
-        <wd-icon name="add" size="52rpx" color="white"></wd-icon>
-      </view>
+
+      <HoverButton
+        @onButton="
+          () => {
+            showPopup = !showPopup
+          }
+        "
+      />
     </view>
 
     <FeedWdPopup v-model:show="showPopup" />
@@ -112,6 +121,7 @@
   import FeedBnaner from '@/components/feedBnaner/feedBnaner.vue'
   import RecordList from '@/components/record-list/record-list.vue'
   import FeedWdPopup from '@/components/feed-wd-popup/feed-wd-popup.vue'
+  import HoverButton from '@/components/hover-button/hover-button.vue'
   import { onLoad } from '@dcloudio/uni-app'
   import { ref } from 'vue'
 
@@ -237,7 +247,29 @@
   }
 
   ::v-deep .wd-month__day-bottom {
-    bottom: 0;
-    font-size: 30px;
+    bottom: 0px;
+    font-size: 1rem;
   }
+
+  ::v-deep .wd-month__day-text {
+    font-size: 0.875rem;
+    /* color: #666; */
+  }
+
+  ::v-deep .wd-month-panel__title {
+    margin-bottom: 32rpx;
+    font-weight: 600;
+  }
+  ::v-deep .wd-month-panel__weeks {
+    font-weight: 600;
+  }
+  /* ::v-deep .wd-month__day {
+    width: 14.285%;
+    height: 14.285% !important;
+  }
+
+  ::v-deep .wd-month__day.is-start .wd-month__day-container {
+    width: 100%;
+    height: 100%;
+  } */
 </style>

+ 3 - 9
src/pages/growth/growth.vue

@@ -55,19 +55,13 @@
     <HEcharts v-if="tabIndex === 2" :yAxisData="wList" :xAxisData="xAxisData" :unit="unit" />
     <HEcharts v-if="tabIndex === 3" :yAxisData="tList" :xAxisData="xAxisData" :unit="unit" />
     <!-- 悬浮添加按钮 -->
-    <view
-      @click="goToPage('')"
-      style="box-shadow: 0px 2px 12px rgba(255, 184, 137, 0.5)"
-      class="fixed right-4 bottom-25 w-12 h-12 bg-[#F88842] rounded-full flex items-center justify-center"
-    >
-      <wd-icon name="add" size="52rpx" color="white"></wd-icon>
-    </view>
+    <HoverButton @onButton="goToPage" />
   </view>
 </template>
 <script setup>
   import HeightItem from '@/components/height/height-item.vue'
   import HEcharts from '@/components/height/h-echarts.vue'
-
+  import HoverButton from '@/components/hover-button/hover-button.vue'
   import Empty from '@/components/empty/empty.vue'
   import { ref } from 'vue'
   import { onLoad, onReachBottom } from '@dcloudio/uni-app'
@@ -98,7 +92,7 @@
     uni.navigateBack()
   }
 
-  function goToPage(hid) {
+  function goToPage(hid = '') {
     uni.navigateTo({
       url: `/pages/height-details/height-details?id=${hid}`,
     })

+ 15 - 12
src/pages/height-details/height-details.vue

@@ -29,22 +29,25 @@
     <wd-form ref="formRef" :model="formData">
       <ItemForm v-for="item in formDataList" :key="item.id" :label="item.label">
         <template #default>
-          <wd-input
-            v-if="item.unit"
-            no-border
-            type="number"
-            placeholder="请填写"
-            size="large"
-            maxlength="30"
-            v-model="formData[item.id]"
-          >
-            <template #suffix>{{ item.unit }}</template>
-          </wd-input>
+          <view class="px-4" v-if="item.unit">
+            <wd-input
+              no-border
+              type="number"
+              placeholder="请填写"
+              maxlength="30"
+              v-model="formData[item.id]"
+            >
+              <template #suffix>
+                <text class="text-sm text-[#333]">
+                  {{ item.unit }}
+                </text>
+              </template>
+            </wd-input>
+          </view>
 
           <wd-datetime-picker
             v-else
             title="时间"
-            size="large"
             label=""
             type="date"
             v-model="formData[item.id]"

+ 11 - 11
src/pages/index/index.vue

@@ -23,7 +23,7 @@
             <view
               v-show="childrenList.length > 1"
               @click="showChildren = !showChildren"
-              class="text-sm flex justify-center items-center px-4 py-1 text-orange-500 bg-white/[0.6] rounded-full whitespace-nowrap"
+              class="text-xs flex justify-center items-center px-4 py-1 text-orange-500 bg-white/[0.6] rounded-full whitespace-nowrap"
             >
               <wd-icon
                 name="translate-bold"
@@ -37,7 +37,7 @@
           <view class="flex items-center gap-3">
             <img :src="avatarUrl" class="w-16 h-16 rounded-full object-cover" alt="Baby Avatar" />
             <view v-if="childrenInfo">
-              <view class="text-base font-semibold">
+              <view class="text-base font-semibold text-[#333]">
                 {{ childrenInfo.name }}
                 <image
                   @click="goToBabyInfo(childrenInfo.id)"
@@ -46,7 +46,7 @@
                   mode="widthFix"
                 />
               </view>
-              <view class="text-gray-600 text-sm">{{ childrenInfo.old }}</view>
+              <view class="text-[#666] text-xs mt-1">{{ childrenInfo.old }}</view>
             </view>
             <view v-else>
               <text class="text-sm font-semibold text-[#333]">暂无宝宝,请立即添加</text>
@@ -62,10 +62,10 @@
           <wd-icon name="close" color="#F88842" size="24rpx"></wd-icon>
         </view>
 
-        <view class="">
+        <view>
           <view class="flex items-center justify-between mb-4">
-            <text class="text-lg font-medium">喂养记录</text>
-            <view @click="withButtonProps" class="text-gray-400 flex items-center gap-1">
+            <text class="text-base font-medium text-[#333]">喂养记录</text>
+            <view @click="withButtonProps" class="text-[#999] text-xs flex items-center gap-1">
               查看详情
               <wd-icon name="arrow-right" color="#999" size="28rpx"></wd-icon>
             </view>
@@ -83,8 +83,8 @@
                 <image class="w-full h-full object-cover" :src="item.img" mode="widthFix" alt="" />
               </view>
               <view class="shrink-0">
-                <view class="text-base text-[#333]">{{ item.title }}</view>
-                <view class="text-gray-600 text-xs mt-2">
+                <view class="text-sm text-[#333]">{{ item.title }}</view>
+                <view class="text-[#666] text-xs mt-2">
                   {{ item.subTitle ? item.subTitle : item.onTitle }}
                 </view>
               </view>
@@ -99,8 +99,8 @@
         style="border-bottom: 2rpx solid #f2f2f2"
         class="box-border flex items-center justify-between p-4"
       >
-        <text class="text-lg font-medium">生长记录</text>
-        <view @click="goToGrowthPage('')" class="text-gray-400 flex items-center gap-1">
+        <text class="text-base font-medium text-[#333]">生长记录</text>
+        <view @click="goToGrowthPage('')" class="text-[#999] text-xs flex items-center gap-1">
           查看详情
           <wd-icon name="arrow-right" color="#999" size="28rpx"></wd-icon>
         </view>
@@ -141,7 +141,7 @@
           </view>
         </template>
         <template #title>
-          <view class="h-full flex items-center text-xl">
+          <view class="h-full flex text-[#333] items-center text-base">
             {{ item.name }}
           </view>
         </template>

+ 1 - 1
src/pages/myUser/component/pickerUser.vue

@@ -32,7 +32,7 @@
 
   const title = defineModel('title')
   const value = defineModel('value')
-  const emit = defineEmits('confirm') // 处理 Picker 确认操作
+  const emit = defineEmits(['confirm']) // 处理 Picker 确认操作
 </script>
 
 <style scoped lang="scss">

+ 0 - 1
src/pages/record/record.vue

@@ -55,7 +55,6 @@
               <wd-textarea
                 clear-trigger="focus"
                 auto-height
-                size="large"
                 placeholder="填写备注信息"
                 v-model="formData.remark"
                 :maxlength="120"