Browse Source

safety

master
fmk 3 years ago
parent
commit
a20298486a
  1. 37
      lib/retrofit/data/base_data.g.dart
  2. 41
      lib/retrofit/data/page.g.dart
  3. 8
      lib/retrofit/retrofit_api.dart
  4. 1208
      lib/retrofit/retrofit_api.g.dart
  5. 3
      lib/store/store_order.dart
  6. 6
      lib/union/union_view/union_coupon.dart
  7. 239
      lib/union/union_view/vip.dart
  8. 1
      lib/web/web_view/comment_list.dart

37
lib/retrofit/data/base_data.g.dart

@ -1,37 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'base_data.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BaseData<T> _$BaseDataFromJson<T>(
Map<String, dynamic> json,
T Function(Object json) fromJsonT,
) {
return BaseData<T>()
..code = json['code'] as int
..data = fromJsonT(json['data'])
..extra = json['extra']
..isError = json['isError'] as bool
..isSuccess = json['isSuccess'] as bool
..msg = json['msg'] as String
..path = json['path'] as String
..timestamp = json['timestamp'] as String;
}
Map<String, dynamic> _$BaseDataToJson<T>(
BaseData<T> instance,
Object Function(T value) toJsonT,
) =>
<String, dynamic>{
'code': instance.code,
'data': toJsonT(instance.data),
'extra': instance.extra,
'isError': instance.isError,
'isSuccess': instance.isSuccess,
'msg': instance.msg,
'path': instance.path,
'timestamp': instance.timestamp,
};

41
lib/retrofit/data/page.g.dart

@ -1,41 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'page.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
PageInfo<D> _$PageInfoFromJson<D>(
Map<String, dynamic> json,
D Function(Object json) fromJsonD,
) {
return PageInfo<D>()
..pageNum = json['pageNum'] as int
..current = json['current']
..pageSize = json['pageSize'] as int
..size = json['size']
..pages = json['pages']
..hasPreviousPage = json['hasPreviousPage'] as bool
..hasNextPage = json['hasNextPage'] as bool
..total = json['total'] as String
..list = (json['list'] as List)?.map(fromJsonD)?.toList()
..records = (json['records'] as List)?.map(fromJsonD)?.toList();
}
Map<String, dynamic> _$PageInfoToJson<D>(
PageInfo<D> instance,
Object Function(D value) toJsonD,
) =>
<String, dynamic>{
'pageNum': instance.pageNum,
'current': instance.current,
'pageSize': instance.pageSize,
'size': instance.size,
'pages': instance.pages,
'hasPreviousPage': instance.hasPreviousPage,
'hasNextPage': instance.hasNextPage,
'total': instance.total,
'list': instance.list?.map(toJsonD)?.toList(),
'records': instance.records?.map(toJsonD)?.toList(),
};

8
lib/retrofit/retrofit_api.dart

@ -37,11 +37,11 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart';
const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// 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.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/";

1208
lib/retrofit/retrofit_api.g.dart

File diff suppressed because it is too large Load Diff

3
lib/store/store_order.dart

