2.1.6代码提交

This commit is contained in:
CYH 2024-06-17 09:26:46 +08:00
parent 2b27857857
commit 931fb699c6
39 changed files with 1978 additions and 1156 deletions

View File

@ -71,8 +71,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode 64
versionName "2.1.4"
versionCode 67
versionName "2.1.7"
manifestPlaceholders = [
vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
@ -97,6 +97,8 @@ android {
project.ext.enableFlutterNullSafety = false
}
}
}
flutter {
@ -105,4 +107,5 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

View File

@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.1.1</string>
<string>2.1.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>

View File

@ -282,10 +282,12 @@ class _TUIChatState extends TIMUIKitState<TIMChat> {
var result = await DioManager.instance
.get(url: '${Api.setBlock + otherUserBean!.id!.toString()}/block');
isBlack = result["data"]["status"] == 1;
if (mounted) {
setState(() {
});
}
}
Widget _renderJoinGroupApplication(int amount, TUITheme theme) {
String option1 = amount.toString();

View File

@ -6,6 +6,7 @@ import 'package:circle_app/net/api.dart';
import 'package:circle_app/net/dio_manager.dart';
import 'package:circle_app/router/routers.dart';
import 'package:circle_app/utils/util.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -19,7 +20,9 @@ import '../../utils/SharedPreferencesHelper.dart';
import '../../utils/cache_img.dart';
import '../../utils/eventBus.dart';
import '../home/logic.dart';
import '../select_circle/logic.dart';
import '../userinfo/logic.dart';
import 'logic.dart';
class ChatPage extends StatefulWidget {
ChatPage({Key? key}) : super(key: key);
@ -34,7 +37,7 @@ class _ChatPageState extends State<ChatPage> {
// final state = Get.find<ChatLogic>().state;
bool isShowTip = false;
String tip = 'Ta主页形象质量不错哦您也完善一下呗,点击前往';
String tip = 'TA上传了形象照您上传后更方便了解哦,点击前往';
@override
void dispose() {
@ -107,11 +110,18 @@ class _ChatPageState extends State<ChatPage> {
List list = myAlbumBean.data.lists ?? [];
if (list.isEmpty) {
isShowTip = true;
tip = '您还没上传照片,上传后更方便了解,点击前往';
// tip = '您还没上传照片,上传后更方便了解,点击前往';
} 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;
}
tip = 'TA完成了good号认证您认证后可获得多种特权联系客服';
// }
}
if (isShowTip) {
//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(
children: [
GestureDetector(
onTap: () {
onTap: () async {
if (tip.contains('形象')) {
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(
width: Get.width - 16,
height: 40.sp,
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(
borderRadius: BorderRadius.circular(10),
color: Color(0xFF353443),
@ -359,7 +391,7 @@ class _ChatPageState extends State<ChatPage> {
tip,
style: TextStyle(
color: Colors.white,
fontSize: 13.sp,
fontSize: 12.sp,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,

View File

@ -48,7 +48,19 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
// title
var recommendCircleFriendData = data['data'];
List tagList = recommendCircleFriendData['tags'];
if (tagList.isNotEmpty) {
title = tagList.first;
recommendCircleFriendData['tags'] = tagList;
Map cardInfo = checkCardReturnData(recommendCircleFriendData);
cardInfo['user'] = {'signature':info['user']['signature']};
cardInfo['my']= {'signature':info['my']['signature']};
cardInfo['interests'] = info['interests'];
cardInfo['myInterests'] = info['myInterests'];
title = cardInfo['desc'];
info = cardInfo;
} else {
if (recommendCircleFriendData['is_follow_me']) {
title = '对方喜欢了你';
} else if (recommendCircleFriendData['is_follow_to']) {
@ -66,7 +78,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
} else if (recommendCircleFriendData['is_most_fans']) {
title = '可能是你想认识的人';
}
}
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(
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
alignment: Alignment.centerLeft,

View File

@ -72,24 +72,42 @@ class CircleLogic extends GetxController {
List<BannerItem> bannerList = [];
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 = [];
@ -125,7 +143,6 @@ class CircleLogic extends GetxController {
loadCirclePeopleData();
initGerder();
getCityList();
getBanner();
// getNearByList();
startTimer();
@ -199,11 +216,17 @@ class CircleLogic extends GetxController {
ConfigBean configBean = bean1.data!;
configBean.genderMap.forEach((key, value) {
genderList.add(MyConfigData(key, value, false));
dis_genderList.add(MyConfigData(key, value, false));
new_genderList.add(MyConfigData(key, value, false));
if (int.parse(key) < 3) {
genderList.add(MyConfigData(key, value, true));
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) {
orientationList.add(MyConfigData(key, value, false));
dis_orientationList.add(MyConfigData(key, value, false));
@ -365,18 +388,18 @@ class CircleLogic extends GetxController {
void getNearByList() async {
List<String> genders = [];
genderList.forEach((element) {
if (element.isSelect) {
if (element.isSelect && element.id != '0') {
genders.add(element.id);
}
});
List<String> roles = [];
roleList.forEach((element) {
if (element.isSelect) roles.add(element.id);
if (element.isSelect && element.id != '0') roles.add(element.id);
});
List<String> orientations = [];
orientationList.forEach((element) {
if (element.isSelect) orientations.add(element.id);
if (element.isSelect && element.id != '0') orientations.add(element.id);
});
if (offset == 0) {
getBanner();
@ -391,7 +414,7 @@ class CircleLogic extends GetxController {
'flush': flush,
"orientations": orientations
});
isNearLoad = false;
// isNearLoad = false;
var bean = BaseResponse<VicinityBean>.fromJson(
data, (data) => VicinityBean.fromJson(data));
@ -421,7 +444,6 @@ class CircleLogic extends GetxController {
try {
if (vicinityPage == 1) {
vicinityList.addAll(bean.data.users);
} else {
@ -463,6 +485,7 @@ class CircleLogic extends GetxController {
} else if (isShowLocationDialog == false) {
isShowLocationDialog = true;
update();
locationDialog();
}
} else {
@ -485,6 +508,7 @@ class CircleLogic extends GetxController {
refreshController.loadComplete();
update();
} else if (bean.code == 404) {
isNearLoad = false;
showOKToast(bean.msg);
}
update();
@ -503,18 +527,18 @@ class CircleLogic extends GetxController {
isLoadFail = false;
List<String> genders = [];
new_genderList.forEach((element) {
if (element.isSelect) {
if (element.isSelect && element.id != '0' ) {
genders.add(element.id);
}
});
List<String> roles = [];
new_roleList.forEach((element) {
if (element.isSelect) roles.add(element.id);
if (element.isSelect && element.id != '0' ) roles.add(element.id);
});
List<String> orientations = [];
new_orientationList.forEach((element) {
if (element.isSelect) orientations.add(element.id);
if (element.isSelect && element.id != '0' ) orientations.add(element.id);
});
if (offset == 0) {
getBanner();

View File

@ -19,6 +19,7 @@ class Lists {
bool? isQueen;
User? user;
Map? interest;
int? userTop;
String? create_time;
Lists(
{this.album, this.chat, this.content, this.id, this.isQueen, this.user});
@ -36,6 +37,7 @@ class Lists {
interest = json['interest'] ?? {};
create_time = json['create_time'] ?? '';
isQueen = json['is_queen'];
userTop = json['userTop'] ?? 0;
user = json['user'] != null ? new User.fromJson(json['user']) : null;
}

View File

@ -20,6 +20,7 @@ import 'package:get/get.dart';
import 'package:get/utils.dart';
import 'package:gradient_borders/gradient_borders.dart';
import 'package:intl/intl.dart';
import 'package:keframe/keframe.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import '../../../../utils/eventBus.dart';
import '../../../utils/cache_img.dart';
@ -55,6 +56,7 @@ class _DiscoverState extends State<Discover>
bool isMore = true;
bool loadFail = false;
bool isLoadMore = false;
int index = 1;
List tagList = [];
@ -72,6 +74,8 @@ class _DiscoverState extends State<Discover>
double screenHeight = 0;
final GlobalKey _key = GlobalKey();
void animateToOffset(ScrollController controller, double offset,
void Function() onScrollCompleted) {
controller
@ -100,6 +104,14 @@ class _DiscoverState extends State<Discover>
pointerEnd = event.position;
touchRangeY = pointerStart.dy - pointerEnd.dy;
if (lastPage >= list.length) {
lastPage = list.length - 1;
}
// else if (lastPage < 0) {
// lastPage = 1;
// }
if (touchRangeY.abs() < screenHeight / 8) {
// 1/8
nextOffset = (screenHeight + 5.sp) * lastPage;
@ -144,6 +156,8 @@ class _DiscoverState extends State<Discover>
void initState() {
// TODO: implement initState
super.initState();
//
WidgetsBinding.instance.addPostFrameCallback(_getSize);
loadData();
if (widget.unlockWxNum == 0) {
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(
url: "${Api.setLike + userId}/follow",
params: {'status': isLike ? "0" : "1"});
@ -213,6 +234,15 @@ class _DiscoverState extends State<Discover>
}
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: {
'page': index,
'pageSize': 8,
@ -261,6 +291,12 @@ class _DiscoverState extends State<Discover>
}
if (mounted) {
setState(() {});
if (isLoadMore) {
isLoadMore = false;
lastPage = lastPage + 1;
animateToOffset(
_scrollController, lastPage * (screenHeight + 5.sp), () {});
}
}
} else {
loadFail = true;
@ -279,6 +315,7 @@ class _DiscoverState extends State<Discover>
}
_onLoading() {
isLoadMore = true;
loadData();
}
@ -286,18 +323,20 @@ class _DiscoverState extends State<Discover>
Widget build(BuildContext context) {
// TODO: add widget build method
/// ,state layout结束之后才能获取size
Future.delayed(Duration(milliseconds: 100), () {
if (!mounted) return;
if (screenHeight == 0 && list.isNotEmpty) {
var size = context?.findRenderObject()?.paintBounds?.size;
screenHeight = size!.height - 20.sp;
setState(() {});
print(size.toString());
}
});
// /// ,state layout结束之后才能获取size
// Future.delayed(Duration(milliseconds: 100), () {
// if (!mounted) return;
// if (screenHeight == 0 && list.isNotEmpty) {
// var size = context?.findRenderObject()?.paintBounds?.size;
// screenHeight = size!.height - 20.sp;
// setState(() {});
// print(size.toString());
// }
// });
return list.isEmpty
return Container(
key: _key,
child: list.isEmpty
? loadFail ? noResultWidget(tip: '',callBack: () {
isMore = true;
loadFail = false;
@ -315,6 +354,7 @@ class _DiscoverState extends State<Discover>
Listener(
onPointerDown: getPointDownListenerInHorizontal(),
onPointerUp: getPointUpListenerInHorizontal(),
child: SizeCacheWidget(
child:SmartRefresher(
footer: DiyLoadFooter(
noDataText: '只展示一些精选过的圈友哦~',
@ -344,7 +384,9 @@ class _DiscoverState extends State<Discover>
}
}
return FeaturedItem(info: list[index], index: index, screenHeight: screenHeight, sendNoLookData: () {
return FrameSeparateWidget(
index: index,
child: FeaturedItem(info: list[index], index: index, screenHeight: screenHeight, sendNoLookData: () {
sendNoLookData(user.userId!.toString(),index);
},setLike: () {
setLike(user.userId!.toString(),
@ -353,15 +395,16 @@ class _DiscoverState extends State<Discover>
!user.is_follow!;
setState(() {});
});
}, loadSignDiscoverData: loadSignDiscoverData, showGiftPannel: showGiftPannel);
}, loadSignDiscoverData: loadSignDiscoverData, showGiftPannel: showGiftPannel));
},
itemCount: list.length,
physics: BouncingScrollPhysics(),
controller: _scrollController,
),
),
),
),)
],
),
);
}
@ -451,7 +494,6 @@ class _DiscoverState extends State<Discover>
}
loadWxNumData() async {
loadWXEditStatus() async {
var data = await DioManager.instance.get(
url: Api.checkWxNumState,
);
@ -469,7 +511,6 @@ class _DiscoverState extends State<Discover>
// wxStatusInfo['${data['code']}'] = data['msg'];
}
}
}
void sendNoLookData(String userId, int index) async {
var data = await DioManager.instance.post(url: Api.uninterested + userId);

View File

@ -47,7 +47,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
@override
bool get wantKeepAlive => true;
final ScrollController scrollController = ScrollController();
final GlobalKey _key = GlobalKey();
ListLogic? listsLg;
@ -58,7 +58,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
var circleId = '';
List<Lists> lists = [];
double widgetWidth = 0.0;
@override
void dispose() {
@ -88,6 +88,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
void initState() {
// TODO: implement initState
super.initState();
//
WidgetsBinding.instance.addPostFrameCallback(_getSize);
scrollController.addListener(() {
try {
if (scrollController.position.pixels ==
@ -134,6 +136,15 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
// 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{
var data = await DioManager.instance.get(
@ -318,6 +329,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
return ClipRRect(
key: _key,
borderRadius: BorderRadius.circular(10.sp),
child: Container(
width: Get.width,
@ -385,8 +397,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
GestureDetector(
behavior:HitTestBehavior.opaque,
onTap: (){
// showToast("点个鸡毛,星哥还没做");
// Get.toNamed(AppRoutes.FriendsActivity,arguments: '3');
},
child:urlList.length==0?Container(): Container(
height: 30.sp,
@ -717,12 +727,14 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
double picHeight = 0.0;
double ratio = 0;
if (lists.album != null) {
if (lists.album!.isNotEmpty) {
Album info = lists.album!.first;
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) {
picHeight = picWidth * 2;
} else {
@ -917,7 +929,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
crossAxisCount: 3, //widget
crossAxisSpacing: 8.sp,
mainAxisSpacing: 8.sp,
childAspectRatio: 0.7//1widget
childAspectRatio: ratio //1widget
),
itemBuilder: (contentxt, currentIndex) {
Album album = lists.album![currentIndex];
@ -1007,12 +1019,14 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
);
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!.isNotEmpty) {
Album info = lists.album!.first;
if (info.type == 1) {
ratio = (widgetWidth - 8.sp - 24.sp) / 3 / picWidth;
if (lists.album!.length > 3) {
picHeight = picWidth * 2;
} else {
@ -1209,7 +1223,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
picHeight > 0
? Container(
height: picHeight,
alignment: Alignment.centerLeft,
margin: EdgeInsets.only(top: 5.sp),
child: picHeight == 200.sp
? ClipRRect(
@ -1223,7 +1236,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
crossAxisCount: 3, //widget
crossAxisSpacing: 8.sp,
mainAxisSpacing: 8.sp,
childAspectRatio:0.7 //1widget
childAspectRatio:ratio //1widget
),
itemBuilder: (contentxt, currentIndex) {
Album album = lists.album![currentIndex];
@ -1239,11 +1252,14 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
'index': currentIndex
});
},
child: Container(
child: ClipRRect(
borderRadius:
BorderRadius.circular(6.sp),
child: CachedImg(
imageUrl: album.url!,
fit: BoxFit.cover,
),
),
),
);

View File

@ -646,7 +646,7 @@ class _LikeViewState extends State<LikeView>
),
SizedBox(
height: 4.sp,
height: 3.sp,
),
Text(
info['nickname'] ?? '',
@ -915,6 +915,7 @@ class _LikeViewState extends State<LikeView>
borderRadius: BorderRadius.circular(6.sp),
child: CachedImg(
imageUrl: album.url!,
fit: BoxFit.cover,
),
),
);
@ -1196,10 +1197,10 @@ class _LikeViewState extends State<LikeView>
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, //widget
crossAxisSpacing: 8.sp,
mainAxisSpacing: 8.sp,
childAspectRatio:
0.7 //1widget
crossAxisSpacing: 4.sp,
mainAxisSpacing: 4.sp,
childAspectRatio: 0.7
//1widget
),
itemBuilder: (contentxt, currentIndex) {
Album album = lists.album![currentIndex];
@ -1228,6 +1229,7 @@ class _LikeViewState extends State<LikeView>
BorderRadius.circular(6.sp),
child: CachedImg(
imageUrl: album.url!,
fit: BoxFit.cover,
),
),
);

View File

@ -12,6 +12,7 @@ import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.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 '../../../commons/Widgets/tag_widget.dart';
@ -31,8 +32,8 @@ class Vicinity extends StatefulWidget {
State<Vicinity> createState() => _VicinityState();
}
class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin {
class _VicinityState extends State<Vicinity>
with AutomaticKeepAliveClientMixin {
var sub;
ScrollController _scrollController = ScrollController();
@ -47,10 +48,9 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
sub = EventBusManager.on<NearScrollTap>().listen((event) {
try {
_scrollController.animateTo(0,
duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
} catch (e) {
}
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut);
} catch (e) {}
});
}
@ -67,10 +67,12 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
Widget build(BuildContext context) {
// TODO: add widget build method
return widget.logic.vicinityList.isNotEmpty ? Stack(
return widget.logic.vicinityList.isNotEmpty
? Stack(
fit: StackFit.expand,
children: [
SmartRefresher(
SizeCacheWidget(
child: SmartRefresher(
controller: widget.logic.refreshController,
onRefresh: _onRefresh,
onLoading: _onLoading,
@ -83,11 +85,16 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
if (index == 0) {
return bannerView(widget.logic);
} else {
return ListItem(widget.logic.vicinityList[index - 1], index - 1);
return FrameSeparateWidget(
index: index,
child: ListItem(
widget.logic.vicinityList[index - 1],
index - 1));
}
},
),
),
)
// if (widget.logic.myVip == 0)
// Positioned(
// bottom: 0,
@ -102,7 +109,12 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
// ),
// ),)
],
) : widget.logic.isNearLoad ? loaddingWidget(true) : noResultWidget(tip: '',callBack: () {
)
: widget.logic.isNearLoad
? loaddingWidget(true)
: noResultWidget(
tip: '',
callBack: () {
widget.logic.isNearLoad = true;
widget.logic.update();
_onLoading();
@ -279,20 +291,24 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
Get.toNamed(Routes.UserInfoPage, arguments: item.id.toString());
} else {
if (widget.logic.chargeType == 1) {
if (widget.logic
.myVip > 0) {
if (widget.logic.myVip > 0) {
Get.toNamed(Routes.UserInfoPage, arguments: item.id.toString());
} else {
Get.bottomSheet(Scaffold(backgroundColor: Colors.transparent,body: Center(
Get.bottomSheet(
Scaffold(
backgroundColor: Colors.transparent,
body: Center(
child: showVipView(),
),),isScrollControlled: true,backgroundColor: Colors.transparent,barrierColor: Colors.black.withOpacity(0.6));
),
),
isScrollControlled: true,
backgroundColor: Colors.transparent,
barrierColor: Colors.black.withOpacity(0.6));
}
} else {
Get.toNamed(Routes.UserInfoPage, arguments: item.id.toString());
}
}
},
child: Container(
margin: EdgeInsets.only(top: 10.sp),
@ -300,11 +316,11 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
width: Get.width,
// height: 210.sp,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(10.sp),
borderRadius: BorderRadius.circular(10.sp),
border: GradientBoxBorder(
gradient:
item.vip == 2 ? AppColor.mainVerLinearGradient : AppColor.clearVerLinearGradient,
gradient: item.vip == 2
? AppColor.mainVerLinearGradient
: AppColor.clearVerLinearGradient,
width: 1.sp,
),
),
@ -337,8 +353,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
color: Colors.black.withOpacity(0.25),
)
],
)
),
)),
),
Column(children: [
Container(
@ -399,7 +414,9 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
child: Row(
children: [
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(
fontWeight: FontWeight.bold,
color: const Color.fromRGBO(247, 250, 250, 1.0),
@ -424,7 +441,8 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
Container(
// height: 55.sp, //
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(
alignment: Alignment.centerLeft, //
child: RichText(
@ -436,10 +454,17 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
alignment: ui.PlaceholderAlignment.middle,
// alignment: Rect.fromCenter(center: center, width: width, height: height),
child: Container(
margin: EdgeInsets.only(right: 2.sp,),
padding: EdgeInsets.only(left: 4.sp,right: 4.sp),
margin: EdgeInsets.only(
right: 2.sp,
),
padding:
EdgeInsets.only(left: 4.sp, right: 4.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,
width: item.city!.length > 4
? 70.sp
: item.city!.contains('km')
? item.city!.length * 13.sp
: item.city!.length * 20.sp,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(22),
@ -459,14 +484,15 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
// overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.white,
fontSize: 18.sp,)),
fontSize: 18.sp,
)),
],
),
)
),
)),
),
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))
]),
],
@ -496,8 +522,8 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
borderRadius: BorderRadius.circular(17),
gradient: const LinearGradient(
colors: [
Color.fromRGBO(141, 255, 248, 1.0),
Color.fromRGBO(181, 211, 255, 1.0),
Color.fromRGBO(141, 255, 248, 1),
Color.fromRGBO(181, 211, 255, 1),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
@ -541,8 +567,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.0),
border: GradientBoxBorder(
gradient:
AppColor.mainVerLinearGradient,
gradient: AppColor.mainVerLinearGradient,
width: 0.5.sp,
),
color: const Color(0xFF392D53),
@ -581,10 +606,11 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
}
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;
}
widget.logic.getNearByList();
}
}

View File

@ -1719,7 +1719,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
crossAxisCount: 3, //widget
crossAxisSpacing: 8.sp,
mainAxisSpacing: 8.sp,
childAspectRatio: 0.7 //1widget
childAspectRatio: 0.6 //1widget
),
itemBuilder: (contentxt, currentIndex) {
Album album = lists.album![currentIndex];
@ -1738,6 +1738,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
borderRadius: BorderRadius.circular(6.sp),
child: CachedImg(
imageUrl: album.url!,
fit: BoxFit.cover,
),
),
);
@ -1824,6 +1825,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
);
double picHeight = 0.0;
double ratio = 0;
double picWidth =
(Get.width - (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp)) /
3 +
@ -1831,7 +1833,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
if (lists.album != null) {
if (lists.album!.isNotEmpty) {
Album info = lists.album!.first;
ratio = ((Get.width - (widget.logic.runtimeType == LikeLogic ? 100.sp : 60.sp))/3) / picWidth;
if (info.type == 1) {
if (lists.album!.length > 3) {
picHeight = picWidth * 2;
@ -2056,9 +2058,9 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, //widget
crossAxisSpacing: 8.sp,
mainAxisSpacing: 8.sp,
childAspectRatio: 0.7 //1widget
crossAxisSpacing: 4.sp,
mainAxisSpacing: 4.sp,
childAspectRatio: ratio //1widget
),
itemBuilder: (contentxt, currentIndex) {
Album album = lists.album![currentIndex];
@ -2079,6 +2081,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
BorderRadius.circular(6.sp),
child: CachedImg(
imageUrl: album.url!,
fit: BoxFit.cover,
),
),
);

View File

@ -174,9 +174,38 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
return GestureDetector(
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(() {
widget.genderList[index].isSelect =
!widget.genderList[index].isSelect;
});
},
child: Container(
@ -260,9 +289,39 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
showRechargeDialog();
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(() {
widget.roleList[index].isSelect =
!widget.roleList[index].isSelect;
// widget.roleList[index].isSelect =
// !widget.roleList[index].isSelect;
});
},
child: Container(
@ -355,9 +414,40 @@ class _ScreenBottomSheetDialogState extends State<ScreenBottomSheetDialog> {
showRechargeDialog(isYear: true);
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(() {
widget.orientationList[index].isSelect =
!widget.orientationList[index].isSelect;
// widget.orientationList[index].isSelect =
// !widget.orientationList[index].isSelect;
});
},
child: Container(

View File

@ -2,7 +2,8 @@ import 'dart:io';
import 'package:flutter/cupertino.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:url_launcher/url_launcher.dart';
@ -24,7 +25,7 @@ double myProgress = 0;
class _CustomDialogState extends State<UpdateDialog> {
bool isDownload = false;
bool isShowWeb = false;
var filePath;
void incrementCounter() {}
void setDownloadUi() {
@ -114,8 +115,41 @@ class _CustomDialogState extends State<UpdateDialog> {
},
child: Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.sp),
myProgress >= 1.0 ? GestureDetector(
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(
value: myProgress,
backgroundColor: Colors.grey,
@ -165,7 +199,8 @@ class _CustomDialogState extends State<UpdateDialog> {
throw 'Could not open App Store.';
}
} else {
final String appStoreUrl = widget
final String appStoreUrl
= widget
.updateInfo.downloadUrl; // App Store链接示例
if (appStoreUrl.contains("apk")) {
@ -245,8 +280,8 @@ class _CustomDialogState extends State<UpdateDialog> {
updataApk(String downloadUrl) async {
//SmartDialog.showLoading();
var filePath = await getApplicationSupportDirectoryPath();
filePath = filePath + "leyuan.apk";
var path = await getApplicationSupportDirectoryPath();
filePath = path + "leyuan.apk";
DioManager.instance.setReceiveTimeout(300);
var data = await DioManager.instance
.download(downloadUrl, filePath, (received, total) {
@ -262,8 +297,12 @@ class _CustomDialogState extends State<UpdateDialog> {
print(error);
});
DioManager.instance.setReceiveTimeout(30);
installApk();
}
installApk() async {
//flutter_install_app
await AppInstaller.installApk(filePath, actionRequired: false);
// await AppInstaller.installApk(filePath, actionRequired: false);
}
}

View File

@ -225,7 +225,7 @@ class HelpPage extends StatelessWidget {
// logic.userInfoBean!.nickname);
},
icon: Image.asset(
getMineImage("im_service"),
getMineImage("service_icon"),
width: 14.sp,
height: 14.sp,
),

View File

@ -229,25 +229,30 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
pushChatPage(content['id'].toString(), content['imId'],
content['nickname']);
});
} else if (int.parse(event) == 3) {//
} else if (int.parse(event) == 3) {
//
showOKToast(message.customElem!.desc!.toString());
EventBusManager.fire(LikeRefresh());
} else if (int.parse(event) == 5) {//
} else if (int.parse(event) == 5) {
//
// print(jsonData.toString());
var info = jsonDecode(jsonData['content']);
TencentImSDKPlugin.v2TIMManager.v2ConversationManager
.pinConversation(
conversationID: 'c2c_' + info['fromImId'],
isPinned: info['top'] == 1);
} else if (int.parse(event) == 9) {//
} else if (int.parse(event) == 9) {
//
CircleLogic logic = Get.find<CircleLogic>();
logic.isNewPeopleRed = true;
logic.update();
} else if (int.parse(event) == 8) {//
} else if (int.parse(event) == 8) {
//
World_call_outLogic logic = Get.find<World_call_outLogic>();
logic.isNewMsg = true;
logic.update();
} else if (int.parse(event) == 10) {//访
} else if (int.parse(event) == 10) {
//访
MsgLogic logic = Get.find<MsgLogic>();
logic.getMode();
}
@ -370,7 +375,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
BuildContext context, bool isDismiss, UpdateInfo updateInfo) {
showDialog(
context: context,
barrierDismissible: isDismiss,
barrierDismissible: false,
builder: (BuildContext context) {
return UpdateDialog(
isDismiss: isDismiss,
@ -388,10 +393,12 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
data['data']['account_id'].toString(), data['data']['user_sig']);
accountId = data['data']['account_id'].toString();
} else {
if (Get.currentRoute != Routes.Login) {
getIMData();
}
}
}
}
String getInfo() {
return getBaseImage('image');
@ -549,17 +556,30 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
}
void awaitShowTodayDialog() {
Future.delayed(Duration(seconds: 60), () async {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
if (await sp.isFirstAutoMatch()) {
var data = await DioManager.instance.get(
url: Api.dayOnline,
);
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,urlStr:Api.dayOnline),
TodayPeopleDialog(
isShow: false,
url: Api.dayOnline,
recommendCircleFriendData: recommendCircleFriendData),
isScrollControlled: true,
enableDrag: false,
);
}
}
}
});
}
}

View File

@ -1,5 +1,6 @@
import 'package:circle_app/net/api.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:flutter/cupertino.dart';
import 'package:get/get.dart';
@ -31,6 +32,8 @@ class InviteLogic extends GetxController {
bool isContentScroll = false;
bool isIventData = false;
@override
void dispose() {
// TODO: implement dispose
@ -68,7 +71,7 @@ class InviteLogic extends GetxController {
}
}
});
loadStatus();
loadData();
loadMyInviteData();
loadAllInviteData();
@ -123,6 +126,13 @@ class InviteLogic extends GetxController {
showOKToast(recorddata['msg']);
}
}
void loadStatus() async {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
String phone = sp.getString(SharedPreferencesHelper.LOGINPHONE);
isIventData = phone != '18800000100';
update();
}
}

View File

@ -23,9 +23,6 @@ class InvitePage extends StatelessWidget {
final logic = Get.find<InviteLogic>();
final state = Get.find<InviteLogic>().state;
@override
Widget build(BuildContext context) {
return Container(
@ -39,7 +36,15 @@ class InvitePage extends StatelessWidget {
backgroundColor: Colors.transparent,
appBar: MyAppBar(
centerTitle: "邀请赚钱",
actionWdiget: Container(
actionWdiget: GetBuilder<InviteLogic>(
builder: (logic) {
return !logic.isIventData
? Container()
: GestureDetector(
onTap: () {
navigateToInviteStrategy();
},
child: Container(
alignment: Alignment.center,
height: 22.sp,
width: 62.sp,
@ -49,10 +54,10 @@ class InvitePage extends StatelessWidget {
fit: BoxFit.fill,
),
),
onPressed: () {
navigateToInviteStrategy();
);
},
),
),
body: GetBuilder<InviteLogic>(builder: (logic) {
List<Widget> peopleCountList = [];
List<Widget> dayCountList = [];
@ -127,7 +132,9 @@ class InvitePage extends StatelessWidget {
children: [
Container(
padding: EdgeInsets.only(
left: 14.sp, right: 14.sp, top: 10.sp),
left: 14.sp,
right: 14.sp,
top: 10.sp),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
@ -148,25 +155,34 @@ class InvitePage extends StatelessWidget {
child: Container(
alignment: Alignment.center,
width: 84.sp,
child: Image.asset(
getMineImage('add_code_icon')),
child: Image.asset(getMineImage(
'add_code_icon')),
),
),
if (logic.homeData!.superior != null)
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Get.toNamed(Routes.UserInfoPage,arguments: logic.homeData!.superior!.id!.toString());
Get.toNamed(Routes.UserInfoPage,
arguments: logic
.homeData!.superior!.id!
.toString());
},
child: Container(
alignment: Alignment.center,
child: Row(
children: [
Text('邀请人:',style: TextStyle(color: Colors.white,fontSize: 14.sp),),
Text(
'邀请人:',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp),
),
Text(
'${logic.homeData!.superior!.nickname!}',
style: TextStyle(
color: AppColor.mainColor,
color: AppColor
.mainColor,
fontSize: 14.sp),
),
],
@ -231,11 +247,13 @@ class InvitePage extends StatelessWidget {
autoplay: true,
// controller: 5,
index: 0,
itemBuilder: (BuildContext context, int index) {
itemBuilder:
(BuildContext context, int index) {
Map data = logic.sysData[index];
return Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(
data['inviter_name'],
@ -252,7 +270,8 @@ class InvitePage extends StatelessWidget {
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w500),
fontWeight:
FontWeight.w500),
)),
Text(
data['invitee_name'] ?? '',
@ -262,13 +281,15 @@ class InvitePage extends StatelessWidget {
fontWeight: FontWeight.w500),
),
Container(
margin: EdgeInsets.only(left: 5.sp),
margin:
EdgeInsets.only(left: 5.sp),
child: Text(
'加入微乐园',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w500),
fontWeight:
FontWeight.w500),
)),
],
),
@ -277,6 +298,7 @@ class InvitePage extends StatelessWidget {
itemCount: logic.sysData.length,
),
),
if (logic.isIventData)
Container(
height: 220.sp,
width: Get.width - 30.sp,
@ -297,7 +319,9 @@ class InvitePage extends StatelessWidget {
children: [
Container(
margin: EdgeInsets.only(
top: 15.sp, left: 35.sp, right: 35.sp),
top: 15.sp,
left: 35.sp,
right: 35.sp),
alignment: Alignment.center,
child: Image.asset(
getMineImage('invite_title'),
@ -323,7 +347,8 @@ class InvitePage extends StatelessWidget {
style: TextStyle(
color: Color(0xFF0DF5F7),
fontSize: 14.sp,
fontWeight: FontWeight.w500),
fontWeight:
FontWeight.w500),
),
Expanded(
child: Stack(
@ -332,7 +357,8 @@ class InvitePage extends StatelessWidget {
children: [
Container(
margin: EdgeInsets.only(
left: 61.sp, right: 46.sp),
left: 61.sp,
right: 46.sp),
height: 2.sp,
color: Color(0xFF0DF5F7),
),
@ -343,7 +369,8 @@ class InvitePage extends StatelessWidget {
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: peopleCountList,
children:
peopleCountList,
),
)
],
@ -361,7 +388,8 @@ class InvitePage extends StatelessWidget {
style: TextStyle(
color: Color(0xFF0DF5F7),
fontSize: 14.sp,
fontWeight: FontWeight.w500),
fontWeight:
FontWeight.w500),
),
Expanded(
child: Stack(
@ -370,12 +398,14 @@ class InvitePage extends StatelessWidget {
children: [
Container(
margin: EdgeInsets.only(
left: 25.sp, right: 15.sp),
left: 25.sp,
right: 15.sp),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: dayCountList),
children:
dayCountList),
)
],
)),
@ -388,15 +418,21 @@ class InvitePage extends StatelessWidget {
right: 15.sp,
bottom: 10.sp),
child: RichText(
text: TextSpan(children: allSpan)))
text: TextSpan(
children: allSpan)))
],
)),
if (logic.isIventData)
Container(
margin: EdgeInsets.only(
top: 15.sp,
left: 15.sp,
right: 15.sp,
bottom: MediaQuery.of(context).padding.bottom + 10.sp + 50.sp),
bottom: MediaQuery.of(context)
.padding
.bottom +
10.sp +
50.sp),
height: 565.sp,
decoration: BoxDecoration(
image: DecorationImage(
@ -418,17 +454,19 @@ class InvitePage extends StatelessWidget {
child: Text(
'${logic.homeData!.inviteCount! ?? 0}',
style: TextStyle(
color: AppColor.mainColor,
color: AppColor
.mainColor,
fontSize: 14.sp),
),
),
Container(
margin:
EdgeInsets.only(top: 10.sp),
margin: EdgeInsets.only(
top: 10.sp),
child: Text(
'已成功邀请',
style: TextStyle(
color: Color(0xFFF7FAFA),
color: Color(
0xFFF7FAFA),
fontSize: 12.sp),
),
),
@ -449,17 +487,19 @@ class InvitePage extends StatelessWidget {
child: Text(
'${logic.homeData!.achieveRewardDay! ?? 0}',
style: TextStyle(
color: AppColor.mainColor,
color: AppColor
.mainColor,
fontSize: 14.sp),
),
),
Container(
margin:
EdgeInsets.only(top: 10.sp),
margin: EdgeInsets.only(
top: 10.sp),
child: Text(
'获得会员时长',
style: TextStyle(
color: Color(0xFFF7FAFA),
color: Color(
0xFFF7FAFA),
fontSize: 12.sp),
),
),
@ -480,17 +520,19 @@ class InvitePage extends StatelessWidget {
child: Text(
'${logic.directProfit! ?? 0}',
style: TextStyle(
color: AppColor.mainColor,
color: AppColor
.mainColor,
fontSize: 14.sp),
),
),
Container(
margin:
EdgeInsets.only(top: 10.sp),
margin: EdgeInsets.only(
top: 10.sp),
child: Text(
'直接获利',
style: TextStyle(
color: Color(0xFFF7FAFA),
color: Color(
0xFFF7FAFA),
fontSize: 12.sp),
),
),
@ -511,17 +553,19 @@ class InvitePage extends StatelessWidget {
child: Text(
'${logic.rebate! ?? 0}',
style: TextStyle(
color: AppColor.mainColor,
color: AppColor
.mainColor,
fontSize: 14.sp),
),
),
Container(
margin:
EdgeInsets.only(top: 10.sp),
margin: EdgeInsets.only(
top: 10.sp),
child: Text(
'间接返利',
style: TextStyle(
color: Color(0xFFF7FAFA),
color: Color(
0xFFF7FAFA),
fontSize: 12.sp),
),
),
@ -539,50 +583,70 @@ class InvitePage extends StatelessWidget {
Expanded(
child: Container(
margin: EdgeInsets.only(
top: 15.sp, left: 20.sp, right: 20.sp,bottom: logic.selectedIndex == 1 ? 15.sp : 0.sp),
top: 15.sp,
left: 20.sp,
right: 20.sp,
bottom:
logic.selectedIndex == 1
? 15.sp
: 0.sp),
// height: 135.sp,
decoration: BoxDecoration(
color: Color(0x99363542),
borderRadius:
BorderRadiusDirectional.circular(
4.sp),
BorderRadiusDirectional
.circular(4.sp),
border: Border.all(
color: Color(0x99363542),
width: 1.sp)),
child: logic.selectedIndex == 0 &&
logic.inveiteData.isEmpty
child:
logic.selectedIndex == 0 &&
logic.inveiteData
.isEmpty
? noResultWidget()
: logic.selectedIndex == 1 &&
logic.allInveiteData.isEmpty
: logic.selectedIndex ==
1 &&
logic
.allInveiteData
.isEmpty
? noResultWidget()
: MediaQuery.removePadding(
: MediaQuery
.removePadding(
removeTop: true,
context: context,
child:ListView.builder(
controller: logic.contentScrollController,
physics: logic.isContentScroll ? BouncingScrollPhysics() : NeverScrollableScrollPhysics(),
itemBuilder:
(BuildContext context,
int index) {
if (logic.selectedIndex == 0) {
if (index == 0) {
child: ListView
.builder(
controller:
logic
.contentScrollController,
physics: logic
.isContentScroll
? BouncingScrollPhysics()
: NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext
context,
int
index) {
if (logic.selectedIndex ==
0) {
if (index ==
0) {
return myTitileWidget();
}
var data = logic
.inveiteData[index - 1];
var data =
logic.inveiteData[index - 1];
return myRowWidget(
data['nickName'],
data['inviteTime'],
'${data['sysProfit']}',
'${data['rebate'] > 0 ? data['rebate'] : 0}票(${data['rebateRate']}%)',
data['userId']
.toString());
data['userId'].toString());
}
if (index == 0) {
if (index ==
0) {
return titileWidget();
} else if (logic.allInveiteData
.length +
} else if (logic.allInveiteData.length +
1 ==
index) {
return Container(
@ -590,20 +654,19 @@ class InvitePage extends StatelessWidget {
top: 4.sp,
left: 5.sp,
right: 5.sp),
child: Text(
child:
Text(
'温馨提示:仅展示前${logic.allInveiteData.length}上榜的推广大使还能获得微乐园APP官方定制的精美礼品一份哦',
style: TextStyle(
color: Colors.white
.withOpacity(
0.75),
fontSize: 13.sp),
style: TextStyle(color: Colors.white.withOpacity(0.75), fontSize: 13.sp),
),
);
}
var data = logic
.allInveiteData[index - 1];
var data =
logic.allInveiteData[index -
1];
return rowWidget(
data['nickname'],
data[
'nickname'],
data['inviteCount']
.toString(),
data['vipDaysStr'].toString() +
@ -616,10 +679,8 @@ class InvitePage extends StatelessWidget {
0
? logic.inveiteData!.length +
1
: logic.allInveiteData
.length +
2
),
: logic.allInveiteData.length +
2),
))),
if (logic.selectedIndex == 0)
GestureDetector(
@ -865,8 +926,7 @@ class InvitePage extends StatelessWidget {
Expanded(
child: GestureDetector(
onTap: () {
Get.toNamed(Routes.UserInfoPage,
arguments: userId);
Get.toNamed(Routes.UserInfoPage, arguments: userId);
},
child: infoText(str1, AppColor.mainColor)),
flex: 1,
@ -930,8 +990,7 @@ class InvitePage extends StatelessWidget {
onTap: () {
if (userId == '0') return;
Get.toNamed(Routes.UserInfoPage,
arguments: userId);
Get.toNamed(Routes.UserInfoPage, arguments: userId);
},
child: infoText(str1, AppColor.mainColor)),
),

View File

@ -398,7 +398,11 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
behavior: HitTestBehavior.opaque,
onTap: () {
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(
margin: EdgeInsets.only(top: 18.sp),
@ -413,17 +417,15 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
height: 24.sp,
),
SizedBox(width: 10.sp),
const Text(
"给个5星好评",
style: TextStyle(color: Colors.white),
),
],
),
Row(
children: [
Container(
!Platform.isAndroid ? Container() : Container(
width: 10.sp,
height: 10.sp,
margin: EdgeInsets.only(right: 4.sp),
@ -431,8 +433,8 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
color: Colors.red,
shape: BoxShape.circle),
),
const Text(
"免费领3天会员",
Text(
!Platform.isAndroid ? '感谢您对我们的支持🙏' : "免费领3天会员",
style: TextStyle(color: Colors.white60),
),
Image(

View File

@ -1065,6 +1065,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
onTap: () async {
if (!chatImIdList.contains(
user.userId.toString())) {
await createCustomMsg(user.userId.toString(),
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(
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
alignment: Alignment.centerLeft,
@ -1327,6 +1387,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
List dataList = data['data'];
if (dataList.isNotEmpty) {
recommendCircleFriendData = data['data'][0];
recommendCircleFriendData['tags'] = data['tags'];
setState(() {});
}
} else {

View File

@ -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(
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
alignment: Alignment.centerLeft,

View File

@ -30,8 +30,8 @@ class MsgPage extends StatefulWidget {
}
class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
// final ctr = Get.put(MsgLogic());
final ctr = Get.find<MsgLogic>();
final ctr = Get.put(MsgLogic());
// final controller = Get.find<MsgLogic>();
var logic = Get.find<CircleLogic>();
void getPipeiData() async {
var data = await DioManager.instance
@ -69,15 +69,21 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: SafeArea(
child: GetBuilder(builder: (MsgLogic controller) {
child: Column(
children: [
GetBuilder(builder: (MsgLogic controller) {
return Column(
children: [
navigatorItem(controller),
if (controller.isShowNotifyTip)
notifyWidget(),
tipWidget(),
reconmandWidget(),
notifyWidget(controller),
tipWidget(controller),
reconmandWidget(controller),
// Text(controller.state.msg),
],
);
}),
Expanded(child: TIMConversation(
autoScrollController: logic.scrollController,
scrollController: logic.listScrollController,
@ -91,8 +97,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
},
))
],
);
}),
),
),
);
}
@ -232,7 +237,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
);
}
notifyWidget() {
notifyWidget(MsgLogic controller) {
return Container(
height: 30.sp,
margin: EdgeInsets.only(top: 10.sp),
@ -248,14 +253,14 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
Row(
children: [
GestureDetector(onTap: () {
ctr.isShowNotifyTip = false;
ctr.update();
controller.isShowNotifyTip = false;
controller.update();
AppSettings.openAppSettings();
},child:Text('去开启',style: TextStyle(color: AppColor.mainColor,fontSize: 14.sp),)),
SizedBox(width: 4.sp,),
GestureDetector(onTap: () {
ctr.isShowNotifyTip = false;
ctr.update();
controller.isShowNotifyTip = false;
controller.update();
},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(
margin: EdgeInsets.only(top: 10.sp, bottom: 15.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);
},
child: Text(
'${ctr.total}人在线等您聊',
'${controller.total}人在线等您聊',
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w600,
@ -315,7 +320,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
);
}
reconmandWidget() {
reconmandWidget(MsgLogic controller) {
return Container(
padding: EdgeInsets.only(left: 16.sp, right: 18.sp),
width: Get.width,
@ -324,7 +329,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
children: [
GestureDetector(
onTap: () {
ctr.showTipPop();
controller.showTipPop();
},
child: Column(
children: [
@ -336,7 +341,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
height: 4.sp,
),
Text(
ctr.isStart ? '关闭速聊' : '冲到第一',
controller.isStart ? '关闭速聊' : '冲到第一',
style: TextStyle(color: Colors.white, fontSize: 12.sp),
),
],
@ -346,12 +351,12 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemBuilder: (contenxt, index) {
if (index == ctr.chatList.length) {
if (index == controller.chatList.length) {
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(
behavior: HitTestBehavior.opaque,
onTap: () {
ctr.showTipPop();
controller.showTipPop();
},
child: Container(
margin: EdgeInsets.only(left: 18.sp),

View File

@ -15,7 +15,9 @@ class QuickLogic extends GetxController {
final RefreshController refreshController = RefreshController();
List<MyConfigData> genderList = [];
List<MyConfigData> genderList = [
MyConfigData('0', '全部', true)
];
List lists = [];
int page = 1;
int isVip = 0;
@ -43,8 +45,12 @@ class QuickLogic extends GetxController {
ConfigBean configBean = bean1.data!;
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 = [];
genderList.forEach((element) {
if (element.isSelect) {
if (element.isSelect && element.id != '0') {
wantMeet.add(element.id);
}
});

View File

@ -43,7 +43,44 @@ class QuickPage extends StatelessWidget {
duration: Duration(milliseconds: 300),
curve: Curves.easeInOut);
},
actionWdiget: GestureDetector(
actionWdiget: Row(
children: [
GestureDetector(
onTap: () {
showTipPop();
},
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);
},
@ -52,6 +89,8 @@ class QuickPage extends StatelessWidget {
width: 30.sp,
),
),
],
),
),
body: SafeArea(
child: logic.isLoad
@ -79,43 +118,10 @@ class QuickPage extends StatelessWidget {
},
),
),
Positioned(
bottom: 60.sp,
right: 0.sp,
child: GestureDetector(
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,
)
],
),
),
))
// Positioned(
// bottom: 60.sp,
// right: 0.sp,
// child: )
],
),
),
@ -150,7 +156,7 @@ class QuickPage extends StatelessWidget {
logic.callOrhers();
Get.back();
},
child: Text('一键唤三十位您想认识的人'),
child: Text('一键唤三十位您想认识的人'),
),
CupertinoActionSheetAction(
onPressed: () {

View File

@ -1,4 +1,7 @@
import 'dart:io';
import 'package:circle_app/circle_app/minefragment/logic.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../commons/Widgets/my_app_bar.dart';
import 'package:circle_app/utils/util.dart';
import 'package:flutter/material.dart';
@ -131,7 +134,11 @@ class SetupPage extends StatelessWidget {
),
),
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),))))
],
),
),),

View File

@ -25,30 +25,9 @@ class SplashLogic extends GetxController {
void onReady() async {
// TODO: implement onReady
super.onReady();
loadConfig();
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 {
if ((await getAuthorization()).isEmpty) {
@ -90,10 +69,6 @@ class SplashLogic extends GetxController {
return;
}
showOKToast(bean.msg.toString());
if (bean.code == 500) {
await Future.delayed(Duration(seconds: 5));
onInit();
} else {
SharedPreferencesHelper sp =
await SharedPreferencesHelper.getInstance();
String token = sp.getString(SharedPreferencesHelper.AUTHORIZATION);
@ -102,9 +77,7 @@ class SplashLogic extends GetxController {
} else {
pushLoginPage();
}
}
// Get.toNamed(AppRoutes.Home);
}
}

View File

@ -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/colors/app_color.dart';
import 'package:circle_app/utils/util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
@ -203,7 +204,7 @@ class _SwiperPageState extends State<SwiperPage> {
children: [
Container(
child: CachedImg(
imageUrl: logic.imgList[index],
imageUrl: logic.imgList[index].toString().split('?').first,
fit: BoxFit.contain,
),
),
@ -312,8 +313,15 @@ class _SwiperPageState extends State<SwiperPage> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
child: CachedImg(
imageUrl: logic.imgList[index],
child: CachedNetworkImage(
progressIndicatorBuilder: (
BuildContext context,
String url,
DownloadProgress progress,
) {
return CupertinoActivityIndicator(radius: 25,color: Colors.white,);
},
imageUrl: logic.imgList[index].toString().split('?').first,
fit: BoxFit.contain,
),
),

View File

@ -61,7 +61,6 @@ class UserinfoLogic extends GetxController {
@override
void onClose() {
// TODO: implement onClose
timer?.cancel();
super.onClose();
}
@ -111,7 +110,9 @@ class UserinfoLogic extends GetxController {
String myId = sp.getMyUserId();
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) {
// topTitle = result['topDesc'];
@ -145,10 +146,6 @@ class UserinfoLogic extends GetxController {
}
}
void showBlackDialog(BuildContext context) {
showDialog(
context: context,
@ -165,7 +162,6 @@ class UserinfoLogic extends GetxController {
if (data['code'] == 200) {
isBlack = data["data"]["status"] == 1;
}
}
Future<void> fetchUserInfo(String url) async {
@ -189,9 +185,9 @@ class UserinfoLogic extends GetxController {
if (isMe) {
isOnline = true;
} else {
if(!isLike){
startCountdown();
}
// if(!isLike){
// startCountdown();
// }
isOnline = userInfoBean!.isOnline;
isBlackBeen = bean.data.isBlock;
isDestroy = bean.data.isDestroy;
@ -219,29 +215,7 @@ class UserinfoLogic extends GetxController {
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 {
var result = await DioManager.instance.get(
url: Api.popup + userId,
);
@ -260,8 +234,6 @@ class UserinfoLogic extends GetxController {
update();
}
Future<void> fetchUrgeStatus(String url) async {
var urgedata = await DioManager.instance.get(url: url);
var urgeBean = BaseResponse<UrgentStatus>.fromJson(
@ -317,8 +289,6 @@ class UserinfoLogic extends GetxController {
(jsonData) => jsonData,
);
if (bean.isSuccess()) {
timer?.cancel();
isLike = !isLike;
update();
}
@ -366,8 +336,11 @@ class UserinfoLogic extends GetxController {
showOKToast(bean.msg);
}
void sendGiftData(String accid, String giftId, String userId, ) async {
void sendGiftData(
String accid,
String giftId,
String userId,
) async {
var result = await DioManager.instance.post(url: Api.sendGift, params: {
'accid': accid,
'giftId': giftId,
@ -394,7 +367,8 @@ class UserinfoLogic extends GetxController {
}
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
.post(url: Api.updataAlbum, params: {"type": 1, "url": result});
var myAlbumBean = BaseResponse<AddAlbum>.fromJson(
@ -408,8 +382,8 @@ class UserinfoLogic extends GetxController {
id: myAlbumBean.data.id,
type: myAlbumBean.data.type,
url: result,
urlThumb: result, isTop: 0));
urlThumb: result,
isTop: 0));
update();
}
});
@ -417,7 +391,9 @@ class UserinfoLogic extends GetxController {
}
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) {
showOKToast('已提醒对方填写');
} else {
@ -426,12 +402,16 @@ class UserinfoLogic extends GetxController {
}
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) {
showOKToast('操作成功');
fetchMyAlbum(Api.getMyAlbum);
}
}
}
class UserBean {
@ -512,7 +492,9 @@ class UserBean {
gender: json['gender'],
role: json['role'],
orientation: json['orientation'],
interests: json['interests'] == null ? [] : List<Interest>.from(
interests: json['interests'] == null
? []
: List<Interest>.from(
json['interests'].map((x) => Interest.fromJson(x)),
),
lng: json['lng'],
@ -526,7 +508,6 @@ class UserBean {
);
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['age'] = this.age;
@ -659,8 +640,7 @@ class AlbumListItem {
type: json['type'],
url: json['url'],
urlThumb: json['thumb'],
isTop: json['isTop'] ?? 0
);
isTop: json['isTop'] ?? 0);
}
}

View File

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:ui';
import 'package:cached_network_image/cached_network_image.dart';
@ -19,6 +20,7 @@ import '../../router/routers.dart';
import '../../utils/cache_img.dart';
import '../../utils/eventBus.dart';
import '../../utils/util.dart';
import '../../view/notice.dart';
import '../home/logic.dart';
import '../select_circle/logic.dart';
import 'logic.dart';
@ -38,6 +40,10 @@ class MyTabbedScreenState extends State<UserinfoPage>
bool isShowBlackTitle = false;
bool isSetState = false;
int countdown = 5;
Timer? timer = null;
var sub;
@override
void initState() {
@ -45,7 +51,8 @@ class MyTabbedScreenState extends State<UserinfoPage>
sub = EventBusManager.on<ScrollViewScrollTop>().listen((event) {
if (isSetState) {
isSetState = false;
scrollController.animateTo(0, duration: Duration(milliseconds: 250), curve: Curves.easeIn);
scrollController.animateTo(0,
duration: Duration(milliseconds: 250), curve: Curves.easeIn);
}
});
scrollController.addListener(() {
@ -65,8 +72,11 @@ class MyTabbedScreenState extends State<UserinfoPage>
});
_tabController = TabController(length: 2, vsync: this);
_tabController.animation!.addListener(_handleTabChange);
starTimer();
}
@override
void didChangeDependencies() {
// TODO: implement didChangeDependencies
@ -103,6 +113,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
@override
void dispose() {
_tabController.dispose();
timer?.cancel();
sub.cancel();
routeObserver.unsubscribe(this);
super.dispose();
@ -302,22 +313,22 @@ class MyTabbedScreenState extends State<UserinfoPage>
width: Get.width,
child: _meInfoButton(logic),
),
!logic.isShowAlbum && logic.isMe
? Positioned(
bottom: 36.sp,
right: 10.sp,
child: GestureDetector(
onTap: () async {
List<MyConfigData> numbers = [];
var data = await Get.toNamed(Routes.CallOutPage,
arguments: {'numbers': numbers});
},
child: Image.asset(
getCircleImage('send_msg'),
width: 60.sp,
)))
: Container()
// !logic.isShowAlbum && logic.isMe
// ? Positioned(
// bottom: 36.sp,
// right: 10.sp,
// child: GestureDetector(
// onTap: () async {
// List<MyConfigData> numbers = [];
//
// var data = await Get.toNamed(Routes.CallOutPage,
// arguments: {'numbers': numbers});
// },
// child: Image.asset(
// getCircleImage('send_msg'),
// width: 60.sp,
// )))
// : Container()
],
),
),
@ -755,9 +766,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
: _imageAdapter(controller),
logic.isBlack || logic.isDestroy || logic.isBlackBeen
? Container()
:
HomeCallOutView(controller.userId),
: HomeCallOutView(controller.userId),
],
),
),
@ -890,7 +899,27 @@ class MyTabbedScreenState extends State<UserinfoPage>
logic.isBlack || logic.isDestroy || logic.isBlackBeen
? Container()
: _tabController.index == 0
? GestureDetector(
? logic.isShowAlbum && logic.isMe
? Container(
child: ShaderMask(
shaderCallback: (Rect bounds) {
return LinearGradient(
begin: Alignment.centerRight,
end: Alignment.centerLeft,
colors: [Color(0xffF657FF), AppColor.mainColor],
).createShader(Offset.zero & bounds.size);
},
child: Text(
'真实露脸照更受欢迎',
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.w600,
color: Colors.white),
),
),
)
: Container()
: _tabController.index == 1 && logic.isMe ? GestureDetector(
onTap: () {
if (!logic.isShowAlbum && controller.isMe) {
List<MyConfigData> numbers = [];
@ -905,8 +934,6 @@ class MyTabbedScreenState extends State<UserinfoPage>
controller.urgeChange();
}
},
child: Visibility(
// visible: logic.isShowAlbum,
child: Container(
margin: EdgeInsets.only(left: 10.sp),
decoration: BoxDecoration(
@ -932,9 +959,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
),
),
),
),
)
: Container(),
) : Container(),
],
),
);
@ -1203,8 +1228,12 @@ class MyTabbedScreenState extends State<UserinfoPage>
for (var element in controller.state.imaglist) {
imaglist.add(element.url);
}
Get.toNamed(Routes.SwiperPage,
arguments: {'imaglist': imaglist, 'index': index,'isVague':homeLogic.model!.vip == 0})!.then((value) => logic.update());
Get.toNamed(Routes.SwiperPage, arguments: {
'imaglist': imaglist,
'index': index,
'isVague': homeLogic.model!.vip == 0
})!
.then((value) => logic.update());
},
child: Image.network(
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 {

View File

@ -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/widgets/video_item.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/utils/eventBus.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 '../../../commons/Widgets/text_more.dart';
import '../../../net/api.dart';
import '../../../net/dio_manager.dart';
import '../../../utils/cache_img.dart';
import '../logic.dart';
import '../view.dart';
@ -181,6 +184,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
),
),
Container(
margin: EdgeInsets.only(top: 10.sp),
width: Get.width,
// height: widgetHeight,
@ -219,7 +223,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
Container(
// height: widgetHeight,
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(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -386,12 +390,13 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
? Container()
: GestureDetector(
onTap: () {
showTipPiker(lists.id!.toString(),
listsLg!.lists.indexOf(lists));
showCallOutTipPop(lists.id!.toString(),
listsLg!.lists.indexOf(lists),lists!.userTop! == 1);
},
child: Image.asset(
getCircleImage('delete'),
width: 20.sp,
child: Icon(
Icons.more_vert,
color: AppColor.mainColor,
size: 20,
))
],
))
@ -646,6 +651,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
Container(
width: Get.width,
margin: EdgeInsets.only(top: 4.sp,bottom: 5.sp),
alignment: Alignment.centerLeft,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -659,12 +665,13 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
? Container()
: GestureDetector(
onTap: () {
showTipPiker(lists.id!.toString(),
listsLg!.lists.indexOf(lists));
showCallOutTipPop(lists.id!.toString(),
listsLg!.lists.indexOf(lists),lists.userTop == 1);
},
child: Image.asset(
getCircleImage('delete'),
width: 20.sp,
child: Icon(
Icons.more_vert,
color: AppColor.mainColor,
size: 20,
))
],
))
@ -722,6 +729,43 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
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) {
return Get.bottomSheet(
Scaffold(
@ -758,4 +802,15 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
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);
}
}
}

View File

@ -16,7 +16,9 @@ class World_call_outLogic extends GetxController {
TextEditingController inputController = TextEditingController();
final RefreshController refreshController = RefreshController();
FocusNode focusNode = FocusNode();
List<MyConfigData> genderList = [];
List<MyConfigData> genderList = [
MyConfigData('0', '全部', true)
];
String myUserId = '';
bool isLoad = true;
List<WorldLists> lists = [];
@ -58,7 +60,6 @@ class World_call_outLogic extends GetxController {
}
void initGerder() async {
genderList.clear();
var data1 =
await DioManager.instance.get(url: Api.getCircleList, params: {});
var bean1 = BaseResponse<ConfigBean>.fromJson(
@ -68,8 +69,11 @@ class World_call_outLogic extends GetxController {
ConfigBean configBean = bean1.data!;
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 = [];
genderList.forEach((element) {
if (element.isSelect) {
if (element.isSelect && element.id != '0') {
wantMeet.add(element.id);
}
});

View File

@ -32,8 +32,7 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
String zeroWidthSpace = '\ufeff';
int? currentCursor;
final logic = Get.find<World_call_outLogic>();
final logic = Get.put(World_call_outLogic());
@override
void dispose() {

View File

@ -17,8 +17,9 @@ import 'dart:math' as math;
class TodayPeopleDialog extends StatefulWidget {
bool isShow;
String urlStr;
TodayPeopleDialog({super.key, this.isShow = false, this.urlStr = ''});
String url;
Map recommendCircleFriendData;
TodayPeopleDialog({super.key, this.isShow = false, this.url = '', this.recommendCircleFriendData = const {}});
@override
_TodayPeopleDialogState createState() => _TodayPeopleDialogState();
@ -35,9 +36,11 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
void initState() {
// TODO: implement initState
super.initState();
if (widget.urlStr.isNotEmpty) {
if (widget.url.isNotEmpty) {
isLoad = false;
recommendCircleFriendData = widget.recommendCircleFriendData;
}
fetchMyAlbum(Api.getMyAlbum);
@ -52,14 +55,17 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
if (myAlbumBean.isSuccess()) {
imgList.addAll(myAlbumBean.data.lists);
}
if (widget.url.isEmpty) {
loadRecommendCircleFriendData();
}
}
void loadRecommendCircleFriendData() async {
if (widget.urlStr.isEmpty) {
if (widget.url.isEmpty) {
isLoad = true;
}
@ -68,18 +74,19 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
});
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) {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
if (await sp.isShowMatch() && imgList.isEmpty && widget.urlStr.isEmpty) {
if (await sp.isShowMatch() && imgList.isEmpty && widget.url.isEmpty) {
showOKToast('上传真实头像和形象照后更容易匹配到想认识的人哦~');
}
isLoad = false;
List dataList = data['data'];
if (dataList.isNotEmpty) {
recommendCircleFriendData = data['data'][0];
recommendCircleFriendData['tags'] = data['tags'];
if (mounted) {
setState(() {});
}
@ -167,6 +174,10 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
}
}
if (recommendCircleFriendData.containsKey('tags')) {
titleList = recommendCircleFriendData['tags'];
}
if (titleList.length >= 1) {
info['city'] = titleList.first;
}
@ -178,6 +189,14 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
if (titleList.length >= 3) {
info['desc'] = titleList[2];
}
if (titleList.length >= 4) {
info['desc1'] = titleList[3];
}
if (titleList.length >= 5) {
info['desc2'] = titleList[4];
}
} catch (e) {
loadRecommendCircleFriendData();
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(
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
alignment: Alignment.centerLeft,
@ -616,6 +695,35 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
),
),
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(
height: 40.sp,
margin: EdgeInsets.only(top: 20.sp),

View File

@ -38,6 +38,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
// TODO: implement initState
super.initState();
loadMyWxInfoData();
loadWxStatus();
// updateWxText();
}
@ -445,9 +446,9 @@ class _WxEditDialogState extends State<WxEditDialog> {
void loadWxStatus() async {
var result = await DioManager.getInstance().get(url: Api.updateWxNumState,);
if (result['code'] == 10034) {
wxStatusInfo['10034'] = result['msg'];
wxInfo['10034'] = result['msg'];
} else if (result['code'] == 10595) {
wxStatusInfo['10595'] = result['msg'];
wxInfo['10595'] = result['msg'];
}
}

View File

@ -55,6 +55,9 @@ void main() {
FlutterBugly.init(
androidAppId: "8509314e11",
);
if (Platform.isAndroid) {
getLostData();
}
}
} else {
FlutterBugly.init(
@ -62,9 +65,7 @@ void main() {
);
}
});
if (Platform.isAndroid) {
getLostData();
}
}
setCustomErrorWidget() {
@ -162,6 +163,7 @@ void uploadBuzIDAndToken() async {
ChannelPush.uploadToken();
print("token=" + token);
if (token != "") {
V2TimCallback res = await coreInstance.setOfflinePushConfig(
token: token, businessID: businessID);
@ -398,7 +400,19 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
///
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
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,

View File

@ -139,6 +139,10 @@ class Api {
//
static const setTopAlbum = 'up-service/topAlbum';
//
static const calloutTop = 'up-service/callout/top';
//
static const getTaAlbum = 'up-service/user/';

View File

@ -79,21 +79,30 @@ String getTabbarImage(String image) {
String getCircleImage(String image) {
return '${Values.circle_img}${image}.png';
}
bool isShowToast = false;
/// msg:
showOKToast(String msg) {
if (isShowToast) return;
isShowToast = true;
int seconds = msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2;
showToast(
msg,
textAlign: TextAlign.left,
duration: Duration(seconds: msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2),
duration: Duration(seconds: seconds),
position: ToastPosition.center,
backgroundColor: Colors.black,
radius: 13.0,
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(
alignment: Alignment.center,
child: isMore
@ -377,7 +386,7 @@ class CustomLoadFooter extends StatelessWidget {
canLoadingText: "松手开始加载数据",
loadingText: "正在加载...",
idleText: "上拉加载更多",
noDataText: "到底了~",
noDataText: "---更多精彩正在赶来的路上---",
failedText: "加载失败",
);
}
@ -686,6 +695,7 @@ createCustomMsg(String userId, String imId) async {
info['myInterests'] = data['data']['myInterests'] ?? [];
info['user'] = data['data']['user'];
info['guide_text'] = data['data']['guide_text'] ?? '请问现在有空吗?';
info['tags'] = recommendCircleFriendData['tags'];
await sendCustomMsg(imId, jsonEncode(info), desc);
return true;
}
@ -965,6 +975,9 @@ Map checkCardReturnData(Map recommendCircleFriendData) {
}
}
if (recommendCircleFriendData.containsKey('tags')) {
titleList = recommendCircleFriendData['tags'];
}
if (titleList.length >= 1) {
info['city'] = titleList.first;
}
@ -976,6 +989,15 @@ Map checkCardReturnData(Map recommendCircleFriendData) {
if (titleList.length >= 3) {
info['desc'] = titleList[2];
}
if (titleList.length >= 4) {
info['desc1'] = titleList[3];
}
if (titleList.length >= 5) {
info['desc2'] = titleList[4];
}
return info;
}

View File

@ -45,10 +45,10 @@ packages:
dependency: "direct main"
description:
name: app_settings
sha256: e6a34735d4ddb24ca9c5fd7e965ec65c8b611cbd3a329152c294f9e9f4bacb33
sha256: "2ec421f375d747916c4c0193933567074ea60c4f01c4a68642f07fef1002524e"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.3.1"
version: "4.0.4"
archive:
dependency: transitive
description:
@ -630,14 +630,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
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:
dependency: "direct main"
description:
@ -1045,6 +1037,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
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:
dependency: transitive
description:

View File

@ -90,7 +90,7 @@ dependencies:
fluwx: ^3.8.1+1
event_bus: ^2.0.0
#安装apk
flutter_install_app: 1.3.0
# flutter_install_app: 1.3.0
#闪屏页
flutter_native_splash: 2.2.16
#腾讯离线推送
@ -112,11 +112,13 @@ dependencies:
#边框渐变
gradient_borders: ^1.0.0
#系统设置 安卓4.3.1 苹果4.0.4
app_settings: 4.3.1
app_settings: 4.0.4
#百度定位插件
flutter_bmflocation: ^3.6.0
#通知权限
notification_permissions: ^0.6.1
#分帧
keframe: ^2.0.6
dev_dependencies:
flutter_test: