隐去一键登录页

pull/1/head
张萌 3 years ago
parent c790662349
commit b235c8997b

@ -3,11 +3,10 @@ import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/pages/personal/clock_in/clock_in_page.dart'; import 'package:aku_new_community/pages/personal/clock_in/clock_in_page.dart';
import 'package:aku_new_community/pages/personal/user_profile_page.dart'; import 'package:aku_new_community/pages/personal/user_profile_page.dart';
import 'package:aku_new_community/pages/setting_page/settings_page.dart'; import 'package:aku_new_community/pages/setting_page/settings_page.dart';
import 'package:aku_new_community/pages/sign/login/login_page.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/provider/user_provider.dart'; import 'package:aku_new_community/provider/user_provider.dart';
import 'package:aku_new_community/ui/market/order/order_page.dart'; import 'package:aku_new_community/ui/market/order/order_page.dart';
import 'package:aku_new_community/ui/profile/car/car_manage_page.dart'; import 'package:aku_new_community/ui/profile/car/car_manage_page.dart';
import 'package:aku_new_community/ui/profile/car_parking/car_parking_page.dart';
import 'package:aku_new_community/ui/profile/new_house/my_family_page.dart'; import 'package:aku_new_community/ui/profile/new_house/my_family_page.dart';
import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart'; import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
@ -76,7 +75,7 @@ class _PersonalIndexState extends State<PersonalIndex>
return AnnotatedRegion<SystemUiOverlayStyle>( return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.dark, value: SystemUiOverlayStyle.dark,
child:Scaffold( child: Scaffold(
body: EasyRefresh( body: EasyRefresh(
header: MaterialHeader(), header: MaterialHeader(),
onRefresh: () async { onRefresh: () async {
@ -123,7 +122,8 @@ class _PersonalIndexState extends State<PersonalIndex>
padding: EdgeInsets.all(5.w), padding: EdgeInsets.all(5.w),
onPressed: () { onPressed: () {
if (!userProvider.isLogin) if (!userProvider.isLogin)
Get.to(() => LoginPage()); //
Get.to(() => OtherLoginPage());
else else
Get.to(() => UserProfilePage()); Get.to(() => UserProfilePage());
}, },
@ -151,8 +151,8 @@ class _PersonalIndexState extends State<PersonalIndex>
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text( Text(
userProvider userProvider.userInfoModel
.userInfoModel?.nickName ?? ?.nickName ??
'', '',
style: TextStyle( style: TextStyle(
fontSize: 40.sp, fontSize: 40.sp,
@ -185,7 +185,8 @@ class _PersonalIndexState extends State<PersonalIndex>
.get(SAASAPI.profile.integral.sign); .get(SAASAPI.profile.integral.sign);
if (base.success) { if (base.success) {
await Get.dialog(ClockSuccessDialog( await Get.dialog(ClockSuccessDialog(
todayIntegral: 1, tomorrowIntegral: 2)); todayIntegral: 1,
tomorrowIntegral: 2));
await UserTool.userProvider await UserTool.userProvider
.changeTodayClocked(); .changeTodayClocked();
} else { } else {
@ -197,7 +198,8 @@ class _PersonalIndexState extends State<PersonalIndex>
minWidth: 112.w, minWidth: 112.w,
height: 58.w, height: 58.w,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50.w)), borderRadius:
BorderRadius.circular(50.w)),
child: child:
'${UserTool.userProvider.userConfig.todayClocked ? '已签到' : '签到'}' '${UserTool.userProvider.userConfig.todayClocked ? '已签到' : '签到'}'
.text .text
@ -217,15 +219,16 @@ class _PersonalIndexState extends State<PersonalIndex>
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: image: AssetImage(
AssetImage(Assets.static.vipBackground.path)), Assets.static.vipBackground.path)),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(16.w), topLeft: Radius.circular(16.w),
topRight: Radius.circular(16.w))), topRight: Radius.circular(16.w))),
child: Row( child: Row(
children: [ children: [
32.wb, 32.wb,
Assets.icons.vipFont.image(width: 60.w, height: 60.w), Assets.icons.vipFont
.image(width: 60.w, height: 60.w),
24.wb, 24.wb,
'当前会员等级2级' '当前会员等级2级'
.text .text
@ -241,7 +244,8 @@ class _PersonalIndexState extends State<PersonalIndex>
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFFFE0A9), color: Color(0xFFFFE0A9),
borderRadius: BorderRadius.circular(29.w)), borderRadius:
BorderRadius.circular(29.w)),
child: '会员中心'.text.size(24.sp).black.make(), child: '会员中心'.text.size(24.sp).black.make(),
), ),
), ),
@ -270,8 +274,8 @@ class _PersonalIndexState extends State<PersonalIndex>
], ],
), ),
margin: EdgeInsets.only(left: 32.w, right: 32.w), margin: EdgeInsets.only(left: 32.w, right: 32.w),
padding: padding: EdgeInsets.only(
EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w), top: 24.w, left: 32.w, right: 32.w),
child: Column( child: Column(
//mainAxisAlignment: MainAxisAlignment.center, //mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
@ -375,8 +379,11 @@ class _PersonalIndexState extends State<PersonalIndex>
'${UserTool.userProvider.defaultHouse?.estateName ?? ''}', '${UserTool.userProvider.defaultHouse?.estateName ?? ''}',
), ),
36.hb, 36.hb,
_function('我的家庭', R.ASSETS_ICONS_ICON_MY_HOUSE_PNG, _function(
() => MyFamilyPage(), ''), '我的家庭',
R.ASSETS_ICONS_ICON_MY_HOUSE_PNG,
() => MyFamilyPage(),
''),
36.hb, 36.hb,
// _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG, // _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG,
// () => CarParkingPage(), ''), // () => CarParkingPage(), ''),
@ -384,8 +391,11 @@ class _PersonalIndexState extends State<PersonalIndex>
// _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG, // _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG,
// () => CarManagePage(), ''), // () => CarManagePage(), ''),
// 36.hb, // 36.hb,
_function('我的访客', R.ASSETS_ICONS_ICON_MY_VISITOR_PNG, _function(
() => CarManagePage(), ''), '我的访客',
R.ASSETS_ICONS_ICON_MY_VISITOR_PNG,
() => CarManagePage(),
''),
36.hb, 36.hb,
_function( _function(
'收货地址设置', '收货地址设置',
@ -402,9 +412,7 @@ class _PersonalIndexState extends State<PersonalIndex>
), ),
], ],
)), )),
) ));
);
} }
_homeTitle(String title, VoidCallback onTap, String suffixTitle) { _homeTitle(String title, VoidCallback onTap, String suffixTitle) {

@ -1,12 +1,10 @@
import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/pages/sign/login/login_page.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
class AccountManagerPage extends StatefulWidget { class AccountManagerPage extends StatefulWidget {
AccountManagerPage({Key? key}) : super(key: key); AccountManagerPage({Key? key}) : super(key: key);
@ -38,7 +36,8 @@ class _AccountManagerPageState extends State<AccountManagerPage> {
), ),
), ),
onPressed: () { onPressed: () {
Get.offAll(() => LoginPage()); //
Get.offAll(() => OtherLoginPage());
}, },
), ),
], ],

