提交 ed1ad4ac authored 作者: yueweilu's avatar yueweilu

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

# Conflicts: # lib/pages/user_order_coin_awaiting/view.dart
...@@ -164,6 +164,11 @@ class OrderListModel { ...@@ -164,6 +164,11 @@ class OrderListModel {
} }
return map; return map;
} }
@override
String toString() {
return 'OrderListModel{id: $id, ordersnum: $ordersnum, totalPrice: $totalPrice, finalTotalPrice: $finalTotalPrice, num_: $num_, status: $status, payType: $payType, types: $types, createTime: $createTime, cartList: $cartList}';
}
} }
/// 书籍列表 /// 书籍列表
......
...@@ -195,26 +195,26 @@ class _LoginPageState extends State<LoginPage> { ...@@ -195,26 +195,26 @@ class _LoginPageState extends State<LoginPage> {
child: Row( child: Row(
children: [ children: [
SizedBox( SizedBox(
width: 10.w, width: 14.w,
height: 10.w, height: 14.w,
// color: AppTheme.primary, // color: AppTheme.primary,
child: Image.asset( child: Image.asset(
controller.agree?'assets/images/check_box_select.png':'assets/images/uncheck.png', controller.agree?'assets/images/check_box_select.png':'assets/images/uncheck.png',
), ),
), ),
Gaps.hGaps5, Gaps.hGaps5,
Text('我已阅读并同意',style: TextStyle(color: Colours.c9,fontSize:10.w,height: 1.4)), Text('我已阅读并同意',style: TextStyle(color: Colours.c9,fontSize:14.w,height: 1.4)),
], ],
), ),
), ),
GestureDetector( GestureDetector(
child: Text('《用户协议》',style: TextStyle(color: Colours.cBlue,fontSize:10.w,height: 1.4)), child: Text('《用户协议》',style: TextStyle(color: Colours.cBlue,fontSize:14.w,height: 1.4)),
onTap: (){ onTap: (){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms);
}, },
), ),
GestureDetector( GestureDetector(
child: Text('《隐私政策》',style: TextStyle(color: Colours.cBlue,fontSize:10.w,height: 1.4)), child: Text('《隐私政策》',style: TextStyle(color: Colours.cBlue,fontSize:14.w,height: 1.4)),
onTap: (){ onTap: (){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms);
}, },
......
...@@ -44,7 +44,6 @@ class _MinePageState extends State<MinePage> { ...@@ -44,7 +44,6 @@ class _MinePageState extends State<MinePage> {
GestureDetector( GestureDetector(
onTap: () async{ onTap: () async{
final result = await context.pushNamed(Routes.msgs); final result = await context.pushNamed(Routes.msgs);
print('---------------------------------1111$result'); print('---------------------------------1111$result');
if (result == true){ if (result == true){
controller.getNums(); controller.getNums();
......
...@@ -2,23 +2,18 @@ part of mine; ...@@ -2,23 +2,18 @@ part of mine;
/// 用户信息 /// 用户信息
class BuildUser extends StatelessWidget { class BuildUser extends StatelessWidget {
final void Function()? onTap; final void Function()? onTap;
final UserInfoModel userInfo; final UserInfoModel userInfo;
const BuildUser ({ const BuildUser({super.key, this.onTap, required this.userInfo});
super.key,
this.onTap,
required this.userInfo
});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap:onTap, onTap: onTap,
child: Container( child: Container(
margin: EdgeInsets.only(left: 10.w,right: 10.w), margin: EdgeInsets.only(left: 10.w, right: 10.w),
color: Colors.transparent, color: Colors.transparent,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -33,7 +28,10 @@ class BuildUser extends StatelessWidget { ...@@ -33,7 +28,10 @@ class BuildUser extends StatelessWidget {
color: Colors.cyan, color: Colors.cyan,
), ),
// color: Colors.cyan, // color: Colors.cyan,
child: CustomImage.network(url: userInfo.headImg??'',radius: 22.5.w,), child: CustomImage.network(
url: userInfo.headImg ?? '',
radius: 22.5.w,
),
), ),
Gaps.hGaps10, Gaps.hGaps10,
Column( Column(
...@@ -42,22 +40,34 @@ class BuildUser extends StatelessWidget { ...@@ -42,22 +40,34 @@ class BuildUser extends StatelessWidget {
Row( Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text(userInfo.name??'',style: TextStyle( ConstrainedBox(
color: Colours.c3, constraints: BoxConstraints(
fontSize: 15.w, maxWidth: 150.w, // 设置最大宽度
fontWeight: Fonts.medium, ),
height: 1.6.w child: Text(
),), userInfo.name ?? '',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colours.c3,
fontSize: 15.w,
fontWeight: Fonts.medium,
height: 1.6.w),
),
),
Gaps.hGaps20, Gaps.hGaps20,
Stack( Stack(
children: [ children: [
Container( Container(
padding: EdgeInsets.only(right:8.w,left: 8.w), padding: EdgeInsets.only(right: 8.w, left: 8.w),
height: 20.w, height: 20.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(21.w), borderRadius: BorderRadius.circular(21.w),
gradient: LinearGradient( gradient: LinearGradient(
colors: [AppTheme.primary.withOpacity(0.03),AppTheme.primary.withOpacity(0.1)] , // 不可点击时的颜色,透明度为0.7 colors: [
AppTheme.primary.withOpacity(0.03),
AppTheme.primary.withOpacity(0.1)
], // 不可点击时的颜色,透明度为0.7
begin: Alignment.centerLeft, begin: Alignment.centerLeft,
end: Alignment.centerRight, end: Alignment.centerRight,
), ),
...@@ -68,26 +78,32 @@ class BuildUser extends StatelessWidget { ...@@ -68,26 +78,32 @@ class BuildUser extends StatelessWidget {
width: 16.w, width: 16.w,
height: 17.w, height: 17.w,
), ),
Text(userInfo.gradeName??'',style: TextStyle(fontSize: 11.w,color: AppTheme.primary),) Text(
userInfo.gradeName ?? '',
style: TextStyle(
fontSize: 11.w,
color: AppTheme.primary),
)
], ],
), ),
), ),
Positioned( Positioned(
left: 8, left: 8,
child: SizedBox( child: SizedBox(
width: 16.w, height:17.w, width: 16.w,
child: Image.asset('assets/images/grade.png') height: 17.w,
), child:
Image.asset('assets/images/grade.png')),
) )
], ],
) )
], ],
), ),
Gaps.vGaps5, Gaps.vGaps5,
Text(userInfo.phone??'',style: TextStyle( Text(
fontSize: 12.w, userInfo.phone ?? '',
color: Colours.c6 style: TextStyle(fontSize: 12.w, color: Colours.c6),
),) )
], ],
), ),
Gaps.hGaps20, Gaps.hGaps20,
......
...@@ -287,15 +287,18 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -287,15 +287,18 @@ class _UserInfoPageState extends State<UserInfoPage> {
color: Colours.c3, color: Colours.c3,
), ),
), ),
SizedBox(width: 10.w,),
Row( Row(
children: [ children: [
Text( Container(width: 240.w, alignment: Alignment.centerRight,
child: Text(
value, value,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 14.w, fontSize: 14.w,
color: Colours.c9, color: Colours.c9,
), ),
), ),),
Gaps.hGaps10, Gaps.hGaps10,
SizedBox( SizedBox(
width: 5.w, width: 5.w,
......
...@@ -29,16 +29,9 @@ class UserOrderController extends GetxController ...@@ -29,16 +29,9 @@ class UserOrderController extends GetxController
int _page = 1; int _page = 1;
bool _noMore = false; bool _noMore = false;
@override
void onInit() {
super.onInit();
}
@override @override
void onReady() { void onReady() {
onRefresh(); // onRefresh();
super.onReady(); super.onReady();
} }
...@@ -68,6 +61,7 @@ class UserOrderController extends GetxController ...@@ -68,6 +61,7 @@ class UserOrderController extends GetxController
void onRefresh() async { void onRefresh() async {
try { try {
await _getOrders(isRefresh:true); await _getOrders(isRefresh:true);
refreshController.finishRefresh(IndicatorResult.success); refreshController.finishRefresh(IndicatorResult.success);
refreshController.resetFooter(); refreshController.resetFooter();
} catch (error) { } catch (error) {
......
...@@ -2,10 +2,10 @@ part of user_order_awaiting; ...@@ -2,10 +2,10 @@ part of user_order_awaiting;
/// 等待付款订单 /// 等待付款订单
class UserOrderAwaitingController extends GetxController { class UserOrderAwaitingController extends GetxController {
final String orderNum; late String _orderNum;
final BuildContext context; final BuildContext context;
UserOrderAwaitingController(this.orderNum,this.context); // 订单编号 UserOrderAwaitingController(this.context); // 订单编号
late OrderInfoModel model; late OrderInfoModel model;
// 应付款、订单编号等 // 应付款、订单编号等
...@@ -18,6 +18,12 @@ class UserOrderAwaitingController extends GetxController { ...@@ -18,6 +18,12 @@ class UserOrderAwaitingController extends GetxController {
late PayOrderModel payOrderModel; late PayOrderModel payOrderModel;
String get orderNum => _orderNum; // 获取订单编号的方法
// 更新订单编号的方法
void updateOrderNum(String newOrderNum) {
_orderNum = newOrderNum;
}
@override @override
void onReady() { void onReady() {
......
...@@ -2,10 +2,14 @@ part of user_order_coin_awaiting; ...@@ -2,10 +2,14 @@ part of user_order_coin_awaiting;
/// 紫荆币等待付款订单 /// 紫荆币等待付款订单
class UserOrderCoinAwaitingController extends GetxController { class UserOrderCoinAwaitingController extends GetxController {
final String orderNum; late String _orderNum;
UserOrderCoinAwaitingController(this.orderNum); // 订单编号
String get orderNum => _orderNum; // 获取订单编号的方法
UserOrderCoinAwaitingController();
// 更新订单编号的方法
void updateOrderNum(String newOrderNum) {
_orderNum = newOrderNum;
}
late OrderInfoModel model; late OrderInfoModel model;
// 应付款、订单编号等 // 应付款、订单编号等
List<OrderCompletedModel> orderAwaitings = []; List<OrderCompletedModel> orderAwaitings = [];
...@@ -33,9 +37,6 @@ class UserOrderCoinAwaitingController extends GetxController { ...@@ -33,9 +37,6 @@ class UserOrderCoinAwaitingController extends GetxController {
} }
} }
/// 获取订单信息 /// 获取订单信息
Future<void> getOrderInfo() async { Future<void> getOrderInfo() async {
model = await MineAPI.getOrderInfo(orderNum: orderNum); model = await MineAPI.getOrderInfo(orderNum: orderNum);
...@@ -91,7 +92,6 @@ class UserOrderCoinAwaitingController extends GetxController { ...@@ -91,7 +92,6 @@ class UserOrderCoinAwaitingController 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') {
......
...@@ -259,11 +259,6 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -259,11 +259,6 @@ class _UserSetPageState extends State<UserSetPage> {
// 去除操作按钮区域的内边距 // 去除操作按钮区域的内边距
actionsPadding: EdgeInsets.zero, actionsPadding: EdgeInsets.zero,
actions: <Widget>[ actions: <Widget>[
Wrap(
children: [
],
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
...@@ -312,12 +307,18 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -312,12 +307,18 @@ class _UserSetPageState extends State<UserSetPage> {
if (!forcedUpgrade) if (!forcedUpgrade)
Padding(padding: EdgeInsets.only(right: 28.w), Padding(padding: EdgeInsets.only(right: 28.w),
child: GestureDetector( child: GestureDetector(
child: const Text( child:
'稍后再说', Container(
style: TextStyle( width: 85.w,
color: Colours.c6, color: Colours.cFF,
fontSize: 12, alignment: Alignment.center,
fontWeight: Fonts.medium), child: const Text(
'稍后再说',
style: TextStyle(
color: Colours.c6,
fontSize: 12,
fontWeight: Fonts.medium),
),
), ),
onTap: () => Navigator.of(context).pop(), onTap: () => Navigator.of(context).pop(),
),), ),),
...@@ -329,12 +330,17 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -329,12 +330,17 @@ class _UserSetPageState extends State<UserSetPage> {
), ),
Padding(padding: EdgeInsets.only(left: 28.w), Padding(padding: EdgeInsets.only(left: 28.w),
child: GestureDetector( child: GestureDetector(
child: const Text( child: Container(
'立即更新', width: 85.w,
style: TextStyle( color: Colours.cFF,
color: Colours.cAB1941, alignment: Alignment.center,
fontSize: 12, child: const Text(
fontWeight: Fonts.medium), '立即更新',
style: TextStyle(
color: Colours.cAB1941,
fontSize: 12,
fontWeight: Fonts.medium),
),
), ),
onTap: () { onTap: () {
_appUpdate(); _appUpdate();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论