Leon 2 éve
szülő
commit
8799a403e3
43 módosított fájl, 613 hozzáadás és 148 törlés
  1. 2 0
      src/app.tsx
  2. BIN
      src/assets/images/camera.png
  3. 20 3
      src/components/basic/Icons.scss
  4. 10 4
      src/components/basic/Icons.tsx
  5. 27 8
      src/components/input/Inputs.scss
  6. 23 4
      src/components/input/Inputs.tsx
  7. 4 2
      src/components/input/Stepper.scss
  8. 4 2
      src/components/layout/Box.scss
  9. 2 1
      src/components/layout/Box.tsx
  10. 9 4
      src/components/layout/Header.scss
  11. 15 0
      src/components/layout/SectionHeader.scss
  12. 26 0
      src/components/layout/SectionHeader.tsx
  13. 38 0
      src/components/layout/TableCell.scss
  14. 29 0
      src/components/layout/TableCell.tsx
  15. 0 0
      src/components/layout/TableCellFooter.scss
  16. 1 0
      src/components/layout/TableCellFooter.tsx
  17. 16 0
      src/components/layout/TableCellHeader.scss
  18. 14 0
      src/components/layout/TableCellHeader.tsx
  19. 3 4
      src/components/layout/layout.tsx
  20. 6 6
      src/context/locales/zh.js
  21. 3 1
      src/context/themes/color.tsx
  22. 3 4
      src/features/trackSomething/components/ActivityHistory.tsx
  23. 3 4
      src/features/trackSomething/components/MetricHistory.tsx
  24. 1 1
      src/features/trackSomething/components/MetricItem.scss
  25. 19 14
      src/features/trackTimeDuration/components/Clock.tsx
  26. 3 2
      src/features/trackTimeDuration/components/RecordFastSleep.scss
  27. 2 3
      src/features/trackTimeDuration/components/RecordFastSleep.tsx
  28. 45 2
      src/features/trackTimeDuration/components/Schedule.tsx
  29. 5 6
      src/features/trackTimeDuration/components/SetSchedule.tsx
  30. 1 1
      src/features/trackTimeDuration/hooks/RingData.tsx
  31. 8 0
      src/pages/account/ChooseAuth.config.ts
  32. 10 0
      src/pages/account/ChooseAuth.scss
  33. 10 5
      src/pages/account/ChooseAuth.tsx
  34. 7 0
      src/pages/account/EditPage.config.ts
  35. 14 4
      src/pages/account/EditPage.tsx
  36. 54 13
      src/pages/account/Profile.tsx
  37. 44 3
      src/pages/account/ProfileSetting.scss
  38. 22 5
      src/pages/account/ProfileSetting.tsx
  39. 17 8
      src/pages/account/Setting.tsx
  40. 2 1
      src/pages/clock/Clock.scss
  41. 82 29
      src/pages/clock/Clock.tsx
  42. 8 3
      src/utils/common.scss
  43. 1 1
      src/utils/time_format.ts

+ 2 - 0
src/app.tsx

@@ -5,11 +5,13 @@ import { Provider } from 'react-redux'
 import store from './store/store'
 import { View } from '@tarojs/components'
 import GlobalModal from './components/layout/GlobalModal'
