隐去一键登录页

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/user_profile_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/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_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_house_page.dart';
import 'package:aku_new_community/utils/headers.dart';
@ -75,8 +74,8 @@ class _PersonalIndexState extends State<PersonalIndex>
final userProvider = Provider.of<UserProvider>(context);
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.dark,
child:Scaffold(
value: SystemUiOverlayStyle.dark,
child: Scaffold(
body: EasyRefresh(
header: MaterialHeader(),
onRefresh: () async {
@ -123,7 +122,8 @@ class _PersonalIndexState extends State<PersonalIndex>
padding: EdgeInsets.all(5.w),
onPressed: () {
if (!userProvider.isLogin)
Get.to(() => LoginPage());
//
Get.to(() => OtherLoginPage());
else
Get.to(() => UserProfilePage());
},
@ -138,7 +138,7 @@ class _PersonalIndexState extends State<PersonalIndex>
width: 106.w,
height: 106.w,
imgs: UserTool.userProvider.userInfoModel
?.imgList ??
?.imgList ??
[],
),
),
@ -147,37 +147,37 @@ class _PersonalIndexState extends State<PersonalIndex>
margin: EdgeInsets.only(left: 16.w),
child: userProvider.isLogin
? Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
userProvider
.userInfoModel?.nickName ??
'',
style: TextStyle(
fontSize: 40.sp,
color: Colors.black
.withOpacity(0.85),
),
),
4.hb,
Text(
'当一个新时代的有志青年',
style: TextStyle(
fontSize: 24.sp,
color: Colors.black
.withOpacity(0.45),
),
),
],
)
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
userProvider.userInfoModel
?.nickName ??
'',
style: TextStyle(
fontSize: 40.sp,
color: Colors.black
.withOpacity(0.85),
),
),
4.hb,
Text(
'当一个新时代的有志青年',
style: TextStyle(
fontSize: 24.sp,
color: Colors.black
.withOpacity(0.45),
),
),
],
)
: Text(
'登录/注册',
style: TextStyle(
fontSize: 32.sp,
color: Color(0xffad8940),
),
)),
'登录/注册',
style: TextStyle(
fontSize: 32.sp,
color: Color(0xffad8940),
),
)),
Spacer(),
MaterialButton(
onPressed: () async {
@ -185,7 +185,8 @@ class _PersonalIndexState extends State<PersonalIndex>
.get(SAASAPI.profile.integral.sign);
if (base.success) {
await Get.dialog(ClockSuccessDialog(
todayIntegral: 1, tomorrowIntegral: 2));
todayIntegral: 1,
tomorrowIntegral: 2));
await UserTool.userProvider
.changeTodayClocked();
} else {
@ -197,13 +198,14 @@ class _PersonalIndexState extends State<PersonalIndex>
minWidth: 112.w,
height: 58.w,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50.w)),
borderRadius:
BorderRadius.circular(50.w)),
child:
'${UserTool.userProvider.userConfig.todayClocked ? '已签到' : '签到'}'
.text
.size(22.sp)
.black
.make(),
'${UserTool.userProvider.userConfig.todayClocked ? '已签到' : '签到'}'
.text
.size(22.sp)
.black
.make(),
),
32.w.widthBox,
],
@ -217,15 +219,16 @@ class _PersonalIndexState extends State<PersonalIndex>
alignment: Alignment.center,
decoration: BoxDecoration(
image: DecorationImage(
image:
AssetImage(Assets.static.vipBackground.path)),
image: AssetImage(
Assets.static.vipBackground.path)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16.w),
topRight: Radius.circular(16.w))),
child: Row(
children: [
32.wb,
Assets.icons.vipFont.image(width: 60.w, height: 60.w),
Assets.icons.vipFont
.image(width: 60.w, height: 60.w),
24.wb,
'当前会员等级2级'
.text
@ -241,7 +244,8 @@ class _PersonalIndexState extends State<PersonalIndex>
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFFFFE0A9),
borderRadius: BorderRadius.circular(29.w)),
borderRadius:
BorderRadius.circular(29.w)),
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),
padding:
EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w),
padding: EdgeInsets.only(
top: 24.w, left: 32.w, right: 32.w),
child: Column(
//mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -314,7 +318,7 @@ class _PersonalIndexState extends State<PersonalIndex>
height: 100.w,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
// color: Colors.white,
// color: Colors.white,
borderRadius: BorderRadius.circular(16.w)),
margin: EdgeInsets.symmetric(horizontal: 32.w),
child: Material(
@ -365,7 +369,7 @@ class _PersonalIndexState extends State<PersonalIndex>
_function(
'我的房屋',
R.ASSETS_ICONS_ICON_MY_HOUSE_PNG,
() => MyHousePage(),
() => MyHousePage(),
// () => HouseOwnersPage(
// identify: 4,
// ),
@ -375,8 +379,11 @@ class _PersonalIndexState extends State<PersonalIndex>
'${UserTool.userProvider.defaultHouse?.estateName ?? ''}',
),
36.hb,
_function('我的家庭', R.ASSETS_ICONS_ICON_MY_HOUSE_PNG,
() => MyFamilyPage(), ''),
_function(
'我的家庭',
R.ASSETS_ICONS_ICON_MY_HOUSE_PNG,
() => MyFamilyPage(),
''),
36.hb,
// _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG,
// () => CarParkingPage(), ''),
@ -384,15 +391,18 @@ class _PersonalIndexState extends State<PersonalIndex>
// _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG,
// () => CarManagePage(), ''),
// 36.hb,
_function('我的访客', R.ASSETS_ICONS_ICON_MY_VISITOR_PNG,
() => CarManagePage(), ''),
_function(
'我的访客',
R.ASSETS_ICONS_ICON_MY_VISITOR_PNG,
() => CarManagePage(),
''),
36.hb,
_function(
'收货地址设置',
R.ASSETS_ICONS_ICON_MY_LOCATION_PNG,
() => AddressListPage(
canBack: false,
),
() => AddressListPage(
canBack: false,
),
''),
],
),
@ -402,9 +412,7 @@ class _PersonalIndexState extends State<PersonalIndex>
),
],
)),
)
);
));
}
_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/material.dart';
import 'package:get/get.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 {
AccountManagerPage({Key? key}) : super(key: key);
@ -38,7 +36,8 @@ class _AccountManagerPageState extends State<AccountManagerPage> {
),
),
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/sign_func.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:velocity_x/velocity_x.dart';
import 'login_page.dart';
class ForgotSetPsdPage extends StatefulWidget {
final String tel;
@ -171,7 +170,8 @@ class _ForgotSetPsdPageState extends State<ForgotSetPsdPage> {
widget.tel,
_codeController.text);
if (result) {
Get.offAll(() => LoginPage());
//
Get.offAll(() => OtherLoginPage());
}
}
: null,

