diff --git a/assets/image/2x/bs_switch.webp b/assets/image/2x/bs_switch.webp new file mode 100644 index 00000000..eb50924a Binary files /dev/null and b/assets/image/2x/bs_switch.webp differ diff --git a/assets/image/2x/bs_user_switch_bg.webp b/assets/image/2x/bs_user_switch_bg.webp new file mode 100644 index 00000000..fa3140d2 Binary files /dev/null and b/assets/image/2x/bs_user_switch_bg.webp differ diff --git a/assets/image/3x/bs_switch.webp b/assets/image/3x/bs_switch.webp new file mode 100644 index 00000000..4fa0dd11 Binary files /dev/null and b/assets/image/3x/bs_switch.webp differ diff --git a/assets/image/3x/bs_user_switch_bg.webp b/assets/image/3x/bs_user_switch_bg.webp new file mode 100644 index 00000000..4dbc3cb0 Binary files /dev/null and b/assets/image/3x/bs_user_switch_bg.webp differ diff --git a/assets/image/bs_switch.webp b/assets/image/bs_switch.webp new file mode 100644 index 00000000..830f5477 Binary files /dev/null and b/assets/image/bs_switch.webp differ diff --git a/assets/image/bs_user_switch_bg.webp b/assets/image/bs_user_switch_bg.webp new file mode 100644 index 00000000..c1b4cfa0 Binary files /dev/null and b/assets/image/bs_user_switch_bg.webp differ diff --git a/lib/business_system/home/business_home_page.dart b/lib/business_system/home/business_home_page.dart index 4d580baf..1604a031 100644 --- a/lib/business_system/home/business_home_page.dart +++ b/lib/business_system/home/business_home_page.dart @@ -531,79 +531,52 @@ class _BusinessHomePage extends State context: context, builder: (context) { 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, mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - sharedPreferences.setString('identitySwitch', "1"); - Navigator.of(context).pop(); - }, - child: Padding( - padding: EdgeInsets.only(top: 10.h, bottom: 10.h), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/image/bs_shop_logo.webp", - width: 28.h, - height: 28.h, + Image.asset( + "assets/image/bs_user_switch_bg.webp", + width: 144.h, + height: 97.h, + ), + Padding( + padding: EdgeInsets.only(top: 10.h, bottom: 10.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + "assets/image/bs_switch.webp", + width: 12.h, + height: 12.h, + ), + SizedBox( + width: 10.w, + ), + Text( + "切换成用户端", + style: TextStyle( 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, - ), - ), - ], ), - )) + ], + ), + ) ], ), - ); + )); }, ); } diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart index c05319b7..8f71bf9b 100644 --- a/lib/login/new_login_page.dart +++ b/lib/login/new_login_page.dart @@ -271,15 +271,14 @@ class _NewLoginPage extends State { if (sharedPreferences.containsKey('token') && sharedPreferences.getString("token") != null && sharedPreferences.getString("token") != "") { - ExamineInstance.instance.isExamine = - sharedPreferences.getString("mobile") == "13800138000"; - if (sharedPreferences.getString("identitySwitch") == null || sharedPreferences.getString("identitySwitch") == "2" || (sharedPreferences.getString("account")== "" || - sharedPreferences.getString("password")== "")) { - Navigator.of(context) - .popAndPushNamed('/router/main_page'); - } else { + ExamineInstance.instance.isExamine = sharedPreferences.getString("mobile") == "13800138000"; + if (sharedPreferences.getString("identitySwitch") != null && sharedPreferences.getString("identitySwitch") != "2" && (sharedPreferences.getString("account")!= "" || + sharedPreferences.getString("password")!= "")) { businessLogin(sharedPreferences.getString("account"), sharedPreferences.getString("password")); + } else { + Navigator.of(context) + .popAndPushNamed('/router/main_page'); } } else { apiService = ApiService(Dio(), context: context); diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index a0bde192..f8d56bf5 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -68,9 +68,7 @@ part 'retrofit_api.g.dart'; const localBaseUrl = "http://192.168.10.78:8766/app/";///本地 // const localBaseUrl = "http://platform.test.api.lotus-wallet.com/app/";///测试 -const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/"; - -///线上 +const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线上 const ipBaseUrl = "http://whois.pconline.com.cn";