2.0.3代码提交
This commit is contained in:
parent
6efa96a0d6
commit
61f54ab51d
@ -71,8 +71,8 @@ android {
|
|||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 53
|
versionCode 54
|
||||||
versionName "2.0.3"
|
versionName "2.0.4"
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
vivo_APPID: "105669716",
|
vivo_APPID: "105669716",
|
||||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
|
|||||||
BIN
circle_app/assets/images/base/vip_fun_10.png
Normal file
BIN
circle_app/assets/images/base/vip_fun_10.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
circle_app/assets/images/base/vip_fun_11.png
Normal file
BIN
circle_app/assets/images/base/vip_fun_11.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
circle_app/assets/images/base/vip_fun_12.png
Normal file
BIN
circle_app/assets/images/base/vip_fun_12.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
circle_app/assets/images/base/vip_fun_13.png
Normal file
BIN
circle_app/assets/images/base/vip_fun_13.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
circle_app/assets/images/base/vip_fun_14.png
Normal file
BIN
circle_app/assets/images/base/vip_fun_14.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@ -35,6 +35,7 @@ target 'Runner' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
|
|
||||||
installer.pods_project.targets.each do |target|
|
installer.pods_project.targets.each do |target|
|
||||||
flutter_additional_ios_build_settings(target)
|
flutter_additional_ios_build_settings(target)
|
||||||
target.build_configurations.each do |config|
|
target.build_configurations.each do |config|
|
||||||
|
|||||||
@ -372,6 +372,6 @@ SPEC CHECKSUMS:
|
|||||||
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
|
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
|
||||||
WechatOpenSDK-XCFramework: acdeeda129efbef9532bca8a10c24e1b4b8c7d69
|
WechatOpenSDK-XCFramework: acdeeda129efbef9532bca8a10c24e1b4b8c7d69
|
||||||
|
|
||||||
PODFILE CHECKSUM: 48885d6cc54a7ccad9a8dd51c559ea15517bfe2c
|
PODFILE CHECKSUM: 38cc5bc9e8e4f24e1c8c8bd48fa64fcc54bc522e
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.11.3
|
||||||
|
|||||||
@ -871,8 +871,6 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
width: (width - 1).sp,
|
width: (width - 1).sp,
|
||||||
height: (width - 1).sp,
|
height: (width - 1).sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
memCacheHeight: width.toInt() - 1,
|
|
||||||
memCacheWidth: width.toInt() - 1,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -947,8 +945,6 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
imageUrl: bean.image,
|
imageUrl: bean.image,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit: BoxFit.cover),
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -40,6 +40,7 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
sub.cancel();
|
sub.cancel();
|
||||||
|
sub1.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,6 +140,9 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
sendMessageRes.data?.customElem?.extension; //自定义extension
|
sendMessageRes.data?.customElem?.extension; //自定义extension
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
sub1 = EventBusManager.on<ChatRefreshMsg>().listen((event) async {
|
||||||
|
_timuiKitChatController.refreshCurrentHistoryList();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget renderCustomStickerPanel(
|
Widget renderCustomStickerPanel(
|
||||||
|
|||||||
@ -161,8 +161,7 @@ class _ChatCircleShareDialogState extends State<ChatCircleShareDialog> {
|
|||||||
imageUrl: bean.image,
|
imageUrl: bean.image,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit: BoxFit.cover),
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
301
circle_app/lib/app/chat/widget/welcome_dialog.dart
Normal file
301
circle_app/lib/app/chat/widget/welcome_dialog.dart
Normal file
@ -0,0 +1,301 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
||||||
|
|
||||||
|
import '../../../common/Widgets/base_tip_widget.dart';
|
||||||
|
import '../../../common/colors/app_color.dart';
|
||||||
|
import '../../../network/api.dart';
|
||||||
|
import '../../../network/dio_manager.dart';
|
||||||
|
import '../../../util/util.dart';
|
||||||
|
|
||||||
|
class WelcomeDialog extends StatefulWidget {
|
||||||
|
Function callBack;
|
||||||
|
String userId;
|
||||||
|
|
||||||
|
WelcomeDialog({super.key,required this.userId,required this.callBack});
|
||||||
|
@override
|
||||||
|
_WelcomeDialogState createState() => new _WelcomeDialogState();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class _WelcomeDialogState extends State<WelcomeDialog> {
|
||||||
|
// TODO: add state variables and methods
|
||||||
|
List giftList = [];
|
||||||
|
String giftId = '';
|
||||||
|
String withStr = '';
|
||||||
|
int selectedIndex = -1;
|
||||||
|
|
||||||
|
TextEditingController descController = TextEditingController();
|
||||||
|
|
||||||
|
String tipStr = '';
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
super.initState();
|
||||||
|
loadGiftData();
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadGiftData() async {
|
||||||
|
var result = await DioManager.instance.get(url: Api.giftList);
|
||||||
|
if (result['code'] == 200) {
|
||||||
|
giftList = result['data'];
|
||||||
|
|
||||||
|
// for (int i= 0; i< giftList.length; i++) {
|
||||||
|
// var info = giftList[i];
|
||||||
|
// if (info['name'] == '浪漫告白') {
|
||||||
|
// selectedIndex = i ;
|
||||||
|
// giftId = info['id'].toString();
|
||||||
|
// tipStr = info['topHours'] != null ? info['topHours'].toString() : '';
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// TODO: add widget build method
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
|
},
|
||||||
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
|
body: Center(
|
||||||
|
child: Container(
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
maxHeight: 345.sp
|
||||||
|
),
|
||||||
|
margin: EdgeInsets.only(left: 10.sp,right: 10.sp),
|
||||||
|
padding: EdgeInsets.only(left: 10.sp,right: 10.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
|
gradient: LinearGradient(colors: [Color(0xFF4C3E5F),Color(0xFF324140)]),
|
||||||
|
border: GradientBoxBorder(
|
||||||
|
gradient:
|
||||||
|
AppColor.mainVerLinearGradient,
|
||||||
|
width: 1.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 18.sp),
|
||||||
|
child: Text(
|
||||||
|
'❤️赠送礼物更容易获得对方的好感❤️',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: tipStr.isNotEmpty ? 145.sp : 122.sp,
|
||||||
|
margin: EdgeInsets.only(top: 12.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF132B40), Color(0xFF251240)])),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
if (tipStr.isNotEmpty)
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top:6.sp),
|
||||||
|
child: Text(
|
||||||
|
'礼物送出后,获得$tipStr小时的消息置顶',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColor.mainColor,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
giftGridWidget(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xFF260C3E),
|
||||||
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
|
border: GradientBoxBorder(
|
||||||
|
gradient:
|
||||||
|
AppColor.mainVerLinearGradient,
|
||||||
|
width: 1.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: TextField(
|
||||||
|
controller:
|
||||||
|
descController,
|
||||||
|
maxLength: 20,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16.sp),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: '输入欢迎内容,TA回复后就可以继续聊天啦',
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: Colors.white70,
|
||||||
|
fontSize: 14.sp),
|
||||||
|
border: InputBorder.none,
|
||||||
|
counterText: '',
|
||||||
|
contentPadding:
|
||||||
|
EdgeInsets.only(
|
||||||
|
left: 14.sp)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Container(
|
||||||
|
// height: 102.sp,
|
||||||
|
// margin: EdgeInsets.only(top: 12.sp,),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.circular(10.sp),
|
||||||
|
// gradient: LinearGradient(
|
||||||
|
// colors: [Color(0xFF132B40), Color(0xFF251240)])),
|
||||||
|
// child: giftGridWidget(),
|
||||||
|
// ),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 25.sp,),
|
||||||
|
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 42.sp,
|
||||||
|
width: 136.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(21.sp),
|
||||||
|
color: Color(0x26FFFFFF)
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
'放弃',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16.sp,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
if (descController.text.isEmpty) {
|
||||||
|
showOKToast('请输入欢迎内容,TA回复后就可以继续聊天啦');
|
||||||
|
} else {
|
||||||
|
Map<String, dynamic> params = {'userId':widget.userId,'msg':descController.text};
|
||||||
|
if (selectedIndex >= 0) {
|
||||||
|
params['giftId'] = giftId;
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = await DioManager.instance.post(url: Api.sayHelloV2,params: params);
|
||||||
|
if (result['code'] == 200) {
|
||||||
|
showOKToast('已成功欢迎,TA回复后就可以在消息列表继续聊天啦~');
|
||||||
|
widget.callBack();
|
||||||
|
Get.back();
|
||||||
|
} else if (result['code'] == 31201) {
|
||||||
|
showOKToast(result['msg']);
|
||||||
|
showRechargeScreenDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 42.sp,
|
||||||
|
width: 136.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(21.sp),
|
||||||
|
gradient: AppColor.mainVerLinearGradient
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'欢迎',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16.sp,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
giftGridWidget() {
|
||||||
|
return Container(
|
||||||
|
width: Get.width,
|
||||||
|
height: 120.sp,
|
||||||
|
padding:
|
||||||
|
EdgeInsets.only(left: 5.sp, right: 5.sp, top: 10.sp, bottom: 10.sp),
|
||||||
|
child: ListView.builder(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
itemCount: giftList.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
// Replace the placeholders with the actual item widgets
|
||||||
|
return giftItemWidget(giftList[index], index);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
giftItemWidget(Map info, int index) {
|
||||||
|
bool isSelected = giftId.contains(info['id'].toString());
|
||||||
|
double price = info['price'];
|
||||||
|
|
||||||
|
return GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
if (selectedIndex == index) {
|
||||||
|
selectedIndex = -1;
|
||||||
|
tipStr = '';
|
||||||
|
giftId = '';
|
||||||
|
} else {
|
||||||
|
selectedIndex = index;
|
||||||
|
giftId = info['id'].toString();
|
||||||
|
tipStr = info['topHours'] != null ? info['topHours'].toString() : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 120.sp,
|
||||||
|
width: 75.sp,
|
||||||
|
child: Stack(
|
||||||
|
fit: StackFit.expand,
|
||||||
|
children: [
|
||||||
|
isSelected ? Image.asset(getMsgImage('gift_bg')) : Container(),
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.network(
|
||||||
|
info['icon'],
|
||||||
|
width: 60.sp,
|
||||||
|
height: 60.sp,
|
||||||
|
),
|
||||||
|
|
||||||
|
Text(info['name'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
fontWeight: FontWeight.w500)),
|
||||||
|
Text('${price.toInt()}小票',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
fontWeight: FontWeight.w500))
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,6 +2,7 @@ import 'dart:async';
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:circle_app/app/chat/widget/welcome_dialog.dart';
|
||||||
import 'package:circle_app/app/likelist/logic.dart';
|
import 'package:circle_app/app/likelist/logic.dart';
|
||||||
import 'package:circle_app/app/minefragment/logic.dart';
|
import 'package:circle_app/app/minefragment/logic.dart';
|
||||||
import 'package:circle_app/main.dart';
|
import 'package:circle_app/main.dart';
|
||||||
@ -54,6 +55,8 @@ class CircleLogic extends GetxController {
|
|||||||
|
|
||||||
bool isNewPeopleMore = true;
|
bool isNewPeopleMore = true;
|
||||||
|
|
||||||
|
bool isNewPeopleRed = false;
|
||||||
|
|
||||||
int flush = 0;
|
int flush = 0;
|
||||||
bool isMore = true;
|
bool isMore = true;
|
||||||
int myVip = -1;
|
int myVip = -1;
|
||||||
@ -336,6 +339,8 @@ class CircleLogic extends GetxController {
|
|||||||
|
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
int deep = 0;
|
int deep = 0;
|
||||||
|
int chargeFreeNum = 0;
|
||||||
|
int chargeType = 0;
|
||||||
List<VicinityItemBean> vicinityList = [];
|
List<VicinityItemBean> vicinityList = [];
|
||||||
|
|
||||||
int pageIndex = 1;
|
int pageIndex = 1;
|
||||||
@ -381,7 +386,8 @@ class CircleLogic extends GetxController {
|
|||||||
offset = bean.data.offset;
|
offset = bean.data.offset;
|
||||||
deep = bean.data.deep;
|
deep = bean.data.deep;
|
||||||
} catch (Exception) {}
|
} catch (Exception) {}
|
||||||
|
chargeFreeNum = bean.data.chargeFreeNum;
|
||||||
|
chargeType = bean.data.chargeType;
|
||||||
myVip = bean.data.isVip ? 1 : 0;
|
myVip = bean.data.isVip ? 1 : 0;
|
||||||
if (vicinityPage == 1) {
|
if (vicinityPage == 1) {
|
||||||
cityName = bean.data.city;
|
cityName = bean.data.city;
|
||||||
@ -689,17 +695,19 @@ class CircleLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void snedHelloData(int id,int index) async {
|
void snedHelloData(int id,int index) async {
|
||||||
var data = await DioManager.instance.post(url: Api.sayHello + id.toString(),);
|
Get.bottomSheet(WelcomeDialog(userId: id.toString(),callBack:() {
|
||||||
if (data['code'] == 200) {
|
|
||||||
|
|
||||||
newPeopleList.removeAt(index);
|
newPeopleList.removeAt(index);
|
||||||
|
|
||||||
update();
|
update();
|
||||||
if (newPeopleList.length < 5) {
|
if (newPeopleList.length < 5) {
|
||||||
onLoading();
|
onLoading();
|
||||||
}
|
}
|
||||||
showOKToast('已成功欢迎,TA回复后就可以在消息列表继续聊天啦~');
|
}),isScrollControlled: true,);
|
||||||
}
|
// var data = await DioManager.instance.post(url: Api.sayHello + id.toString(),);
|
||||||
|
// if (data['code'] == 200) {
|
||||||
|
//
|
||||||
|
|
||||||
|
// showOKToast('已成功欢迎,TA回复后就可以在消息列表继续聊天啦~');
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
void snedHelloMoreData() async {
|
void snedHelloMoreData() async {
|
||||||
var data = await DioManager.instance.post(url: Api.sayHelloMore,);
|
var data = await DioManager.instance.post(url: Api.sayHelloMore,);
|
||||||
@ -719,6 +727,8 @@ class VicinityBean {
|
|||||||
int offset;
|
int offset;
|
||||||
bool isVip;
|
bool isVip;
|
||||||
int deep;
|
int deep;
|
||||||
|
int chargeFreeNum;
|
||||||
|
int chargeType;
|
||||||
List<VicinityItemBean> users;
|
List<VicinityItemBean> users;
|
||||||
|
|
||||||
VicinityBean(
|
VicinityBean(
|
||||||
@ -726,6 +736,8 @@ class VicinityBean {
|
|||||||
required this.users,
|
required this.users,
|
||||||
required this.isVip,
|
required this.isVip,
|
||||||
required this.offset,
|
required this.offset,
|
||||||
|
required this.chargeFreeNum,
|
||||||
|
required this.chargeType,
|
||||||
required this.deep});
|
required this.deep});
|
||||||
|
|
||||||
factory VicinityBean.fromJson(Map<String, dynamic> json) {
|
factory VicinityBean.fromJson(Map<String, dynamic> json) {
|
||||||
@ -736,6 +748,8 @@ class VicinityBean {
|
|||||||
users: lists,
|
users: lists,
|
||||||
isVip: json['isVip'] ?? false,
|
isVip: json['isVip'] ?? false,
|
||||||
city: json['city'],
|
city: json['city'],
|
||||||
|
chargeType: json['chargeType'],
|
||||||
|
chargeFreeNum: json['chargeFreeNum'],
|
||||||
offset: json['offset'],
|
offset: json['offset'],
|
||||||
deep: json['deep']);
|
deep: json['deep']);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,6 +77,10 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
// 比如根据当前选中的标签执行其他操作
|
// 比如根据当前选中的标签执行其他操作
|
||||||
// int currentIndex = .toString());
|
// int currentIndex = .toString());
|
||||||
logic.isShowCircle = _tabController.index == 0;
|
logic.isShowCircle = _tabController.index == 0;
|
||||||
|
if (_tabController.indexIsChanging != 0) {
|
||||||
|
logic.isNewPeopleRed = false;
|
||||||
|
}
|
||||||
|
|
||||||
logic.update();
|
logic.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,11 +114,6 @@ 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,
|
||||||
// controller: _pageController,
|
|
||||||
// onPageChanged: (index) {
|
|
||||||
// _tabController.animateTo(index);
|
|
||||||
// print("index=" + index.toString());
|
|
||||||
// },
|
|
||||||
children: [
|
children: [
|
||||||
NewPeople(),
|
NewPeople(),
|
||||||
// circleList(controller),
|
// circleList(controller),
|
||||||
@ -123,25 +122,6 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// _tabController.index == 0
|
|
||||||
// ? Positioned(
|
|
||||||
// bottom: 36.sp,
|
|
||||||
// right: 10.sp,
|
|
||||||
// child: GestureDetector(
|
|
||||||
// onTap: () async {
|
|
||||||
// List<MyConfigData> numbers = [];
|
|
||||||
// numbers.add(MyConfigData(
|
|
||||||
// logic.getCircleIndex().id.toString(),
|
|
||||||
// logic.getCircleIndex().title!,
|
|
||||||
// false));
|
|
||||||
// var data = await Get.toNamed(AppRoutes.Call_out,
|
|
||||||
// arguments: {'numbers': numbers});
|
|
||||||
// },
|
|
||||||
// child: Image.asset(
|
|
||||||
// getCircleImage('send_msg'),
|
|
||||||
// width: 60.sp,
|
|
||||||
// )))
|
|
||||||
// : Center()
|
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
@ -696,8 +676,8 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
//padding: EdgeInsets.symmetric(horizontal: 10.sp),
|
//padding: EdgeInsets.symmetric(horizontal: 10.sp),
|
||||||
|
|
||||||
height: 27.sp,
|
height: 27.sp,
|
||||||
child: Row(
|
child: Stack(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
TabBar(
|
TabBar(
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
@ -782,6 +762,18 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
// );
|
// );
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
if (logic.isNewPeopleRed)
|
||||||
|
Positioned(
|
||||||
|
left: 42.5.sp,
|
||||||
|
top: 0.sp,
|
||||||
|
child: Container(
|
||||||
|
height: 10.sp,
|
||||||
|
width: 10.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -796,14 +788,6 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 2.sp,right: 2.sp),
|
padding: EdgeInsets.only(left: 2.sp,right: 2.sp),
|
||||||
// height: 26.sp,
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// borderRadius: BorderRadius.circular(13.sp),
|
|
||||||
// border: GradientBoxBorder(
|
|
||||||
// gradient: AppColor.mainVerLinearGradient,
|
|
||||||
// width: 1.sp,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
|
|||||||
@ -305,6 +305,7 @@ class _DiscoverState extends State<Discover>
|
|||||||
onPointerDown: getPointDownListenerInHorizontal(),
|
onPointerDown: getPointDownListenerInHorizontal(),
|
||||||
onPointerUp: getPointUpListenerInHorizontal(),
|
onPointerUp: getPointUpListenerInHorizontal(),
|
||||||
child: SmartRefresher(
|
child: SmartRefresher(
|
||||||
|
footer: DiyLoadFooter(noDataText: '只展示一些精选过的圈友哦~',),
|
||||||
onRefresh: refreshData,
|
onRefresh: refreshData,
|
||||||
controller: refreshController,
|
controller: refreshController,
|
||||||
onLoading: _onLoading,
|
onLoading: _onLoading,
|
||||||
@ -379,18 +380,19 @@ class _DiscoverState extends State<Discover>
|
|||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
List<String> imgList = [];
|
Get.toNamed(AppRoutes.UserInfoActivity,arguments: user.userId.toString());
|
||||||
user.images!.forEach((element) {
|
// List<String> imgList = [];
|
||||||
imgList.add(element);
|
// user.images!.forEach((element) {
|
||||||
});
|
// imgList.add(element);
|
||||||
|
// });
|
||||||
Get.toNamed(AppRoutes.Swiper,
|
//
|
||||||
arguments: {
|
// Get.toNamed(AppRoutes.Swiper,
|
||||||
'imaglist': imgList,
|
// arguments: {
|
||||||
'index': index,
|
// 'imaglist': imgList,
|
||||||
'userId':user.userId.toString()
|
// 'index': index,
|
||||||
|
// 'userId':user.userId.toString()
|
||||||
});
|
//
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: user.images![index],
|
imageUrl: user.images![index],
|
||||||
|
|||||||
@ -497,8 +497,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
imageUrl:widget.bean.image,
|
imageUrl:widget.bean.image,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit:BoxFit.cover
|
fit:BoxFit.cover
|
||||||
) ,
|
) ,
|
||||||
) : Container(),
|
) : Container(),
|
||||||
@ -1129,8 +1127,8 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
memCacheHeight: 40,
|
//
|
||||||
memCacheWidth: 40,
|
// ,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -1356,8 +1354,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
imageUrl:widget.bean.image,
|
imageUrl:widget.bean.image,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit:BoxFit.cover
|
fit:BoxFit.cover
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -1475,8 +1472,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
width: (width - 1).sp,
|
width: (width - 1).sp,
|
||||||
height: (width - 1).sp,
|
height: (width - 1).sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
memCacheHeight: width.toInt() - 1,
|
|
||||||
memCacheWidth: width.toInt() - 1,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1011,8 +1011,6 @@ class _LikeViewState extends State<LikeView>
|
|||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -1329,8 +1327,6 @@ class _LikeViewState extends State<LikeView>
|
|||||||
imageUrl: bean['image'],
|
imageUrl: bean['image'],
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit: BoxFit.cover),
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -1451,8 +1447,6 @@ class _LikeViewState extends State<LikeView>
|
|||||||
width: (width - 1).sp,
|
width: (width - 1).sp,
|
||||||
height: (width - 1).sp,
|
height: (width - 1).sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
memCacheHeight: width.toInt() - 1,
|
|
||||||
memCacheWidth: width.toInt() - 1,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -60,6 +60,7 @@ class _NewPeopleState extends State<NewPeople> {
|
|||||||
return GetBuilder<CircleLogic>(builder: (logic) {
|
return GetBuilder<CircleLogic>(builder: (logic) {
|
||||||
return logic.newPeopleList.isNotEmpty ? SmartRefresher(
|
return logic.newPeopleList.isNotEmpty ? SmartRefresher(
|
||||||
controller: logic.peopleRefreshController,
|
controller: logic.peopleRefreshController,
|
||||||
|
footer: DiyLoadFooter(noDataText: '只展示最近几天加入我们的圈友哦~',),
|
||||||
onRefresh: logic.onRefresh,
|
onRefresh: logic.onRefresh,
|
||||||
onLoading: logic.onLoading,
|
onLoading: logic.onLoading,
|
||||||
enablePullUp: true,
|
enablePullUp: true,
|
||||||
@ -99,6 +100,7 @@ class _NewPeopleItemState extends State<NewPeopleItem> {
|
|||||||
Widget ListItem(VicinityItemBean item, int index) {
|
Widget ListItem(VicinityItemBean item, int index) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
showOKToast('点击“👏欢迎”,对方回复您后就可以在消息列表进行聊天互动啦~');
|
||||||
// Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
// Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
@ -83,17 +83,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return bannerView(widget.logic);
|
return bannerView(widget.logic);
|
||||||
} else {
|
} else {
|
||||||
// if (widget.logic.myVip == 0 && index == widget.logic.vicinityList.length) {
|
|
||||||
// // return;
|
|
||||||
// return Stack(
|
|
||||||
// children: [
|
|
||||||
// ListItem(widget.logic.vicinityList[index - 1], index - 1),
|
|
||||||
// showVipView()
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// } else {
|
|
||||||
return ListItem(widget.logic.vicinityList[index - 1], index - 1);
|
return ListItem(widget.logic.vicinityList[index - 1], index - 1);
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -272,9 +262,10 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
Widget ListItem(VicinityItemBean item, int index) {
|
Widget ListItem(VicinityItemBean item, int index) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (index < 5) {
|
if (index < widget.logic.chargeFreeNum) {
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||||
} else {
|
} else {
|
||||||
|
if (widget.logic.chargeType == 1) {
|
||||||
if (widget.logic
|
if (widget.logic
|
||||||
.myVip > 0) {
|
.myVip > 0) {
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||||
@ -283,6 +274,9 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
|||||||
child: showVipView(),
|
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(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -144,6 +144,7 @@ class _CircleListPageState extends State<CircleListPage> with RouteAware {
|
|||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
RefreshIndicator(
|
RefreshIndicator(
|
||||||
|
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
logic.relaodData();
|
logic.relaodData();
|
||||||
},
|
},
|
||||||
@ -151,7 +152,7 @@ class _CircleListPageState extends State<CircleListPage> with RouteAware {
|
|||||||
controller: logic.rightCtr,
|
controller: logic.rightCtr,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (index == logic.circle.lists.length) {
|
if (index == logic.circle.lists.length) {
|
||||||
return loaddingWidget(logic.isMore);
|
return loaddingWidget(logic.isMore,tip: '更多特色圈子正在赶来的路上~');
|
||||||
}
|
}
|
||||||
return circleInfoItem(logic.circle.lists[index], index);
|
return circleInfoItem(logic.circle.lists[index], index);
|
||||||
},
|
},
|
||||||
@ -278,8 +279,6 @@ class _CircleListPageState extends State<CircleListPage> with RouteAware {
|
|||||||
imageUrl: bean.image,
|
imageUrl: bean.image,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit: BoxFit.cover),
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -442,8 +441,6 @@ class _CircleListPageState extends State<CircleListPage> with RouteAware {
|
|||||||
width: (width - 1).sp,
|
width: (width - 1).sp,
|
||||||
height: (width - 1).sp,
|
height: (width - 1).sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
memCacheHeight: width.toInt() - 1,
|
|
||||||
memCacheWidth: width.toInt() - 1,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,34 +1,85 @@
|
|||||||
|
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
import '../../network/api.dart';
|
import '../../network/api.dart';
|
||||||
import '../../network/dio_manager.dart';
|
import '../../network/dio_manager.dart';
|
||||||
|
import '../../util/SharedPreferencesHelper.dart';
|
||||||
|
import '../../util/eventBus.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class FriendslistLogic extends GetxController {
|
class FriendslistLogic extends GetxController {
|
||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
|
final RefreshController eachRefreshController = RefreshController();
|
||||||
final FriendslistState state = FriendslistState();
|
final FriendslistState state = FriendslistState();
|
||||||
|
StreamSubscription? subscription;
|
||||||
int page = 1;
|
int page = 1;
|
||||||
int isVip = 0;
|
int isVip = 0;
|
||||||
bool isLoad = true;
|
bool isLoad = true;
|
||||||
|
|
||||||
|
int eachPage = 1;
|
||||||
|
|
||||||
|
bool isEachLoad = true;
|
||||||
|
|
||||||
List<UserInfo> lists = [];
|
List<UserInfo> lists = [];
|
||||||
|
|
||||||
|
List<UserInfo> eachlists = [];
|
||||||
|
|
||||||
|
int sameCityCount = 0;
|
||||||
|
int wantMeetCount = 0;
|
||||||
|
String tip = '';
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
// TODO: implement onClose
|
||||||
|
super.onClose();
|
||||||
|
subscription?.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
loadTotal(Get.arguments + 1);
|
||||||
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
|
isVip = sharedPreferences.getInt(SharedPreferencesHelper.VIP);
|
||||||
|
});
|
||||||
|
subscription = EventBusManager.on<CommentVipEvent>().listen((event) {
|
||||||
|
isVip = event.vip;
|
||||||
|
update();
|
||||||
|
});
|
||||||
initList();
|
initList();
|
||||||
|
initEachList();
|
||||||
}
|
}
|
||||||
void dispose() {
|
void dispose() {
|
||||||
refreshController.dispose();
|
refreshController.dispose();
|
||||||
|
eachRefreshController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadTotal(int type) async {
|
||||||
|
var data = await DioManager.instance
|
||||||
|
.get(url: Api.getFollowTotal+type.toString());
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
sameCityCount = data['data']['sameCityCount'];
|
||||||
|
wantMeetCount = data['data']['wantMeetCount'];
|
||||||
|
if (sameCityCount > 0 && wantMeetCount > 0) {
|
||||||
|
tip = '${sameCityCount}人和你同城,${wantMeetCount}人是你想认识的圈友';
|
||||||
|
} else if (sameCityCount > 0) {
|
||||||
|
tip = '${sameCityCount}人和你同城';
|
||||||
|
} else if (wantMeetCount > 0) {
|
||||||
|
tip = '${wantMeetCount}人是你想认识的圈友';
|
||||||
|
} else {
|
||||||
|
tip = '';
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
initList() async {
|
initList() async {
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
lists.clear();
|
lists.clear();
|
||||||
@ -48,6 +99,34 @@ class FriendslistLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendCallMyFollowData() async {
|
||||||
|
var data = await DioManager.instance
|
||||||
|
.post(url: Api.callMyFollow);
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
showOKToast('召唤喜欢操作成功');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
initEachList() async {
|
||||||
|
if (eachPage == 1) {
|
||||||
|
eachlists.clear();
|
||||||
|
}
|
||||||
|
var data = await DioManager.instance
|
||||||
|
.get(url: Api.mutualUsers, params: {'page': eachPage});
|
||||||
|
var bean = BaseResponse<User>.fromJson(data, (data) => User.fromJson(data));
|
||||||
|
if (bean.isSuccess()) {
|
||||||
|
eachlists.addAll(bean.data.lists);
|
||||||
|
}
|
||||||
|
isEachLoad = false;
|
||||||
|
update();
|
||||||
|
if (eachPage == 1) {
|
||||||
|
eachRefreshController.refreshCompleted();
|
||||||
|
} else {
|
||||||
|
eachRefreshController.loadComplete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
setLike(int index) async {
|
setLike(int index) async {
|
||||||
var data = await DioManager.instance.post(
|
var data = await DioManager.instance.post(
|
||||||
url: "${Api.setLike + lists[index].id.toString()}/follow",
|
url: "${Api.setLike + lists[index].id.toString()}/follow",
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:circle_app/app/likelist/view.dart';
|
import 'package:circle_app/app/likelist/view.dart';
|
||||||
|
import 'package:circle_app/common/colors/app_color.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
|
import '../../common/Widgets/base_tip_widget.dart';
|
||||||
import '../../components/my_app_bar.dart';
|
import '../../components/my_app_bar.dart';
|
||||||
import '../../router/app_routers.dart';
|
import '../../router/app_routers.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
@ -17,27 +19,31 @@ class FriendslistPage extends StatefulWidget {
|
|||||||
State<FriendslistPage> createState() => _FriendslistPageState();
|
State<FriendslistPage> createState() => _FriendslistPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin {
|
class _FriendslistPageState extends State<FriendslistPage>
|
||||||
|
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
|
||||||
final logic = Get.find<FriendslistLogic>();
|
final logic = Get.find<FriendslistLogic>();
|
||||||
|
|
||||||
final state = Get.find<FriendslistLogic>().state;
|
final state = Get.find<FriendslistLogic>().state;
|
||||||
|
|
||||||
late TabController _tabController;
|
late TabController _tabController;
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get wantKeepAlive => true;
|
bool get wantKeepAlive => true;
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
_tabController = TabController(length: 2, vsync: this, initialIndex: Get.arguments);
|
_tabController =
|
||||||
|
TabController(length: 3, vsync: this, initialIndex: Get.arguments);
|
||||||
|
_tabController.addListener(() {
|
||||||
|
if (_tabController.indexIsChanging) {
|
||||||
|
logic.loadTotal(_tabController.index + 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return GetBuilder<FriendslistLogic>(builder: (logic) {
|
return GetBuilder<FriendslistLogic>(builder: (logic) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@ -66,13 +72,21 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
labelColor: const Color(0xFF00FFF4),
|
labelColor: const Color(0xFF00FFF4),
|
||||||
unselectedLabelColor: const Color(0xB3FFFFFF),
|
unselectedLabelColor: const Color(0xB3FFFFFF),
|
||||||
indicatorSize: TabBarIndicatorSize.label,
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
indicatorPadding: EdgeInsets.only(left: 30.sp, right: 30.sp),
|
indicatorPadding: EdgeInsets.only(left: 20.sp, right: 20.sp,bottom: 8.sp),
|
||||||
tabs: [
|
tabs: [
|
||||||
|
Tab(
|
||||||
|
child: Text(
|
||||||
|
'互相喜欢',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
Tab(
|
Tab(
|
||||||
child: Text(
|
child: Text(
|
||||||
'我喜欢的',
|
'我喜欢的',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20.sp,
|
fontSize: 15.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -80,15 +94,14 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
child: Text(
|
child: Text(
|
||||||
'喜欢我的',
|
'喜欢我的',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20.sp,
|
fontSize: 15.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
color: const Color(0xFF00FFF4),
|
color: const Color(0xFF00FFF4),
|
||||||
fontSize: 18.sp,
|
fontSize: 15.sp,
|
||||||
shadows: [
|
shadows: [
|
||||||
Shadow(
|
Shadow(
|
||||||
color: const Color(0xFFF657FF).withOpacity(0.5),
|
color: const Color(0xFFF657FF).withOpacity(0.5),
|
||||||
@ -100,7 +113,7 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
),
|
),
|
||||||
unselectedLabelStyle: TextStyle(
|
unselectedLabelStyle: TextStyle(
|
||||||
// color: const Color(0xB3FFFFFF),
|
// color: const Color(0xB3FFFFFF),
|
||||||
fontSize: 18.sp,
|
fontSize: 15.sp,
|
||||||
shadows: [
|
shadows: [
|
||||||
Shadow(
|
Shadow(
|
||||||
// color: const Color(0xFFF657FF),
|
// color: const Color(0xFFF657FF),
|
||||||
@ -109,23 +122,124 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: (index) {
|
onTap: (index) {},
|
||||||
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
actionWdiget: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (logic.isVip == 2) {
|
||||||
|
if (logic.lists.isEmpty) {
|
||||||
|
showOKToast('您还没有喜欢的人哦,可以前往感兴趣的圈子寻找喜欢的人');
|
||||||
|
} else {
|
||||||
|
logic.sendCallMyFollowData();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
showOKToast('成为年会员后可以一键召唤喜欢的人哦~');
|
||||||
|
showOepnVipDialog();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 20.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: EdgeInsets.only(left: 4.sp, right: 4.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
|
borderRadius: BorderRadius.circular(10.sp)),
|
||||||
|
child: Text(
|
||||||
|
'召唤喜欢',
|
||||||
|
style: TextStyle(color: Colors.black, fontSize: 10.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
if (logic.tip.isNotEmpty)
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 5.sp,),
|
||||||
|
child: RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
if (logic.sameCityCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: '${logic.sameCityCount}',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColor.mainColor, fontSize: 14.0),
|
||||||
|
),
|
||||||
|
if (logic.sameCityCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: '人和你同城',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 14.0),
|
||||||
|
),
|
||||||
|
if (logic.sameCityCount > 0 &&
|
||||||
|
logic.wantMeetCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: ',',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 14.0),
|
||||||
|
),
|
||||||
|
if (logic.wantMeetCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: '${logic.wantMeetCount}',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColor.mainColor,
|
||||||
|
fontSize: 14.0,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
if (logic.wantMeetCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: '人是你想认识的类型',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 14.0),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: TabBarView(
|
||||||
|
children: [eachtherLiveWidget(), myLiveWidget(), LikelistPage()],
|
||||||
|
controller: _tabController,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
body: TabBarView(children: [myLiveWidget(),LikelistPage()],controller: _tabController,),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget eachtherLiveWidget() {
|
||||||
|
return SafeArea(
|
||||||
|
child: logic.isEachLoad
|
||||||
|
? loaddingWidget(true)
|
||||||
|
: logic.eachlists.isEmpty
|
||||||
|
? noResultWidget()
|
||||||
|
: SmartRefresher(
|
||||||
|
controller: logic.eachRefreshController,
|
||||||
|
onRefresh: _onEachRefresh,
|
||||||
|
onLoading: _onEachLoading,
|
||||||
|
enablePullUp: true,
|
||||||
|
child: ListView.builder(
|
||||||
|
padding: EdgeInsets.all(10.sp),
|
||||||
|
itemCount: logic.eachlists.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return ListItem(logic.eachlists[index], index);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget myLiveWidget() {
|
Widget myLiveWidget() {
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: logic.isLoad ? loaddingWidget(true) : logic.lists.isEmpty ? noResultWidget() : SmartRefresher(
|
child: logic.isLoad
|
||||||
|
? loaddingWidget(true)
|
||||||
|
: logic.lists.isEmpty
|
||||||
|
? noResultWidget()
|
||||||
|
: SmartRefresher(
|
||||||
controller: logic.refreshController,
|
controller: logic.refreshController,
|
||||||
onRefresh: _onRefresh,
|
onRefresh: _onRefresh,
|
||||||
onLoading: _onLoading,
|
onLoading: _onLoading,
|
||||||
@ -134,33 +248,32 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
padding: EdgeInsets.all(10.sp),
|
padding: EdgeInsets.all(10.sp),
|
||||||
itemCount: logic.lists.length,
|
itemCount: logic.lists.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return ListItem(logic.lists[index],index);
|
return ListItem(logic.lists[index], index);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget ListItem(UserInfo item,int index) {
|
Widget ListItem(UserInfo item, int index) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: (){
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: const EdgeInsets.only(bottom: 21),
|
margin: const EdgeInsets.only(bottom: 21),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Stack(children: [
|
Stack(
|
||||||
|
children: [
|
||||||
ClipOval(
|
ClipOval(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
var imgList = <String>[];
|
var imgList = <String>[];
|
||||||
imgList.add(item.avatar);
|
imgList.add(item.avatar);
|
||||||
Get.toNamed(AppRoutes.Swiper, arguments: {
|
Get.toNamed(AppRoutes.Swiper,
|
||||||
'imaglist': imgList,
|
arguments: {'imaglist': imgList, 'index': 0});
|
||||||
'index': 0
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
@ -174,14 +287,17 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
right: 0,
|
right: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
|
child: item.vip > 0
|
||||||
child: item.vip>0 ?
|
? Image(
|
||||||
Image(
|
image: AssetImage(
|
||||||
image: AssetImage(getBaseImage(item.vip == 1 ? "vip" : 'year_vip')),
|
getBaseImage(item.vip == 1 ? "vip" : 'year_vip')),
|
||||||
width: 44.sp,
|
width: 44.sp,
|
||||||
height: 18.sp,
|
height: 18.sp,
|
||||||
):Container(),)
|
)
|
||||||
],),
|
: Container(),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
SizedBox(width: 10.sp),
|
SizedBox(width: 10.sp),
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@ -190,7 +306,10 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.nickname,
|
item.nickname,
|
||||||
style: const TextStyle(color :Colors.white70,fontSize: 14, fontWeight: FontWeight.bold),
|
style: const TextStyle(
|
||||||
|
color: Colors.white70,
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.sp),
|
SizedBox(width: 4.sp),
|
||||||
// SizedBox(height: 8.sp),
|
// SizedBox(height: 8.sp),
|
||||||
@ -198,7 +317,6 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
// Placeholder image
|
// Placeholder image
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(height: 8.sp),
|
SizedBox(height: 8.sp),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 200.sp,
|
width: 200.sp,
|
||||||
@ -206,15 +324,16 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
item.signature,
|
item.signature,
|
||||||
overflow: TextOverflow.ellipsis, // 超出部分使用省略号表示
|
overflow: TextOverflow.ellipsis, // 超出部分使用省略号表示
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Pla
|
// Pla
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
GestureDetector(onTap: (){
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
logic.setLike(index);
|
logic.setLike(index);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -224,15 +343,16 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
color: const Color(0xFFFF4D7C),
|
color: const Color(0xFFFF4D7C),
|
||||||
borderRadius: BorderRadius.circular(14),
|
borderRadius: BorderRadius.circular(14),
|
||||||
),
|
),
|
||||||
child:
|
child: Center(
|
||||||
Center(
|
child: Text(item.isLike ? "取消喜欢" : "喜欢",
|
||||||
child: Text(item.isLike?"取消喜欢":"喜欢", style: TextStyle(fontSize: 14.sp, color: Colors.white)),
|
style: TextStyle(fontSize: 14.sp, color: Colors.white)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),);
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildInfoRow(UserInfo userInfoBean) {
|
Widget _buildInfoRow(UserInfo userInfoBean) {
|
||||||
@ -255,7 +375,7 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
ageMsg ,
|
ageMsg,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
fontSize: 10.sp,
|
fontSize: 10.sp,
|
||||||
@ -263,7 +383,6 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 6.sp),
|
SizedBox(width: 6.sp),
|
||||||
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -277,4 +396,14 @@ class _FriendslistPageState extends State<FriendslistPage> with SingleTickerProv
|
|||||||
logic.page = logic.page + 1;
|
logic.page = logic.page + 1;
|
||||||
logic.initList();
|
logic.initList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _onEachRefresh() async {
|
||||||
|
logic.eachPage = 1;
|
||||||
|
logic.initEachList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onEachLoading() async {
|
||||||
|
logic.eachPage = logic.eachPage + 1;
|
||||||
|
logic.initEachList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -161,6 +161,13 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
content['nickname']);
|
content['nickname']);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case 9://有新人加入
|
||||||
|
{
|
||||||
|
CircleLogic logic = Get.find<CircleLogic>();
|
||||||
|
logic.isNewPeopleRed = true;
|
||||||
|
logic.update();
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -591,7 +591,7 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.FriendsActivity,arguments: 0);
|
Get.toNamed(AppRoutes.FriendsActivity,arguments: 1);
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -629,7 +629,7 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
|
|||||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
sharedPreferences.setInt(SharedPreferencesHelper.LIKEMECOUNT, logic.like_me_count);
|
sharedPreferences.setInt(SharedPreferencesHelper.LIKEMECOUNT, logic.like_me_count);
|
||||||
});
|
});
|
||||||
Get.toNamed(AppRoutes.FriendsActivity,arguments: 1);
|
Get.toNamed(AppRoutes.FriendsActivity,arguments: 2);
|
||||||
},
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -1134,8 +1134,6 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
imageUrl: bean['image'],
|
imageUrl: bean['image'],
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit: BoxFit.cover),
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -542,8 +542,6 @@ class _CircleInfoItemState extends State<CircleInfoItem> {
|
|||||||
imageUrl: bean['image'],
|
imageUrl: bean['image'],
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit: BoxFit.cover),
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -110,8 +110,6 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
width: (width - 1).sp,
|
width: (width - 1).sp,
|
||||||
height: (width - 1).sp,
|
height: (width - 1).sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
memCacheHeight: width.toInt() - 1,
|
|
||||||
memCacheWidth: width.toInt() - 1,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -182,8 +182,6 @@ class _My_circlePageState extends State<My_circlePage>
|
|||||||
imageUrl: bean.image,
|
imageUrl: bean.image,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit: BoxFit.cover),
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -287,26 +287,36 @@ class _OffaccountState extends State<OffaccountPage> {
|
|||||||
void showBottomSheetDialog(BuildContext context,OffaccountLogic logic) {
|
void showBottomSheetDialog(BuildContext context,OffaccountLogic logic) {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
backgroundColor: Colors.transparent,
|
// backgroundColor: Colors.transparent,
|
||||||
|
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.black.withOpacity(0.6),
|
color: Colors.black,
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(20.sp),
|
// borderRadius: BorderRadius.only(
|
||||||
topRight: Radius.circular(20.sp),
|
// topLeft: Radius.circular(20.sp),
|
||||||
),
|
// topRight: Radius.circular(20.sp),
|
||||||
|
// ),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
buildOptionItem("体验太差", context,logic),
|
buildOptionItem("换平台玩了", context, logic),
|
||||||
buildDivider(),
|
buildDivider(),
|
||||||
buildOptionItem("换平台了", context,logic),
|
buildOptionItem("功能体验差", context, logic),
|
||||||
buildDivider(),
|
buildDivider(),
|
||||||
buildOptionItem("担心隐私泄露", context,logic),
|
buildOptionItem("消息通知比较频繁", context, logic),
|
||||||
buildDivider(),
|
buildDivider(),
|
||||||
buildOptionItem("其他原因", context,logic),
|
buildOptionItem("找不到合适的人", context, logic),
|
||||||
|
buildDivider(),
|
||||||
|
buildOptionItem("回复消息的人少", context, logic),
|
||||||
|
buildDivider(),
|
||||||
|
buildOptionItem("收费有点高", context, logic),
|
||||||
|
buildDivider(),
|
||||||
|
buildOptionItem("收费的地方有点多", context, logic),
|
||||||
|
buildDivider(),
|
||||||
|
buildOptionItem("其他原因", context, logic),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -121,6 +121,8 @@ class SetupPage extends StatelessWidget {
|
|||||||
child: _buildItemRow('关于微乐园', getHomeImage("icon_in")),
|
child: _buildItemRow('关于微乐园', getHomeImage("icon_in")),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Expanded(child: Container()),
|
||||||
|
SafeArea(child: Center(child: Text('备案号:粤ICP备2023079493号-2A',style: TextStyle(color: Colors.white.withOpacity(0.5),fontSize: 12.sp),)))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),),
|
),),
|
||||||
|
|||||||
@ -159,6 +159,19 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
Positioned(
|
||||||
|
left: 5.sp,
|
||||||
|
top: 10.sp + MediaQuery.of(context).padding.top,
|
||||||
|
child: IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
padding: EdgeInsets.only(left: 15.sp),
|
||||||
|
icon: Image.asset('assets/images/navigator/back.png',
|
||||||
|
width: 30.sp,
|
||||||
|
height: 30.sp,
|
||||||
|
),
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -268,11 +268,11 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
toolbarHeight: 0,
|
toolbarHeight: 0,
|
||||||
foregroundColor: Colors.transparent,
|
foregroundColor: Colors.transparent,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
expandedHeight: 355.sp +
|
expandedHeight: 352.sp +
|
||||||
(logic.userInfoBean != null
|
(logic.userInfoBean != null
|
||||||
? logic.userInfoBean!.contact!.isNotEmpty &&
|
? logic.userInfoBean!.contact!.isNotEmpty &&
|
||||||
logic.userId.toString().isNotEmpty
|
logic.userId.toString().isNotEmpty
|
||||||
? 59.sp
|
? 42.sp
|
||||||
: 0
|
: 0
|
||||||
: 0),
|
: 0),
|
||||||
// bottom: PreferredSize(
|
// bottom: PreferredSize(
|
||||||
@ -478,7 +478,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 15.sp,
|
horizontal: 15.sp,
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(top: 19.sp),
|
margin: EdgeInsets.only(top: 13.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@ -565,7 +565,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
// width: 200.sp,
|
// width: 200.sp,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
margin: EdgeInsets.only(left: 15.sp, bottom: 15.sp),
|
margin: EdgeInsets.only(left: 5.sp, bottom: 5.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -591,10 +591,11 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
top: 0.sp, left: 15.sp, right: 10.sp, bottom: 10.sp),
|
top: 0.sp, left: 15.sp, right: 10.sp, bottom: 0.sp),
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: 12.sp, right: 12.sp, bottom: 18.sp, top: 16.sp),
|
left: 12.sp, right: 12.sp, top: 16.sp),
|
||||||
height: 144.sp,
|
|
||||||
|
height: 134.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0x1AFFFFFF),
|
color: Color(0x1AFFFFFF),
|
||||||
borderRadius: BorderRadius.circular(14.sp)),
|
borderRadius: BorderRadius.circular(14.sp)),
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:oktoast/oktoast.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
import '../../common/Widgets/open_vip_tip/logic.dart';
|
import '../../common/Widgets/open_vip_tip/logic.dart';
|
||||||
@ -11,6 +13,25 @@ import '../../util/eventBus.dart';
|
|||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class VisitorlistLogic extends GetxController {
|
class VisitorlistLogic extends GetxController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final RefreshController refreshController = RefreshController();
|
||||||
|
final VisitorlistState state = VisitorlistState();
|
||||||
|
int page = 1;
|
||||||
|
int isVip = 0;
|
||||||
|
bool isLoad = true;
|
||||||
|
List<UserListItem> lists = [];
|
||||||
|
List users = [];
|
||||||
|
StreamSubscription? subscription = null;
|
||||||
|
|
||||||
|
int sameCityCount = 0;
|
||||||
|
int wantMeetCount = 0;
|
||||||
|
String tip = '';
|
||||||
|
|
||||||
|
bool userIsMore = true;
|
||||||
|
int userPage = 1;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
refreshController.dispose();
|
refreshController.dispose();
|
||||||
@ -21,14 +42,6 @@ class VisitorlistLogic extends GetxController {
|
|||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
final RefreshController refreshController = RefreshController();
|
|
||||||
final VisitorlistState state = VisitorlistState();
|
|
||||||
int page = 1;
|
|
||||||
int isVip = 0;
|
|
||||||
bool isLoad = true;
|
|
||||||
List<UserListItem> lists = [];
|
|
||||||
StreamSubscription? subscription = null;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
@ -38,7 +51,38 @@ class VisitorlistLogic extends GetxController {
|
|||||||
page = 1;
|
page = 1;
|
||||||
initList();
|
initList();
|
||||||
});
|
});
|
||||||
|
loadVisitorTotalData();
|
||||||
refreshVipStatus();
|
refreshVipStatus();
|
||||||
|
loadInterestedInMeUsersData();
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadInterestedInMeUsersData() async {
|
||||||
|
var data =
|
||||||
|
await DioManager.instance.get(url: Api.interestedInMeUsers);
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
List infoList = data['data']['lists'];
|
||||||
|
if (infoList.isNotEmpty) {
|
||||||
|
users = data['data']['lists'];
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadVisitorTotalData() async {
|
||||||
|
var data =
|
||||||
|
await DioManager.instance.get(url: Api.getVisitorTotal,);
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
sameCityCount = data['data']['sameCityCount'];
|
||||||
|
wantMeetCount = data['data']['wantMeetCount'];
|
||||||
|
if (sameCityCount > 0 && wantMeetCount > 0) {
|
||||||
|
tip = '${sameCityCount}人和你同城,${wantMeetCount}人是你想认识的圈友';
|
||||||
|
} else if (sameCityCount > 0) {
|
||||||
|
tip = '${sameCityCount}人和你同城';
|
||||||
|
} else if (wantMeetCount > 0) {
|
||||||
|
tip = '${wantMeetCount}人是你想认识的圈友';
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshVipStatus() async {
|
refreshVipStatus() async {
|
||||||
@ -58,7 +102,7 @@ class VisitorlistLogic extends GetxController {
|
|||||||
|
|
||||||
initList() async {
|
initList() async {
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
lists.clear();
|
// lists.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = await DioManager.instance
|
var data = await DioManager.instance
|
||||||
@ -66,16 +110,37 @@ class VisitorlistLogic extends GetxController {
|
|||||||
var bean = BaseResponse<UserList>.fromJson(
|
var bean = BaseResponse<UserList>.fromJson(
|
||||||
data, (data) => UserList.fromJson(data));
|
data, (data) => UserList.fromJson(data));
|
||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
|
List list = bean.data.lists;
|
||||||
|
|
||||||
|
if (list.isNotEmpty) {
|
||||||
|
if (page == 1) {
|
||||||
|
lists = bean.data.lists;
|
||||||
|
refreshController.resetNoData();
|
||||||
|
refreshController.refreshCompleted();
|
||||||
|
} else {
|
||||||
|
refreshController.loadComplete();
|
||||||
lists.addAll(bean.data.lists);
|
lists.addAll(bean.data.lists);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
refreshController.loadNoData();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isLoad = false;
|
isLoad = false;
|
||||||
update();
|
update();
|
||||||
if (page == 1) {
|
|
||||||
refreshController.refreshCompleted();
|
}
|
||||||
} else {
|
|
||||||
refreshController.loadComplete();
|
void sendAllLike(List<String> idList) async {
|
||||||
|
var data = await DioManager.instance
|
||||||
|
.postBody(url: Api.allUserFollow, params: {'userIds': idList});
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
showOKToast('一键喜欢操作成功');
|
||||||
|
users.clear();
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -90,6 +155,7 @@ class User {
|
|||||||
final int vip;
|
final int vip;
|
||||||
final int gender;
|
final int gender;
|
||||||
final int role;
|
final int role;
|
||||||
|
final int mark;
|
||||||
final int orientation;
|
final int orientation;
|
||||||
final double lng;
|
final double lng;
|
||||||
final double lat;
|
final double lat;
|
||||||
@ -104,6 +170,7 @@ class User {
|
|||||||
required this.birthday,
|
required this.birthday,
|
||||||
required this.age,
|
required this.age,
|
||||||
required this.vip,
|
required this.vip,
|
||||||
|
required this.mark,
|
||||||
required this.gender,
|
required this.gender,
|
||||||
required this.role,
|
required this.role,
|
||||||
required this.orientation,
|
required this.orientation,
|
||||||
@ -127,6 +194,7 @@ class User {
|
|||||||
orientation: json['orientation'],
|
orientation: json['orientation'],
|
||||||
lng: json['lng'],
|
lng: json['lng'],
|
||||||
lat: json['lat'],
|
lat: json['lat'],
|
||||||
|
mark: json['mark'] ?? 0,
|
||||||
city: json['city'],
|
city: json['city'],
|
||||||
avatarThumb: json['avatar_thumb'],
|
avatarThumb: json['avatar_thumb'],
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,13 +1,16 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:circle_app/app/visitorlist/widget/visitors_follow_item.dart';
|
||||||
import 'package:circle_app/main.dart';
|
import 'package:circle_app/main.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
|
import '../../common/Widgets/base_tip_widget.dart';
|
||||||
import '../../common/Widgets/open_vip_tip/view.dart';
|
import '../../common/Widgets/open_vip_tip/view.dart';
|
||||||
|
import '../../common/colors/app_color.dart';
|
||||||
import '../../components/my_app_bar.dart';
|
import '../../components/my_app_bar.dart';
|
||||||
import '../../router/app_routers.dart';
|
import '../../router/app_routers.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
@ -17,17 +20,10 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
VisitorlistPage({Key? key}) : super(key: key);
|
VisitorlistPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
final logic = Get.find<VisitorlistLogic>();
|
final logic = Get.find<VisitorlistLogic>();
|
||||||
final state = Get
|
final state = Get.find<VisitorlistLogic>().state;
|
||||||
.find<VisitorlistLogic>()
|
|
||||||
.state;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return GetBuilder<VisitorlistLogic>(builder: (logic) {
|
return GetBuilder<VisitorlistLogic>(builder: (logic) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@ -38,8 +34,33 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: const MyAppBar(
|
appBar: MyAppBar(
|
||||||
centerTitle: "最近访客",
|
centerTitle: "最近访客",
|
||||||
|
actionWdiget: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (logic.isVip == 2) {
|
||||||
|
showOKToast('已为你增加10倍曝光啦');
|
||||||
|
} else {
|
||||||
|
showOKToast('开通年会员可以增加10倍曝光哦~');
|
||||||
|
showOepnVipDialog();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 24.sp,
|
||||||
|
padding: EdgeInsets.only(left: 6.sp, right: 6.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
|
borderRadius: BorderRadius.circular(12.sp)),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'10倍曝光',
|
||||||
|
style: TextStyle(color: Colors.black, fontSize: 13.sp),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
@ -48,26 +69,26 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
? loaddingWidget(true)
|
? loaddingWidget(true)
|
||||||
: logic.lists.isEmpty
|
: logic.lists.isEmpty
|
||||||
? noResultWidget()
|
? noResultWidget()
|
||||||
: SmartRefresher(
|
: Stack(
|
||||||
|
alignment: Alignment.topCenter,
|
||||||
|
children: [
|
||||||
|
SmartRefresher(
|
||||||
controller: logic.refreshController,
|
controller: logic.refreshController,
|
||||||
onRefresh: _onRefresh,
|
onRefresh: _onRefresh,
|
||||||
onLoading: _onLoading,
|
onLoading: _onLoading,
|
||||||
enablePullUp: true,
|
enablePullUp: true,
|
||||||
child: Stack(
|
child: ListView.builder(
|
||||||
alignment: Alignment.topCenter,
|
|
||||||
children: [
|
|
||||||
ListView.builder(
|
|
||||||
padding: EdgeInsets.all(10.sp),
|
padding: EdgeInsets.all(10.sp),
|
||||||
itemCount: logic.lists.length,
|
itemCount: logic.lists.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return ListItem(logic.lists[index], index);
|
return ListItem(
|
||||||
|
logic.lists[index], index);
|
||||||
},
|
},
|
||||||
),
|
)),
|
||||||
showGd()
|
showGd()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -91,10 +112,10 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
|
|
||||||
List<Widget> widgets = [];
|
List<Widget> widgets = [];
|
||||||
|
|
||||||
switch(urlList.length){
|
switch (urlList.length) {
|
||||||
case 0:
|
case 0:
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: (Get.width /2) - 40,
|
left: (Get.width / 2) - 40,
|
||||||
child: circleWidget(""),
|
child: circleWidget(""),
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
@ -102,7 +123,7 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
for (int i = 0; i < urlList.length; i++) {
|
for (int i = 0; i < urlList.length; i++) {
|
||||||
var element = urlList[i];
|
var element = urlList[i];
|
||||||
// double xOffset = interval * i + xOffsetBase;
|
// double xOffset = interval * i + xOffsetBase;
|
||||||
double let = (Get.width /2) - 60 ;
|
double let = (Get.width / 2) - 60;
|
||||||
|
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: let,
|
left: let,
|
||||||
@ -111,18 +132,19 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: (Get.width /2) - 20,
|
left: (Get.width / 2) - 20,
|
||||||
child: circleWidget(""),
|
child: circleWidget(""),
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
double xOffsetBase =
|
||||||
double xOffsetBase = (Get.width + interval * urlList.length - 60.0 * urlList.length) * 0.25;
|
(Get.width + interval * urlList.length - 60.0 * urlList.length) *
|
||||||
|
0.25;
|
||||||
|
|
||||||
for (int i = 0; i < urlList.length; i++) {
|
for (int i = 0; i < urlList.length; i++) {
|
||||||
var element = urlList[i];
|
var element = urlList[i];
|
||||||
// double xOffset = interval * i + xOffsetBase;
|
// double xOffset = interval * i + xOffsetBase;
|
||||||
double let = ((Get.width /2) - ((40*urlList.length))+(i*40)) ;
|
double let = ((Get.width / 2) - ((40 * urlList.length)) + (i * 40));
|
||||||
|
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: let,
|
left: let,
|
||||||
@ -140,47 +162,45 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
// double xOffsetBase = (Get.width + interval * urlList.length - 60.0 * urlList.length) * 0.25;
|
// double xOffsetBase = (Get.width + interval * urlList.length - 60.0 * urlList.length) * 0.25;
|
||||||
|
|
||||||
for (int i = 0; i < urlList.length; i++) {
|
for (int i = 0; i < urlList.length; i++) {
|
||||||
switch(i){
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: (Get.width /2) - 100,
|
left: (Get.width / 2) - 100,
|
||||||
child: circleWidget(urlList[i]),
|
child: circleWidget(urlList[i]),
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: (Get.width /2) - 60,
|
left: (Get.width / 2) - 60,
|
||||||
child: circleWidget(urlList[i]),
|
child: circleWidget(urlList[i]),
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: (Get.width /2) - 20,
|
left: (Get.width / 2) - 20,
|
||||||
child: circleWidget(urlList[i]),
|
child: circleWidget(urlList[i]),
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
widgets.add(Positioned(
|
widgets.add(Positioned(
|
||||||
left: (Get.width /2) + 20,
|
left: (Get.width / 2) + 20,
|
||||||
child: circleWidget(""),
|
child: circleWidget(""),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return logic.isVip > 0
|
return logic.isVip > 0
|
||||||
? Container()
|
? Container()
|
||||||
: Positioned(
|
: Positioned(
|
||||||
bottom: 150,
|
bottom: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 140.sp,
|
height: 70.sp,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
@ -188,7 +208,7 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(bottom: 40.sp),
|
margin: EdgeInsets.only(bottom: 10.sp, top: 10.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
"TA们也喜欢你哦 \n"
|
"TA们也喜欢你哦 \n"
|
||||||
"成为会员查看所有圈友信息",
|
"成为会员查看所有圈友信息",
|
||||||
@ -199,11 +219,56 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (logic.tip.isNotEmpty)
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 10.sp),
|
||||||
|
child: RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
if (logic.sameCityCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: '${logic.sameCityCount}',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColor.mainColor, fontSize: 14.0),
|
||||||
|
),
|
||||||
|
if (logic.sameCityCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: '人和你同城',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 14.0),
|
||||||
|
),
|
||||||
|
if (logic.sameCityCount > 0 &&
|
||||||
|
logic.wantMeetCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: ',',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 14.0),
|
||||||
|
),
|
||||||
|
if (logic.wantMeetCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: '${logic.wantMeetCount}',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColor.mainColor,
|
||||||
|
fontSize: 14.0,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
if (logic.wantMeetCount > 0)
|
||||||
|
TextSpan(
|
||||||
|
text: '人是你想认识的类型',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 14.0),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showRechargeDialog();
|
showRechargeDialog();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17),
|
borderRadius: BorderRadius.circular(17),
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
@ -215,10 +280,8 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
end: Alignment.centerRight,
|
end: Alignment.centerRight,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.symmetric(
|
margin: EdgeInsets.only(
|
||||||
vertical: 10.sp,
|
left: 50.sp, right: 50.sp, bottom: 20.sp),
|
||||||
horizontal: 55.sp,
|
|
||||||
),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
"开通会员查看更多访客",
|
"开通会员查看更多访客",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -234,10 +297,12 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget ListItem(UserListItem item, int index) {
|
Widget ListItem(UserListItem item, int index) {
|
||||||
//print("是不是vip"+logic.isVip.toString());
|
return Column(
|
||||||
return GestureDetector(
|
children: [
|
||||||
|
if (index == 0 && logic.users.isNotEmpty)
|
||||||
|
VisitorsFollowItem(users: logic.users),
|
||||||
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (logic.isVip > 0 || index < 3) {
|
if (logic.isVip > 0 || index < 3) {
|
||||||
@ -280,7 +345,8 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
bottom: 0.sp,
|
bottom: 0.sp,
|
||||||
child: item.user.vip != 0
|
child: item.user.vip != 0
|
||||||
? Image(
|
? Image(
|
||||||
image: AssetImage(getBaseImage(item.user.vip == 1 ? "vip" : 'year_vip')),
|
image: AssetImage(getBaseImage(
|
||||||
|
item.user.vip == 1 ? "vip" : 'year_vip')),
|
||||||
width: 44.sp,
|
width: 44.sp,
|
||||||
height: 18.sp,
|
height: 18.sp,
|
||||||
)
|
)
|
||||||
@ -340,15 +406,17 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text("回访",
|
child: Text("回访",
|
||||||
style: TextStyle(fontSize: 14.sp, color: Colors.white)),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp, color: Colors.white)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
|
||||||
,
|
|
||||||
),)
|
|
||||||
,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,16 +473,12 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
enableDrag: false)
|
enableDrag: false)
|
||||||
.then((value) {
|
.then((value) {});
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
circleWidget(String url, {double width = 70}) {
|
||||||
|
|
||||||
circleWidget(String url, {double width = 80}) {
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: (){
|
onTap: () {
|
||||||
showRechargeDialog();
|
showRechargeDialog();
|
||||||
},
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
@ -425,18 +489,20 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
width: width.sp,
|
width: width.sp,
|
||||||
height: width.sp,
|
height: width.sp,
|
||||||
),
|
),
|
||||||
url.contains("http") ? ClipOval(
|
url.contains("http")
|
||||||
|
? ClipOval(
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl:url,
|
imageUrl: url,
|
||||||
width: (width - 1).sp,
|
width: (width - 1).sp,
|
||||||
height: (width - 1).sp,
|
height: (width - 1).sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
) : Text(url,style: TextStyle(color: Color(0xffF756FF),fontSize: 12.sp),)
|
)
|
||||||
|
: Text(
|
||||||
|
url,
|
||||||
|
style: TextStyle(color: Color(0xffF756FF), fontSize: 12.sp),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
155
circle_app/lib/app/visitorlist/widget/visitors_follow_item.dart
Normal file
155
circle_app/lib/app/visitorlist/widget/visitors_follow_item.dart
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
import 'package:circle_app/common/Widgets/base_tip_widget.dart';
|
||||||
|
import 'package:circle_app/common/colors/app_color.dart';
|
||||||
|
import 'package:circle_app/router/app_routers.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../../common/Widgets/tag_widget.dart';
|
||||||
|
import '../../../util/util.dart';
|
||||||
|
import '../../circle/widgets/discover.dart';
|
||||||
|
import '../logic.dart';
|
||||||
|
|
||||||
|
class VisitorsFollowItem extends StatefulWidget {
|
||||||
|
List users;
|
||||||
|
|
||||||
|
VisitorsFollowItem({super.key,required this.users});
|
||||||
|
@override
|
||||||
|
_VisitorsFollowItemState createState() => new _VisitorsFollowItemState();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class _VisitorsFollowItemState extends State<VisitorsFollowItem> {
|
||||||
|
// TODO: add state variables and methods
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// TODO: add widget build method
|
||||||
|
return Container(
|
||||||
|
height: 240.sp,
|
||||||
|
width: Get.width,
|
||||||
|
padding: EdgeInsets.all(10.sp),
|
||||||
|
margin: EdgeInsets.only(bottom: 20.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.bgColor,
|
||||||
|
borderRadius: BorderRadius.circular(8.sp)
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 10.sp),
|
||||||
|
child: Text('有${widget.users.length}个人反复看过你,喜欢一下吧',style: TextStyle(color: Colors.white.withOpacity(0.75),fontSize: 18.sp,fontWeight: FontWeight.bold),)),
|
||||||
|
Expanded(
|
||||||
|
child: ListView.builder(itemBuilder: (context,index) {
|
||||||
|
var user = UserListItem.fromJson(widget.users[index]).user;
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
VisitorlistLogic logic = Get.find<VisitorlistLogic>();
|
||||||
|
if (logic.isVip > 0) {
|
||||||
|
Get.toNamed(AppRoutes.UserInfoActivity,arguments: user.id.toString());
|
||||||
|
} else {
|
||||||
|
showOKToast('开通会员可以一键喜欢哦~');
|
||||||
|
showOepnVipDialog();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 120.sp,
|
||||||
|
height: 120.sp,
|
||||||
|
margin: EdgeInsets.only(right: 10.sp),
|
||||||
|
child: Stack(
|
||||||
|
fit: StackFit.expand,
|
||||||
|
children: [
|
||||||
|
ClipRRect(borderRadius: BorderRadius.circular(8.sp),child: Image.network(user.avatar!,fit: BoxFit.cover,)),
|
||||||
|
Positioned(
|
||||||
|
bottom: 5.sp,
|
||||||
|
left: 5.sp,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
user.nickname ?? '',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18.sp,
|
||||||
|
color: Color(0XFFF7FAFA),
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 4.sp,
|
||||||
|
),
|
||||||
|
child: UserTagWidget(user.mark!),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.only(left: 0.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: 18.sp,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 6.sp, right: 6.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
9.sp),
|
||||||
|
gradient:
|
||||||
|
const LinearGradient(
|
||||||
|
begin: Alignment(
|
||||||
|
0.25, 0.5),
|
||||||
|
end: Alignment(
|
||||||
|
0.75, 0.5),
|
||||||
|
colors: [
|
||||||
|
Color(0xff8DFFF8),
|
||||||
|
Color(0xffB5D3FF)
|
||||||
|
])),
|
||||||
|
child: Text(
|
||||||
|
getAgeCOntent(
|
||||||
|
user!.gender ?? 0,
|
||||||
|
user!.age ?? 0,
|
||||||
|
user!.role ?? 0,
|
||||||
|
user!.orientation ?? 0),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 10.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},itemCount: widget.users.length,scrollDirection: Axis.horizontal,),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
VisitorlistLogic logic = Get.find<VisitorlistLogic>();
|
||||||
|
List<String> idList = [];
|
||||||
|
widget.users.forEach((element) {
|
||||||
|
var user = UserListItem.fromJson(element).user;
|
||||||
|
idList.add(user.id.toString());
|
||||||
|
});
|
||||||
|
logic.sendAllLike(idList);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 50.sp,right: 50.sp,top: 10.sp),
|
||||||
|
height: 40.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(8.sp),
|
||||||
|
color: AppColor.mainBgColor,
|
||||||
|
),
|
||||||
|
child: Text('一键喜欢',style: TextStyle(color: Colors.white,fontSize: 16.sp),),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -493,8 +493,6 @@ class _CircleShareState extends State<CircleShare> {
|
|||||||
width: (width - 1).sp,
|
width: (width - 1).sp,
|
||||||
height: (width - 1).sp,
|
height: (width - 1).sp,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
memCacheHeight: width.toInt() - 1,
|
|
||||||
memCacheWidth: width.toInt() - 1,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -565,8 +563,6 @@ class _CircleShareState extends State<CircleShare> {
|
|||||||
imageUrl: bean.image,
|
imageUrl: bean.image,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit: BoxFit.cover),
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -20,26 +20,60 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
final state = Get.find<Open_vip_tipLogic>().state;
|
final state = Get.find<Open_vip_tipLogic>().state;
|
||||||
|
|
||||||
final mineLogic = Get.find<MinefragmentLogic>();
|
final mineLogic = Get.find<MinefragmentLogic>();
|
||||||
|
Map<String,String> vipImgMap = {
|
||||||
|
"身份标识" : 'vip_fun_1',
|
||||||
|
"专属客服": 'vip_fun_2',
|
||||||
|
"无限畅聊": 'vip_fun_3',
|
||||||
|
"至尊喊话": 'vip_fun_4',
|
||||||
|
"图片私聊": 'vip_fun_5',
|
||||||
|
"视频私聊": 'vip_fun_6',
|
||||||
|
"看谁喜欢你": 'vip_fun_7',
|
||||||
|
"看谁看过你": 'vip_fun_8',
|
||||||
|
"缘分匹配": 'vip_fun_9',
|
||||||
|
"取向筛选": 'vip_fun_10',
|
||||||
|
"角色筛选": 'vip_fun_11',
|
||||||
|
"查看附近": 'vip_fun_12',
|
||||||
|
"排序靠前": 'vip_fun_13',
|
||||||
|
"权重提升": 'vip_fun_14',
|
||||||
|
};
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
List vipFuncList = [
|
List vipFuncList = [
|
||||||
|
"至尊喊话",
|
||||||
|
'权重提升',
|
||||||
|
'取向筛选',
|
||||||
|
'排序靠前',
|
||||||
|
'查看附近',
|
||||||
|
'角色筛选',
|
||||||
"身份标识",
|
"身份标识",
|
||||||
"专属客服",
|
"专属客服",
|
||||||
"无限畅聊",
|
"无限畅聊",
|
||||||
"至尊喊话",
|
|
||||||
"图片私聊",
|
"图片私聊",
|
||||||
"视频私聊",
|
"视频私聊",
|
||||||
"看谁喜欢你",
|
"看谁喜欢你",
|
||||||
"看谁看过你",
|
"看谁看过你",
|
||||||
"缘分匹配"
|
"缘分匹配"
|
||||||
];
|
];
|
||||||
|
// 权重提升-
|
||||||
|
// 取向筛选-
|
||||||
|
// 排序靠前-
|
||||||
|
// 查看附近-
|
||||||
|
// 角色筛选-
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List vipDescList = [
|
List vipDescList = [
|
||||||
|
"发布的喊话在圈内凸显",
|
||||||
|
'年会员权重直接提升数倍',
|
||||||
|
'可以精准筛选符合您取向的TA',
|
||||||
|
'在各个列表的排序都可以靠前',
|
||||||
|
'可以无限查看并私聊附近圈友',
|
||||||
|
'可以精准筛选您喜欢的角色',
|
||||||
'会员专属,更显尊贵',
|
'会员专属,更显尊贵',
|
||||||
"给您更加贴心的服务",
|
"给您更加贴心的服务",
|
||||||
"可以随心所欲畅聊",
|
"可以随心所欲畅聊",
|
||||||
"发布的喊话在圈内凸显",
|
|
||||||
"聊天可以一直使用图片",
|
"聊天可以一直使用图片",
|
||||||
"聊天可以一直使用视频",
|
"聊天可以一直使用视频",
|
||||||
"看到所有喜欢你的人",
|
"看到所有喜欢你的人",
|
||||||
@ -360,7 +394,7 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
getBaseImage('vip_fun_$index'),
|
getBaseImage(vipImgMap[func]!),
|
||||||
width: 70.sp,
|
width: 70.sp,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|||||||
@ -476,8 +476,6 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
imageUrl: bean['image'],
|
imageUrl: bean['image'],
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
memCacheHeight: 40,
|
|
||||||
memCacheWidth: 40,
|
|
||||||
fit: BoxFit.cover),
|
fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -50,7 +50,7 @@ wxStatusWidget(bool isUnclock,String wx,String userId,int type,String avatarUrl,
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 38.sp,
|
height: 38.sp,
|
||||||
width: (isUnclock ? 45.sp : 60.sp) + textWidth,
|
width: (isUnclock ? 45.sp : 65.sp) + textWidth,
|
||||||
padding: EdgeInsets.only(left: 10.sp,right: 10.sp),
|
padding: EdgeInsets.only(left: 10.sp,right: 10.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0x66000000),
|
color: Color(0x66000000),
|
||||||
|
|||||||
@ -45,7 +45,6 @@ final TUIChatSeparateViewModel chatSeparateViewModel =
|
|||||||
OverlayEntry? mainOverlayEntry;
|
OverlayEntry? mainOverlayEntry;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
checkAndExitIfEmulator();
|
|
||||||
// setCustomErrorWidget();
|
// setCustomErrorWidget();
|
||||||
FlutterBugly.postCatchedException(() async {
|
FlutterBugly.postCatchedException(() async {
|
||||||
// 如果需要 ensureInitialized,请在这里运行。
|
// 如果需要 ensureInitialized,请在这里运行。
|
||||||
@ -70,17 +69,6 @@ void main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Future<void> checkAndExitIfEmulator() async {
|
|
||||||
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
|
||||||
if (Platform.isAndroid) {
|
|
||||||
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
|
|
||||||
if (!androidInfo.isPhysicalDevice) {
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setCustomErrorWidget() {
|
setCustomErrorWidget() {
|
||||||
ErrorWidget.builder = (FlutterErrorDetails details) {
|
ErrorWidget.builder = (FlutterErrorDetails details) {
|
||||||
print(details.toString());
|
print(details.toString());
|
||||||
@ -93,7 +81,10 @@ setCustomErrorWidget() {
|
|||||||
// errorBuilder = buildErrorWidget(details);
|
// errorBuilder = buildErrorWidget(details);
|
||||||
// }
|
// }
|
||||||
return Center(
|
return Center(
|
||||||
child: Text('请重新加载',style: TextStyle(color: Colors.white,fontSize: 15.sp),),
|
child: Text(
|
||||||
|
'请重新加载',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 15.sp),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -155,9 +146,7 @@ logoutIM() async {
|
|||||||
try {
|
try {
|
||||||
final result = await coreInstance.logout();
|
final result = await coreInstance.logout();
|
||||||
print(result.desc + '退出IM');
|
print(result.desc + '退出IM');
|
||||||
} catch (e) {
|
} catch (e) {}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取设备Token,获取成功后开启离线推送
|
//获取设备Token,获取成功后开启离线推送
|
||||||
@ -167,7 +156,6 @@ void uploadBuzIDAndToken() async {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
await ChannelPush.init((msg) {});
|
await ChannelPush.init((msg) {});
|
||||||
|
|
||||||
int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
|
int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
|
||||||
@ -184,7 +172,6 @@ void uploadBuzIDAndToken() async {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
class MyApp extends StatefulWidget {
|
||||||
const MyApp({super.key});
|
const MyApp({super.key});
|
||||||
|
|
||||||
@ -351,9 +338,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
},
|
},
|
||||||
// [建议配置,详见此部分](https://cloud.tencent.com/document/product/269/70746#callback)
|
// [建议配置,详见此部分](https://cloud.tencent.com/document/product/269/70746#callback)
|
||||||
listener: V2TimSDKListener(onConnectSuccess: () {
|
listener: V2TimSDKListener(onConnectSuccess: () {
|
||||||
print('IM登录成功');
|
|
||||||
|
|
||||||
// loginIM();
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,8 +365,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
footerBuilder: () => CustomLoadFooter(),
|
footerBuilder: () => CustomLoadFooter(),
|
||||||
child: OKToast(
|
child: OKToast(
|
||||||
// 2-A: wrap your app with OKToast
|
// 2-A: wrap your app with OKToast
|
||||||
textStyle:
|
textStyle: const TextStyle(fontSize: 19.0, color: Colors.white),
|
||||||
const TextStyle(fontSize: 19.0, color: Colors.white),
|
|
||||||
backgroundColor: Colors.grey,
|
backgroundColor: Colors.grey,
|
||||||
animationCurve: Curves.easeIn,
|
animationCurve: Curves.easeIn,
|
||||||
|
|
||||||
@ -393,21 +376,32 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
title: '微乐园',
|
title: '微乐园',
|
||||||
initialBinding: SplashBinding(),
|
initialBinding: SplashBinding(),
|
||||||
getPages: AppPages.routes,
|
getPages: AppPages.routes,
|
||||||
|
|
||||||
/// 国际化处理
|
/// 国际化处理
|
||||||
localizationsDelegates: const [
|
localizationsDelegates: const [
|
||||||
GlobalMaterialLocalizations.delegate,
|
GlobalMaterialLocalizations.delegate,
|
||||||
GlobalWidgetsLocalizations.delegate,
|
GlobalWidgetsLocalizations.delegate,
|
||||||
GlobalCupertinoLocalizations.delegate, /// iOS一定要设置,不然报错
|
GlobalCupertinoLocalizations.delegate,
|
||||||
|
|
||||||
|
/// iOS一定要设置,不然报错
|
||||||
],
|
],
|
||||||
locale: const Locale('zh', 'CN'),
|
locale: const Locale('zh', 'CN'),
|
||||||
supportedLocales : const [
|
supportedLocales: const [
|
||||||
Locale('zh', 'CN'),
|
Locale('zh', 'CN'),
|
||||||
],
|
],
|
||||||
home: SplashPage(),
|
home: SplashPage(),
|
||||||
navigatorObservers: [routeObserver],
|
navigatorObservers: [routeObserver],
|
||||||
builder: FlutterSmartDialog.init(),
|
builder: (BuildContext context, Widget? child) {
|
||||||
|
return MediaQuery(
|
||||||
|
///设置文字大小不随系统设置改变
|
||||||
|
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
|
||||||
|
child:FlutterSmartDialog(
|
||||||
|
child: child,
|
||||||
|
));
|
||||||
|
},
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
)));
|
),
|
||||||
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -85,6 +85,8 @@ class Api {
|
|||||||
//发视频图片消息增加计数
|
//发视频图片消息增加计数
|
||||||
static const getAddTrialCount = 'mall-service/vips/trialCount/';
|
static const getAddTrialCount = 'mall-service/vips/trialCount/';
|
||||||
|
|
||||||
|
//访客信息匹配
|
||||||
|
static const getVisitorTotal = '/user-service/visit/getVisitorTotal';
|
||||||
|
|
||||||
//个人信息
|
//个人信息
|
||||||
static const getUserInfo = 'user-service/my/home';
|
static const getUserInfo = 'user-service/my/home';
|
||||||
@ -141,14 +143,21 @@ class Api {
|
|||||||
//关注列表
|
//关注列表
|
||||||
static const followList = 'user-service/follow/users';
|
static const followList = 'user-service/follow/users';
|
||||||
|
|
||||||
|
//互相喜欢
|
||||||
|
static const mutualUsers = '/user-service/mutual/users';
|
||||||
|
|
||||||
//被关注列表
|
//被关注列表
|
||||||
static const fansList = 'user-service/fans/users';
|
static const fansList = 'user-service/fans/users';
|
||||||
|
|
||||||
|
//喜欢列表统计
|
||||||
|
static const getFollowTotal = '/user-service/getFollowTotal/';
|
||||||
|
|
||||||
//被关注列表
|
//被关注列表
|
||||||
static const visitList = 'user-service/visit/users';
|
static const visitList = 'user-service/visit/users';
|
||||||
|
|
||||||
|
//召唤喜欢
|
||||||
|
static const callMyFollow = '/user-service/callMyFollow';
|
||||||
|
|
||||||
|
|
||||||
//举报
|
//举报
|
||||||
static const postReport = 'up-service/report';
|
static const postReport = 'up-service/report';
|
||||||
@ -281,6 +290,9 @@ class Api {
|
|||||||
|
|
||||||
static const sendGift = '/mall-service/gift/sendGift';
|
static const sendGift = '/mall-service/gift/sendGift';
|
||||||
|
|
||||||
|
//新人欢迎
|
||||||
|
static const sayHelloV2 = '/user-service/newUser/sayHelloV2/';
|
||||||
|
|
||||||
//礼物列表
|
//礼物列表
|
||||||
static const giftList = '/mall-service/gift/giftMall';
|
static const giftList = '/mall-service/gift/giftMall';
|
||||||
|
|
||||||
@ -387,4 +399,11 @@ class Api {
|
|||||||
|
|
||||||
//打招呼
|
//打招呼
|
||||||
static const sayHello = '/user-service/newUser/sayHello/';
|
static const sayHello = '/user-service/newUser/sayHello/';
|
||||||
|
|
||||||
|
//访问多次且未关注的用户列表
|
||||||
|
static const interestedInMeUsers = '/user-service/visit/allInterestedInMeUsers';
|
||||||
|
|
||||||
|
|
||||||
|
//批量关注用户
|
||||||
|
static const allUserFollow = '/user-service/follow/users';
|
||||||
}
|
}
|
||||||
@ -45,6 +45,11 @@ V2TimValueCallback<V2TimMsgCreateInfoResult>? createCustomMessageRes = null;
|
|||||||
SendCoustomMessage(this.createCustomMessageRes);
|
SendCoustomMessage(this.createCustomMessageRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ChatRefreshMsg {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class CommentBlackEvent {
|
class CommentBlackEvent {
|
||||||
String userId = "";
|
String userId = "";
|
||||||
bool isBlack = false;
|
bool isBlack = false;
|
||||||
|
|||||||
@ -330,6 +330,32 @@ class CustomLoadFooter extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DiyLoadFooter extends StatefulWidget {
|
||||||
|
String noDataText;
|
||||||
|
|
||||||
|
DiyLoadFooter({super.key,required this.noDataText});
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DiyLoadFooter> createState() => _DiyLoadFooterState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DiyLoadFooterState extends State<DiyLoadFooter> {
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ClassicFooter(
|
||||||
|
// 自定义加载更多时的文字
|
||||||
|
canLoadingText: "松手开始加载数据",
|
||||||
|
loadingText: "正在加载...",
|
||||||
|
idleText: "上拉加载更多",
|
||||||
|
noDataText: widget.noDataText,
|
||||||
|
failedText: "加载失败",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class CustomLikeLoadFooter extends StatelessWidget {
|
class CustomLikeLoadFooter extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
@ -677,20 +703,21 @@ sendCustomMsg(String userId, String data, String desc) async {
|
|||||||
if (createCustomMessageRes.code == 0) {
|
if (createCustomMessageRes.code == 0) {
|
||||||
String? id = createCustomMessageRes.data?.id;
|
String? id = createCustomMessageRes.data?.id;
|
||||||
// 发送自定义消息
|
// 发送自定义消息
|
||||||
if (Get.currentRoute == AppRoutes.Chat) {
|
// if (Get.currentRoute == AppRoutes.Chat) {
|
||||||
EventBusManager.fire(SendCoustomMessage(createCustomMessageRes));
|
// EventBusManager.fire(SendCoustomMessage(createCustomMessageRes));
|
||||||
} else {
|
// } else {
|
||||||
V2TimValueCallback<V2TimMessage> sendMessageRes = await TencentImSDKPlugin
|
V2TimValueCallback<V2TimMessage> sendMessageRes = await TencentImSDKPlugin
|
||||||
.v2TIMManager
|
.v2TIMManager
|
||||||
.getMessageManager()
|
.getMessageManager()
|
||||||
.sendMessage(id: id!, receiver: userId, groupID: '');
|
.sendMessage(id: id!, receiver: userId, groupID: '');
|
||||||
if (sendMessageRes.code == 0) {
|
if (sendMessageRes.code == 0) {
|
||||||
// 发送成功
|
// 发送成功
|
||||||
|
EventBusManager.fire(ChatRefreshMsg());
|
||||||
sendMessageRes.data?.customElem?.data; //自定义data
|
sendMessageRes.data?.customElem?.data; //自定义data
|
||||||
sendMessageRes.data?.customElem?.desc; //自定义desc
|
sendMessageRes.data?.customElem?.desc; //自定义desc
|
||||||
sendMessageRes.data?.customElem?.extension; //自定义extension
|
sendMessageRes.data?.customElem?.extension; //自定义extension
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -111,7 +111,7 @@ dependencies:
|
|||||||
svgaplayer_flutter: ^2.2.0
|
svgaplayer_flutter: ^2.2.0
|
||||||
#边框渐变
|
#边框渐变
|
||||||
gradient_borders: ^1.0.0
|
gradient_borders: ^1.0.0
|
||||||
#系统设置
|
#系统设置 安卓4.3.1 苹果4.0.4
|
||||||
app_settings: 4.3.1
|
app_settings: 4.3.1
|
||||||
#百度定位插件
|
#百度定位插件
|
||||||
flutter_bmflocation: ^3.6.0
|
flutter_bmflocation: ^3.6.0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user