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

fix bug

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