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. 21
      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'; part 'retrofit_api.g.dart';
const base_url = "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 baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "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 baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "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:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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/base_data.dart';
import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
@ -95,7 +96,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
fontSize: 18.sp, 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, floating: false,
snap: false, snap: false,
leading: GestureDetector( leading: GestureDetector(

6
lib/union/union_view/union_coupon.dart

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

21
lib/union/union_view/vip.dart

@ -1,6 +1,3 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.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'; import 'package:huixiang/view_widget/round_button.dart';
class Vip extends StatefulWidget { class Vip extends StatefulWidget {
final StoreInfo storeInfo; final StoreInfo storeInfo;
final Function receiveVip; final Function receiveVip;
final bool isReceive; final bool isReceive;
Vip(this.storeInfo, this.receiveVip, this.isReceive); Vip(this.storeInfo, this.receiveVip, this.isReceive);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _Vip(); return _Vip();
} }
} }
class _Vip extends State<Vip> { class _Vip extends State<Vip> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(vertical: 2.h, horizontal: 16.w),
vertical: (widget.storeInfo != null && widget.storeInfo.isVip) ? 12.h : 20.h,
horizontal: 16.w),
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
@ -94,7 +87,8 @@ class _Vip extends State<Vip> {
width: 8.w, width: 8.w,
), ),
Text( Text(
(widget.storeInfo != null && widget.storeInfo.memberSource != null) (widget.storeInfo != null &&
widget.storeInfo.memberSource != null)
? "${widget.storeInfo.memberSource.integral}" ? "${widget.storeInfo.memberSource.integral}"
: "", : "",
style: TextStyle( style: TextStyle(
@ -155,8 +149,10 @@ class _Vip extends State<Vip> {
text: widget.isReceive text: widget.isReceive
? S.of(context).dianwolingqu ? S.of(context).dianwolingqu
: S.of(context).yilingqu, : S.of(context).yilingqu,
textColor: widget.isReceive ? Colors.white : Color(0xFF484D66), textColor:
backgroup: widget.isReceive ? Color(0xFF242B45) : Colors.white, widget.isReceive ? Colors.white : Color(0xFF484D66),
backgroup:
widget.isReceive ? Color(0xFF242B45) : Colors.white,
padding: padding:
EdgeInsets.symmetric(vertical: 5.h, horizontal: 16.w), EdgeInsets.symmetric(vertical: 5.h, horizontal: 16.w),
radius: 14, radius: 14,
@ -166,5 +162,4 @@ class _Vip extends State<Vip> {
), ),
); );
} }
} }

1
lib/web/web_view/comment_list.dart

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

Loading…
Cancel
Save