2.3.8代码提交
This commit is contained in:
parent
849a459e80
commit
20ff09c9d5
@ -19,7 +19,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.3.3</string>
|
<string>2.3.7</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
|
|||||||
@ -38,8 +38,8 @@ class CircleLogic extends GetxController {
|
|||||||
SwiperController swiperController = SwiperController();
|
SwiperController swiperController = SwiperController();
|
||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
final RefreshController peopleRefreshController = RefreshController();
|
final RefreshController peopleRefreshController = RefreshController();
|
||||||
|
final ScrollController nearScrollController = ScrollController();
|
||||||
|
ScrollController newscrollController = ScrollController();
|
||||||
HomeLogic homeLogic = Get.find<HomeLogic>();
|
HomeLogic homeLogic = Get.find<HomeLogic>();
|
||||||
|
|
||||||
late RefreshManager newPeopleManager;
|
late RefreshManager newPeopleManager;
|
||||||
@ -561,9 +561,9 @@ class CircleLogic extends GetxController {
|
|||||||
loadNearbyInfo();
|
loadNearbyInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vicinityPage == 1) {
|
// if (vicinityPage == 1) {
|
||||||
refreshController.refreshCompleted();
|
refreshController.refreshCompleted();
|
||||||
}
|
// }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (vicinityPage == 1) {
|
if (vicinityPage == 1) {
|
||||||
@ -586,8 +586,8 @@ class CircleLogic extends GetxController {
|
|||||||
refreshController.loadComplete();
|
refreshController.loadComplete();
|
||||||
} else {
|
} else {
|
||||||
isLoadNearByList = false;
|
isLoadNearByList = false;
|
||||||
// refreshController.loadComplete();
|
refreshController.loadComplete();
|
||||||
getNearByList();
|
// getNearByList();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -607,10 +607,17 @@ class CircleLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
} else if (bean.code == 21201) {
|
} else if (bean.code == 21201) {
|
||||||
showOKToast(bean.msg);
|
showOKToast(bean.msg);
|
||||||
if (vicinityPage == 1) {
|
// if (vicinityPage == 1) {
|
||||||
showVipDialog('nearby_list');
|
showVipDialog('nearby_list');
|
||||||
}
|
roleList.forEach((element) {
|
||||||
myVip = 0;
|
element.isSelect = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
orientationList.forEach((element) {
|
||||||
|
element.isSelect = false;
|
||||||
|
});
|
||||||
|
refreshController.refreshCompleted();
|
||||||
|
// }
|
||||||
refreshController.loadComplete();
|
refreshController.loadComplete();
|
||||||
update();
|
update();
|
||||||
} else if (bean.code == 404 || bean.code == 500) {
|
} else if (bean.code == 404 || bean.code == 500) {
|
||||||
@ -694,6 +701,7 @@ class CircleLogic extends GetxController {
|
|||||||
if (pageIndex == 1) {
|
if (pageIndex == 1) {
|
||||||
chargeNewPeopleType = data['data']['chargeType'];
|
chargeNewPeopleType = data['data']['chargeType'];
|
||||||
chargeNewPeopleFreeNum = data['data']['chargeFreeNum'];
|
chargeNewPeopleFreeNum = data['data']['chargeFreeNum'];
|
||||||
|
newPeopleList.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
List list = data['data']['users'];
|
List list = data['data']['users'];
|
||||||
@ -719,6 +727,24 @@ class CircleLogic extends GetxController {
|
|||||||
isNewPeopleMore = false;
|
isNewPeopleMore = false;
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
|
} else if (data['code'] == 21201) {
|
||||||
|
showOKToast(data['msg']);
|
||||||
|
// if (pageIndex == 1) {
|
||||||
|
new_roleList.forEach((element) {
|
||||||
|
element.isSelect = false;
|
||||||
|
});
|
||||||
|
new_orientationList.forEach((element) {
|
||||||
|
element.isSelect = false;
|
||||||
|
});
|
||||||
|
showVipDialog('new_list');
|
||||||
|
// }
|
||||||
|
if (peopleRefreshController.headerStatus == RefreshStatus.refreshing) {
|
||||||
|
peopleRefreshController.refreshCompleted();
|
||||||
|
}
|
||||||
|
if (peopleRefreshController.footerStatus == LoadStatus.loading) {
|
||||||
|
peopleRefreshController.loadComplete();
|
||||||
|
}
|
||||||
|
update();
|
||||||
} else if (data['code'] == 404 || data['code'] == 500) {
|
} else if (data['code'] == 404 || data['code'] == 500) {
|
||||||
isLoadFail = true;
|
isLoadFail = true;
|
||||||
if (peopleRefreshController.headerStatus == RefreshStatus.refreshing) {
|
if (peopleRefreshController.headerStatus == RefreshStatus.refreshing) {
|
||||||
@ -732,6 +758,7 @@ class CircleLogic extends GetxController {
|
|||||||
} else {
|
} else {
|
||||||
isNewPeopleMore = false;
|
isNewPeopleMore = false;
|
||||||
}
|
}
|
||||||
|
return data['code'];
|
||||||
}
|
}
|
||||||
|
|
||||||
void loadRecommendCircleFriendData() async {
|
void loadRecommendCircleFriendData() async {
|
||||||
@ -818,13 +845,17 @@ class CircleLogic extends GetxController {
|
|||||||
|
|
||||||
|
|
||||||
void onRefresh() async {
|
void onRefresh() async {
|
||||||
|
int lastPage = pageIndex;
|
||||||
pageIndex = 1;
|
pageIndex = 1;
|
||||||
newPeopleList.clear();
|
// newPeopleList.clear();
|
||||||
|
newscrollController.jumpTo(0);
|
||||||
isNewPeopleMore = true;
|
isNewPeopleMore = true;
|
||||||
peopleRefreshController.resetNoData();
|
// peopleRefreshController.resetNoData();
|
||||||
update();
|
update();
|
||||||
getNewPeopleListData();
|
int code = await getNewPeopleListData();
|
||||||
|
if (code != 200) {
|
||||||
|
pageIndex = lastPage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void onLoading() async {
|
void onLoading() async {
|
||||||
|
|||||||
@ -117,7 +117,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
margin: EdgeInsets.only(top: 45.sp),
|
margin: EdgeInsets.only(top: 45.sp),
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
children: [NewPeople(), Vicinity(controller), Discover(0)],
|
children: [NewPeople(logic:controller), Vicinity(controller), Discover(0)],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (logic.callList.isNotEmpty && _tabController.index == 1)
|
if (logic.callList.isNotEmpty && _tabController.index == 1)
|
||||||
@ -213,6 +213,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
onLoading: _onLoading,
|
onLoading: _onLoading,
|
||||||
enablePullUp: logic.myVip > 0,
|
enablePullUp: logic.myVip > 0,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
|
controller: logic.nearScrollController,
|
||||||
padding: EdgeInsets.all(10.sp),
|
padding: EdgeInsets.all(10.sp),
|
||||||
itemCount: logic.myVip == 0
|
itemCount: logic.myVip == 0
|
||||||
? logic.vicinityList.length + 2
|
? logic.vicinityList.length + 2
|
||||||
@ -540,8 +541,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
void _onRefresh() async {
|
void _onRefresh() async {
|
||||||
logic.vicinityPage = 1;
|
logic.vicinityPage = 1;
|
||||||
logic.offset = 0;
|
logic.offset = 0;
|
||||||
logic.vicinityList.clear();
|
logic.nearScrollController.jumpTo(0);
|
||||||
logic.update();
|
|
||||||
logic.loadNearbyInfo();
|
logic.loadNearbyInfo();
|
||||||
logic.getNearByList();
|
logic.getNearByList();
|
||||||
|
|
||||||
@ -1016,7 +1016,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
callback: (genderList, orientationList, roleList, status) {
|
callback: (genderList, orientationList, roleList, status) {
|
||||||
if (_tabController.index == 1) {
|
if (_tabController.index == 1) {
|
||||||
EventBusManager.fire(NearScrollTap());
|
EventBusManager.fire(NearScrollTap());
|
||||||
_onRefresh();
|
logic.refreshController.requestRefresh();
|
||||||
} else if (_tabController.index == 0) {
|
} else if (_tabController.index == 0) {
|
||||||
List<String> genders = [];
|
List<String> genders = [];
|
||||||
logic.new_genderList.forEach((element) {
|
logic.new_genderList.forEach((element) {
|
||||||
@ -1033,7 +1033,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
logic.new_roleList.forEach((element) {
|
logic.new_roleList.forEach((element) {
|
||||||
if (element.isSelect) orientations.add(element.id);
|
if (element.isSelect) orientations.add(element.id);
|
||||||
});
|
});
|
||||||
logic.onRefresh();
|
logic.peopleRefreshController.requestRefresh();
|
||||||
} else {
|
} else {
|
||||||
List<String> genders = [];
|
List<String> genders = [];
|
||||||
logic.dis_genderList.forEach((element) {
|
logic.dis_genderList.forEach((element) {
|
||||||
|
|||||||
@ -385,13 +385,16 @@ class _DiscoverState extends State<Discover>
|
|||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
if (isLoadMore) {
|
if (isLoadMore) {
|
||||||
isLoadMore = false;
|
Future.delayed(Duration(milliseconds: 250),() {
|
||||||
lastPage = lastPage + 1;
|
isLoadMore = false;
|
||||||
animateToOffset(
|
lastPage = lastPage + 1;
|
||||||
_scrollController, lastPage * (screenHeight + 5.sp), () {});
|
animateToOffset(
|
||||||
|
_scrollController, lastPage * (screenHeight + 5.sp), () {});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
isLoadMore = false;
|
||||||
loadFail = true;
|
loadFail = true;
|
||||||
isMore = false;
|
isMore = false;
|
||||||
showOKToast(data['msg']);
|
showOKToast(data['msg']);
|
||||||
@ -408,12 +411,15 @@ class _DiscoverState extends State<Discover>
|
|||||||
}
|
}
|
||||||
|
|
||||||
void refreshData() {
|
void refreshData() {
|
||||||
|
if (refreshController.headerStatus == RefreshStatus.refreshing) return;
|
||||||
index = 1;
|
index = 1;
|
||||||
loadFail = false;
|
loadFail = false;
|
||||||
loadData();
|
loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
_onLoading() {
|
_onLoading() {
|
||||||
|
if (isLoadMore) return;
|
||||||
|
// if (refreshController.footerStatus == LoadStatus.loading) return;
|
||||||
isLoadMore = true;
|
isLoadMore = true;
|
||||||
loadData();
|
loadData();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,6 +17,9 @@ import '../../userinfo/view.dart';
|
|||||||
import 'dart:ui' as ui show PlaceholderAlignment;
|
import 'dart:ui' as ui show PlaceholderAlignment;
|
||||||
|
|
||||||
class NewPeople extends StatefulWidget {
|
class NewPeople extends StatefulWidget {
|
||||||
|
CircleLogic logic;
|
||||||
|
|
||||||
|
NewPeople({super.key,required this.logic});
|
||||||
@override
|
@override
|
||||||
_NewPeopleState createState() => new _NewPeopleState();
|
_NewPeopleState createState() => new _NewPeopleState();
|
||||||
}
|
}
|
||||||
@ -24,9 +27,9 @@ class NewPeople extends StatefulWidget {
|
|||||||
class _NewPeopleState extends State<NewPeople> {
|
class _NewPeopleState extends State<NewPeople> {
|
||||||
// TODO: add state variables and methods
|
// TODO: add state variables and methods
|
||||||
|
|
||||||
CircleLogic logic = Get.find<CircleLogic>();
|
late CircleLogic logic;
|
||||||
var sub;
|
var sub;
|
||||||
ScrollController _scrollController = ScrollController();
|
|
||||||
|
|
||||||
double maxOff = 0;
|
double maxOff = 0;
|
||||||
@override
|
@override
|
||||||
@ -35,6 +38,7 @@ class _NewPeopleState extends State<NewPeople> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
|
logic = widget.logic;
|
||||||
logic.newPeopleManager = RefreshManager(
|
logic.newPeopleManager = RefreshManager(
|
||||||
refreshInterval: 5 * 60,
|
refreshInterval: 5 * 60,
|
||||||
pageType: '新人',
|
pageType: '新人',
|
||||||
@ -49,7 +53,7 @@ class _NewPeopleState extends State<NewPeople> {
|
|||||||
logic.loadNerPeopleRouteStatus();
|
logic.loadNerPeopleRouteStatus();
|
||||||
}
|
}
|
||||||
sub = EventBusManager.on<ScrollToTop>().listen((event) {
|
sub = EventBusManager.on<ScrollToTop>().listen((event) {
|
||||||
_scrollController.animateTo(0,
|
logic.newscrollController.animateTo(0,
|
||||||
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -58,7 +62,7 @@ class _NewPeopleState extends State<NewPeople> {
|
|||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
super.dispose();
|
super.dispose();
|
||||||
_scrollController.dispose();
|
logic.newscrollController.dispose();
|
||||||
|
|
||||||
sub.cancel();
|
sub.cancel();
|
||||||
}
|
}
|
||||||
@ -77,7 +81,7 @@ class _NewPeopleState extends State<NewPeople> {
|
|||||||
onLoading: logic.onLoading,
|
onLoading: logic.onLoading,
|
||||||
enablePullUp: true,
|
enablePullUp: true,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
controller: _scrollController,
|
controller: logic.newscrollController,
|
||||||
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||||
itemCount: logic.newPeopleList.length,
|
itemCount: logic.newPeopleList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
|
|||||||
@ -728,6 +728,7 @@ class _VicinityState extends State<Vicinity>
|
|||||||
|
|
||||||
return Text(
|
return Text(
|
||||||
text,
|
text,
|
||||||
|
maxLines: 1,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 13.sp),
|
fontSize: 13.sp),
|
||||||
@ -869,6 +870,7 @@ class _VicinityState extends State<Vicinity>
|
|||||||
|
|
||||||
return Text(
|
return Text(
|
||||||
text,
|
text,
|
||||||
|
maxLines: 1,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 13.sp),
|
fontSize: 13.sp),
|
||||||
|
|||||||
@ -24,9 +24,9 @@ typedef void ScreenCallback(List<int> genderList,List<int> orientationList,List<
|
|||||||
class ScreenBottomSheetDialog extends StatefulWidget {
|
class ScreenBottomSheetDialog extends StatefulWidget {
|
||||||
final List<MyConfigData> genderList ;
|
final List<MyConfigData> genderList ;
|
||||||
|
|
||||||
final List<MyConfigData> orientationList ;
|
List<MyConfigData> orientationList ;
|
||||||
|
|
||||||
final List<MyConfigData> roleList ;
|
List<MyConfigData> roleList ;
|
||||||
final ScreenCallback callback;
|
final ScreenCallback callback;
|
||||||
bool? isShowAutoSwitch;
|
bool? isShowAutoSwitch;
|
||||||
final bool isHaveCity;
|
final bool isHaveCity;
|
||||||
@ -55,6 +55,8 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
|
|
||||||
List<MyConfigData> roleList = [] ;
|
List<MyConfigData> roleList = [] ;
|
||||||
|
|
||||||
|
bool isShowAutoSwitch = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
@ -65,6 +67,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
var logic = Get.find<CircleLogic>();
|
var logic = Get.find<CircleLogic>();
|
||||||
locationCity = logic.cityName;
|
locationCity = logic.cityName;
|
||||||
}
|
}
|
||||||
|
isShowAutoSwitch = widget.isShowAutoSwitch ?? false;
|
||||||
initGerder();
|
initGerder();
|
||||||
}
|
}
|
||||||
StreamSubscription? subscription = null;
|
StreamSubscription? subscription = null;
|
||||||
@ -149,15 +152,15 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<String> roles = [];
|
List<String> roles = [];
|
||||||
widget.orientationList.forEach((element) {
|
orientationList.forEach((element) {
|
||||||
if (element.isSelect) roles.add(element.id);
|
if (element.isSelect) roles.add(element.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
List<String> orientations = [];
|
List<String> orientations = [];
|
||||||
widget.roleList.forEach((element) {
|
roleList.forEach((element) {
|
||||||
if (element.isSelect) orientations.add(element.id);
|
if (element.isSelect) orientations.add(element.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (widget.isHaveCity) {
|
if (widget.isHaveCity) {
|
||||||
var result = await DioManager.instance.postBody(url: Api.nearbyCanSearch,params: {'orientations':roles,'roles':orientations});
|
var result = await DioManager.instance.postBody(url: Api.nearbyCanSearch,params: {'orientations':roles,'roles':orientations});
|
||||||
int code = result['code'];
|
int code = result['code'];
|
||||||
@ -166,14 +169,25 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
// LIMIT_YEAR_VIP(21202, "功能限制,开启年VIP后再进行使用"),
|
// LIMIT_YEAR_VIP(21202, "功能限制,开启年VIP后再进行使用"),
|
||||||
showOKToast(result['msg']);
|
showOKToast(result['msg']);
|
||||||
if (code == 21201) {
|
if (code == 21201) {
|
||||||
|
widget.roleList.forEach((element) {
|
||||||
|
element.isSelect = false;
|
||||||
|
});
|
||||||
|
widget.orientationList.forEach((element) {
|
||||||
|
element.isSelect = false;
|
||||||
|
});
|
||||||
showRechargeDialog('nearby_search');
|
showRechargeDialog('nearby_search');
|
||||||
} else if (code == 21202) {
|
} else if (code == 21202) {
|
||||||
showRechargeDialog(isYear: true,'nearby_search');
|
showRechargeDialog(isYear: true,'nearby_search');
|
||||||
|
widget.roleList == roleList;
|
||||||
|
widget.orientationList = orientationList;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
} else if (code == 200) {
|
||||||
|
widget.roleList == roleList;
|
||||||
|
widget.orientationList = orientationList;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var result = await DioManager.instance.postBody(url: Api.nfindPageCanSearch,params: {'orientations':roles,'roles':orientations});
|
var result = await DioManager.instance.postBody(url: Api.findPageCanSearch,params: {'orientations':roles,'roles':orientations});
|
||||||
int code = result['code'];
|
int code = result['code'];
|
||||||
if (code != 200) {
|
if (code != 200) {
|
||||||
// LIMIT_VIP(21201, "功能限制,开启VIP后再进行使用"),
|
// LIMIT_VIP(21201, "功能限制,开启VIP后再进行使用"),
|
||||||
@ -331,10 +345,10 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
height: 23.sp,
|
height: 23.sp,
|
||||||
margin: EdgeInsets.only(left: 18.sp,top: 6.sp),
|
margin: EdgeInsets.only(left: 18.sp,top: 6.sp),
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemCount: widget.roleList.length,
|
itemCount: roleList.length,
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final isSelected = widget.roleList[index]
|
final isSelected = roleList[index]
|
||||||
.isSelect; // Replace with your condition
|
.isSelect; // Replace with your condition
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
@ -345,32 +359,32 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
if (widget.roleList[0].isSelect) {
|
if (roleList[0].isSelect) {
|
||||||
widget.roleList.forEach((element) {
|
roleList.forEach((element) {
|
||||||
print(element.name);
|
print(element.name);
|
||||||
element.isSelect = false;
|
element.isSelect = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
widget.roleList.forEach((element) {
|
roleList.forEach((element) {
|
||||||
element.isSelect = true;
|
element.isSelect = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (widget.roleList[index].isSelect) {
|
if (roleList[index].isSelect) {
|
||||||
widget.roleList[index].isSelect = false;
|
roleList[index].isSelect = false;
|
||||||
widget.roleList[0].isSelect = false;
|
roleList[0].isSelect = false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
widget.roleList[index].isSelect = true;
|
roleList[index].isSelect = true;
|
||||||
bool istrue = true;
|
bool istrue = true;
|
||||||
widget.roleList.asMap().forEach((index,element) {
|
roleList.asMap().forEach((index,element) {
|
||||||
if(index!=0&&!element.isSelect) {
|
if(index!=0&&!element.isSelect) {
|
||||||
// print(element.isSelect);
|
// print(element.isSelect);
|
||||||
istrue = false;
|
istrue = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
widget.roleList[0].isSelect = istrue;
|
roleList[0].isSelect = istrue;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -410,7 +424,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.roleList[index].name,
|
roleList[index].name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13.0,
|
fontSize: 13.0,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -456,10 +470,10 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
height: 23.sp,
|
height: 23.sp,
|
||||||
margin: EdgeInsets.only(left: 18.sp,top: 6.sp),
|
margin: EdgeInsets.only(left: 18.sp,top: 6.sp),
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemCount: widget.orientationList.length,
|
itemCount: orientationList.length,
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final isSelected = widget.orientationList[index]
|
final isSelected = orientationList[index]
|
||||||
.isSelect; // Replace with your condition
|
.isSelect; // Replace with your condition
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
@ -471,32 +485,32 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
if (widget.orientationList[0].isSelect) {
|
if (orientationList[0].isSelect) {
|
||||||
widget.orientationList.forEach((element) {
|
orientationList.forEach((element) {
|
||||||
print(element.name);
|
print(element.name);
|
||||||
element.isSelect = false;
|
element.isSelect = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
widget.orientationList.forEach((element) {
|
orientationList.forEach((element) {
|
||||||
element.isSelect = true;
|
element.isSelect = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (widget.orientationList[index].isSelect) {
|
if (orientationList[index].isSelect) {
|
||||||
widget.orientationList[index].isSelect = false;
|
orientationList[index].isSelect = false;
|
||||||
widget.orientationList[0].isSelect = false;
|
orientationList[0].isSelect = false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
widget.orientationList[index].isSelect = true;
|
orientationList[index].isSelect = true;
|
||||||
bool istrue = true;
|
bool istrue = true;
|
||||||
widget.orientationList.asMap().forEach((index,element) {
|
orientationList.asMap().forEach((index,element) {
|
||||||
if(index!=0&&!element.isSelect) {
|
if(index!=0&&!element.isSelect) {
|
||||||
// print(element.isSelect);
|
// print(element.isSelect);
|
||||||
istrue = false;
|
istrue = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
widget.orientationList[0].isSelect = istrue;
|
orientationList[0].isSelect = istrue;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -536,7 +550,7 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
|
|||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.orientationList[index].name,
|
orientationList[index].name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13.0,
|
fontSize: 13.0,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|||||||
@ -21,6 +21,8 @@ class QuickLogic extends GetxController {
|
|||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
|
|
||||||
List<MyConfigData> genderList = [MyConfigData('0', '全部', true)];
|
List<MyConfigData> genderList = [MyConfigData('0', '全部', true)];
|
||||||
|
|
||||||
|
List<MyConfigData> locationGenderList = [MyConfigData('0', '全部', true)];
|
||||||
List lists = [];
|
List lists = [];
|
||||||
List lists1 = [];
|
List lists1 = [];
|
||||||
int page = 1;
|
int page = 1;
|
||||||
@ -30,6 +32,8 @@ class QuickLogic extends GetxController {
|
|||||||
bool isLoad = true;
|
bool isLoad = true;
|
||||||
bool isLoad1 = true;
|
bool isLoad1 = true;
|
||||||
|
|
||||||
|
bool isLoadFail = false;
|
||||||
|
|
||||||
bool isMore = true;
|
bool isMore = true;
|
||||||
bool isMore1 = true;
|
bool isMore1 = true;
|
||||||
|
|
||||||
@ -94,19 +98,31 @@ class QuickLogic extends GetxController {
|
|||||||
configBean.genderMap.forEach((key, value) {
|
configBean.genderMap.forEach((key, value) {
|
||||||
if (int.parse(key) < 3) {
|
if (int.parse(key) < 3) {
|
||||||
genderList.add(MyConfigData(key, value, true));
|
genderList.add(MyConfigData(key, value, true));
|
||||||
|
locationGenderList.add(MyConfigData(key, value, true));
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
genderList.add(MyConfigData('-1', '非二元', true));
|
genderList.add(MyConfigData('-1', '非二元', true));
|
||||||
|
locationGenderList.add(MyConfigData('-1', '非二元', true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initList(int type) async {
|
initList(int type) async {
|
||||||
List wantMeet = [];
|
List wantMeet = [];
|
||||||
genderList.forEach((element) {
|
if (type == 1) {
|
||||||
if (element.isSelect && element.id != '0') {
|
genderList.forEach((element) {
|
||||||
wantMeet.add(element.id);
|
if (element.isSelect && element.id != '0') {
|
||||||
}
|
wantMeet.add(element.id);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
locationGenderList.forEach((element) {
|
||||||
|
if (element.isSelect && element.id != '0') {
|
||||||
|
wantMeet.add(element.id);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var data =
|
var data =
|
||||||
await DioManager.instance.post(url: Api.queryQuickChatUserV2, params: {
|
await DioManager.instance.post(url: Api.queryQuickChatUserV2, params: {
|
||||||
'page': type == 1 ? page : page1,
|
'page': type == 1 ? page : page1,
|
||||||
@ -117,13 +133,14 @@ class QuickLogic extends GetxController {
|
|||||||
"lng": position?.longitude ?? 0,
|
"lng": position?.longitude ?? 0,
|
||||||
});
|
});
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
|
refreshController.refreshCompleted();
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
List list = data['data']['lists'];
|
List list = data['data']['lists'];
|
||||||
if (list.isNotEmpty) {
|
if (list.isNotEmpty) {
|
||||||
isLoad = false;
|
isLoad = false;
|
||||||
|
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
refreshController.refreshCompleted();
|
|
||||||
refreshController.loadComplete();
|
refreshController.loadComplete();
|
||||||
lists = list;
|
lists = list;
|
||||||
} else {
|
} else {
|
||||||
@ -189,6 +206,10 @@ class QuickLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
} else if (data['code'] == 21201) {
|
} else if (data['code'] == 21201) {
|
||||||
showOepnVipDialog('');
|
showOepnVipDialog('');
|
||||||
|
} else if (data['code'] == 404 || data['code'] == 500) {
|
||||||
|
if (lists.isEmpty) {
|
||||||
|
isLoadFail = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
@ -197,7 +218,7 @@ class QuickLogic extends GetxController {
|
|||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
page = 1;
|
page = 1;
|
||||||
} else {
|
} else {
|
||||||
page = 2;
|
page1 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
initList(type);
|
initList(type);
|
||||||
@ -209,7 +230,7 @@ class QuickLogic extends GetxController {
|
|||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return ScreenBottomSheetDialog(
|
return ScreenBottomSheetDialog(
|
||||||
genderList: genderList,
|
genderList: currentIndex == 0 ? genderList : locationGenderList,
|
||||||
orientationList: [],
|
orientationList: [],
|
||||||
roleList: [],
|
roleList: [],
|
||||||
isHaveCity: false,
|
isHaveCity: false,
|
||||||
|
|||||||
@ -130,7 +130,12 @@ class _QuickPageState extends State<QuickPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: logic.isLoad
|
child: logic.isLoadFail
|
||||||
|
? noResultWidget(tip: '加载失败,请重新加载',callBack: () {
|
||||||
|
logic.isLoad = true;
|
||||||
|
logic.update();
|
||||||
|
logic.initList(1);
|
||||||
|
}) : logic.isLoad
|
||||||
? loaddingWidget(true)
|
? loaddingWidget(true)
|
||||||
: logic.lists.isEmpty
|
: logic.lists.isEmpty
|
||||||
? noResultWidget()
|
? noResultWidget()
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class SplashLogic extends GetxController {
|
|||||||
void onClose() {
|
void onClose() {
|
||||||
// TODO: implement onClose
|
// TODO: implement onClose
|
||||||
super.onClose();
|
super.onClose();
|
||||||
DioManager.getInstance().setDioTimeOut(10000);
|
DioManager.getInstance().setDioTimeOut(15000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -539,7 +539,7 @@ class Api {
|
|||||||
static var nearbyCanSearch = '/user-service/nearby/search/need/vip';
|
static var nearbyCanSearch = '/user-service/nearby/search/need/vip';
|
||||||
|
|
||||||
//精选筛选是否需要会员
|
//精选筛选是否需要会员
|
||||||
static var nfindPageCanSearch = '/user-service/findPage/search/need/vip';
|
static var findPageCanSearch = '/user-service/findPage/search/need/vip';
|
||||||
|
|
||||||
//申请创建
|
//申请创建
|
||||||
static var interestApplyToCreate = '/up-service/interest/applyToCreate';
|
static var interestApplyToCreate = '/up-service/interest/applyToCreate';
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'dart:math';
|
|||||||
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:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:flutter_bugly/flutter_bugly.dart';
|
||||||
|
|
||||||
import '../utils/SharedPreferencesHelper.dart';
|
import '../utils/SharedPreferencesHelper.dart';
|
||||||
import '../utils/device.dart';
|
import '../utils/device.dart';
|
||||||
@ -43,9 +44,9 @@ class DioManager {
|
|||||||
// Api.testBaseUrl,
|
// Api.testBaseUrl,
|
||||||
Api.baseUrl1,
|
Api.baseUrl1,
|
||||||
// 连接服务器超时时间,单位是毫秒
|
// 连接服务器超时时间,单位是毫秒
|
||||||
connectTimeout: const Duration(seconds: 10),
|
connectTimeout: const Duration(seconds: 15),
|
||||||
// 接收数据的最长时限
|
// 接收数据的最长时限
|
||||||
receiveTimeout: const Duration(seconds: 10),
|
receiveTimeout: const Duration(seconds: 15),
|
||||||
));
|
));
|
||||||
_dio!.interceptors.add(LogInterceptor(
|
_dio!.interceptors.add(LogInterceptor(
|
||||||
responseBody: true,
|
responseBody: true,
|
||||||
@ -308,12 +309,23 @@ class DioManager {
|
|||||||
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
|
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
|
||||||
return {'code': 500, 'msg': ''};
|
return {'code': 500, 'msg': ''};
|
||||||
}
|
}
|
||||||
|
// 其他类型的错误(如协议错误、解析错误等)
|
||||||
|
var info = await FlutterBugly.uploadException(
|
||||||
|
message: url + e.error.toString(),
|
||||||
|
detail: Platform.isIOS ? 'crash_attach.log' : 'extraMessage.txt',
|
||||||
|
);
|
||||||
|
print(info);
|
||||||
return {'code': 500, 'msg': '服务器开小差了,请重试'};
|
return {'code': 500, 'msg': '服务器开小差了,请重试'};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
|
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
|
||||||
return {'code': 500, 'msg': ''};
|
return {'code': 500, 'msg': ''};
|
||||||
}
|
}
|
||||||
|
// 其他类型的错误(如协议错误、解析错误等)
|
||||||
|
var info = await FlutterBugly.uploadException(
|
||||||
|
message: url + e.toString(),
|
||||||
|
detail: Platform.isIOS ? 'crash_attach.log' : 'extraMessage.txt',
|
||||||
|
);
|
||||||
// 其他一些意外的报错
|
// 其他一些意外的报错
|
||||||
return {'code': 500, 'msg': '加载中...'};
|
return {'code': 500, 'msg': '加载中...'};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,10 +45,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: app_settings
|
name: app_settings
|
||||||
sha256: "2ec421f375d747916c4c0193933567074ea60c4f01c4a68642f07fef1002524e"
|
sha256: e6a34735d4ddb24ca9c5fd7e965ec65c8b611cbd3a329152c294f9e9f4bacb33
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.4"
|
version: "4.3.1"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -630,6 +630,14 @@ 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:
|
||||||
|
|||||||
@ -92,7 +92,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
|
||||||
#腾讯离线推送
|
#腾讯离线推送
|
||||||
@ -114,7 +114,7 @@ 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.0.4
|
app_settings: 4.3.1
|
||||||
#通知权限
|
#通知权限
|
||||||
notification_permissions: ^0.6.1
|
notification_permissions: ^0.6.1
|
||||||
#分帧
|
#分帧
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user