提交 5cdb7467 authored 作者: maodou's avatar maodou

Merge remote-tracking branch 'origin/test' into test

...@@ -72,6 +72,7 @@ class CouponModel { ...@@ -72,6 +72,7 @@ class CouponModel {
CouponModel({ CouponModel({
this.couponRecId, this.couponRecId,
this.endTime, this.endTime,
this.startTime,
this.couponId, this.couponId,
this.useStatus, this.useStatus,
this.couponName, this.couponName,
...@@ -83,6 +84,7 @@ class CouponModel { ...@@ -83,6 +84,7 @@ class CouponModel {
CouponModel.fromJson(dynamic json) { CouponModel.fromJson(dynamic json) {
couponRecId = json['coupon_rec_id']; couponRecId = json['coupon_rec_id'];
endTime = json['end_time']; endTime = json['end_time'];
startTime = json['start_time'];
couponId = json['coupon_id']; couponId = json['coupon_id'];
useStatus = json['use_status']; useStatus = json['use_status'];
couponName = json['coupon_name']; couponName = json['coupon_name'];
...@@ -93,6 +95,7 @@ class CouponModel { ...@@ -93,6 +95,7 @@ class CouponModel {
num? couponRecId; num? couponRecId;
String? endTime; String? endTime;
String? startTime;
num? couponId; num? couponId;
num? useStatus; num? useStatus;
String? couponName; String? couponName;
...@@ -103,6 +106,7 @@ class CouponModel { ...@@ -103,6 +106,7 @@ class CouponModel {
CouponModel copyWith({ CouponModel copyWith({
num? couponRecId, num? couponRecId,
String? endTime, String? endTime,
String? startTime,
num? couponId, num? couponId,
num? useStatus, num? useStatus,
String? couponName, String? couponName,
...@@ -113,6 +117,7 @@ class CouponModel { ...@@ -113,6 +117,7 @@ class CouponModel {
CouponModel( CouponModel(
couponRecId: couponRecId ?? this.couponRecId, couponRecId: couponRecId ?? this.couponRecId,
endTime: endTime ?? this.endTime, endTime: endTime ?? this.endTime,
startTime: startTime ?? this.startTime,
couponId: couponId ?? this.couponId, couponId: couponId ?? this.couponId,
useStatus: useStatus ?? this.useStatus, useStatus: useStatus ?? this.useStatus,
couponName: couponName ?? this.couponName, couponName: couponName ?? this.couponName,
...@@ -124,7 +129,8 @@ class CouponModel { ...@@ -124,7 +129,8 @@ class CouponModel {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final map = <String, dynamic>{}; final map = <String, dynamic>{};
map['coupon_rec_id'] = couponRecId; map['coupon_rec_id'] = couponRecId;
// map['end_time'] = endTime; map['end_time'] = endTime;
map['start_time'] = startTime;
map['coupon_id'] = couponId; map['coupon_id'] = couponId;
map['use_status'] = useStatus; map['use_status'] = useStatus;
map['coupon_name'] = couponName; map['coupon_name'] = couponName;
......
...@@ -105,7 +105,9 @@ class CreditPointsPage extends StatelessWidget { ...@@ -105,7 +105,9 @@ class CreditPointsPage extends StatelessWidget {
color: Colours.cE7, color: Colours.cE7,
// color: Colors.red, // color: Colors.red,
), ),
GestureDetector( Visibility(
visible: controller.creditPointModel.deductibleIntegral ==0?false:true,
child: GestureDetector(
onTap: (){ onTap: (){
controller.setUse(); controller.setUse();
if (controller.useCreditPoint) { if (controller.useCreditPoint) {
...@@ -135,6 +137,7 @@ class CreditPointsPage extends StatelessWidget { ...@@ -135,6 +137,7 @@ class CreditPointsPage extends StatelessWidget {
], ],
), ),
), ),
),
) )
], ],
), ),
......
...@@ -132,8 +132,11 @@ class _MinePageState extends State<MinePage> { ...@@ -132,8 +132,11 @@ class _MinePageState extends State<MinePage> {
child: Column( child: Column(
children: [ children: [
GestureDetector( GestureDetector(
onTap:(){ onTap:() async {
context.pushNamed(Routes.security,extra: controller.userInfo); final result = await context.pushNamed(Routes.security,extra: controller.userInfo);
if (result == true){
controller.getInfo();
}
}, child: _buildItem('账户安全') }, child: _buildItem('账户安全')
), ),
Container(color: Colours.cLine,margin: EdgeInsets.symmetric(horizontal: 15.w),height: 1.w,), Container(color: Colours.cLine,margin: EdgeInsets.symmetric(horizontal: 15.w),height: 1.w,),
......
...@@ -74,7 +74,7 @@ class BuildItem extends StatelessWidget { ...@@ -74,7 +74,7 @@ class BuildItem extends StatelessWidget {
Gaps.vGaps5, Gaps.vGaps5,
Text('满${model.normPrice}${model.reducedPrice}元',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),), Text('满${model.normPrice}${model.reducedPrice}元',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
Gaps.vGaps5, Gaps.vGaps5,
Text('有效至:${model.endTime}',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),), model.type ==1?Text('有效至:${model.endTime}',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),):Text('有效期${model.startTime}${model.endTime}',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
], ],
), ),
if (model.type == 1) GestureDetector( if (model.type == 1) GestureDetector(
......
...@@ -261,7 +261,10 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -261,7 +261,10 @@ class _UserInfoPageState extends State<UserInfoPage> {
getGender(num? sex) { getGender(num? sex) {
String gender; String gender;
if (sex == 1) { if (sex == 0) {
gender = "";
}
else if (sex == 1) {
gender = "男"; gender = "男";
} else if (sex == 2) { } else if (sex == 2) {
gender = "女"; gender = "女";
......
...@@ -12,7 +12,12 @@ class UserSecurityPage extends StatefulWidget { ...@@ -12,7 +12,12 @@ class UserSecurityPage extends StatefulWidget {
class _UserSecurityPageState extends State<UserSecurityPage> { class _UserSecurityPageState extends State<UserSecurityPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return WillPopScope(
onWillPop: () async {
context.pop(true);
return false;
},
child: Scaffold(
appBar: AppBar( appBar: AppBar(
centerTitle: true, centerTitle: true,
title: const Text('账号安全'), title: const Text('账号安全'),
...@@ -176,6 +181,7 @@ class _UserSecurityPageState extends State<UserSecurityPage> { ...@@ -176,6 +181,7 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
) )
], ],
), ),
),
); );
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论