app用户账号注销

pull/1/head
戴余标 2 years ago
parent ed61867ab7
commit 86edde4c09

@ -104,7 +104,10 @@ class _User {
class _Login { class _Login {
///app退 ///app退
String get logOut => '/app/user/quit'; String get quit => '/app/user/quit';
///app
String get logOut =>'/app/user/logout';
/// ///
String get allCommunity => '/app/login/findAllCommunity'; String get allCommunity => '/app/login/findAllCommunity';

@ -1,3 +1,4 @@
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -7,6 +8,9 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/pages/sign/login/other_login_page.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import '../../utils/network/base_model.dart';
import '../../utils/network/net_util.dart';
class AccountManagerPage extends StatefulWidget { class AccountManagerPage extends StatefulWidget {
AccountManagerPage({Key? key}) : super(key: key); AccountManagerPage({Key? key}) : super(key: key);
@ -37,9 +41,12 @@ class _AccountManagerPageState extends State<AccountManagerPage> {
color: Colors.red.withOpacity(0.7), color: Colors.red.withOpacity(0.7),
), ),
), ),
onPressed: () { onPressed: () async {
// BaseModel baseModel =
Get.offAll(() => OtherLoginPage()); await NetUtil().post(SAASAPI.login.logOut);
if (baseModel.success) {
Get.offAll(() => OtherLoginPage());
}
}, },
), ),
], ],

@ -143,10 +143,10 @@ class _SettingsPageState extends State<SettingsPage> {
title: '意见反馈', title: '意见反馈',
onTap: () => Get.to(() => FeedBackPage()), onTap: () => Get.to(() => FeedBackPage()),
), ),
// _buildTile( _buildTile(
// title: '账号管理', title: '账号管理',
// onTap: () => Get.to(() => AccountManagerPage()), onTap: () => Get.to(() => AccountManagerPage()),
// ), ),
_buildTile( _buildTile(
title: '用户协议', title: '用户协议',
onTap: () => Get.to(() => AgreementPage()), onTap: () => Get.to(() => AgreementPage()),

@ -58,7 +58,7 @@ class UserProvider extends ChangeNotifier {
final appProvider = Provider.of<AppProvider>(Get.context!, listen: false); final appProvider = Provider.of<AppProvider>(Get.context!, listen: false);
appProvider.setCurrentHouse(null); appProvider.setCurrentHouse(null);
if (_isLogin) { if (_isLogin) {
NetUtil().post(SAASAPI.login.logOut, showMessage: true); NetUtil().post(SAASAPI.login.quit, showMessage: true);
NetUtil().dio!.options.headers.remove('app-login-token'); NetUtil().dio!.options.headers.remove('app-login-token');
_isLogin = false; _isLogin = false;
} }

Loading…
Cancel
Save