对接退出登录

hmxc
小赖 4 years ago
parent f556fedd73
commit 7f2efa1aa3

@ -32,4 +32,7 @@ class _User {
///
String get setBirthday => '/user/personalData/updateBirthday';
///退
String get logout => '/user/signOut';
}

@ -48,7 +48,6 @@ class _HomePageState extends State<HomePage>
bool get wantKeepAlive => true;
ScrollController _scrollController;
Color _bgColor;
List<AkuShopModel> _shopList = [];
List<dynamic> data;

@ -12,7 +12,6 @@ class AnimateAppBar extends StatefulWidget with PreferredSizeWidget {
_AnimateAppBarState createState() => _AnimateAppBarState();
@override
// TODO: implement preferredSize
Size get preferredSize => Size.fromHeight(56);
}

@ -4,8 +4,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/widget/common_app_bar.dart';
class MineHousePage extends StatefulWidget {
MineHousePage({Key key}) : super(key: key);

@ -12,7 +12,6 @@ import 'package:akuCommunity/pages/things_page/fixed_submit_page.dart';
import 'package:akuCommunity/pages/visitor_access_page/visitor_access_page.dart';
import 'package:akuCommunity/painters/user_bottom_bar_painter.dart';
import 'package:akuCommunity/provider/user_provider.dart';
import 'package:akuCommunity/utils/network/net_util.dart';
import 'package:akuCommunity/widget/grid_buttons.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
@ -74,18 +73,18 @@ class _PersonalIndexState extends State<PersonalIndex>
}),
];
List<GridButton> _orderList = [
GridButton('待付款', R.ASSETS_ICONS_USER_ICON_DFK_PNG, () {}),
GridButton('待发货', R.ASSETS_ICONS_USER_ICON_DFH_PNG, () {}),
GridButton('待收货', R.ASSETS_ICONS_USER_ICON_DSH_PNG, () {}),
GridButton('待评价', R.ASSETS_ICONS_USER_ICON_DPJ_PNG, () {}),
GridButton('售后', R.ASSETS_ICONS_USER_ICON_SH_PNG, () {}),
];
// List<GridButton> _orderList = [
// GridButton('待付款', R.ASSETS_ICONS_USER_ICON_DFK_PNG, () {}),
// GridButton('待发货', R.ASSETS_ICONS_USER_ICON_DFH_PNG, () {}),
// GridButton('待收货', R.ASSETS_ICONS_USER_ICON_DSH_PNG, () {}),
// GridButton('待评价', R.ASSETS_ICONS_USER_ICON_DPJ_PNG, () {}),
// GridButton('售后', R.ASSETS_ICONS_USER_ICON_SH_PNG, () {}),
// ];
List<GridButton> _groupOrderList = [
GridButton('待发货', R.ASSETS_ICONS_USER_ICON_DFH_PNG, () {}),
GridButton('待收货', R.ASSETS_ICONS_USER_ICON_DSH_PNG, () {}),
];
// List<GridButton> _groupOrderList = [
// GridButton('待发货', R.ASSETS_ICONS_USER_ICON_DFH_PNG, () {}),
// GridButton('待收货', R.ASSETS_ICONS_USER_ICON_DSH_PNG, () {}),
// ];
SliverAppBar _sliverAppBar(double height) {
final userProvider = Provider.of<UserProvider>(context);

@ -10,7 +10,7 @@ import 'package:akuCommunity/pages/sign/sign_up/sign_up_pick_plot_page.dart';
import 'package:akuCommunity/pages/tab_navigator.dart';
import 'package:akuCommunity/provider/sign_up_provider.dart';
import 'package:akuCommunity/provider/user_provider.dart';
import 'package:ani_route/ani_route.dart';
import 'package:akuCommunity/utils/logger/logger_data.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:dio/dio.dart';
@ -86,6 +86,7 @@ class _SignInPageState extends State<SignInPage> {
if (!result) return;
CancelFunc cancel = BotToast.showLoading();
Response response = await SignFunc.login(_phone.text, _code.text);
LoggerData.addData(response);
if (response.data['status']) {
if (response.data['choose'] == 1) {

@ -4,7 +4,6 @@ import 'package:akuCommunity/pages/sign/sign_func.dart';
import 'package:akuCommunity/utils/hive_store.dart';
import 'package:akuCommunity/utils/network/base_model.dart';
import 'package:akuCommunity/utils/network/net_util.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
class UserProvider extends ChangeNotifier {
@ -30,6 +29,7 @@ class UserProvider extends ChangeNotifier {
_isLogin = false;
_token = null;
_userInfoModel = null;
NetUtil().get(API.user.logout, showMessage: true);
NetUtil().dio.options.headers.remove('App-Admin-Token');
HiveStore.appBox.delete('token');
notifyListeners();

@ -98,7 +98,8 @@ class _LoggerViewState extends State<LoggerView> {
actions: [
IconButton(icon: Icon(Icons.list), onPressed: () {}),
],
body: ListView.builder(
body: ListView.separated(
separatorBuilder: (context, index) => Divider(height: 1, thickness: 1),
itemBuilder: (context, index) =>
LoggerCard(data: LoggerData.data[index]),
itemCount: LoggerData.data.length,

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
//TODO Please remove those sh*t code.
class ExpandableText extends StatefulWidget {
final String text;
final int maxLines;

@ -102,9 +102,7 @@ class _GalleryPhotoViewWrapperState extends State<GalleryPhotoViewWrapper> {
Future<bool> requestPermission() async {
var status = await Permission.photos.status;
if (status.isUndetermined) {
Map<Permission, PermissionStatus> statuses = await [
Permission.photos,
].request();
await [Permission.photos].request();
}
return status.isGranted;
}
@ -127,6 +125,7 @@ class _GalleryPhotoViewWrapperState extends State<GalleryPhotoViewWrapper> {
}
//Hero
// ignore: must_be_immutable
class GalleryExampleItemThumbnail extends StatelessWidget {
GalleryExampleItemThumbnail({Key key, this.galleryExampleItem, this.onTap})
: super(key: key);

@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:akuCommunity/utils/headers.dart';
//TODO one day we need to remove those.😕
// ignore: must_be_immutable
class RoundCheckBox extends StatefulWidget {
var value = false;

Loading…
Cancel
Save