Browse Source

修改UI, bug

null_safety
fmk 4 years ago
parent
commit
84dd7b07f9
  1. 2
      lib/generated/intl/messages_en.dart
  2. 2
      lib/generated/intl/messages_zh_CN.dart
  3. 2
      lib/generated/intl/messages_zh_Hans_CN.dart
  4. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  5. 2
      lib/generated/intl/messages_zh_TW.dart
  6. 20
      lib/generated/l10n.dart
  7. 3
      lib/l10n/intl_en.arb
  8. 2
      lib/l10n/intl_zh_CN.arb
  9. 2
      lib/l10n/intl_zh_Hans_CN.arb
  10. 2
      lib/l10n/intl_zh_Hant_CN.arb
  11. 2
      lib/l10n/intl_zh_TW.arb
  12. 46
      lib/message/system_message.dart
  13. 37
      lib/mine/vip_balance_page.dart

2
lib/generated/intl/messages_en.dart

@ -171,6 +171,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("关于"),
"guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("关于创始人"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"),
@ -256,6 +257,7 @@ class MessageLookup extends MessageLookupByLibrary {
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),
"morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"),
"muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暂无星店活动"),
"nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"),
"nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"),
"nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"),
"ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"),

2
lib/generated/intl/messages_zh_CN.dart

@ -170,6 +170,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"),
"guanyu" : MessageLookupByLibrary.simpleMessage("关于"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"),
@ -255,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary {
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),
"morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"),
"muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暂无星店活动"),
"nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"),
"nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"),
"nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"),
"ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"),

2
lib/generated/intl/messages_zh_Hans_CN.dart

@ -170,6 +170,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"),
"guanyu" : MessageLookupByLibrary.simpleMessage("关于"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"),
@ -255,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary {
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),
"morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"),
"muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暂无星店活动"),
"nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"),
"nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"),
"nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"),
"ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"),

2
lib/generated/intl/messages_zh_Hant_CN.dart

@ -170,6 +170,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"),
"guanyu" : MessageLookupByLibrary.simpleMessage("關於"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合計:"),
@ -255,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary {
"mingxi" : MessageLookupByLibrary.simpleMessage("明細"),
"morenpaixu" : MessageLookupByLibrary.simpleMessage("默認排序"),
"muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暫無星店活動"),
"nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在這兒還沒有消費或充值紀錄喔~"),
"nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"),
"nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"),
"ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登錄,請點擊去登錄"),

2
lib/generated/intl/messages_zh_TW.dart

@ -170,6 +170,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"),
"guanyu" : MessageLookupByLibrary.simpleMessage("關於"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合計:"),
@ -255,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary {
"mingxi" : MessageLookupByLibrary.simpleMessage("明細"),
"morenpaixu" : MessageLookupByLibrary.simpleMessage("默認排序"),
"muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暫無星店活動"),
"nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在這兒還沒有消費或充值紀錄喔~"),
"nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"),
"nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"),
"ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登錄,請點擊去登錄"),

20
lib/generated/l10n.dart

