Browse Source

商家端新增切换用户端功能;

用户端切换ui更改;
wr_2023_business
wurong 1 year ago
parent
commit
fb9e4da4c7
  1. BIN
      assets/image/2x/bs_switch.webp
  2. BIN
      assets/image/2x/bs_user_switch_bg.webp
  3. BIN
      assets/image/3x/bs_switch.webp
  4. BIN
      assets/image/3x/bs_user_switch_bg.webp
  5. BIN
      assets/image/bs_switch.webp
  6. BIN
      assets/image/bs_user_switch_bg.webp
  7. 67
      lib/business_system/home/business_home_page.dart
  8. 13
      lib/login/new_login_page.dart
  9. 4
      lib/retrofit/retrofit_api.dart

BIN
assets/image/2x/bs_switch.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

BIN
assets/image/2x/bs_user_switch_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
assets/image/3x/bs_switch.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/3x/bs_user_switch_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
assets/image/bs_switch.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

BIN
assets/image/bs_user_switch_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

67
lib/business_system/home/business_home_page.dart

@ -531,44 +531,7 @@ class _BusinessHomePage extends State<BusinessHomePage>
context: context,
builder: (context) {
return AlertDialog(
content: 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,
color: Color(0xFF30415B),
),
SizedBox(
width: 10.w,
),
Text(
"商家端",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,
),
),
],
),
),
),
GestureDetector(
content: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
sharedPreferences.setString('identitySwitch', "2");
@ -577,33 +540,43 @@ class _BusinessHomePage extends State<BusinessHomePage>
(route) => false,
);
},
child: Padding(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
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: [
Icon(
Icons.person,
size: 28.sp,
color: Color(0xFF30415B),
Image.asset(
"assets/image/bs_switch.webp",
width: 12.h,
height: 12.h,
),
SizedBox(
width: 10.w,
),
Text(
"用户端",
"切换成用户端",
style: TextStyle(
color: Color(0xFF0D0D0D),
color: Color(0xFF30415B),
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,
),
),
],
),
))
)
],
),
);
));
},
);
}

13
lib/login/new_login_page.dart

@ -271,15 +271,14 @@ class _NewLoginPage extends State<NewLoginPage> {
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);

4
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";

Loading…
Cancel
Save