|
|
@ -531,79 +531,52 @@ class _BusinessHomePage extends State<BusinessHomePage> |
|
|
|
context: context, |
|
|
|
context: context, |
|
|
|
builder: (context) { |
|
|
|
builder: (context) { |
|
|
|
return AlertDialog( |
|
|
|
return AlertDialog( |
|
|
|
content: Column( |
|
|
|
content: GestureDetector( |
|
|
|
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
sharedPreferences.setString('identitySwitch', "2"); |
|
|
|
|
|
|
|
Navigator.of(context).pushNamedAndRemoveUntil( |
|
|
|
|
|
|
|
'/router/main_page', |
|
|
|
|
|
|
|
(route) => false, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Column( |
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
GestureDetector( |
|
|
|
Image.asset( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
"assets/image/bs_user_switch_bg.webp", |
|
|
|
onTap: () { |
|
|
|
width: 144.h, |
|
|
|
sharedPreferences.setString('identitySwitch', "1"); |
|
|
|
height: 97.h, |
|
|
|
Navigator.of(context).pop(); |
|
|
|
), |
|
|
|
}, |
|
|
|
Padding( |
|
|
|
child: Padding( |
|
|
|
padding: EdgeInsets.only(top: 10.h, bottom: 10.h), |
|
|
|
padding: EdgeInsets.only(top: 10.h, bottom: 10.h), |
|
|
|
child: Row( |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Image.asset( |
|
|
|
Image.asset( |
|
|
|
"assets/image/bs_switch.webp", |
|
|
|
"assets/image/bs_shop_logo.webp", |
|
|
|
width: 12.h, |
|
|
|
width: 28.h, |
|
|
|
height: 12.h, |
|
|
|
height: 28.h, |
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 10.w, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
"切换成用户端", |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
color: Color(0xFF30415B), |
|
|
|
color: Color(0xFF30415B), |
|
|
|
|
|
|
|
fontSize: 15.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 10.w, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
"商家端", |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
color: Color(0xFF0D0D0D), |
|
|
|
|
|
|
|
fontSize: 15.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
GestureDetector( |
|
|
|
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
sharedPreferences.setString('identitySwitch', "2"); |
|
|
|
|
|
|
|
Navigator.of(context).pushNamedAndRemoveUntil( |
|
|
|
|
|
|
|
'/router/main_page', |
|
|
|
|
|
|
|
(route) => false, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Padding( |
|
|
|
|
|
|
|
padding: EdgeInsets.only(top: 10.h, bottom: 10.h), |
|
|
|
|
|
|
|
child: Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Icon( |
|
|
|
|
|
|
|
Icons.person, |
|
|
|
|
|
|
|
size: 28.sp, |
|
|
|
|
|
|
|
color: Color(0xFF30415B), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 10.w, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
"用户端", |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
color: Color(0xFF0D0D0D), |
|
|
|
|
|
|
|
fontSize: 15.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
)) |
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
) |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
)); |
|
|
|
}, |
|
|
|
}, |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|