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

8
lib/mine/mine_page.dart

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

2
lib/union/store_details_page.dart

@ -355,7 +355,7 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
children: [
InkWell(
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(
fontWeight: FontWeight.normal,
fontSize: 14.sp,

14
lib/union/union_details_page.dart

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

Loading…
Cancel
Save