2.1.6代码提交
This commit is contained in:
parent
2b27857857
commit
931fb699c6
@ -71,8 +71,8 @@ android {
|
|||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 64
|
versionCode 67
|
||||||
versionName "2.1.4"
|
versionName "2.1.7"
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
vivo_APPID: "105669716",
|
vivo_APPID: "105669716",
|
||||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
@ -97,6 +97,8 @@ android {
|
|||||||
project.ext.enableFlutterNullSafety = false
|
project.ext.enableFlutterNullSafety = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
@ -105,4 +107,5 @@ flutter {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.1.1</string>
|
<string>2.1.6</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
|
|||||||
@ -282,9 +282,11 @@ class _TUIChatState extends TIMUIKitState<TIMChat> {
|
|||||||
var result = await DioManager.instance
|
var result = await DioManager.instance
|
||||||
.get(url: '${Api.setBlock + otherUserBean!.id!.toString()}/block');
|
.get(url: '${Api.setBlock + otherUserBean!.id!.toString()}/block');
|
||||||
isBlack = result["data"]["status"] == 1;
|
isBlack = result["data"]["status"] == 1;
|
||||||
setState(() {
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _renderJoinGroupApplication(int amount, TUITheme theme) {
|
Widget _renderJoinGroupApplication(int amount, TUITheme theme) {
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import 'package:circle_app/net/api.dart';
|
|||||||
import 'package:circle_app/net/dio_manager.dart';
|
import 'package:circle_app/net/dio_manager.dart';
|
||||||
import 'package:circle_app/router/routers.dart';
|
import 'package:circle_app/router/routers.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
|
import 'package:flutter/foundation.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';
|
||||||
@ -19,7 +20,9 @@ import '../../utils/SharedPreferencesHelper.dart';
|
|||||||
import '../../utils/cache_img.dart';
|
import '../../utils/cache_img.dart';
|
||||||
import '../../utils/eventBus.dart';
|
import '../../utils/eventBus.dart';
|
||||||
import '../home/logic.dart';
|
import '../home/logic.dart';
|
||||||
|
import '../select_circle/logic.dart';
|
||||||
import '../userinfo/logic.dart';
|
import '../userinfo/logic.dart';
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
class ChatPage extends StatefulWidget {
|
class ChatPage extends StatefulWidget {
|
||||||
ChatPage({Key? key}) : super(key: key);
|
ChatPage({Key? key}) : super(key: key);
|
||||||
@ -34,7 +37,7 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
// final state = Get.find<ChatLogic>().state;
|
// final state = Get.find<ChatLogic>().state;
|
||||||
|
|
||||||
bool isShowTip = false;
|
bool isShowTip = false;
|
||||||
String tip = 'Ta主页形象质量不错哦,您也完善一下呗,点击前往';
|
String tip = 'TA上传了形象照,您上传后更方便了解哦,点击前往';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
@ -107,11 +110,18 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
List list = myAlbumBean.data.lists ?? [];
|
List list = myAlbumBean.data.lists ?? [];
|
||||||
if (list.isEmpty) {
|
if (list.isEmpty) {
|
||||||
isShowTip = true;
|
isShowTip = true;
|
||||||
tip = '您还没上传照片,上传后更方便了解,点击前往';
|
// tip = '您还没上传照片,上传后更方便了解,点击前往';
|
||||||
} else {
|
} else {
|
||||||
if (otherUserBean!.userType == 1 && userInfoBean!.userType != 1) {
|
// bool isMyHave = await loadCallOutListData(userInfoBean!.id!.toString());
|
||||||
|
// bool isOtherHave = await loadCallOutListData(otherUserBean!.id!.toString());
|
||||||
|
// if (isOtherHave && !isMyHave) {
|
||||||
|
// isShowTip = true;
|
||||||
|
// tip = 'TA发布了喊话,您发布后形象会更完善,点击前往';
|
||||||
|
// } else if (otherUserBean!.userType == 1 && userInfoBean!.userType != 1) {
|
||||||
isShowTip = true;
|
isShowTip = true;
|
||||||
}
|
|
||||||
|
tip = 'TA完成了good号认证,您认证后可获得多种特权,联系客服';
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
if (isShowTip) {
|
if (isShowTip) {
|
||||||
//处理七天后是否显示X按钮
|
//处理七天后是否显示X按钮
|
||||||
@ -146,7 +156,18 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
loadCallOutListData(String userId) async {
|
||||||
|
var data = await DioManager.instance.get(
|
||||||
|
url: "/up-service/${userId.isEmpty ? 'my/' : 'user/' + userId}/callouts",
|
||||||
|
params: {"page": 1, "page_size": "2"});
|
||||||
|
if (data["code"] == 200) {
|
||||||
|
List dataList = data["data"]["lists"] ?? [];
|
||||||
|
return dataList.length == 2;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -338,16 +359,27 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
Get.toNamed(Routes.UserInfoPage)!.then((value) {
|
if (tip.contains('形象')) {
|
||||||
loadMyInfo();
|
Get.toNamed(Routes.UserInfoPage)!.then((value) {
|
||||||
});
|
loadMyInfo();
|
||||||
|
});
|
||||||
|
} else if (tip.contains('喊话')) {
|
||||||
|
List<MyConfigData> numbers = [];
|
||||||
|
Get.toNamed(Routes.CallOutPage,
|
||||||
|
arguments: {'numbers': numbers});
|
||||||
|
} else {
|
||||||
|
var result = await DioManager.instance.post(url: Api.goodAuth);
|
||||||
|
if (result['code'] == 200) {
|
||||||
|
showOKToast('发送成功');
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: Get.width - 16,
|
width: Get.width - 16,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
margin: EdgeInsets.only(top:MediaQuery.of(context).padding.top + 45),
|
margin: EdgeInsets.only(top:MediaQuery.of(context).padding.top + 45),
|
||||||
padding: EdgeInsets.fromLTRB(16.sp, 0.sp, 16.sp, 0.sp),
|
padding: EdgeInsets.fromLTRB(8.sp, 0.sp, 8.sp, 0.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
color: Color(0xFF353443),
|
color: Color(0xFF353443),
|
||||||
@ -359,7 +391,7 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
tip,
|
tip,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 13.sp,
|
fontSize: 12.sp,
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
|||||||
@ -48,25 +48,37 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
// title
|
// title
|
||||||
|
|
||||||
var recommendCircleFriendData = data['data'];
|
var recommendCircleFriendData = data['data'];
|
||||||
|
List tagList = recommendCircleFriendData['tags'];
|
||||||
|
if (tagList.isNotEmpty) {
|
||||||
|
title = tagList.first;
|
||||||
|
recommendCircleFriendData['tags'] = tagList;
|
||||||
|
Map cardInfo = checkCardReturnData(recommendCircleFriendData);
|
||||||
|
|
||||||
if (recommendCircleFriendData['is_follow_me']) {
|
cardInfo['user'] = {'signature':info['user']['signature']};
|
||||||
title = '对方喜欢了你';
|
cardInfo['my']= {'signature':info['my']['signature']};
|
||||||
} else if (recommendCircleFriendData['is_follow_to']) {
|
cardInfo['interests'] = info['interests'];
|
||||||
title = '你喜欢了TA';
|
cardInfo['myInterests'] = info['myInterests'];
|
||||||
} else if (recommendCircleFriendData['has_both_friend']) {
|
title = cardInfo['desc'];
|
||||||
title = '你们有共同喜欢的圈友';
|
info = cardInfo;
|
||||||
} else if (recommendCircleFriendData['is_new_user']) {
|
} else {
|
||||||
title = '我刚来到这里哦';
|
if (recommendCircleFriendData['is_follow_me']) {
|
||||||
} else if (recommendCircleFriendData['has_friend_follow_to']) {
|
title = '对方喜欢了你';
|
||||||
title = '你喜欢的圈友也喜欢TA';
|
} else if (recommendCircleFriendData['is_follow_to']) {
|
||||||
} else if (recommendCircleFriendData['is_wanna_meet']) {
|
title = '你喜欢了TA';
|
||||||
title = '很多圈友都喜欢TA';
|
} else if (recommendCircleFriendData['has_both_friend']) {
|
||||||
} else if (recommendCircleFriendData['is_excellent_qz_leader']) {
|
title = '你们有共同喜欢的圈友';
|
||||||
title = 'TA是乐园优秀圈主哦~';
|
} else if (recommendCircleFriendData['is_new_user']) {
|
||||||
} else if (recommendCircleFriendData['is_most_fans']) {
|
title = '我刚来到这里哦';
|
||||||
title = '可能是你想认识的人';
|
} else if (recommendCircleFriendData['has_friend_follow_to']) {
|
||||||
|
title = '你喜欢的圈友也喜欢TA';
|
||||||
|
} else if (recommendCircleFriendData['is_wanna_meet']) {
|
||||||
|
title = '很多圈友都喜欢TA';
|
||||||
|
} else if (recommendCircleFriendData['is_excellent_qz_leader']) {
|
||||||
|
title = 'TA是乐园优秀圈主哦~';
|
||||||
|
} else if (recommendCircleFriendData['is_most_fans']) {
|
||||||
|
title = '可能是你想认识的人';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,6 +198,66 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (info.containsKey('desc1'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Text(
|
||||||
|
info['desc1'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (info.containsKey('desc2'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Text(
|
||||||
|
info['desc2'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
|
|||||||
@ -72,24 +72,42 @@ class CircleLogic extends GetxController {
|
|||||||
List<BannerItem> bannerList = [];
|
List<BannerItem> bannerList = [];
|
||||||
|
|
||||||
List<MyConfigData> genderList
|
List<MyConfigData> genderList
|
||||||
= [];
|
= [
|
||||||
|
MyConfigData('0', '全部', true)
|
||||||
|
];
|
||||||
|
|
||||||
List<MyConfigData> orientationList = [];
|
List<MyConfigData> orientationList = [
|
||||||
|
MyConfigData('0', '全部', false)
|
||||||
|
];
|
||||||
|
|
||||||
List<MyConfigData> roleList = [];
|
List<MyConfigData> roleList = [
|
||||||
|
MyConfigData('0', '全部', false)
|
||||||
|
];
|
||||||
|
|
||||||
List<MyConfigData> dis_genderList = [];
|
List<MyConfigData> dis_genderList = [
|
||||||
|
MyConfigData('0', '全部', true)
|
||||||
|
];
|
||||||
|
|
||||||
List<MyConfigData> dis_orientationList = [];
|
List<MyConfigData> dis_orientationList = [
|
||||||
|
MyConfigData('0', '全部', false)
|
||||||
|
];
|
||||||
|
|
||||||
List<MyConfigData> dis_roleList = [];
|
List<MyConfigData> dis_roleList = [
|
||||||
|
MyConfigData('0', '全部', false)
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
List<MyConfigData> new_genderList = [];
|
List<MyConfigData> new_genderList = [
|
||||||
|
MyConfigData('0', '全部', true)
|
||||||
|
];
|
||||||
|
|
||||||
List<MyConfigData> new_orientationList = [];
|
List<MyConfigData> new_orientationList = [
|
||||||
|
MyConfigData('0', '全部', false)
|
||||||
|
];
|
||||||
|
|
||||||
List<MyConfigData> new_roleList = [];
|
List<MyConfigData> new_roleList = [
|
||||||
|
MyConfigData('0', '全部', false)
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
List newPeopleList = [];
|
List newPeopleList = [];
|
||||||
@ -125,7 +143,6 @@ class CircleLogic extends GetxController {
|
|||||||
loadCirclePeopleData();
|
loadCirclePeopleData();
|
||||||
initGerder();
|
initGerder();
|
||||||
getCityList();
|
getCityList();
|
||||||
|
|
||||||
getBanner();
|
getBanner();
|
||||||
// getNearByList();
|
// getNearByList();
|
||||||
startTimer();
|
startTimer();
|
||||||
@ -199,11 +216,17 @@ class CircleLogic extends GetxController {
|
|||||||
ConfigBean configBean = bean1.data!;
|
ConfigBean configBean = bean1.data!;
|
||||||
|
|
||||||
configBean.genderMap.forEach((key, value) {
|
configBean.genderMap.forEach((key, value) {
|
||||||
genderList.add(MyConfigData(key, value, false));
|
if (int.parse(key) < 3) {
|
||||||
dis_genderList.add(MyConfigData(key, value, false));
|
genderList.add(MyConfigData(key, value, true));
|
||||||
new_genderList.add(MyConfigData(key, value, false));
|
dis_genderList.add(MyConfigData(key, value, true));
|
||||||
|
new_genderList.add(MyConfigData(key, value, true));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
genderList.add(MyConfigData('-1', '非二元', true));
|
||||||
|
dis_genderList.add(MyConfigData('-1', '非二元', true));
|
||||||
|
new_genderList.add(MyConfigData('-1', '非二元', true));
|
||||||
|
|
||||||
configBean.orientationMap.forEach((key, value) {
|
configBean.orientationMap.forEach((key, value) {
|
||||||
orientationList.add(MyConfigData(key, value, false));
|
orientationList.add(MyConfigData(key, value, false));
|
||||||
dis_orientationList.add(MyConfigData(key, value, false));
|
dis_orientationList.add(MyConfigData(key, value, false));
|
||||||
@ -365,18 +388,18 @@ class CircleLogic extends GetxController {
|
|||||||
void getNearByList() async {
|
void getNearByList() async {
|
||||||
List<String> genders = [];
|
List<String> genders = [];
|
||||||
genderList.forEach((element) {
|
genderList.forEach((element) {
|
||||||
if (element.isSelect) {
|
if (element.isSelect && element.id != '0') {
|
||||||
genders.add(element.id);
|
genders.add(element.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
List<String> roles = [];
|
List<String> roles = [];
|
||||||
roleList.forEach((element) {
|
roleList.forEach((element) {
|
||||||
if (element.isSelect) roles.add(element.id);
|
if (element.isSelect && element.id != '0') roles.add(element.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
List<String> orientations = [];
|
List<String> orientations = [];
|
||||||
orientationList.forEach((element) {
|
orientationList.forEach((element) {
|
||||||
if (element.isSelect) orientations.add(element.id);
|
if (element.isSelect && element.id != '0') orientations.add(element.id);
|
||||||
});
|
});
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
getBanner();
|
getBanner();
|
||||||
@ -391,7 +414,7 @@ class CircleLogic extends GetxController {
|
|||||||
'flush': flush,
|
'flush': flush,
|
||||||
"orientations": orientations
|
"orientations": orientations
|
||||||
});
|
});
|
||||||
isNearLoad = false;
|
// isNearLoad = false;
|
||||||
var bean = BaseResponse<VicinityBean>.fromJson(
|
var bean = BaseResponse<VicinityBean>.fromJson(
|
||||||
data, (data) => VicinityBean.fromJson(data));
|
data, (data) => VicinityBean.fromJson(data));
|
||||||
|
|
||||||
@ -421,7 +444,6 @@ class CircleLogic extends GetxController {
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (vicinityPage == 1) {
|
if (vicinityPage == 1) {
|
||||||
vicinityList.addAll(bean.data.users);
|
vicinityList.addAll(bean.data.users);
|
||||||
} else {
|
} else {
|
||||||
@ -463,6 +485,7 @@ class CircleLogic extends GetxController {
|
|||||||
|
|
||||||
} else if (isShowLocationDialog == false) {
|
} else if (isShowLocationDialog == false) {
|
||||||
isShowLocationDialog = true;
|
isShowLocationDialog = true;
|
||||||
|
update();
|
||||||
locationDialog();
|
locationDialog();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -485,6 +508,7 @@ class CircleLogic extends GetxController {
|
|||||||
refreshController.loadComplete();
|
refreshController.loadComplete();
|
||||||
update();
|
update();
|
||||||
} else if (bean.code == 404) {
|
} else if (bean.code == 404) {
|
||||||
|
isNearLoad = false;
|
||||||
showOKToast(bean.msg);
|
showOKToast(bean.msg);
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
@ -503,18 +527,18 @@ class CircleLogic extends GetxController {
|
|||||||
isLoadFail = false;
|
isLoadFail = false;
|
||||||
List<String> genders = [];
|
List<String> genders = [];
|
||||||
new_genderList.forEach((element) {
|
new_genderList.forEach((element) {
|
||||||
if (element.isSelect) {
|
if (element.isSelect && element.id != '0' ) {
|
||||||
genders.add(element.id);
|
genders.add(element.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
List<String> roles = [];
|
List<String> roles = [];
|
||||||
new_roleList.forEach((element) {
|
new_roleList.forEach((element) {
|
||||||
if (element.isSelect) roles.add(element.id);
|
if (element.isSelect && element.id != '0' ) roles.add(element.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
List<String> orientations = [];
|
List<String> orientations = [];
|
||||||
new_orientationList.forEach((element) {
|
new_orientationList.forEach((element) {
|
||||||
if (element.isSelect) orientations.add(element.id);
|
if (element.isSelect && element.id != '0' ) orientations.add(element.id);
|
||||||
});
|
});
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
getBanner();
|
getBanner();
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class Lists {
|
|||||||
bool? isQueen;
|
bool? isQueen;
|
||||||
User? user;
|
User? user;
|
||||||
Map? interest;
|
Map? interest;
|
||||||
|
int? userTop;
|
||||||
String? create_time;
|
String? create_time;
|
||||||
Lists(
|
Lists(
|
||||||
{this.album, this.chat, this.content, this.id, this.isQueen, this.user});
|
{this.album, this.chat, this.content, this.id, this.isQueen, this.user});
|
||||||
@ -36,6 +37,7 @@ class Lists {
|
|||||||
interest = json['interest'] ?? {};
|
interest = json['interest'] ?? {};
|
||||||
create_time = json['create_time'] ?? '';
|
create_time = json['create_time'] ?? '';
|
||||||
isQueen = json['is_queen'];
|
isQueen = json['is_queen'];
|
||||||
|
userTop = json['userTop'] ?? 0;
|
||||||
user = json['user'] != null ? new User.fromJson(json['user']) : null;
|
user = json['user'] != null ? new User.fromJson(json['user']) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:get/utils.dart';
|
import 'package:get/utils.dart';
|
||||||
import 'package:gradient_borders/gradient_borders.dart';
|
import 'package:gradient_borders/gradient_borders.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:keframe/keframe.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
import '../../../../utils/eventBus.dart';
|
import '../../../../utils/eventBus.dart';
|
||||||
import '../../../utils/cache_img.dart';
|
import '../../../utils/cache_img.dart';
|
||||||
@ -55,6 +56,7 @@ class _DiscoverState extends State<Discover>
|
|||||||
bool isMore = true;
|
bool isMore = true;
|
||||||
|
|
||||||
bool loadFail = false;
|
bool loadFail = false;
|
||||||
|
bool isLoadMore = false;
|
||||||
int index = 1;
|
int index = 1;
|
||||||
List tagList = [];
|
List tagList = [];
|
||||||
|
|
||||||
@ -72,6 +74,8 @@ class _DiscoverState extends State<Discover>
|
|||||||
|
|
||||||
double screenHeight = 0;
|
double screenHeight = 0;
|
||||||
|
|
||||||
|
final GlobalKey _key = GlobalKey();
|
||||||
|
|
||||||
void animateToOffset(ScrollController controller, double offset,
|
void animateToOffset(ScrollController controller, double offset,
|
||||||
void Function() onScrollCompleted) {
|
void Function() onScrollCompleted) {
|
||||||
controller
|
controller
|
||||||
@ -100,6 +104,14 @@ class _DiscoverState extends State<Discover>
|
|||||||
pointerEnd = event.position;
|
pointerEnd = event.position;
|
||||||
touchRangeY = pointerStart.dy - pointerEnd.dy;
|
touchRangeY = pointerStart.dy - pointerEnd.dy;
|
||||||
|
|
||||||
|
if (lastPage >= list.length) {
|
||||||
|
lastPage = list.length - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// else if (lastPage < 0) {
|
||||||
|
// lastPage = 1;
|
||||||
|
// }
|
||||||
|
|
||||||
if (touchRangeY.abs() < screenHeight / 8) {
|
if (touchRangeY.abs() < screenHeight / 8) {
|
||||||
// 滑动距离大于屏幕宽度的1/8就可以继续翻页了
|
// 滑动距离大于屏幕宽度的1/8就可以继续翻页了
|
||||||
nextOffset = (screenHeight + 5.sp) * lastPage;
|
nextOffset = (screenHeight + 5.sp) * lastPage;
|
||||||
@ -144,6 +156,8 @@ class _DiscoverState extends State<Discover>
|
|||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
|
// 在帧绘制完成后获取组件的尺寸
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback(_getSize);
|
||||||
loadData();
|
loadData();
|
||||||
if (widget.unlockWxNum == 0) {
|
if (widget.unlockWxNum == 0) {
|
||||||
subscripition = EventBusManager.on<DiscoverDataRefresh>().listen((event) {
|
subscripition = EventBusManager.on<DiscoverDataRefresh>().listen((event) {
|
||||||
@ -172,12 +186,19 @@ class _DiscoverState extends State<Discover>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setLike(String userId, bool isLike, Function callBack) async {
|
|
||||||
// if (isBlack || isDestroy) {
|
|
||||||
// showOKToast("喜欢失败,存在拉黑关系或者该账户已注销");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
// 获取组件尺寸的方法
|
||||||
|
void _getSize(Duration duration) {
|
||||||
|
final RenderBox renderBox = _key.currentContext!.findRenderObject() as RenderBox;
|
||||||
|
final size = renderBox.size;
|
||||||
|
setState(() {
|
||||||
|
screenHeight = size.height - 20.sp;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setLike(String userId, bool isLike, Function callBack) async {
|
||||||
var data = await DioManager.instance.post(
|
var data = await DioManager.instance.post(
|
||||||
url: "${Api.setLike + userId}/follow",
|
url: "${Api.setLike + userId}/follow",
|
||||||
params: {'status': isLike ? "0" : "1"});
|
params: {'status': isLike ? "0" : "1"});
|
||||||
@ -213,6 +234,15 @@ class _DiscoverState extends State<Discover>
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadData() async {
|
loadData() async {
|
||||||
|
if (genderList.contains('0')) {
|
||||||
|
genderList.remove('0');
|
||||||
|
}
|
||||||
|
if (roleList.contains('0')) {
|
||||||
|
roleList.remove('0');
|
||||||
|
}
|
||||||
|
if (orientationList.contains('0')) {
|
||||||
|
orientationList.remove('0');
|
||||||
|
}
|
||||||
var data = await DioManager.instance.post(url: Api.findPage, params: {
|
var data = await DioManager.instance.post(url: Api.findPage, params: {
|
||||||
'page': index,
|
'page': index,
|
||||||
'pageSize': 8,
|
'pageSize': 8,
|
||||||
@ -261,6 +291,12 @@ class _DiscoverState extends State<Discover>
|
|||||||
}
|
}
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
if (isLoadMore) {
|
||||||
|
isLoadMore = false;
|
||||||
|
lastPage = lastPage + 1;
|
||||||
|
animateToOffset(
|
||||||
|
_scrollController, lastPage * (screenHeight + 5.sp), () {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
loadFail = true;
|
loadFail = true;
|
||||||
@ -279,6 +315,7 @@ class _DiscoverState extends State<Discover>
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onLoading() {
|
_onLoading() {
|
||||||
|
isLoadMore = true;
|
||||||
loadData();
|
loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,83 +323,89 @@ class _DiscoverState extends State<Discover>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// TODO: add widget build method
|
// TODO: add widget build method
|
||||||
|
|
||||||
/// 延时一下,需要等state layout结束之后才能获取size
|
// /// 延时一下,需要等state layout结束之后才能获取size
|
||||||
Future.delayed(Duration(milliseconds: 100), () {
|
// Future.delayed(Duration(milliseconds: 100), () {
|
||||||
if (!mounted) return;
|
// if (!mounted) return;
|
||||||
if (screenHeight == 0 && list.isNotEmpty) {
|
// if (screenHeight == 0 && list.isNotEmpty) {
|
||||||
var size = context?.findRenderObject()?.paintBounds?.size;
|
// var size = context?.findRenderObject()?.paintBounds?.size;
|
||||||
screenHeight = size!.height - 20.sp;
|
// screenHeight = size!.height - 20.sp;
|
||||||
setState(() {});
|
// setState(() {});
|
||||||
print(size.toString());
|
// print(size.toString());
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
return list.isEmpty
|
return Container(
|
||||||
? loadFail ? noResultWidget(tip: '',callBack: () {
|
key: _key,
|
||||||
isMore = true;
|
child: list.isEmpty
|
||||||
loadFail = false;
|
? loadFail ? noResultWidget(tip: '',callBack: () {
|
||||||
setState(() {
|
isMore = true;
|
||||||
|
loadFail = false;
|
||||||
|
setState(() {
|
||||||
|
|
||||||
});
|
});
|
||||||
refreshData();
|
refreshData();
|
||||||
}) : isMore
|
}) : isMore
|
||||||
? loaddingWidget(true)
|
? loaddingWidget(true)
|
||||||
: noResultWidget(tip: '已解锁联系方式的圈友会展示在这里哦~')
|
: noResultWidget(tip: '已解锁联系方式的圈友会展示在这里哦~')
|
||||||
: Stack(
|
: Stack(
|
||||||
fit: StackFit.expand,
|
fit: StackFit.expand,
|
||||||
children: [
|
children: [
|
||||||
Container(color: Colors.transparent),
|
Container(color: Colors.transparent),
|
||||||
Listener(
|
Listener(
|
||||||
onPointerDown: getPointDownListenerInHorizontal(),
|
onPointerDown: getPointDownListenerInHorizontal(),
|
||||||
onPointerUp: getPointUpListenerInHorizontal(),
|
onPointerUp: getPointUpListenerInHorizontal(),
|
||||||
child: SmartRefresher(
|
child: SizeCacheWidget(
|
||||||
footer: DiyLoadFooter(
|
child:SmartRefresher(
|
||||||
noDataText: '只展示一些精选过的圈友哦~',
|
footer: DiyLoadFooter(
|
||||||
),
|
noDataText: '只展示一些精选过的圈友哦~',
|
||||||
onRefresh: refreshData,
|
|
||||||
controller: refreshController,
|
|
||||||
onLoading: _onLoading,
|
|
||||||
enablePullUp: true,
|
|
||||||
child: ListView.builder(
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
var user = Users.fromJson(list[index]);
|
|
||||||
|
|
||||||
String onLineStr = '';
|
|
||||||
if (user.online_flag?.isNotEmpty ?? false) {
|
|
||||||
onLineStr = user.online_flag!;
|
|
||||||
if (user.distance != null) {
|
|
||||||
if (user.distance! < 100) {
|
|
||||||
onLineStr =
|
|
||||||
'${user.online_flag!}· ${user.distance!.toInt()}km';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (user.distance != null) {
|
|
||||||
if ((user.distance! ?? 10) < 100) {
|
|
||||||
onLineStr = '${user.distance!.toInt()}km';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return FeaturedItem(info: list[index], index: index, screenHeight: screenHeight, sendNoLookData: () {
|
|
||||||
sendNoLookData(user.userId!.toString(),index);
|
|
||||||
},setLike: () {
|
|
||||||
setLike(user.userId!.toString(),
|
|
||||||
user.is_follow!, () {
|
|
||||||
list[index]['is_follow'] =
|
|
||||||
!user.is_follow!;
|
|
||||||
setState(() {});
|
|
||||||
});
|
|
||||||
}, loadSignDiscoverData: loadSignDiscoverData, showGiftPannel: showGiftPannel);
|
|
||||||
},
|
|
||||||
itemCount: list.length,
|
|
||||||
physics: BouncingScrollPhysics(),
|
|
||||||
controller: _scrollController,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
onRefresh: refreshData,
|
||||||
);
|
controller: refreshController,
|
||||||
|
onLoading: _onLoading,
|
||||||
|
enablePullUp: true,
|
||||||
|
child: ListView.builder(
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
var user = Users.fromJson(list[index]);
|
||||||
|
|
||||||
|
String onLineStr = '';
|
||||||
|
if (user.online_flag?.isNotEmpty ?? false) {
|
||||||
|
onLineStr = user.online_flag!;
|
||||||
|
if (user.distance != null) {
|
||||||
|
if (user.distance! < 100) {
|
||||||
|
onLineStr =
|
||||||
|
'${user.online_flag!}· ${user.distance!.toInt()}km';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (user.distance != null) {
|
||||||
|
if ((user.distance! ?? 10) < 100) {
|
||||||
|
onLineStr = '${user.distance!.toInt()}km';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return FrameSeparateWidget(
|
||||||
|
index: index,
|
||||||
|
child: FeaturedItem(info: list[index], index: index, screenHeight: screenHeight, sendNoLookData: () {
|
||||||
|
sendNoLookData(user.userId!.toString(),index);
|
||||||
|
},setLike: () {
|
||||||
|
setLike(user.userId!.toString(),
|
||||||
|
user.is_follow!, () {
|
||||||
|
list[index]['is_follow'] =
|
||||||
|
!user.is_follow!;
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
|
}, loadSignDiscoverData: loadSignDiscoverData, showGiftPannel: showGiftPannel));
|
||||||
|
},
|
||||||
|
itemCount: list.length,
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
controller: _scrollController,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
tagItem(List item) {
|
tagItem(List item) {
|
||||||
@ -451,23 +494,21 @@ class _DiscoverState extends State<Discover>
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadWxNumData() async {
|
loadWxNumData() async {
|
||||||
loadWXEditStatus() async {
|
var data = await DioManager.instance.get(
|
||||||
var data = await DioManager.instance.get(
|
url: Api.checkWxNumState,
|
||||||
url: Api.checkWxNumState,
|
);
|
||||||
);
|
if (data['code'] == 200) {
|
||||||
if (data['code'] == 200) {
|
var data = await DioManager.instance.get(url: Api.getUserInfo);
|
||||||
var data = await DioManager.instance.get(url: Api.getUserInfo);
|
|
||||||
|
|
||||||
if (data['code'] != 4000) {
|
if (data['code'] != 4000) {
|
||||||
if (data['data']['user']['wxNum'] == null) {
|
if (data['data']['user']['wxNum'] == null) {
|
||||||
showAddWxPicker(false);
|
showAddWxPicker(false);
|
||||||
} else if (data['data']['user']['wxNum'].toString().isEmpty) {
|
} else if (data['data']['user']['wxNum'].toString().isEmpty) {
|
||||||
showAddWxPicker(false);
|
showAddWxPicker(false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// wxStatusInfo['${data['code']}'] = data['msg'];
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// wxStatusInfo['${data['code']}'] = data['msg'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
@override
|
@override
|
||||||
bool get wantKeepAlive => true;
|
bool get wantKeepAlive => true;
|
||||||
final ScrollController scrollController = ScrollController();
|
final ScrollController scrollController = ScrollController();
|
||||||
|
final GlobalKey _key = GlobalKey();
|
||||||
|
|
||||||
ListLogic? listsLg;
|
ListLogic? listsLg;
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
var circleId = '';
|
var circleId = '';
|
||||||
List<Lists> lists = [];
|
List<Lists> lists = [];
|
||||||
|
|
||||||
|
double widgetWidth = 0.0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
@ -88,6 +88,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
|
// 在帧绘制完成后获取组件的尺寸
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback(_getSize);
|
||||||
scrollController.addListener(() {
|
scrollController.addListener(() {
|
||||||
try {
|
try {
|
||||||
if (scrollController.position.pixels ==
|
if (scrollController.position.pixels ==
|
||||||
@ -134,6 +136,15 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
// widget.back(widget.createState());
|
// widget.back(widget.createState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取组件尺寸的方法
|
||||||
|
void _getSize(Duration duration) {
|
||||||
|
final RenderBox renderBox = _key.currentContext!.findRenderObject() as RenderBox;
|
||||||
|
final size = renderBox.size;
|
||||||
|
setState(() {
|
||||||
|
widgetWidth = size.width;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
loadCircleInfo() async{
|
loadCircleInfo() async{
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
@ -318,6 +329,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
|
|
||||||
|
|
||||||
return ClipRRect(
|
return ClipRRect(
|
||||||
|
key: _key,
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
@ -385,8 +397,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior:HitTestBehavior.opaque,
|
behavior:HitTestBehavior.opaque,
|
||||||
onTap: (){
|
onTap: (){
|
||||||
// showToast("点个鸡毛,星哥还没做");
|
|
||||||
// Get.toNamed(AppRoutes.FriendsActivity,arguments: '3');
|
|
||||||
},
|
},
|
||||||
child:urlList.length==0?Container(): Container(
|
child:urlList.length==0?Container(): Container(
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
@ -717,12 +727,14 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
double picHeight = 0.0;
|
double picHeight = 0.0;
|
||||||
|
|
||||||
|
|
||||||
|
double ratio = 0;
|
||||||
if (lists.album != null) {
|
if (lists.album != null) {
|
||||||
if (lists.album!.isNotEmpty) {
|
if (lists.album!.isNotEmpty) {
|
||||||
Album info = lists.album!.first;
|
Album info = lists.album!.first;
|
||||||
|
|
||||||
if (info.type == 1) {
|
if (info.type == 1) {
|
||||||
double picWidth = (Get.width - (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp))/3 + 45;
|
double picWidth = (widgetWidth - 8.sp)/3 + 45;
|
||||||
|
ratio = (widgetWidth - 8.sp - 24.sp) / 3 / picWidth;
|
||||||
if (lists.album!.length > 3) {
|
if (lists.album!.length > 3) {
|
||||||
picHeight = picWidth * 2;
|
picHeight = picWidth * 2;
|
||||||
} else {
|
} else {
|
||||||
@ -917,7 +929,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
crossAxisCount: 3, //横轴三个子widget
|
crossAxisCount: 3, //横轴三个子widget
|
||||||
crossAxisSpacing: 8.sp,
|
crossAxisSpacing: 8.sp,
|
||||||
mainAxisSpacing: 8.sp,
|
mainAxisSpacing: 8.sp,
|
||||||
childAspectRatio: 0.7//宽高比为1时,子widget
|
childAspectRatio: ratio //宽高比为1时,子widget
|
||||||
),
|
),
|
||||||
itemBuilder: (contentxt, currentIndex) {
|
itemBuilder: (contentxt, currentIndex) {
|
||||||
Album album = lists.album![currentIndex];
|
Album album = lists.album![currentIndex];
|
||||||
@ -1007,12 +1019,14 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
);
|
);
|
||||||
|
|
||||||
double picHeight = 0.0;
|
double picHeight = 0.0;
|
||||||
double picWidth = (Get.width - (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp))/3 + 45;
|
double ratio = 0.0;
|
||||||
|
double picWidth = (widgetWidth - 8.sp )/3 + 45;
|
||||||
if (lists.album != null) {
|
if (lists.album != null) {
|
||||||
if (lists.album!.isNotEmpty) {
|
if (lists.album!.isNotEmpty) {
|
||||||
Album info = lists.album!.first;
|
Album info = lists.album!.first;
|
||||||
|
|
||||||
if (info.type == 1) {
|
if (info.type == 1) {
|
||||||
|
ratio = (widgetWidth - 8.sp - 24.sp) / 3 / picWidth;
|
||||||
if (lists.album!.length > 3) {
|
if (lists.album!.length > 3) {
|
||||||
picHeight = picWidth * 2;
|
picHeight = picWidth * 2;
|
||||||
} else {
|
} else {
|
||||||
@ -1209,7 +1223,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
picHeight > 0
|
picHeight > 0
|
||||||
? Container(
|
? Container(
|
||||||
height: picHeight,
|
height: picHeight,
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
margin: EdgeInsets.only(top: 5.sp),
|
margin: EdgeInsets.only(top: 5.sp),
|
||||||
child: picHeight == 200.sp
|
child: picHeight == 200.sp
|
||||||
? ClipRRect(
|
? ClipRRect(
|
||||||
@ -1223,7 +1236,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
crossAxisCount: 3, //横轴三个子widget
|
crossAxisCount: 3, //横轴三个子widget
|
||||||
crossAxisSpacing: 8.sp,
|
crossAxisSpacing: 8.sp,
|
||||||
mainAxisSpacing: 8.sp,
|
mainAxisSpacing: 8.sp,
|
||||||
childAspectRatio:0.7 //宽高比为1时,子widget
|
childAspectRatio:ratio //宽高比为1时,子widget
|
||||||
),
|
),
|
||||||
itemBuilder: (contentxt, currentIndex) {
|
itemBuilder: (contentxt, currentIndex) {
|
||||||
Album album = lists.album![currentIndex];
|
Album album = lists.album![currentIndex];
|
||||||
@ -1239,11 +1252,14 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
'index': currentIndex
|
'index': currentIndex
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: ClipRRect(
|
child: Container(
|
||||||
borderRadius:
|
child: ClipRRect(
|
||||||
BorderRadius.circular(6.sp),
|
borderRadius:
|
||||||
child: CachedImg(
|
BorderRadius.circular(6.sp),
|
||||||
imageUrl: album.url!,
|
child: CachedImg(
|
||||||
|
imageUrl: album.url!,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -646,7 +646,7 @@ class _LikeViewState extends State<LikeView>
|
|||||||
|
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 4.sp,
|
height: 3.sp,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
info['nickname'] ?? '',
|
info['nickname'] ?? '',
|
||||||
@ -915,6 +915,7 @@ class _LikeViewState extends State<LikeView>
|
|||||||
borderRadius: BorderRadius.circular(6.sp),
|
borderRadius: BorderRadius.circular(6.sp),
|
||||||
child: CachedImg(
|
child: CachedImg(
|
||||||
imageUrl: album.url!,
|
imageUrl: album.url!,
|
||||||
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -1196,10 +1197,10 @@ class _LikeViewState extends State<LikeView>
|
|||||||
gridDelegate:
|
gridDelegate:
|
||||||
SliverGridDelegateWithFixedCrossAxisCount(
|
SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3, //横轴三个子widget
|
crossAxisCount: 3, //横轴三个子widget
|
||||||
crossAxisSpacing: 8.sp,
|
crossAxisSpacing: 4.sp,
|
||||||
mainAxisSpacing: 8.sp,
|
mainAxisSpacing: 4.sp,
|
||||||
childAspectRatio:
|
childAspectRatio: 0.7
|
||||||
0.7 //宽高比为1时,子widget
|
//宽高比为1时,子widget
|
||||||
),
|
),
|
||||||
itemBuilder: (contentxt, currentIndex) {
|
itemBuilder: (contentxt, currentIndex) {
|
||||||
Album album = lists.album![currentIndex];
|
Album album = lists.album![currentIndex];
|
||||||
@ -1228,6 +1229,7 @@ class _LikeViewState extends State<LikeView>
|
|||||||
BorderRadius.circular(6.sp),
|
BorderRadius.circular(6.sp),
|
||||||
child: CachedImg(
|
child: CachedImg(
|
||||||
imageUrl: album.url!,
|
imageUrl: album.url!,
|
||||||
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import 'package:flutter_swiper/flutter_swiper.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:get/get_core/src/get_main.dart';
|
import 'package:get/get_core/src/get_main.dart';
|
||||||
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
||||||
|
import 'package:keframe/keframe.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
import '../../../commons/Widgets/tag_widget.dart';
|
import '../../../commons/Widgets/tag_widget.dart';
|
||||||
@ -31,8 +32,8 @@ class Vicinity extends StatefulWidget {
|
|||||||
State<Vicinity> createState() => _VicinityState();
|
State<Vicinity> createState() => _VicinityState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin {
|
class _VicinityState extends State<Vicinity>
|
||||||
|
with AutomaticKeepAliveClientMixin {
|
||||||
var sub;
|
var sub;
|
||||||
ScrollController _scrollController = ScrollController();
|
ScrollController _scrollController = ScrollController();
|
||||||
|
|
||||||
@ -47,10 +48,9 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
sub = EventBusManager.on<NearScrollTap>().listen((event) {
|
sub = EventBusManager.on<NearScrollTap>().listen((event) {
|
||||||
try {
|
try {
|
||||||
_scrollController.animateTo(0,
|
_scrollController.animateTo(0,
|
||||||
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
duration: const Duration(milliseconds: 300),
|
||||||
} catch (e) {
|
curve: Curves.easeInOut);
|
||||||
|
} catch (e) {}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,46 +67,58 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// TODO: add widget build method
|
// TODO: add widget build method
|
||||||
|
|
||||||
return widget.logic.vicinityList.isNotEmpty ? Stack(
|
return widget.logic.vicinityList.isNotEmpty
|
||||||
fit: StackFit.expand,
|
? Stack(
|
||||||
children: [
|
fit: StackFit.expand,
|
||||||
SmartRefresher(
|
children: [
|
||||||
controller: widget.logic.refreshController,
|
SizeCacheWidget(
|
||||||
onRefresh: _onRefresh,
|
child: SmartRefresher(
|
||||||
onLoading: _onLoading,
|
controller: widget.logic.refreshController,
|
||||||
enablePullUp: true,
|
onRefresh: _onRefresh,
|
||||||
child: ListView.builder(
|
onLoading: _onLoading,
|
||||||
controller: _scrollController,
|
enablePullUp: true,
|
||||||
padding: EdgeInsets.all(10.sp),
|
child: ListView.builder(
|
||||||
itemCount:widget.logic.vicinityList.length + 1,
|
controller: _scrollController,
|
||||||
itemBuilder: (context, index) {
|
padding: EdgeInsets.all(10.sp),
|
||||||
if (index == 0) {
|
itemCount: widget.logic.vicinityList.length + 1,
|
||||||
return bannerView(widget.logic);
|
itemBuilder: (context, index) {
|
||||||
} else {
|
if (index == 0) {
|
||||||
return ListItem(widget.logic.vicinityList[index - 1], index - 1);
|
return bannerView(widget.logic);
|
||||||
}
|
} else {
|
||||||
},
|
return FrameSeparateWidget(
|
||||||
),
|
index: index,
|
||||||
),
|
child: ListItem(
|
||||||
// if (widget.logic.myVip == 0)
|
widget.logic.vicinityList[index - 1],
|
||||||
// Positioned(
|
index - 1));
|
||||||
// bottom: 0,
|
}
|
||||||
// child: showVipView())
|
},
|
||||||
// Positioned(top: 10.sp,left: 10.sp,child: GestureDetector(
|
),
|
||||||
// onTap: () {
|
),
|
||||||
// Get.toNamed(AppRoutes.WorldCallOut);
|
)
|
||||||
// },
|
// if (widget.logic.myVip == 0)
|
||||||
// child: Image.asset(
|
// Positioned(
|
||||||
// getMsgImage('hu_icon'),
|
// bottom: 0,
|
||||||
// width: 30.sp,
|
// child: showVipView())
|
||||||
// ),
|
// Positioned(top: 10.sp,left: 10.sp,child: GestureDetector(
|
||||||
// ),)
|
// onTap: () {
|
||||||
],
|
// Get.toNamed(AppRoutes.WorldCallOut);
|
||||||
) : widget.logic.isNearLoad ? loaddingWidget(true) : noResultWidget(tip: '',callBack: () {
|
// },
|
||||||
widget.logic.isNearLoad = true;
|
// child: Image.asset(
|
||||||
widget.logic.update();
|
// getMsgImage('hu_icon'),
|
||||||
_onLoading();
|
// width: 30.sp,
|
||||||
});
|
// ),
|
||||||
|
// ),)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: widget.logic.isNearLoad
|
||||||
|
? loaddingWidget(true)
|
||||||
|
: noResultWidget(
|
||||||
|
tip: '',
|
||||||
|
callBack: () {
|
||||||
|
widget.logic.isNearLoad = true;
|
||||||
|
widget.logic.update();
|
||||||
|
_onLoading();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget bannerView(CircleLogic controller) {
|
Widget bannerView(CircleLogic controller) {
|
||||||
@ -186,9 +198,9 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
color: Colors.black.withOpacity(0.87),
|
color: Colors.black.withOpacity(0.87),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(left: 15.sp,right: 15.sp),
|
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||||
padding: EdgeInsets.symmetric(vertical: 15.sp, horizontal: 20.sp),
|
padding: EdgeInsets.symmetric(vertical: 15.sp, horizontal: 20.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -279,20 +291,24 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
Get.toNamed(Routes.UserInfoPage, arguments: item.id.toString());
|
Get.toNamed(Routes.UserInfoPage, arguments: item.id.toString());
|
||||||
} else {
|
} else {
|
||||||
if (widget.logic.chargeType == 1) {
|
if (widget.logic.chargeType == 1) {
|
||||||
if (widget.logic
|
if (widget.logic.myVip > 0) {
|
||||||
.myVip > 0) {
|
|
||||||
Get.toNamed(Routes.UserInfoPage, arguments: item.id.toString());
|
Get.toNamed(Routes.UserInfoPage, arguments: item.id.toString());
|
||||||
} else {
|
} else {
|
||||||
Get.bottomSheet(Scaffold(backgroundColor: Colors.transparent,body: Center(
|
Get.bottomSheet(
|
||||||
child: showVipView(),
|
Scaffold(
|
||||||
),),isScrollControlled: true,backgroundColor: Colors.transparent,barrierColor: Colors.black.withOpacity(0.6));
|
backgroundColor: Colors.transparent,
|
||||||
|
body: Center(
|
||||||
|
child: showVipView(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
barrierColor: Colors.black.withOpacity(0.6));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Get.toNamed(Routes.UserInfoPage, arguments: item.id.toString());
|
Get.toNamed(Routes.UserInfoPage, arguments: item.id.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
@ -300,11 +316,11 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
width: Get.width,
|
width: Get.width,
|
||||||
// height: 210.sp,
|
// height: 210.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
BorderRadius.circular(10.sp),
|
|
||||||
border: GradientBoxBorder(
|
border: GradientBoxBorder(
|
||||||
gradient:
|
gradient: item.vip == 2
|
||||||
item.vip == 2 ? AppColor.mainVerLinearGradient : AppColor.clearVerLinearGradient,
|
? AppColor.mainVerLinearGradient
|
||||||
|
: AppColor.clearVerLinearGradient,
|
||||||
width: 1.sp,
|
width: 1.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -319,26 +335,25 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 1.sp, left: 1.sp, right: 1.sp),
|
margin: EdgeInsets.only(top: 1.sp, left: 1.sp, right: 1.sp),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(10.sp),
|
topLeft: Radius.circular(10.sp),
|
||||||
topRight: Radius.circular(10.sp),
|
topRight: Radius.circular(10.sp),
|
||||||
),
|
),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Image(
|
Image(
|
||||||
image: AssetImage(getCircleImage("icon_list_null")),
|
image: AssetImage(getCircleImage("icon_list_null")),
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
height: 92.sp,
|
height: 92.sp,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 92.sp,
|
height: 92.sp,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
color: Colors.black.withOpacity(0.25),
|
color: Colors.black.withOpacity(0.25),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Column(children: [
|
Column(children: [
|
||||||
Container(
|
Container(
|
||||||
@ -399,7 +414,9 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.nickname.length > 5 ? item.nickname.substring(0,5) + '..' : item.nickname,
|
item.nickname.length > 5
|
||||||
|
? item.nickname.substring(0, 5) + '..'
|
||||||
|
: item.nickname,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: const Color.fromRGBO(247, 250, 250, 1.0),
|
color: const Color.fromRGBO(247, 250, 250, 1.0),
|
||||||
@ -424,49 +441,58 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
Container(
|
Container(
|
||||||
// height: 55.sp, // 设置固定高度
|
// height: 55.sp, // 设置固定高度
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
margin: EdgeInsets.symmetric(vertical: 12.0.sp,horizontal: 9.sp),
|
margin:
|
||||||
|
EdgeInsets.symmetric(vertical: 12.0.sp, horizontal: 9.sp),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.centerLeft, // 文本左对齐,垂直居中
|
alignment: Alignment.centerLeft, // 文本左对齐,垂直居中
|
||||||
child: RichText(
|
child: RichText(
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
children: [
|
children: [
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
alignment: ui.PlaceholderAlignment.middle,
|
alignment: ui.PlaceholderAlignment.middle,
|
||||||
// alignment: Rect.fromCenter(center: center, width: width, height: height),
|
// alignment: Rect.fromCenter(center: center, width: width, height: height),
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(right: 2.sp,),
|
margin: EdgeInsets.only(
|
||||||
padding: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
right: 2.sp,
|
||||||
height: 20.sp,
|
),
|
||||||
width: item.city!.length > 4 ? 70.sp : item.city!.contains('km') ? item.city!.length * 13.sp : item.city!.length * 20.sp,
|
padding:
|
||||||
alignment: Alignment.center,
|
EdgeInsets.only(left: 4.sp, right: 4.sp),
|
||||||
decoration: BoxDecoration(
|
height: 20.sp,
|
||||||
borderRadius: BorderRadius.circular(22),
|
width: item.city!.length > 4
|
||||||
color: AppColor.cityBgColor,
|
? 70.sp
|
||||||
),
|
: item.city!.contains('km')
|
||||||
child: Text(
|
? item.city!.length * 13.sp
|
||||||
item.city!,
|
: item.city!.length * 20.sp,
|
||||||
style: TextStyle(
|
alignment: Alignment.center,
|
||||||
color: Colors.white,
|
decoration: BoxDecoration(
|
||||||
fontSize: 11.sp,
|
borderRadius: BorderRadius.circular(22),
|
||||||
fontWeight: FontWeight.w600),
|
color: AppColor.cityBgColor,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
item.city!,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 11.sp,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
TextSpan(
|
||||||
TextSpan(
|
text: item.signature!,
|
||||||
text: item.signature!,
|
// overflow: TextOverflow.ellipsis,
|
||||||
// overflow: TextOverflow.ellipsis,
|
style: TextStyle(
|
||||||
style: TextStyle(
|
color: Colors.white,
|
||||||
color: Colors.white,
|
fontSize: 18.sp,
|
||||||
fontSize: 18.sp,)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 8.sp, right: 3.sp,bottom: 5.sp),
|
margin:
|
||||||
|
EdgeInsets.only(left: 8.sp, right: 3.sp, bottom: 5.sp),
|
||||||
child: _buildInterestsListView(item.interests))
|
child: _buildInterestsListView(item.interests))
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
@ -488,7 +514,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
|
|
||||||
Widget _buildInfoRow(VicinityItemBean item) {
|
Widget _buildInfoRow(VicinityItemBean item) {
|
||||||
String ageMsg =
|
String ageMsg =
|
||||||
getAgeCOntent(item!.gender, item!.age, item!.role, item!.orientation);
|
getAgeCOntent(item!.gender, item!.age, item!.role, item!.orientation);
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
@ -496,8 +522,8 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
borderRadius: BorderRadius.circular(17),
|
borderRadius: BorderRadius.circular(17),
|
||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
colors: [
|
colors: [
|
||||||
Color.fromRGBO(141, 255, 248, 1.0),
|
Color.fromRGBO(141, 255, 248, 1),
|
||||||
Color.fromRGBO(181, 211, 255, 1.0),
|
Color.fromRGBO(181, 211, 255, 1),
|
||||||
],
|
],
|
||||||
begin: Alignment.centerLeft,
|
begin: Alignment.centerLeft,
|
||||||
end: Alignment.centerRight,
|
end: Alignment.centerRight,
|
||||||
@ -541,8 +567,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17.0),
|
borderRadius: BorderRadius.circular(17.0),
|
||||||
border: GradientBoxBorder(
|
border: GradientBoxBorder(
|
||||||
gradient:
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
AppColor.mainVerLinearGradient,
|
|
||||||
width: 0.5.sp,
|
width: 0.5.sp,
|
||||||
),
|
),
|
||||||
color: const Color(0xFF392D53),
|
color: const Color(0xFF392D53),
|
||||||
@ -581,10 +606,11 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _onLoading() async {
|
void _onLoading() async {
|
||||||
if (widget.logic.vicinityPage == 2 && maxOff == 0) {
|
if (widget.logic.vicinityPage == 2 &&
|
||||||
|
maxOff == 0 &&
|
||||||
|
widget.logic.lists.isNotEmpty) {
|
||||||
maxOff = _scrollController.offset - 170.sp;
|
maxOff = _scrollController.offset - 170.sp;
|
||||||
}
|
}
|
||||||
widget.logic.getNearByList();
|
widget.logic.getNearByList();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1719,7 +1719,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
|||||||
crossAxisCount: 3, //横轴三个子widget
|
crossAxisCount: 3, //横轴三个子widget
|
||||||
crossAxisSpacing: 8.sp,
|
crossAxisSpacing: 8.sp,
|
||||||
mainAxisSpacing: 8.sp,
|
mainAxisSpacing: 8.sp,
|
||||||
childAspectRatio: 0.7 //宽高比为1时,子widget
|
childAspectRatio: 0.6 //宽高比为1时,子widget
|
||||||
),
|
),
|
||||||
itemBuilder: (contentxt, currentIndex) {
|
itemBuilder: (contentxt, currentIndex) {
|
||||||
Album album = lists.album![currentIndex];
|
Album album = lists.album![currentIndex];
|
||||||
@ -1738,6 +1738,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
|||||||
borderRadius: BorderRadius.circular(6.sp),
|
borderRadius: BorderRadius.circular(6.sp),
|
||||||
child: CachedImg(
|
child: CachedImg(
|
||||||
imageUrl: album.url!,
|
imageUrl: album.url!,
|
||||||
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -1824,6 +1825,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
|||||||
);
|
);
|
||||||
|
|
||||||
double picHeight = 0.0;
|
double picHeight = 0.0;
|
||||||
|
double ratio = 0;
|
||||||
double picWidth =
|
double picWidth =
|
||||||
(Get.width - (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp)) /
|
(Get.width - (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp)) /
|
||||||
3 +
|
3 +
|
||||||
@ -1831,7 +1833,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
|||||||
if (lists.album != null) {
|
if (lists.album != null) {
|
||||||
if (lists.album!.isNotEmpty) {
|
if (lists.album!.isNotEmpty) {
|
||||||
Album info = lists.album!.first;
|
Album info = lists.album!.first;
|
||||||
|
ratio = ((Get.width - (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp))/3) / picWidth;
|
||||||
if (info.type == 1) {
|
if (info.type == 1) {
|
||||||
if (lists.album!.length > 3) {
|
if (lists.album!.length > 3) {
|
||||||
picHeight = picWidth * 2;
|
picHeight = picWidth * 2;
|
||||||
@ -2056,9 +2058,9 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
|||||||
gridDelegate:
|
gridDelegate:
|
||||||
SliverGridDelegateWithFixedCrossAxisCount(
|
SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3, //横轴三个子widget
|
crossAxisCount: 3, //横轴三个子widget
|
||||||
crossAxisSpacing: 8.sp,
|
crossAxisSpacing: 4.sp,
|
||||||
mainAxisSpacing: 8.sp,
|
mainAxisSpacing: 4.sp,
|
||||||
childAspectRatio: 0.7 //宽高比为1时,子widget
|
childAspectRatio: ratio //宽高比为1时,子widget
|
||||||
),
|
),
|
||||||
itemBuilder: (contentxt, currentIndex) {
|
itemBuilder: (contentxt, currentIndex) {
|
||||||
Album album = lists.album![currentIndex];
|
Album album = lists.album![currentIndex];
|
||||||
@ -2079,6 +2081,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
|||||||
BorderRadius.circular(6.sp),
|
BorderRadius.circular(6.sp),
|
||||||
child: CachedImg(
|
child: CachedImg(
|
||||||
imageUrl: album.url!,
|
imageUrl: album.url!,
|
||||||
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -174,9 +174,38 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if (index == 0) {
|
||||||
|
if (widget.genderList[0].isSelect) {
|
||||||
|
widget.genderList.forEach((element) {
|
||||||
|
print(element.name);
|
||||||
|
element.isSelect = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
widget.genderList.forEach((element) {
|
||||||
|
element.isSelect = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (widget.genderList[index].isSelect) {
|
||||||
|
widget.genderList[index].isSelect = false;
|
||||||
|
widget.genderList[0].isSelect = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
widget.genderList[index].isSelect = true;
|
||||||
|
bool istrue = true;
|
||||||
|
widget.genderList.asMap().forEach((index,element) {
|
||||||
|
if(index!=0&&!element.isSelect) {
|
||||||
|
// print(element.isSelect);
|
||||||
|
istrue = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
widget.genderList[0].isSelect = istrue;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.genderList[index].isSelect =
|
|
||||||
!widget.genderList[index].isSelect;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -260,9 +289,39 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
showRechargeDialog();
|
showRechargeDialog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (index == 0) {
|
||||||
|
if (widget.roleList[0].isSelect) {
|
||||||
|
widget.roleList.forEach((element) {
|
||||||
|
print(element.name);
|
||||||
|
element.isSelect = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
widget.roleList.forEach((element) {
|
||||||
|
element.isSelect = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (widget.roleList[index].isSelect) {
|
||||||
|
widget.roleList[index].isSelect = false;
|
||||||
|
widget.roleList[0].isSelect = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
widget.roleList[index].isSelect = true;
|
||||||
|
bool istrue = true;
|
||||||
|
widget.roleList.asMap().forEach((index,element) {
|
||||||
|
if(index!=0&&!element.isSelect) {
|
||||||
|
// print(element.isSelect);
|
||||||
|
istrue = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
widget.roleList[0].isSelect = istrue;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.roleList[index].isSelect =
|
// widget.roleList[index].isSelect =
|
||||||
!widget.roleList[index].isSelect;
|
// !widget.roleList[index].isSelect;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -355,9 +414,40 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
showRechargeDialog(isYear: true);
|
showRechargeDialog(isYear: true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (index == 0) {
|
||||||
|
if (widget.orientationList[0].isSelect) {
|
||||||
|
widget.orientationList.forEach((element) {
|
||||||
|
print(element.name);
|
||||||
|
element.isSelect = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
widget.orientationList.forEach((element) {
|
||||||
|
element.isSelect = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (widget.orientationList[index].isSelect) {
|
||||||
|
widget.orientationList[index].isSelect = false;
|
||||||
|
widget.orientationList[0].isSelect = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
widget.orientationList[index].isSelect = true;
|
||||||
|
bool istrue = true;
|
||||||
|
widget.orientationList.asMap().forEach((index,element) {
|
||||||
|
if(index!=0&&!element.isSelect) {
|
||||||
|
// print(element.isSelect);
|
||||||
|
istrue = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
widget.orientationList[0].isSelect = istrue;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.orientationList[index].isSelect =
|
// widget.orientationList[index].isSelect =
|
||||||
!widget.orientationList[index].isSelect;
|
// !widget.orientationList[index].isSelect;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
@ -2,7 +2,8 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_install_app/flutter_install_app.dart';
|
// import 'package:flutter_install_app/flutter_install_app.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
@ -24,7 +25,7 @@ double myProgress = 0;
|
|||||||
class _CustomDialogState extends State<UpdateDialog> {
|
class _CustomDialogState extends State<UpdateDialog> {
|
||||||
bool isDownload = false;
|
bool isDownload = false;
|
||||||
bool isShowWeb = false;
|
bool isShowWeb = false;
|
||||||
|
var filePath;
|
||||||
void incrementCounter() {}
|
void incrementCounter() {}
|
||||||
|
|
||||||
void setDownloadUi() {
|
void setDownloadUi() {
|
||||||
@ -114,14 +115,47 @@ class _CustomDialogState extends State<UpdateDialog> {
|
|||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
myProgress >= 1.0 ? GestureDetector(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
onTap: () {
|
||||||
|
installApk();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 200.sp,
|
||||||
|
margin: EdgeInsets.only(top: 12.sp, bottom: 12.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 52.sp,
|
||||||
|
right: 52.sp),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
"立即安装",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) : Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp,bottom: 10.sp),
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
value: myProgress,
|
value: myProgress,
|
||||||
backgroundColor: Colors.grey,
|
backgroundColor: Colors.grey,
|
||||||
valueColor:
|
valueColor:
|
||||||
const AlwaysStoppedAnimation<Color>(
|
const AlwaysStoppedAnimation<Color>(
|
||||||
Color(0xFF30FFD9)),
|
Color(0xFF30FFD9)),
|
||||||
strokeWidth: 4.0.sp,
|
strokeWidth: 4.0.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -165,7 +199,8 @@ class _CustomDialogState extends State<UpdateDialog> {
|
|||||||
throw 'Could not open App Store.';
|
throw 'Could not open App Store.';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final String appStoreUrl = widget
|
final String appStoreUrl
|
||||||
|
= widget
|
||||||
.updateInfo.downloadUrl; // App Store链接示例
|
.updateInfo.downloadUrl; // App Store链接示例
|
||||||
|
|
||||||
if (appStoreUrl.contains("apk")) {
|
if (appStoreUrl.contains("apk")) {
|
||||||
@ -245,8 +280,8 @@ class _CustomDialogState extends State<UpdateDialog> {
|
|||||||
|
|
||||||
updataApk(String downloadUrl) async {
|
updataApk(String downloadUrl) async {
|
||||||
//SmartDialog.showLoading();
|
//SmartDialog.showLoading();
|
||||||
var filePath = await getApplicationSupportDirectoryPath();
|
var path = await getApplicationSupportDirectoryPath();
|
||||||
filePath = filePath + "leyuan.apk";
|
filePath = path + "leyuan.apk";
|
||||||
DioManager.instance.setReceiveTimeout(300);
|
DioManager.instance.setReceiveTimeout(300);
|
||||||
var data = await DioManager.instance
|
var data = await DioManager.instance
|
||||||
.download(downloadUrl, filePath, (received, total) {
|
.download(downloadUrl, filePath, (received, total) {
|
||||||
@ -262,8 +297,12 @@ class _CustomDialogState extends State<UpdateDialog> {
|
|||||||
print(error);
|
print(error);
|
||||||
});
|
});
|
||||||
DioManager.instance.setReceiveTimeout(30);
|
DioManager.instance.setReceiveTimeout(30);
|
||||||
// flutter_install_app
|
installApk();
|
||||||
await AppInstaller.installApk(filePath, actionRequired: false);
|
}
|
||||||
|
|
||||||
|
installApk() async {
|
||||||
|
//flutter_install_app
|
||||||
|
// await AppInstaller.installApk(filePath, actionRequired: false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -225,7 +225,7 @@ class HelpPage extends StatelessWidget {
|
|||||||
// logic.userInfoBean!.nickname);
|
// logic.userInfoBean!.nickname);
|
||||||
},
|
},
|
||||||
icon: Image.asset(
|
icon: Image.asset(
|
||||||
getMineImage("im_service"),
|
getMineImage("service_icon"),
|
||||||
width: 14.sp,
|
width: 14.sp,
|
||||||
height: 14.sp,
|
height: 14.sp,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -229,25 +229,30 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
pushChatPage(content['id'].toString(), content['imId'],
|
pushChatPage(content['id'].toString(), content['imId'],
|
||||||
content['nickname']);
|
content['nickname']);
|
||||||
});
|
});
|
||||||
} else if (int.parse(event) == 3) {//喜欢列表刷新
|
} else if (int.parse(event) == 3) {
|
||||||
|
//喜欢列表刷新
|
||||||
showOKToast(message.customElem!.desc!.toString());
|
showOKToast(message.customElem!.desc!.toString());
|
||||||
EventBusManager.fire(LikeRefresh());
|
EventBusManager.fire(LikeRefresh());
|
||||||
} else if (int.parse(event) == 5) {//有人送礼会话置顶
|
} else if (int.parse(event) == 5) {
|
||||||
|
//有人送礼会话置顶
|
||||||
// print(jsonData.toString());
|
// print(jsonData.toString());
|
||||||
var info = jsonDecode(jsonData['content']);
|
var info = jsonDecode(jsonData['content']);
|
||||||
TencentImSDKPlugin.v2TIMManager.v2ConversationManager
|
TencentImSDKPlugin.v2TIMManager.v2ConversationManager
|
||||||
.pinConversation(
|
.pinConversation(
|
||||||
conversationID: 'c2c_' + info['fromImId'],
|
conversationID: 'c2c_' + info['fromImId'],
|
||||||
isPinned: info['top'] == 1);
|
isPinned: info['top'] == 1);
|
||||||
} else if (int.parse(event) == 9) {//有新人加入
|
} else if (int.parse(event) == 9) {
|
||||||
|
//有新人加入
|
||||||
CircleLogic logic = Get.find<CircleLogic>();
|
CircleLogic logic = Get.find<CircleLogic>();
|
||||||
logic.isNewPeopleRed = true;
|
logic.isNewPeopleRed = true;
|
||||||
logic.update();
|
logic.update();
|
||||||
} else if (int.parse(event) == 8) {//有新的喊话
|
} else if (int.parse(event) == 8) {
|
||||||
|
//有新的喊话
|
||||||
World_call_outLogic logic = Get.find<World_call_outLogic>();
|
World_call_outLogic logic = Get.find<World_call_outLogic>();
|
||||||
logic.isNewMsg = true;
|
logic.isNewMsg = true;
|
||||||
logic.update();
|
logic.update();
|
||||||
} else if (int.parse(event) == 10) {//有新访客
|
} else if (int.parse(event) == 10) {
|
||||||
|
//有新访客
|
||||||
MsgLogic logic = Get.find<MsgLogic>();
|
MsgLogic logic = Get.find<MsgLogic>();
|
||||||
logic.getMode();
|
logic.getMode();
|
||||||
}
|
}
|
||||||
@ -370,7 +375,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
BuildContext context, bool isDismiss, UpdateInfo updateInfo) {
|
BuildContext context, bool isDismiss, UpdateInfo updateInfo) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: isDismiss,
|
barrierDismissible: false,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return UpdateDialog(
|
return UpdateDialog(
|
||||||
isDismiss: isDismiss,
|
isDismiss: isDismiss,
|
||||||
@ -388,7 +393,9 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
data['data']['account_id'].toString(), data['data']['user_sig']);
|
data['data']['account_id'].toString(), data['data']['user_sig']);
|
||||||
accountId = data['data']['account_id'].toString();
|
accountId = data['data']['account_id'].toString();
|
||||||
} else {
|
} else {
|
||||||
getIMData();
|
if (Get.currentRoute != Routes.Login) {
|
||||||
|
getIMData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -499,7 +506,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loadMyInfoData() async {
|
loadMyInfoData() async {
|
||||||
var data = await DioManager.instance.get(url: Api.getUserMine);
|
var data = await DioManager.instance.get(url: Api.getUserMine);
|
||||||
var bean = BaseResponse<MineResponseBean>.fromJson(
|
var bean = BaseResponse<MineResponseBean>.fromJson(
|
||||||
data, (data) => MineResponseBean.fromJson(data));
|
data, (data) => MineResponseBean.fromJson(data));
|
||||||
@ -549,17 +556,30 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void awaitShowTodayDialog() {
|
void awaitShowTodayDialog() {
|
||||||
|
Future.delayed(Duration(seconds: 60), () async {
|
||||||
Future.delayed(Duration(seconds: 60), () async {
|
|
||||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
if (await sp.isFirstAutoMatch()) {
|
if (await sp.isFirstAutoMatch()) {
|
||||||
Get.bottomSheet(
|
var data = await DioManager.instance.get(
|
||||||
TodayPeopleDialog(isShow: false,urlStr:Api.dayOnline),
|
url: Api.dayOnline,
|
||||||
isScrollControlled: true,
|
|
||||||
enableDrag: false,
|
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
SharedPreferencesHelper sp =
|
||||||
|
await SharedPreferencesHelper.getInstance();
|
||||||
|
List dataList = data['data'];
|
||||||
|
if (dataList.isNotEmpty) {
|
||||||
|
var recommendCircleFriendData = data['data'][0];
|
||||||
|
Get.bottomSheet(
|
||||||
|
TodayPeopleDialog(
|
||||||
|
isShow: false,
|
||||||
|
url: Api.dayOnline,
|
||||||
|
recommendCircleFriendData: recommendCircleFriendData),
|
||||||
|
isScrollControlled: true,
|
||||||
|
enableDrag: false,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'package:circle_app/net/api.dart';
|
import 'package:circle_app/net/api.dart';
|
||||||
import 'package:circle_app/net/dio_manager.dart';
|
import 'package:circle_app/net/dio_manager.dart';
|
||||||
|
import 'package:circle_app/utils/SharedPreferencesHelper.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -31,6 +32,8 @@ class InviteLogic extends GetxController {
|
|||||||
|
|
||||||
bool isContentScroll = false;
|
bool isContentScroll = false;
|
||||||
|
|
||||||
|
bool isIventData = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
@ -68,7 +71,7 @@ class InviteLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
loadStatus();
|
||||||
loadData();
|
loadData();
|
||||||
loadMyInviteData();
|
loadMyInviteData();
|
||||||
loadAllInviteData();
|
loadAllInviteData();
|
||||||
@ -123,6 +126,13 @@ class InviteLogic extends GetxController {
|
|||||||
showOKToast(recorddata['msg']);
|
showOKToast(recorddata['msg']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void loadStatus() async {
|
||||||
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
|
String phone = sp.getString(SharedPreferencesHelper.LOGINPHONE);
|
||||||
|
isIventData = phone != '18800000100';
|
||||||
|
update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -398,7 +398,11 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
|||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showTipPop();
|
if (Platform.isAndroid) {
|
||||||
|
showTipPop();
|
||||||
|
} else {
|
||||||
|
launch('https://apps.apple.com/cn/app/%E5%BE%AE%E4%B9%90%E5%9B%AD-%E4%BA%9A%E6%96%87%E5%8C%96%E5%A4%9A%E5%85%83%E4%BA%A4%E5%8F%8B%E5%9F%BA%E5%9C%B0/id6459449499', forceSafariVC: false);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(top: 18.sp),
|
margin: EdgeInsets.only(top: 18.sp),
|
||||||
@ -413,17 +417,15 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
|||||||
height: 24.sp,
|
height: 24.sp,
|
||||||
),
|
),
|
||||||
SizedBox(width: 10.sp),
|
SizedBox(width: 10.sp),
|
||||||
|
|
||||||
const Text(
|
const Text(
|
||||||
"给个5星好评",
|
"给个5星好评",
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
!Platform.isAndroid ? Container() : Container(
|
||||||
width: 10.sp,
|
width: 10.sp,
|
||||||
height: 10.sp,
|
height: 10.sp,
|
||||||
margin: EdgeInsets.only(right: 4.sp),
|
margin: EdgeInsets.only(right: 4.sp),
|
||||||
@ -431,8 +433,8 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
|||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
shape: BoxShape.circle),
|
shape: BoxShape.circle),
|
||||||
),
|
),
|
||||||
const Text(
|
Text(
|
||||||
"免费领3天会员",
|
!Platform.isAndroid ? '感谢您对我们的支持🙏' : "免费领3天会员",
|
||||||
style: TextStyle(color: Colors.white60),
|
style: TextStyle(color: Colors.white60),
|
||||||
),
|
),
|
||||||
Image(
|
Image(
|
||||||
|
|||||||
@ -1065,6 +1065,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (!chatImIdList.contains(
|
if (!chatImIdList.contains(
|
||||||
user.userId.toString())) {
|
user.userId.toString())) {
|
||||||
|
|
||||||
await createCustomMsg(user.userId.toString(),
|
await createCustomMsg(user.userId.toString(),
|
||||||
recommendCircleFriendData['user']['imId']);
|
recommendCircleFriendData['user']['imId']);
|
||||||
}
|
}
|
||||||
@ -1179,7 +1180,66 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (info.containsKey('desc1'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Text(
|
||||||
|
info['desc1'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (info.containsKey('desc2'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Text(
|
||||||
|
info['desc2'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
@ -1327,6 +1387,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
List dataList = data['data'];
|
List dataList = data['data'];
|
||||||
if (dataList.isNotEmpty) {
|
if (dataList.isNotEmpty) {
|
||||||
recommendCircleFriendData = data['data'][0];
|
recommendCircleFriendData = data['data'][0];
|
||||||
|
recommendCircleFriendData['tags'] = data['tags'];
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -441,6 +441,66 @@ class _RecommendCircleFriendItemState extends State<RecommendCircleFriendItem> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (info.containsKey('desc1'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Text(
|
||||||
|
info['desc1'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (info.containsKey('desc2'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Text(
|
||||||
|
info['desc2'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
|
|||||||
@ -30,8 +30,8 @@ class MsgPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||||
// final ctr = Get.put(MsgLogic());
|
final ctr = Get.put(MsgLogic());
|
||||||
final ctr = Get.find<MsgLogic>();
|
// final controller = Get.find<MsgLogic>();
|
||||||
var logic = Get.find<CircleLogic>();
|
var logic = Get.find<CircleLogic>();
|
||||||
void getPipeiData() async {
|
void getPipeiData() async {
|
||||||
var data = await DioManager.instance
|
var data = await DioManager.instance
|
||||||
@ -69,30 +69,35 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: GetBuilder(builder: (MsgLogic controller) {
|
child: Column(
|
||||||
return Column(
|
children: [
|
||||||
children: [
|
GetBuilder(builder: (MsgLogic controller) {
|
||||||
navigatorItem(controller),
|
return Column(
|
||||||
if (controller.isShowNotifyTip)
|
children: [
|
||||||
notifyWidget(),
|
navigatorItem(controller),
|
||||||
tipWidget(),
|
if (controller.isShowNotifyTip)
|
||||||
reconmandWidget(),
|
notifyWidget(controller),
|
||||||
// Text(controller.state.msg),
|
tipWidget(controller),
|
||||||
Expanded(child: TIMConversation(
|
reconmandWidget(controller),
|
||||||
autoScrollController: logic.scrollController,
|
// Text(controller.state.msg),
|
||||||
scrollController: logic.listScrollController,
|
|
||||||
onTapItem: (selectedConv) async {
|
],
|
||||||
String type = selectedConv.userID!.split('_')[2];
|
);
|
||||||
if (int.parse(type) == 11) {
|
}),
|
||||||
Get.toNamed(Routes.SysNotifyListPage, arguments: selectedConv);
|
Expanded(child: TIMConversation(
|
||||||
return;
|
autoScrollController: logic.scrollController,
|
||||||
}
|
scrollController: logic.listScrollController,
|
||||||
Get.toNamed(Routes.Chat, arguments: selectedConv);
|
onTapItem: (selectedConv) async {
|
||||||
},
|
String type = selectedConv.userID!.split('_')[2];
|
||||||
))
|
if (int.parse(type) == 11) {
|
||||||
],
|
Get.toNamed(Routes.SysNotifyListPage, arguments: selectedConv);
|
||||||
);
|
return;
|
||||||
}),
|
}
|
||||||
|
Get.toNamed(Routes.Chat, arguments: selectedConv);
|
||||||
|
},
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -232,7 +237,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyWidget() {
|
notifyWidget(MsgLogic controller) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
@ -248,14 +253,14 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(onTap: () {
|
GestureDetector(onTap: () {
|
||||||
ctr.isShowNotifyTip = false;
|
controller.isShowNotifyTip = false;
|
||||||
ctr.update();
|
controller.update();
|
||||||
AppSettings.openAppSettings();
|
AppSettings.openAppSettings();
|
||||||
},child:Text('去开启',style: TextStyle(color: AppColor.mainColor,fontSize: 14.sp),)),
|
},child:Text('去开启',style: TextStyle(color: AppColor.mainColor,fontSize: 14.sp),)),
|
||||||
SizedBox(width: 4.sp,),
|
SizedBox(width: 4.sp,),
|
||||||
GestureDetector(onTap: () {
|
GestureDetector(onTap: () {
|
||||||
ctr.isShowNotifyTip = false;
|
controller.isShowNotifyTip = false;
|
||||||
ctr.update();
|
controller.update();
|
||||||
},child: Icon(Icons.close_rounded,size: 20.sp,color: Colors.white,)),
|
},child: Icon(Icons.close_rounded,size: 20.sp,color: Colors.white,)),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -264,7 +269,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
tipWidget() {
|
tipWidget(MsgLogic controller) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp, bottom: 15.sp),
|
margin: EdgeInsets.only(top: 10.sp, bottom: 15.sp),
|
||||||
padding: EdgeInsets.only(left: 16.sp, right: 12.sp),
|
padding: EdgeInsets.only(left: 16.sp, right: 12.sp),
|
||||||
@ -296,7 +301,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
).createShader(Offset.zero & bounds.size);
|
).createShader(Offset.zero & bounds.size);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'${ctr.total}人在线等您聊',
|
'${controller.total}人在线等您聊',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.sp,
|
fontSize: 16.sp,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
@ -315,7 +320,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
reconmandWidget() {
|
reconmandWidget(MsgLogic controller) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.only(left: 16.sp, right: 18.sp),
|
padding: EdgeInsets.only(left: 16.sp, right: 18.sp),
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
@ -324,7 +329,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
ctr.showTipPop();
|
controller.showTipPop();
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -336,7 +341,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
height: 4.sp,
|
height: 4.sp,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
ctr.isStart ? '关闭速聊' : '冲到第一',
|
controller.isStart ? '关闭速聊' : '冲到第一',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -346,12 +351,12 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
itemBuilder: (contenxt, index) {
|
itemBuilder: (contenxt, index) {
|
||||||
if (index == ctr.chatList.length) {
|
if (index == controller.chatList.length) {
|
||||||
return MoreItem();
|
return MoreItem();
|
||||||
}
|
}
|
||||||
return peopleWidget(ctr.chatList[index]);
|
return peopleWidget(controller.chatList[index]);
|
||||||
},
|
},
|
||||||
itemCount: ctr.chatList.length + 1,
|
itemCount: controller.chatList.length + 1,
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -410,11 +415,11 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
topWidget() {
|
topWidget(MsgLogic controller) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
ctr.showTipPop();
|
controller.showTipPop();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(left: 18.sp),
|
margin: EdgeInsets.only(left: 18.sp),
|
||||||
|
|||||||
@ -15,7 +15,9 @@ class QuickLogic extends GetxController {
|
|||||||
|
|
||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
|
|
||||||
List<MyConfigData> genderList = [];
|
List<MyConfigData> genderList = [
|
||||||
|
MyConfigData('0', '全部', true)
|
||||||
|
];
|
||||||
List lists = [];
|
List lists = [];
|
||||||
int page = 1;
|
int page = 1;
|
||||||
int isVip = 0;
|
int isVip = 0;
|
||||||
@ -43,8 +45,12 @@ class QuickLogic extends GetxController {
|
|||||||
ConfigBean configBean = bean1.data!;
|
ConfigBean configBean = bean1.data!;
|
||||||
|
|
||||||
configBean.genderMap.forEach((key, value) {
|
configBean.genderMap.forEach((key, value) {
|
||||||
genderList.add(MyConfigData(key, value, false));
|
if (int.parse(key) < 3) {
|
||||||
|
genderList.add(MyConfigData(key, value, true));
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
genderList.add(MyConfigData('-1', '非二元', true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +58,7 @@ class QuickLogic extends GetxController {
|
|||||||
|
|
||||||
List wantMeet = [];
|
List wantMeet = [];
|
||||||
genderList.forEach((element) {
|
genderList.forEach((element) {
|
||||||
if (element.isSelect) {
|
if (element.isSelect && element.id != '0') {
|
||||||
wantMeet.add(element.id);
|
wantMeet.add(element.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -43,14 +43,53 @@ class QuickPage extends StatelessWidget {
|
|||||||
duration: Duration(milliseconds: 300),
|
duration: Duration(milliseconds: 300),
|
||||||
curve: Curves.easeInOut);
|
curve: Curves.easeInOut);
|
||||||
},
|
},
|
||||||
actionWdiget: GestureDetector(
|
actionWdiget: Row(
|
||||||
onTap: () {
|
children: [
|
||||||
logic.showBottomSheet(context);
|
GestureDetector(
|
||||||
},
|
onTap: () {
|
||||||
child: Image.asset(
|
showTipPop();
|
||||||
getCircleImage('icon_screen'),
|
},
|
||||||
width: 30.sp,
|
child: Container(
|
||||||
),
|
height: 28.sp,
|
||||||
|
padding: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
||||||
|
// width: 80.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.mainBgColor,
|
||||||
|
// gradient: AppColor.newMainVerLinearGradient,
|
||||||
|
borderRadius: BorderRadius.circular(14.sp),
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
getMsgImage('hu_icon'),
|
||||||
|
width: 18.sp,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 2.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"召唤30人",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 2.sp),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
logic.showBottomSheet(context);
|
||||||
|
},
|
||||||
|
child: Image.asset(
|
||||||
|
getCircleImage('icon_screen'),
|
||||||
|
width: 30.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
@ -79,43 +118,10 @@ class QuickPage extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
// Positioned(
|
||||||
bottom: 60.sp,
|
// bottom: 60.sp,
|
||||||
right: 0.sp,
|
// right: 0.sp,
|
||||||
child: GestureDetector(
|
// child: )
|
||||||
onTap: () {
|
|
||||||
showTipPop();
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: 80.sp,
|
|
||||||
width: 80.sp,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.black.withOpacity(0.75),
|
|
||||||
// gradient: AppColor.newMainVerLinearGradient,
|
|
||||||
borderRadius: BorderRadius.circular(40.sp),
|
|
||||||
),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
getMsgImage('hu_icon'),
|
|
||||||
width: 30.sp,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"一呼百应",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 14.sp,
|
|
||||||
fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.sp,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
))
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -150,7 +156,7 @@ class QuickPage extends StatelessWidget {
|
|||||||
logic.callOrhers();
|
logic.callOrhers();
|
||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
child: Text('一键呼唤三十位您想认识的人'),
|
child: Text('一键召唤三十位您想认识的人'),
|
||||||
),
|
),
|
||||||
CupertinoActionSheetAction(
|
CupertinoActionSheetAction(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:circle_app/circle_app/minefragment/logic.dart';
|
import 'package:circle_app/circle_app/minefragment/logic.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import '../../commons/Widgets/my_app_bar.dart';
|
import '../../commons/Widgets/my_app_bar.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -131,7 +134,11 @@ class SetupPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
SafeArea(child: Center(child: Text('备案号:粤ICP备2023079493号-2A',style: TextStyle(color: Colors.white.withOpacity(0.5),fontSize: 12.sp),)))
|
if (Platform.isAndroid)
|
||||||
|
SafeArea(child: GestureDetector(onTap: () {
|
||||||
|
launch('https://beian.miit.gov.cn',
|
||||||
|
forceSafariVC: false);
|
||||||
|
},child: Center(child: Text('备案号:粤ICP备2023079493号-2A',style: TextStyle(color: Colors.white.withOpacity(0.5),fontSize: 12.sp),))))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),),
|
),),
|
||||||
|
|||||||
@ -25,30 +25,9 @@ class SplashLogic extends GetxController {
|
|||||||
void onReady() async {
|
void onReady() async {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
super.onReady();
|
super.onReady();
|
||||||
loadConfig();
|
|
||||||
checkStatus();
|
checkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadConfig() async {
|
|
||||||
var data1 =
|
|
||||||
await DioManager.instance.get(url: Api.getCircleList, params: {});
|
|
||||||
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
|
||||||
data1, (data1) => ConfigBean.fromJson(data1));
|
|
||||||
if (bean1.code == 200) {
|
|
||||||
configBean = bean1.data!;
|
|
||||||
|
|
||||||
configBean.genderMap.forEach((key, value) {
|
|
||||||
genderList.add(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
configBean.orientationMap.forEach((key, value) {
|
|
||||||
orientationList.add(value);
|
|
||||||
});
|
|
||||||
configBean.roleMap.forEach((key, value) {
|
|
||||||
roleList.add(value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
checkStatus() async {
|
checkStatus() async {
|
||||||
if ((await getAuthorization()).isEmpty) {
|
if ((await getAuthorization()).isEmpty) {
|
||||||
@ -90,21 +69,15 @@ class SplashLogic extends GetxController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showOKToast(bean.msg.toString());
|
showOKToast(bean.msg.toString());
|
||||||
if (bean.code == 500) {
|
SharedPreferencesHelper sp =
|
||||||
await Future.delayed(Duration(seconds: 5));
|
await SharedPreferencesHelper.getInstance();
|
||||||
onInit();
|
String token = sp.getString(SharedPreferencesHelper.AUTHORIZATION);
|
||||||
|
if (token.isNotEmpty) {
|
||||||
|
Get.offNamed(Routes.Home);
|
||||||
} else {
|
} else {
|
||||||
SharedPreferencesHelper sp =
|
pushLoginPage();
|
||||||
await SharedPreferencesHelper.getInstance();
|
|
||||||
String token = sp.getString(SharedPreferencesHelper.AUTHORIZATION);
|
|
||||||
if (token.isNotEmpty) {
|
|
||||||
Get.offNamed(Routes.Home);
|
|
||||||
} else {
|
|
||||||
pushLoginPage();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get.toNamed(AppRoutes.Home);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||||||
import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
||||||
import 'package:circle_app/commons/colors/app_color.dart';
|
import 'package:circle_app/commons/colors/app_color.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@ -203,7 +204,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
child: CachedImg(
|
child: CachedImg(
|
||||||
imageUrl: logic.imgList[index],
|
imageUrl: logic.imgList[index].toString().split('?').first,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -312,8 +313,15 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
child: CachedImg(
|
child: CachedNetworkImage(
|
||||||
imageUrl: logic.imgList[index],
|
progressIndicatorBuilder: (
|
||||||
|
BuildContext context,
|
||||||
|
String url,
|
||||||
|
DownloadProgress progress,
|
||||||
|
) {
|
||||||
|
return CupertinoActivityIndicator(radius: 25,color: Colors.white,);
|
||||||
|
},
|
||||||
|
imageUrl: logic.imgList[index].toString().split('?').first,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -61,7 +61,6 @@ class UserinfoLogic extends GetxController {
|
|||||||
@override
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
// TODO: implement onClose
|
// TODO: implement onClose
|
||||||
timer?.cancel();
|
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +82,7 @@ class UserinfoLogic extends GetxController {
|
|||||||
state.imaglist.clear();
|
state.imaglist.clear();
|
||||||
|
|
||||||
if (userId.isEmpty) {
|
if (userId.isEmpty) {
|
||||||
isMe =true;
|
isMe = true;
|
||||||
update();
|
update();
|
||||||
fetchUserInfo(Api.getUserInfo);
|
fetchUserInfo(Api.getUserInfo);
|
||||||
fetchMyAlbum(Api.getMyAlbum);
|
fetchMyAlbum(Api.getMyAlbum);
|
||||||
@ -107,11 +106,13 @@ class UserinfoLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void loadData() async {
|
void loadData() async {
|
||||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
String myId = sp.getMyUserId();
|
String myId = sp.getMyUserId();
|
||||||
|
|
||||||
var result = await DioManager.instance.get(
|
var result = await DioManager.instance.get(
|
||||||
url: userId.toString().isNotEmpty ? Api.giftHall + userId : Api.giftHall + myId,
|
url: userId.toString().isNotEmpty
|
||||||
|
? Api.giftHall + userId
|
||||||
|
: Api.giftHall + myId,
|
||||||
);
|
);
|
||||||
if (result['code'] == 200) {
|
if (result['code'] == 200) {
|
||||||
// topTitle = result['topDesc'];
|
// topTitle = result['topDesc'];
|
||||||
@ -145,10 +146,6 @@ class UserinfoLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void showBlackDialog(BuildContext context) {
|
void showBlackDialog(BuildContext context) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@ -165,7 +162,6 @@ class UserinfoLogic extends GetxController {
|
|||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
isBlack = data["data"]["status"] == 1;
|
isBlack = data["data"]["status"] == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> fetchUserInfo(String url) async {
|
Future<void> fetchUserInfo(String url) async {
|
||||||
@ -185,13 +181,13 @@ class UserinfoLogic extends GetxController {
|
|||||||
unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1;
|
unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1;
|
||||||
isVip = userInfoBean?.vip ?? 0;
|
isVip = userInfoBean?.vip ?? 0;
|
||||||
imId = bean.data.accountId;
|
imId = bean.data.accountId;
|
||||||
print("imId="+imId);
|
print("imId=" + imId);
|
||||||
if (isMe) {
|
if (isMe) {
|
||||||
isOnline = true;
|
isOnline = true;
|
||||||
} else {
|
} else {
|
||||||
if(!isLike){
|
// if(!isLike){
|
||||||
startCountdown();
|
// startCountdown();
|
||||||
}
|
// }
|
||||||
isOnline = userInfoBean!.isOnline;
|
isOnline = userInfoBean!.isOnline;
|
||||||
isBlackBeen = bean.data.isBlock;
|
isBlackBeen = bean.data.isBlock;
|
||||||
isDestroy = bean.data.isDestroy;
|
isDestroy = bean.data.isDestroy;
|
||||||
@ -219,31 +215,9 @@ class UserinfoLogic extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
int countdown = 5;
|
|
||||||
Timer? timer = null;
|
|
||||||
|
|
||||||
startCountdown(){
|
|
||||||
|
|
||||||
timer = Timer.periodic(const Duration(seconds: 1), (t) async {
|
|
||||||
if (countdown > 0) {
|
|
||||||
countdown--;
|
|
||||||
} else {
|
|
||||||
bool isTip = await checkIsShowTip();
|
|
||||||
if (isTip) {
|
|
||||||
showFloatingButtonOverlay(Get.context!,userInfoBean!.nickname ?? '',ageMsg,userInfoBean!.avatarThumb,0,(){
|
|
||||||
setLike();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
timer?.cancel(); // 倒计时结束,取消定时器
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Future<bool> checkIsShowTip() async {
|
Future<bool> checkIsShowTip() async {
|
||||||
|
|
||||||
var result = await DioManager.instance.get(
|
var result = await DioManager.instance.get(
|
||||||
url: Api.popup + userId ,
|
url: Api.popup + userId,
|
||||||
);
|
);
|
||||||
return result['data'] ?? false;
|
return result['data'] ?? false;
|
||||||
}
|
}
|
||||||
@ -260,8 +234,6 @@ class UserinfoLogic extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Future<void> fetchUrgeStatus(String url) async {
|
Future<void> fetchUrgeStatus(String url) async {
|
||||||
var urgedata = await DioManager.instance.get(url: url);
|
var urgedata = await DioManager.instance.get(url: url);
|
||||||
var urgeBean = BaseResponse<UrgentStatus>.fromJson(
|
var urgeBean = BaseResponse<UrgentStatus>.fromJson(
|
||||||
@ -317,8 +289,6 @@ class UserinfoLogic extends GetxController {
|
|||||||
(jsonData) => jsonData,
|
(jsonData) => jsonData,
|
||||||
);
|
);
|
||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
|
|
||||||
timer?.cancel();
|
|
||||||
isLike = !isLike;
|
isLike = !isLike;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
@ -366,8 +336,11 @@ class UserinfoLogic extends GetxController {
|
|||||||
showOKToast(bean.msg);
|
showOKToast(bean.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sendGiftData(
|
||||||
void sendGiftData(String accid, String giftId, String userId, ) async {
|
String accid,
|
||||||
|
String giftId,
|
||||||
|
String userId,
|
||||||
|
) async {
|
||||||
var result = await DioManager.instance.post(url: Api.sendGift, params: {
|
var result = await DioManager.instance.post(url: Api.sendGift, params: {
|
||||||
'accid': accid,
|
'accid': accid,
|
||||||
'giftId': giftId,
|
'giftId': giftId,
|
||||||
@ -384,7 +357,7 @@ class UserinfoLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future getImageFile() async {
|
Future getImageFile() async {
|
||||||
checkPhotosStatus();
|
checkPhotosStatus();
|
||||||
try {
|
try {
|
||||||
final XFile? pickedFile = await _picker.pickImage(
|
final XFile? pickedFile = await _picker.pickImage(
|
||||||
source: ImageSource.gallery,
|
source: ImageSource.gallery,
|
||||||
@ -394,7 +367,8 @@ class UserinfoLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SmartDialog.showLoading(msg: '上传中');
|
SmartDialog.showLoading(msg: '上传中');
|
||||||
uploadImage(quToken, pickedFile, ImgPath.USER_ALBUM_IMAGE, (result) async {
|
uploadImage(quToken, pickedFile, ImgPath.USER_ALBUM_IMAGE,
|
||||||
|
(result) async {
|
||||||
var data = await DioManager.instance
|
var data = await DioManager.instance
|
||||||
.post(url: Api.updataAlbum, params: {"type": 1, "url": result});
|
.post(url: Api.updataAlbum, params: {"type": 1, "url": result});
|
||||||
var myAlbumBean = BaseResponse<AddAlbum>.fromJson(
|
var myAlbumBean = BaseResponse<AddAlbum>.fromJson(
|
||||||
@ -408,8 +382,8 @@ class UserinfoLogic extends GetxController {
|
|||||||
id: myAlbumBean.data.id,
|
id: myAlbumBean.data.id,
|
||||||
type: myAlbumBean.data.type,
|
type: myAlbumBean.data.type,
|
||||||
url: result,
|
url: result,
|
||||||
|
urlThumb: result,
|
||||||
urlThumb: result, isTop: 0));
|
isTop: 0));
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -417,7 +391,9 @@ class UserinfoLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void sendWhatToWx() async {
|
void sendWhatToWx() async {
|
||||||
var result = await DioManager.instance.get(url: Api.noticeWxNum + userId,);
|
var result = await DioManager.instance.get(
|
||||||
|
url: Api.noticeWxNum + userId,
|
||||||
|
);
|
||||||
if (result['code'] == 200) {
|
if (result['code'] == 200) {
|
||||||
showOKToast('已提醒对方填写');
|
showOKToast('已提醒对方填写');
|
||||||
} else {
|
} else {
|
||||||
@ -426,12 +402,16 @@ class UserinfoLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setTopAlbum(bool isTop, int index) async {
|
void setTopAlbum(bool isTop, int index) async {
|
||||||
var result = await DioManager.instance.post(url: Api.setTopAlbum, params: {'picId':state.imaglist[index].id,'isTop': isTop ? 1 : 0});
|
var result = await DioManager.instance.post(
|
||||||
|
url: Api.setTopAlbum,
|
||||||
|
params: {'picId': state.imaglist[index].id, 'isTop': isTop ? 1 : 0});
|
||||||
if (result['code'] == 200) {
|
if (result['code'] == 200) {
|
||||||
showOKToast('操作成功');
|
showOKToast('操作成功');
|
||||||
fetchMyAlbum(Api.getMyAlbum);
|
fetchMyAlbum(Api.getMyAlbum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class UserBean {
|
class UserBean {
|
||||||
@ -512,9 +492,11 @@ class UserBean {
|
|||||||
gender: json['gender'],
|
gender: json['gender'],
|
||||||
role: json['role'],
|
role: json['role'],
|
||||||
orientation: json['orientation'],
|
orientation: json['orientation'],
|
||||||
interests: json['interests'] == null ? [] : List<Interest>.from(
|
interests: json['interests'] == null
|
||||||
json['interests'].map((x) => Interest.fromJson(x)),
|
? []
|
||||||
),
|
: List<Interest>.from(
|
||||||
|
json['interests'].map((x) => Interest.fromJson(x)),
|
||||||
|
),
|
||||||
lng: json['lng'],
|
lng: json['lng'],
|
||||||
lat: json['lat'],
|
lat: json['lat'],
|
||||||
city: json['city'],
|
city: json['city'],
|
||||||
@ -526,7 +508,6 @@ class UserBean {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
data['age'] = this.age;
|
data['age'] = this.age;
|
||||||
@ -600,7 +581,7 @@ class ResponseBean {
|
|||||||
{required this.user,
|
{required this.user,
|
||||||
required this.likeMeCount,
|
required this.likeMeCount,
|
||||||
required this.imageUrgeCount,
|
required this.imageUrgeCount,
|
||||||
required this.unLockWxNum,
|
required this.unLockWxNum,
|
||||||
required this.accountId,
|
required this.accountId,
|
||||||
required this.isBlock,
|
required this.isBlock,
|
||||||
required this.isDestroy,
|
required this.isDestroy,
|
||||||
@ -609,7 +590,7 @@ class ResponseBean {
|
|||||||
factory ResponseBean.fromJson(Map<String, dynamic> json) {
|
factory ResponseBean.fromJson(Map<String, dynamic> json) {
|
||||||
return ResponseBean(
|
return ResponseBean(
|
||||||
accountId: json['account_id'],
|
accountId: json['account_id'],
|
||||||
unLockWxNum : json['unLockWxNum'],
|
unLockWxNum: json['unLockWxNum'],
|
||||||
user: UserBean.fromJson(json['user']),
|
user: UserBean.fromJson(json['user']),
|
||||||
likeMeCount: json['like_me_count'],
|
likeMeCount: json['like_me_count'],
|
||||||
imageUrgeCount: json['image_urge_count'],
|
imageUrgeCount: json['image_urge_count'],
|
||||||
@ -655,12 +636,11 @@ class AlbumListItem {
|
|||||||
|
|
||||||
factory AlbumListItem.fromJson(Map<String, dynamic> json) {
|
factory AlbumListItem.fromJson(Map<String, dynamic> json) {
|
||||||
return AlbumListItem(
|
return AlbumListItem(
|
||||||
id: json['id'],
|
id: json['id'],
|
||||||
type: json['type'],
|
type: json['type'],
|
||||||
url: json['url'],
|
url: json['url'],
|
||||||
urlThumb: json['thumb'],
|
urlThumb: json['thumb'],
|
||||||
isTop: json['isTop'] ?? 0
|
isTop: json['isTop'] ?? 0);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import 'dart:async';
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
@ -19,6 +20,7 @@ import '../../router/routers.dart';
|
|||||||
import '../../utils/cache_img.dart';
|
import '../../utils/cache_img.dart';
|
||||||
import '../../utils/eventBus.dart';
|
import '../../utils/eventBus.dart';
|
||||||
import '../../utils/util.dart';
|
import '../../utils/util.dart';
|
||||||
|
import '../../view/notice.dart';
|
||||||
import '../home/logic.dart';
|
import '../home/logic.dart';
|
||||||
import '../select_circle/logic.dart';
|
import '../select_circle/logic.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
@ -38,6 +40,10 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
bool isShowBlackTitle = false;
|
bool isShowBlackTitle = false;
|
||||||
|
|
||||||
bool isSetState = false;
|
bool isSetState = false;
|
||||||
|
|
||||||
|
int countdown = 5;
|
||||||
|
Timer? timer = null;
|
||||||
|
|
||||||
var sub;
|
var sub;
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -45,7 +51,8 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
sub = EventBusManager.on<ScrollViewScrollTop>().listen((event) {
|
sub = EventBusManager.on<ScrollViewScrollTop>().listen((event) {
|
||||||
if (isSetState) {
|
if (isSetState) {
|
||||||
isSetState = false;
|
isSetState = false;
|
||||||
scrollController.animateTo(0, duration: Duration(milliseconds: 250), curve: Curves.easeIn);
|
scrollController.animateTo(0,
|
||||||
|
duration: Duration(milliseconds: 250), curve: Curves.easeIn);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
scrollController.addListener(() {
|
scrollController.addListener(() {
|
||||||
@ -65,8 +72,11 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
});
|
});
|
||||||
_tabController = TabController(length: 2, vsync: this);
|
_tabController = TabController(length: 2, vsync: this);
|
||||||
_tabController.animation!.addListener(_handleTabChange);
|
_tabController.animation!.addListener(_handleTabChange);
|
||||||
|
starTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
// TODO: implement didChangeDependencies
|
// TODO: implement didChangeDependencies
|
||||||
@ -103,6 +113,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_tabController.dispose();
|
_tabController.dispose();
|
||||||
|
timer?.cancel();
|
||||||
sub.cancel();
|
sub.cancel();
|
||||||
routeObserver.unsubscribe(this);
|
routeObserver.unsubscribe(this);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@ -302,22 +313,22 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
width: Get.width,
|
width: Get.width,
|
||||||
child: _meInfoButton(logic),
|
child: _meInfoButton(logic),
|
||||||
),
|
),
|
||||||
!logic.isShowAlbum && logic.isMe
|
// !logic.isShowAlbum && logic.isMe
|
||||||
? Positioned(
|
// ? Positioned(
|
||||||
bottom: 36.sp,
|
// bottom: 36.sp,
|
||||||
right: 10.sp,
|
// right: 10.sp,
|
||||||
child: GestureDetector(
|
// child: GestureDetector(
|
||||||
onTap: () async {
|
// onTap: () async {
|
||||||
List<MyConfigData> numbers = [];
|
// List<MyConfigData> numbers = [];
|
||||||
|
//
|
||||||
var data = await Get.toNamed(Routes.CallOutPage,
|
// var data = await Get.toNamed(Routes.CallOutPage,
|
||||||
arguments: {'numbers': numbers});
|
// arguments: {'numbers': numbers});
|
||||||
},
|
// },
|
||||||
child: Image.asset(
|
// child: Image.asset(
|
||||||
getCircleImage('send_msg'),
|
// getCircleImage('send_msg'),
|
||||||
width: 60.sp,
|
// width: 60.sp,
|
||||||
)))
|
// )))
|
||||||
: Container()
|
// : Container()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -755,9 +766,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
: _imageAdapter(controller),
|
: _imageAdapter(controller),
|
||||||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||||||
? Container()
|
? Container()
|
||||||
:
|
: HomeCallOutView(controller.userId),
|
||||||
HomeCallOutView(controller.userId),
|
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -890,51 +899,67 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||||||
? Container()
|
? Container()
|
||||||
: _tabController.index == 0
|
: _tabController.index == 0
|
||||||
? GestureDetector(
|
? logic.isShowAlbum && logic.isMe
|
||||||
onTap: () {
|
? Container(
|
||||||
if (!logic.isShowAlbum && controller.isMe) {
|
child: ShaderMask(
|
||||||
List<MyConfigData> numbers = [];
|
shaderCallback: (Rect bounds) {
|
||||||
var data = Get.toNamed(Routes.CallOutPage,
|
return LinearGradient(
|
||||||
arguments: {'numbers': numbers});
|
begin: Alignment.centerRight,
|
||||||
return;
|
end: Alignment.centerLeft,
|
||||||
}
|
colors: [Color(0xffF657FF), AppColor.mainColor],
|
||||||
if (controller.isMe) {
|
).createShader(Offset.zero & bounds.size);
|
||||||
controller.isEdit = !controller.isEdit;
|
},
|
||||||
controller.update();
|
child: Text(
|
||||||
} else {
|
'真实露脸照更受欢迎',
|
||||||
controller.urgeChange();
|
style: TextStyle(
|
||||||
}
|
fontSize: 12.sp,
|
||||||
},
|
fontWeight: FontWeight.w600,
|
||||||
child: Visibility(
|
color: Colors.white),
|
||||||
// visible: logic.isShowAlbum,
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(left: 10.sp),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(17),
|
|
||||||
gradient: const LinearGradient(
|
|
||||||
colors: [
|
|
||||||
Color(0xFF06F9FA),
|
|
||||||
Color(0xFFDC5BFD),
|
|
||||||
],
|
|
||||||
begin: Alignment.centerLeft,
|
|
||||||
end: Alignment.centerRight,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.symmetric(
|
)
|
||||||
vertical: 2.sp,
|
: Container()
|
||||||
horizontal: 12.sp,
|
: _tabController.index == 1 && logic.isMe ? GestureDetector(
|
||||||
),
|
onTap: () {
|
||||||
child: Text(
|
if (!logic.isShowAlbum && controller.isMe) {
|
||||||
buttonText,
|
List<MyConfigData> numbers = [];
|
||||||
style: const TextStyle(
|
var data = Get.toNamed(Routes.CallOutPage,
|
||||||
color: Colors.white,
|
arguments: {'numbers': numbers});
|
||||||
fontSize: 12,
|
return;
|
||||||
),
|
}
|
||||||
),
|
if (controller.isMe) {
|
||||||
),
|
controller.isEdit = !controller.isEdit;
|
||||||
),
|
controller.update();
|
||||||
)
|
} else {
|
||||||
: Container(),
|
controller.urgeChange();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 10.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 2.sp,
|
||||||
|
horizontal: 12.sp,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
buttonText,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
) : Container(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -1203,8 +1228,12 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
for (var element in controller.state.imaglist) {
|
for (var element in controller.state.imaglist) {
|
||||||
imaglist.add(element.url);
|
imaglist.add(element.url);
|
||||||
}
|
}
|
||||||
Get.toNamed(Routes.SwiperPage,
|
Get.toNamed(Routes.SwiperPage, arguments: {
|
||||||
arguments: {'imaglist': imaglist, 'index': index,'isVague':homeLogic.model!.vip == 0})!.then((value) => logic.update());
|
'imaglist': imaglist,
|
||||||
|
'index': index,
|
||||||
|
'isVague': homeLogic.model!.vip == 0
|
||||||
|
})!
|
||||||
|
.then((value) => logic.update());
|
||||||
},
|
},
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
@ -1256,6 +1285,24 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (isTop == 1)
|
||||||
|
Positioned(
|
||||||
|
top: 0,
|
||||||
|
left: 5,
|
||||||
|
child: Container(
|
||||||
|
height: 25.sp,
|
||||||
|
width: 25.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black.withOpacity(0.4),
|
||||||
|
borderRadius: BorderRadius.circular(15.sp)),
|
||||||
|
child: Icon(
|
||||||
|
Icons.vertical_align_top_sharp,
|
||||||
|
color: AppColor.mainColor,
|
||||||
|
size: 20.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1691,6 +1738,23 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void starTimer() {
|
||||||
|
timer = Timer.periodic(const Duration(seconds: 1), (t) async {
|
||||||
|
if (countdown > 0) {
|
||||||
|
countdown--;
|
||||||
|
} else {
|
||||||
|
bool isTip = await logic.checkIsShowTip();
|
||||||
|
if (isTip && !logic.isMe && !logic.isLike) {
|
||||||
|
showFloatingButtonOverlay(context, logic.userInfoBean!.nickname ?? '',
|
||||||
|
logic.ageMsg, logic.userInfoBean!.avatarThumb, 0, () {
|
||||||
|
logic.setLike();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
timer?.cancel(); // 倒计时结束,取消定时器
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ScrollViewIsEnd {
|
class ScrollViewIsEnd {
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||||||
import 'package:circle_app/circle_app/circle/state.dart';
|
import 'package:circle_app/circle_app/circle/state.dart';
|
||||||
import 'package:circle_app/circle_app/circle/widgets/video_item.dart';
|
import 'package:circle_app/circle_app/circle/widgets/video_item.dart';
|
||||||
import 'package:circle_app/circle_app/userinfo/widgets/home_call_out_logic.dart';
|
import 'package:circle_app/circle_app/userinfo/widgets/home_call_out_logic.dart';
|
||||||
|
import 'package:circle_app/commons/colors/app_color.dart';
|
||||||
import 'package:circle_app/router/routers.dart';
|
import 'package:circle_app/router/routers.dart';
|
||||||
import 'package:circle_app/utils/eventBus.dart';
|
import 'package:circle_app/utils/eventBus.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
@ -13,6 +14,8 @@ import 'package:get/get_core/src/get_main.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../../../commons/Widgets/text_more.dart';
|
import '../../../commons/Widgets/text_more.dart';
|
||||||
|
import '../../../net/api.dart';
|
||||||
|
import '../../../net/dio_manager.dart';
|
||||||
import '../../../utils/cache_img.dart';
|
import '../../../utils/cache_img.dart';
|
||||||
import '../logic.dart';
|
import '../logic.dart';
|
||||||
import '../view.dart';
|
import '../view.dart';
|
||||||
@ -181,6 +184,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
|
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
// height: widgetHeight,
|
// height: widgetHeight,
|
||||||
@ -219,7 +223,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
Container(
|
Container(
|
||||||
// height: widgetHeight,
|
// height: widgetHeight,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
padding: EdgeInsets.only(top: 12.sp, left: 12.sp, right: 12.sp,bottom: 12.sp),
|
padding: EdgeInsets.only(top: 12.sp, left: 12.sp, right: 12.sp,),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -386,12 +390,13 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
? Container()
|
? Container()
|
||||||
: GestureDetector(
|
: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showTipPiker(lists.id!.toString(),
|
showCallOutTipPop(lists.id!.toString(),
|
||||||
listsLg!.lists.indexOf(lists));
|
listsLg!.lists.indexOf(lists),lists!.userTop! == 1);
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Icon(
|
||||||
getCircleImage('delete'),
|
Icons.more_vert,
|
||||||
width: 20.sp,
|
color: AppColor.mainColor,
|
||||||
|
size: 20,
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
@ -646,6 +651,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
Container(
|
Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
margin: EdgeInsets.only(top: 4.sp,bottom: 5.sp),
|
margin: EdgeInsets.only(top: 4.sp,bottom: 5.sp),
|
||||||
|
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
@ -659,12 +665,13 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
? Container()
|
? Container()
|
||||||
: GestureDetector(
|
: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showTipPiker(lists.id!.toString(),
|
showCallOutTipPop(lists.id!.toString(),
|
||||||
listsLg!.lists.indexOf(lists));
|
listsLg!.lists.indexOf(lists),lists.userTop == 1);
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Icon(
|
||||||
getCircleImage('delete'),
|
Icons.more_vert,
|
||||||
width: 20.sp,
|
color: AppColor.mainColor,
|
||||||
|
size: 20,
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
@ -722,6 +729,43 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
return painter.width;
|
return painter.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showCallOutTipPop(String calloutId, int index, bool isTop,) {
|
||||||
|
Get.bottomSheet(
|
||||||
|
CupertinoActionSheet(
|
||||||
|
title: Text(
|
||||||
|
'喊话操作',
|
||||||
|
style: TextStyle(fontSize: 22),
|
||||||
|
), //标题
|
||||||
|
//提示内容
|
||||||
|
actions: <Widget>[
|
||||||
|
CupertinoActionSheetAction(
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
setCallOutTop(!isTop, calloutId);
|
||||||
|
},
|
||||||
|
child: Text(isTop ? '取消置顶' : '置顶'),
|
||||||
|
),
|
||||||
|
CupertinoActionSheetAction(
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
showTipPiker(calloutId,
|
||||||
|
index);
|
||||||
|
// toast('举报成功,等待反馈!');
|
||||||
|
},
|
||||||
|
child: Text('删除'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
cancelButton: CupertinoActionSheetAction(
|
||||||
|
//取消按钮
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Text('取消'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isScrollControlled: true);
|
||||||
|
}
|
||||||
|
|
||||||
showTipPiker(String callOutId, int index) {
|
showTipPiker(String callOutId, int index) {
|
||||||
return Get.bottomSheet(
|
return Get.bottomSheet(
|
||||||
Scaffold(
|
Scaffold(
|
||||||
@ -758,4 +802,15 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
enableDrag: false,
|
enableDrag: false,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setCallOutTop(bool isTop, String calloutId) async {
|
||||||
|
var result = await DioManager.instance.post(
|
||||||
|
url: Api.calloutTop,
|
||||||
|
params: {'calloutId': calloutId, 'isTop': isTop ? 1 : 0});
|
||||||
|
if (result['code'] == 200) {
|
||||||
|
showOKToast('操作成功');
|
||||||
|
listsLg?.callOutPage = 1;
|
||||||
|
listsLg?.loadCallOutListData(widget.userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,9 @@ class World_call_outLogic extends GetxController {
|
|||||||
TextEditingController inputController = TextEditingController();
|
TextEditingController inputController = TextEditingController();
|
||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
FocusNode focusNode = FocusNode();
|
FocusNode focusNode = FocusNode();
|
||||||
List<MyConfigData> genderList = [];
|
List<MyConfigData> genderList = [
|
||||||
|
MyConfigData('0', '全部', true)
|
||||||
|
];
|
||||||
String myUserId = '';
|
String myUserId = '';
|
||||||
bool isLoad = true;
|
bool isLoad = true;
|
||||||
List<WorldLists> lists = [];
|
List<WorldLists> lists = [];
|
||||||
@ -58,7 +60,6 @@ class World_call_outLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void initGerder() async {
|
void initGerder() async {
|
||||||
genderList.clear();
|
|
||||||
var data1 =
|
var data1 =
|
||||||
await DioManager.instance.get(url: Api.getCircleList, params: {});
|
await DioManager.instance.get(url: Api.getCircleList, params: {});
|
||||||
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||||
@ -68,8 +69,11 @@ class World_call_outLogic extends GetxController {
|
|||||||
ConfigBean configBean = bean1.data!;
|
ConfigBean configBean = bean1.data!;
|
||||||
|
|
||||||
configBean.genderMap.forEach((key, value) {
|
configBean.genderMap.forEach((key, value) {
|
||||||
genderList.add(MyConfigData(key, value, false));
|
if (int.parse(key) < 3) {
|
||||||
|
genderList.add(MyConfigData(key, value, true));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
genderList.add(MyConfigData('-1', '非二元', true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +110,7 @@ class World_call_outLogic extends GetxController {
|
|||||||
|
|
||||||
List wantMeet = [];
|
List wantMeet = [];
|
||||||
genderList.forEach((element) {
|
genderList.forEach((element) {
|
||||||
if (element.isSelect) {
|
if (element.isSelect && element.id != '0') {
|
||||||
wantMeet.add(element.id);
|
wantMeet.add(element.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -32,8 +32,7 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
String zeroWidthSpace = '\ufeff';
|
String zeroWidthSpace = '\ufeff';
|
||||||
|
|
||||||
int? currentCursor;
|
int? currentCursor;
|
||||||
|
final logic = Get.put(World_call_outLogic());
|
||||||
final logic = Get.find<World_call_outLogic>();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
|||||||
@ -17,8 +17,9 @@ import 'dart:math' as math;
|
|||||||
|
|
||||||
class TodayPeopleDialog extends StatefulWidget {
|
class TodayPeopleDialog extends StatefulWidget {
|
||||||
bool isShow;
|
bool isShow;
|
||||||
String urlStr;
|
String url;
|
||||||
TodayPeopleDialog({super.key, this.isShow = false, this.urlStr = ''});
|
Map recommendCircleFriendData;
|
||||||
|
TodayPeopleDialog({super.key, this.isShow = false, this.url = '', this.recommendCircleFriendData = const {}});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_TodayPeopleDialogState createState() => _TodayPeopleDialogState();
|
_TodayPeopleDialogState createState() => _TodayPeopleDialogState();
|
||||||
@ -35,9 +36,11 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
if (widget.urlStr.isNotEmpty) {
|
if (widget.url.isNotEmpty) {
|
||||||
isLoad = false;
|
isLoad = false;
|
||||||
|
recommendCircleFriendData = widget.recommendCircleFriendData;
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchMyAlbum(Api.getMyAlbum);
|
fetchMyAlbum(Api.getMyAlbum);
|
||||||
|
|
||||||
|
|
||||||
@ -52,14 +55,17 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
if (myAlbumBean.isSuccess()) {
|
if (myAlbumBean.isSuccess()) {
|
||||||
imgList.addAll(myAlbumBean.data.lists);
|
imgList.addAll(myAlbumBean.data.lists);
|
||||||
}
|
}
|
||||||
loadRecommendCircleFriendData();
|
if (widget.url.isEmpty) {
|
||||||
|
loadRecommendCircleFriendData();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void loadRecommendCircleFriendData() async {
|
void loadRecommendCircleFriendData() async {
|
||||||
if (widget.urlStr.isEmpty) {
|
if (widget.url.isEmpty) {
|
||||||
isLoad = true;
|
isLoad = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,18 +74,19 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
|
|
||||||
});
|
});
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
url: widget.urlStr.isNotEmpty ? widget.urlStr : Api.chatRecommendFriend,
|
url: widget.url.isNotEmpty ? widget.url : Api.chatRecommendFriend,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
if (await sp.isShowMatch() && imgList.isEmpty && widget.urlStr.isEmpty) {
|
if (await sp.isShowMatch() && imgList.isEmpty && widget.url.isEmpty) {
|
||||||
showOKToast('上传真实头像和形象照后更容易匹配到想认识的人哦~');
|
showOKToast('上传真实头像和形象照后更容易匹配到想认识的人哦~');
|
||||||
}
|
}
|
||||||
isLoad = false;
|
isLoad = false;
|
||||||
List dataList = data['data'];
|
List dataList = data['data'];
|
||||||
if (dataList.isNotEmpty) {
|
if (dataList.isNotEmpty) {
|
||||||
recommendCircleFriendData = data['data'][0];
|
recommendCircleFriendData = data['data'][0];
|
||||||
|
recommendCircleFriendData['tags'] = data['tags'];
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
@ -167,6 +174,10 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (recommendCircleFriendData.containsKey('tags')) {
|
||||||
|
titleList = recommendCircleFriendData['tags'];
|
||||||
|
}
|
||||||
|
|
||||||
if (titleList.length >= 1) {
|
if (titleList.length >= 1) {
|
||||||
info['city'] = titleList.first;
|
info['city'] = titleList.first;
|
||||||
}
|
}
|
||||||
@ -178,6 +189,14 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
if (titleList.length >= 3) {
|
if (titleList.length >= 3) {
|
||||||
info['desc'] = titleList[2];
|
info['desc'] = titleList[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (titleList.length >= 4) {
|
||||||
|
info['desc1'] = titleList[3];
|
||||||
|
}
|
||||||
|
if (titleList.length >= 5) {
|
||||||
|
info['desc2'] = titleList[4];
|
||||||
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
loadRecommendCircleFriendData();
|
loadRecommendCircleFriendData();
|
||||||
return Container();
|
return Container();
|
||||||
@ -423,6 +442,66 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (info.containsKey('desc1'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Text(
|
||||||
|
info['desc1'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (info.containsKey('desc2'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, right: 16.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: Text(
|
||||||
|
info['desc2'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
@ -616,6 +695,35 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
itemWidget(),
|
itemWidget(),
|
||||||
|
if (widget.url.isNotEmpty)
|
||||||
|
Container(
|
||||||
|
height: 40.sp,
|
||||||
|
margin: EdgeInsets.only(top: 20.sp),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 100.sp,
|
||||||
|
height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xFF392D53),
|
||||||
|
borderRadius: BorderRadius.circular(20.sp)),
|
||||||
|
child: Text(
|
||||||
|
'先不看了',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 15.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (widget.url.isEmpty)
|
||||||
Container(
|
Container(
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
margin: EdgeInsets.only(top: 20.sp),
|
margin: EdgeInsets.only(top: 20.sp),
|
||||||
|
|||||||
@ -38,6 +38,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
loadMyWxInfoData();
|
loadMyWxInfoData();
|
||||||
|
loadWxStatus();
|
||||||
// updateWxText();
|
// updateWxText();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,7 +357,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
if (result['code'] ==200) {
|
if (result['code'] ==200) {
|
||||||
showOKToast('设置成功');
|
showOKToast('设置成功');
|
||||||
Get.back();
|
Get.back();
|
||||||
} else if (result['code'] == 10081) {
|
} else if (result['code'] == 10081) {
|
||||||
showRechargeScreenDialog();
|
showRechargeScreenDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,9 +446,9 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
void loadWxStatus() async {
|
void loadWxStatus() async {
|
||||||
var result = await DioManager.getInstance().get(url: Api.updateWxNumState,);
|
var result = await DioManager.getInstance().get(url: Api.updateWxNumState,);
|
||||||
if (result['code'] == 10034) {
|
if (result['code'] == 10034) {
|
||||||
wxStatusInfo['10034'] = result['msg'];
|
wxInfo['10034'] = result['msg'];
|
||||||
} else if (result['code'] == 10595) {
|
} else if (result['code'] == 10595) {
|
||||||
wxStatusInfo['10595'] = result['msg'];
|
wxInfo['10595'] = result['msg'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,6 +55,9 @@ void main() {
|
|||||||
FlutterBugly.init(
|
FlutterBugly.init(
|
||||||
androidAppId: "8509314e11",
|
androidAppId: "8509314e11",
|
||||||
);
|
);
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
getLostData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FlutterBugly.init(
|
FlutterBugly.init(
|
||||||
@ -62,9 +65,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (Platform.isAndroid) {
|
|
||||||
getLostData();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setCustomErrorWidget() {
|
setCustomErrorWidget() {
|
||||||
@ -162,6 +163,7 @@ void uploadBuzIDAndToken() async {
|
|||||||
ChannelPush.uploadToken();
|
ChannelPush.uploadToken();
|
||||||
|
|
||||||
print("token=" + token);
|
print("token=" + token);
|
||||||
|
|
||||||
if (token != "") {
|
if (token != "") {
|
||||||
V2TimCallback res = await coreInstance.setOfflinePushConfig(
|
V2TimCallback res = await coreInstance.setOfflinePushConfig(
|
||||||
token: token, businessID: businessID);
|
token: token, businessID: businessID);
|
||||||
@ -398,7 +400,19 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
///设置文字大小不随系统设置改变
|
///设置文字大小不随系统设置改变
|
||||||
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
|
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
|
||||||
child:FlutterSmartDialog(
|
child:FlutterSmartDialog(
|
||||||
child: child,
|
child: RefreshConfiguration(
|
||||||
|
footerTriggerDistance: 15.0,
|
||||||
|
dragSpeedRatio: 0.91,
|
||||||
|
// headerBuilder: () => WaterDropHeader(),
|
||||||
|
footerBuilder: () => CustomLoadFooter(), // 使用自定义 Footer
|
||||||
|
headerTriggerDistance: 80.0,
|
||||||
|
maxOverScrollExtent: 100,
|
||||||
|
maxUnderScrollExtent: 0,
|
||||||
|
enableScrollWhenRefreshCompleted: true,
|
||||||
|
enableLoadingWhenFailed: true,
|
||||||
|
hideFooterWhenNotFull: false,
|
||||||
|
enableBallisticLoad: true, child: child!,
|
||||||
|
)
|
||||||
));
|
));
|
||||||
},
|
},
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
|
|||||||
@ -139,6 +139,10 @@ class Api {
|
|||||||
//置顶相册
|
//置顶相册
|
||||||
static const setTopAlbum = 'up-service/topAlbum';
|
static const setTopAlbum = 'up-service/topAlbum';
|
||||||
|
|
||||||
|
|
||||||
|
//置顶喊话
|
||||||
|
static const calloutTop = 'up-service/callout/top';
|
||||||
|
|
||||||
//他的相册
|
//他的相册
|
||||||
static const getTaAlbum = 'up-service/user/';
|
static const getTaAlbum = 'up-service/user/';
|
||||||
|
|
||||||
|
|||||||
@ -79,21 +79,30 @@ String getTabbarImage(String image) {
|
|||||||
String getCircleImage(String image) {
|
String getCircleImage(String image) {
|
||||||
return '${Values.circle_img}${image}.png';
|
return '${Values.circle_img}${image}.png';
|
||||||
}
|
}
|
||||||
|
bool isShowToast = false;
|
||||||
///弹窗文本提示 msg: 提示内容
|
///弹窗文本提示 msg: 提示内容
|
||||||
showOKToast(String msg) {
|
showOKToast(String msg) {
|
||||||
|
if (isShowToast) return;
|
||||||
|
isShowToast = true;
|
||||||
|
int seconds = msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2;
|
||||||
showToast(
|
showToast(
|
||||||
msg,
|
msg,
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
duration: Duration(seconds: msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2),
|
duration: Duration(seconds: seconds),
|
||||||
position: ToastPosition.center,
|
position: ToastPosition.center,
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
radius: 13.0,
|
radius: 13.0,
|
||||||
textStyle: const TextStyle(fontSize: 16.0,color: Colors.white),
|
textStyle: const TextStyle(fontSize: 16.0,color: Colors.white),
|
||||||
);
|
);
|
||||||
|
Future.delayed(
|
||||||
|
Duration(
|
||||||
|
seconds: seconds,
|
||||||
|
), () {
|
||||||
|
isShowToast = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
loaddingWidget(bool isMore,{String tip = '--到底了--'}) {
|
loaddingWidget(bool isMore,{String tip = '---更多精彩正在赶来的路上---'}) {
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: isMore
|
child: isMore
|
||||||
@ -377,7 +386,7 @@ class CustomLoadFooter extends StatelessWidget {
|
|||||||
canLoadingText: "松手开始加载数据",
|
canLoadingText: "松手开始加载数据",
|
||||||
loadingText: "正在加载...",
|
loadingText: "正在加载...",
|
||||||
idleText: "上拉加载更多",
|
idleText: "上拉加载更多",
|
||||||
noDataText: "到底了~",
|
noDataText: "---更多精彩正在赶来的路上---",
|
||||||
failedText: "加载失败",
|
failedText: "加载失败",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -686,6 +695,7 @@ createCustomMsg(String userId, String imId) async {
|
|||||||
info['myInterests'] = data['data']['myInterests'] ?? [];
|
info['myInterests'] = data['data']['myInterests'] ?? [];
|
||||||
info['user'] = data['data']['user'];
|
info['user'] = data['data']['user'];
|
||||||
info['guide_text'] = data['data']['guide_text'] ?? '请问现在有空吗?';
|
info['guide_text'] = data['data']['guide_text'] ?? '请问现在有空吗?';
|
||||||
|
info['tags'] = recommendCircleFriendData['tags'];
|
||||||
await sendCustomMsg(imId, jsonEncode(info), desc);
|
await sendCustomMsg(imId, jsonEncode(info), desc);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -965,6 +975,9 @@ Map checkCardReturnData(Map recommendCircleFriendData) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (recommendCircleFriendData.containsKey('tags')) {
|
||||||
|
titleList = recommendCircleFriendData['tags'];
|
||||||
|
}
|
||||||
if (titleList.length >= 1) {
|
if (titleList.length >= 1) {
|
||||||
info['city'] = titleList.first;
|
info['city'] = titleList.first;
|
||||||
}
|
}
|
||||||
@ -976,6 +989,15 @@ Map checkCardReturnData(Map recommendCircleFriendData) {
|
|||||||
if (titleList.length >= 3) {
|
if (titleList.length >= 3) {
|
||||||
info['desc'] = titleList[2];
|
info['desc'] = titleList[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (titleList.length >= 4) {
|
||||||
|
info['desc1'] = titleList[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (titleList.length >= 5) {
|
||||||
|
info['desc2'] = titleList[4];
|
||||||
|
}
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,10 +45,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: app_settings
|
name: app_settings
|
||||||
sha256: e6a34735d4ddb24ca9c5fd7e965ec65c8b611cbd3a329152c294f9e9f4bacb33
|
sha256: "2ec421f375d747916c4c0193933567074ea60c4f01c4a68642f07fef1002524e"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.3.1"
|
version: "4.0.4"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -630,14 +630,6 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.3"
|
version: "1.1.3"
|
||||||
flutter_install_app:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_install_app
|
|
||||||
sha256: "9b117006d17c900e671c26bcbc9b15c7b8efd15d6f9b4442ad5d576de20fab53"
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
flutter_intl:
|
flutter_intl:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -1045,6 +1037,14 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.8.1"
|
version: "4.8.1"
|
||||||
|
keframe:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: keframe
|
||||||
|
sha256: c0970f29443a3ac1a1f8b28d4f3572d8ff1f96d18dda8a68b23f78b10cb74997
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.6"
|
||||||
link_preview_generator:
|
link_preview_generator:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -90,7 +90,7 @@ dependencies:
|
|||||||
fluwx: ^3.8.1+1
|
fluwx: ^3.8.1+1
|
||||||
event_bus: ^2.0.0
|
event_bus: ^2.0.0
|
||||||
#安装apk
|
#安装apk
|
||||||
flutter_install_app: 1.3.0
|
# flutter_install_app: 1.3.0
|
||||||
#闪屏页
|
#闪屏页
|
||||||
flutter_native_splash: 2.2.16
|
flutter_native_splash: 2.2.16
|
||||||
#腾讯离线推送
|
#腾讯离线推送
|
||||||
@ -112,11 +112,13 @@ dependencies:
|
|||||||
#边框渐变
|
#边框渐变
|
||||||
gradient_borders: ^1.0.0
|
gradient_borders: ^1.0.0
|
||||||
#系统设置 安卓4.3.1 苹果4.0.4
|
#系统设置 安卓4.3.1 苹果4.0.4
|
||||||
app_settings: 4.3.1
|
app_settings: 4.0.4
|
||||||
#百度定位插件
|
#百度定位插件
|
||||||
flutter_bmflocation: ^3.6.0
|
flutter_bmflocation: ^3.6.0
|
||||||
#通知权限
|
#通知权限
|
||||||
notification_permissions: ^0.6.1
|
notification_permissions: ^0.6.1
|
||||||
|
#分帧
|
||||||
|
keframe: ^2.0.6
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user