Leon 1 年之前
父节点
当前提交
764b5a84b3

+ 2 - 1
src/_eat/components/add_label.tsx

@@ -41,9 +41,10 @@ export default function AddLabel(props: { labels: any }) {
     function confirmPickerTime(e){
         console.log(e)
         createSchedule({
+            
             event:'EAT_CUSTOM',
             title:value,
-            time:e
+            time:e,is_all_day:true
         }).then(res=>{
             global.refreshWindow()
             if (process.env.TARO_ENV=='weapp'){

+ 1 - 1
src/_eat/pages/meal_list.tsx

@@ -18,7 +18,7 @@ export default function MealList() {
     }, [])
 
     function schedules() {
-        getSchedules({ window: 'EAT' }).then(res => {
+        getSchedules({ window: 'EAT',is_all_day:true }).then(res => {
             console.log('sss',res)
             if ((res as any).data && (res as any).data.length > 0) {
                 setList((res as any).data)

+ 7 - 0
src/components/basic/Icons.tsx

@@ -223,4 +223,11 @@ export const IconStreak = (props: { width: number, color: string }) => {
     return <View style={{ width: props.width, height: props.width }}>
         {process.env.TARO_ENV == 'weapp' ? <mysvg src={icon} colors={[]} /> : <SvgXml xml={icon} width={props.width} height={props.width} />}
     </View>
+}
+
+export const IconMore = (props: { width: number, color: string }) => {
+    const icon = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="34" height="34" viewBox="0 0 34 34"><defs><clipPath id="master_svg0_1588_15883"><rect x="0" y="0" width="34" height="34" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_1588_15883)"><g><ellipse cx="22.666585206985474" cy="16.999348878860474" rx="2.8333332538604736" ry="2.8333332538604736" fill="#B2B2B2" fill-opacity="1"/></g><g><ellipse cx="11.333333253860474" cy="16.999348878860474" rx="2.8333332538604736" ry="2.8333332538604736" fill="${props.color}" fill-opacity="1"/></g></g></svg>`
+    return <View style={{ width: props.width, height: props.width }}>
+        {process.env.TARO_ENV == 'weapp' ? <mysvg src={icon} colors={[]} /> : <SvgXml xml={icon} width={props.width} height={props.width} />}
+    </View>
 }

+ 12 - 0
src/features/health/MainConsole.scss

@@ -97,6 +97,18 @@
     align-items: center;
     justify-content: center;
     display: flex;
+    position: relative;
+}
+
+.main_footer_more{
+    position: absolute;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    top: 0;
+    height: 108px;
+    right: 0;
+    width: 114px;
 }
 
 .main_footer_text{

+ 6 - 0
src/features/health/MainConsole.tsx

@@ -14,6 +14,7 @@ import showActionSheet from "@/components/basic/ActionSheet";
 import { rpxToPx } from "@/utils/tools";
 import { setMode } from "@/store/health";
 import { getCountownTime, getDuration, getScenario, getWindowStatus } from "./hooks/health_hooks";
+import { IconMore } from "@/components/basic/Icons";
 
 let useNavigation;
 let min = 0
@@ -467,6 +468,11 @@ export default function MainConsole(props: { type: WindowType }) {
             {/* {
                 (health.mode == 'EAT' || health.mode == 'ACTIVE') && <Text style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }} onClick={more}>更多</Text>
             } */}
+            {
+                (health.mode == 'EAT' || health.mode == 'ACTIVE') && <View className="main_footer_more" onClick={more}>
+                    <IconMore color="#b2b2b2" width={17}/>
+                </View>
+            }
         </View>
 
         {