|
|
@@ -15,7 +15,7 @@ import { useEffect } from "react";
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
import { useDispatch, useSelector } from "react-redux";
|
|
|
|
|
|
-let useNavigation,useActionSheet;
|
|
|
+let useNavigation, useActionSheet;
|
|
|
if (process.env.TARO_ENV == 'rn') {
|
|
|
useNavigation = require("@react-navigation/native").useNavigation
|
|
|
useActionSheet = require('@expo/react-native-action-sheet').useActionSheet
|
|
|
@@ -109,9 +109,9 @@ export default function Page() {
|
|
|
|
|
|
}
|
|
|
|
|
|
- function del(){
|
|
|
+ function del() {
|
|
|
showActionSheet({
|
|
|
- title:t('feature.common.modal.deluser_action_title'),
|
|
|
+ title: t('feature.common.modal.deluser_action_title'),
|
|
|
showActionSheetWithOptions: showActionSheetWithOptions,
|
|
|
itemList: [t('feature.common.modal.deluser_action_confirm')],
|
|
|
success: (res) => {
|
|
|
@@ -122,10 +122,10 @@ export default function Page() {
|
|
|
title: t('feature.common.modal.deluser_title'),
|
|
|
content: t('feature.common.modal.deluser_content'),
|
|
|
showCancel: true,
|
|
|
- cancelText:t('feature.common.modal.deluser_cancel'),
|
|
|
- confirmText:t('feature.common.modal.deluser_confirm'),
|
|
|
- redConfirm:true,
|
|
|
- confirm: () => {
|
|
|
+ confirmText: t('feature.common.modal.deluser_cancel'),
|
|
|
+ cancelText: t('feature.common.modal.deluser_confirm'),
|
|
|
+ redCancel: true,
|
|
|
+ cancel: () => {
|
|
|
delUser()
|
|
|
}
|
|
|
})
|
|
|
@@ -136,11 +136,11 @@ export default function Page() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- function delUser(){
|
|
|
+ function delUser() {
|
|
|
dispatch(clear() as any);
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
navigation.goBack()
|
|
|
- },1500)
|
|
|
+ }, 1500)
|
|
|
}
|
|
|
|
|
|
return <View style={{ color: '#fff', display: 'flex', flexDirection: 'column', flex: 1 }}>
|
|
|
@@ -154,8 +154,8 @@ export default function Page() {
|
|
|
<Footer>
|
|
|
<View>
|
|
|
<ChooseScenarioBtn title={t('page.setting.logout')} onClick={logoutF} background={ColorType.fast} />
|
|
|
- <View style={{display:'flex',alignItems:'center',justifyContent:'center',marginTop:20}}>
|
|
|
- <Text onClick={del} style={{color:'#fff',opacity:0.4}}>{t('feature.common.modal.del')}</Text>
|
|
|
+ <View style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', marginTop: 20 }}>
|
|
|
+ <Text onClick={del} style={{ color: '#fff', opacity: 0.4 }}>{t('feature.common.modal.del')}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
</Footer>
|