mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-09-28 17:14:30 +08:00
issuse message
This commit is contained in:
@ -11,6 +11,7 @@ import 'package:flutter_go/model/user_info.dart';
|
|||||||
import 'package:flutter_go/views/collection_page/collection_page.dart';
|
import 'package:flutter_go/views/collection_page/collection_page.dart';
|
||||||
import 'package:flutter_go/views/collection_page/collection_full_page.dart';
|
import 'package:flutter_go/views/collection_page/collection_full_page.dart';
|
||||||
import 'package:flutter_go/views/standard_demo_page/index.dart';
|
import 'package:flutter_go/views/standard_demo_page/index.dart';
|
||||||
|
import 'package:flutter_go/views/issuse_message_page/issuse_message_page.dart'
|
||||||
|
|
||||||
// app的首页
|
// app的首页
|
||||||
var homeHandler = new Handler(
|
var homeHandler = new Handler(
|
||||||
@ -72,3 +73,9 @@ var standardPageHandler = new Handler(
|
|||||||
return StandardView(id: id);
|
return StandardView(id: id);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
var issuesMessageHandler = new Handler(
|
||||||
|
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||||
|
return IssuesMessagePage();
|
||||||
|
});
|
||||||
|
@ -30,7 +30,7 @@ class Routes {
|
|||||||
router.define(loginPage, handler: loginPageHandler);
|
router.define(loginPage, handler: loginPageHandler);
|
||||||
router.define(codeView,handler:fullScreenCodeDialog);
|
router.define(codeView,handler:fullScreenCodeDialog);
|
||||||
router.define(webViewPage,handler:webViewPageHand);
|
router.define(webViewPage,handler:webViewPageHand);
|
||||||
// router.define(issuesMessage, handler: issuesMessageHandler);
|
router.define(issuesMessage, handler: issuesMessageHandler);
|
||||||
widgetDemosList.forEach((demo) {
|
widgetDemosList.forEach((demo) {
|
||||||
Handler handler = new Handler(
|
Handler handler = new Handler(
|
||||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||||
|
@ -57,12 +57,11 @@ class DataUtils {
|
|||||||
// 一键反馈
|
// 一键反馈
|
||||||
static Future feedback(Map<String, String> params, context) async {
|
static Future feedback(Map<String, String> params, context) async {
|
||||||
var response = await NetUtils.post(Api.FEEDBACK, params);
|
var response = await NetUtils.post(Api.FEEDBACK, params);
|
||||||
// print(response);
|
|
||||||
if (response['status'] == 401 && response['message'] == '请先登录') {
|
if (response['status'] == 401 && response['message'] == '请先登录') {
|
||||||
Application.router.navigateTo(context, '${Routes.loginPage}',
|
Application.router.navigateTo(context, '${Routes.loginPage}',
|
||||||
transition: TransitionType.nativeModal);
|
transition: TransitionType.nativeModal);
|
||||||
}
|
}
|
||||||
return response;
|
return response['success'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置主题颜色
|
//设置主题颜色
|
||||||
|
@ -205,28 +205,14 @@ class _DrawerPageState extends State<DrawerPage> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
if (hasLogin) {
|
if (hasLogin) {
|
||||||
//issue 未登陆状态 返回登陆页面
|
//issue 未登陆状态 返回登陆页面
|
||||||
DataUtils.logout().then((result) {
|
Application.router.navigateTo(context, '${Routes.issuesMessage}');
|
||||||
Application.router
|
|
||||||
.navigateTo(context, '${Routes.issuesMessage}');
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
//No description provided.
|
//No description provided.
|
||||||
Application.router.navigateTo(context, '${Routes.loginPage}');
|
Application.router.navigateTo(context, '${Routes.loginPage}');
|
||||||
// Application.router.navigateTo(context, '${Routes.issuesMessage}');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ListTile(
|
|
||||||
// leading: Icon(
|
|
||||||
// Icons.info,
|
|
||||||
// size: 27.0,
|
|
||||||
// ),
|
|
||||||
// title: Text(
|
|
||||||
// '关于 App',
|
|
||||||
// style: textStyle,
|
|
||||||
// ),
|
|
||||||
// onTap: () {},
|
|
||||||
// ),
|
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(
|
leading: Icon(
|
||||||
Icons.share,
|
Icons.share,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:zefyr/zefyr.dart';
|
import 'package:zefyr/zefyr.dart';
|
||||||
import 'package:flutter_go/utils/data_utils.dart';
|
import 'package:flutter_go/utils/data_utils.dart';
|
||||||
import 'package:notus/convert.dart';
|
import 'package:notus/convert.dart';
|
||||||
@ -8,12 +9,12 @@ import 'package:fluttertoast/fluttertoast.dart';
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class issuesMessagePage extends StatefulWidget {
|
class IssuesMessagePage extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
_issuesMessagePageState createState() => _issuesMessagePageState();
|
_IssuesMessagePageState createState() => _IssuesMessagePageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _issuesMessagePageState extends State<issuesMessagePage> {
|
class _IssuesMessagePageState extends State<IssuesMessagePage> {
|
||||||
final TextEditingController _controller = new TextEditingController();
|
final TextEditingController _controller = new TextEditingController();
|
||||||
final ZefyrController _zefyrController = new ZefyrController(NotusDocument());
|
final ZefyrController _zefyrController = new ZefyrController(NotusDocument());
|
||||||
final FocusNode _focusNode = new FocusNode();
|
final FocusNode _focusNode = new FocusNode();
|
||||||
@ -50,7 +51,7 @@ class _issuesMessagePageState extends State<issuesMessagePage> {
|
|||||||
_show('标题不能为空');
|
_show('标题不能为空');
|
||||||
} else {
|
} else {
|
||||||
DataUtils.feedback({'title': _title, "body": mk},context).then((result) {
|
DataUtils.feedback({'title': _title, "body": mk},context).then((result) {
|
||||||
_show(result);
|
_show('提交成功');
|
||||||
Navigator.maybePop(context);
|
Navigator.maybePop(context);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -66,6 +67,22 @@ class _issuesMessagePageState extends State<issuesMessagePage> {
|
|||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
fontSize: 16.0);
|
fontSize: 16.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget buildLoading() {
|
||||||
|
return Opacity(
|
||||||
|
opacity: .5,
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.85,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(8.0)),
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
child: SpinKitPouringHourglass(color: Colors.white),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
Reference in New Issue
Block a user