@ -1,3 +1,4 @@
import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/pages/sign/login/psd_verify.dart'; import 'package:aku_new_community/pages/sign/login/psd_verify.dart';
import 'package:aku_new_community/pages/sign/sign_func.dart'; import 'package:aku_new_community/pages/sign/sign_func.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
@ -11,8 +12,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import 'login_page.dart';
class ForgotSetPsdPage extends StatefulWidget { class ForgotSetPsdPage extends StatefulWidget {
final String tel; final String tel;
@ -171,7 +170,8 @@ class _ForgotSetPsdPageState extends State<ForgotSetPsdPage> {
widget.tel, widget.tel,
_codeController.text); _codeController.text);
if (result) { if (result) {
Get.offAll(() => LoginPage()); //
Get.offAll(() => OtherLoginPage());
} }
} }
: null, : null,

@ -3,7 +3,7 @@ import 'dart:io';
import 'package:aku_new_community/main_initialize.dart'; import 'package:aku_new_community/main_initialize.dart';
import 'package:aku_new_community/pages/setting_page/agreement_page/agreement_page.dart'; import 'package:aku_new_community/pages/setting_page/agreement_page/agreement_page.dart';
import 'package:aku_new_community/pages/setting_page/agreement_page/privacy_page.dart'; import 'package:aku_new_community/pages/setting_page/agreement_page/privacy_page.dart';
import 'package:aku_new_community/pages/sign/login/login_page.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/utils/developer_util.dart'; import 'package:aku_new_community/utils/developer_util.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/hive_store.dart'; import 'package:aku_new_community/utils/hive_store.dart';
@ -126,7 +126,8 @@ class _SplashPageState extends State<SplashPage> {
//// ////
UserTool.userProvider.setLogin(HiveStore.appBox!.get('token')); UserTool.userProvider.setLogin(HiveStore.appBox!.get('token'));
} else { } else {
await Get.offAll(() => LoginPage()); //
await Get.offAll(() => OtherLoginPage());
} }
} catch (e) { } catch (e) {
LoggerData.addData(e); LoggerData.addData(e);

@ -1,6 +1,6 @@
import 'package:aku_new_community/const/resource.dart'; import 'package:aku_new_community/const/resource.dart';
import 'package:aku_new_community/pages/property/property_page.dart'; import 'package:aku_new_community/pages/property/property_page.dart';
import 'package:aku_new_community/pages/sign/login/login_page.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/provider/app_provider.dart'; import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/ui/community/community_views/community_page.dart'; import 'package:aku_new_community/ui/community/community_views/community_page.dart';
import 'package:aku_new_community/ui/market/market_page.dart'; import 'package:aku_new_community/ui/market/market_page.dart';
@ -136,7 +136,8 @@ class _TabNavigatorState extends State<TabNavigator>
unselectedFontSize: 20.sp, unselectedFontSize: 20.sp,
onTap: (index) { onTap: (index) {
if (UserTool.userProvider.isLogin == false) { if (UserTool.userProvider.isLogin == false) {
Get.offAll(() => LoginPage()); //
Get.offAll(() => OtherLoginPage());
} else { } else {
_tabController!.animateTo(index, curve: Curves.easeInOutCubic); _tabController!.animateTo(index, curve: Curves.easeInOutCubic);
setFunc(() => _currentIndex = index); setFunc(() => _currentIndex = index);

@ -22,6 +22,7 @@ import 'package:aku_new_community/ui/market/widget/animated_home_background.dart
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/network/base_list_model.dart'; import 'package:aku_new_community/utils/network/base_list_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:aku_new_community/widget/home/home_sliver_app_bar.dart'; import 'package:aku_new_community/widget/home/home_sliver_app_bar.dart';
import 'package:aku_new_community/widget/others/rectIndicator.dart'; import 'package:aku_new_community/widget/others/rectIndicator.dart';
import 'package:card_swiper/card_swiper.dart'; import 'package:card_swiper/card_swiper.dart';
@ -815,18 +816,10 @@ class _MarketPageState extends State<MarketPage>
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
FadeInImage.assetNetwork( BeeImageNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
width: 88.w, width: 88.w,
height: 88.w, height: 88.w,
image: item.imgUrls.isNotEmpty ? item.imgUrls.first : '', urls: item.imgUrls,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
height: 88.w,
width: 88.w,
);
},
), ),
8.hb, 8.hb,
Text( Text(

@ -59,6 +59,9 @@ class SearchFunc {
SAASAPI.market.good.goodDetail, SAASAPI.market.good.goodDetail,
params: {'appGoodsPushId': shopId, 'appGoodsAddressId': addressId}, params: {'appGoodsPushId': shopId, 'appGoodsAddressId': addressId},
); );
if (!model.success) {
BotToast.showText(text: model.msg);
}
if (model.data == null) return GoodDetailModel.fail(); if (model.data == null) return GoodDetailModel.fail();
return GoodDetailModel.fromJson(model.data); return GoodDetailModel.fromJson(model.data);
} }

@ -1,12 +1,11 @@
import 'package:bot_toast/bot_toast.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_new_community/pages/sign/login/login_page.dart';
import 'package:aku_new_community/provider/app_provider.dart'; import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/provider/user_provider.dart'; import 'package:aku_new_community/provider/user_provider.dart';
import 'package:aku_new_community/ui/profile/house/add_house_page.dart'; import 'package:aku_new_community/ui/profile/house/add_house_page.dart';
import 'package:aku_new_community/ui/profile/house/house_owners_page.dart'; import 'package:aku_new_community/ui/profile/house/house_owners_page.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
/// | | | /// | | |
/// |-----|------| /// |-----|------|
@ -20,7 +19,8 @@ class LoginUtil {
final userProvider = Provider.of<UserProvider>(Get.context!, listen: false); final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
if (userProvider.isNotLogin) { if (userProvider.isNotLogin) {
BotToast.showText(text: '请先登录'); BotToast.showText(text: '请先登录');
Get.to(() => LoginPage()); //
Get.to(() => OtherLoginPage());
return false; return false;
} }
return true; return true;

@ -2,7 +2,7 @@ import 'dart:io';
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/pages/sign/login/login_page.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/provider/user_provider.dart'; import 'package:aku_new_community/provider/user_provider.dart';
import 'package:aku_new_community/utils/developer_util.dart'; import 'package:aku_new_community/utils/developer_util.dart';
import 'package:aku_new_community/utils/network/base_list_model.dart'; import 'package:aku_new_community/utils/network/base_list_model.dart';
@ -210,7 +210,8 @@ class NetUtil {
final userProvider = Provider.of<UserProvider>(Get.context!, listen: false); final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
if (!model.success && (model.code == 10010 || model.msg == '登录失效,请重新登录')) { if (!model.success && (model.code == 10010 || model.msg == '登录失效,请重新登录')) {
userProvider.logout(); userProvider.logout();
Get.offAll(() => LoginPage()); //
Get.offAll(() => OtherLoginPage());
if (userProvider.isLogin) { if (userProvider.isLogin) {
BotToast.showText(text: model.msg); BotToast.showText(text: model.msg);
} }

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save