Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
e87a8a03
提交
e87a8a03
authored
1月 20, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
紫荆币充值界面基本布局
上级
c582e965
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
189 行增加
和
11 行删除
+189
-11
index.dart
lib/pages/user_coin/index.dart
+1
-0
view.dart
lib/pages/user_coin/view.dart
+4
-10
controller.dart
lib/pages/user_coin_recharge/controller.dart
+29
-0
index.dart
lib/pages/user_coin_recharge/index.dart
+18
-0
view.dart
lib/pages/user_coin_recharge/view.dart
+128
-0
view.dart
lib/pages/user_security/view.dart
+6
-1
styles.dart
lib/utils/styles.dart
+3
-0
没有找到文件。
lib/pages/user_coin/index.dart
浏览文件 @
e87a8a03
...
...
@@ -10,6 +10,7 @@ import 'package:get/get.dart';
import
'../../apis/index.dart'
;
import
'../../models/index.dart'
;
import
'../user_coin_recharge/index.dart'
;
part
'view.dart'
;
part
'widgets/cell.dart'
;
...
...
lib/pages/user_coin/view.dart
浏览文件 @
e87a8a03
...
...
@@ -20,17 +20,11 @@ class _UserCoinPageState extends State<UserCoinPage> {
onTap:
(){
showModalBottomSheet
(
context:
context
,
builder:
(
BuildContext
context
)
{
return
Container
(
height:
200
.
w
,
color:
Colors
.
white
,
child:
Center
(
child:
Text
(
'This is the bottom sheet content'
,
style:
TextStyle
(
fontSize:
18
.
w
),
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
vertical
(
top:
Radius
.
circular
(
8
.
w
)),
),
);
builder:
(
BuildContext
context
)
{
return
CoinRechargePage
();
},
).
then
((
value
)
{
print
(
'================================================================'
);
...
...
lib/pages/user_coin_recharge/controller.dart
0 → 100644
浏览文件 @
e87a8a03
part of
recharge
;
class
CoinRechargeController
extends
GetxController
{
List
<
PayModel
>
pays
=
Platform
.
isIOS
?[
]:[
PayModel
(
type:
1
,
name:
'微信'
,
icon:
'assets/images/pay_wechat.png'
,
selected:
true
),
PayModel
(
type:
2
,
name:
'支付宝'
,
icon:
'assets/images/pay_ali.png'
,
selected:
false
),
];
// 支付方式
late
PayModel
_payModel
=
pays
.
first
;
PayModel
get
payModel
=>
_payModel
;
void
setPayModel
(
PayModel
payModel
){
for
(
PayModel
model
in
pays
)
{
if
(
model
.
type
==
payModel
.
type
){
model
.
selected
=
true
;
_payModel
=
model
;
}
else
{
model
.
selected
=
false
;
}
}
update
();
}
}
\ No newline at end of file
lib/pages/user_coin_recharge/index.dart
0 → 100644
浏览文件 @
e87a8a03
library
recharge
;
import
'package:flutter/material.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
'../../models/shop.dart'
;
import
'../../utils/index.dart'
;
import
'../../widgets/index.dart'
;
import
'../book_pay/index.dart'
;
import
'dart:io'
;
part
'view.dart'
;
part
'controller.dart'
;
\ No newline at end of file
lib/pages/user_coin_recharge/view.dart
0 → 100644
浏览文件 @
e87a8a03
part of
recharge
;
class
CoinRechargePage
extends
StatefulWidget
{
const
CoinRechargePage
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
CoinRechargePage
>
createState
()
=>
_CoinRechargePageState
();
}
class
_CoinRechargePageState
extends
State
<
CoinRechargePage
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
GetBuilder
<
CoinRechargeController
>(
init:
CoinRechargeController
(),
builder:
(
controller
)
=>
Container
(
// height: 100,
// color: Colors.amberAccent,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
17
),
width:
double
.
infinity
,
margin:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
0
),
child:
Container
(
color:
Colors
.
red
,
child:
Stack
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
'紫荆币充值'
,
textAlign:
TextAlign
.
center
),
],
),
Positioned
(
right:
0
,
top:
0
,
child:
Container
(
width:
20
,
height:
20
,
color:
Colors
.
green
,
),
)
],
)
),
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
20
),
child:
_buildAudioGridView
()
),
Gaps
.
vGaps15
,
_buildListView
(
controller
),
Gaps
.
vGaps15
,
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
15
),
child:
CustomGradientButton
(
text:
'立即充值'
,
isEnabled:
true
,
onPressed:
()
{
// context.goNamed(Routes.login);
},
),
),
Gaps
.
vGaps15
,
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
'充值即代表同意'
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c9
)),
TextSpan
(
text:
'《用户充值协议》'
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Color
(
0xFF2A82D9
))),
]
)),
Gaps
.
vGaps15
],
),
),
);
}
Widget
_buildAudioGridView
(){
return
GridView
.
builder
(
// padding: const EdgeInsets.only(left: 13,top: 10),
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
3
,
crossAxisSpacing:
10
.
w
,
mainAxisSpacing:
10
.
w
,
childAspectRatio:
2
),
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
red
,
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
border:
Border
.
all
(
width:
0.5
.
w
,
color:
Color
(
0xFFDADADA
))
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
'42紫荆币'
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontSize:
14
,
height:
1.5
),),
Text
(
'6元'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
11
,
height:
1.5
),),
],
),
);
},
itemCount:
6
,
);
}
Widget
_buildListView
(
CoinRechargeController
controller
){
return
ListView
.
builder
(
physics:
const
NeverScrollableScrollPhysics
(),
padding:
EdgeInsets
.
symmetric
(
horizontal:
20
.
w
),
shrinkWrap:
true
,
itemBuilder:
(
BuildContext
context
,
int
index
){
PayModel
model
=
controller
.
pays
[
index
];
return
GestureDetector
(
onTap:
(){
controller
.
setPayModel
(
model
);
},
child:
BuildPayWay
(
model:
model
,));
},
itemCount:
controller
.
pays
.
length
,
);
}
}
lib/pages/user_security/view.dart
浏览文件 @
e87a8a03
...
...
@@ -74,7 +74,12 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
),
child:
Column
(
children:
[
_buildItem
(
title:
'账号注销'
,
value:
''
),
GestureDetector
(
child:
_buildItem
(
title:
'账号注销'
,
value:
''
),
onTap:
(){
},
),
],
),
)
...
...
lib/utils/styles.dart
浏览文件 @
e87a8a03
...
...
@@ -74,3 +74,6 @@ class Fonts {
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论