新增我的反馈 举报等接口对接
This commit is contained in:
parent
9255edfe38
commit
6236085e57
@ -94,7 +94,7 @@ class AboutappPage extends StatelessWidget {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: (){
|
onTap: (){
|
||||||
Get.toNamed(AppRoutes.WebViewActivity,arguments: {'title':"用户协议","url":"https://www.baidu.com"});
|
navigateToUserAgreement();
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
@ -118,7 +118,7 @@ class AboutappPage extends StatelessWidget {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: (){
|
onTap: (){
|
||||||
Get.toNamed(AppRoutes.WebViewActivity,arguments: {'title':"隐私协议","url":"https://www.baidu.com"});
|
navigateToPrivacyPolicy();
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
|
||||||
|
|
||||||
|
import 'package:circle_app/util/util.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
@ -9,11 +10,12 @@ import '../../common/config.dart';
|
|||||||
import '../../network/api.dart';
|
import '../../network/api.dart';
|
||||||
import '../../network/dio_manager.dart';
|
import '../../network/dio_manager.dart';
|
||||||
import '../../util/qiniu.dart';
|
import '../../util/qiniu.dart';
|
||||||
|
import '../call_out/logic.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class FeedbackLogic extends GetxController {
|
class FeedbackLogic extends GetxController {
|
||||||
final FeedbackState state = FeedbackState();
|
final FeedbackState state = FeedbackState();
|
||||||
|
TextEditingController textEditingController = TextEditingController();
|
||||||
final ImagePicker _picker = ImagePicker();
|
final ImagePicker _picker = ImagePicker();
|
||||||
var storage = Storage();
|
var storage = Storage();
|
||||||
var quToken = '';
|
var quToken = '';
|
||||||
@ -39,12 +41,36 @@ class FeedbackLogic extends GetxController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SmartDialog.showLoading();
|
SmartDialog.showLoading();
|
||||||
upDataImage(quToken,pickedFile!,CONFIG.USER_INFO_AVATAR,(result){
|
upDataImage(quToken,pickedFile,CONFIG.USER_INFO_AVATAR,(result){
|
||||||
SmartDialog.dismiss(force: true);
|
SmartDialog.dismiss(force: true);
|
||||||
state.imaglist.add(result);
|
state.imaglist.add(result);
|
||||||
update();
|
update();
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (_) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getFeedBack() async{
|
||||||
|
|
||||||
|
List myBean = [];
|
||||||
|
if (!state.imaglist.isEmpty) {
|
||||||
|
state.imaglist.forEach((element) {
|
||||||
|
myBean.add(MyBean(type: 1, url: element).toJson());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
textEditingController.text;
|
||||||
|
|
||||||
|
var data =
|
||||||
|
await DioManager.instance.post(url: Api.getFeedBack, params: {
|
||||||
|
'album': myBean,
|
||||||
|
'content': textEditingController.text,
|
||||||
|
'type':1
|
||||||
|
});
|
||||||
|
var bean = BaseResponse<dynamic>.fromJson(data, (jsonData) => jsonData,);
|
||||||
|
showToast(bean.msg);
|
||||||
|
if(bean.isSuccess()){
|
||||||
|
Get.back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ class FeedbackPage extends StatelessWidget {
|
|||||||
padding: EdgeInsets.all(13),
|
padding: EdgeInsets.all(13),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
maxLength: 200,
|
maxLength: 200,
|
||||||
|
controller: controller.textEditingController,
|
||||||
onChanged: (msg){
|
onChanged: (msg){
|
||||||
print(msg);
|
print(msg);
|
||||||
controller.state.maxMsg = '${msg.length}/200';
|
controller.state.maxMsg = '${msg.length}/200';
|
||||||
@ -63,6 +63,7 @@ class FeedbackPage extends StatelessWidget {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '请补充详细问题和意见,我们会认真看完的哦~',
|
hintText: '请补充详细问题和意见,我们会认真看完的哦~',
|
||||||
counterText: '',
|
counterText: '',
|
||||||
|
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Color(0xFFB7BECC), fontSize: 14.sp),
|
color: Color(0xFFB7BECC), fontSize: 14.sp),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
@ -135,7 +136,8 @@ class FeedbackPage extends StatelessWidget {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// showToast("完善资料");
|
// showToast("完善资料");
|
||||||
Get.toNamed(AppRoutes.Complete_materialPage, arguments: "user");
|
controller.getFeedBack();
|
||||||
|
// Get.toNamed(AppRoutes.Complete_materialPage, arguments: "user");
|
||||||
// controller.onInit();
|
// controller.onInit();
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
|
|||||||
@ -78,6 +78,24 @@ class FriendslistLogic extends GetxController {
|
|||||||
refreshController.loadComplete();
|
refreshController.loadComplete();
|
||||||
}
|
}
|
||||||
return ;
|
return ;
|
||||||
|
case "3":
|
||||||
|
var data =
|
||||||
|
await DioManager.instance.get(url: Api.visitList, params: {
|
||||||
|
'page':page
|
||||||
|
});
|
||||||
|
var bean = BaseResponse<User>.fromJson(data, (data) => User.fromJson(data));
|
||||||
|
if (bean.isSuccess()) {
|
||||||
|
lists.addAll(bean.data.lists);
|
||||||
|
}
|
||||||
|
|
||||||
|
isLoad = false;
|
||||||
|
update();
|
||||||
|
if(page == 1){
|
||||||
|
refreshController.refreshCompleted();
|
||||||
|
}else{
|
||||||
|
refreshController.loadComplete();
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,31 @@
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../network/api.dart';
|
||||||
|
import '../../network/dio_manager.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class HelpLogic extends GetxController {
|
class HelpLogic extends GetxController {
|
||||||
|
// @override
|
||||||
|
// void onInit() async{
|
||||||
|
// // TODO: implement onInit
|
||||||
|
// super.onInit();
|
||||||
|
// var data =
|
||||||
|
// await DioManager.instance.get(url: Api.getQuestions, params:{});
|
||||||
|
// BaseResponse<List<StoryBean>> bean = BaseResponse<List<StoryBean>>.fromJson(
|
||||||
|
// data,
|
||||||
|
// (jsonData) => List<StoryBean>.from(jsonData),
|
||||||
|
// );
|
||||||
|
// if (bean.isSuccess()) {
|
||||||
|
// msgList.clear();
|
||||||
|
// (bean.data as List<StoryBean> ).forEach((element) {
|
||||||
|
// lists.add(StoryBean(question:element.question,answers:element.answers,selected: false));
|
||||||
|
// });
|
||||||
|
// lists.addAll(bean.data);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
List<StoryBean> lists = [];
|
||||||
final HelpState state = HelpState();
|
final HelpState state = HelpState();
|
||||||
|
|
||||||
List<FaqItem> msgList = [
|
List<FaqItem> msgList = [
|
||||||
@ -41,3 +64,23 @@ class FaqItem {
|
|||||||
this.selected = false,
|
this.selected = false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class StoryBean {
|
||||||
|
final String question;
|
||||||
|
final List<String> answers;
|
||||||
|
bool selected = false;
|
||||||
|
|
||||||
|
StoryBean({
|
||||||
|
required this.question,
|
||||||
|
required this.answers,
|
||||||
|
this.selected = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory StoryBean.fromJson(Map<String, dynamic> json) {
|
||||||
|
return StoryBean(
|
||||||
|
question: json['question'],
|
||||||
|
answers: List<String>.from(json['answers']),
|
||||||
|
selected: false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -29,6 +29,14 @@ class HelpPage extends StatelessWidget {
|
|||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: MyAppBar(
|
appBar: MyAppBar(
|
||||||
centerTitle: '帮助与反馈',
|
centerTitle: '帮助与反馈',
|
||||||
|
actionWdiget: const Text(
|
||||||
|
"我的反馈",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Get.toNamed(AppRoutes.MyFeedBackListActivity);
|
||||||
|
//logic.onSubmit();
|
||||||
|
},
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
@ -1,14 +1,11 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
|
||||||
|
|
||||||
import 'package:circle_app/network/dio_manager.dart';
|
import 'package:circle_app/network/dio_manager.dart';
|
||||||
import 'package:circle_app/router/app_routers.dart';
|
import 'package:circle_app/router/app_routers.dart';
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:dio/dio.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
|
||||||
|
|
||||||
import '../../../network/api.dart';
|
import '../../../network/api.dart';
|
||||||
import '../../../util/SharedPreferencesHelper.dart';
|
import '../../../util/SharedPreferencesHelper.dart';
|
||||||
@ -86,8 +83,10 @@ class LoginLogic extends GetxController {
|
|||||||
|
|
||||||
Get.offNamed(AppRoutes.Complete_materialPage);
|
Get.offNamed(AppRoutes.Complete_materialPage);
|
||||||
return;
|
return;
|
||||||
}
|
}else{
|
||||||
showToast(bean.msg.toString());
|
showToast(bean.msg.toString());
|
||||||
|
}
|
||||||
|
|
||||||
// try {
|
// try {
|
||||||
// var response = await dio.post('user-service/login/smscode', data: {
|
// var response = await dio.post('user-service/login/smscode', data: {
|
||||||
// "phone": phoneEditingController.text,
|
// "phone": phoneEditingController.text,
|
||||||
|
|||||||
@ -199,7 +199,11 @@ class LoginPage extends StatelessWidget {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: 2.sp,
|
width: 2.sp,
|
||||||
),
|
),
|
||||||
Text(
|
GestureDetector(
|
||||||
|
onTap: (){
|
||||||
|
navigateToUserAgreement();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
'《用户协议》',
|
'《用户协议》',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xff00FFF4),
|
color: Color(0xff00FFF4),
|
||||||
@ -207,6 +211,7 @@ class LoginPage extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
'和',
|
'和',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -217,7 +222,11 @@ class LoginPage extends StatelessWidget {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: 2.sp,
|
width: 2.sp,
|
||||||
),
|
),
|
||||||
Text(
|
GestureDetector(
|
||||||
|
onTap: (){
|
||||||
|
navigateToPrivacyPolicy();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
'《隐私协议》',
|
'《隐私协议》',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xff00FFF4),
|
color: Color(0xff00FFF4),
|
||||||
@ -225,6 +234,7 @@ class LoginPage extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import 'package:circle_app/router/app_routers.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
|
||||||
|
|
||||||
import '../../util/SharedPreferencesHelper.dart';
|
import '../../util/SharedPreferencesHelper.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
@ -401,8 +400,8 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 65.sp,
|
width: 63.sp,
|
||||||
height: 65.sp,
|
height: 63.sp,
|
||||||
child: _buildAvatar1(logic),
|
child: _buildAvatar1(logic),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -410,12 +409,12 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 10),
|
padding: EdgeInsets.only(left: 10.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_buildNameRow(logic),
|
_buildNameRow(logic),
|
||||||
SizedBox(height: 18.sp),
|
SizedBox(height: 10.sp),
|
||||||
_buildInfoRow(logic),
|
_buildInfoRow(logic),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -445,14 +444,14 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
|
|
||||||
},
|
},
|
||||||
child:logic.userInfoBean==null ? Container(
|
child:logic.userInfoBean==null ? Container(
|
||||||
width: 65.sp,
|
width: 63.sp,
|
||||||
height: 65.sp,
|
height: 63.sp,
|
||||||
): CachedNetworkImage(
|
): CachedNetworkImage(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
placeholder: null,
|
placeholder: null,
|
||||||
imageUrl: logic.avatar,
|
imageUrl: logic.avatar,
|
||||||
width: 65.sp,
|
width: 63.sp,
|
||||||
height: 65.sp,
|
height: 63.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
10
circle_app/lib/app/myfeedbacklist/binding.dart
Normal file
10
circle_app/lib/app/myfeedbacklist/binding.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class MyfeedbacklistBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => MyfeedbacklistLogic());
|
||||||
|
}
|
||||||
|
}
|
||||||
110
circle_app/lib/app/myfeedbacklist/logic.dart
Normal file
110
circle_app/lib/app/myfeedbacklist/logic.dart
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
|
import '../../network/api.dart';
|
||||||
|
import '../../network/dio_manager.dart';
|
||||||
|
import 'state.dart';
|
||||||
|
|
||||||
|
class MyfeedbacklistLogic extends GetxController {
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
// TODO: implement onInit
|
||||||
|
super.onInit();
|
||||||
|
initList();
|
||||||
|
}
|
||||||
|
final MyfeedbacklistState state = MyfeedbacklistState();
|
||||||
|
|
||||||
|
List<Post> lists = [];
|
||||||
|
final RefreshController refreshController = RefreshController();
|
||||||
|
bool isLoad = true;
|
||||||
|
int page = 1;
|
||||||
|
initList() async{
|
||||||
|
if(page==1){
|
||||||
|
lists.clear();
|
||||||
|
}
|
||||||
|
var data =
|
||||||
|
await DioManager.instance.get(url: Api.getFeedBackList, params: {
|
||||||
|
'page': page,
|
||||||
|
'page_size':20
|
||||||
|
});
|
||||||
|
var bean = BaseResponse<PostList>.fromJson(
|
||||||
|
data, (data) => PostList.fromJson(data));
|
||||||
|
if (bean.isSuccess()) {
|
||||||
|
lists.addAll(bean.data.lists);
|
||||||
|
}
|
||||||
|
isLoad = false;
|
||||||
|
update();
|
||||||
|
if (page == 1) {
|
||||||
|
refreshController.refreshCompleted();
|
||||||
|
} else {
|
||||||
|
refreshController.loadComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Post {
|
||||||
|
int id;
|
||||||
|
String content;
|
||||||
|
List<Album> album;
|
||||||
|
dynamic reply;
|
||||||
|
String createTime;
|
||||||
|
int auditState;
|
||||||
|
|
||||||
|
Post({
|
||||||
|
required this.id,
|
||||||
|
required this.content,
|
||||||
|
required this.album,
|
||||||
|
required this.reply,
|
||||||
|
required this.createTime,
|
||||||
|
required this.auditState,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Post.fromJson(Map<String, dynamic> json) {
|
||||||
|
return Post(
|
||||||
|
id: json['id'],
|
||||||
|
content: json['content'],
|
||||||
|
album: List<Album>.from(json['album'].map((album) => Album.fromJson(album))),
|
||||||
|
reply: json['reply'],
|
||||||
|
createTime: json['create_time'],
|
||||||
|
auditState: json['audit_state'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Album {
|
||||||
|
int type;
|
||||||
|
String url;
|
||||||
|
|
||||||
|
Album({
|
||||||
|
required this.type,
|
||||||
|
required this.url,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Album.fromJson(Map<String, dynamic> json) {
|
||||||
|
return Album(
|
||||||
|
type: json['type'],
|
||||||
|
url: json['url'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PostList {
|
||||||
|
List<Post> lists;
|
||||||
|
int total;
|
||||||
|
|
||||||
|
PostList({
|
||||||
|
required this.lists,
|
||||||
|
required this.total,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory PostList.fromJson(Map<String, dynamic> json) {
|
||||||
|
return PostList(
|
||||||
|
lists: List<Post>.from(json['lists'].map((post) => Post.fromJson(post))),
|
||||||
|
total: json['total'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
5
circle_app/lib/app/myfeedbacklist/state.dart
Normal file
5
circle_app/lib/app/myfeedbacklist/state.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class MyfeedbacklistState {
|
||||||
|
MyfeedbacklistState() {
|
||||||
|
///Initialize variables
|
||||||
|
}
|
||||||
|
}
|
||||||
161
circle_app/lib/app/myfeedbacklist/view.dart
Normal file
161
circle_app/lib/app/myfeedbacklist/view.dart
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
|
import '../../components/my_app_bar.dart';
|
||||||
|
import '../../router/app_routers.dart';
|
||||||
|
import '../../util/util.dart';
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class MyfeedbacklistPage extends StatelessWidget {
|
||||||
|
MyfeedbacklistPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
final logic = Get.find<MyfeedbacklistLogic>();
|
||||||
|
final state = Get.find<MyfeedbacklistLogic>().state;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder<MyfeedbacklistLogic>(builder: (logic) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getBaseImage("home_back")),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
appBar: const MyAppBar(centerTitle: '我的反馈',),
|
||||||
|
body: SafeArea(
|
||||||
|
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
||||||
|
controller: logic.refreshController,
|
||||||
|
child: ListView.builder(
|
||||||
|
|
||||||
|
itemCount: logic.lists.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return ListTile(
|
||||||
|
title: ListItem(logic.lists[index]),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
onRefresh: _onRefresh,
|
||||||
|
onLoading: _onLoading,
|
||||||
|
),
|
||||||
|
),),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Widget ListItem(Post item) {
|
||||||
|
return Column(children: [
|
||||||
|
Text(item.createTime , style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.0.sp,
|
||||||
|
),),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 12.0,top: 12.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
color: Color(0xff282733),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
|
||||||
|
Container(
|
||||||
|
padding:
|
||||||
|
EdgeInsets.symmetric(vertical: 16.0.sp, horizontal: 16.0.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xff282733),
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(8.0.sp),
|
||||||
|
topRight: Radius.circular(8.0.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
item.content,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.0.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 120.sp,
|
||||||
|
child: GridView.builder(
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 3, // 每行显示的项目数量
|
||||||
|
),
|
||||||
|
itemCount:item.album.length, // Replace with your item count
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
|
||||||
|
// 后续项目,根据接口获取数据
|
||||||
|
// 假设通过接口获取到的数据存储在一个名为 data 的列表中
|
||||||
|
// var itemData = data[index - 1]; // 减去第一个固定图片的索引
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.all(5.sp),
|
||||||
|
child: Center(
|
||||||
|
child: _buildImageItem( item.album[index].url,// Replace with your item count
|
||||||
|
logic,index),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 16.sp,right: 16.sp,bottom: 16.sp),
|
||||||
|
child: Text(
|
||||||
|
item.reply!=null?"反馈回复:"+item.reply:"审核中",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.grey,
|
||||||
|
fontSize: 12.0.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Widget _buildImageItem(String url, MyfeedbacklistLogic controller, int index) {
|
||||||
|
return ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity, // 设置容器宽度为屏幕宽度
|
||||||
|
height: double.infinity, // 设置容器高度为屏幕高度
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// Get.toNamed(AppRoutes.Swiper, arguments: {
|
||||||
|
// 'imaglist': controller.lists.album,
|
||||||
|
// 'index': index
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
child: Image.network(
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
url,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onRefresh() async {
|
||||||
|
logic.page = 1;
|
||||||
|
logic.initList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onLoading() async {
|
||||||
|
logic.page = logic.page + 1;
|
||||||
|
logic.initList();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -56,7 +56,14 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GetBuilder(builder: (UserinfoLogic logic) {
|
return GetBuilder<UserinfoLogic>(
|
||||||
|
builder: (logic) {
|
||||||
|
return _buildPage(logic);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildPage(UserinfoLogic logic) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@ -80,25 +87,22 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
bottom: 27.sp,
|
bottom: 27.sp,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
child: _MeInfoButton(logic),
|
child: _MeInfoButton(logic),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Widget _MeInfoButton(UserinfoLogic controller) {
|
Widget _MeInfoButton(UserinfoLogic controller) {
|
||||||
if (controller.isMe) {
|
if (controller.isMe) {
|
||||||
return Container();
|
return const SizedBox();
|
||||||
} else {
|
} else {
|
||||||
return Container(
|
final likeButton = GestureDetector(
|
||||||
margin: EdgeInsets.only(left: 18.sp, right: 18.sp),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// showToast("鼓掌");
|
|
||||||
_showBottomSheet(context);
|
_showBottomSheet(context);
|
||||||
},
|
},
|
||||||
child: Image(
|
child: Image(
|
||||||
@ -106,15 +110,25 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
final likeText = Text(
|
||||||
|
controller.isLike ? "取消喜欢" : "喜欢",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.sp,
|
||||||
),
|
),
|
||||||
GestureDetector(
|
);
|
||||||
onTap: () {
|
|
||||||
logic.setLike();
|
final chatText = Text(
|
||||||
},
|
"私聊",
|
||||||
child: Container(
|
style: TextStyle(
|
||||||
width: 130.sp,
|
color: Colors.white,
|
||||||
height: 34.sp,
|
fontSize: 12.sp,
|
||||||
decoration: BoxDecoration(
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
final gradientDecoration = BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17.sp),
|
borderRadius: BorderRadius.circular(17.sp),
|
||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
colors: [
|
colors: [
|
||||||
@ -124,24 +138,13 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
begin: Alignment.centerLeft,
|
begin: Alignment.centerLeft,
|
||||||
end: Alignment.centerRight,
|
end: Alignment.centerRight,
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
child: Center(
|
|
||||||
child: Text(
|
final chatButton = GestureDetector(
|
||||||
logic.isLike ? "取消喜欢" : "喜欢",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 12.sp,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (logic.userInfoBean != null) {
|
if (logic.userInfoBean != null) {
|
||||||
pushChatPage(logic.imId, logic.userInfoBean!.nickname);
|
pushChatPage(logic.imId, logic.userInfoBean!.nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 130.sp,
|
width: 130.sp,
|
||||||
@ -157,24 +160,39 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
end: Alignment.centerRight,
|
end: Alignment.centerRight,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(child: chatText),
|
||||||
child: Text(
|
),
|
||||||
"私聊",
|
);
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
return Container(
|
||||||
fontSize: 12.sp,
|
margin: EdgeInsets.only(left: 18.sp, right: 18.sp),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
likeButton,
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
logic.setLike();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 130.sp,
|
||||||
|
height: 34.sp,
|
||||||
|
decoration: gradientDecoration,
|
||||||
|
child: Center(child: likeText),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
chatButton,
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget buildContent(UserinfoLogic controller) {
|
Widget buildContent(UserinfoLogic controller) {
|
||||||
|
final userInfoBean = controller.userInfoBean;
|
||||||
|
final interests = userInfoBean?.interests ?? [];
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 19.sp, vertical: 14.sp),
|
padding: EdgeInsets.symmetric(horizontal: 19.sp, vertical: 14.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -182,7 +200,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
_imagelistView(controller),
|
_imagelistView(controller),
|
||||||
Flexible(
|
Expanded(
|
||||||
child: buildUserContainer(controller),
|
child: buildUserContainer(controller),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -193,9 +211,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
controller.userInfoBean != null
|
userInfoBean?.nickname ?? "",
|
||||||
? controller.userInfoBean!.nickname
|
|
||||||
: "",
|
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Color.fromRGBO(247, 250, 250, 1.0),
|
color: Color.fromRGBO(247, 250, 250, 1.0),
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
@ -224,30 +240,26 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: logic.isOnline
|
color: logic.isOnline
|
||||||
? const Color(0xFF00FFF4)
|
? const Color(0xFF00FFF4)
|
||||||
: const Color(0xFF787575)),
|
: const Color(0xFF787575),
|
||||||
)
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
// margin: EdgeInsets.only(top: 18.sp, bottom: 18.sp),
|
|
||||||
height: 59.sp,
|
height: 59.sp,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemCount: controller.userInfoBean == null
|
itemCount: interests.length,
|
||||||
? 0
|
|
||||||
: controller.userInfoBean!.interests.length,
|
|
||||||
// 替换为实际的 item 数量
|
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
// 设置为水平方向
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 18.sp),
|
padding: EdgeInsets.symmetric(vertical: 18.sp),
|
||||||
// 替换为实际的边距值
|
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
|
final interest = interests[index];
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(right: 11.sp), // 替换为实际的 item 间距
|
margin: EdgeInsets.only(right: 11.sp),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17.0), // 设置圆角半径
|
borderRadius: BorderRadius.circular(17.0),
|
||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
colors: [
|
colors: [
|
||||||
Color(0xFF06F9FA),
|
Color(0xFF06F9FA),
|
||||||
@ -260,15 +272,18 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
margin: EdgeInsets.all(0.2.sp),
|
margin: EdgeInsets.all(0.2.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17.0),
|
borderRadius: BorderRadius.circular(17.0),
|
||||||
// shape: BoxShape.circle,
|
|
||||||
color: const Color(0xFF392D53),
|
color: const Color(0xFF392D53),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 2.sp, bottom: 2.sp, left: 15.sp, right: 15.sp),
|
top: 2.sp,
|
||||||
|
bottom: 2.sp,
|
||||||
|
left: 15.sp,
|
||||||
|
right: 15.sp,
|
||||||
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
controller.userInfoBean!.interests[index].title,
|
interest.title,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 11.0,
|
fontSize: 11.0,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -277,7 +292,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
), // 替换为实际的列表项小部件
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -290,14 +305,17 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
_imageAdapter(controller),
|
_imageAdapter(controller),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(bottom: 26.sp),
|
margin: EdgeInsets.only(bottom: 26.sp),
|
||||||
child: HomeCallOutView(controller.userId)),
|
child: HomeCallOutView(controller.userId),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
))
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget titleTab(UserinfoLogic controller) {
|
Widget titleTab(UserinfoLogic controller) {
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
@ -317,16 +335,17 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
Tab(
|
Tab(
|
||||||
text: "形象照",
|
text: "形象照",
|
||||||
),
|
),
|
||||||
Tab(text: "喊话")
|
Tab(text: "喊话"),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
controller.isMe
|
if (controller.isMe) {
|
||||||
? controller.isEdit = !controller.isEdit
|
controller.isEdit = !controller.isEdit;
|
||||||
: controller.urgeChange();
|
|
||||||
controller.update();
|
controller.update();
|
||||||
// controller.updataImage();
|
} else {
|
||||||
|
controller.urgeChange();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Visibility(
|
child: Visibility(
|
||||||
visible: logic.isShowAlbum,
|
visible: logic.isShowAlbum,
|
||||||
@ -342,8 +361,10 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
end: Alignment.centerRight,
|
end: Alignment.centerRight,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.symmetric(
|
||||||
top: 2.sp, bottom: 2.sp, left: 12.sp, right: 12.sp),
|
vertical: 2.sp,
|
||||||
|
horizontal: 12.sp,
|
||||||
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
controller.isMe
|
controller.isMe
|
||||||
? controller.isEdit
|
? controller.isEdit
|
||||||
@ -361,38 +382,40 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
));
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget _imageAdapter(UserinfoLogic controller) {
|
Widget _imageAdapter(UserinfoLogic controller) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
controller.isMe? Container(
|
if (controller.isMe)
|
||||||
|
Container(
|
||||||
margin: EdgeInsets.only(top: 18.sp, bottom: 14.sp),
|
margin: EdgeInsets.only(top: 18.sp, bottom: 14.sp),
|
||||||
child:
|
child: Text(
|
||||||
Text(
|
|
||||||
controller.isLikeFoMsg,
|
controller.isLikeFoMsg,
|
||||||
style: const TextStyle(color: Colors.white30),
|
style: const TextStyle(color: Colors.white30),
|
||||||
)):Container(),
|
),
|
||||||
Expanded(child: Container(
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
margin: const EdgeInsets.only(bottom: 58.0),
|
margin: const EdgeInsets.only(bottom: 58.0),
|
||||||
child: GridView.builder(
|
child: GridView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3, // 每行显示的项目数量
|
crossAxisCount: 3,
|
||||||
),
|
),
|
||||||
itemCount: controller.isMe
|
itemCount: controller.isMe
|
||||||
? controller.isEdit
|
? controller.isEdit
|
||||||
? controller.state.imaglist.length + 1
|
? controller.state.imaglist.length + 1
|
||||||
: controller.state.imaglist.length
|
: controller.state.imaglist.length
|
||||||
: controller.state.imaglist.length, // 项目的总数量,包括固定图片和接口获取的项目
|
: controller.state.imaglist.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
if (controller.isMe && controller.isEdit) {
|
if (controller.isMe && controller.isEdit) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
// 第一个项目,显示固定的图片
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
controller.getImageFile();
|
controller.getImageFile();
|
||||||
@ -411,7 +434,9 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
child: _buildImageItem(
|
child: _buildImageItem(
|
||||||
controller.state.imaglist[index - 1].url,
|
controller.state.imaglist[index - 1].url,
|
||||||
controller,
|
controller,
|
||||||
index - 1)),
|
index - 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -421,25 +446,29 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
child: _buildImageItem(
|
child: _buildImageItem(
|
||||||
controller.state.imaglist[index].url,
|
controller.state.imaglist[index].url,
|
||||||
controller,
|
controller,
|
||||||
index)),
|
index,
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
))
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
logic.isMe
|
if (logic.isMe)
|
||||||
? Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 26.sp,
|
bottom: 26.sp,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
// showToast("完善资料");
|
var data = await Get.toNamed(
|
||||||
var data = await Get.toNamed(AppRoutes.Complete_materialPage, arguments: "user");
|
AppRoutes.Complete_materialPage,
|
||||||
|
arguments: "user",
|
||||||
|
);
|
||||||
logic.onInit();
|
logic.onInit();
|
||||||
// controller.onInit();
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -454,8 +483,10 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
end: Alignment.centerRight,
|
end: Alignment.centerRight,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.symmetric(
|
||||||
top: 10.sp, bottom: 10.sp, left: 55.sp, right: 55.sp),
|
vertical: 10.sp,
|
||||||
|
horizontal: 55.sp,
|
||||||
|
),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
"完善个人形象",
|
"完善个人形象",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -465,8 +496,8 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
))
|
),
|
||||||
: Container()
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -487,7 +518,11 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
top: 2.sp,
|
||||||
|
bottom: 2.sp,
|
||||||
|
left: 10.sp,
|
||||||
|
right: 10.sp,
|
||||||
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
controller.ageMsg,
|
controller.ageMsg,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
@ -496,18 +531,18 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 6.sp),
|
const SizedBox(width: 6),
|
||||||
controller.isVip > 0
|
if (controller.isVip > 0)
|
||||||
? Image(
|
Image(
|
||||||
image: AssetImage(getBaseImage("vip")),
|
image: AssetImage(getBaseImage("vip")),
|
||||||
width: 44.sp,
|
width: 44.sp,
|
||||||
height: 18.sp,
|
height: 18.sp,
|
||||||
)
|
),
|
||||||
: Container(),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget buildUserContainer(UserinfoLogic controller) {
|
Widget buildUserContainer(UserinfoLogic controller) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 1.sp, vertical: 14.sp),
|
margin: EdgeInsets.symmetric(horizontal: 1.sp, vertical: 14.sp),
|
||||||
@ -554,11 +589,12 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
width: 66.sp,
|
width: 66.sp,
|
||||||
height: 66.sp,
|
height: 66.sp,
|
||||||
child: _buildAvatar1(controller),
|
child: _buildAvatar1(controller),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget _buildAvatar1(UserinfoLogic controller) {
|
Widget _buildAvatar1(UserinfoLogic controller) {
|
||||||
if (controller.userInfoBean == null) {
|
if (controller.userInfoBean == null) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
@ -588,11 +624,12 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget _buildImageItem(String url, UserinfoLogic controller, int index) {
|
Widget _buildImageItem(String url, UserinfoLogic controller, int index) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: double.infinity, // 设置容器宽度为屏幕宽度
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
@ -618,21 +655,23 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
right: 0,
|
right: 0,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// showToast("删除");
|
|
||||||
_showDelImgDialog(context, controller, index);
|
_showDelImgDialog(context, controller, index);
|
||||||
},
|
},
|
||||||
child: controller.isEdit
|
child: Visibility(
|
||||||
? Image(
|
visible: controller.isEdit,
|
||||||
|
child: Image(
|
||||||
image: AssetImage(getMineImage("icon_img_del")),
|
image: AssetImage(getMineImage("icon_img_del")),
|
||||||
width: 20.sp,
|
width: 20.sp,
|
||||||
height: 20.sp,
|
height: 20.sp,
|
||||||
)
|
),
|
||||||
: Container(),
|
),
|
||||||
))
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _showBottomSheet(BuildContext context) {
|
void _showBottomSheet(BuildContext context) {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
@ -655,11 +694,8 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
height: 118.0,
|
height: 118.0,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -681,11 +717,10 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
"举报",
|
"举报",
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 75.sp),
|
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@ -705,13 +740,13 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
"拉黑",
|
"拉黑",
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
));
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,6 +135,33 @@ class Api {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//意见反馈
|
||||||
|
static const getFeedBack = 'up-service/feedback';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//意见反馈列表
|
||||||
|
static const getFeedBackList = 'up-service/my/feedbacks';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// //圈子访客记录
|
||||||
|
// static const getInterestList = 'up-service/interest/20/users';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//猜你想问
|
||||||
|
static const getQuestions = 'up-service/guide/feedback/questions';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,8 @@ import 'package:circle_app/app/msg/binding.dart';
|
|||||||
import 'package:circle_app/app/msg/view.dart';
|
import 'package:circle_app/app/msg/view.dart';
|
||||||
import 'package:circle_app/app/my_circle/binding.dart';
|
import 'package:circle_app/app/my_circle/binding.dart';
|
||||||
import 'package:circle_app/app/my_circle/view.dart';
|
import 'package:circle_app/app/my_circle/view.dart';
|
||||||
|
import 'package:circle_app/app/myfeedbacklist/binding.dart';
|
||||||
|
import 'package:circle_app/app/myfeedbacklist/view.dart';
|
||||||
import 'package:circle_app/app/offaccount/binding.dart';
|
import 'package:circle_app/app/offaccount/binding.dart';
|
||||||
import 'package:circle_app/app/offaccount/view.dart';
|
import 'package:circle_app/app/offaccount/view.dart';
|
||||||
import 'package:circle_app/app/photoinfo/binding.dart';
|
import 'package:circle_app/app/photoinfo/binding.dart';
|
||||||
@ -172,5 +174,10 @@ class AppPages {
|
|||||||
page: () => My_circlePage(),
|
page: () => My_circlePage(),
|
||||||
binding: My_circleBinding(),
|
binding: My_circleBinding(),
|
||||||
),
|
),
|
||||||
|
GetPage(
|
||||||
|
name: AppRoutes.MyFeedBackListActivity,
|
||||||
|
page: () => MyfeedbacklistPage(),
|
||||||
|
binding: MyfeedbacklistBinding(),
|
||||||
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,4 +23,6 @@ abstract class AppRoutes {
|
|||||||
static const SelectCircleActivity = '/user/SelectCircleActivity';
|
static const SelectCircleActivity = '/user/SelectCircleActivity';
|
||||||
static const SplashActivity = '/user/SplashActivity';
|
static const SplashActivity = '/user/SplashActivity';
|
||||||
static const MyCircle = '/myCircle';
|
static const MyCircle = '/myCircle';
|
||||||
|
|
||||||
|
static const MyFeedBackListActivity = '/mine/MyFeedBackListActivity';
|
||||||
}
|
}
|
||||||
@ -249,3 +249,12 @@ Future<String> getLibraryDirectoryPath() async {
|
|||||||
final directory = await getLibraryDirectory();
|
final directory = await getLibraryDirectory();
|
||||||
return directory.path;
|
return directory.path;
|
||||||
}
|
}
|
||||||
|
//跳转到用户协议
|
||||||
|
navigateToUserAgreement(){
|
||||||
|
Get.toNamed(AppRoutes.WebViewActivity,arguments: {'title':"用户协议","url":"https://docs.qq.com/doc/DZVV1SkttZGlPUW1H"});
|
||||||
|
}
|
||||||
|
|
||||||
|
//跳转到隐私政策
|
||||||
|
navigateToPrivacyPolicy(){
|
||||||
|
Get.toNamed(AppRoutes.WebViewActivity,arguments: {'title':"隐私协议","url":"https://docs.qq.com/doc/DZXhvcXV6b1RNTUx1"});
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user