+import Taro from '@tarojs/taro'
 
 // import 'taro-ui/dist/style/index.scss'
 
 
 const App: React.FC<PropsWithChildren> = ({ children }) => {
+  global.isDebug = Taro.getStorageSync('isDebug')
   return <Provider store={store}>
     <View style={{position:'absolute',left:0,right:0,top:0,height:300,backgroundColor:'red'}}/>
     {children}

BIN
src/assets/images/camera.png


+ 20 - 3
src/components/basic/Icons.scss

@@ -1,4 +1,4 @@
-.icon_bg{
+.icon_bg {
     width: 40px;
     height: 40px;
     display: flex;
@@ -7,7 +7,7 @@
     position: relative;
 }
 
-.plus_bg{
+.plus_bg {
     position: absolute;
     left: 0;
     top: 0;
@@ -24,8 +24,25 @@
     border-radius: 2px;
 }
 
-.plus{
+.plus {
     height: 24px;
     width: 4px;
     border-radius: 2px;
+}
+
+.clear_btn_bg {
+    width: 28px;
+    height: 28px;
+    border-radius: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background-color: #121212;
+}
+
+
+.clear {
+    opacity: 0.1;
+    width: 20px;
+    height: 20px;
 }

+ 10 - 4
src/components/basic/Icons.tsx

@@ -1,17 +1,23 @@
-import { View } from '@tarojs/components'
+import { View, Image } from '@tarojs/components'
 import './Icons.scss'
 
 export const IconMinus = (props: { color: string, disable?: boolean }) => {
     return <View className='icon_bg'>
-        <View className='minus' style={{ backgroundColor: props.disable?'#FFFFFF66':props.color }}></View>
+        <View className='minus' style={{ backgroundColor: props.disable ? '#FFFFFF66' : props.color }}></View>
     </View>
 }
 
 export const IconPlus = (props: { color: string, disable?: boolean }) => {
     return <View className='icon_bg'>
-        <View className='minus' style={{ backgroundColor: props.disable?'#FFFFFF66':props.color }}></View>
+        <View className='minus' style={{ backgroundColor: props.disable ? '#FFFFFF66' : props.color }}></View>
         <View className='plus_bg'>
-            <View className='plus' style={{ backgroundColor: props.disable?'#FFFFFF66':props.color }}/>
+            <View className='plus' style={{ backgroundColor: props.disable ? '#FFFFFF66' : props.color }} />
         </View>
     </View>
+}
+
+export const IconClear = () => {
+    return <View className='clear_btn_bg'>
+        <Image className='clear' src={require('@assets/images/x.png')} />
+    </View>
 }

+ 27 - 8
src/components/input/Inputs.scss

@@ -1,19 +1,38 @@
 @import '@/utils/common.scss';
-.input{
-    height: 112px;
-    background-color: #000;
+
+.input_bg{
+    width: 658px;
+    height: 96px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    background-color: $ringColor;
     border-radius: 36px;
     padding-left: 40px;
-    padding-right: 40px;
+    margin-left: 46px;
+    box-sizing: border-box;
+}
+
+.input{
+    height: 96px;
     color: #fff;
-    caret-color: $themeColor;
-    border: solid 4px #000;
+    caret-color: $fastColor;
+    flex: 1;
+    // border: solid 4px #000;
+}
+
+.clear_bg{
+    width: 116px;
+    height: 96px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
 
 .input:focus{
-    border: solid 4px $themeColor;
+    // border: solid 4px $themeColor;
 }
 
 .input_focus{
-    border: solid 4px $themeColor;
+    // border: solid 4px $themeColor;
 }

+ 23 - 4
src/components/input/Inputs.tsx

@@ -2,11 +2,14 @@ import { Input, View } from "@tarojs/components";
 import './Inputs.scss'
 import { useState } from "react";
 import { ColorType } from "@/context/themes/color";
+import { IconClear } from "../basic/Icons";
 
 interface CustomInputProps {
     placeholder?: string;
     value: string;
     onChange: (value: string) => void;
+    onConfirm: Function,
+    openType?:string;
     disabled?: boolean;
     isSecure?: boolean;
 }
@@ -15,6 +18,8 @@ export default function Component({
     placeholder,
     value,
     onChange,
+    onConfirm,
+    openType,
     disabled,
     isSecure
 }: CustomInputProps) {
@@ -25,17 +30,26 @@ export default function Component({
         setInputValue(newValue);
         onChange(newValue);
     };
+
+    function clear(){
+        setInputValue('')
+        onChange('')
+    }
     return (
-        <View>
+        <View className="input_bg">
             <Input className={isFocus ? "input input_focus" : "input"}
+            
                 placeholder={placeholder ? placeholder : ''}
                 value={inputValue}
                 secureTextEntry={isSecure ? true : false}
                 textContentType={isSecure ? 'password' : 'none'}
-                type={isSecure ? 'password' : 'text'}
+                type={openType?openType:''}
                 onInput={handleInputChange}
-                selectionColor={global.fastColor?global.fastColor:ColorType.fast}
-                disabled={disabled?disabled:false}
+                // onConfirm={() => onConfirm()}
+                focus
+                confirmType="done"
+                selectionColor={global.fastColor ? global.fastColor : ColorType.fast}
+                disabled={disabled ? disabled : false}
                 onFocus={() => {
                     setIsFocus(true)
                 }}
@@ -43,6 +57,11 @@ export default function Component({
                     setIsFocus(false)
                 }}
             />
+            {
+                inputValue.length > 0 && <View className="clear_bg" onClick={clear}>
+                    <IconClear />
+                </View>
+            }
         </View>
     )
 }

+ 4 - 2
src/components/input/Stepper.scss

@@ -1,8 +1,10 @@
+@import '@/utils/common.scss';
+
 .stepper_bg{
     display: flex;
     flex-direction: row;
     align-items: center;
-    background-color: #1c1c1c;
+    background-color: $ringColor;
     height: 128px;
     width: 578px;
     margin-bottom: 40px;
@@ -11,7 +13,7 @@
     // padding-right: 20px;
     // padding-top: 24px;
     box-sizing: border-box;
-    box-shadow: 0px 8px 20px 0px rgba(255, 255, 255, 0.1);
+    box-shadow: 0px 8px 20px 0px $blackColor;
 }
 
 .stepper_icon{

+ 4 - 2
src/components/layout/Box.scss

@@ -1,5 +1,7 @@
+@import '@/utils/common.scss';
+
 .box-container {
-    background-color: #1C1C1C;
+    background-color: $boxColor;
     // background-color: #fff;
     border-radius: 48px;
     padding: 40px;
@@ -9,7 +11,7 @@
     box-sizing: border-box;
     display: flex;
     flex-direction: column;
-    margin-bottom: 40px;
+    margin-bottom: 24px;
     flex-shrink: 0;
     // position: relative;
 }

+ 2 - 1
src/components/layout/Box.tsx

@@ -2,6 +2,7 @@ import { View, Text } from "@tarojs/components";
 import './Box.scss'
 import { BoxType } from "@/utils/types";
 import Taro from "@tarojs/taro";
+import { ColorType } from "@/context/themes/color";
 
 export default function Component(props: {
     children: React.ReactNode,
@@ -38,7 +39,7 @@ export default function Component(props: {
     }
     return <View>
         {props.header ? props.header : null}
-        <View className="box-container" style={{ ...props.style,backgroundColor:props.tranparentBg?'transparent':'#1c1c1c' }} onTap={onClick}>
+        <View className="box-container" style={{ ...props.style,backgroundColor:props.tranparentBg?'transparent':ColorType.box }} onTap={onClick}>
             {
                 props.title && <Text className="box-title">{props.title}</Text>
             }

+ 9 - 4
src/components/layout/Header.scss

@@ -4,10 +4,10 @@
     display: flex;
     flex-direction: row;
     justify-content: space-between;
-    height: 96px;
+    height: 48px;
     align-items: center;
-    margin-left: 46px;
-    margin-right: 46px;
+    margin-left: 0px;
+    margin-right: 0px;
 }
 
 .header_title{
@@ -21,5 +21,10 @@
     color: $fastColor;
     font-size: 32px;
     line-height: 32px;
-    font-weight: 400;
+    font-weight: 500;
+    padding-top: 12px;
+    padding-bottom: 4px;
+    padding-right: 20px;
+    padding-left: 20px;
+    // background-color: blue;
 }

+ 15 - 0
src/components/layout/SectionHeader.scss

@@ -0,0 +1,15 @@
+.section_header {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    margin-left: 46px;
+    margin-right: 46px;
+}
+
+.section_header_title {
+    color: #fff;
+    font-size: 48px;
+    line-height: 48px;
+    font-weight: 500;
+}

+ 26 - 0
src/components/layout/SectionHeader.tsx

@@ -0,0 +1,26 @@
+import { View, Text } from '@tarojs/components'
+import './SectionHeader.scss'
+import Taro from '@tarojs/taro';
+
+export default function Component(props: {
+    top: number,
+    bottom: number,
+    title: string,
+    children?: React.ReactNode,
+}) {
+    function rpxToPx(n: number) {
+        var rate = Taro.getSystemInfoSync().windowWidth / 750;
+    return n * rate;
+    }
+    return <View className='section_header'
+        style={{
+            marginTop: rpxToPx(props.top),
+            marginBottom: rpxToPx(props.bottom),
+            backgroundColor: global.isDebug ? 'red' : 'transparent'
+        }}>
+        <Text className='section_header_title'>{props.title}</Text>
+        {
+            props.children
+        }
+    </View>
+}

+ 38 - 0
src/components/layout/TableCell.scss

@@ -0,0 +1,38 @@
+@import '@/utils/common.scss';
+
+.table_cell {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    margin-left: 46px;
+    margin-right: 46px;
+    background-color: $boxColor;
+    border-radius: 36px;
+    padding-left: 40px;
+    padding-right: 40px;
+    min-height: 112px;
+    padding-top: 30px;
+    padding-bottom: 30px;
+    box-sizing: border-box;
+}
+
+.table_cell_margin_bottom{
+    flex-shrink: 0;
+    margin-bottom: 24px;
+}
+
+.table_cell_title {
+    font-size: 32px;
+    font-weight: 400;
+    line-height: 32px;
+    display: flex;
+    flex: 1;
+}
+
+.table_cell_arrow {
+
+    width: 40px;
+    height: 40px;
+    opacity: 0.2;
+
+}

+ 29 - 0
src/components/layout/TableCell.tsx

@@ -0,0 +1,29 @@
+import { View, Text, Image } from "@tarojs/components";
+import './TableCell.scss'
+
+export default function Component(props: {
+    children?: React.ReactNode,
+    title: string,
+    showArrow?: boolean,
+    showMarginBottom?: boolean,
+    onClick?: Function
+}) {
+
+    function onClick() {
+        if (props.onClick) {
+            props.onClick()
+        }
+    }
+
+    return <View onClick={onClick} className={props.showMarginBottom ? "table_cell table_cell_margin_bottom" : "table_cell"}>
+        <View style={{ flex: 1 }}>
+            <Text className='table_cell_title'>{props.title}</Text>
+        </View>
+        {
+            props.children
+        }
+        {
+            props.showArrow && <Image src={require('@assets/images/arrow3.png')} className="table_cell_arrow" />
+        }
+    </View>
+}

+ 0 - 0
src/components/layout/TableCellFooter.scss


+ 1 - 0
src/components/layout/TableCellFooter.tsx

@@ -0,0 +1 @@
+import './TableCellFooter.scss'

+ 16 - 0
src/components/layout/TableCellHeader.scss

@@ -0,0 +1,16 @@
+.tableCellHeader {
+    display: flex;
+    flex-direction: row;
+    // margin-top: 12px;
+    margin-bottom: 12px;
+    margin-left: 46px;
+    margin-right: 46px;
+}
+
+.tableCellHeaderTitle {
+    font-size: 24px;
+    line-height: 24px;
+    color: #fff;
+    opacity: 0.4;
+    letter-spacing: 0.05em;
+}

+ 14 - 0
src/components/layout/TableCellHeader.tsx

@@ -0,0 +1,14 @@
+import { View, Text } from '@tarojs/components'
+import './TableCellHeader.scss'
+
+export default function Component(props: {
+    title: string
+}) {
+    return <View className='tableCellHeader'
+        style={{
+
+            backgroundColor: global.isDebug ? 'red' : 'transparent'
+        }}>
+        <Text className='tableCellHeaderTitle'>{props.title}</Text>
+    </View>
+}

+ 3 - 4
src/components/layout/layout.tsx

@@ -22,7 +22,6 @@ export default function Layout(props: {
 }) {
     const { children, type, triggered } = props;
     const [showTitle, setShowTitle] = useState(props.titleShowStyle == NaviBarTitleShowType.alwayShow)
-    const isDebugMode = false
 
     useEffect(() => {
         Taro.setNavigationBarTitle({
@@ -67,7 +66,7 @@ export default function Layout(props: {
                 onScrollToLower={() => { props.more ? props.more() : null }}
                 refresherTriggered={triggered}>
                 {
-                    props.title && <View className="layout_title_view" style={{ backgroundColor: isDebugMode ? 'red' : 'transparent' }}>
+                    props.title && <View className="layout_title_view" style={{ backgroundColor: global.isDebug ? 'red' : 'transparent' }}>
                         <Text className='layout_title'
                             style={{
                                 color: props.titleColor ? props.titleColor : '#fff',
@@ -92,7 +91,7 @@ export default function Layout(props: {
                 onScrollToLower={() => { props.more ? props.more() : null }}
                 refresherTriggered={triggered}>
                 {
-                    props.title && <View className="layout_title_view" style={{ backgroundColor: isDebugMode ? 'red' : 'transparent' }}>
+                    props.title && <View className="layout_title_view" style={{ backgroundColor: global.isDebug ? 'red' : 'transparent' }}>
                         <Text className='layout_title'
                             style={{
                                 color: props.titleColor ? props.titleColor : '#fff',
@@ -109,7 +108,7 @@ export default function Layout(props: {
         case TemplateType.flex:
             return <View className='flex'>
                 {
-                    props.title && <View className="layout_title_view" style={{ backgroundColor: isDebugMode ? 'red' : 'transparent' }}>
+                    props.title && <View className="layout_title_view" style={{ backgroundColor: global.isDebug ? 'red' : 'transparent' }}>
                         {
                             props.isFastSleepTheme ? <Text className='layout_title fast_sleep_text'
                                 style={{

+ 6 - 6
src/context/locales/zh.js

@@ -55,7 +55,7 @@ export default {
             title: '设置',
         },
         user_profile: {
-            title: '用户信息'
+            title: '编辑资料'
         }
 
 
@@ -119,17 +119,17 @@ export default {
                 real_sleep_end_dt: '睡眠结束时间',
             },
             schedule: {
-                unfollow_title: '日程提醒',
-                follow_tip: '开启后,将显示今天的日程。',
-                timeout_tip: '完成当前记录,恢复今天日程。',
+                section_title: '今天',
+                follow_tip: '开启日程提醒',
+                timeout_tip: '完成当前记录,恢复今天日程。',
                 action_sheet_adjust_schedule: '调整日程', //点击弹出action_sheet的item
                 duration_goals_by_stage: '查看断食阶段目标',  //底部文字按钮 waite for start
                 current_stage: '查看当前断食阶段'              //底部文字按钮 onging
             },
             record_fast_sleep: {
                 header: {
-                    latest_record: '最近记录',
-                    btn_show_all: '显示全部'
+                    latest_record: '最近',
+                    btn_show_all: '查看更多'
                 },
                 item: {
                     fast: '断食',

+ 3 - 1
src/context/themes/color.tsx

@@ -1,4 +1,6 @@
 export enum ColorType {
     fast = '#00ffff',//'#aaff00',
-    sleep = '#8961F5'//'#00ffff'
+    sleep = '#8961F5',//'#00ffff'
+    box = '#121212',
+    ring = '#1c1c1c'
 }

+ 3 - 4
src/features/trackSomething/components/ActivityHistory.tsx

@@ -14,7 +14,6 @@ import CenterContentTitleModal from "@/features/common/CenterContentTitleModal";
 export default function Component(props: { records: any[] }) {
     const user = useSelector((state: any) => state.user);
     const [list, setList] = useState(props.records)
-    const isDebugModel = false
     useEffect(() => {
         setList(props.records)
     }, [props.records])
@@ -104,9 +103,9 @@ export default function Component(props: { records: any[] }) {
                 lastYearStr = TimeFormatter.getYearByDate(item.date)
                 return <View style={{ display: 'flex', flexDirection: 'column' }}>
                     {
-                        showYear && <Text className="year" style={{backgroundColor:isDebugModel?'red':'transparent'}}>{TimeFormatter.getYearByDate(item.date)}</Text>
+                        showYear && <Text className="year" style={{backgroundColor:global.isDebug?'red':'transparent'}}>{TimeFormatter.getYearByDate(item.date)}</Text>
                     }
-                    <Text className="operate_day" style={{backgroundColor:isDebugModel?'red':'transparent'}}>{TimeFormatter.getMonthAndDayByDate(item.date)}</Text>
+                    <Text className="operate_day" style={{backgroundColor:global.isDebug?'red':'transparent'}}>{TimeFormatter.getMonthAndDayByDate(item.date)}</Text>
 
                     <RecordItem onClick={() => showDetail(item)} delete={() => deleteRecord(item.records[0])}>
                         <View className="operate_item">
@@ -114,7 +113,7 @@ export default function Component(props: { records: any[] }) {
                                 <Text className="status_text">{item.records[0].type == 'total' ? '总计' : item.records[0].type == 'sync' ? '同步' : '打卡'}</Text>
                             </View>
                             <View style={{ width: 12 }} /> */}
-                            <Text className="value" style={{backgroundColor:isDebugModel?'red':'transparent'}}>{item.records[0].items[0].value}</Text>
+                            <Text className="value" style={{backgroundColor:global.isDebug?'red':'transparent'}}>{item.records[0].items[0].value}</Text>
                             <Text className="unit">步</Text>
                             <View style={{ flex: 1 }} />
                             <Text className="time">{formateHourMinutes(item.records[0].timestamp)}</Text>

+ 3 - 4
src/features/trackSomething/components/MetricHistory.tsx

@@ -9,7 +9,6 @@ import { TimeFormatter } from "@/utils/time_format";
 export default function Component(props: { records: any[] }) {
     const user = useSelector((state: any) => state.user);
     const [list, setList] = useState(props.records)
-    const isDebugModel = false
     useEffect(() => {
         setList(props.records)
     }, [props.records])
@@ -72,9 +71,9 @@ export default function Component(props: { records: any[] }) {
                 lastYearStr = TimeFormatter.getYearByDate(item.date)
                 return <View style={{ display: 'flex', flexDirection: 'column' }}>
                     {
-                        showYear && <Text className="year" style={{ backgroundColor: isDebugModel ? 'red' : 'transparent' }}>{TimeFormatter.getYearByDate(item.date)}</Text>
+                        showYear && <Text className="year" style={{ backgroundColor: global.isDebug ? 'red' : 'transparent' }}>{TimeFormatter.getYearByDate(item.date)}</Text>
                     }
-                    <Text className="operate_day" style={{ backgroundColor: isDebugModel ? 'red' : 'transparent' }}>{TimeFormatter.getMonthAndDayByDate(item.date)}</Text>
+                    <Text className="operate_day" style={{ backgroundColor: global.isDebug ? 'red' : 'transparent' }}>{TimeFormatter.getMonthAndDayByDate(item.date)}</Text>
                     {
                         item.records.map(record => {
                             return <RecordItem delete={() => deleteRecord(record)}>
@@ -83,7 +82,7 @@ export default function Component(props: { records: any[] }) {
                                        
                                     </View>
                                     <View style={{ width: 12 }} /> */}
-                                    <Text className="value" style={{ backgroundColor: isDebugModel ? 'red' : 'transparent' }}>{record.items[0].value}</Text>
+                                    <Text className="value" style={{ backgroundColor: global.isDebug ? 'red' : 'transparent' }}>{record.items[0].value}</Text>
                                     {
                                         record.items.length > 1 && <Text className="value">/{record.items[1].value}</Text>
                                     }

+ 1 - 1
src/features/trackSomething/components/MetricItem.scss

@@ -9,7 +9,7 @@
     padding-bottom: 24px;
     background-color: #1c1c1c;
     box-sizing: border-box;
-    margin-top: 20px;
+    margin-bottom: 20px;
 }
 
 .metric_title {

+ 19 - 14
src/features/trackTimeDuration/components/Clock.tsx

@@ -40,7 +40,7 @@ export default function Component() {
         var current_record = (checkData as any).current_record
         var currentDot1 = getDot((checkData as any).current_record, true)
         var targetBigRing1 = getTarget((checkData as any).current_record, true)
-        targetBigRing1.color = global.fastColor?global.fastColor:ColorType.fast+'33'//'rgba(170,255,0,0.4)'
+        targetBigRing1.color = global.fastColor ? global.fastColor : ColorType.fast + '33'//'rgba(170,255,0,0.4)'
         if (current_record.status == 'ONGOING') {
             var realRing1 = getReal((checkData as any).current_record, true, false)
 
@@ -66,14 +66,14 @@ export default function Component() {
             var realRing = getReal((checkData as any).current_record, false, false)
             var currentDot = getDot((checkData as any).current_record, false)
             var targetRing = getTarget((checkData as any).current_record, false)
-            targetRing.color = global.sleepColor?global.sleepColor:ColorType.sleep+'33'//'rgba(0, 255, 255, 0.4)'
+            targetRing.color = global.sleepColor ? global.sleepColor : ColorType.sleep + '33'//'rgba(0, 255, 255, 0.4)'
             if (current_record.status == 'ONGOING2') {
                 return <Rings common={common} bgRing={bgRing} realRing={realRing} currentDot={currentDot} targetRing={targetRing} canvasId='clock7' />
             }
 
             //ongoing3时,睡眠点整理亮度降低
             if (current_record.status == 'ONGOING3') {
-                currentDot.color = global.sleepColor?global.sleepColor:ColorType.sleep+'66'
+                currentDot.color = global.sleepColor ? global.sleepColor : ColorType.sleep + '66'
             }
             return <Rings common={common} bgRing={bgRing} currentDot={currentDot} canvasId='clock8' />
         }
@@ -81,10 +81,15 @@ export default function Component() {
     }
 
     if (!checkData)
-        return <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', width: '100%', marginTop: 20 }}>
+        return <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', width: '100%', marginTop: 20,position:'relative' }}>
             {
                 bigRing()
             }
+            <View style={{ display: 'flex', position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, alignItems: 'center', justifyContent: 'center' }}>
+                {
+                    <Text className="clock_text fast_sleep_text" style={{ fontSize: 32 }}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
+                }
+            </View>
         </View>
     return (
         <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', width: '100%' }}>
@@ -99,38 +104,38 @@ export default function Component() {
                 </View>
                 <View style={{ display: 'flex', position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, alignItems: 'center', justifyContent: 'center' }}>
                     {
-                        (checkData as any).current_record.status == 'WAIT_FOR_START' && time.scenario=='FAST_SLEEP' && 
-                        <Text className="clock_text fast_sleep_text" style={{fontSize:32}}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
+                        (checkData as any).current_record.status == 'WAIT_FOR_START' && time.scenario == 'FAST_SLEEP' &&
+                        <Text className="clock_text fast_sleep_text" style={{ fontSize: 32 }}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
                     }
                     {
-                        (checkData as any).current_record.status == 'WAIT_FOR_START' && time.scenario!='FAST_SLEEP' && 
-                        <Text className="clock_text" style={{ color: global.fastColor?global.fastColor:ColorType.fast,fontSize:32 }}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
+                        (checkData as any).current_record.status == 'WAIT_FOR_START' && time.scenario != 'FAST_SLEEP' &&
+                        <Text className="clock_text" style={{ color: global.fastColor ? global.fastColor : ColorType.fast, fontSize: 32 }}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
                     }
                     {
-                        (checkData as any).current_record.status == 'ONGOING' && <Text className="clock_text" style={{ color: (checkData as any).current_record.scenario == 'FAST' ? global.fastColor?global.fastColor:ColorType.fast : global.sleepColor?global.sleepColor:ColorType.sleep,fontSize:32 }}>
+                        (checkData as any).current_record.status == 'ONGOING' && <Text className="clock_text" style={{ color: (checkData as any).current_record.scenario == 'FAST' ? global.fastColor ? global.fastColor : ColorType.fast : global.sleepColor ? global.sleepColor : ColorType.sleep, fontSize: 32 }}>
                             {TimeFormatter.formateTimeNow((checkData as any).current_record.fast ?
                                 (checkData as any).current_record.fast.real_start_time :
                                 (checkData as any).current_record.sleep.real_start_time)}
                         </Text>
                     }
                     {
-                        (checkData as any).current_record.status == 'ONGOING1' && <Text className="clock_text" style={{ color: global.fastColor?global.fastColor:ColorType.fast,fontSize:32 }}>
+                        (checkData as any).current_record.status == 'ONGOING1' && <Text className="clock_text" style={{ color: global.fastColor ? global.fastColor : ColorType.fast, fontSize: 32 }}>
                             {TimeFormatter.formateTimeNow((checkData as any).current_record.fast.real_start_time)}
                         </Text>
                     }
                     {
-                        (checkData as any).current_record.status == 'ONGOING2' && <View  style={{ flexDirection: 'column', display: 'flex' }}>
-                            <Text className="clock_text"style={{ color: global.fastColor?global.fastColor:global.fastColor?global.fastColor:ColorType.fast ,fontSize:32}}>
+                        (checkData as any).current_record.status == 'ONGOING2' && <View style={{ flexDirection: 'column', display: 'flex' }}>
+                            <Text className="clock_text" style={{ color: global.fastColor ? global.fastColor : global.fastColor ? global.fastColor : ColorType.fast, fontSize: 32 }}>
                                 {TimeFormatter.formateTimeNow((checkData as any).current_record.fast.real_start_time)}
                             </Text>
-                            <Text className="clock_text" style={{ color: global.sleepColor?global.sleepColor:ColorType.sleep,fontSize:32 }}>
+                            <Text className="clock_text" style={{ color: global.sleepColor ? global.sleepColor : ColorType.sleep, fontSize: 32 }}>
                                 {TimeFormatter.formateTimeNow((checkData as any).current_record.sleep.real_start_time)}
                             </Text>
                         </View>
                     }
                     {
                         (checkData as any).current_record.status == 'ONGOING3' && <Text>
-                            <Text className="clock_text" style={{ color: global.fastColor?global.fastColor:ColorType.fast,fontSize:32 }}>
+                            <Text className="clock_text" style={{ color: global.fastColor ? global.fastColor : ColorType.fast, fontSize: 32 }}>
                                 {TimeFormatter.formateTimeNow((checkData as any).current_record.fast.real_start_time)}
                             </Text>
                         </Text>

+ 3 - 2
src/features/trackTimeDuration/components/RecordFastSleep.scss

@@ -1,3 +1,4 @@
+@import '@/utils/common.scss';
 .time_operate_item{
     padding-top: 40px;
     padding-bottom: 40px;
@@ -6,11 +7,11 @@
     display: flex;
     flex-direction: row;
     align-items: center;
-    background-color: #1C1C1C;
+    background-color: $boxColor;
     border-radius: 36px;
     padding-left: 40px;
     padding-right: 40px;
-    margin-top: 16px;
+    margin-bottom: 16px;
 }
 
 

+ 2 - 3
src/features/trackTimeDuration/components/RecordFastSleep.tsx

@@ -21,7 +21,6 @@ import { ColorType } from "@/context/themes/color";
 export default function RecordFastSleep(props: { data: any, type: string, delSuccess?: Function }) {
     const [showDetailModal, setShowDetailModal] = useState(false)
     const [segmentIndex, setSegmentIndex] = useState(0)
-    const isDebugModel = false
     const { t } = useTranslation()
     const canvasId = props.data.id
     const record = props.data;
@@ -264,7 +263,7 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
                 }
             </View>
             {/* <Image className="arrow1" src={require('@/assets/images/arrow.png')} /> */}
-            <View className="record_arrow_bg" style={{ backgroundColor: isDebugModel ? 'red' : 'transparent' }}>
+            <View className="record_arrow_bg" style={{ backgroundColor: global.isDebug ? 'red' : 'transparent' }}>
                 <Text className='recordTime'>{TimeFormatter.dateDescription(props.data.last_real_check_time, true)}</Text>
                 <Image className="arrow1" src={require('@/assets/images/arrow3.png')} />
             </View>
@@ -273,7 +272,7 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
     }
 
     return <View>
-        {header()}
+        {/* {header()} */}
         <View className="time_operate_item">
             <RecordItem canDel={record.status == 'COMPLETED'} delete={del}
                 onClick={showDetail}

+ 45 - 2
src/features/trackTimeDuration/components/Schedule.tsx

@@ -18,6 +18,7 @@ import Stage from "./Stage";
 import CenterContentTitleModal from "@/features/common/CenterContentTitleModal";
 import { ColorType } from "@/context/themes/color";
 import { getThemeColor } from "../hooks/Common";
+import TableCell from "@/components/layout/TableCell";
 
 
 export default function Component(props: { type?: string, data?: any, delSuccess?: Function }) {
@@ -185,9 +186,9 @@ export default function Component(props: { type?: string, data?: any, delSuccess
 
     function detail() {
         return <View style={{ flexDirection: 'column', display: 'flex', alignItems: 'center', position: 'relative' }} onClick={all}>
-            {
+            {/* {
                 detailHeader()
-            }
+            } */}
             {
                 detailCenter()
             }
@@ -231,6 +232,48 @@ export default function Component(props: { type?: string, data?: any, delSuccess
         }
     }
 
+    if (!permission.wxPubFollow) {
+        return <TableCell title={t('feature.track_time_duration.schedule.follow_tip')} showMarginBottom={true}>
+            <Switch isOn={permission.wxPubFollow} onClick={() => followWxPub()} />
+        </TableCell>
+        // <View className="tip_bg2">
+        //     <Text className="tip_text2">{t('feature.track_time_duration.schedule.follow_tip')}</Text>
+        // </View>
+    }
+
+    var nextCheckTimestamp = 0;
+    if (time.status != 'WAIT_FOR_START') {
+        if (time.status == 'ONGOING') {
+            nextCheckTimestamp = time.scenario == 'FAST' ?
+                time.fast.target_end_time : time.sleep.target_end_time
+        }
+        else {
+            switch (time.status) {
+                case 'ONGOING1':
+                    nextCheckTimestamp = time.sleep.target_start_time
+                    break;
+                case 'ONGOING2':
+                    nextCheckTimestamp = time.sleep.target_end_time
+                    break
+                case 'ONGOING3':
+                    nextCheckTimestamp = time.fast.target_end_time
+                    break
+            }
+        }
+
+    }
+    var today = new Date();
+    today.setHours(0)
+    today.setMinutes(0)
+    today.setSeconds(0)
+
+    if (nextCheckTimestamp != 0 && today.getTime() > nextCheckTimestamp) {
+        return <TableCell title={t('feature.track_time_duration.schedule.timeout_tip')} showMarginBottom={true}>
+
+        </TableCell>
+
+    }
+
 
     return <Box onClick={tapBox}>
         {

+ 5 - 6
src/features/trackTimeDuration/components/SetSchedule.tsx

@@ -27,7 +27,6 @@ export default function Component() {
   const canvasRef = useRef(null);
   const [scenario] = useState(useSelector((state: any) => state.scenario))
   // const scenario = useSelector((state: any) => state.scenario);
-  const isDebugMode = false
   const common = useSelector((state: any) => state.common);
 
   const [isOpen, setIsOpen] = useState(false)
@@ -313,8 +312,8 @@ export default function Component() {
       />
 
       <View className="box">
-        <View className="header" style={{ backgroundColor: isDebugMode ? '#EEC01F' : 'transparent' }}>
-          <View className="item1" style={{ opacity: operateType == 1 || operateType == 3 ? 1 : 0.4, backgroundColor: isDebugMode ? 'pink' : 'transparent' }} onClick={() => {
+        <View className="header" style={{ backgroundColor: global.isDebug ? '#EEC01F' : 'transparent' }}>
+          <View className="item1" style={{ opacity: operateType == 1 || operateType == 3 ? 1 : 0.4, backgroundColor: global.isDebug ? 'pink' : 'transparent' }} onClick={() => {
             setChooseStart(true)
             setIsTimeOpen(true)
           }}>
@@ -322,7 +321,7 @@ export default function Component() {
             <Text className="item_text schedule_text_value">{startTime}</Text>
           </View>
           <View style={{ width: 23 }} />
-          <View className="item1" style={{ opacity: operateType == 2 || operateType == 3 ? 1 : 0.4, backgroundColor: isDebugMode ? 'pink' : 'transparent' }} onClick={() => {
+          <View className="item1" style={{ opacity: operateType == 2 || operateType == 3 ? 1 : 0.4, backgroundColor: global.isDebug ? 'pink' : 'transparent' }} onClick={() => {
             setChooseStart(false)
             setIsTimeOpen(true)
           }}>
@@ -331,10 +330,10 @@ export default function Component() {
           </View>
 
         </View>
-        <View className="dial_bg" style={{ backgroundColor: isDebugMode ? 'pink' : 'transparent' }}>
+        <View className="dial_bg" style={{ backgroundColor: global.isDebug ? 'pink' : 'transparent' }}>
           <Dial ref={canvasRef} />
         </View>
-        <View className="duration_bg" style={{ opacity: operateType == 1 || operateType == 2 ? 1 : 0.4, backgroundColor: isDebugMode ? 'pink' : 'transparent' }} onClick={() => { setIsOpen(true) }}>
+        <View className="duration_bg" style={{ opacity: operateType == 1 || operateType == 2 ? 1 : 0.4, backgroundColor: global.isDebug ? 'pink' : 'transparent' }} onClick={() => { setIsOpen(true) }}>
           <Text className="duration_title schedule_text_key">{t('feature.track_time_duration.dial.duration')}</Text>
           <Text className="duration_value schedule_text_value"  >{hours > 0 ? hours + '小时' : ''}{minutes > 0 ? minutes + '分钟' : ''}</Text>
         </View>

+ 1 - 1
src/features/trackTimeDuration/hooks/RingData.tsx

@@ -54,7 +54,7 @@ export const getCommon = (data: any, isBigRing: boolean) => {
 
 export const getBgRing = () => {
     return {
-        color: '#0c0c0c'
+        color: ColorType.ring
     }
 }
 

+ 8 - 0
src/pages/account/ChooseAuth.config.ts

@@ -0,0 +1,8 @@
+export default definePageConfig({
+    usingComponents:{
+      // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
+      // 'demo':'../../components/demo'
+    },
+    // "disableScroll": true
+    "navigationBarTitleText": ""
+  })

+ 10 - 0
src/pages/account/ChooseAuth.scss

@@ -4,4 +4,14 @@
     align-items: center;
     padding-top: 200px;
     // justify-content: center;
+}
+
+.slogon{
+    margin-top: 20px;
+    font-size: 48px;
+    line-height: 48px;
+    color: #fff;
+    font-weight: 400;
+    opacity: 0.8;
+    margin-bottom: 100px;
 }

+ 10 - 5
src/pages/account/ChooseAuth.tsx

@@ -1,4 +1,4 @@
-import { View } from "@tarojs/components";
+import { View ,Text} from "@tarojs/components";
 import Buttons from '@/components/basic/Buttons'
 import Texts from '@/components/basic/Texts'
 import './ChooseAuth.scss'
@@ -7,6 +7,8 @@ import Taro, { useReady } from "@tarojs/taro";
 import { useDispatch, useSelector } from "react-redux";
 import { useEffect, useState } from "react";
 import { wxLogin } from "@/services/user";
+import { ColorType } from "@/context/themes/color";
+import { ChooseScenarioBtn } from "@/features/common/SpecBtns";
 
 export default function Page() {
     const dispatch = useDispatch();
@@ -62,9 +64,12 @@ export default function Page() {
     }
 
     return <View className="container choose_container">
-        <Texts text='App name' type={TextType.big} />
-        <View style={{ height: 100 }} />
-        <Buttons title='WeChat' onClick={login} btnStyle={{ width: 289, marginBottom: 30 }} />
-        <Buttons title='Create account' type={ButtonType.outline} onClick={createAccount} btnStyle={{ width: 289, marginBottom: 30 }} />
+        <Texts text='fast16cc' type={TextType.big} />
+        <Text className="slogon">健康生物钟</Text>
+        <ChooseScenarioBtn title='微信登录' onClick={login} background={ColorType.fast} />
+        {/* <View style={{ height: 100 }} /> */}
+
+        {/* <Buttons title='微信登录' onClick={login} btnStyle={{ width: 289, marginBottom: 30,backgroundColor:ColorType.fast }} /> */}
+        {/* <Buttons title='Create account' type={ButtonType.outline} onClick={createAccount} btnStyle={{ width: 289, marginBottom: 30 }} /> */}
     </View>;
 }

+ 7 - 0
src/pages/account/EditPage.config.ts

@@ -0,0 +1,7 @@
+export default definePageConfig({
+    usingComponents: {
+        // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
+        // 'demo':'../../components/demo'
+    },
+    "navigationBarTitleText": "编辑名字"
+})

+ 14 - 4
src/pages/account/EditPage.tsx

@@ -1,3 +1,7 @@
+import Inputs from "@/components/input/Inputs";
+import Footer from "@/components/layout/Footer";
+import { ColorType } from "@/context/themes/color";
+import { ChooseScenarioBtn } from "@/features/common/SpecBtns";
 import { update } from "@/services/user";
 import { updateSuccess } from "@/store/user";
 import { Input, View, Text } from "@tarojs/components";
@@ -11,7 +15,7 @@ export default function Page() {
     const dispatch = useDispatch();
 
     const handleChange = (e) => {
-        setValue(e.target.value);
+        setValue(e);
     };
 
     function save() {
@@ -38,8 +42,14 @@ export default function Page() {
     }
 
     return <View>
-        <Input type="nickname" placeholder="请输入昵称" style={{ color: '#fff' }} value={value} onInput={handleChange} />
-
-        <Text onClick={save} style={{ color: '#fff' }}>保存</Text>
+        <View style={{height:20}}></View>
+        {/* <Input type="nickname" placeholder="请输入昵称" style={{ color: '#fff' }} value={value} onInput={handleChange} /> */}
+        <Inputs placeholder="请输入昵称" value={value} onChange={handleChange} onConfirm={save}
+            openType="nickname"
+        />
+        <Footer>
+        <ChooseScenarioBtn title='保存' onClick={save} background={ColorType.fast} />
+        </Footer>
+        {/* <Text onClick={save} style={{ color: '#fff' }}>保存</Text> */}
     </View>
 }

+ 54 - 13
src/pages/account/Profile.tsx

@@ -1,7 +1,7 @@
 import Buttons from "@/components/basic/Buttons";
 import { delSession } from "@/services/common";
 import { clear, logout } from "@/services/user";
-import { View, Text, Image } from "@tarojs/components";
+import { View, Text, Image,Switch } from "@tarojs/components";
 import Taro, { useDidShow } from "@tarojs/taro";
 import { useDispatch, useSelector } from "react-redux";
 import './Profile.scss'
@@ -9,11 +9,25 @@ import Box from "@/components/layout/Box";
 import { BoxType, NaviBarTitleShowType, TemplateType } from "@/utils/types";
 import Layout from "@/components/layout/layout";
 import { useTranslation } from "react-i18next";
+import TableCell from "@/components/layout/TableCell";
+import { useEffect, useState } from "react";
 
 export default function Page() {
     const dispatch = useDispatch();
     const { t } = useTranslation()
     const user = useSelector((state: any) => state.user);
+    const [switchOn,setSwitchOn] = useState(false)
+
+    useEffect(()=>{
+        var status = Taro.getStorageSync('isDebug')
+        setSwitchOn(status)
+    },[])
+
+    function switchChanged(e){
+        setSwitchOn(e.detail.value)
+        Taro.setStorageSync('isDebug',e.detail.value)
+        global.isDebug = e.detail.value
+    }
 
     function tapLogin() {
         Taro.navigateTo({
@@ -38,6 +52,18 @@ export default function Page() {
 
     }
 
+    function clear() {
+        Taro.showModal({
+            title: '注销账号',
+            content: '确定注销此账号吗?',
+            success: res => {
+                if (res.confirm) {
+                    dispatch(clear() as any);
+                }
+            }
+        })
+    }
+
     function tapProfile(e) {
         e.stopPropagation()
         if (user.isLogin) {
@@ -74,40 +100,55 @@ export default function Page() {
 
     function detail() {
         return <View className="container">
-            <View style={{ height: 20 }} />
-            <Box type={BoxType.outline}>
+            <Box>
                 <View className="profile_card" onClick={tapProfile}>
-                    <View className="avatar" style={{ opacity: user.isLogin ? 1 : 0.4 }}>
+                    <View className="avatar" style={{
+                        opacity: user.isLogin ? 1 : 0.4,
+                        background: user.isLogin ? 'transparent' : '#fff'
+                    }}>
                         {
-                            user.isLogin ? <Image src={user.avatar} className="avatar" /> : <Image src={require('@/assets/images/user.png')} className="avatar_placeholder" />
+                            user.isLogin ? <Image src={user.avatar} className="avatar" style={{
+                                background: user.isLogin ? 'transparent' : '#fff'
+                            }} /> : <Image src={require('@/assets/images/user.png')} className="avatar_placeholder" />
                         }
                     </View>
                     <Text className="nickname">{user.isLogin ? user.nickname : '未登录'}</Text>
-                    <Text className="username">{user.isLogin ? '用户名未设置' : ''}</Text>
+                    {/* <Text className="username">{user.isLogin ? '用户名未设置' : ''}</Text> */}
                 </View>
             </Box>
 
-            <Box type={BoxType.outline}>
+            <Box>
                 <View className="balance" onClick={tapBalance}>
                     <Text className="title">逆龄石</Text>
                     <Text className="desc">{'会员体系升级中,期间指标记录限时免逆龄石记录\n敬请期待'}</Text>
                 </View>
             </Box>
-            {user.isLogin && <Box type={BoxType.outline}>
+            {
+                user.isLogin && <View onClick={goSetting}>
+                    <TableCell title="设置" showArrow={true} showMarginBottom={true}></TableCell>
+                </View>
+            }
+            {/* {user.isLogin && <Box >
                 <View onClick={goSetting}>
                     <Text className="title">设置</Text>
                 </View>
             </Box>
-            }
+            } */}
+
             {
-                user.isLogin && user.test_user && <Text>用户名:{user.nickname}</Text>
+                user.isLogin && user.test_user && <TableCell title="user_id" showArrow={true} onClick={clear}>
+                    <Text style={{ opacity: 0.8 }}>******{user.id.substring(user.id.length - 10, user.id.length)}</Text>
+                </TableCell>
             }
             {
-                user.isLogin && user.test_user && <Text>id:{user.id}</Text>
+                user.isLogin && user.test_user && <TableCell title="session" showArrow={true} onClick={reset}>
+                    <Text style={{ opacity: 0.8 }}>重置session</Text>
+                </TableCell>
             }
-
             {
-                user.isLogin && user.test_user && <Buttons title='重置session' onClick={reset} btnStyle={{ width: 289, marginBottom: 30 }} />
+                user.isLogin && user.test_user && <TableCell title="走查模式" >
+                    <Switch checked={switchOn} onChange={switchChanged}/>
+                </TableCell>
             }
 
         </View>

+ 44 - 3
src/pages/account/ProfileSetting.scss

@@ -1,4 +1,4 @@
-.row{
+.row {
     display: flex;
     flex-direction: row;
     justify-content: space-between;
@@ -9,7 +9,7 @@
     position: relative;
 }
 
-.avatar{
+.avatar {
     width: 80px;
     height: 80px;
     border-radius: 40px;
@@ -18,11 +18,52 @@
     justify-content: center;
 }
 
-.btn{
+.btn {
     position: absolute;
     left: 0;
     top: 0;
     right: 0;
     bottom: 0;
     opacity: 0;
+}
+
+.avatar_row {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: center;
+    margin-top: 40px;
+    margin-bottom: 40px;
+    margin-left: 46px;
+    margin-right: 46px;
+}
+
+.avatar_bg {
+    height: 240px;
+    width: 240px;
+    position: relative;
+}
+
+.avatar {
+    height: 240px;
+    width: 240px;
+    border-radius: 120px;
+}
+
+.camera_bg {
+    position: absolute;
+    right: 26px;
+    bottom: 0;
+    width: 48px;
+    height: 48px;
+    background-color: #1c1c1c;
+    border-radius: 24px;
+    align-items: center;
+    justify-content: center;
+    display: flex;
+}
+
+.camera {
+    width: 32px;
+    height: 28px;
 }

+ 22 - 5
src/pages/account/ProfileSetting.tsx

@@ -9,6 +9,7 @@ import { useEffect } from "react";
 import { useTranslation } from "react-i18next";
 import { baseUrl } from "@/services/http/api";
 import { updateSuccess } from "@/store/user";
+import TableCell from "@/components/layout/TableCell";
 
 export default function Page() {
     const dispatch = useDispatch();
@@ -77,21 +78,37 @@ export default function Page() {
     }
 
     return <View className="container">
-        <View className="row">
+        {/* <View className="row">
             <Text>头像</Text>
             <Image src={user.avatar} className="avatar" />
             <Button className="btn" openType="chooseAvatar" onChooseAvatar={chooseAvatar}></Button>
+        </View> */}
+
+        <View className="avatar_row">
+            <View className="avatar_bg">
+                <Image src={user.avatar} className="avatar" />
+                
+                <View className="camera_bg">
+                    <Image className="camera" src={require('@assets/images/camera.png')} />
+                </View>
+                <Button className="btn" openType="chooseAvatar" onChooseAvatar={chooseAvatar}></Button>
+            </View>
         </View>
 
 
-        <View className="row" onClick={editNickname}>
+        <View onClick={editNickname}>
+            <TableCell title="昵称" showArrow={true} showMarginBottom={true}>
+                <Text style={{ opacity: 0.8 }}>{user.nickname}</Text>
+            </TableCell>
+        </View>
+        {/* <View className="row" onClick={editNickname}>
             <Text>昵称</Text>
             <Text>{user.nickname}</Text>
-        </View>
-        <View className="row">
+        </View> */}
+        {/* <View className="row">
             <Text>用户名</Text>
             <Text>{user.username}</Text>
-        </View>
+        </View> */}
         {/* <Buttons title='退出登录' onClick={logoutF} style={{ width: 289, marginBottom: 30 }} />
 
         <Buttons title='注销账号' onClick={clearF} style={{ width: 289, marginBottom: 30 }} /> */}

+ 17 - 8
src/pages/account/Setting.tsx

@@ -1,4 +1,7 @@
 import Buttons from "@/components/basic/Buttons";
+import Footer from "@/components/layout/Footer";
+import { ColorType } from "@/context/themes/color";
+import { ChooseScenarioBtn } from "@/features/common/SpecBtns";
 import { clear, logout } from "@/services/user";
 import { View, Text, Button } from "@tarojs/components";
 import Taro from "@tarojs/taro";
@@ -8,13 +11,13 @@ import { useDispatch, useSelector } from "react-redux";
 
 export default function Page() {
     const dispatch = useDispatch();
-    const {t} = useTranslation()
+    const { t } = useTranslation()
     const user = useSelector((state: any) => state.user);
-    useEffect(()=>{
+    useEffect(() => {
         Taro.setNavigationBarTitle({
-            title:t('page.setting.title')
+            title: t('page.setting.title')
         })
-    },[])
+    }, [])
     function logoutF() {
         Taro.showModal({
             title: '退出登录',
@@ -41,12 +44,18 @@ export default function Page() {
 
     }
 
-    return <View style={{ color: '#fff' }}>
-        <Buttons title='退出登录' onClick={logoutF} btnStyle={{ width: 289, marginBottom: 30 }} />
+    return <View style={{ color: '#fff',display:'flex',flexDirection:'column' }}>
+        <View style={{height:'80vh'}}/>
+        <Text style={{color:'#9E9E9E',textAlign:'center',fontSize:14}}>v1.2.3</Text>
+        
+        <Footer>
+            <ChooseScenarioBtn title='退出登录' onClick={logoutF} background={ColorType.fast} />
+        </Footer>
+        {/* <Buttons title='退出登录' onClick={logoutF} btnStyle={{ width: 289, marginBottom: 30 }} /> */}
 
-        {
+        {/* {
             user.test_user && <Buttons title='注销账号' onClick={clearF} btnStyle={{ width: 289, marginBottom: 30 }} />
-        }
+        } */}
 
 
     </View>

+ 2 - 1
src/pages/clock/Clock.scss

@@ -6,6 +6,7 @@
     padding-top: 40px;
     padding-bottom: 40px;
     color: #fff;
+    // margin-bottom: 12px;
     background-color: #1c1c1c;
     border-radius: 40px;
   }
@@ -38,7 +39,7 @@
   .console_bg{
     height: 360px;
     overflow: hidden;
-    margin-bottom: 40px;
+    margin-bottom: 24px;
   }
 
   .swiperItem{

+ 82 - 29
src/pages/clock/Clock.tsx

@@ -34,6 +34,11 @@ import { ConsoleType, changeConsoleStatus } from '@/store/console'
 import TitleView from '@/features/trackTimeDuration/components/TitleView'
 import StatusIndicator from '@/features/trackTimeDuration/components/StatusIndicator'
 import { useTranslation } from 'react-i18next'
+import TableCellHeader from '@/components/layout/TableCellHeader'
+import SectionHeader from '@/components/layout/SectionHeader'
+import Header from '@/components/layout/Header'
+import { TimeFormatter } from '@/utils/time_format'
+import NoData from '@/components/view/NoData'
 // import TabBar from '../../components/Tabbar';
 
 export default function IndexPage() {
@@ -47,6 +52,7 @@ export default function IndexPage() {
   const [counter, setCounter] = useState(0)
   const [timerId, setTimerId] = useState(null)
   const [needShowAddTip, setNeedShowAddTip] = useState(false)
+  const [showErrorPage, setErrorPage] = useState(false)
 
   const [swiperIndex, setSwiperIndex] = useState(0)
   const [autoPlay, setAutoPlay] = useState(false)
@@ -217,6 +223,7 @@ export default function IndexPage() {
 
   function getCheckData() {
     getClocks().then(res => {
+      setErrorPage(false)
       dispatch(updateScenario((res as any).current_record))
       dispatch(setConfigs((res as any).time_input_schema));
       dispatch(setScenario((res as any).scenario));
@@ -271,6 +278,11 @@ export default function IndexPage() {
       //   setAutoPlay(false)
       // }
 
+    }).catch(e => {
+      console.log('eeeeee')
+      if (!checkData) {
+        setErrorPage(true)
+      }
     })
   }
 
@@ -322,6 +334,50 @@ export default function IndexPage() {
       <StatusIndicator />
     </TitleView>
   }
+
+  function errorView() {
+    if (showErrorPage) {
+      <NoData refresh={() => { getCheckData() }} />
+    }
+    return <View />
+  }
+
+  function consoleView() {
+    if (!checkData) {
+      return <View />
+    }
+    return <View className='console_bg'>
+      {
+        needSwiper() ? <Swiper className='swiper' indicatorColor='#333'
+          indicatorActiveColor='#999'
+          current={swiperIndex}
+          autoplay={autoPlay}
+          duration={300}
+          interval={300}
+          // indicator-margin={30}
+          indicator-offset={[0, -30]}
+          indicator-height={30}
+          indicatorDots={global.consoleType == 'idle'}
+          onChange={(e) => {
+            setSwiperIndex(e.detail.current)
+            if (e.detail.current == 0)
+              setAutoPlay(false)
+          }}
+        >
+          <SwiperItem className='swiperItem'>
+            <Console />
+
+          </SwiperItem>
+
+          <SwiperItem className='swiperItem'>
+            <Console isNextStep={true} />
+          </SwiperItem>
+        </Swiper> :
+          <Console isNextStep={showSingleFastEnd} />
+
+      }
+    </View>
+  }
   return (
     <Layout type={TemplateType.customHeader} header={headerView()} title={t('page.clock.title')} titleShowStyle={NaviBarTitleShowType.scrollToShow}>
       <View style={{ flex: 1, flexDirection: 'column', display: 'flex', backgroundColor: '#000', color: '#fff' }}>
@@ -329,46 +385,43 @@ export default function IndexPage() {
           needShowAddTip && <Tooltip title="添加到我的小程序" closeTip={() => { setNeedShowAddTip(false) }} />
         }
 
-        <Box tranparentBg={true}>
+        <Box>
           <View className='clock_bg'>
             <Clocks />
           </View>
         </Box>
+        {
+          errorView()
+        }
+        {
+          consoleView()
+        }
 
-        <View className='console_bg'>
+        <View style={{ backgroundColor: global.isDebug ? 'pink' : 'transparent' }}>
           {
-            needSwiper() ? <Swiper className='swiper' indicatorColor='#333'
-              indicatorActiveColor='#999'
-              current={swiperIndex}
-              autoplay={autoPlay}
-              duration={300}
-              interval={300}
-              // indicator-margin={30}
-              indicator-offset={[0, -30]}
-              indicator-height={30}
-              indicatorDots={global.consoleType == 'idle'}
-              onChange={(e) => {
-                setSwiperIndex(e.detail.current)
-                if (e.detail.current == 0)
-                  setAutoPlay(false)
-              }}
-            >
-              <SwiperItem className='swiperItem'>
-                <Console />
-
-              </SwiperItem>
-
-              <SwiperItem className='swiperItem'>
-                <Console isNextStep={true} />
-              </SwiperItem>
-            </Swiper> :
-              <Console isNextStep={showSingleFastEnd} />
-
+            checkData && <SectionHeader top={24} bottom={12} title={t('feature.track_time_duration.schedule.section_title')}></SectionHeader>
+          }
+        </View>
+        <View style={{ backgroundColor: global.isDebug ? 'pink' : 'transparent' }}>
+          {
+            checkData && <TableCellHeader title={TimeFormatter.getDateAndWeek()}></TableCellHeader>
           }
         </View>
         {
           checkData && schedule()
         }
+        <View style={{ backgroundColor: global.isDebug ? 'pink' : 'transparent' }}>
+          {
+            checkData && (checkData as any).latest_record &&
+            <SectionHeader top={48} bottom={24} title={t('feature.track_time_duration.record_fast_sleep.header.latest_record')}>
+              <Header title='' action={() => {
+                Taro.navigateTo({
+                  url: '/pages/common/RecordsHistory?type=time&title=time'
+                })
+              }} />
+            </SectionHeader>
+          }
+        </View>
         {
           checkData && (checkData as any).latest_record &&
           <RecordFastSleep type='latest' data={(checkData as any).latest_record} delSuccess={getCheckData} />

+ 8 - 3
src/utils/common.scss

@@ -2,9 +2,14 @@ $themeColor: #AAFF00;
 $backgroundColor: #1C1C1C;
 $fastColor: #00ffff;
 $sleepColor: #8961F5;
-$alertColor:#ea6c6c;
-$alertFastColor:#00ffff66;
-$alertSleepColor:#8961F566;
+$alertColor: #ea6c6c;
+$alertFastColor: #00ffff66;
+$alertSleepColor: #8961F566;
+
+$boxColor: #121212;
+$ringColor: #1c1c1c;
+$blackColor: #000000;
+$whiteColor: #ffffff;
 
 
 .fast_sleep_text {

+ 1 - 1
src/utils/time_format.ts

@@ -219,7 +219,7 @@ export class TimeFormatter {
   static getDateAndWeek = () => {
     var now = new Date()
     var weeks = ['日', '一', '二', '三', '四', '五', '六']
-    return `${now.getMonth() + 1}月${now.getDate()}日·星期${weeks[now.getDay()]}`
+    return `${now.getMonth() + 1}月${now.getDate()}日 星期${weeks[now.getDay()]}`
   }
 
   //获取当前时间(hh:mm)