Browse Source

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

ff_new
fmk 3 years ago
parent
commit
2253f1f491
  1. BIN
      assets/image/2x/activity_q.png
  2. BIN
      assets/image/3x/activity_q.png
  3. BIN
      assets/image/activity_q.png
  4. 1
      lib/home/home_page.dart
  5. 2
      lib/main.dart
  6. 6
      lib/mine/mine_vip/legal_right_details.dart
  7. 22
      lib/mine/mine_vip/mine_vip_core.dart
  8. 87
      lib/mine/recharge_page.dart
  9. 5
      lib/order/order_detail_page.dart
  10. 4
      lib/order/order_view/order_info.dart
  11. 13
      lib/order/order_view/order_status.dart
  12. 10
      lib/retrofit/data/base_data.g.dart
  13. 8
      lib/retrofit/min_api.dart
  14. 2
      lib/retrofit/min_api.g.dart
  15. 10
      lib/retrofit/retrofit_api.dart
  16. 2
      lib/retrofit/retrofit_api.g.dart
  17. 16
      lib/settlement/settlement.dart
  18. 2
      pubspec.lock

BIN
assets/image/2x/activity_q.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 122 KiB

BIN
assets/image/3x/activity_q.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 302 KiB

BIN
assets/image/activity_q.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 40 KiB

1
lib/home/home_page.dart

@ -1,5 +1,4 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

2
lib/main.dart

@ -111,7 +111,7 @@ void main() async {
runApp(MyApp(locale, isFirst));
// FlutterBugly.postCatchedException((){
// });
// FlutterBugly.init(androidAppId: "204f207673",iOSAppId: "8bb92ba0f6");
// FlutterBugly.init(androidAppId: "85ed24e0ec",iOSAppId: "b8a258b0bc");
}
final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin();

6
lib/mine/mine_vip/legal_right_details.dart

@ -463,9 +463,9 @@ class _LegalRightDetails extends State<LegalRightDetails> {
children: [
MImage(
vipBenefitList?.icon ?? "",
width: 50,
height: 50,
// fit: BoxFit.cover,
width:51,
height: 51,
isCircle: true,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),

22
lib/mine/mine_vip/mine_vip_core.dart

@ -66,6 +66,17 @@ class _MineVipCore extends State<MineVipCore> {
queryBenefitList();
queryRuleDetails();
});
weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}");
if (event.errCode == 0) {
widget.arguments["rankLevel"] = ranks[checkIndex].level;
queryVipLevel();
showAlertDialog(ranks[checkIndex].rankName);
} else {
SmartDialog.showToast("支付失败", alignment: Alignment.center);
return;
}
});
}
queryVipLevel() async {
@ -134,17 +145,6 @@ class _MineVipCore extends State<MineVipCore> {
timeStamp: int.tryParse(wxPay.timeStamp),
sign: wxPay.sign,
);
weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}");
if (event.errCode == 0) {
widget.arguments["rankLevel"] = ranks[checkIndex].level;
queryVipLevel();
showAlertDialog(ranks[checkIndex].rankName);
} else {
SmartDialog.showToast("支付失败", alignment: Alignment.center);
return;
}
});
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}

87
lib/mine/recharge_page.dart

@ -44,6 +44,17 @@ class _RechargePage extends State<RechargePage> {
queryBenefitList();
queryRuleDetails();
});
weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}");
if(event.errCode == 0){
Navigator.of(context).pop();
SmartDialog.showToast("充值成功", alignment: Alignment.center);
}
else{
SmartDialog.showToast("充值失败", alignment: Alignment.center);
return;
}
});
}
@ -242,25 +253,27 @@ class _RechargePage extends State<RechargePage> {
),
Align(alignment: Alignment.bottomCenter,child:
Container(
height: 54.h,
height: 56.h,
color: Colors.white,
child: Row(
children: [
Spacer(),
Padding(padding: EdgeInsets.only(top: 7,right: 16),
Expanded(child:Container(
padding:EdgeInsets.only(top: 7.h,left:16),
child:Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
S.of(context).heji,
style: TextStyle(
fontSize: 12.sp,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
),
Text(
controller.text == "" ? "" :(double.parse(controller.text) * (discount/100)).toString(),
controller.text,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
@ -268,7 +281,56 @@ class _RechargePage extends State<RechargePage> {
),
),
],
)),
),
if(controller.text != "")
Text.rich(
TextSpan(
children: [
TextSpan(
text: "充值",
style: TextStyle(
fontSize:12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFADADAD),
),
),
TextSpan(
text:"¥${controller.text}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color:Color(0xff3541C9),
),
),
TextSpan(
text: "赠送",
style: TextStyle(
fontSize:12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFADADAD),
),
),
TextSpan(
text:"${((double.tryParse(controller.text)??0) - ((double.tryParse(controller.text)??0) * (discount/100))).toStringAsFixed(2)}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xff3541C9),
),
),TextSpan(
text: "",
style: TextStyle(
fontSize:12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFADADAD),
),
),
],
),
),
],
))
),
GestureDetector(
onTap: () {
recharge();
@ -350,17 +412,6 @@ class _RechargePage extends State<RechargePage> {
timeStamp: int.tryParse(wxPay.timeStamp),
sign: wxPay.sign,
);
weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}");
if(event.errCode == 0){
Navigator.of(context).pop();
SmartDialog.showToast("充值成功", alignment: Alignment.center);
}
else{
SmartDialog.showToast("充值失败", alignment: Alignment.center);
return;
}
});
}
else{
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);

