Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
328d3c95
提交
328d3c95
authored
1月 31, 2024
作者:
maodou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2:已退款界面功能
上级
3b6660e4
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
146 行增加
和
16 行删除
+146
-16
controller.dart
lib/pages/book_pay/controller.dart
+13
-13
index.dart
lib/pages/book_pay/index.dart
+1
-1
index.dart
lib/pages/user_order_refunded/index.dart
+2
-0
view.dart
lib/pages/user_order_refunded/view.dart
+23
-1
index.dart
lib/pages/user_order_refunded_details/index.dart
+20
-0
view.dart
lib/pages/user_order_refunded_details/view.dart
+86
-0
pubspec.lock
pubspec.lock
+0
-0
pubspec.yaml
pubspec.yaml
+1
-1
没有找到文件。
lib/pages/book_pay/controller.dart
浏览文件 @
328d3c95
...
...
@@ -28,7 +28,7 @@ class BookPayController extends GetxController {
];
// 支付宝
Tobias
tobias
=
Tobias
();
//
Tobias tobias = Tobias();
Fluwx
fluwx
=
Fluwx
();
// 时候展示底部视图
...
...
@@ -162,11 +162,11 @@ class BookPayController extends GetxController {
}
// 支付宝
if
(
payModel
.
type
==
2
){
final
result
=
await
tobias
.
isAliPayInstalled
;
if
(!
result
){
Toast
.
show
(
'请先安装支付宝'
);
return
;
}
//
final result = await tobias.isAliPayInstalled;
//
if(!result){
//
Toast.show('请先安装支付宝');
//
return;
//
}
}
// 微信
if
(
payModel
.
type
==
1
){
...
...
@@ -213,13 +213,13 @@ class BookPayController extends GetxController {
void
requestAliPay
(){
print
(
'================================================================
${payOrderModel.encryptionOrder!}
'
);
tobias
.
pay
(
payOrderModel
.
encryptionOrder
!).
then
((
payResult
){
if
(
payResult
[
'resultStatus'
]
==
'9000'
)
{
requestOrderStatus
();
}
else
{
Toast
.
show
(
payResult
[
'memo'
].
toString
());
}
});
//
tobias.pay(payOrderModel.encryptionOrder!).then((payResult){
//
if (payResult['resultStatus'] == '9000') {
//
requestOrderStatus();
//
} else {
//
Toast.show(payResult['memo'].toString());
//
}
//
});
}
// 微信支付
...
...
lib/pages/book_pay/index.dart
浏览文件 @
328d3c95
...
...
@@ -13,7 +13,7 @@ import 'package:flutter_slidable/flutter_slidable.dart';
import
'package:fluwx/fluwx.dart'
;
import
'package:get/get.dart'
;
import
'package:go_router/go_router.dart'
;
import
'package:tobias/tobias.dart'
;
//
import 'package:tobias/tobias.dart';
import
'../../models/index.dart'
;
import
'../../routes/index.dart'
;
...
...
lib/pages/user_order_refunded/index.dart
浏览文件 @
328d3c95
...
...
@@ -12,6 +12,7 @@ import 'package:go_router/go_router.dart';
import
'../../models/index.dart'
;
import
'../../routes/index.dart'
;
import
'../user_order_refunded_details/index.dart'
;
part
'view.dart'
;
part
'controller.dart'
;
\ No newline at end of file
lib/pages/user_order_refunded/view.dart
浏览文件 @
328d3c95
...
...
@@ -141,7 +141,18 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
controller
.
orderCompleteds
.
indexOf
(
model
)
==
0
?
GestureDetector
(
onTap:
()
{
showModalBottomSheet
(
context:
context
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
vertical
(
top:
Radius
.
circular
(
8
.
w
)),
),
builder:
(
BuildContext
context
)
{
return
RefundedDetailsPage
();
},
).
then
((
value
)
{
print
(
'点击了应付款后面'
);
});
},
child:
Row
(
mainAxisAlignment:
...
...
@@ -219,7 +230,18 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
),
child:
ClipRRect
(
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
(
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,
mainAxisSize: MainAxisSize.min,
children: [
...
...
@@ -232,7 +254,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
height: 14.5.w,
),
],
),
),
*/
),
)
],),
...
...
lib/pages/user_order_refunded_details/index.dart
0 → 100644
浏览文件 @
328d3c95
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
lib/pages/user_order_refunded_details/view.dart
0 → 100644
浏览文件 @
328d3c95
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
),),
],
),
),
],
);
}
}
pubspec.lock
浏览文件 @
328d3c95
差异被折叠。
点击展开。
pubspec.yaml
浏览文件 @
328d3c95
...
...
@@ -100,7 +100,7 @@ dependencies:
# 能指定滑动位置的listView
azlistview
:
^2.0.0
# 支付宝
tobias
:
^3.3.0
#
tobias: ^3.3.0
dev_dependencies
:
flutter_test
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论