@ -1,6 +1,7 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
@ -95,7 +96,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
fontSize: 18.sp,
),
),
expandedHeight: (storeInfo != null && storeInfo.couponVOList != null) ? 425.h : 365.h,
expandedHeight: (storeInfo != null && storeInfo.couponVOList != null) ? 465.h : 365.h,
floating: false,
snap: false,
leading: GestureDetector(

6
lib/union/union_view/union_coupon.dart

@ -64,8 +64,7 @@ class _UnionCoupon extends State<UnionCoupon> {
return Container(
height: 109.h,
child: ListView.builder(
itemCount:
(widget.storeInfo != null && widget.storeInfo.couponVOList != null)
itemCount: (widget.storeInfo != null && widget.storeInfo.couponVOList != null)
? widget.storeInfo.couponVOList.length
: 0,
physics: BouncingScrollPhysics(parent: PageScrollPhysics()),
@ -102,8 +101,7 @@ class _UnionCoupon extends State<UnionCoupon> {
text: (widget.storeInfo != null &&
widget.storeInfo.couponVOList != null &&
widget.storeInfo.couponVOList[position]
.bizType ==
1)
.bizType == 1)
? "¥"
: "",
style: TextStyle(

239
lib/union/union_view/vip.dart

@ -1,6 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart';
@ -9,27 +6,23 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/round_button.dart';
class Vip extends StatefulWidget {
final StoreInfo storeInfo;
final Function receiveVip;
final bool isReceive;
Vip(this.storeInfo, this.receiveVip, this.isReceive);
@override
State<StatefulWidget> createState() {
return _Vip();
}
}
class _Vip extends State<Vip> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.symmetric(
vertical: (widget.storeInfo != null && widget.storeInfo.isVip) ? 12.h : 20.h,
horizontal: 16.w),
margin: EdgeInsets.symmetric(vertical: 2.h, horizontal: 16.w),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
image: DecorationImage(
@ -39,132 +32,134 @@ class _Vip extends State<Vip> {
),
child: (widget.storeInfo != null && widget.storeInfo.isVip)
? Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
S.of(context).huiyuanyue,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
S.of(context).huiyuanyue,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
SizedBox(
width: 8.w,
),
Text(
"¥${(widget.storeInfo != null && widget.storeInfo.memberSource != null) ? widget.storeInfo.memberSource.balance : ""}",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
],
),
),
SizedBox(
width: 8.w,
),
Text(
"¥${(widget.storeInfo != null && widget.storeInfo.memberSource != null) ? widget.storeInfo.memberSource.balance : ""}",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
Container(
color: Colors.white,
width: 1.w,
height: 20.h,
),
),
],
),
Container(
color: Colors.white,
width: 1.w,
height: 20.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
S.of(context).huiyuanjifen,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
S.of(context).huiyuanjifen,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
SizedBox(
width: 8.w,
),
Text(
(widget.storeInfo != null &&
widget.storeInfo.memberSource != null)
? "${widget.storeInfo.memberSource.integral}"
: "",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
],
),
),
SizedBox(
width: 8.w,
),
Text(
(widget.storeInfo != null && widget.storeInfo.memberSource != null)
? "${widget.storeInfo.memberSource.integral}"
: "",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
],
),
],
),
SizedBox(
height: 10.h,
),
Text(
S.of(context).gongxinichengweibendianhuiyuan,
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFFEDC98E),
),
)
],
)
: Row(
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
"assets/image/icon_vip.png",
width: 36.w,
height: 20.h,
],
),
SizedBox(
height: 2.h,
height: 10.h,
),
Text(
S.of(context).chengweidianpuzhuanshuhuiyuan,
S.of(context).gongxinichengweibendianhuiyuan,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xCFFFFFFF),
fontWeight: MyFontWeight.semi_bold,
fontWeight: MyFontWeight.medium,
color: Color(0xFFEDC98E),
),
)
],
)
: Row(
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
"assets/image/icon_vip.png",
width: 36.w,
height: 20.h,
),
SizedBox(
height: 2.h,
),
Text(
S.of(context).chengweidianpuzhuanshuhuiyuan,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xCFFFFFFF),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
flex: 1,
),
InkWell(
onTap: () {
widget.receiveVip();
},
child: RoundButton(
text: widget.isReceive
? S.of(context).dianwolingqu
: S.of(context).yilingqu,
textColor:
widget.isReceive ? Colors.white : Color(0xFF484D66),
backgroup:
widget.isReceive ? Color(0xFF242B45) : Colors.white,
padding:
EdgeInsets.symmetric(vertical: 5.h, horizontal: 16.w),
radius: 14,
),
),
],
),
flex: 1,
),
InkWell(
onTap: () {
widget.receiveVip();
},
child: RoundButton(
text: widget.isReceive
? S.of(context).dianwolingqu
: S.of(context).yilingqu,
textColor: widget.isReceive ? Colors.white : Color(0xFF484D66),
backgroup: widget.isReceive ? Color(0xFF242B45) : Colors.white,
padding:
EdgeInsets.symmetric(vertical: 5.h, horizontal: 16.w),
radius: 14,
),
),
],
),
);
}
}
}

1
lib/web/web_view/comment_list.dart

@ -214,6 +214,7 @@ class _CommentList extends State<CommentList> {
Dio(),
context: context,
token: sharedPreferences.getString("token"),
showLoading: false,
);
BaseData<PageInfo<MemberCommentList>> baseData = await apiService.memberCommentList({
"pageNum": 1,

Loading…
Cancel
Save