Browse Source

safety

master
fmk 3 years ago
parent
commit
d7da3a5a6e
  1. 12
      lib/main_page.dart
  2. 8
      lib/mine/mine_page.dart
  3. 3
      lib/retrofit/retrofit_api.dart
  4. 2
      lib/union/store_details_page.dart
  5. 32
      lib/union/union_details_page.dart

12
lib/main_page.dart

@ -140,7 +140,14 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
}, onReceiveMessage: (event) async { }, onReceiveMessage: (event) async {
print("onReceiveMessage: ${event.toString()}"); print("onReceiveMessage: ${event.toString()}");
return event; return event;
}); }, onRegisteredDone: (event) async {
print("onRegisteredDone: ${event.toString()}");
return event;
}, xgPushDidBindWithIdentifier: (event) async {
print("xgPushDidBindWithIdentifier: ${event.toString()}");
return event;
}
);
} }
pushRoute() async { pushRoute() async {
@ -202,7 +209,8 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
String mobile = baseDate.data.phone; String mobile = baseDate.data.phone;
if (mobile != null && mobile != "") { if (mobile != null && mobile != "") {
xgFlutterPlugin.setAccount(mobile, AccountType.UNKNOWN); xgFlutterPlugin.setAccount(mobile, AccountType.PHONE_NUMBER);
// xgFlutterPlugin.unbindWithIdentifier(identify: mobile, bindType: XGBindType.account)
xgFlutterPlugin.bindWithIdentifier( xgFlutterPlugin.bindWithIdentifier(
identify: mobile, bindType: XGBindType.account); identify: mobile, bindType: XGBindType.account);
} }

8
lib/mine/mine_page.dart

@ -43,7 +43,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
return; return;
} }
await Navigator.of(context).pushNamed('/router/user_info_page'); await Navigator.of(context).pushNamed('/router/user_info_page');
queryUserInfo(); setState(() {});;
} }
loginTips() { loginTips() {
@ -76,7 +76,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
setState(() {}); setState(() {});
} }
if (event.type == 3) { if (event.type == 3) {
queryUserInfo(); setState(() {});;
} }
}); });
} }
@ -559,7 +559,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
Widget mineView() { Widget mineView() {
return Container( return Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(left: 16.w, right: 16.w), margin: EdgeInsets.symmetric(horizontal: 16.w),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -700,7 +700,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
return; return;
} }
await Navigator.of(context).pushNamed('/router/integral_page'); await Navigator.of(context).pushNamed('/router/integral_page');
queryUserInfo(); setState(() {});;
} }
@override @override

3
lib/retrofit/retrofit_api.dart

@ -44,6 +44,9 @@ const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式
// const base_url = "http://192.168.10.236:8766/app/"; // const base_url = "http://192.168.10.236:8766/app/";
// const baseUrl = "http://192.168.10.236:8766/app/"; // const baseUrl = "http://192.168.10.236:8766/app/";
// const base_url = "http://192.168.10.74:8766/app/";
// const baseUrl = "http://192.168.10.74:8766/app/";
@RestApi(baseUrl: baseUrl) @RestApi(baseUrl: baseUrl)
abstract class ApiService { abstract class ApiService {
factory ApiService(Dio dio, factory ApiService(Dio dio,

2
lib/union/store_details_page.dart

@ -355,7 +355,7 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
children: [ children: [
InkWell( InkWell(
child: Text( child: Text(
"${activity != null ? activity.storeName : (article != null && article.author != null) ? article.author.name : ""}", "${activity != null ? (activity.storeName ?? "") : (article != null && article.author != null) ? (article.author.name ?? "") : ""}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 14.sp, fontSize: 14.sp,

32
lib/union/union_details_page.dart

@ -78,18 +78,20 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return FutureBuilder(
appBar: MyAppBar( future: queryStoreInfo(),
background: Color(0xFFF7F7F7), builder: (context, snapshot) {
title: storeInfo == null ? widget.arguments["storeName"] : storeInfo.storeName, return Scaffold(
titleColor: Colors.black87, appBar: MyAppBar(
titleSize: 18.sp, background: Color(0xFFF7F7F7),
leadingColor: Colors.black, title: storeInfo == null
), ? (widget.arguments["storeName"] ?? "")
body: FutureBuilder( : storeInfo.storeName,
future: queryStoreInfo(), titleColor: Colors.black87,
builder: (context, snapshot) { titleSize: 18.sp,
return Column( leadingColor: Colors.black,
),
body: Column(
children: [ children: [
Expanded( Expanded(
child: SmartRefresher( child: SmartRefresher(
@ -356,9 +358,9 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
), ),
), ),
], ],
); ),
}, );
), },
); );
} }

Loading…
Cancel
Save