|
@@ -20,7 +20,7 @@ const timezone = require('dayjs/plugin/timezone')
|
|
|
dayjs.extend(utc)
|
|
dayjs.extend(utc)
|
|
|
dayjs.extend(timezone)
|
|
dayjs.extend(timezone)
|
|
|
|
|
|
|
|
-let LinearGradient,useActionSheet
|
|
|
|
|
|
|
+let LinearGradient, useActionSheet
|
|
|
if (process.env.TARO_ENV == 'rn') {
|
|
if (process.env.TARO_ENV == 'rn') {
|
|
|
LinearGradient = require('react-native-linear-gradient').default
|
|
LinearGradient = require('react-native-linear-gradient').default
|
|
|
useActionSheet = require('@expo/react-native-action-sheet').useActionSheet
|
|
useActionSheet = require('@expo/react-native-action-sheet').useActionSheet
|
|
@@ -35,12 +35,13 @@ export default function DayNightDetailPopup(props: {
|
|
|
}) {
|
|
}) {
|
|
|
const dayNight = useSelector((state: any) => state.night);
|
|
const dayNight = useSelector((state: any) => state.night);
|
|
|
const day = useSelector((state: any) => state.day);
|
|
const day = useSelector((state: any) => state.day);
|
|
|
|
|
+ const user = useSelector((state: any) => state.user);
|
|
|
const [tabIndex, setTabIndex] = useState(0)
|
|
const [tabIndex, setTabIndex] = useState(0)
|
|
|
const [isLoading, setIsLoading] = useState(false)
|
|
const [isLoading, setIsLoading] = useState(false)
|
|
|
const { t } = useTranslation()
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
let showActionSheetWithOptions;
|
|
let showActionSheetWithOptions;
|
|
|
- if (process.env.TARO_ENV=='rn'){
|
|
|
|
|
|
|
+ if (process.env.TARO_ENV == 'rn') {
|
|
|
showActionSheetWithOptions = useActionSheet()
|
|
showActionSheetWithOptions = useActionSheet()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -601,7 +602,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function testTapLocationIndex(index){
|
|
|
|
|
|
|
+ function testTapLocationIndex(index) {
|
|
|
switch (index) {
|
|
switch (index) {
|
|
|
case 0:
|
|
case 0:
|
|
|
{
|
|
{
|
|
@@ -639,7 +640,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function testChangeLocation() {
|
|
function testChangeLocation() {
|
|
|
- if (process.env.TARO_ENV=='rn' && kIsIOS){
|
|
|
|
|
|
|
+ if (process.env.TARO_ENV == 'rn' && kIsIOS) {
|
|
|
showActionSheet({
|
|
showActionSheet({
|
|
|
showActionSheetWithOptions: showActionSheetWithOptions,
|
|
showActionSheetWithOptions: showActionSheetWithOptions,
|
|
|
itemList: [
|
|
itemList: [
|
|
@@ -654,7 +655,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
});
|
|
});
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
Taro.showActionSheet({
|
|
Taro.showActionSheet({
|
|
|
itemList: [
|
|
itemList: [
|
|
|
'纽约40.697,-74.309',
|
|
'纽约40.697,-74.309',
|
|
@@ -686,7 +687,7 @@ export default function DayNightDetailPopup(props: {
|
|
|
|
|
|
|
|
</View>
|
|
</View>
|
|
|
{
|
|
{
|
|
|
- <Text style={{ color: '#fff', fontSize: 20, fontWeight: 'bold' }} onClick={testChangeLocation}>位置更改测试</Text>
|
|
|
|
|
|
|
+ user.test_user && <Text style={{ color: '#fff', fontSize: 20, fontWeight: 'bold' }} onClick={testChangeLocation}>位置更改测试</Text>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
<View className='detail_tabbar'>
|
|
<View className='detail_tabbar'>
|