5
lib/order/order_detail_page.dart

@ -1,7 +1,6 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:fluwx/fluwx.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/order/order_view/order_address.dart';
import 'package:huixiang/order/order_view/order_commodity.dart';
@ -10,12 +9,8 @@ import 'package:huixiang/order/order_view/order_pay_selected.dart';
import 'package:huixiang/order/order_view/order_status.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/retrofit/data/placeOrderFirst.dart';
import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/settlement/settlement_view/pay_method.dart';
import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:shared_preferences/shared_preferences.dart';

4
lib/order/order_view/order_info.dart

@ -45,8 +45,8 @@ class _OrderInfoView extends State<OrderInfoView> {
S.of(context).dingdanhao, widget.orderInfo != null ? widget.orderInfo.id : ""),
orderInfoItem(S.of(context).xiadanshijian,
widget.orderInfo != null ? widget.orderInfo.createTime : ""),
// orderInfoItem(S.of(context).peisongfangshi, orderInfo != null ? orderInfo.createTime : ""),
orderInfoItem(S.of(context).peisongfangshi,"美团配送"),
orderInfoItem(S.of(context).peisongfangshi,(widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送"),
// orderInfoItem(S.of(context).peisongfangshi,"美团配送"),
orderInfoItem(
S.of(context).beizhuxinxi,
widget.orderInfo != null

13
lib/order/order_view/order_status.dart

@ -166,16 +166,19 @@ class _OrderStatus extends State<OrderStatus> {
}
}
return [
AspectRatio(
Container(
alignment: Alignment.center,
child: AspectRatio(
aspectRatio: 1,
child: BorderText(
text: hour,
textColor: Colors.white,
fontSize: 21.sp,
fontSize:16.sp,
fontWeight: FontWeight.bold,
borderColor: Colors.white,
borderWidth: 1,
padding: EdgeInsets.all(2),
// padding: EdgeInsets.all(2),
),
),
),
SizedBox(
@ -196,11 +199,11 @@ class _OrderStatus extends State<OrderStatus> {
child: BorderText(
text: minute,
textColor: Colors.white,
fontSize: 21.sp,
fontSize:16.sp,
fontWeight: FontWeight.bold,
borderColor: Colors.white,
borderWidth: 1,
padding: EdgeInsets.all(2),
// padding: EdgeInsets.all(2),
),
),
];

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

@ -10,6 +10,16 @@ BaseData<T> _$BaseDataFromJson<T>(
Map<String, dynamic> json,
T Function(Object json) fromJsonT,
) {
if(!(json['isSuccess'] as bool))
return BaseData<T>()
..code = json['code'] as int
..data = null
..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;
return BaseData<T>()
..code = json['code'] as int
..data = fromJsonT(json['data'])

8
lib/retrofit/min_api.dart

@ -21,15 +21,15 @@ import 'data/shoppingCart.dart';
part 'min_api.g.dart';
// const base_url = "https://pos.api.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
const base_url = "https://pos.api.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
// const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8765/app/";///
const baseUrl = "http://192.168.10.236:8765/app/";///
// const base_url = "http://192.168.10.236:8765/app/";///
// const baseUrl = "http://192.168.10.236:8765/app/";///
// const base_url = "http://192.168.10.88:8765/app/";///

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/';
baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
}
final Dio _dio;

10
lib/retrofit/retrofit_api.dart

@ -54,14 +54,14 @@ 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://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
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.159:8766/app/"; ///
// const baseUrl = "http://192.168.10.159:8766/app/"; ///
@ -71,7 +71,7 @@ const baseUrl = "http://192.168.10.236:8766/app/"; ///费韬
// const base_url = "http://192.168.10.88:8766/app/";///
// const baseUrl = "http://192.168.10.142:8766/app/";///
// const baseUrl = "http://192.168.10.88:8766/app/";///
@RestApi(baseUrl: baseUrl)
abstract class ApiService {

2
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8766/app/';
baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
}
final Dio _dio;

16
lib/settlement/settlement.dart

@ -111,6 +111,11 @@ class _Settlement extends State<Settlement> {
else
queryOrderInfo(null, selectedBtn, null, 0, null);
});
weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}");
toOrderDetails(placeOrderFirst.id);
});
}
///
@ -278,6 +283,10 @@ class _Settlement extends State<Settlement> {
this.downOrder = baseData.data;
querySettlement();
}
else{
SmartDialog.showToast(baseData.msg,
alignment: Alignment.center);
}
} else {
///
BaseData<DownOrder> baseData;
@ -351,12 +360,9 @@ class _Settlement extends State<Settlement> {
timeStamp: int.tryParse(wxPay.timeStamp),
sign: wxPay.sign,
);
weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}");
toOrderDetails(placeOrderFirst.id);
});
}
} else {
}
else {
BaseData baseData = await minService
.settlementApi(placeOrderFirst.toJson())
.catchError((error) {

2
pubspec.lock

@ -867,7 +867,7 @@ packages:
name: xdg_directories
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.0"
version: "0.2.0+1"
xml:
dependency: transitive
description:

Loading…
Cancel
Save