Browse Source

Merge branches 'dev' and 'master' of https://git.lotus-wallet.com/fmk/huixiang_app

 Conflicts:
	assets/image/3x/icon_comment.png
	lib/retrofit/retrofit_api.g.dart
master
fmk 4 years ago
parent
commit
dd580dbf5c
  1. BIN
      assets/image/3x/icon_comment.png
  2. 29
      lib/home/guide_page.dart
  3. 10
      lib/home/points_mall_page.dart
  4. 4
      lib/mine/vip_card_page.dart
  5. 27
      lib/mine/vip_detail_page.dart
  6. 4
      lib/order/exchange_history_page.dart
  7. 51
      lib/order/exchange_order_detail_page.dart
  8. 62
      lib/order/exchange_order_page.dart
  9. 2
      lib/order/exchange_order_success_page.dart
  10. 7
      lib/order/order_detail_page.dart
  11. 8
      lib/order/order_history_page.dart
  12. 21
      lib/order/store_selector_page.dart
  13. 4
      lib/order/write_off_page.dart
  14. 7
      lib/order/write_off_success_page.dart
  15. 2
      lib/retrofit/retrofit_api.dart
  16. 7
      lib/setting/about_page.dart
  17. 2
      lib/setting/permission_setting_page.dart
  18. 1
      lib/setting/setting_page.dart
  19. 19
      lib/setting/treaty_page.dart
  20. 9
      lib/union/location_map_page.dart
  21. 22
      lib/union/store_details_page.dart
  22. 15
      lib/union/union_details_page.dart
  23. 19
      lib/union/union_page.dart

BIN
assets/image/3x/icon_comment.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

29
lib/home/guide_page.dart

