|
|
@@ -367,15 +367,15 @@ export default function DayNightCard(props: { isNight: boolean, count: number })
|
|
|
var tomorrow = new Date(today.getTime() + 24 * 3600 * 1000 * 3)
|
|
|
var strYesterday = `${yesterday.getFullYear()}-${TimeFormatter.padZero(yesterday.getMonth() + 1)}-${TimeFormatter.padZero(yesterday.getDate())}`
|
|
|
var strTomorrow = `${tomorrow.getFullYear()}-${TimeFormatter.padZero(tomorrow.getMonth() + 1)}-${TimeFormatter.padZero(tomorrow.getDate())}`
|
|
|
- systemLocation({
|
|
|
- lat: 77,
|
|
|
- lng: 20,
|
|
|
- date_start: strYesterday,
|
|
|
- date_end: strTomorrow,
|
|
|
- coordinate_system_standard: 'GCJ-02'
|
|
|
- }).then(data => {
|
|
|
- })
|
|
|
- return
|
|
|
+ // systemLocation({
|
|
|
+ // lat: 77,
|
|
|
+ // lng: 20,
|
|
|
+ // date_start: strYesterday,
|
|
|
+ // date_end: strTomorrow,
|
|
|
+ // coordinate_system_standard: 'GCJ-02'
|
|
|
+ // }).then(data => {
|
|
|
+ // })
|
|
|
+ // return
|
|
|
|
|
|
if (process.env.TARO_ENV == 'rn') {
|
|
|
Taro.getLocation({
|
|
|
@@ -775,7 +775,7 @@ export default function DayNightCard(props: { isNight: boolean, count: number })
|
|
|
dispatch(showDay(true))
|
|
|
Taro.showModal({
|
|
|
title: 'Login Required',
|
|
|
- content: 'desc',
|
|
|
+ content: props.isNight?'Log in to see your daily local nighttime from sunset to sunrise.':'Log in to see your daily local daytime from sunrise to sunset.',
|
|
|
cancelText: 'Later',
|
|
|
confirmText: 'Login',
|
|
|
success: function (res) {
|
|
|
@@ -809,7 +809,10 @@ export default function DayNightCard(props: { isNight: boolean, count: number })
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- function operate() {
|
|
|
+ function operate(e) {
|
|
|
+ if (process.env.TARO_ENV=='weapp'){
|
|
|
+ e.stopPropagation()
|
|
|
+ }
|
|
|
Taro.showActionSheet({
|
|
|
itemList: ['选择位置', '重置'],
|
|
|
success: function (res) {
|
|
|
@@ -832,18 +835,18 @@ export default function DayNightCard(props: { isNight: boolean, count: number })
|
|
|
var content = ''
|
|
|
if (props.isNight) {
|
|
|
if (authInfo && authInfo.lat) {
|
|
|
- content = '夜间+有位置信息'
|
|
|
+ content = 'Local times for sunset and sunrise, together with the nighttime ring will turn off, and your location data will be cleared. '
|
|
|
}
|
|
|
else {
|
|
|
- content = '夜间+无位置信息'
|
|
|
+ content = 'Sunset and sunrise times, together with the nighttime ring will turn off.'
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
if (authInfo && authInfo.lat) {
|
|
|
- content = '白天+有位置信息'
|
|
|
+ content = 'Local times for sunrise and sunset, together with the daytime ring will turn off, and your location data will be cleared. '
|
|
|
}
|
|
|
else {
|
|
|
- content = '白天+无位置信息'
|
|
|
+ content = 'Sunrise and sunset times, together with the daytime ring will turn off.'
|
|
|
}
|
|
|
}
|
|
|
Taro.showModal({
|
|
|
@@ -892,7 +895,7 @@ export default function DayNightCard(props: { isNight: boolean, count: number })
|
|
|
user.isLogin && !dayStore.showDayRing && <View style={{ color: '#fff' }} onClick={auth}>{props.isNight ? '显示当地夜晚时间' : '显示当地白天时间'}</View>
|
|
|
}
|
|
|
{
|
|
|
- user.isLogin && dayStore.showDayRing && <View style={{ display: 'flex', flexDirection: 'column' }}>
|
|
|
+ user.isLogin && dayStore.showDayRing && <View style={{ display: 'flex', flexDirection: 'column' }} onClick={showLocationAlert}>
|
|
|
<Text className='day_night_value' style={{ color: props.isNight ? ColorType.night : ColorType.day }}>{props.isNight ? nightDuration() : dayDuration()}</Text>
|
|
|
<Text className='day_night_desc'>{props.isNight ? nightDurationDesc1() : dayDurationDesc1()}</Text>
|
|
|
{
|
|
|
@@ -909,6 +912,12 @@ export default function DayNightCard(props: { isNight: boolean, count: number })
|
|
|
}
|
|
|
</View>
|
|
|
}
|
|
|
+ {
|
|
|
+ showDetailPopup && modalContent()
|
|
|
+ }
|
|
|
+ {
|
|
|
+ showDetailModal && modalContent2()
|
|
|
+ }
|
|
|
</View>
|
|
|
|
|
|
/*
|