Browse Source

Merge branch 'master' into dev

master
w-R 3 years ago
parent
commit
5f90f7c4be
  1. 1
      lib/generated/intl/messages_en.dart
  2. 1
      lib/generated/intl/messages_zh_CN.dart
  3. 1
      lib/generated/intl/messages_zh_Hans_CN.dart
  4. 1
      lib/generated/intl/messages_zh_Hant_CN.dart
  5. 1
      lib/generated/intl/messages_zh_TW.dart
  6. 10
      lib/generated/l10n.dart
  7. 1
      lib/l10n/intl_en.arb
  8. 1
      lib/l10n/intl_zh_CN.arb
  9. 1
      lib/l10n/intl_zh_Hans_CN.arb
  10. 1
      lib/l10n/intl_zh_Hant_CN.arb
  11. 1
      lib/l10n/intl_zh_TW.arb
  12. 9
      lib/order/exchange_history_page.dart
  13. 20
      lib/order/exchange_order_page.dart
  14. 20
      lib/order/logistics_information_page.dart
  15. 7
      lib/order/order_detail_page.dart
  16. 4
      lib/order/order_history_page.dart
  17. 395
      lib/retrofit/retrofit_api.g.dart
  18. 24
      lib/union/store_details_page.dart
  19. 2
      lib/union/union_details_page.dart
  20. 6
      lib/view_widget/custom_image.dart
  21. 23
      lib/view_widget/round_button.dart

1
lib/generated/intl/messages_en.dart

@ -543,6 +543,7 @@ class MessageLookup extends MessageLookupByLibrary {
"zaituzhong" : MessageLookupByLibrary.simpleMessage("运输中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"),
"zanwupinglun" : MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"),
"zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"),
"zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"),

1
lib/generated/intl/messages_zh_CN.dart

@ -542,6 +542,7 @@ class MessageLookup extends MessageLookupByLibrary {
"zaituzhong" : MessageLookupByLibrary.simpleMessage("运输中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"),
"zanwupinglun" : MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"),
"zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"),
"zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"),

1
lib/generated/intl/messages_zh_Hans_CN.dart

@ -542,6 +542,7 @@ class MessageLookup extends MessageLookupByLibrary {
"zaituzhong" : MessageLookupByLibrary.simpleMessage("运输中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在线客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暂不支持线上点餐"),
"zanwupinglun" : MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"),
"zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"),
"zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"),

1
lib/generated/intl/messages_zh_Hant_CN.dart

@ -542,6 +542,7 @@ class MessageLookup extends MessageLookupByLibrary {
"zaituzhong" : MessageLookupByLibrary.simpleMessage("運輸中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"),
"zanwupinglun" : MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"),
"zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暫無優惠券可領取"),
"zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("賬號授權"),

1
lib/generated/intl/messages_zh_TW.dart

