Browse Source

文本更改,合并map代码

wr_2023_business
huixiang_app 1 year ago
parent
commit
cfe17babae
  1. 37
      lib/mine/mine_view/mine_item.dart

37
lib/mine/mine_view/mine_item.dart

@ -1,5 +1,8 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart';
@ -34,9 +37,9 @@ class _MineItem extends State<MineItem> {
maskType: EasyLoadingMaskType.black); maskType: EasyLoadingMaskType.black);
BusinessApiService businessService = BusinessApiService businessService =
BusinessApiService(Dio(), context: context); BusinessApiService(Dio(), context: context);
BaseData baseData = BaseData baseData =
await businessService.annoToken(param).catchError((error) { await businessService.annoToken(param).catchError((error) {
print(error.message); print(error.message);
}); });
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
@ -218,20 +221,22 @@ class _MineItem extends State<MineItem> {
), ),
/// ///
Expanded(child: InkWell( Expanded(
onTap: () { child: InkWell(
SharedPreferences.getInstance().then((value) { onTap: () {
if (value.getString("token") == null || SharedPreferences.getInstance().then((value) {
value.getString("token") == "") { if (value.getString("token") == null ||
LoginTipsDialog().show(context); value.getString("token") == "") {
return; LoginTipsDialog().show(context);
} return;
Navigator.of(context).pushNamed('/router/mine_shop_page'); }
}); Navigator.of(context).pushNamed('/router/mine_shop_page');
}, });
child: mineItem( },
S.of(context).dianpuchongzhi, child: mineItem(
"assets/image/shop_yue.webp", S.of(context).dianpuchongzhi,
"assets/image/shop_yue.webp",
),
), ),
), ),

Loading…
Cancel
Save