|
@@ -149,7 +149,8 @@ export default function ChooseScenario() {
|
|
|
return (end - start) / 1440 * 2 * Math.PI
|
|
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) {
|
|
if (selected == 0) {
|
|
|
background = ColorType.fast
|
|
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()} />
|
|
<Rings2 common={common} bgRing={bgRing} targetRing={selected == 0 ? targetRing : null} canvasId={new Date().getTime()} />
|
|
|
</View>
|
|
</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>
|
|
<Text className="choose_item_desc">{t('feature.choose_scenario.fast_desc')}</Text>
|
|
|
</View>
|
|
</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">
|
|
selected == 0 && <View className="choose_item_check_bg">
|
|
|
<IconCheck color={ColorType.fast} width={24} height={24} />
|
|
<IconCheck color={ColorType.fast} width={24} height={24} />
|
|
|
</View>
|
|
</View>
|
|
|
}
|
|
}
|
|
|
</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={{
|
|
<View style={{
|
|
|
flexShrink: 0, display: 'flex', width: 74, height: 74, marginRight: rpxToPx(24),
|
|
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} />
|
|
<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' }}>
|
|
<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} />
|
|
<Rings2 common={common2} bgRing={bgRing} targetRing={selected == 1 ? targetRing2 : null} canvasId={new Date().getTime() + 4} />
|
|
|
</View>
|
|
</View>
|
|
|
</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>
|
|
<Text className="choose_item_desc">{t('feature.choose_scenario.fast_sleep_desc')}</Text>
|
|
|
|
|
|
|
|
|
|
|
|
|
</View>
|
|
</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"
|
|
<LinearGradient className="choose_corner_tag"
|
|
|
colors={[ColorType.fast, ColorType.sleep]}
|
|
colors={[ColorType.fast, ColorType.sleep]}
|
|
|
start={{ x: 0, y: 0 }}
|
|
start={{ x: 0, y: 0 }}
|
|
@@ -207,7 +209,7 @@ export default function ChooseScenario() {
|
|
|
}
|
|
}
|
|
|
{
|
|
{
|
|
|
selected == 1 && <View className="choose_item_check_bg">
|
|
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>
|
|
</View>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -215,14 +217,13 @@ export default function ChooseScenario() {
|
|
|
<View style={{ flex: 1 }} />
|
|
<View style={{ flex: 1 }} />
|
|
|
<Footer>
|
|
<Footer>
|
|
|
<View style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
<View style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
|
- {
|
|
|
|
|
- (process.env.TARO_ENV == 'weapp' || selected == 0) && <ChooseScenarioBtn
|
|
|
|
|
|
|
+ <ChooseScenarioBtn
|
|
|
onClick={goSuggestion}
|
|
onClick={goSuggestion}
|
|
|
title={t('feature.choose_scenario.next')}
|
|
title={t('feature.choose_scenario.next')}
|
|
|
background={background}
|
|
background={background}
|
|
|
/>
|
|
/>
|
|
|
- }
|
|
|
|
|
- {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ {/* {
|
|
|
process.env.TARO_ENV == 'rn' && selected == 1 && <View onClick={goSuggestion}>
|
|
process.env.TARO_ENV == 'rn' && selected == 1 && <View onClick={goSuggestion}>
|
|
|
<LinearGradient
|
|
<LinearGradient
|
|
|
style={{
|
|
style={{
|
|
@@ -239,7 +240,7 @@ export default function ChooseScenario() {
|
|
|
<Text style={{ fontWeight: 'bold', fontSize: 20 }}>{t('feature.choose_scenario.next')}</Text>
|
|
<Text style={{ fontWeight: 'bold', fontSize: 20 }}>{t('feature.choose_scenario.next')}</Text>
|
|
|
</LinearGradient>
|
|
</LinearGradient>
|
|
|
</View>
|
|
</View>
|
|
|
- }
|
|
|
|
|
|
|
+ } */}
|
|
|
{
|
|
{
|
|
|
process.env.TARO_ENV == 'rn' && <View style={{ marginBottom: 40 }} />
|
|
process.env.TARO_ENV == 'rn' && <View style={{ marginBottom: 40 }} />
|
|
|
}
|
|
}
|