Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-App
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
reason
2021-12-27 18:18:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a038b6d775a8a65ab3b2176f0ed86e4aa17d8a6f
a038b6d7
1 parent
9f86f44b
clear
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
277 deletions
lib/login/page/login_page.dart
lib/routers/routers.dart
lib/store/page/store_audit_page.dart
lib/store/page/store_audit_result_page.dart
lib/store/store_router.dart
lib/login/page/login_page.dart
View file @
a038b6d
...
...
@@ -6,7 +6,7 @@ import 'package:one_poem/login/widgets/my_text_field.dart';
import
'package:one_poem/res/constant.dart'
;
import
'package:one_poem/res/resources.dart'
;
import
'package:one_poem/routers/fluro_navigator.dart'
;
import
'package:one_poem/
store/store_router
.dart'
;
import
'package:one_poem/
routers/routers
.dart'
;
import
'package:one_poem/util/change_notifier_manage.dart'
;
import
'package:one_poem/util/other_utils.dart'
;
import
'package:one_poem/widgets/my_app_bar.dart'
;
...
...
@@ -76,7 +76,7 @@ class _LoginPageState extends State<LoginPage> with ChangeNotifierMixin<LoginPag
void
_login
()
{
SpUtil
.
putString
(
Constant
.
phone
,
_nameController
.
text
);
NavigatorUtils
.
push
(
context
,
StoreRouter
.
auditPag
e
);
NavigatorUtils
.
push
(
context
,
Routes
.
home
,
clearStack:
tru
e
);
}
@override
...
...
lib/routers/routers.dart
View file @
a038b6d
...
...
@@ -8,7 +8,6 @@ import 'package:one_poem/login/login_router.dart';
import
'package:one_poem/order/order_router.dart'
;
import
'package:one_poem/setting/setting_router.dart'
;
import
'package:one_poem/shop/shop_router.dart'
;
import
'package:one_poem/store/store_router.dart'
;
import
'package:one_poem/video/video_router.dart'
;
import
'i_router.dart'
;
...
...
@@ -46,7 +45,6 @@ class Routes {
_listRouter
.
add
(
LoginRouter
());
_listRouter
.
add
(
GoodsRouter
());
_listRouter
.
add
(
OrderRouter
());
_listRouter
.
add
(
StoreRouter
());
_listRouter
.
add
(
AccountRouter
());
_listRouter
.
add
(
SettingRouter
());
_listRouter
.
add
(
VideoRouter
());
...
...
lib/store/page/store_audit_page.dart
deleted
100644 → 0
View file @
9f86f44
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
import
'package:one_poem/res/resources.dart'
;
import
'package:one_poem/routers/fluro_navigator.dart'
;
import
'package:one_poem/util/other_utils.dart'
;
import
'package:one_poem/util/theme_utils.dart'
;
import
'package:one_poem/widgets/my_app_bar.dart'
;
import
'package:one_poem/widgets/my_button.dart'
;
import
'package:one_poem/widgets/my_scroll_view.dart'
;
import
'package:one_poem/widgets/selected_image.dart'
;
import
'package:one_poem/widgets/selected_item.dart'
;
import
'package:one_poem/widgets/text_field_item.dart'
;
import
'package:image_picker/image_picker.dart'
;
import
'package:keyboard_actions/keyboard_actions.dart'
;
import
'../store_router.dart'
;
/// design/2店铺审核/index.html
class
StoreAuditPage
extends
StatefulWidget
{
const
StoreAuditPage
({
Key
?
key
})
:
super
(
key:
key
);
@override
_StoreAuditPageState
createState
()
=>
_StoreAuditPageState
();
}
class
_StoreAuditPageState
extends
State
<
StoreAuditPage
>
{
final
GlobalKey
<
SelectedImageState
>
_imageGlobalKey
=
GlobalKey
<
SelectedImageState
>();
final
FocusNode
_nodeText1
=
FocusNode
();
final
FocusNode
_nodeText2
=
FocusNode
();
final
FocusNode
_nodeText3
=
FocusNode
();
final
ImagePicker
picker
=
ImagePicker
();
final
String
_address
=
'陕西省 西安市 雁塔区 高新六路201号'
;
KeyboardActionsConfig
_buildConfig
(
BuildContext
context
)
{
return
KeyboardActionsConfig
(
keyboardActionsPlatform:
KeyboardActionsPlatform
.
IOS
,
keyboardBarColor:
ThemeUtils
.
getKeyboardActionsColor
(
context
),
actions:
[
KeyboardActionsItem
(
focusNode:
_nodeText1
,
displayDoneButton:
false
,
),
KeyboardActionsItem
(
focusNode:
_nodeText2
,
displayDoneButton:
false
,
),
KeyboardActionsItem
(
focusNode:
_nodeText3
,
toolbarButtons:
[
(
node
)
{
return
GestureDetector
(
onTap:
()
=>
node
.
unfocus
(),
child:
Padding
(
padding:
const
EdgeInsets
.
only
(
right:
16.0
),
child:
Text
(
Utils
.
getCurrLocale
()
==
'zh'
?
'关闭'
:
'Close'
),
),
);
},
],
),
],
);
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
const
MyAppBar
(
centerTitle:
'店铺审核资料'
,
),
body:
MyScrollView
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
16.0
),
keyboardConfig:
_buildConfig
(
context
),
tapOutsideToDismiss:
true
,
bottomButton:
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
16.0
,
right:
16.0
,
bottom:
8.0
),
child:
MyButton
(
onPressed:
()
{
debugPrint
(
'文件路径:
${_imageGlobalKey.currentState?.pickedFile?.path}
'
);
NavigatorUtils
.
push
(
context
,
StoreRouter
.
auditResultPage
);
},
text:
'提交'
,
),
),
children:
_buildBody
(),
),
/// 同时存在底部按钮与keyboardConfig配置时,为保证Android与iOS平台软键盘弹出高度正常,添加下面的代码。
resizeToAvoidBottomInset:
defaultTargetPlatform
!=
TargetPlatform
.
iOS
,
);
}
List
<
Widget
>
_buildBody
()
{
return
[
Gaps
.
vGap5
,
const
Padding
(
padding:
EdgeInsets
.
only
(
left:
16.0
),
child:
Text
(
'店铺资料'
,
style:
TextStyles
.
textBold18
),
),
Gaps
.
vGap16
,
Center
(
child:
SelectedImage
(
key:
_imageGlobalKey
,
),
),
Gaps
.
vGap10
,
Center
(
child:
Text
(
'店主手持身份证或营业执照'
,
style:
Theme
.
of
(
context
).
textTheme
.
subtitle2
?.
copyWith
(
fontSize:
Dimens
.
font_sp14
),
),
),
Gaps
.
vGap16
,
TextFieldItem
(
focusNode:
_nodeText1
,
title:
'店铺名称'
,
hintText:
'填写店铺名称'
),
SelectedItem
(
title:
'主营范围'
,
content:
_sortName
,
onTap:
()
=>
_showBottomSheet
()
),
SelectedItem
(
title:
'店铺地址'
,
content:
_address
,
onTap:
()
{
}
),
Gaps
.
vGap32
,
const
Padding
(
padding:
EdgeInsets
.
only
(
left:
16.0
),
child:
Text
(
'店主信息'
,
style:
TextStyles
.
textBold18
),
),
Gaps
.
vGap16
,
TextFieldItem
(
focusNode:
_nodeText2
,
title:
'店主姓名'
,
hintText:
'填写店主姓名'
),
TextFieldItem
(
focusNode:
_nodeText3
,
keyboardType:
TextInputType
.
phone
,
title:
'联系电话'
,
hintText:
'填写店主联系电话'
)
];
}
String
_sortName
=
''
;
final
List
<
String
>
_list
=
[
'水果生鲜'
,
'家用电器'
,
'休闲食品'
,
'茶酒饮料'
,
'美妆个护'
,
'粮油调味'
,
'家庭清洁'
,
'厨具用品'
,
'儿童玩具'
,
'床上用品'
];
void
_showBottomSheet
()
{
showModalBottomSheet
<
void
>(
context:
context
,
builder:
(
BuildContext
context
)
{
// 可滑动ListView关闭BottomSheet
return
DraggableScrollableSheet
(
key:
const
Key
(
'goods_sort'
),
initialChildSize:
0.7
,
minChildSize:
0.65
,
expand:
false
,
builder:
(
_
,
scrollController
)
{
return
ListView
.
builder
(
controller:
scrollController
,
itemExtent:
48.0
,
itemBuilder:
(
_
,
index
)
{
return
InkWell
(
child:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16.0
),
alignment:
Alignment
.
centerLeft
,
child:
Text
(
_list
[
index
]),
),
onTap:
()
{
setState
(()
{
_sortName
=
_list
[
index
];
});
NavigatorUtils
.
goBack
(
context
);
},
);
},
itemCount:
_list
.
length
,
);
},
);
},
);
}
}
lib/store/page/store_audit_result_page.dart
deleted
100644 → 0
View file @
9f86f44
import
'package:flutter/material.dart'
;
import
'package:one_poem/res/resources.dart'
;
import
'package:one_poem/routers/fluro_navigator.dart'
;
import
'package:one_poem/routers/routers.dart'
;
import
'package:one_poem/widgets/load_image.dart'
;
import
'package:one_poem/widgets/my_app_bar.dart'
;
import
'package:one_poem/widgets/my_button.dart'
;
/// design/2店铺审核/index.html#artboard2
class
StoreAuditResultPage
extends
StatefulWidget
{
const
StoreAuditResultPage
({
Key
?
key
})
:
super
(
key:
key
);
@override
_StoreAuditResultPageState
createState
()
=>
_StoreAuditResultPageState
();
}
class
_StoreAuditResultPageState
extends
State
<
StoreAuditResultPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
const
MyAppBar
(
title:
'审核结果'
,
),
body:
Padding
(
padding:
const
EdgeInsets
.
all
(
16.0
),
child:
Column
(
children:
<
Widget
>[
Gaps
.
vGap50
,
const
LoadAssetImage
(
'store/icon_success'
,
width:
80.0
,
height:
80.0
,
),
Gaps
.
vGap12
,
const
Text
(
'恭喜,店铺资料审核成功'
,
style:
TextStyles
.
textSize16
,
),
Gaps
.
vGap8
,
Text
(
'2021-02-21 15:20:10'
,
style:
Theme
.
of
(
context
).
textTheme
.
subtitle2
,
),
Gaps
.
vGap8
,
Text
(
'预计完成时间:02月28日'
,
style:
Theme
.
of
(
context
).
textTheme
.
subtitle2
,
),
Gaps
.
vGap24
,
MyButton
(
onPressed:
()
{
NavigatorUtils
.
push
(
context
,
Routes
.
home
,
clearStack:
true
);
},
text:
'进入'
,
)
],
),
),
);
}
}
lib/store/store_router.dart
deleted
100644 → 0
View file @
9f86f44
import
'package:fluro/fluro.dart'
;
import
'package:one_poem/routers/i_router.dart'
;
import
'page/store_audit_page.dart'
;
import
'page/store_audit_result_page.dart'
;
class
StoreRouter
implements
IRouterProvider
{
static
String
auditPage
=
'/store/audit'
;
static
String
auditResultPage
=
'/store/auditResult'
;
@override
void
initRouter
(
FluroRouter
router
)
{
router
.
define
(
auditPage
,
handler:
Handler
(
handlerFunc:
(
_
,
__
)
=>
const
StoreAuditPage
()));
router
.
define
(
auditResultPage
,
handler:
Handler
(
handlerFunc:
(
_
,
__
)
=>
const
StoreAuditResultPage
()));
}
}
Please
register
or
login
to post a comment