pull/1/head
张萌 2 years ago
commit 354759fc8b

@ -104,7 +104,10 @@ class _User {
class _Login {
///app退
String get logOut => '/app/user/quit';
String get quit => '/app/user/quit';
///app
String get logOut =>'/app/user/logout';
///
String get allCommunity => '/app/login/findAllCommunity';

@ -110,7 +110,9 @@ class _HomePageState extends State<HomePage>
right: 32.w,
left: 32.w,
bottom: 20.w),
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// if (appProvider.location != null)
Image.asset(
Assets.home.icLocation.path,
@ -168,8 +170,10 @@ class _HomePageState extends State<HomePage>
},
child: Image.asset(Assets.home.icMessage.path,
height: 48.w, width: 48.w),
)),
]),
),
),
],
),
);
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.dark,
@ -359,7 +363,8 @@ class _HomePageState extends State<HomePage>
),
),
onTap: () async {
Get.to(AdvicePage(type: AdviceType.SUGGESTION));
Get.to(AdvicePage(
type: AdviceType.SUGGESTION));
},
),
)

@ -1,3 +1,4 @@
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -7,6 +8,9 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import '../../utils/network/base_model.dart';
import '../../utils/network/net_util.dart';
class AccountManagerPage extends StatefulWidget {
AccountManagerPage({Key? key}) : super(key: key);
@ -37,9 +41,12 @@ class _AccountManagerPageState extends State<AccountManagerPage> {
color: Colors.red.withOpacity(0.7),
),
),
onPressed: () {
//
onPressed: () async {
BaseModel baseModel =
await NetUtil().post(SAASAPI.login.logOut);
if (baseModel.success) {
Get.offAll(() => OtherLoginPage());
}
},
),
],

@ -143,10 +143,10 @@ class _SettingsPageState extends State<SettingsPage> {
title: '意见反馈',
onTap: () => Get.to(() => FeedBackPage()),
),
// _buildTile(
// title: '账号管理',
// onTap: () => Get.to(() => AccountManagerPage()),
// ),
_buildTile(
title: '账号管理',
onTap: () => Get.to(() => AccountManagerPage()),
),
_buildTile(
title: '用户协议',
onTap: () => Get.to(() => AgreementPage()),

@ -58,7 +58,7 @@ class UserProvider extends ChangeNotifier {
final appProvider = Provider.of<AppProvider>(Get.context!, listen: false);
appProvider.setCurrentHouse(null);
if (_isLogin) {
NetUtil().post(SAASAPI.login.logOut, showMessage: true);
NetUtil().post(SAASAPI.login.quit, showMessage: true);
NetUtil().dio!.options.headers.remove('app-login-token');
_isLogin = false;
}

@ -106,7 +106,6 @@ class _EventDetailPageState extends State<EventDetailPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
leading: Navigator.canPop(context)
? IconButton(
onPressed: () => Get.back(result: true),
@ -116,8 +115,6 @@ class _EventDetailPageState extends State<EventDetailPage> {
),
)
: SizedBox(),
title: '详情',
bottomNavi: _bottomButton(),
actions: [
@ -303,7 +300,8 @@ class _EventDetailPageState extends State<EventDetailPage> {
);
}
Widget _commentWidget(CommentListModel model, int rootIndex) {
Widget _commentWidget(CommentListModel model, int rootIndex){
final userProvider = Provider.of<UserProvider>(context);
return GestureDetector(
onTap: () {
_rootId = model.id;
@ -363,9 +361,9 @@ class _EventDetailPageState extends State<EventDetailPage> {
),
Spacer(),
CommunityPopButton(
isMyself: _isMyself,
isMyself: userProvider.userInfoModel?.id==model.createId,
onSelect: (value) async {
if (_isMyself) {
if (userProvider.userInfoModel?.id==model.createId) {
await CommunityFunc.deleteComment(model.id);
_refreshController.callRefresh();
}
@ -374,18 +372,7 @@ class _EventDetailPageState extends State<EventDetailPage> {
40.hb,
model.content.text.size(28.sp).color(ktextSubColor).make(),
30.hb,
GestureDetector(
onTap: () async {
var res =
await NetUtil().get(SAASAPI.community.commentLike, params: {
'commentId': model.id,
});
if (res.success) {
_likes[rootIndex] = !_likes[rootIndex];
setState(() {});
}
},
child: Row(
Row(
children: [
Spacer(),
GestureDetector(
@ -448,7 +435,6 @@ class _EventDetailPageState extends State<EventDetailPage> {
.make(),
],
),
),
40.hb,
model.commentTwoList.isEmpty
? SizedBox.shrink()
@ -535,7 +521,7 @@ class _EventDetailPageState extends State<EventDetailPage> {
fontSize: 28.sp,
),
children: [
if (model.createId ==widget.createId)
if (model.createId == widget.createId)
WidgetSpan(
child: Container(
width: 56.w,
@ -584,7 +570,6 @@ class _EventDetailPageState extends State<EventDetailPage> {
}
_bottomButton() {
final userProvider = Provider.of<UserProvider>(context);
return Container(
width: double.infinity,
height: 100.w,

@ -247,6 +247,7 @@ class _ChatCardState extends State<ChatCard> {
],
),
Spacer(),
CommunityPopButton(
isMyself: _isMyself,
onSelect: (dynamic _) async {

@ -62,6 +62,7 @@ class _WorkOrderPageState extends State<WorkOrderPage>
appBarBottom: BeeTabBar(
tabs: _tabs,
controller: _tabController,
scrollable: true,
),
body: TabBarView(
controller: _tabController,

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
class BeeTabBar extends StatefulWidget with PreferredSizeWidget {
final TabController? controller;

Loading…
Cancel
Save