leon 1 год назад
Родитель
Сommit
d2e073d86c

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

@@ -124,7 +124,7 @@ export default {
             alert_btn: 'Got it',
         },
         suggest: {
-            step_0_title: 'Set End Time for Fasting',
+            step_0_title: 'Pick End Time for Fasting',
             end_fast_picker_header: 'What time do you want to end fasting?',
             end_fast_picker_footer: 'This is the time you may begin eating breakfast or your first meal of the day.',
             step_1_title: 'Suggested Fast schedule',
@@ -132,7 +132,7 @@ export default {
             start_fast_time: 'Start fasting at {{time}}',
             intermittent_fast: '{{data}} Intermittent Fasting',
             fast_desc: '{{start_time}} hours fasting, {{end_time}} hours eating',
-            step_2_title: 'Set Wake Time',
+            step_2_title: 'Pick Wake Time',
             end_sleep_picker_header: 'What time do you want to wake up?',
             fall_sleep_picker_header: 'How long does it take you to fall asleep?',
             fall_sleep_picker_footer: 'It takes 10 to 30 minutes for most people to fall asleep once they\'re in bed.',
@@ -616,11 +616,11 @@ export default {
                 duration: 'Duration',
 
                 // Secondary modal - picker title
-                picker_fast_schedule_start_time: 'Fast schedule start time',
-                picker_fast_schedule_end_time: 'Fast schedule end time',
+                picker_fast_schedule_start_time: 'Start Time for Fasting',
+                picker_fast_schedule_end_time: 'End Time for Fasting',
                 picker_fast_schedule_duration: 'Fast schedule duration',
-                picker_sleep_schedule_start_time: 'Sleep schedule start time',
-                picker_sleep_schedule_end_time: 'Sleep schedule end time',
+                picker_sleep_schedule_start_time: 'Bedtime',
+                picker_sleep_schedule_end_time: 'Wake Time',
                 picker_sleep_schedule_duration: 'Sleep schedule duration',
             },
             choose_scenario: {

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

@@ -127,7 +127,7 @@ export default {
             alert_btn:'我知道了',
         },
         suggest: {
-            step_0_title: '设置断食结束时间',
+            step_0_title: '选择断食结束时间',
             end_fast_picker_header: '您想几点结束断食?',
             end_fast_picker_footer: '即您开始吃早餐或第一餐的时间。',
             step_1_title: '断食日程推荐',
@@ -135,7 +135,7 @@ export default {
             start_fast_time: '{{time}} 开始断食',
             intermittent_fast: '{{data}} 间歇性断食',
             fast_desc: '{{start_time}}小时断食, {{end_time}}小时进食',
-            step_2_title: '设置起床时间',
+            step_2_title: '选择起床时间',
             end_sleep_picker_header: '您想几点起床?',
             fall_sleep_picker_header: '您平时多久入睡?',
             fall_sleep_picker_footer: '正常躺床上到入睡需要10-30分钟。',
@@ -616,11 +616,11 @@ export default {
                 duration: '时长',
 
                 // 二级 modal - picker title
-                picker_fast_schedule_start_time: "断食日程开始时间",// "Fast schedule start time" 
-                picker_fast_schedule_end_time: "断食日程结束时间",// "Fast schedule end time" 
+                picker_fast_schedule_start_time: "断食开始时间",// "Fast schedule start time" 
+                picker_fast_schedule_end_time: "断食结束时间",// "Fast schedule end time" 
                 picker_fast_schedule_duration: "断食日程时长",// "Fast schedule duration" 
-                picker_sleep_schedule_start_time: "睡眠日程开始时间",// "Sleep schedule start time"
-                picker_sleep_schedule_end_time: "睡眠日程结束时间",// "Sleep schedule end time"
+                picker_sleep_schedule_start_time: "就寝时间",// "Sleep schedule start time"
+                picker_sleep_schedule_end_time: "起床时间",// "Sleep schedule end time"
                 picker_sleep_schedule_duration: "睡眠日程时长",// "Sleep schedule duration"
             },
             choose_scenario: {

+ 2 - 1
src/features/trackTimeDuration/components/CheckAccess.tsx

@@ -186,7 +186,8 @@ export default function CheckAccess(props: { record: any, count: number }) {
                     var expire = acccessData.current.qualification.fast_expire
                     const reason = t('feature.check_access.gain_access.reason',{day: streak_fast_current})
                     setShowFastAlert(true)
-                    setKeepContent(false)
+                    // setKeepContent(false)
+                    setKeepContent(true)
                     setAlertTitle(t('feature.check_access.gain_access.title'))
                     setAlertContent(t('feature.check_access.gain_access.desc', { reason: reason }))
                     setShowCancel(true)

+ 12 - 4
src/pages/clock/ChooseScenario.scss

@@ -26,7 +26,7 @@
     border-style: solid;
     margin-left: 46px;
     margin-right: 46px;
-    margin-bottom: 40px;
+    margin-bottom: 28px;
     padding-left: 48px;
     padding-right: 40px;
     padding-top: 48px;
@@ -45,10 +45,10 @@
     border-style: solid;
     margin-left: 46px;
     margin-right: 46px;
-    margin-bottom: 40px;
+    margin-bottom: 28px;
     padding-left: 30px;
     padding-right: 20px;
-    padding-top: 48px;
+    padding-top: 40px;
     padding-bottom: 40px;
     border-radius: 24px;
     background-color: #1c1c1c;
@@ -56,7 +56,7 @@
     position: relative;
     display: flex;
     flex-direction: row;
-    align-items: center;
+    // align-items: center;
     box-sizing: border-box;
 }
 
@@ -79,6 +79,7 @@
     letter-spacing: 0;
     font-size: 28px;
     line-height: 36px;
+    font-weight: bold;
 }
 
 .item_sel2 {
@@ -251,6 +252,13 @@
     background: linear-gradient(90deg, $fastColor 0%, $sleepColor 100%);
 }
 
+.fast_sleep_item_text{
+    background: linear-gradient(90deg, $fastColor 0%, $sleepColor 100%);
+    -webkit-background-clip: text;
+    background-clip: text;
+    color: transparent;
+}
+
 /* #endif */
 
 /* #ifdef rn */

+ 16 - 15
src/pages/clock/ChooseScenario.tsx

@@ -149,7 +149,8 @@ export default function ChooseScenario() {
         return (end - start) / 1440 * 2 * Math.PI
     }
 
-    let background: any = 'linear-gradient(to right, ' + ColorType.fast + ', ' + ColorType.sleep + ')';
+    // let background: any = 'linear-gradient(to right, ' + ColorType.fast + ', ' + ColorType.sleep + ')';
+    let background = ColorType.sleep
     if (selected == 0) {
         background = ColorType.fast
     }
@@ -168,35 +169,36 @@ export default function ChooseScenario() {
             }}>
                 <Rings2 common={common} bgRing={bgRing} targetRing={selected == 0 ? targetRing : null} canvasId={new Date().getTime()} />
             </View>
-            <View style={{ display: 'flex', flexDirection: 'column' }}>
-                <Text className="choose_item_title">{t('feature.choose_scenario.fasting')}</Text>
+            <View style={{ display: 'flex', flexDirection: 'column',marginTop:rpxToPx(8) }}>
+                <Text className="choose_item_title" style={{color:ColorType.fast}}>{t('feature.choose_scenario.fasting')}</Text>
                 <Text className="choose_item_desc">{t('feature.choose_scenario.fast_desc')}</Text>
             </View>
-            <View className="choose_corner_tag">{t('feature.choose_scenario.free')}</View>
+            <View className="choose_corner_tag" style={{fontWeight:'bold'}}>{t('feature.choose_scenario.free')}</View>
             {
                 selected == 0 && <View className="choose_item_check_bg">
                     <IconCheck color={ColorType.fast} width={24} height={24} />
                 </View>
             }
         </View>
-        <View className={selected == 1 ? 'item1 item_sel1' : 'item1'} onClick={() => chooseType(1)}>
+        <View className={selected == 1 ? 'item1 item_sel1' : 'item1'} style={{borderColor:selected==1?ColorType.sleep:'transparent'}} onClick={() => chooseType(1)}>
             <View style={{
                 flexShrink: 0, display: 'flex', width: 74, height: 74, marginRight: rpxToPx(24),
-                position: 'relative', zIndex: 1, alignItems: 'center', justifyContent: 'center'
+                position: 'relative', zIndex: 1, alignItems: 'center', justifyContent: 'center',
+                
             }}>
                 <Rings2 common={common} bgRing={bgRing} targetRing={selected == 1 ? targetRing : null} canvasId={new Date().getTime() + 2} />
                 <View style={{ display: 'flex', position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, alignItems: 'center', justifyContent: 'center' }}>
                     <Rings2 common={common2} bgRing={bgRing} targetRing={selected == 1 ? targetRing2 : null} canvasId={new Date().getTime() + 4} />
                 </View>
             </View>
-            <View style={{ display: 'flex', flexDirection: 'column', flex: 1 }}>
-                <Text className="choose_item_title">{t('feature.choose_scenario.fast_sleep')}</Text>
+            <View style={{ display: 'flex', flexDirection: 'column', flex: 1,marginTop:rpxToPx(8) }}>
+                <Text className="choose_item_title fast_sleep_item_text">{t('feature.choose_scenario.fast_sleep')}</Text>
                 <Text className="choose_item_desc">{t('feature.choose_scenario.fast_sleep_desc')}</Text>
 
 
             </View>
             {
-                process.env.TARO_ENV == 'weapp' ? <View className="choose_corner_tag limit_offer">{t('feature.choose_scenario.limit_time_offer')}</View> :
+                process.env.TARO_ENV == 'weapp' ? <View className="choose_corner_tag limit_offer"  style={{fontWeight:'bold'}}>{t('feature.choose_scenario.limit_time_offer')}</View> :
                     <LinearGradient className="choose_corner_tag"
                         colors={[ColorType.fast, ColorType.sleep]}
                         start={{ x: 0, y: 0 }}
@@ -207,7 +209,7 @@ export default function ChooseScenario() {
             }
             {
                 selected == 1 && <View className="choose_item_check_bg">
-                    <IconCheck color={ColorType.fast} width={24} height={24} />
+                    <IconCheck color={ColorType.sleep} width={24} height={24} />
                 </View>
             }
 
@@ -215,14 +217,13 @@ export default function ChooseScenario() {
         <View style={{ flex: 1 }} />
         <Footer>
             <View style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
-                {
-                    (process.env.TARO_ENV == 'weapp' || selected == 0) && <ChooseScenarioBtn
+                 <ChooseScenarioBtn
                         onClick={goSuggestion}
                         title={t('feature.choose_scenario.next')}
                         background={background}
                     />
-                }
-                {
+                
+                {/* {
                     process.env.TARO_ENV == 'rn' && selected == 1 && <View onClick={goSuggestion}>
                         <LinearGradient
                             style={{
@@ -239,7 +240,7 @@ export default function ChooseScenario() {
                             <Text style={{ fontWeight: 'bold', fontSize: 20 }}>{t('feature.choose_scenario.next')}</Text>
                         </LinearGradient>
                     </View>
-                }
+                } */}
                 {
                     process.env.TARO_ENV == 'rn' && <View style={{ marginBottom: 40 }} />
                 }

+ 2 - 2
src/pages/clock/Clock.tsx

@@ -261,8 +261,8 @@ export default function Page() {
         const showAlert1 = await getStorage('121alert') || false;
         if (!showAlert1) {
             showAlert({
-                title: '重要更新提示!',
-                content: '🔥 连续打卡天数, 现根据结束日期统计;\n 🪐 断食与睡眠, 升级为高级功能。\n连续打卡的老用户, 仍可继续使用。\n更多高级功能,\n如『进食窗口』显示、『社区排行』等功能,敬请期待!',
+                title: '重要更新提示',
+                content: '🔥 连续打卡天数现根据结束日期统计;\n 🪐 断食与睡眠升级为高级功能。\n连续打卡的老用户仍可继续使用。\n更多高级功能如『进食窗口』显示、『社区排行』等敬请期待!',
                 showCancel: false,
                 confirmText: '我知道了'
             })

+ 3 - 2
src/services/http/api.js

@@ -1,8 +1,9 @@
-const online = process.env.TARO_ENV == 'rn' ? false : false;
+const online = process.env.TARO_ENV == 'rn' ? false : true;
 
 import { WX_VERSION as _WX_VERSION, APP_VERSION as _APP_VERSION } from "../../../config/env";
 
-export const baseUrl = online ? 'https://api.fast.liveplus.fun' : 'https://api.fast.dev.liveplus.fun';
+// export const baseUrl = online ? 'https://api.fast.liveplus.fun' : 'https://api.fast.dev.liveplus.fun';
+export const baseUrl = online ? 'https://api.pre.fast.liveplus.fun/' : 'https://api.fast.dev.liveplus.fun';
 
 export const APP_VERSION = _APP_VERSION
 export const WX_VERSION = _WX_VERSION