@ -3,7 +3,7 @@ import 'dart:io';
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/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/headers.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'));
} else {
await Get.offAll(() => LoginPage());
//
await Get.offAll(() => OtherLoginPage());
}
} catch (e) {
LoggerData.addData(e);

@ -1,6 +1,6 @@
import 'package:aku_new_community/const/resource.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/ui/community/community_views/community_page.dart';
import 'package:aku_new_community/ui/market/market_page.dart';
@ -136,7 +136,8 @@ class _TabNavigatorState extends State<TabNavigator>
unselectedFontSize: 20.sp,
onTap: (index) {
if (UserTool.userProvider.isLogin == false) {
Get.offAll(() => LoginPage());
//
Get.offAll(() => OtherLoginPage());
} else {
_tabController!.animateTo(index, curve: Curves.easeInOutCubic);
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/network/base_list_model.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/others/rectIndicator.dart';
import 'package:card_swiper/card_swiper.dart';
@ -815,18 +816,10 @@ class _MarketPageState extends State<MarketPage>
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
BeeImageNetwork(
width: 88.w,
height: 88.w,
image: item.imgUrls.isNotEmpty ? item.imgUrls.first : '',
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
height: 88.w,
width: 88.w,
);
},
urls: item.imgUrls,
),
8.hb,
Text(

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

@ -1,12 +1,11 @@
import 'package:bot_toast/bot_toast.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/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/provider/app_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/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);
if (userProvider.isNotLogin) {
BotToast.showText(text: '请先登录');
Get.to(() => LoginPage());
//
Get.to(() => OtherLoginPage());
return false;
}
return true;

@ -2,7 +2,7 @@ import 'dart:io';
import 'dart:typed_data';
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/utils/developer_util.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);
if (!model.success && (model.code == 10010 || model.msg == '登录失效,请重新登录')) {
userProvider.logout();
Get.offAll(() => LoginPage());
//
Get.offAll(() => OtherLoginPage());
if (userProvider.isLogin) {
BotToast.showText(text: model.msg);
}

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