@ -3925,6 +3925,26 @@ class S {
);
}
/// ``
String get nihaimeiyouchongzhihuoxiaofeijilu {
return Intl.message(
'你在这儿还没有消费或充值记录哦~',
name: 'nihaimeiyouchongzhihuoxiaofeijilu',
desc: '',
args: [],
);
}
/// ``
String get haimeiyouxiaoxi {
return Intl.message(
'还没有消息~',
name: 'haimeiyouxiaoxi',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

3
lib/l10n/intl_en.arb

@ -407,6 +407,9 @@
"chongzhixiaoxi": "充值消息",
"shuaxin": "刷新",
"lijichongzhi": "立即充值",
"nihaimeiyouchongzhihuoxiaofeijilu": "你在这儿还没有消费或充值记录哦~",
"haimeiyouxiaoxi": "还没有消息~",

2
lib/l10n/intl_zh_CN.arb

@ -408,6 +408,8 @@
"chongzhixiaoxi": "充值消息",
"shuaxin": "刷新",
"lijichongzhi": "立即充值",
"nihaimeiyouchongzhihuoxiaofeijilu": "你在这儿还没有消费或充值记录哦~",
"haimeiyouxiaoxi": "还没有消息~",

2
lib/l10n/intl_zh_Hans_CN.arb

@ -408,6 +408,8 @@
"chongzhixiaoxi": "充值消息",
"shuaxin": "刷新",
"lijichongzhi": "立即充值",
"nihaimeiyouchongzhihuoxiaofeijilu": "你在这儿还没有消费或充值记录哦~",
"haimeiyouxiaoxi": "还没有消息~",

2
lib/l10n/intl_zh_Hant_CN.arb

@ -402,6 +402,8 @@
"chongzhixiaoxi": "充值消息",
"shuaxin": "刷新",
"lijichongzhi": "立即充值",
"nihaimeiyouchongzhihuoxiaofeijilu": "你在這兒還沒有消費或充值紀錄喔~",
"haimeiyouxiaoxi": "還沒有消息~",

2
lib/l10n/intl_zh_TW.arb

@ -400,6 +400,8 @@
"chongzhixiaoxi": "充值消息",
"shuaxin": "刷新",
"lijichongzhi": "立即充值",
"nihaimeiyouchongzhihuoxiaofeijilu": "你在這兒還沒有消費或充值紀錄喔~",
"haimeiyouxiaoxi": "還沒有消息~",

46
lib/message/system_message.dart

@ -9,6 +9,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -62,8 +63,7 @@ class _SystemMessagePage extends State<SystemMessagePage> {
messages.addAll(pageInfo.list.map((e) => Message.fromJson(e)).toList());
_refreshController.loadComplete();
_refreshController.refreshCompleted();
if (mounted)
setState(() {});
if (mounted) setState(() {});
if (pageNum * 10 > int.tryParse(pageInfo.total)) {
_refreshController.loadNoData();
} else {
@ -77,7 +77,6 @@ class _SystemMessagePage extends State<SystemMessagePage> {
RefreshController _refreshController = RefreshController();
@override
Widget build(BuildContext context) {
return Scaffold(
@ -104,21 +103,28 @@ class _SystemMessagePage extends State<SystemMessagePage> {
onLoading: () {
queryMessage();
},
child: ListView.builder(
padding: EdgeInsets.only(top: 16),
itemCount: messages.length,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
if (messages[position].typed == 2) {
Navigator.of(context)
.pushNamed('/router/exchange_order_details');
}
},
child: buildMessageItem(messages[position]),
);
}),
child: (messages == null || messages.length == 0)
? NoDataView(
isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
)
: ListView.builder(
padding: EdgeInsets.only(top: 16),
itemCount: messages.length,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
if (messages[position].typed == 2) {
Navigator.of(context)
.pushNamed('/router/exchange_order_details');
}
},
child: buildMessageItem(messages[position]),
);
}),
),
);
}
@ -153,8 +159,8 @@ class _SystemMessagePage extends State<SystemMessagePage> {
(message.typed == 1)
? "assets/image/icon_system_notices.png"
: (message.typed == 2)
? "assets/image/icon_system_order.png"
: "assets/image/icon_system_recharge.png",
? "assets/image/icon_system_order.png"
: "assets/image/icon_system_recharge.png",
width: 24.w,
height: 24.h,
),

37
lib/mine/vip_balance_page.dart

@ -6,11 +6,11 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/data/user_bill.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class VipBalancePage extends StatefulWidget {
final arguments;
@ -113,12 +113,19 @@ class _VipBalancePage extends State<VipBalancePage> {
leadingWidth: 56.w,
),
body: Container(
child: ListView.builder(
itemBuilder: (context, position) {
return balanceItem(userBills[position]);
},
itemCount: userBills.length,
),
child: (userBills == null || userBills.length == 0)
? NoDataView(
isShowBtn: false,
text: S.of(context).nihaimeiyouchongzhihuoxiaofeijilu,
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
)
: ListView.builder(
itemBuilder: (context, position) {
return balanceItem(userBills[position]);
},
itemCount: userBills.length,
),
),
);
}
@ -138,7 +145,9 @@ class _VipBalancePage extends State<VipBalancePage> {
margin: EdgeInsets.only(left: 12.w, top: 12.h),
alignment: Alignment.center,
child: Image.asset(
userBill.pm == 0 ? "assets/image/icon_store_c.png" : "assets/image/icon_wallet_recharge.png",
userBill.pm == 0
? "assets/image/icon_store_c.png"
: "assets/image/icon_wallet_recharge.png",
),
),
Expanded(
@ -177,7 +186,10 @@ class _VipBalancePage extends State<VipBalancePage> {
TextSpan(children: [
TextSpan(
text: userBill.createTime,
style: TextStyle(fontSize: 14.sp, color: Color(0xff727272),),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff727272),
),
),
]),
),
@ -186,9 +198,10 @@ class _VipBalancePage extends State<VipBalancePage> {
TextSpan(
text: S.of(context).yue_(userBill.balance),
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color: Color(0xff727272),),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color: Color(0xff727272),
),
),
]),
),

Loading…
Cancel
Save