提交 328d3c95 authored 作者: maodou's avatar maodou

2:已退款界面功能

上级 3b6660e4
...@@ -28,7 +28,7 @@ class BookPayController extends GetxController { ...@@ -28,7 +28,7 @@ class BookPayController extends GetxController {
]; ];
// 支付宝 // 支付宝
Tobias tobias = Tobias(); // Tobias tobias = Tobias();
Fluwx fluwx = Fluwx(); Fluwx fluwx = Fluwx();
// 时候展示底部视图 // 时候展示底部视图
...@@ -162,11 +162,11 @@ class BookPayController extends GetxController { ...@@ -162,11 +162,11 @@ class BookPayController extends GetxController {
} }
// 支付宝 // 支付宝
if (payModel.type == 2){ if (payModel.type == 2){
final result = await tobias.isAliPayInstalled; // final result = await tobias.isAliPayInstalled;
if(!result){ // if(!result){
Toast.show('请先安装支付宝'); // Toast.show('请先安装支付宝');
return; // return;
} // }
} }
// 微信 // 微信
if (payModel.type ==1){ if (payModel.type ==1){
...@@ -213,13 +213,13 @@ class BookPayController extends GetxController { ...@@ -213,13 +213,13 @@ class BookPayController extends GetxController {
void requestAliPay(){ void requestAliPay(){
print('================================================================${payOrderModel.encryptionOrder!}'); print('================================================================${payOrderModel.encryptionOrder!}');
tobias.pay(payOrderModel.encryptionOrder!).then((payResult){ // tobias.pay(payOrderModel.encryptionOrder!).then((payResult){
if (payResult['resultStatus'] == '9000') { // if (payResult['resultStatus'] == '9000') {
requestOrderStatus(); // requestOrderStatus();
} else { // } else {
Toast.show(payResult['memo'].toString()); // Toast.show(payResult['memo'].toString());
} // }
}); // });
} }
// 微信支付 // 微信支付
......
...@@ -13,7 +13,7 @@ import 'package:flutter_slidable/flutter_slidable.dart'; ...@@ -13,7 +13,7 @@ import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:fluwx/fluwx.dart'; import 'package:fluwx/fluwx.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:tobias/tobias.dart'; // import 'package:tobias/tobias.dart';
import '../../models/index.dart'; import '../../models/index.dart';
import '../../routes/index.dart'; import '../../routes/index.dart';
......
...@@ -12,6 +12,7 @@ import 'package:go_router/go_router.dart'; ...@@ -12,6 +12,7 @@ import 'package:go_router/go_router.dart';
import '../../models/index.dart'; import '../../models/index.dart';
import '../../routes/index.dart'; import '../../routes/index.dart';
import '../user_order_refunded_details/index.dart';
part 'view.dart'; part 'view.dart';
part 'controller.dart'; part 'controller.dart';
\ No newline at end of file
...@@ -141,7 +141,18 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> { ...@@ -141,7 +141,18 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
controller.orderCompleteds.indexOf(model) == 0 ? controller.orderCompleteds.indexOf(model) == 0 ?
GestureDetector( GestureDetector(
onTap: () { onTap: () {
print('点击了应付款后面'); showModalBottomSheet(
context: context,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(8.w)),
),
builder: (BuildContext context) {
return RefundedDetailsPage();
},
).then((value) {
print('点击了应付款后面');
});
}, },
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
...@@ -219,7 +230,18 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> { ...@@ -219,7 +230,18 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8.w), borderRadius: BorderRadius.circular(8.w),
child: Container(margin: EdgeInsets.only(top:24.w,left:11.5.w,right: 23.5.w,bottom: 24.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('退款原因',style: TextStyle(fontSize: 13.w,color: Colours.c9),),
SizedBox(height: 8.w,),
Text('退款原因 买错类型了,非常抱歉,下次有需要在下单吧退款原因 买错类型了,非常抱歉,下次有需要在下单吧下次有需要在下单吧退款原因下次有需要在下单吧退款原因下次有需要在下单吧退款原因',style: TextStyle(fontSize: 13.w,color: Colours.c3),)
],
),
),
/* Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
...@@ -232,7 +254,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> { ...@@ -232,7 +254,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
height: 14.5.w, height: 14.5.w,
), ),
], ],
), ),*/
), ),
) )
],), ],),
......
library user_order_refunded_details;
import 'package:flutter/material.dart';
import 'package:flutter_book/apis/index.dart';
import 'package:flutter_book/models/index.dart';
import 'package:flutter_book/theme.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get/get_state_manager/src/simple/get_controllers.dart';
import 'package:go_router/go_router.dart';
import '../../utils/index.dart';
import '../../widgets/index.dart';
import '../book_pay/index.dart';
import 'dart:io';
part 'view.dart';
\ No newline at end of file
part of user_order_refunded_details;
class RefundedDetailsPage extends StatefulWidget {
const RefundedDetailsPage({Key? key}) : super(key: key);
@override
State<RefundedDetailsPage> createState() => _RefundedDetailsState();
}
class _RefundedDetailsState extends State<RefundedDetailsPage> {
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
color: Colors.white,
padding: EdgeInsets.symmetric(vertical: 17.w),
width: double.infinity,
margin: EdgeInsets.fromLTRB(10.w, 0.w, 10.w, 0.w),
child: Container(
// color: Colors.red,
child:Stack(
children: [
const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('金额明细',textAlign:TextAlign.center),
],
),
Positioned(
right: 0.w,
top: 0.w,
child: GestureDetector(
onTap: (){
context.pop();
},
child: SizedBox(
width: 20.w,
height: 20.w,
child: Image.asset('assets/images/close.png'),
),
),
)
],
)
),
),
SizedBox(height: 50.w,),
Container(
margin: EdgeInsets.only(left: 15.w,right: 17.5.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('总价',style: TextStyle(fontSize: 16.w,color: Colours.c3,fontWeight: Fonts.medium),),
Text('¥199.80',style: TextStyle(fontSize: 17.w,color: Colours.cAB1941,fontWeight: Fonts.medium),),
],
),
),
Container(
margin: EdgeInsets.only(left: 15.w,right: 17.5.w,top:15.5.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('优惠券抵扣',style: TextStyle(fontSize: 13.w,color: Colours.c9,),),
Text('减 ¥199.80',style: TextStyle(fontSize: 13.w,color: Colours.cAB1941,fontWeight: Fonts.medium),),
],
),
),
Container(
margin: EdgeInsets.only(left: 15.w,right: 17.5.w,top:11.5.w,bottom: 39.5.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('积分抵扣',style: TextStyle(fontSize: 13.w,color: Colours.c9,),),
Text('减 ¥199.80',style: TextStyle(fontSize: 13.w,color: Colours.cAB1941,fontWeight: Fonts.medium),),
],
),
),
],
);
}
}
差异被折叠。
...@@ -100,7 +100,7 @@ dependencies: ...@@ -100,7 +100,7 @@ dependencies:
# 能指定滑动位置的listView # 能指定滑动位置的listView
azlistview: ^2.0.0 azlistview: ^2.0.0
# 支付宝 # 支付宝
tobias: ^3.3.0 # tobias: ^3.3.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论