Commit 8bbd03f9 authored by 林生雨's avatar 林生雨

fix bug

parent 256db5f0
...@@ -65,7 +65,7 @@ class MainActivity : FlutterActivity() { ...@@ -65,7 +65,7 @@ class MainActivity : FlutterActivity() {
val map = HashMap<String, String>() val map = HashMap<String, String>()
map.put("buildConfig", "debug") map.put("buildConfig", "debug")
//HERE //HERE
map.put("proxy", "172.30.9.84:6666"); // map.put("proxy", "172.30.9.84:6666");
result.success(map) result.success(map)
} else { } else {
result.notImplemented() result.notImplemented()
......
...@@ -9,6 +9,6 @@ import 'package:gmalpha_flutter/ActivityReportModel/page/ActivityReportPage.dart ...@@ -9,6 +9,6 @@ import 'package:gmalpha_flutter/ActivityReportModel/page/ActivityReportPage.dart
class ActivityReportRouterImpl implements ActivityReportRouter { class ActivityReportRouterImpl implements ActivityReportRouter {
@override @override
Widget getActivityReportPage(int id, int type,String fromPage) { Widget getActivityReportPage(int id, int type,String fromPage) {
return ActivityReportPage(id, type,fromPage); return new ActivityReportPage(id, type,fromPage);
} }
} }
...@@ -13,7 +13,6 @@ import 'package:gmalpha_flutter/commonModel/toast/toast.dart'; ...@@ -13,7 +13,6 @@ import 'package:gmalpha_flutter/commonModel/toast/toast.dart';
class ReputationsModel extends BaseModel { class ReputationsModel extends BaseModel {
LiveData<PrestigeEntity> prestigeLive; LiveData<PrestigeEntity> prestigeLive;
LiveData<String> titleLive; LiveData<String> titleLive;
final int userId; final int userId;
...@@ -23,6 +22,8 @@ class ReputationsModel extends BaseModel { ...@@ -23,6 +22,8 @@ class ReputationsModel extends BaseModel {
ReputationsModel(this.userId, this.userName, this.fromPage) { ReputationsModel(this.userId, this.userName, this.fromPage) {
prestigeLive = new LiveData(); prestigeLive = new LiveData();
titleLive = new LiveData(); titleLive = new LiveData();
print("lsy -->INIT!!!");
} }
init(BuildContext context) { init(BuildContext context) {
...@@ -41,5 +42,6 @@ class ReputationsModel extends BaseModel { ...@@ -41,5 +42,6 @@ class ReputationsModel extends BaseModel {
void dispose() { void dispose() {
prestigeLive.dispost(); prestigeLive.dispost();
titleLive.dispost(); titleLive.dispost();
print("lsy -->DISPOST!!!");
} }
} }
...@@ -16,6 +16,7 @@ class ReputationsPage extends StatefulWidget { ...@@ -16,6 +16,7 @@ class ReputationsPage extends StatefulWidget {
ReputationsModel _model; ReputationsModel _model;
ReputationsPage(int userId, String userName, String fromPage) { ReputationsPage(int userId, String userName, String fromPage) {
print("lsy --> ONEN PAGE");
_model = new ReputationsModel(userId, userName, fromPage); _model = new ReputationsModel(userId, userName, fromPage);
} }
...@@ -60,7 +61,7 @@ class ReputationsState extends BasePage<ReputationsPage> { ...@@ -60,7 +61,7 @@ class ReputationsState extends BasePage<ReputationsPage> {
RouterCenterImpl() RouterCenterImpl()
.findBuriedRouter() .findBuriedRouter()
?.onClick(pageName(), "return"); ?.onClick(pageName(), "return");
Navigator.pop(context,""); Navigator.pop(context, "");
}, },
// child: Image.asset("images/nav_back.png"), // child: Image.asset("images/nav_back.png"),
child: Center( child: Center(
......
...@@ -13,7 +13,7 @@ class TestPage extends StatelessWidget { ...@@ -13,7 +13,7 @@ class TestPage extends StatelessWidget {
TestPage() { TestPage() {
Api.getInstance().setDioCookie({ Api.getInstance().setDioCookie({
'Cookie': 'Cookie':
'sessionid=ptudnleishg9tkizlcf8k1nna4fclncc;_gtid=daf0b158ee3211e9ab2e525400e82fab3575;_gm_token=7600f21571024088' 'sessionid=ptudnleishg9tkizlcf8k1nna4fclncc;_gtid=daf0b158ee3211e9ab2e525400e82fab3575;_gm_token=7600f21571024088'
}); });
} }
...@@ -33,52 +33,52 @@ class TestPage extends StatelessWidget { ...@@ -33,52 +33,52 @@ class TestPage extends StatelessWidget {
)); ));
} }
base(BuildContext context, Widget page, String itemName) { base(BuildContext context, VoidCallback callback, String itemName) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16, 16, 16, 0), margin: EdgeInsets.fromLTRB(16, 16, 16, 0),
child: OutlineButton( child: OutlineButton(
onPressed: () { onPressed: callback,
Navigator.push(
context,
new CustomRoute(page));
},
child: Text(itemName), child: Text(itemName),
), ),
); );
} }
testReportPage(BuildContext context) { testReportPage(BuildContext context) {
return base( return base(context, () {
context, Navigator.push(
RouterCenterImpl() context,
.findActivityReportRouter() new CustomRoute(RouterCenterImpl()
?.getActivityReportPage(2, 1, ''), .findActivityReportRouter()
"报告页面"); ?.getActivityReportPage(2, 1, '')));
}, "报告页面");
} }
presigePage(BuildContext context) { presigePage(BuildContext context) {
return base( return base(context, () {
context, Navigator.push(
RouterCenterImpl() context,
.findPrestigeRouter() new CustomRoute(RouterCenterImpl()
?.getReputationsPage(1, "ww", "ww"), .findPrestigeRouter()
"专家声望页面"); ?.getReputationsPage(1, "ww", "ww")));
}, "专家声望页面");
} }
albumPage(BuildContext context) { albumPage(BuildContext context) {
return base( return base(context, () {
context, Navigator.push(
RouterCenterImpl().findAlbumRouter()?.getAlbumPage( context,
"com.example.gengmei_flutter_plugin_example", true, 1, null), new CustomRoute(RouterCenterImpl().findAlbumRouter()?.getAlbumPage(
"相册页面"); "com.example.gengmei_flutter_plugin_example", true, 1, null)));
}, "相册页面");
} }
userSettingPage(BuildContext context) { userSettingPage(BuildContext context) {
return base( return base(context, () {
context, Navigator.push(
RouterCenterImpl() context,
.findUserRouter() new CustomRoute(RouterCenterImpl()
?.getUserSettingPage("241765462", "NULL"), .findUserRouter()
"设置页面"); ?.getUserSettingPage("241765462", "NULL")));
}, "设置页面");
} }
} }
...@@ -9,6 +9,7 @@ class LiveData<T> { ...@@ -9,6 +9,7 @@ class LiveData<T> {
T data; T data;
LiveData() { LiveData() {
print("!!!! ${_controller == null}");
this._controller = new StreamController<T>(); this._controller = new StreamController<T>();
} }
...@@ -22,6 +23,7 @@ class LiveData<T> { ...@@ -22,6 +23,7 @@ class LiveData<T> {
} }
void dispost() { void dispost() {
data = null;
_controller.close(); _controller.close();
} }
} }
...@@ -21,8 +21,10 @@ class CommentModel extends BaseModel { ...@@ -21,8 +21,10 @@ class CommentModel extends BaseModel {
.findBuriedRouter() .findBuriedRouter()
?.onEvent('click_comment_suggest', {'comment_id': '10086'}); ?.onEvent('click_comment_suggest', {'comment_id': '10086'});
UserRepository.getInstance().commentSuggest(content, phone).listen((value) { UserRepository.getInstance().commentSuggest(content, phone).listen((value) {
Toast.show(context, "提交成功");
Navigator.pop(context); Navigator.pop(context);
}).onError((error){ }).onError((error) {
Toast.show(context, "提交失败");
Toast.debugShow(context, error.message); Toast.debugShow(context, error.message);
print(error.message); print(error.message);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment