Просмотр исходного кода

update app/pages/my/ProfileV2.js

wudebin 3 месяцев назад
Родитель
Сommit
417e786033
1 измененных файлов с 42 добавлено и 21 удалено
  1. 42 21
      Strides-SPAPP/app/pages/my/ProfileV2.js

+ 42 - 21
Strides-SPAPP/app/pages/my/ProfileV2.js

@@ -69,7 +69,7 @@ export default class ProfileV2 extends Component {
       Dialog.dismissLoading();
       //toastShort(err)
       setTimeout(() => {
-        if (err.code == 5334) {
+        if (err.code == 5334 || err.code == 5368) {
           Dialog.showDialog({
             title: $t('profile.deleteAccount'),
             message: err.msg,
@@ -272,7 +272,7 @@ export default class ProfileV2 extends Component {
         <View style={styles.accountList}>
           <CardList refreshId={this.state.refreshId}/>
         </View> */}
-        <Button
+        {/* <Button
           style={styles.cardView}
           viewStyle={styles.profileItem}
           onClick={() => this.deleteAccount()}>
@@ -289,7 +289,7 @@ export default class ProfileV2 extends Component {
             color={textCancel}
             name='angle-right'/>
         </Button>
-        <ShadowViewV2/>
+        <ShadowViewV2/> */}
         <Button
           style={styles.cardView}
           viewStyle={styles.profileItem}
@@ -388,24 +388,45 @@ export default class ProfileV2 extends Component {
           <ShadowViewV2/>
         </>}
         <Button
-            style={styles.cardView}
-            viewStyle={styles.profileItem}
-            onClick={() => startPage(PageList.about)}>
-            <MaterialCommunityIcons
-              style={styles.cardIcon}
-              name="information-outline"
-              color="#00638C"
-              size={32}
-            />
-            <View style={styles.cardInfo}>
-              <TextView style={styles.cardLabel}>{$t('drawer.about')}</TextView>
-            </View>
-            <FontAwesome
-              size={24}
-              color={textCancel}
-              name='angle-right'/>
-          </Button>
-          <ShadowViewV2/>
+          style={styles.cardView}
+          viewStyle={styles.profileItem}
+          onClick={() => startPage(PageList.about)}>
+          <MaterialCommunityIcons
+            style={styles.cardIcon}
+            name="information-outline"
+            color="#00638C"
+            size={32}
+          />
+          <View style={styles.cardInfo}>
+            <TextView style={styles.cardLabel}>{$t('drawer.about')}</TextView>
+          </View>
+          <FontAwesome
+            size={24}
+            color={textCancel}
+            name='angle-right'/>
+        </Button>
+        <ShadowViewV2/>
+        <Button
+          style={styles.cardView}
+          viewStyle={styles.profileItem}
+          onClick={() => {
+            this.deleteAccount();
+            //startPage(PageList.deleteAccount)
+          }}>
+          <MaterialCommunityIcons
+            style={styles.cardIcon}
+            name="account-remove"
+            size={32}
+            color="#00638C"/>
+          <View style={styles.cardInfo}>
+            <TextView style={styles.cardLabel}>{$t('profile.deleteAccount')}</TextView>
+          </View>
+          <FontAwesome
+            size={24}
+            color={textCancel}
+            name='angle-right'/>
+        </Button>
+        <ShadowViewV2/>
         {/* <Button
           style={styles.deleteButton}
           text="DELETE MY ACCOUNT"