@ -542,6 +542,7 @@ class MessageLookup extends MessageLookupByLibrary {
"zaituzhong" : MessageLookupByLibrary.simpleMessage("運輸中"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"),
"zanwupinglun" : MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"),
"zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暫無優惠券可領取"),
"zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("賬號授權"),

10
lib/generated/l10n.dart

@ -4725,6 +4725,16 @@ class S {
);
}
/// ``
String get zanwupinglun {
return Intl.message(
'暂无评论,快来评论吧',
name: 'zanwupinglun',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

1
lib/l10n/intl_en.arb

@ -489,6 +489,7 @@
"zaituzhong": "运输中",
"qianshou": "已签收",
"wentijian": "问题件",
"zanwupinglun": "暂无评论,快来评论吧",

1
lib/l10n/intl_zh_CN.arb

@ -491,6 +491,7 @@
"zaituzhong": "运输中",
"qianshou": "已签收",
"wentijian": "问题件",
"zanwupinglun": "暂无评论,快来评论吧",

1
lib/l10n/intl_zh_Hans_CN.arb

@ -491,6 +491,7 @@
"zaituzhong": "运输中",
"qianshou": "已签收",
"wentijian": "问题件",
"zanwupinglun": "暂无评论,快来评论吧",

1
lib/l10n/intl_zh_Hant_CN.arb

@ -485,6 +485,7 @@
"zaituzhong": "運輸中",
"qianshou": "已簽收",
"wentijian": "問題件",
"zanwupinglun": "暫無評論,快去評論吧~",
"privacy_policy4": "并使用本機號碼登錄"

1
lib/l10n/intl_zh_TW.arb

@ -483,6 +483,7 @@
"zaituzhong": "運輸中",
"qianshou": "已簽收",
"wentijian": "問題件",
"zanwupinglun": "暫無評論,快去評論吧~",
"privacy_policy4": "并使用本機號碼登錄"

9
lib/order/exchange_history_page.dart

@ -7,6 +7,7 @@ import 'package:huixiang/retrofit/data/exchange_order.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
@ -323,15 +324,13 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.network(
MImage(
(exchangeOrder != null &&
exchangeOrder.creditOrderDetailList != null)
? exchangeOrder.creditOrderDetailList[0].goodsMainImg
: "",
errorBuilder: (context, error, stackTrace) {
return Image.asset("assets/image/default_1.png",
fit: BoxFit.cover);
},
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
width: 66,
height: 66,
fit: BoxFit.cover,

20
lib/order/exchange_order_page.dart

@ -262,12 +262,20 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Image.network(
widget.arguments["image"],
fit: BoxFit.cover,
width: 80,
height: 80,
),
if (widget.arguments["image"] != null)
Image.network(
widget.arguments["image"],
fit: BoxFit.cover,
width: 80,
height: 80,
)
else
Image.asset(
"assets/image/default_1.png",
fit: BoxFit.cover,
width: 80,
height: 80,
),
Expanded(
child: Container(
height: 80.h,

20
lib/order/logistics_information_page.dart

@ -165,12 +165,20 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
Stack(
alignment: Alignment.bottomCenter,
children: [
Image.network(
widget.arguments["skuImg"] ?? "assets/image/default_1.png",
width: 95.w,
height: 95.h,
fit: BoxFit.cover,
),
if (widget.arguments["skuImg"] != null)
Image.network(
widget.arguments["skuImg"],
width: 95.w,
height: 95.h,
fit: BoxFit.cover,
)
else
Image.asset(
"assets/image/default_1.png",
width: 95.w,
height: 95.h,
fit: BoxFit.cover,
),
Container(
padding: EdgeInsets.only(
left: 32.w, right: 32.w, top: 5.h, bottom: 5.h),

7
lib/order/order_detail_page.dart

@ -883,8 +883,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
if (orderInfo == null) return [];
List<Widget> widgets = [];
if (orderInfo.productList != null) {
widgets
.addAll(orderInfo.productList.map((e) => commodityItem(e)).toList());
widgets.addAll(orderInfo.productList.map((e) => commodityItem(e)).toList());
}
widgets.add(SizedBox(height: 20.h));
@ -904,7 +903,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
//
widgets.add(discountItem(
Color(0xFF32A060),
"优惠券",
S.of(context).youhuiquan,
orderInfo.orderDetail.couponDTO.name,
orderInfo.orderDetail.couponDTO.money));
}
@ -1110,7 +1109,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
children: [
MImage(
productList.skuImg,
width: 44,
width: 44.w,
height: 44,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",

4
lib/order/order_history_page.dart

@ -503,8 +503,8 @@ class _OrderHistoryList extends State<OrderHistoryList>
children: [
MImage(
e.skuImg,
width: 75,
height: 75,
width: 75.w,
height: 75.w,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",

395
lib/retrofit/retrofit_api.g.dart

@ -9,10 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
// baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
baseUrl ??= 'http://192.168.10.236:8766/app/';
baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
}
final Dio _dio;
@ -20,7 +17,7 @@ class _ApiService implements ApiService {
String baseUrl;
@override
Future<BaseData> upload(data, folderId) async {
Future<BaseData<UploadResult>> upload(data, folderId) async {
ArgumentError.checkNotNull(data, 'data');
ArgumentError.checkNotNull(folderId, 'folderId');
const _extra = <String, dynamic>{};
@ -41,7 +38,10 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<UploadResult>.fromJson(
_result.data,
(json) => UploadResult.fromJson(json),
);
return value;
}
@ -69,7 +69,7 @@ class _ApiService implements ApiService {
}
@override
Future<BaseData> memberLogin(param) async {
Future<BaseData<dynamic>> memberLogin(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -84,12 +84,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> sendVerify(mobile) async {
Future<BaseData<dynamic>> sendVerify(mobile) async {
ArgumentError.checkNotNull(mobile, 'mobile');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -103,12 +106,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> creditGoods(param) async {
Future<BaseData<PageInfo<Goods>>> creditGoods(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -123,12 +129,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<Goods>>.fromJson(
_result.data,
(json) => PageInfo<Goods>.fromJson(
json,
(json) => Goods.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> goodsCategory(param) async {
Future<BaseData<PageInfo<GoodsCategory>>> goodsCategory(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -143,12 +155,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<GoodsCategory>>.fromJson(
_result.data,
(json) => PageInfo<GoodsCategory>.fromJson(
json,
(json) => GoodsCategory.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> creditGoodsById(id) async {
Future<BaseData<Goods>> creditGoodsById(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -161,12 +179,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<Goods>.fromJson(
_result.data,
(json) => Goods.fromJson(json),
);
return value;
}
@override
Future<BaseData> queryInfo() async {
Future<BaseData<UserInfo>> queryInfo() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
@ -178,12 +199,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<UserInfo>.fromJson(
_result.data,
(json) => UserInfo.fromJson(json),
);
return value;
}
@override
Future<BaseData> editInfo(param) async {
Future<BaseData<dynamic>> editInfo(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -198,12 +222,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> signInInfo() async {
Future<BaseData<SignInfo>> signInInfo() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
@ -216,12 +243,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<SignInfo>.fromJson(
_result.data,
(json) => SignInfo.fromJson(json),
);
return value;
}
@override
Future<BaseData> signIn() async {
Future<BaseData<dynamic>> signIn() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
@ -233,12 +263,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> recharge(param) async {
Future<BaseData<WxPay>> recharge(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -252,12 +285,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<WxPay>.fromJson(
_result.data,
(json) => WxPay.fromJson(json),
);
return value;
}
@override
Future<BaseData> receiveCoupon(couponId) async {
Future<BaseData<dynamic>> receiveCoupon(couponId) async {
ArgumentError.checkNotNull(couponId, 'couponId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -271,12 +307,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> creditOrderList(param) async {
Future<BaseData<PageInfo<ExchangeOrder>>> creditOrderList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -291,12 +330,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<ExchangeOrder>>.fromJson(
_result.data,
(json) => PageInfo<ExchangeOrder>.fromJson(
json,
(json) => ExchangeOrder.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> creditOrder(param) async {
Future<BaseData<dynamic>> creditOrder(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -311,12 +356,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> addAddress(param) async {
Future<BaseData<dynamic>> addAddress(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -330,12 +378,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> deleteAddress(param) async {
Future<BaseData<dynamic>> deleteAddress(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -349,12 +400,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> queryAddress(id) async {
Future<BaseData<dynamic>> queryAddress(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -368,12 +422,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> queryMemberAddress() async {
Future<BaseData<List<Address>>> queryMemberAddress() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
@ -386,12 +443,16 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<List<Address>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<Address>((i) => Address.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData> updateAddress(param) async {
Future<BaseData<dynamic>> updateAddress(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -405,12 +466,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> queryCoupon(param) async {
Future<BaseData<PageInfo<Coupon>>> queryCoupon(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -425,12 +489,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<Coupon>>.fromJson(
_result.data,
(json) => PageInfo<Coupon>.fromJson(
json,
(json) => Coupon.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> queryCard(param) async {
Future<BaseData<PageInfo<Coupon>>> queryCard(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -445,12 +515,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<Coupon>>.fromJson(
_result.data,
(json) => PageInfo<Coupon>.fromJson(
json,
(json) => Coupon.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> queryStore(param) async {
Future<BaseData<List<Store>>> queryStore(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -464,12 +540,16 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<List<Store>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<Store>((i) => Store.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData> informationList(param) async {
Future<BaseData<PageInfo<Activity>>> informationList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -484,12 +564,39 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<Activity>>.fromJson(
_result.data,
(json) => PageInfo<Activity>.fromJson(
json,
(json) => Activity.fromJson(json),
),
);
return value;
}
@override
Future<BaseData<Article>> informationInfo(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/information/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<Article>.fromJson(
_result.data,
(json) => Article.fromJson(json),
);
return value;
}
@override
Future<BaseData> informationInfo(id) async {
Future<BaseData<Activity>> activityInfo(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -502,12 +609,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<Activity>.fromJson(
_result.data,
(json) => Activity.fromJson(json),
);
return value;
}
@override
Future<BaseData> creditOrderReceive(id) async {
Future<BaseData<dynamic>> creditOrderReceive(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -521,12 +631,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> queryHome() async {
Future<BaseData<BrandData>> queryHome() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
@ -538,12 +651,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<BrandData>.fromJson(
_result.data,
(json) => BrandData.fromJson(json),
);
return value;
}
@override
Future<BaseData> queryStoreInfo(id) async {
Future<BaseData<dynamic>> queryStoreInfo(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -556,12 +672,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> queryArticle(param) async {
Future<BaseData<PageInfo<Article>>> queryArticle(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -576,12 +695,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<Article>>.fromJson(
_result.data,
(json) => PageInfo<Article>.fromJson(
json,
(json) => Article.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> queryBanner(param) async {
Future<BaseData<PageInfo<BannerData>>> queryBanner(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -595,12 +720,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<BannerData>>.fromJson(
_result.data,
(json) => PageInfo<BannerData>.fromJson(
json,
(json) => BannerData.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> queryHomeBrand() async {
Future<BaseData<dynamic>> queryHomeBrand() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
@ -612,12 +743,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> minLogin(storeId) async {
Future<BaseData<dynamic>> minLogin(storeId) async {
ArgumentError.checkNotNull(storeId, 'storeId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -631,12 +765,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> queryBillInfo(param) async {
Future<BaseData<PageInfo<UserBill>>> queryBillInfo(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -650,12 +787,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<UserBill>>.fromJson(
_result.data,
(json) => PageInfo<UserBill>.fromJson(
json,
(json) => UserBill.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> rankList() async {
Future<BaseData<List<Rank>>> rankList() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
@ -667,12 +810,16 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<List<Rank>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<Rank>((i) => Rank.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData> orderList(param) async {
Future<BaseData<PageInfo<OrderInfo>>> orderList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -686,12 +833,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<OrderInfo>>.fromJson(
_result.data,
(json) => PageInfo<OrderInfo>.fromJson(
json,
(json) => OrderInfo.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> orderDetail(id) async {
Future<BaseData<OrderInfo>> orderDetail(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -705,12 +858,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<OrderInfo>.fromJson(
_result.data,
(json) => OrderInfo.fromJson(json),
);
return value;
}
@override
Future<BaseData> continuePay(param) async {
Future<BaseData<dynamic>> continuePay(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -725,12 +881,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> receiveToCard(id) async {
Future<BaseData<dynamic>> receiveToCard(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -744,12 +903,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> vipList(param) async {
Future<BaseData<List<VipCard>>> vipList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -763,12 +925,16 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<List<VipCard>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<VipCard>((i) => VipCard.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData> vipDetail(param) async {
Future<BaseData<VipCard>> vipDetail(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -783,12 +949,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<VipCard>.fromJson(
_result.data,
(json) => VipCard.fromJson(json),
);
return value;
}
@override
Future<BaseData> msgList(param) async {
Future<BaseData<PageInfo<Message>>> msgList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -802,12 +971,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<Message>>.fromJson(
_result.data,
(json) => PageInfo<Message>.fromJson(
json,
(json) => Message.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> queryMsg(id) async {
Future<BaseData<dynamic>> queryMsg(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -820,12 +995,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> informationLikes(id) async {
Future<BaseData<dynamic>> informationLikes(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -839,12 +1017,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> memberComment(param) async {
Future<BaseData<dynamic>> memberComment(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -858,12 +1039,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> memberCommentList(param) async {
Future<BaseData<PageInfo<MemberCommentList>>> memberCommentList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -878,12 +1062,18 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<PageInfo<MemberCommentList>>.fromJson(
_result.data,
(json) => PageInfo<MemberCommentList>.fromJson(
json,
(json) => MemberCommentList.fromJson(json),
),
);
return value;
}
@override
Future<BaseData> commentLike(id) async {
Future<BaseData<dynamic>> commentLike(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -897,12 +1087,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> delComment(id) async {
Future<BaseData<dynamic>> delComment(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -916,12 +1109,15 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> shippingTrace(shipperCode, logisticCode) async {
Future<BaseData<Logistics>> shippingTrace(shipperCode, logisticCode) async {
ArgumentError.checkNotNull(shipperCode, 'shipperCode');
ArgumentError.checkNotNull(logisticCode, 'logisticCode');
const _extra = <String, dynamic>{};
@ -936,7 +1132,10 @@ class _ApiService implements ApiService {
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
final value = BaseData<Logistics>.fromJson(
_result.data,
(json) => Logistics.fromJson(json),
);
return value;
}
}

24
lib/union/store_details_page.dart

@ -443,11 +443,12 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
return EmptyContentElement();
}
return audioWidget(
attributes['controls'] != null,
attributes['loop'] != null,
attributes['autoplay'] != null,
sources,
context.style.width ?? 300.w);
attributes['controls'] != null,
attributes['loop'] != null,
attributes['autoplay'] != null,
sources,
context.style.width ?? 300.w,
);
},
},
),
@ -525,7 +526,7 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
height: 80.h,
alignment: Alignment.center,
child: Text(
"暂无评论,快来评论吧",
S.of(context).zanwupinglun,
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.bold,
@ -871,7 +872,9 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
padding: EdgeInsets.all(10),
circleSize: 16,
circleColor: CircleColor(
start: Color(0xff00ddff), end: Color(0xff0099cc)),
start: Color(0xff00ddff),
end: Color(0xff0099cc),
),
bubblesColor: BubblesColor(
dotPrimaryColor: Color(0xff33b5e5),
dotSecondaryColor: Color(0xff0099cc),
@ -974,14 +977,17 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
)
),
],
),
margin: EdgeInsets.only(top: 30.h),
alignment: Alignment.center,
child: Text(
S.of(context).yixiansquanbupinglun,
style: TextStyle(fontSize: 14.sp, color: Color(0xff353535)),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
),
),
),
],

2
lib/union/union_details_page.dart

@ -582,7 +582,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
.bizType ==
5)
? S.of(context).duihuanquan
: "${storeInfo.couponVOList[position].discountPercent / 10}",
: "${storeInfo.couponVOList[position].discountPercent ~/ 10}",
style: TextStyle(
fontSize: 36.sp,
color: Color(0xFFFF7A1A),

6
lib/view_widget/custom_image.dart

@ -36,6 +36,12 @@ class MImage extends StatelessWidget {
"x${constraints.constrainHeight() * scaleIndex}/format/webp/blur/1x0/quality/75";
}
print("imageUrl: $imageUrl");
if (imageUrl == null || imageUrl == "") {
return Image.asset(
"assets/image/default_2_1.png",
fit: fit,
);
}
return CachedNetworkImage(
imageUrl: imageUrl,
cacheManager: DefaultCacheManager(),

23
lib/view_widget/round_button.dart

@ -33,18 +33,19 @@ class RoundButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
child: Container(
padding: padding,
width: width,
height: height,
alignment: Alignment.center,
decoration: BoxDecoration(
color: backgroup,
borderRadius: BorderRadius.circular(radius),
),
child: buildText(),
child: Container(
padding: padding,
width: width,
height: height,
alignment: Alignment.center,
decoration: BoxDecoration(
color: backgroup,
borderRadius: BorderRadius.circular(radius),
),
onTap: this.callback);
child: buildText(),
),
onTap: this.callback,
);
}
Widget buildText() {

Loading…
Cancel
Save