@ -59,7 +59,8 @@ class _GuidePage extends State<GuidePage> {
style: TextStyle(
fontSize: 24.sp,
fontWeight: FontWeight.bold,
color: Color(0XFF32A060),),
color: Color(0XFF32A060),
),
),
),
SizedBox(
@ -71,10 +72,11 @@ class _GuidePage extends State<GuidePage> {
S.of(context).yindao1,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16.sp,
height: 1.5.h,
fontWeight: FontWeight.w500,
color: Color(0XFF727272),),
fontSize: 16.sp,
height: 1.5.h,
fontWeight: FontWeight.w500,
color: Color(0XFF727272),
),
),
),
],
@ -87,7 +89,8 @@ class _GuidePage extends State<GuidePage> {
children: [
Text(
"",
style: TextStyle(fontSize: 8.sp, color: Colors.black),
style:
TextStyle(fontSize: 8.sp, color: Colors.black),
),
SizedBox(
width: 10.w,
@ -142,9 +145,10 @@ class _GuidePage extends State<GuidePage> {
S.of(context).yindaoye2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
fontWeight: FontWeight.bold,
color: Color(0XFF32A060),),
fontSize: 24.sp,
fontWeight: FontWeight.bold,
color: Color(0XFF32A060),
),
),
),
SizedBox(
@ -228,9 +232,10 @@ class _GuidePage extends State<GuidePage> {
S.of(context).yindaoye3,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
fontWeight: FontWeight.bold,
color: Color(0XFF32A060),),
fontSize: 24.sp,
fontWeight: FontWeight.bold,
color: Color(0XFF32A060),
),
),
),
SizedBox(

10
lib/home/points_mall_page.dart

@ -117,7 +117,8 @@ class _PointsMallPage extends State<PointsMallPage>
}
creditGoods(categoryId) async {
BaseData<PageInfo<GoodsCategory>> dataCategory = await client.goodsCategory({
BaseData<PageInfo<GoodsCategory>> dataCategory =
await client.goodsCategory({
"current": 1,
"map": {},
"model": {"pageNum": 1, "pageSize": 20, "searchKey": ""},
@ -143,7 +144,8 @@ class _PointsMallPage extends State<PointsMallPage>
"pageSize": 10,
"state": 1
};
BaseData<PageInfo<Goods>> baseData = await client.creditGoods(param).catchError((onError) {
BaseData<PageInfo<Goods>> baseData =
await client.creditGoods(param).catchError((onError) {
_refreshController.loadFailed();
_refreshController.refreshFailed();
});
@ -442,8 +444,8 @@ class _PointsMallPage extends State<PointsMallPage>
borderRadius: BorderRadius.only(topRight: Radius.circular(4)),
child: Image.asset(
"assets/image/icon_hot_right_top.png",
width: 36.w,
height: 36.h,
width: 36,
height: 36,
fit: BoxFit.cover,
),
),

4
lib/mine/vip_card_page.dart

@ -144,8 +144,8 @@ class _VipCardPage extends State<VipCardPage> {
children: [
MImage(
(vipCard?.storeList?.length ?? 0) > 0 ? vipCard.storeList[0].logo : "",
width: 54.w,
height: 54.h,
width: 54,
height: 54,
fit: BoxFit.cover,
radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.png",

27
lib/mine/vip_detail_page.dart

@ -147,7 +147,8 @@ class _VipDetailPage extends State<VipDetailPage> {
},
padding: EdgeInsets.symmetric(vertical: 1),
itemCount: (vipCard != null && vipCard.storeList != null)
? vipCard.storeList.length : 0,
? vipCard.storeList.length
: 0,
),
),
),
@ -192,8 +193,8 @@ class _VipDetailPage extends State<VipDetailPage> {
(vipCard?.storeList?.length ?? 0) > 0
? vipCard.storeList[0].logo
: "",
width: 40.w,
height: 40.h,
width: 40,
height: 40,
radius: BorderRadius.circular(4),
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
@ -486,8 +487,11 @@ class _VipDetailPage extends State<VipDetailPage> {
),
Text(
(store.distance ?? 0) > 1000
? S.of(context).gongli(((store.distance ?? 0) / 1000 * 100).toInt() / 100.0)
: S.of(context).mi(((store.distance ?? 0) * 100).toInt() / 100.0),
? S.of(context).gongli(
((store.distance ?? 0) / 1000 * 100).toInt() / 100.0)
: S
.of(context)
.mi(((store.distance ?? 0) * 100).toInt() / 100.0),
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w400,
@ -505,8 +509,10 @@ class _VipDetailPage extends State<VipDetailPage> {
String totalPrice(orderInfo) {
if (orderInfo == null) return "";
double totalPrice = (double.tryParse(orderInfo.orderSum) + double.tryParse(orderInfo.postFee));
if (orderInfo.orderDetail != null && orderInfo.orderDetail.couponDTO != null) {
double totalPrice = (double.tryParse(orderInfo.orderSum) +
double.tryParse(orderInfo.postFee));
if (orderInfo.orderDetail != null &&
orderInfo.orderDetail.couponDTO != null) {
totalPrice -= double.tryParse(orderInfo.orderDetail.couponDTO.money);
}
return "$totalPrice";
@ -517,7 +523,9 @@ class _VipDetailPage extends State<VipDetailPage> {
if (products.length > 3) {
products = products.sublist(0, 3);
}
return products.map((e) => Container(
return products
.map(
(e) => Container(
margin: EdgeInsets.symmetric(horizontal: 2.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
@ -551,6 +559,7 @@ class _VipDetailPage extends State<VipDetailPage> {
],
),
),
).toList();
)
.toList();
}
}

4
lib/order/exchange_history_page.dart

@ -332,8 +332,8 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
return Image.asset("assets/image/default_1.png",
fit: BoxFit.cover);
},
width: 66.w,
height: 66.h,
width: 66,
height: 66,
fit: BoxFit.cover,
),
SizedBox(

51
lib/order/exchange_order_detail_page.dart

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/separator.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ExchangeOrderDetailPage extends StatefulWidget {
@override
@ -28,7 +29,7 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
buildCommodity(),
buildOrderInfo(),
Container(
height: 42,
height: 42.h,
),
],
),
@ -65,7 +66,7 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
child: Text(
"前进麦味·天然烘焙(凯德1818店)",
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 14, color: Color(0xFFC4C4C4)),
style: TextStyle(fontSize: 14.sp, color: Color(0xFFC4C4C4)),
)),
Icon(
Icons.keyboard_arrow_right,
@ -79,7 +80,7 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
child: Text(
"武昌区中国铁建凯德1818蓝调步行街中北路109附33门牌号05",
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 10, color: Color(0xFFA29E9E)),
style: TextStyle(fontSize: 10.sp, color: Color(0xFFA29E9E)),
),
)
],
@ -128,12 +129,12 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
discountItem(Color(0xFFFF7A1A)),
Container(
margin: EdgeInsets.only(
top: 24,
bottom: 4,
top: 24.h,
bottom: 4.h,
),
child: MySeparator(
height: 1,
width: 5,
height: 1.h,
width: 5.w,
color: Colors.grey,
),
),
@ -147,8 +148,8 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
child: Stack(
children: [
Container(
width: 94,
height: 33,
width: 94.w,
height: 33.h,
margin: EdgeInsets.only(left: 12),
padding: EdgeInsets.only(left: 16),
decoration: BoxDecoration(
@ -172,7 +173,7 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
S.of(context).qujianma,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12,
fontSize: 12.sp,
color: Colors.black),
),
Icon(
@ -243,13 +244,13 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
leftText,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12,
fontSize: 12.sp,
color: Color(0xFF727272)),
),
Text(
rightText,
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: Color(0xFF353535),
),
)
@ -275,7 +276,7 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
flex: 1,
child: Container(
margin: EdgeInsets.only(left: 16, right: 16),
height: 44,
height: 44.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
@ -288,13 +289,13 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
"海盐牛角",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14,
fontSize: 14.sp,
color: Color(0xFF353535)),
),
Text(
"x2",
style:
TextStyle(fontSize: 12, color: Color(0xFF727272)),
style: TextStyle(
fontSize: 12.sp, color: Color(0xFF727272)),
),
],
),
@ -308,13 +309,13 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
S.of(context).ge(200),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12, color: Color(0xFFA29E9E)),
fontSize: 12.sp, color: Color(0xFFA29E9E)),
)),
Text(
S.of(context).yuan_(8),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12,
fontSize: 12.sp,
color: Color(0xFF4C4C4C)),
)
],
@ -341,19 +342,19 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
child: Text(
S.of(context).peisongfei,
style: TextStyle(
fontSize: 10,
fontSize: 10.sp,
color: color,
),
),
),
SizedBox(
width: 27,
width: 27.w,
),
Expanded(
child: Text(
S.of(context).huodongjianmianpeisongfei(3),
style: TextStyle(
fontSize: 10,
fontSize: 10.sp,
color: Color(0xFFA29E9E),
),
),
@ -362,7 +363,7 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
Text(
S.of(context).yuan_(-3.0),
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: color,
),
),
@ -383,7 +384,7 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
child: Text(
S.of(context).huodongjianmianpeisongfei(3),
style: TextStyle(
fontSize: 10,
fontSize: 10.sp,
color: Color(0xFFA29E9E),
),
),
@ -393,7 +394,7 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
child: Text(
S.of(context).jiesuanjine,
style: TextStyle(
fontSize: 10,
fontSize: 10.sp,
color: Color(0xFF353535),
),
),
@ -402,7 +403,7 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
"20.4",
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 30,
fontSize: 30.sp,
color: Color(0xFF32A060),
),
)

