merge
This commit is contained in:
@@ -12,11 +12,26 @@ class _DtxPagesState extends State<DtxPages> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('DTX积分'),
|
||||
title: const Text(
|
||||
'DT积分',
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
),
|
||||
),
|
||||
shadowColor: Colors.transparent,
|
||||
backgroundColor: Colors.white,
|
||||
foregroundColor: Colors.black,
|
||||
),
|
||||
body: const Center(
|
||||
child: Text('Dtx积分'),
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: const <Widget>[
|
||||
Text('DTX行情'),
|
||||
Text('个人资产信息'),
|
||||
Text('DT积分管理'),
|
||||
Text('行情交易走势'),
|
||||
Text('DTX交易走势图'),
|
||||
Text('DTX落槌量走势图'),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zhangdongxue zhangdongxue@uz.cn
|
||||
* @Date: 2022-05-26 13:16:03
|
||||
* @LastEditors: zhangdongxue zhangdongxue@uz.cn
|
||||
* @LastEditTime: 2022-05-30 16:14:21
|
||||
* @LastEditTime: 2022-05-30 16:20:26
|
||||
* @FilePath: /gl_dao/lib/pages/store/store.dart
|
||||
* @Description: 商城首页
|
||||
* // width: MediaQuery.of(context).size.width,
|
||||
|
||||
135
lib/pages/store/store_copy.dart
Normal file
135
lib/pages/store/store_copy.dart
Normal file
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* @Author: zhangdongxue zhangdongxue@uz.cn
|
||||
* @Date: 2022-05-26 13:16:03
|
||||
* @LastEditors: zhangdongxue zhangdongxue@uz.cn
|
||||
* @LastEditTime: 2022-05-26 17:06:33
|
||||
* @FilePath: /gl_dao/lib/pages/store/store.dart
|
||||
* @Description: 商城首页
|
||||
*/
|
||||
import 'package:flutter/material.dart';
|
||||
// import '../auth/auth.dart';
|
||||
|
||||
import '../../https/auth_api.dart';
|
||||
|
||||
class StorePages extends StatefulWidget {
|
||||
const StorePages({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StorePages> createState() => _StorePagesState();
|
||||
}
|
||||
|
||||
class _StorePagesState extends State<StorePages> {
|
||||
@override
|
||||
// void initState() {
|
||||
// HttpApi().apiPost(
|
||||
// 'user/auth/sms',
|
||||
// body: {
|
||||
// 'mobileNo': '18245180131',
|
||||
// 'code': '0000',
|
||||
// },
|
||||
// );
|
||||
// super.initState();
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
shadowColor: Colors.white.withOpacity(0),
|
||||
backgroundColor: Colors.red.withOpacity(.9),
|
||||
leadingWidth: 0,
|
||||
leading: IconButton(
|
||||
tooltip: 'hello',
|
||||
icon: const Icon(
|
||||
Icons.location_on_outlined,
|
||||
size: 20,
|
||||
),
|
||||
onPressed: () {
|
||||
print('menu Pressed');
|
||||
},
|
||||
),
|
||||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: selectCity,
|
||||
child: const Text(
|
||||
'全国',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: GestureDetector(
|
||||
onTap: search,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(left: 16),
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(36.0),
|
||||
),
|
||||
color: Colors.white,
|
||||
),
|
||||
height: 34,
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/search.png',
|
||||
width: 16.0,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
const Text(
|
||||
'请搜索商家或商品',
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
centerTitle: true, // 是否居中显示
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: const Icon(Icons.add),
|
||||
tooltip: "more_horiz",
|
||||
onPressed: () {
|
||||
print('点击了加号');
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
// 按钮前面加上icon
|
||||
ElevatedButton.icon(
|
||||
onPressed: () {},
|
||||
icon: Icon(Icons.search),
|
||||
label: Text('图标按钮'),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
selectCity() {
|
||||
print('selectCity');
|
||||
}
|
||||
|
||||
search() {
|
||||
print('search');
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// widget
|
||||
import './widget/user_info.dart';
|
||||
import './widget/user_order.dart';
|
||||
|
||||
class UserPages extends StatefulWidget {
|
||||
const UserPages({Key? key}) : super(key: key);
|
||||
|
||||
@@ -11,12 +15,14 @@ class _UserPagesState extends State<UserPages> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('我的'),
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
body: const Center(
|
||||
child: Text('我的'),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: const <Widget>[
|
||||
UserInfo(),
|
||||
UserOrder(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
58
lib/pages/user/widget/user_info.dart
Normal file
58
lib/pages/user/widget/user_info.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class UserInfo extends StatefulWidget {
|
||||
const UserInfo({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<UserInfo> createState() => _UserInfoState();
|
||||
}
|
||||
|
||||
class _UserInfoState extends State<UserInfo> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
20.0,
|
||||
MediaQuery.of(context).padding.top,
|
||||
20.0,
|
||||
50.0,
|
||||
),
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/login/auth_bg.png'),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 40.0),
|
||||
ClipOval(
|
||||
child: Image.network(
|
||||
'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fup.enterdesk.com%2Fedpic%2F78%2Fab%2Ffc%2F78abfc26e04035fc8fd68aaee233c5b7.jpg&refer=http%3A%2F%2Fup.enterdesk.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1656234411&t=4544b17883f935447981f761b1e2a941',
|
||||
height: 65.0,
|
||||
width: 65.0,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
const Text(
|
||||
'唐明明',
|
||||
style: TextStyle(
|
||||
fontSize: 20.0,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5.0),
|
||||
const Text(
|
||||
'NTF编号00001',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
93
lib/pages/user/widget/user_order.dart
Normal file
93
lib/pages/user/widget/user_order.dart
Normal file
@@ -0,0 +1,93 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../main_color.dart';
|
||||
|
||||
class UserOrder extends StatelessWidget {
|
||||
const UserOrder({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'订单管理',
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
Card(
|
||||
child: Row(children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(children: const <Widget>[
|
||||
Icon(Icons.home),
|
||||
Text(
|
||||
'全部',
|
||||
style: TextStyle(fontSize: 12.0, color: tTextColor),
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
]),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(children: <Widget>[
|
||||
Image.asset(
|
||||
'assets/icons/order_icon_00.png',
|
||||
width: 20.0,
|
||||
fit: BoxFit.fitWidth,
|
||||
),
|
||||
const SizedBox(height: 5.0),
|
||||
const Text(
|
||||
'待支付',
|
||||
style: TextStyle(fontSize: 12.0, color: tTextColor),
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
]),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(children: const <Widget>[
|
||||
Icon(Icons.card_giftcard),
|
||||
Text(
|
||||
'待发货',
|
||||
style: TextStyle(fontSize: 12.0, color: tTextColor),
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
]),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(children: const <Widget>[
|
||||
Icon(Icons.check),
|
||||
Text(
|
||||
'待收货',
|
||||
style: TextStyle(fontSize: 12.0, color: tTextColor),
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
]),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(children: const <Widget>[
|
||||
SizedBox(height: 15.0),
|
||||
Icon(Icons.home),
|
||||
Text(
|
||||
'已完成',
|
||||
style: TextStyle(fontSize: 12.0, color: tTextColor),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
SizedBox(height: 15.0),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user