62
lib/order/exchange_order_page.dart

@ -12,7 +12,6 @@ import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ExchangeOrderPage extends StatefulWidget {
final Map<String, dynamic> arguments;
@ -33,7 +32,8 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
super.initState();
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(), context: context, token: value.getString("token")),
apiService = ApiService(Dio(),
context: context, token: value.getString("token")),
points =
UserInfo.fromJson(jsonDecode(value.getString('user'))).points,
});
@ -92,19 +92,19 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
],
),
SizedBox(
height: 18,
height: 18.h,
),
Row(
children: [
Text(
S.of(context).lingqufangshi,
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
SizedBox(
width: 12,
width: 12.w,
),
Text(
widget.arguments["useTyped"] == 1
@ -113,7 +113,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
? S.of(context).peisong
: S.of(context).xianshangfafang,
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
@ -121,7 +121,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
),
Visibility(
child: SizedBox(
height: 13,
height: 13.h,
),
visible: widget.arguments["useTyped"] != 3,
),
@ -131,12 +131,12 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
Text(
S.of(context).zitidizhi,
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
SizedBox(
width: 12,
width: 12.w,
),
Expanded(
child: GestureDetector(
@ -162,7 +162,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
: S.of(context).xuni,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
color: Color(0xFF32A060),
),
),
@ -183,7 +183,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
visible: widget.arguments["useTyped"] != 3,
),
SizedBox(
height: 12,
height: 12.h,
),
Row(
children: [
@ -192,13 +192,13 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
child: Text(
S.of(context).zitishijian,
style: TextStyle(
fontSize: 14, color: Color(0xFF353535)),
fontSize: 14.sp, color: Color(0xFF353535)),
),
),
Visibility(
visible: widget.arguments["useTyped"] != 3,
child: SizedBox(
width: 12,
width: 12.w,
),
),
Text(
@ -208,7 +208,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
? S.of(context).duihuanhoufahuo
: S.of(context).feishiwushangpin,
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
color: widget.arguments["useTyped"] == 3
? Color(0xFF32A060)
: Color(0xFF353535)),
@ -265,8 +265,8 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
Image.network(
widget.arguments["image"],
fit: BoxFit.cover,
width: 80.w,
height: 80.h,
width: 80,
height: 80,
),
Expanded(
child: Container(
@ -279,17 +279,18 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
Text(
widget.arguments["name"],
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color: Color(0xFF353535)),
),
SizedBox(
height: 4,
height: 4.h,
),
Text(
"x1",
style: TextStyle(
fontSize: 12, color: Color(0xFF727272)),
fontSize: 12.sp,
color: Color(0xFF727272)),
),
],
),
@ -299,7 +300,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
],
),
SizedBox(
height: 12,
height: 12.h,
),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -331,16 +332,16 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
children: [
Text(
"实付积分",
style:
TextStyle(fontSize: 14, color: Color(0xFF353535)),
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF353535)),
),
SizedBox(
width: 12,
width: 12.w,
),
Text(
S.of(context).jifen_(widget.arguments["price"]),
style:
TextStyle(fontSize: 12, color: Color(0xFF32A060)),
style: TextStyle(
fontSize: 12.sp, color: Color(0xFF32A060)),
),
],
),
@ -366,7 +367,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
child: Text(
S.of(context).querenduihuan,
style: TextStyle(
fontSize: 16,
fontSize: 16.sp,
color: MaterialStateColor.resolveWith((states) =>
storeIsSelected ? Colors.white : Color(0xFFA0A0A0)),
fontWeight: FontWeight.bold),
@ -420,9 +421,12 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
if (widget.arguments["useTyped"] == 2) "userAddressId": userAddressId,
});
if (baseDate.isSuccess) {
await Navigator.of(context).pushNamed(
'/router/exchange_order_success_page',
arguments: {"price": widget.arguments["price"], "points": points, "id": baseDate.data});
await Navigator.of(context)
.pushNamed('/router/exchange_order_success_page', arguments: {
"price": widget.arguments["price"],
"points": points,
"id": baseDate.data
});
points =
"${int.tryParse(points) - int.tryParse(widget.arguments["price"])}";
Navigator.of(context).pop();

2
lib/order/exchange_order_success_page.dart

@ -108,7 +108,7 @@ class _ExchangeOrderSuccessPage extends State<ExchangeOrderSuccessPage> {
flex: 1,
),
Container(
width: 2,
width: 2.w,
height: 34.h,
color: Color(0xFFABABAB),
margin: EdgeInsets.only(top: 18.h, bottom: 7.h),

7
lib/order/order_detail_page.dart

@ -55,7 +55,8 @@ class _OrderDetailPage extends State<OrderDetailPage> {
// String storeType = "NORMALSTORE"; //NORMALSTORE FASTSTORE RETAILSTORE
queryDetails() async {
BaseData<OrderInfo> baseData = await apiService.orderDetail(widget.arguments["id"]);
BaseData<OrderInfo> baseData =
await apiService.orderDetail(widget.arguments["id"]);
if (baseData != null && baseData.isSuccess) {
orderInfo = baseData.data;
payStatus = orderInfo.payStatus;
@ -1109,8 +1110,8 @@ class _OrderDetailPage extends State<OrderDetailPage> {
children: [
MImage(
productList.skuImg,
width: 44.w,
height: 44.w,
width: 44,
height: 44,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",

8
lib/order/order_history_page.dart

@ -330,8 +330,8 @@ class _OrderHistoryList extends State<OrderHistoryList>
padding: EdgeInsets.all(22.w),
child: Image.asset(
"assets/image/icon_order_more.png",
width: 24.w,
height: 24.h,
width: 24,
height: 24,
),
)
],
@ -503,8 +503,8 @@ class _OrderHistoryList extends State<OrderHistoryList>
children: [
MImage(
e.skuImg,
width: 75.w,
height: 75.w,
width: 75,
height: 75,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",

21
lib/order/store_selector_page.dart

@ -13,7 +13,6 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/store.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/loading_view.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/request_permission.dart';
import 'package:permission_handler/permission_handler.dart';
@ -62,10 +61,11 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
latLng = BMFCoordinate(event["latitude"], event["longitude"]);
}
BMFCalculateUtils.coordConvert(
coordinate: latLng,
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL).then((value) {
this.latLng = value;
coordinate: latLng,
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL)
.then((value) {
this.latLng = value;
saveLatLng(
value, event["province"], event["city"], event["district"]);
queryStore("${value.latitude}", "${value.longitude}",
@ -119,7 +119,9 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
if (await Permission.location.isPermanentlyDenied) {
requestDialog();
} else if (await Permission.location.isGranted) {
SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai, animationDurationTemp: Duration(seconds: 1));
SmartDialog.showLoading(
msg: S.of(context).zhengzaijiazai,
animationDurationTemp: Duration(seconds: 1));
aMapFlutterLocation.startLocation();
Future.delayed(Duration(seconds: 6), () {
SmartDialog.dismiss();
@ -145,7 +147,7 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
S.of(context).nindingweigongnengweikaiqi,
S.of(context).weilexiangnintuijianfujindemendianxinxi,
S.of(context).dakaidingwei,
(result) async {
(result) async {
if (result) {
final AndroidIntent intent = AndroidIntent(
action: 'action_location_source_settings',
@ -169,7 +171,7 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
S.of(context).nindingweiquanxianweiyunxu,
S.of(context).weilexiangnintuijianfujindemendianxinxi,
S.of(context).kaiqiquanxian,
(result) async {
(result) async {
if (result) {
await openAppSettings();
if (await Permission.location.isGranted) {
@ -256,7 +258,8 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
InkWell(
onTap: () {
if (groupValue == null) {
SmartDialog.showToast(S.of(context).qingxuanzeyigemendian, alignment: Alignment.center);
SmartDialog.showToast(S.of(context).qingxuanzeyigemendian,
alignment: Alignment.center);
return;
}
Store store = storeList[groupValue];

4
lib/order/write_off_page.dart

@ -154,8 +154,8 @@ class _WriteOffPage extends State<WriteOffPage> {
),
Container(
child: MySeparator(
width: 5,
height: 1,
width: 5.w,
height: 1.h,
color: Color(0xFFA29E9E),
),
margin: EdgeInsets.only(left: 20.w, right: 20.w),

7
lib/order/write_off_success_page.dart

@ -53,9 +53,10 @@ class _WriteOffSuccessPage extends State<WriteOffSuccessPage> {
Text(
S.of(context).dangqianshangpinduihuanhexiaoma,
style: TextStyle(
color: Color(0xFF727272),
fontSize: 12.sp,
fontWeight: FontWeight.bold,),
color: Color(0xFF727272),
fontSize: 12.sp,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 40.h,

2
lib/retrofit/retrofit_api.dart

@ -43,8 +43,6 @@ 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 = "http://192.168.10.236:8766/app/";
// const baseUrl = "http://192.168.10.236:8766/app/";
///

7
lib/setting/about_page.dart

@ -52,8 +52,8 @@ class _AboutPage extends State<AboutPage> {
children: [
Image.asset(
"assets/image/icon_about_logo.png",
width: 130.w,
height: 130.h,
width: 130,
height: 130,
),
Padding(
padding: EdgeInsets.only(top: 32.h, bottom: 5.h),
@ -94,7 +94,8 @@ class _AboutPage extends State<AboutPage> {
onTap: () {
Bridge.toAppStore().then((value) {
if (Platform.isAndroid && value == "0") {
SmartDialog.showToast("手机没有安装应用市场app", alignment: Alignment.center);
SmartDialog.showToast("手机没有安装应用市场app",
alignment: Alignment.center);
}
});
},

2
lib/setting/permission_setting_page.dart

@ -190,7 +190,7 @@ class _PermissionSettingPage extends State<PermissionSettingPage> {
fontWeight: FontWeight.bold),
),
SizedBox(
width: 8,
width: 8.w,
),
Image.asset(
icon,

1
lib/setting/setting_page.dart

@ -3,7 +3,6 @@ import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/login/login_page.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/flutter_utils.dart';

19
lib/setting/treaty_page.dart

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:webview_flutter/webview_flutter.dart';
// import 'package:webview_flutter/src/webview_cupertino.dart';
@ -56,7 +57,7 @@ class _TreatyPage extends State<TreatyPage> {
child: Text(
"用戶註冊及使用App隱私協議",
style: TextStyle(
fontSize: 18,
fontSize: 18.sp,
fontWeight: FontWeight.w600,
color: Color(0xff00A359),
),
@ -64,7 +65,7 @@ class _TreatyPage extends State<TreatyPage> {
),
),
SizedBox(
height: 32,
height: 32.h,
),
_textRich("    在此特別提醒您(用戶)在註冊成為用戶之前,請認真閱讀本《用戶註冊及使用App隱私協議》"
"(以下簡稱「協議」),確保您充分理解本協議中各條款。請您審慎閱讀並選擇接受或不接受本協議。除非您接受本協議所有條款,"
@ -78,7 +79,7 @@ class _TreatyPage extends State<TreatyPage> {
child: Text(
"一、賬號註冊",
style: TextStyle(
fontSize: 18,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
height: 1.2,
color: Color(0xff32A060)),
@ -95,7 +96,7 @@ class _TreatyPage extends State<TreatyPage> {
child: Text(
"二、用戶個人隱私信息保護",
style: TextStyle(
fontSize: 18,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
height: 1.2,
color: Color(0xff32A060)),
@ -115,7 +116,7 @@ class _TreatyPage extends State<TreatyPage> {
child: Text(
"三、用戶發佈內容規範",
style: TextStyle(
fontSize: 18,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
height: 1.2,
color: Color(0xff32A060)),
@ -140,7 +141,7 @@ class _TreatyPage extends State<TreatyPage> {
child: Text(
"四、使用規則",
style: TextStyle(
fontSize: 18,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
height: 1.2,
color: Color(0xff32A060)),
@ -162,7 +163,7 @@ class _TreatyPage extends State<TreatyPage> {
child: Text(
"五、其他",
style: TextStyle(
fontSize: 18,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
height: 1.2,
color: Color(0xff32A060)),
@ -174,7 +175,7 @@ class _TreatyPage extends State<TreatyPage> {
"\n    3、本協議的任何條款無論因何種原因無效或不具可執行性,其餘條款仍有效,對雙方具有約束力。\n    4、本協議最終解釋"
"權歸腳印所有,據知理知己(武漢)有限責任公司免責條款特此聲明:該應用註冊及隱私協議與知理知己(武漢)有限責任公司無關。政策认为合适的披露。"),
SizedBox(
height: 50,
height: 50.h,
),
],
),
@ -189,7 +190,7 @@ class _TreatyPage extends State<TreatyPage> {
child: Text(
text,
style: TextStyle(
fontSize: 16,
fontSize: 16.sp,
fontWeight: FontWeight.w400,
height: 1.7,
color: Colors.black),

9
lib/union/location_map_page.dart

@ -2,9 +2,6 @@ import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart';
import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/location.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
@ -22,7 +19,6 @@ class LocationMap extends StatefulWidget {
}
class _LocationMap extends State<LocationMap> {
@override
void initState() {
super.initState();
@ -31,7 +27,10 @@ class _LocationMap extends State<LocationMap> {
}
void startLocation() async {
Location.getInstance().aMapFlutterLocation.onResultCallback().listen((event) {
Location.getInstance()
.aMapFlutterLocation
.onResultCallback()
.listen((event) {
if (event != null &&
event["latitude"] != null &&
event["longitude"] != null) {

22
lib/union/store_details_page.dart

@ -100,9 +100,11 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
GlobalKey commentKey = GlobalKey();
ScrollController scrollController = ScrollController();
queryHtml() async { //activityInfo
queryHtml() async {
//activityInfo
if (widget.arguments["activityId"] != null) {
BaseData<Activity> baseData = await apiService.activityInfo(widget.arguments["activityId"]);
BaseData<Activity> baseData =
await apiService.activityInfo(widget.arguments["activityId"]);
if (baseData != null && baseData.isSuccess) {
setState(() {
activity = baseData.data;
@ -110,7 +112,8 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
}
}
if (widget.arguments["articleId"] != null) {
BaseData<Article> baseData = await apiService.informationInfo(widget.arguments["articleId"]);
BaseData<Article> baseData =
await apiService.informationInfo(widget.arguments["articleId"]);
if (baseData != null && baseData.isSuccess) {
setState(() {
article = baseData.data;
@ -183,7 +186,8 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
//
queryMemberCommentList() async {
BaseData<PageInfo<MemberCommentList>> baseData = await apiService.memberCommentList({
BaseData<PageInfo<MemberCommentList>> baseData =
await apiService.memberCommentList({
"pageNum": 1,
"pageSize": 100,
"relationalId":
@ -220,7 +224,8 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
return;
}
BaseData baseData = await apiService.commentLike(id).catchError((onError) {});
BaseData baseData =
await apiService.commentLike(id).catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
memberList.forEach((element) {
@ -742,7 +747,12 @@ class _StoreDetailsPage extends State<StoreDetailsPage>
if (commentKey.currentContext == null) return;
RenderBox firstRenderBox = commentKey.currentContext.findRenderObject();
Offset first = firstRenderBox.localToGlobal(Offset.zero);
scrollController.animateTo(first.dy + scrollController.offset - (kToolbarHeight + MediaQuery.of(context).padding.top), duration: Duration(milliseconds: 100), curve: Curves.easeIn);
scrollController.animateTo(
first.dy +
scrollController.offset -
(kToolbarHeight + MediaQuery.of(context).padding.top),
duration: Duration(milliseconds: 100),
curve: Curves.easeIn);
}
VideoPlayerController videoPlayerController;

15
lib/union/union_details_page.dart

@ -63,7 +63,8 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
List<Activity> activitys;
queryStoreInfo() async {
BaseData baseData = await apiService.queryStoreInfo(widget.arguments["id"])
BaseData baseData = await apiService
.queryStoreInfo(widget.arguments["id"])
.catchError((error) {
refreshController.refreshFailed();
});
@ -197,8 +198,10 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Expanded(
child: Text(
@ -252,8 +255,8 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
},
child: Image.asset(
"assets/image/icon_union_call.png",
width: 24.w,
height: 24.h,
width: 24,
height: 24,
),
),
],
@ -1054,7 +1057,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
downText,
style: TextStyle(
color: Colors.black,
fontSize: 16,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
),

19
lib/union/union_page.dart

@ -424,8 +424,8 @@ class _UnionPage extends State<UnionPage>
children: [
MImage(
store.logo,
width: 100.h,
height: 100.h,
width: 100,
height: 100,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
@ -518,8 +518,8 @@ class _UnionPage extends State<UnionPage>
padding: EdgeInsets.only(top: 1.h, left: 2, right: 2),
child: Image.asset(
"assets/image/icon_union_location_black.png",
width: 14.w,
height: 14.w,
width: 14,
height: 14,
),
),
Expanded(
@ -546,7 +546,8 @@ class _UnionPage extends State<UnionPage>
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconText(
(store.openStartTime == null && store.openEndTime == null)
(store.openStartTime == null &&
store.openEndTime == null)
? S.of(context).quantian
: "${store.openStartTime.substring(0, store.openStartTime.lastIndexOf(":"))} - ${store.openEndTime.substring(0, store.openEndTime.lastIndexOf(":"))}",
textStyle: TextStyle(
@ -559,8 +560,12 @@ class _UnionPage extends State<UnionPage>
Visibility(
child: Text(
(store.distance ?? 0) > 1000
? S.of(context).gongli(((store.distance ?? 0) / 1000 * 100) .toInt() / 100.0)
: S.of(context).mi(((store.distance ?? 0) * 100).toInt() / 100.0),
? S.of(context).gongli(
((store.distance ?? 0) / 1000 * 100).toInt() /
100.0)
: S.of(context).mi(
((store.distance ?? 0) * 100).toInt() /
100.0),
style: TextStyle(
color: Color(0xFF4C4C4C),
fontSize: 12,

Loading…
Cancel
Save