2.4.3代码提交

This commit is contained in:
CYH 2025-02-10 09:31:13 +08:00
parent 0687ee37f6
commit 730ec0f5cd
27 changed files with 1014 additions and 770 deletions

View File

@ -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 85 versionCode 87
versionName "2.4.0" versionName "2.4.2"
manifestPlaceholders = [ manifestPlaceholders = [
vivo_APPID: "105669716", vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122", vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

View File

@ -45,6 +45,13 @@
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string> <string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixinURLParamsAPI</string>
<string>weixinULAPI</string>
<string>weixin</string>
<string>wechat</string>
</array>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>

View File

@ -37,6 +37,9 @@ class Call_outLogic extends GetxController {
final Call_outState state = Call_outState(); final Call_outState state = Call_outState();
TextEditingController textEditingController = TextEditingController(); TextEditingController textEditingController = TextEditingController();
ScrollController scrollController = ScrollController(); ScrollController scrollController = ScrollController();
ScrollController allScrollController = ScrollController();
ScrollController textscrollController = ScrollController();
bool isCheck = false; bool isCheck = false;
late ConfigBean configBean; late ConfigBean configBean;
String circleName = ""; String circleName = "";
@ -335,7 +338,7 @@ class Call_outLogic extends GetxController {
// String outputPath = path+"ceshishuiyin"; // String outputPath = path+"ceshishuiyin";
// File(outputPath).writeAsBytesSync(img.encodeJpg(watermarkedImage)); // File(outputPath).writeAsBytesSync(img.encodeJpg(watermarkedImage));
SmartDialog.showLoading(); SmartDialog.showLoading(msg: '上传中');
uploadImage(quToken, pickedFile!, ImgPath.CALL_OUT_IMAGE, (result) { uploadImage(quToken, pickedFile!, ImgPath.CALL_OUT_IMAGE, (result) {
SmartDialog.dismiss(); SmartDialog.dismiss();
state.imaglist.add(result); state.imaglist.add(result);
@ -387,12 +390,13 @@ class Call_outLogic extends GetxController {
if (null == pickedFile) { if (null == pickedFile) {
return; return;
} }
SmartDialog.showLoading(); SmartDialog.showLoading(msg: '上传中');
// var path = await getApplicationSupportDirectoryPath(); // var path = await getApplicationSupportDirectoryPath();
videoPlayerController = VideoPlayerController.file( videoPlayerController = VideoPlayerController.file(
File(pickedFile.path), File(pickedFile.path),
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true), videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
); );
await videoPlayerController?.initialize(); await videoPlayerController?.initialize();
final Duration videoDuration = videoPlayerController!.value.duration; final Duration videoDuration = videoPlayerController!.value.duration;
final double durationInSeconds = videoDuration.inSeconds.toDouble(); final double durationInSeconds = videoDuration.inSeconds.toDouble();
@ -417,57 +421,8 @@ class Call_outLogic extends GetxController {
} }
} catch (e) {} } catch (e) {}
//
// try {
// final XFile? pickedFile = await _picker.pickVideo(
// source: ImageSource.gallery,
// );
// if(null==pickedFile){
// return;
// }
// SmartDialog.showLoading();
// var path = await getApplicationSupportDirectoryPath();
//
//
// compressVideo(pickedFile.path, path, (result) async {
// print(result);
// videoPlayerController = VideoPlayerController.file(
// File(result),
// videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
// );
// await videoPlayerController?.initialize();
// final Duration videoDuration = videoPlayerController!.value.duration;
// final double durationInSeconds = videoDuration.inSeconds.toDouble();
// print("////////////");
// print(durationInSeconds.toString());
// if (durationInSeconds >= 5 && durationInSeconds <= 30) {
// videoPlayerController?.setLooping(true);
// videoPlayerController?.addListener(() {
// if (!videoPlayerController!.value.isPlaying) {
// // Navigator.pop(context);
// }
// });
//
// updataQiniu(result, pickedFile.name, CONFIG.CALL_OUT_VIDEO, quToken,
// (result) {
// SmartDialog.dismiss();
// state.videolist.add(result);
// update();
// });
// } else {
// SmartDialog.dismiss();
// showToast("请上传5-30秒的视频");
// }
// });
// } catch (e) {}
} }
Future<ClosedCaptionFile> _loadCaptions(BuildContext context) async {
final String fileContents = await DefaultAssetBundle.of(context)
.loadString('assets/bumble_bee_captions.vtt');
return WebVTTCaptionFile(
fileContents); // For vtt files, use WebVTTCaptionFile
}
} }
class MyBean { class MyBean {

File diff suppressed because it is too large Load Diff

View File

@ -359,7 +359,6 @@ class _TIMTextFieldLayoutNarrowState
} }
} }
_openEmojiPanel() { _openEmojiPanel() {
widget.onCursorChange(); widget.onCursorChange();
showKeyboard = showEmojiPanel; showKeyboard = showEmojiPanel;
@ -542,13 +541,13 @@ class _TIMTextFieldLayoutNarrowState
showSendSoundText = !showSendSoundText; showSendSoundText = !showSendSoundText;
}); });
} else { } else {
// //
if (Platform.isAndroid && !isShowVoiceOverLay) { if (Platform.isAndroid && !isShowVoiceOverLay) {
EventBusManager.fire(PermissionInfo('麦克风权限申请说明', '为了发送语音消息,需要获取麦克风权限')); EventBusManager.fire(PermissionInfo(
'麦克风权限申请说明', '为了发送语音消息,需要获取麦克风权限'));
} }
var data = var data =
await Permission.microphone.request(); await Permission.microphone.request();
if (Platform.isAndroid) { if (Platform.isAndroid) {
isShowVoiceOverLay = true; isShowVoiceOverLay = true;
EventBusManager.fire(PermissionClose()); EventBusManager.fire(PermissionClose());
@ -629,7 +628,7 @@ class _TIMTextFieldLayoutNarrowState
: TextInputAction : TextInputAction
.send, .send,
onEditingComplete: () { onEditingComplete: () {
widget.onSubmitted(); widget.onSubmitted();
if (showKeyboard) { if (showKeyboard) {
widget.focusNode widget.focusNode
.requestFocus(); .requestFocus();
@ -751,9 +750,10 @@ class _TIMTextFieldLayoutNarrowState
} }
getImageFile(); getImageFile();
}, },
child: child: Opacity(
Opacity(opacity: 0.75, opacity: 0.75,
child: Image.asset(getMsgImage('photo'), width: 40.sp)), child: Image.asset(getMsgImage('photo'),
width: 40.sp)),
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
@ -764,8 +764,9 @@ class _TIMTextFieldLayoutNarrowState
} }
getTakeImageFile(); getTakeImageFile();
}, },
child: Opacity(opacity: 0.75, child: Opacity(
child: Image.asset(getMsgImage('take_photo'), opacity: 0.75,
child: Image.asset(getMsgImage('take_photo'),
width: 40.sp), width: 40.sp),
), ),
), ),
@ -792,7 +793,8 @@ class _TIMTextFieldLayoutNarrowState
} }
getVideoFile(ImageSource.gallery); getVideoFile(ImageSource.gallery);
}, },
child: Opacity(opacity: 0.75, child: Opacity(
opacity: 0.75,
child: Image.asset(getMsgImage('icon_video'), child: Image.asset(getMsgImage('icon_video'),
width: 40.sp), width: 40.sp),
), ),
@ -806,7 +808,8 @@ class _TIMTextFieldLayoutNarrowState
} }
getVideoFile(ImageSource.camera); getVideoFile(ImageSource.camera);
}, },
child: Opacity(opacity: 0.75, child: Opacity(
opacity: 0.75,
child: Image.asset(getMsgImage('icon_video_camera'), child: Image.asset(getMsgImage('icon_video_camera'),
width: 40.sp), width: 40.sp),
), ),
@ -864,17 +867,19 @@ class _TIMTextFieldLayoutNarrowState
_showIsCancelBlackDialog(context); _showIsCancelBlackDialog(context);
return; return;
} }
var reulst1 = var reulst1 = await DioManager.instance.get(
await DioManager.instance.get(url: Api.canMsgRandOne + widget.conversationID.split('_').last); url: Api.canMsgRandOne +
widget.conversationID.split('_').last);
if (reulst1['code'] == 200) { if (reulst1['code'] == 200) {
var reulst = var reulst = await DioManager.instance
await DioManager.instance.get(url: Api.msgRandOne); .get(url: Api.msgRandOne);
String text = reulst['data']; String text = reulst['data'];
var result = await widget.model.sendTextMessage( var result = await widget.model.sendTextMessage(
text: text, text: text,
convID: widget.conversationID, convID: widget.conversationID,
convType: ConvType.c2c); convType: ConvType.c2c);
sendHotAction(1, widget.conversationID.split('_').last); sendHotAction(
1, widget.conversationID.split('_').last);
} else { } else {
showOKToast(reulst1['msg']); showOKToast(reulst1['msg']);
} }
@ -896,7 +901,9 @@ class _TIMTextFieldLayoutNarrowState
enableDrag: false); enableDrag: false);
}), }),
if (userInfoBean != null && logic.isProd) if (userInfoBean != null && logic.isProd)
userInfoBean!.contact.isNotEmpty ? chatWxActionWidget() : chatWantWxActionWidget() userInfoBean!.contact.isNotEmpty
? chatWxActionWidget()
: chatWantWxActionWidget()
], ],
), ),
), ),
@ -908,7 +915,10 @@ class _TIMTextFieldLayoutNarrowState
} }
opacityWidget(Widget child) { opacityWidget(Widget child) {
return Opacity(opacity: 0.75,child: widget,); return Opacity(
opacity: 0.75,
child: widget,
);
} }
chatActionWidget(String img, String action, GestureTapCallback onTap) { chatActionWidget(String img, String action, GestureTapCallback onTap) {
@ -931,7 +941,8 @@ class _TIMTextFieldLayoutNarrowState
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Image.asset( getMsgImage(img), Image.asset(
getMsgImage(img),
width: 20.sp, width: 20.sp,
), ),
SizedBox( SizedBox(
@ -947,12 +958,15 @@ class _TIMTextFieldLayoutNarrowState
); );
} }
chatWantWxActionWidget() { chatWantWxActionWidget() {
double textWidth = boundingTextSize(Get.context!, userInfoBean!.contact!, TextStyle(color: Colors.white, fontSize: 16.sp)).width; double textWidth = boundingTextSize(Get.context!, userInfoBean!.contact!,
TextStyle(color: Colors.white, fontSize: 16.sp))
.width;
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
var result = await DioManager.instance.get(url: Api.noticeWxNum + userInfoBean!.id.toString(),); var result = await DioManager.instance.get(
url: Api.noticeWxNum + userInfoBean!.id.toString(),
);
if (result['code'] == 200) { if (result['code'] == 200) {
showOKToast('已提醒对方填写'); showOKToast('已提醒对方填写');
} else { } else {
@ -960,7 +974,7 @@ class _TIMTextFieldLayoutNarrowState
} }
}, },
child: Container( child: Container(
width:115.sp, width: 115.sp,
height: 28.sp, height: 28.sp,
margin: EdgeInsets.only(right: 4.sp), margin: EdgeInsets.only(right: 4.sp),
alignment: Alignment.center, alignment: Alignment.center,
@ -990,7 +1004,6 @@ class _TIMTextFieldLayoutNarrowState
'想要联系方式', '想要联系方式',
style: TextStyle(color: Colors.white, fontSize: 13.sp), style: TextStyle(color: Colors.white, fontSize: 13.sp),
), ),
], ],
)), )),
), ),
@ -998,17 +1011,24 @@ class _TIMTextFieldLayoutNarrowState
} }
chatWxActionWidget() { chatWxActionWidget() {
double textWidth = boundingTextSize(Get.context!, userInfoBean!.contact!, TextStyle(color: Colors.white, fontSize: 16.sp)).width; double textWidth = boundingTextSize(Get.context!, userInfoBean!.contact!,
TextStyle(color: Colors.white, fontSize: 16.sp))
.width;
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
if (unLockWxNum != 1) { if (unLockWxNum != 1) {
var result = await DioManager().post(url: Api.unlockStatus,params: {'targetUserId':userInfoBean!.id!}); var result = await DioManager().post(
url: Api.unlockStatus,
params: {'targetUserId': userInfoBean!.id!});
if (result['code'] == 200) { if (result['code'] == 200) {
int price = result['data']['unlockPrice']; int price = result['data']['unlockPrice'];
int residueUnlockNum = result['data']['residueUnlockNum']; int residueUnlockNum = result['data']['residueUnlockNum'];
if (price > 0 && (residueUnlockNum == -1 || residueUnlockNum > 0)) { if (price > 0 && (residueUnlockNum == -1 || residueUnlockNum > 0)) {
Get.bottomSheet(UnlockWxTip(userInfoBean!.id.toString(), userInfoBean!.avatar,false), Get.bottomSheet(
isScrollControlled: true, enableDrag: false) UnlockWxTip(userInfoBean!.id.toString(),
userInfoBean!.avatar, false),
isScrollControlled: true,
enableDrag: false)
.then((value) { .then((value) {
if (value != null) { if (value != null) {
sendHotAction(3, userInfoBean!.id.toString()); sendHotAction(3, userInfoBean!.id.toString());
@ -1016,24 +1036,31 @@ class _TIMTextFieldLayoutNarrowState
} }
}); });
} else if (price > 0) { } else if (price > 0) {
Get.bottomSheet(UnlockWxTip(userInfoBean!.id.toString(), userInfoBean!.avatar,true), Get.bottomSheet(
isScrollControlled: true, enableDrag: true) UnlockWxTip(userInfoBean!.id.toString(),
userInfoBean!.avatar, true),
isScrollControlled: true,
enableDrag: true)
.then((value) { .then((value) {
if (value != null) { if (value != null) {
loadUserData(); loadUserData();
sendHotAction(3, userInfoBean!.id.toString()); sendHotAction(3, userInfoBean!.id.toString());
} }
}); });
} else { } else {
var result = await DioManager() var result = await DioManager().post(
.post(url: Api.unlockWx, params: {'targetUserId': userInfoBean!.id}); url: Api.unlockWx,
params: {'targetUserId': userInfoBean!.id});
if (result['code'] == 200) { if (result['code'] == 200) {
showOKToast('解锁成功'); showOKToast('解锁成功');
sendHotAction(3, userInfoBean!.id.toString()); sendHotAction(3, userInfoBean!.id.toString());
loadUserData(); loadUserData();
} else { } else {
Get.bottomSheet(UnlockWxTip(userInfoBean!.id.toString(), userInfoBean!.avatar,true), Get.bottomSheet(
isScrollControlled: true, enableDrag: false) UnlockWxTip(userInfoBean!.id.toString(),
userInfoBean!.avatar, true),
isScrollControlled: true,
enableDrag: false)
.then((value) { .then((value) {
if (value != null) { if (value != null) {
loadUserData(); loadUserData();
@ -1046,7 +1073,8 @@ class _TIMTextFieldLayoutNarrowState
} }
}, },
child: Container( child: Container(
width: textWidth + (userInfoBean!.contact!.contains('*')? 50.sp : 30.sp), width:
textWidth + (userInfoBean!.contact!.contains('*') ? 50.sp : 30.sp),
height: 28.sp, height: 28.sp,
margin: EdgeInsets.only(right: 4.sp), margin: EdgeInsets.only(right: 4.sp),
alignment: Alignment.center, alignment: Alignment.center,
@ -1066,7 +1094,11 @@ class _TIMTextFieldLayoutNarrowState
width: 4.sp, width: 4.sp,
), ),
Image.asset( Image.asset(
getMineImage(userInfoBean!.contactType! == 1 ? 'phone_icon' : userInfoBean!.contactType! == 3 ? 'qq' : 'wx'), getMineImage(userInfoBean!.contactType! == 1
? 'phone_icon'
: userInfoBean!.contactType! == 3
? 'qq'
: 'wx'),
width: 20.sp, width: 20.sp,
), ),
SizedBox( SizedBox(
@ -1100,24 +1132,21 @@ class _TIMTextFieldLayoutNarrowState
int code = data['code']; int code = data['code'];
if (code == 200) { if (code == 200) {
try { try {
var result = var result = await DioManager.instance
await DioManager.instance.get(url: Api.adImstate + widget.conversationID.split('_').last); .get(url: Api.adImstate + widget.conversationID.split('_').last);
if (result['code'] == 21201) { if (result['code'] == 21201) {
Get.bottomSheet( Get.bottomSheet(
Scaffold( Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: Open_vip_tipPage(false,'chat'), body: Open_vip_tipPage(false, 'chat'),
), ),
isScrollControlled: true, isScrollControlled: true,
enableDrag: false); enableDrag: false);
imStatusOK = false; imStatusOK = false;
return false; return false;
} }
} catch (e) { } catch (e) {}
}
imStatusOK = true; imStatusOK = true;
} else { } else {
@ -1125,7 +1154,7 @@ class _TIMTextFieldLayoutNarrowState
Get.bottomSheet( Get.bottomSheet(
Scaffold( Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: Open_vip_tipPage(false,'chat'), body: Open_vip_tipPage(false, 'chat'),
), ),
isScrollControlled: true, isScrollControlled: true,
enableDrag: false); enableDrag: false);
@ -1160,20 +1189,29 @@ class _TIMTextFieldLayoutNarrowState
if (widget.userId?.contains('qpqz_prod_10_') ?? false) { if (widget.userId?.contains('qpqz_prod_10_') ?? false) {
return true; return true;
} }
var data = var data = await DioManager.instance.get(
await DioManager.instance.get(url: Api.getIsVips,params: {'plate':plate,'targetId':widget.userId!.split('_').last}); url: Api.getIsVips,
params: {'plate': plate, 'targetId': widget.userId!.split('_').last});
if (data['code'] == 200) { if (data['code'] == 200) {
isVip = !data['data']; isVip = !data['data'];
} }
if (!isVip) { if (!isVip) {
showOKToast(plate== 5 ? '开通会员之后才能发送语音' : (plate == 1 || plate == 3) ? '开通会员之后才能发送图片' : '开通会员之后才能发送视频'); showOKToast(plate == 5
String source = plate== 5 ? 'chat_send_voice' : (plate == 1 || plate == 3) ? 'chat_send_photo' : 'chat_send_video'; ? '开通会员之后才能发送语音'
: (plate == 1 || plate == 3)
? '开通会员之后才能发送图片'
: '开通会员之后才能发送视频');
String source = plate == 5
? 'chat_send_voice'
: (plate == 1 || plate == 3)
? 'chat_send_photo'
: 'chat_send_video';
Get.bottomSheet( Get.bottomSheet(
Scaffold( Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: Open_vip_tipPage(false,source), body: Open_vip_tipPage(false, source),
), ),
isScrollControlled: true, isScrollControlled: true,
enableDrag: false); enableDrag: false);
@ -1184,8 +1222,6 @@ class _TIMTextFieldLayoutNarrowState
return isVip; return isVip;
} }
addChatRecord(String msgContent, String msgId, String sendTime) async { addChatRecord(String msgContent, String msgId, String sendTime) async {
String str = DateTime.now().toString().split('.').first; String str = DateTime.now().toString().split('.').first;
@ -1213,7 +1249,6 @@ class _TIMTextFieldLayoutNarrowState
await requestStoragePermission(); await requestStoragePermission();
} }
XFile? pickedFile; XFile? pickedFile;
String? thumbnailPath; // thumbnailPath String? thumbnailPath; // thumbnailPath
@ -1298,7 +1333,7 @@ class _TIMTextFieldLayoutNarrowState
if (!isOK) { if (!isOK) {
return; return;
} }
checkPhotosStatus(); checkPhotosStatus();
try { try {
final XFile? pickedFile = await _picker.pickImage( final XFile? pickedFile = await _picker.pickImage(
source: ImageSource.gallery, source: ImageSource.gallery,
@ -1432,7 +1467,7 @@ class _TIMTextFieldLayoutNarrowState
child: Text( child: Text(
"是否解除拉黑", "是否解除拉黑",
style: style:
TextStyle(color: Colors.white, fontSize: 16.sp), TextStyle(color: Colors.white, fontSize: 16.sp),
), ),
), ),
Container( Container(
@ -1495,14 +1530,16 @@ class _TIMTextFieldLayoutNarrowState
onTap: () async { onTap: () async {
Get.back(); Get.back();
var data = await DioManager.instance.post( var data = await DioManager.instance.post(
url: '${Api.setBlock + widget.conversationID.split('_').last}/block', params: {'status': '0'}); url:
'${Api.setBlock + widget.conversationID.split('_').last}/block',
params: {'status': '0'});
var bean = BaseResponse<dynamic>.fromJson( var bean = BaseResponse<dynamic>.fromJson(
data, data,
(jsonData) => jsonData, (jsonData) => jsonData,
); );
if (bean.isSuccess()) { if (bean.isSuccess()) {
final FriendshipServices _friendshipServices = final FriendshipServices _friendshipServices =
serviceLocator<FriendshipServices>(); serviceLocator<FriendshipServices>();
isBlack = false; isBlack = false;
} }
showOKToast(bean.msg); showOKToast(bean.msg);
@ -1559,17 +1596,13 @@ class _TIMTextFieldLayoutNarrowState
userInfoBean = bean.data.user; userInfoBean = bean.data.user;
unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1; unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1;
setState(() {}); setState(() {});
} catch (e) { } catch (e) {}
}
} }
} }
} }
class ChatFuncAction { class ChatFuncAction {
int index; int index;
String imId; String imId;
ChatFuncAction(this.index,this.imId); ChatFuncAction(this.index, this.imId);
} }

View File

@ -79,7 +79,8 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
child: Container( child: Container(
height: 40.sp, height: 40.sp,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColor.bgColor, gradient: LinearGradient(
colors: [Color(0xFF132B40), Color(0xFF251240)]),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.sp), topLeft: Radius.circular(10.sp),
topRight: Radius.circular(10.sp))), topRight: Radius.circular(10.sp))),
@ -87,7 +88,6 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
children: [ children: [
Container(width: Get.width, height: 40.sp), Container(width: Get.width, height: 40.sp),
// "intimacy" -> 2315
Container( Container(
margin: EdgeInsets.only(left: 110.sp), margin: EdgeInsets.only(left: 110.sp),
child: Text( child: Text(
@ -145,18 +145,26 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
), ),
Container( Container(
height: 10.sp, height: 10.sp,
color: AppColor.bgColor, decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Color(0xFF132B40), Color(0xFF251240)]),
),
), ),
Container( Container(
color: AppColor.bgColor, // color: AppColor.bgColor,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Color(0xFF132B40), Color(0xFF251240)]),
),
child: Column( child: Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.all(10.sp), margin: EdgeInsets.all(10.sp),
padding: EdgeInsets.all(10.sp), padding: EdgeInsets.all(10.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( color: AppColor.bgColor,
colors: [Color(0xFF132B40), Color(0xFF251240)]), // gradient: LinearGradient(
// colors: [Color(0xFF132B40), Color(0xFF251240)]),
borderRadius: BorderRadius.circular(10.sp)), borderRadius: BorderRadius.circular(10.sp)),
child: Column( child: Column(
children: [ children: [
@ -295,7 +303,10 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
), ),
Expanded( Expanded(
child: Container( child: Container(
color: AppColor.bgColor, decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Color(0xFF132B40), Color(0xFF251240)]),
),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
// rewardConfs // rewardConfs
@ -306,7 +317,10 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
), ),
)), )),
Container( Container(
color: AppColor.bgColor, decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Color(0xFF132B40), Color(0xFF251240)]),
),
height: 10.sp + MediaQuery.of(context).padding.bottom, height: 10.sp + MediaQuery.of(context).padding.bottom,
) )
], ],
@ -319,7 +333,7 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
actionWidget(Map info) { actionWidget(Map info) {
return Container( return Container(
color: AppColor.bgColor, // color: AppColor.bgColor,
padding: EdgeInsets.only(top: 20.sp, left: 15.sp, right: 15.sp), padding: EdgeInsets.only(top: 20.sp, left: 15.sp, right: 15.sp),
child: Row( child: Row(
children: [ children: [

View File

@ -1175,7 +1175,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
SizedBox( SizedBox(
height: 72.sp, height: 72.sp,
child: Row( child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
GestureDetector( GestureDetector(
onTap: ()async { onTap: ()async {
@ -1492,6 +1491,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
padding: EdgeInsets.only(left: 12.sp, right: 12.sp), padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 72.sp, height: 72.sp,

View File

@ -529,9 +529,9 @@ class _NewPeopleItemState extends State<NewPeopleItem> {
// 7-n个圈子发布n喊话**--**-** // 7-n个圈子发布n喊话**--**-**
item.vip == 2 item.vip == 2
? '成为「年VIP」' ? '通过开通年度会员成为「年VIP」'
: item.isBacker == 1 : item.isBacker == 1
? '通过金主认证' ? '通过充值小票成为「金主」'
: item.lastAgentInterest : item.lastAgentInterest
.isNotEmpty .isNotEmpty
? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏' ? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏'
@ -556,7 +556,7 @@ class _NewPeopleItemState extends State<NewPeopleItem> {
1 1
? '填写了联系方式' ? '填写了联系方式'
: item.lastRankTopDesc.isNotEmpty : item.lastRankTopDesc.isNotEmpty
? '成为「${item.lastRankTopDesc}' ? '通过冲榜成为「${item.lastRankTopDesc}'
: '绑定了「${item.lastUserRelation}」关系', : '绑定了「${item.lastUserRelation}」关系',
style: TextStyle( style: TextStyle(

View File

@ -20,6 +20,7 @@ class _VideoItemWidgetState extends State<VideoItemWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
// color: Colors.red, // color: Colors.red,
width: Get.width - 120.sp, width: Get.width - 120.sp,
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: GestureDetector( child: GestureDetector(

View File

@ -286,18 +286,19 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
logic.update(); logic.update();
} else if (int.parse(event) == 8) { } else if (int.parse(event) == 8) {
// //
Map jump = jsonDecode(jsonData['content']);
if (jump.containsKey('jumpInfo')) {
Map jumpInfo = jsonDecode(jump['jumpInfo']);
if (jumpInfo['scene'] == 'receive_user_welfare' || jumpInfo['scene'] ==
'watch_free_castle_gift' || jumpInfo['scene'] == 'visit_big_backer') {
EventBusManager.fire(CallOutAtionTipClass(jump));
}
}
if (Get.isRegistered<World_call_outLogic>()) { if (Get.isRegistered<World_call_outLogic>()) {
World_call_outLogic logic = Get.find<World_call_outLogic>(); World_call_outLogic logic = Get.find<World_call_outLogic>();
logic.isNewMsg = true; logic.isNewMsg = true;
logic.update(); logic.update();
Map jump = jsonDecode(jsonData['content']);
if (jump.containsKey('jumpInfo')) {
Map jumpInfo = jsonDecode(jump['jumpInfo']);
if (jumpInfo['scene'] == 'receive_user_welfare' || jumpInfo['scene'] ==
'watch_free_castle_gift') {
EventBusManager.fire(CallOutAtionTipClass(jump));
}
}
if (jump['content'].toString().contains('一个福袋')) { if (jump['content'].toString().contains('一个福袋')) {
logic.loadBannerData(); logic.loadBannerData();
@ -555,7 +556,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
data['data']['account_id'].toString(), data['data']['user_sig']); data['data']['account_id'].toString(), data['data']['user_sig']);
accountId = data['data']['account_id'].toString(); accountId = data['data']['account_id'].toString();
} else { } else {
if (Get.currentRoute != Routes.Login) { if (Get.currentRoute != Routes.Login || data['code'] > 5000) {
getIMData(); getIMData();
} }
} }
@ -752,7 +753,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
} }
void awaitShowLikeRecomandDialog() { void awaitShowLikeRecomandDialog() {
// Future.delayed(Duration(seconds: 1), () async { // Future.delayed(Duration(seconds: 30), () async {
// var data = await DioManager.instance.get( // var data = await DioManager.instance.get(
// url: Api.recommendLikeList, // url: Api.recommendLikeList,
// ); // );

View File

@ -61,6 +61,10 @@ class _HomePageState extends State<HomePage>
vsync: this, vsync: this,
initialIndex: 0, initialIndex: 0,
animationDuration: Duration.zero); animationDuration: Duration.zero);
addSub();
}
void addSub() {
sub = EventBusManager.on<ShowGiftNotifi>().listen((event) { sub = EventBusManager.on<ShowGiftNotifi>().listen((event) {
var info = event.info; var info = event.info;
showGiftButtonOverlay(context!, info['msg'], info['fromUser'], info['toUser'], () { showGiftButtonOverlay(context!, info['msg'], info['fromUser'], info['toUser'], () {
@ -121,8 +125,8 @@ class _HomePageState extends State<HomePage>
sub1.cancel(); sub1.cancel();
giftAnimationNotifySub.cancel(); giftAnimationNotifySub.cancel();
callOutActionNotifySub.cancel(); callOutActionNotifySub.cancel();
// permissionNotifySub.canel(); permissionNotifySub.cancel();
permissionCloseNotifySub.cancel();
routeObserver.unsubscribe(this); routeObserver.unsubscribe(this);
} }
@ -341,6 +345,7 @@ class _HomePageState extends State<HomePage>
void showFloatingCallOutActionOverlay( void showFloatingCallOutActionOverlay(
Map info Map info
) { ) {
if (Get.currentRoute == Routes.Chat) return;
OverlayState? overlayState = Overlay.of(context); OverlayState? overlayState = Overlay.of(context);
late OverlayEntry overlayEntry; late OverlayEntry overlayEntry;
bool showMessage = false; bool showMessage = false;
@ -385,15 +390,18 @@ class _HomePageState extends State<HomePage>
try { try {
overlayEntry!.remove(); overlayEntry!.remove();
} catch (e) {} } catch (e) {}
if (action == '立即拜访') {
Get.until((route) => route.isFirst); Get.toNamed(Routes.UserInfoPage,arguments:info['userId'].toString());
logic.updateIndex(2); } else {
World_call_outLogic calloutLogic = Get.find<World_call_outLogic>(); Get.until((route) => route.isFirst);
calloutLogic.isNewMsg = false; logic.updateIndex(2);
calloutLogic.index = 1; World_call_outLogic calloutLogic = Get.find<World_call_outLogic>();
calloutLogic.isMore = true; calloutLogic.isNewMsg = false;
calloutLogic.refreshController.resetNoData(); calloutLogic.index = 1;
calloutLogic.loadData(); calloutLogic.isMore = true;
calloutLogic.refreshController.resetNoData();
calloutLogic.loadData();
}
}, },
child: Container( child: Container(
width: Get.width - 8, width: Get.width - 8,
@ -412,40 +420,29 @@ class _HomePageState extends State<HomePage>
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
// direction: Axis.vertical, // direction: Axis.vertical,
children: [ children: [
GestureDetector( Row(
onTap: () { children: [
countdownTimer.cancel(); ClipOval(
try { child: CachedImg(
overlayEntry!.remove(); fit: BoxFit.cover,
} catch (e) {} imageUrl: info['avatarUrl'],
// "userId" -> 30629 width: 30.sp,
Get.toNamed(Routes.UserInfoPage,arguments:info['userId'].toString()); height: 30.sp,
}, ),
child: Row( ),
children: [ SizedBox(width: 2.sp,),
ClipOval( Container(
child: CachedImg( // width: 70.sp,
fit: BoxFit.cover, child: Text(
// "avatarUrl" -> "https://qiniuyun.ikuayou.com/ky_user_info_avatar/202401/sk1Y2_pT52gc1L3vimage_picker_82A96698-792D-4..." info['nickname'],
imageUrl: info['avatarUrl'], overflow: TextOverflow.ellipsis,
width: 30.sp, style: TextStyle(
height: 30.sp, color: AppColor.mainColor,
fontSize: 14.sp,
), ),
), ),
SizedBox(width: 2.sp,), ),
Container( ],
// width: 70.sp,
child: Text(
info['nickname'],
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: AppColor.mainColor,
fontSize: 14.sp,
),
),
),
],
),
), ),
Container( Container(
// width: 70.sp, // width: 70.sp,

View File

@ -1,4 +1,3 @@
import 'dart:convert'; import 'dart:convert';
import 'package:app_settings/app_settings.dart'; import 'package:app_settings/app_settings.dart';
@ -30,11 +29,10 @@ class Complete_materialLogic extends GetxController {
@override @override
void onReady() { void onReady() {
// TODO: implement onReady // TODO: implement onReady
// FlutterNativeSplash.remove(); // FlutterNativeSplash.remove();
super.onReady(); super.onReady();
} }
final Complete_materialState state = Complete_materialState(); final Complete_materialState state = Complete_materialState();
final ImagePicker _picker = ImagePicker(); final ImagePicker _picker = ImagePicker();
var type = Get.arguments ?? ""; var type = Get.arguments ?? "";
@ -49,7 +47,7 @@ class Complete_materialLogic extends GetxController {
int unLockWxNum = 0; int unLockWxNum = 0;
Map wxStatusInfo = {}; Map wxStatusInfo = {};
Map wxInfo = {};
late ConfigBean configBean; late ConfigBean configBean;
List<MyConfigData> numbers = []; List<MyConfigData> numbers = [];
@ -63,7 +61,7 @@ class Complete_materialLogic extends GetxController {
List<Province> provinceList = []; List<Province> provinceList = [];
List<int> genderTagList = [];// List<int> genderTagList = []; //
List<SysTag> watchGenderList = []; List<SysTag> watchGenderList = [];
Map cityMap = {}; Map cityMap = {};
@ -73,16 +71,16 @@ class Complete_materialLogic extends GetxController {
FlutterNativeSplash.remove(); FlutterNativeSplash.remove();
await loadCofigData(); await loadCofigData();
getCityList(); getCityList();
if(type!=''){ if (type != '') {
loadWXEditStatus(); loadWXEditStatus();
var data = await DioManager.instance.get(url: Api.getUserInfo); var data = await DioManager.instance.get(url: Api.getUserInfo);
var bean = BaseResponse<ResponseBean>.fromJson( var bean = BaseResponse<ResponseBean>.fromJson(
data, (data) => ResponseBean.fromJson(data)); data, (data) => ResponseBean.fromJson(data));
if(bean.isSuccess()){ if (bean.isSuccess()) {
unLockWxNum = bean.data.unLockWxNum; unLockWxNum = bean.data.unLockWxNum;
userInfoBean = bean.data.user; userInfoBean = bean.data.user;
state.wxEditingController.text = userInfoBean!.wx_num ; state.wxEditingController.text = userInfoBean!.wx_num;
state.nickName = userInfoBean!.nickname; state.nickName = userInfoBean!.nickname;
state.sex = getGenderStr(userInfoBean!.gender); state.sex = getGenderStr(userInfoBean!.gender);
state.genderId = userInfoBean!.gender.toString(); state.genderId = userInfoBean!.gender.toString();
@ -97,7 +95,6 @@ class Complete_materialLogic extends GetxController {
element.isSelect = true; element.isSelect = true;
} }
}); });
} }
state.orientationId = userInfoBean!.orientation.toString(); state.orientationId = userInfoBean!.orientation.toString();
state.textEditingController.text = userInfoBean!.nickname; state.textEditingController.text = userInfoBean!.nickname;
@ -105,50 +102,57 @@ class Complete_materialLogic extends GetxController {
state.descEditingController.text = userInfoBean!.signature; state.descEditingController.text = userInfoBean!.signature;
headUrl = userInfoBean!.avatar; headUrl = userInfoBean!.avatar;
userInfoBean!.interests.forEach((element) { userInfoBean!.interests.forEach((element) {
numbers.add(MyConfigData(element.id.toString(),element.title,false)); numbers
.add(MyConfigData(element.id.toString(), element.title, false));
}); });
await loadMyWxInfoData();
update(); update();
// state.nickName = userInfoBean!.nickname; // state.nickName = userInfoBean!.nickname;
}else{ } else {
showOKToast(bean.msg); showOKToast(bean.msg);
} }
} else { } else {
watchGenderList[1].isSelect = true; watchGenderList[1].isSelect = true;
update(); update();
} }
}
loadMyWxInfoData() async {
var data =
await DioManager.instance.get(url: Api.mycontactConf, params: {});
if (data['code'] == 200) {
wxInfo = data['data'];
state.wxEditingController.text = wxInfo['contact'] ?? '';
contactType = wxInfo['contactType'] ?? 2;
}
} }
loadWXEditStatus() async { loadWXEditStatus() async {
var data = var data = await DioManager.instance.get(
await DioManager.instance.get(url: Api.checkWxNumState,); url: Api.checkWxNumState,
);
if (data['code'] == 200) { if (data['code'] == 200) {
// code 200 4000 32100 // code 200 4000 32100
// //
// BAN_ACTION(4000, "用户当前操作被禁止"), // BAN_ACTION(4000, "用户当前操作被禁止"),
// //
// NOTICE_UPDATE_WXNUM(32100, "填写/更新微信需要消耗{}小票哦"); // NOTICE_UPDATE_WXNUM(32100, "填写/更新微信需要消耗{}小票哦");
} else { } else {
wxStatusInfo['${data['code']}'] = data['msg']; wxStatusInfo['${data['code']}'] = data['msg'];
} }
} }
loadCofigData() async { loadCofigData() async {
var data = var data =
await DioManager.instance.get(url: Api.getqiniuToken, params: {}); await DioManager.instance.get(url: Api.getqiniuToken, params: {});
var bean = BaseResponse<QnTokenData>.fromJson( var bean = BaseResponse<QnTokenData>.fromJson(
data, (data) => QnTokenData.fromJson(data)); data, (data) => QnTokenData.fromJson(data));
if(bean.isSuccess()){ if (bean.isSuccess()) {
quToken = bean.data!.token.toString(); quToken = bean.data!.token.toString();
} }
var data1 = await DioManager.instance.get(url: Api.getConfig, params: {});
var data1 =
await DioManager.instance.get(url: Api.getConfig, params: {});
var bean1 = BaseResponse<ConfigBean>.fromJson( var bean1 = BaseResponse<ConfigBean>.fromJson(
data1, (data1) => ConfigBean.fromJson(data1)); data1, (data1) => ConfigBean.fromJson(data1));
configBean = bean1.data!; configBean = bean1.data!;
@ -192,36 +196,32 @@ class Complete_materialLogic extends GetxController {
} }
Future getImageFile() async { Future getImageFile() async {
checkPhotosStatus(); checkPhotosStatus();
try { try {
final XFile? pickedFile = await _picker.pickImage( final XFile? pickedFile = await _picker.pickImage(
source: ImageSource.gallery, source: ImageSource.gallery,
); );
if(null==pickedFile){ if (null == pickedFile) {
return; return;
} }
SmartDialog.showLoading(msg: '上传中'); SmartDialog.showLoading(msg: '上传中');
uploadImage(quToken,pickedFile!,ImgPath.USER_INFO_AVATAR,(result){ uploadImage(quToken, pickedFile!, ImgPath.USER_INFO_AVATAR, (result) {
SmartDialog.dismiss(force: true); SmartDialog.dismiss(force: true);
headUrl = result; headUrl = result;
update(); update();
}); });
} catch (e) { } catch (e) {
SmartDialog.dismiss(); SmartDialog.dismiss();
print(e); print(e);
PlatformException? exception = e as PlatformException?; PlatformException? exception = e as PlatformException?;
// invalid_image // invalid_image
if(exception!.code == 'invalid_image') { if (exception!.code == 'invalid_image') {
showOKToast('不支持的图片格式,请另外选择图片'); showOKToast('不支持的图片格式,请另外选择图片');
} }
} }
} }
checkInfo() async { checkInfo() async {
FocusManager.instance.primaryFocus?.unfocus(); FocusManager.instance.primaryFocus?.unfocus();
if (headUrl == '') { if (headUrl == '') {
@ -232,10 +232,10 @@ class Complete_materialLogic extends GetxController {
showOKToast('请输入您的昵称'); showOKToast('请输入您的昵称');
focusNickNode.requestFocus(); focusNickNode.requestFocus();
return; return;
} else if(state.textEditingController.text.length < 2){ } else if (state.textEditingController.text.length < 2) {
showOKToast('昵称不能低于两个字'); showOKToast('昵称不能低于两个字');
return; return;
} else if(state.textEditingController.text.length > 6){ } else if (state.textEditingController.text.length > 6) {
showOKToast('昵称最多输入6个字'); showOKToast('昵称最多输入6个字');
return; return;
} }
@ -258,7 +258,7 @@ class Complete_materialLogic extends GetxController {
return; return;
} else if (numbers.isEmpty) { } else if (numbers.isEmpty) {
showOKToast('请选择您的兴趣圈子'); showOKToast('请选择您的兴趣圈子');
return; return;
} else if (state.descEditingController.text.isEmpty) { } else if (state.descEditingController.text.isEmpty) {
showOKToast('请输入您的交友宣言'); showOKToast('请输入您的交友宣言');
focusNode.requestFocus(); focusNode.requestFocus();
@ -267,7 +267,7 @@ class Complete_materialLogic extends GetxController {
showOKToast('您的交友宣言太短'); showOKToast('您的交友宣言太短');
focusNode.requestFocus(); focusNode.requestFocus();
return; return;
} else if (state.descEditingController.text.length > 40) { } else if (state.descEditingController.text.length > 40) {
showOKToast('您的交友宣言超出40个字啦'); showOKToast('您的交友宣言超出40个字啦');
focusNode.requestFocus(); focusNode.requestFocus();
return; return;
@ -276,17 +276,17 @@ class Complete_materialLogic extends GetxController {
genderTagList.clear(); genderTagList.clear();
List tagIds = []; List tagIds = [];
watchGenderList.forEach((element) { watchGenderList.forEach((element) {
if(element.isSelect){ if (element.isSelect) {
tagIds.add(element.id); tagIds.add(element.id);
genderTagList.add(element.id); genderTagList.add(element.id);
} }
}); });
if(genderTagList.isEmpty){ if (genderTagList.isEmpty) {
// showOKToast("请点击选择你想认识的人"); // showOKToast("请点击选择你想认识的人");
// return; // return;
} }
// LatLng location = await getLocation(); // LatLng location = await getLocation();
List<String> interestsList = []; List<String> interestsList = [];
numbers.forEach((element) { numbers.forEach((element) {
interestsList.add(element.id); interestsList.add(element.id);
@ -294,7 +294,7 @@ class Complete_materialLogic extends GetxController {
if (state.brithday.isEmpty) { if (state.brithday.isEmpty) {
var date = PDuration.now(); var date = PDuration.now();
PDuration p = PDuration p =
PDuration(year: date.year! - 20, month: date.month, day: date.day); PDuration(year: date.year! - 20, month: date.month, day: date.day);
String month = p.month! < 10 ? '0${p.month!}' : p.month!.toString(); String month = p.month! < 10 ? '0${p.month!}' : p.month!.toString();
String day = p.day! < 10 ? '0${p.day!}' : p.day!.toString(); String day = p.day! < 10 ? '0${p.day!}' : p.day!.toString();
@ -302,19 +302,36 @@ class Complete_materialLogic extends GetxController {
state.brithday = time; state.brithday = time;
} }
if (state.wxEditingController.text.isNotEmpty) { if (state.wxEditingController.text.isNotEmpty) {
bool isPass = false; bool isPass = false;
if (state.wxEditingController.text.length == 11) { if (contactType == 2) {
RegExp exp = RegExp( if (state.wxEditingController.text.length == 11) {
r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$'); RegExp exp = RegExp(
isPass = exp.hasMatch(state.wxEditingController.text); r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$');
} isPass = exp.hasMatch(state.wxEditingController.text);
}
if (state.wxEditingController.text.isNotEmpty && !isPass) { if (state.wxEditingController.text.isNotEmpty && !isPass) {
RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$'); RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
if (!wxReg.hasMatch(state.wxEditingController.text)) { if (!wxReg.hasMatch(state.wxEditingController.text)) {
showOKToast('请输入正确的微信号'); showOKToast('请输入正确的微信号');
return;
}
}
} else if (contactType == 3) {
isPass = isValidQQ(state.wxEditingController.text);
if (!isPass) {
showOKToast('请输入正确的QQ号');
return;
}
} else if (contactType == 1) {
if (state.wxEditingController.text.length == 11) {
RegExp exp = RegExp(
r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$');
isPass = exp.hasMatch(state.wxEditingController.text);
}
if (!isPass) {
showOKToast('请输入正确的手机号');
return; return;
} }
} }
@ -324,9 +341,12 @@ class Complete_materialLogic extends GetxController {
return; return;
} }
Map<String,dynamic> params = {
"hideContact": wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] : 0,
'contactType':contactType,
"contact": state.wxEditingController.text};
var result = await DioManager().postBody(url: Api.confset,params: params);
var result = await DioManager().post(url: Api.updateWxNum,params: {'type':2,'wxNum':state.wxEditingController.text});
if (result['code'] == 31201) { if (result['code'] == 31201) {
// showToast. // showToast.
showOKToast(result['msg']); showOKToast(result['msg']);
@ -340,16 +360,15 @@ class Complete_materialLogic extends GetxController {
print(result); print(result);
} }
bool isNickOK = await checkText(state.textEditingController,'昵称'); bool isNickOK = await checkText(state.textEditingController, '昵称');
if (!isNickOK) { if (!isNickOK) {
return; return;
} }
bool isDescOk = await checkText(state.descEditingController,'交友宣言'); bool isDescOk = await checkText(state.descEditingController, '交友宣言');
if (!isDescOk) { if (!isDescOk) {
return; return;
} }
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: { var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
'avatar_url': headUrl, 'avatar_url': headUrl,
'birthday': state.brithday, 'birthday': state.brithday,
@ -357,8 +376,8 @@ class Complete_materialLogic extends GetxController {
'role': state.roleId, //Int 'role': state.roleId, //Int
'interests': interestsList, // 'interests': interestsList, //
'orientation': state.orientationId, //Int 'orientation': state.orientationId, //Int
'city':state.city.isNotEmpty ? state.city : '上海市', 'city': state.city.isNotEmpty ? state.city : '上海市',
'orientations':genderTagList.isEmpty ? [2] : genderTagList, 'orientations': genderTagList.isEmpty ? [2] : genderTagList,
// 'lat': location.latitude, // 'lat': location.latitude,
// 'lng': location.longitude, // 'lng': location.longitude,
'nickname': state.textEditingController.text.trim(), 'nickname': state.textEditingController.text.trim(),
@ -367,7 +386,7 @@ class Complete_materialLogic extends GetxController {
var bean = BaseResponse<String>.fromJson(data, (data) => data); var bean = BaseResponse<String>.fromJson(data, (data) => data);
if (bean.code == 200) { if (bean.code == 200) {
Get.offAllNamed(Routes.Home); Get.offAllNamed(Routes.Home);
}else{ } else {
showOKToast(bean.msg); showOKToast(bean.msg);
} }
} }
@ -378,11 +397,11 @@ class Complete_materialLogic extends GetxController {
showOKToast('请输入您的昵称'); showOKToast('请输入您的昵称');
focusNickNode.requestFocus(); focusNickNode.requestFocus();
return; return;
} else if(state.textEditingController.text.length>6){ } else if (state.textEditingController.text.length > 6) {
showOKToast('昵称最多输入6个字'); showOKToast('昵称最多输入6个字');
focusNickNode.requestFocus(); focusNickNode.requestFocus();
return; return;
}else if (state.sex.isEmpty) { } else if (state.sex.isEmpty) {
showOKToast('请选择您的属性'); showOKToast('请选择您的属性');
return; return;
} else if (state.age.isEmpty) { } else if (state.age.isEmpty) {
@ -419,28 +438,48 @@ class Complete_materialLogic extends GetxController {
genderTagList.clear(); genderTagList.clear();
List tagIds = []; List tagIds = [];
watchGenderList.forEach((element) { watchGenderList.forEach((element) {
if(element.isSelect){ if (element.isSelect) {
tagIds.add(element.id); tagIds.add(element.id);
genderTagList.add(element.id); genderTagList.add(element.id);
} }
}); });
if(genderTagList.isEmpty){ if (genderTagList.isEmpty) {
showOKToast("请点击选择你想认识的人"); showOKToast("请点击选择你想认识的人");
return; return;
} }
if (state.wxEditingController.text.isNotEmpty && userInfoBean!.wx_num != state.wxEditingController.text) { if (state.wxEditingController.text.isNotEmpty &&
(userInfoBean!.wx_num != state.wxEditingController.text || contactType != (wxInfo['contactType'] ?? 2))) {
bool isPass = false; bool isPass = false;
if (state.wxEditingController.text.length == 11) { if (contactType == 2) {
RegExp exp = RegExp( if (state.wxEditingController.text.length == 11) {
r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$'); RegExp exp = RegExp(
isPass = exp.hasMatch(state.wxEditingController.text); r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$');
} isPass = exp.hasMatch(state.wxEditingController.text);
}
if (state.wxEditingController.text.isNotEmpty && !isPass) { if (state.wxEditingController.text.isNotEmpty && !isPass) {
RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$'); RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
if (!wxReg.hasMatch(state.wxEditingController.text)) { if (!wxReg.hasMatch(state.wxEditingController.text)) {
showOKToast('请输入正确的微信号'); showOKToast('请输入正确的微信号');
return;
}
}
} else if (contactType == 3) {
isPass = isValidQQ(state.wxEditingController.text);
if (!isPass) {
showOKToast('请输入正确的QQ号');
return;
}
} else if (contactType == 1) {
if (state.wxEditingController.text.length == 11) {
RegExp exp = RegExp(
r'^((13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$');
isPass = exp.hasMatch(state.wxEditingController.text);
}
if (!isPass) {
showOKToast('请输入正确的手机号');
return; return;
} }
} }
@ -450,9 +489,13 @@ class Complete_materialLogic extends GetxController {
return; return;
} }
Map<String,dynamic> params = {
"hideContact": wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] : 0,
'contactType':contactType,
"contact": state.wxEditingController.text};
var result = await DioManager().post(url: Api.updateWxNum,params: {'type':2,'wxNum':state.wxEditingController.text}); var result = await DioManager().postBody(url: Api.confset,params: params);
if (result['code'] == 31201) { if (result['code'] == 10081) {
// showToast. // showToast.
showOKToast(result['msg']); showOKToast(result['msg']);
showRechargeScreenDialog('set_contact'); showRechargeScreenDialog('set_contact');
@ -465,23 +508,21 @@ class Complete_materialLogic extends GetxController {
print(result); print(result);
} }
//TODO //TODO
// LatLng location = await getLocation(); // LatLng location = await getLocation();
List<String> interestsList = []; List<String> interestsList = [];
numbers.forEach((element) { numbers.forEach((element) {
interestsList.add(element.id); interestsList.add(element.id);
}); });
bool isNickOK = await checkText(state.textEditingController, '昵称');
bool isNickOK = await checkText(state.textEditingController,'昵称');
if (!isNickOK) { if (!isNickOK) {
return; return;
} }
bool isDescOk = await checkText(state.descEditingController,'交友宣言'); bool isDescOk = await checkText(state.descEditingController, '交友宣言');
if (!isDescOk) { if (!isDescOk) {
return; return;
} }
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: { var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
'avatar_url': headUrl, 'avatar_url': headUrl,
'birthday': state.brithday, 'birthday': state.brithday,
@ -489,8 +530,8 @@ class Complete_materialLogic extends GetxController {
'role': state.roleId, //Int 'role': state.roleId, //Int
'interests': interestsList, // 'interests': interestsList, //
'orientation': state.orientationId, //Int 'orientation': state.orientationId, //Int
'orientations':genderTagList, 'orientations': genderTagList,
'city':state.city, 'city': state.city,
// 'lat': location.latitude, // 'lat': location.latitude,
// 'lng': location.longitude, // 'lng': location.longitude,
'nickname': state.textEditingController.text, 'nickname': state.textEditingController.text,
@ -508,9 +549,6 @@ class Complete_materialLogic extends GetxController {
mineFragment.orientation = int.parse(state.orientationId); mineFragment.orientation = int.parse(state.orientationId);
mineFragment.update(); mineFragment.update();
Get.back(); Get.back();
} else { } else {
showOKToast(bean.msg); showOKToast(bean.msg);
} }

View File

@ -39,9 +39,9 @@ class LoginLogic extends GetxController {
// TODO: implement onInit // TODO: implement onInit
super.onInit(); super.onInit();
readClipboardData(); readClipboardData();
if (!kDebugMode) { // if (!kDebugMode) {
checkNetworkUrl(); // checkNetworkUrl();
} // }
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
String loginPhone = String loginPhone =
await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE) ?? await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE) ??

View File

@ -1,6 +1,7 @@
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:fluwx/fluwx.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
@ -115,6 +116,9 @@ class MinefragmentLogic extends GetxController {
loadDyanmicListData() async { loadDyanmicListData() async {
String requestUserId = ''; String requestUserId = '';
HomeLogic homeLogic = Get.find<HomeLogic>(); HomeLogic homeLogic = Get.find<HomeLogic>();
if (homeLogic.model == null) {
await homeLogic.loadMyInfoData();
}
requestUserId = homeLogic.model!.id.toString(); requestUserId = homeLogic.model!.id.toString();
var result = await DioManager.instance.get(url: Api.userTrends, var result = await DioManager.instance.get(url: Api.userTrends,

View File

@ -38,7 +38,7 @@ class _MyCallOutViewState extends State<MyCallOutView>
with AutomaticKeepAliveClientMixin { with AutomaticKeepAliveClientMixin {
@override @override
bool get wantKeepAlive => true; bool get wantKeepAlive => true;
HomeCallOutLogic? listsLg; UserHomeCallOutLogic? listsLg;
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
ScrollController scrollController = ScrollController(); ScrollController scrollController = ScrollController();
MinefragmentLogic logic = Get.find<MinefragmentLogic>(); MinefragmentLogic logic = Get.find<MinefragmentLogic>();
@ -70,8 +70,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
scrollController.jumpTo(0); scrollController.jumpTo(0);
}); });
Get.lazyPut(() => HomeCallOutLogic()); Get.lazyPut(() => UserHomeCallOutLogic());
listsLg = Get.find<HomeCallOutLogic>(); listsLg = Get.find<UserHomeCallOutLogic>();
listsLg?.loadCallOutListData(widget.userId); listsLg?.loadCallOutListData(widget.userId);
listsLg!.scrollController.addListener(() { listsLg!.scrollController.addListener(() {
@ -90,12 +90,12 @@ class _MyCallOutViewState extends State<MyCallOutView>
scrollController.dispose(); scrollController.dispose();
sub.cancel(); sub.cancel();
sub1.cancel(); sub1.cancel();
listsLg?.onClose(); // listsLg?.onClose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GetBuilder<HomeCallOutLogic>( return GetBuilder<UserHomeCallOutLogic>(
assignId: true, assignId: true,
builder: (listLogic) { builder: (listLogic) {
return listLogic.lists.isEmpty return listLogic.lists.isEmpty
@ -147,7 +147,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
Widget descText = logic.openCallOutIdList.contains(lists.id) Widget descText = logic.openCallOutIdList.contains(lists.id)
? Text( ? Text(
lists.content!, lists.content!,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, //
height: 1.8),
) )
: HideText( : HideText(
text: lists.content!, text: lists.content!,
@ -156,7 +157,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
: Get.width - 20.sp, : Get.width - 20.sp,
additionText: '查看更多', additionText: '查看更多',
maxLines: 15, maxLines: 15,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, //
height: 1.8),
additionStyle: additionStyle:
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp), TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
onTap: () { onTap: () {
@ -394,50 +396,56 @@ class _MyCallOutViewState extends State<MyCallOutView>
), ),
atWidget, atWidget,
Container( Container(
// color: Colors.red,
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
// margin: EdgeInsets.only(top: 4.sp), // margin: EdgeInsets.only(top: 4.sp),
child: descText, child: descText,
), ),
Container( Container(
height: picHeight, height: picHeight,
// color: Colors.blue,
margin: EdgeInsets.only(top: 5.sp), margin: EdgeInsets.only(top: 5.sp),
child: picHeight == 200.sp child: picHeight == 200.sp
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(6.sp), borderRadius: BorderRadius.circular(6.sp),
child: VideoItemWidget(lists.album![0]!.url!)) child: VideoItemWidget(lists.album![0]!.url!))
: GridView.builder( :MediaQuery.removePadding(
controller: scrollController, removeTop: true,
itemCount: lists.album!.length, context: context,
physics: const NeverScrollableScrollPhysics(), child: GridView.builder(
gridDelegate: controller: scrollController,
SliverGridDelegateWithFixedCrossAxisCount( itemCount: lists.album!.length,
crossAxisCount: 3, //widget physics: const NeverScrollableScrollPhysics(),
crossAxisSpacing: 8.sp, gridDelegate:
mainAxisSpacing: 8.sp, SliverGridDelegateWithFixedCrossAxisCount(
childAspectRatio: 0.8 //1widget crossAxisCount: 3, //widget
), crossAxisSpacing: 4.sp,
itemBuilder: (contentxt, currentIndex) { mainAxisSpacing: 4.sp,
Album album = lists.album![currentIndex]; childAspectRatio: 0.8 //1widget
return GestureDetector( ),
onTap: () { itemBuilder: (contentxt, currentIndex) {
var imgList = <String>[]; Album album = lists.album![currentIndex];
for (var element in lists.album!) { return GestureDetector(
imgList.add(element.url!); onTap: () {
} var imgList = <String>[];
Get.toNamed(Routes.SwiperPage, arguments: { for (var element in lists.album!) {
'imaglist': imgList, imgList.add(element.url!);
'index': currentIndex }
}); Get.toNamed(Routes.SwiperPage, arguments: {
}, 'imaglist': imgList,
child: ClipRRect( 'index': currentIndex
borderRadius: BorderRadius.circular(6.sp), });
child: CachedImg( },
imageUrl: album.url!, child: ClipRRect(
fit: BoxFit.cover, borderRadius: BorderRadius.circular(6.sp),
child: CachedImg(
imageUrl: album.url!,
fit: BoxFit.cover,
),
), ),
), );
); }),
}), ),
), ),
if (widget.userId.isEmpty) if (widget.userId.isEmpty)
Container( Container(
@ -481,7 +489,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
Widget descText = logic.openCallOutIdList.contains(lists.id) Widget descText = logic.openCallOutIdList.contains(lists.id)
? Text( ? Text(
lists.content!, lists.content!,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, //
height: 1.8),
) )
: HideText( : HideText(
text: lists.content!, text: lists.content!,
@ -490,9 +499,11 @@ class _MyCallOutViewState extends State<MyCallOutView>
: Get.width - 20.sp, : Get.width - 20.sp,
additionText: '查看更多', additionText: '查看更多',
maxLines: 15, maxLines: 15,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, //
height: 1.8),
additionStyle: additionStyle:
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp), TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
onTap: () { onTap: () {
logic.openCallOutIdList.add(lists.id); logic.openCallOutIdList.add(lists.id);
setState(() {}); setState(() {});
@ -558,6 +569,7 @@ class _MyCallOutViewState extends State<MyCallOutView>
} }
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 14.sp, bottom: 10.sp), margin: EdgeInsets.only(top: 14.sp, bottom: 10.sp),
@ -615,9 +627,10 @@ class _MyCallOutViewState extends State<MyCallOutView>
Container( Container(
// height: 130.sp + contentHeight(lists.content!) + picHeight, // height: 130.sp + contentHeight(lists.content!) + picHeight,
width: Get.width, width: Get.width,
// color: Colors.blue,
padding: EdgeInsets.only(left: 12.sp, right: 12.sp), padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
height: 72.sp, height: 72.sp,
@ -733,44 +746,48 @@ class _MyCallOutViewState extends State<MyCallOutView>
borderRadius: BorderRadius.circular(6.sp), borderRadius: BorderRadius.circular(6.sp),
child: child:
VideoItemWidget(lists.album![0].url!)) VideoItemWidget(lists.album![0].url!))
: GridView.builder( : MediaQuery.removePadding(
controller: scrollController, removeTop: true,
// shrinkWrap: true, context: context,
itemCount: lists.album!.length, child: GridView.builder(
physics: controller: scrollController,
const NeverScrollableScrollPhysics(), // shrinkWrap: true,
gridDelegate: itemCount: lists.album!.length,
SliverGridDelegateWithFixedCrossAxisCount( physics:
crossAxisCount: 3, //widget const NeverScrollableScrollPhysics(),
crossAxisSpacing: 8.sp, gridDelegate:
mainAxisSpacing: 8.sp, SliverGridDelegateWithFixedCrossAxisCount(
childAspectRatio: crossAxisCount: 3, //widget
0.8 //1widget crossAxisSpacing: 8.sp,
), mainAxisSpacing: 8.sp,
itemBuilder: (contentxt, currentIndex) { childAspectRatio:
Album album = lists.album![currentIndex]; 0.8 //1widget
return GestureDetector( ),
onTap: () { itemBuilder: (contentxt, currentIndex) {
var imgList = <String>[]; Album album = lists.album![currentIndex];
for (var element in lists.album!) { return GestureDetector(
imgList.add(element.url!); onTap: () {
} var imgList = <String>[];
Get.toNamed(Routes.SwiperPage, for (var element in lists.album!) {
arguments: { imgList.add(element.url!);
'imaglist': imgList, }
'index': currentIndex Get.toNamed(Routes.SwiperPage,
}); arguments: {
}, 'imaglist': imgList,
child: ClipRRect( 'index': currentIndex
borderRadius: });
BorderRadius.circular(6.sp), },
child: CachedImg( child: ClipRRect(
imageUrl: album.url!, borderRadius:
fit: BoxFit.cover, BorderRadius.circular(6.sp),
child: CachedImg(
imageUrl: album.url!,
fit: BoxFit.cover,
),
), ),
), );
); }),
})) ))
: Container(), : Container(),
if (widget.userId.isEmpty) if (widget.userId.isEmpty)
Container( Container(
@ -1227,3 +1244,5 @@ class _MyCallOutViewState extends State<MyCallOutView>
} }
} }
} }

View File

@ -412,10 +412,15 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
if (end > userIdList.length) { if (end > userIdList.length) {
end = userIdList.length; // end = userIdList.length; //
} }
try {
List<V2TimUserFullInfo> dataList = (await getUserListData(userIdList.sublist(start, end)))
.whereType<V2TimUserFullInfo>()
.toList();
List<V2TimUserFullInfo> dataList = await getUserListData( list.addAll(dataList);
userIdList.sublist(start, end)); } catch (e) {
list.addAll(dataList);
}
} }
return list; return list;
} else { } else {

View File

@ -113,6 +113,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
child: Swiper( child: Swiper(
autoplay: true, autoplay: true,
loop: true, loop: true,
autoplayDelay: 6000,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
Map item = controller.bannerList[index]; Map item = controller.bannerList[index];

View File

@ -1199,9 +1199,9 @@ class _LocationItemState extends State<LocationItem> {
// 7-n个圈子发布n喊话**--**-** // 7-n个圈子发布n喊话**--**-**
item.vip == 2 item.vip == 2
? '成为「年VIP' ? '通过开通年度会员成为「年VIP'
: item.isBacker == 1 : item.isBacker == 1
? '通过金主认证' ? '通过充值小票成为「金主」'
: item.lastAgentInterest : item.lastAgentInterest
.isNotEmpty .isNotEmpty
? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏' ? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏'
@ -1225,7 +1225,7 @@ class _LocationItemState extends State<LocationItem> {
1 1
? '填写了联系方式' ? '填写了联系方式'
: item.lastRankTopDesc.isNotEmpty : item.lastRankTopDesc.isNotEmpty
? '成为「${item.lastRankTopDesc}' ? '通过冲榜成为「${item.lastRankTopDesc}'
: '绑定了「${item.lastUserRelation}」关系', : '绑定了「${item.lastUserRelation}」关系',
style: TextStyle( style: TextStyle(

View File

@ -888,6 +888,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
), ),
), ),
), ),
if (logic.relationTypeList.isNotEmpty)
InkWell( InkWell(
onTap: () { onTap: () {
if (Get.isRegistered<Relationship_buildingLogic>()) { if (Get.isRegistered<Relationship_buildingLogic>()) {
@ -1128,7 +1129,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
} }
return Container( return Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 0, right: 10.sp), padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
height: 27.sp, height: 27.sp,
child: Row( child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -1342,7 +1343,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
// : // :
return Container( return Container(
// margin: EdgeInsets.only( 0.sp), // margin: EdgeInsets.only( 0.sp),
padding: EdgeInsets.symmetric(horizontal: 19.sp), padding: EdgeInsets.symmetric(horizontal: 10.sp),
child: Stack( child: Stack(
children: [ children: [
Column( Column(
@ -1424,7 +1425,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
controller.getImageFile(); controller.getImageFile();
}, },
child: Container( child: Container(
margin: EdgeInsets.all(5.sp), margin: EdgeInsets.all(2.5.sp),
child: Image( child: Image(
image: AssetImage( image: AssetImage(
getMineImage("icon_img_add")), getMineImage("icon_img_add")),
@ -1433,7 +1434,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
); );
} else { } else {
return Container( return Container(
margin: EdgeInsets.all(5.sp), margin: EdgeInsets.all(2.5.sp),
child: Center( child: Center(
child: _buildImageItem( child: _buildImageItem(
controller.state.imaglist[index - 1].url, controller.state.imaglist[index - 1].url,
@ -1446,7 +1447,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
} }
} else { } else {
return Container( return Container(
margin: EdgeInsets.all(5.sp), margin: EdgeInsets.all(2.5.sp),
child: Center( child: Center(
child: _buildImageItem( child: _buildImageItem(
controller.state.imaglist[index].urlThumb, controller.state.imaglist[index].urlThumb,

View File

@ -136,7 +136,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
Widget descText = logic.openCallOutIdList.contains(lists.id) Widget descText = logic.openCallOutIdList.contains(lists.id)
? Text( ? Text(
lists.content!, lists.content!,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, //
height: 1.8),
) )
: HideText( : HideText(
text: lists.content!, text: lists.content!,
@ -145,7 +146,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
: Get.width - 20.sp, : Get.width - 20.sp,
additionText: '查看更多', additionText: '查看更多',
maxLines: 15, maxLines: 15,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, //
height: 1.8),
additionStyle: additionStyle:
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp), TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
onTap: () { onTap: () {
@ -459,7 +461,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
Widget descText = logic.openCallOutIdList.contains(lists.id) Widget descText = logic.openCallOutIdList.contains(lists.id)
? Text( ? Text(
lists.content!, lists.content!,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, //
height: 1.8),
) )
: HideText( : HideText(
text: lists.content!, text: lists.content!,
@ -468,7 +471,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
: Get.width - 20.sp, : Get.width - 20.sp,
additionText: '查看更多', additionText: '查看更多',
maxLines: 15, maxLines: 15,
style: TextStyle(color: Colors.white, fontSize: 14.sp), style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, //
height: 1.8),
additionStyle: additionStyle:
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp), TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
onTap: () { onTap: () {
@ -584,6 +588,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
// color: Colors.blue, // color: Colors.blue,
padding: EdgeInsets.only(left: 12.sp, right: 12.sp), padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
child: Column( child: Column(
crossAxisAlignment:CrossAxisAlignment.start,
children: [ children: [
Container( Container(
height: 72.sp, height: 72.sp,

View File

@ -122,3 +122,8 @@ class HomeCallOutLogic extends GetxController {
} }
} }
} }
class UserHomeCallOutLogic extends HomeCallOutLogic {
}

View File

@ -181,7 +181,6 @@ class World_call_outLogic extends GetxController {
} }
DateTime? lastHourStartTime = null; //
List<String> result = []; List<String> result = [];
int subIndex = -1; int subIndex = -1;
for (int i = 0; i < tempLists.length; i++) { for (int i = 0; i < tempLists.length; i++) {

View File

@ -638,4 +638,7 @@ class Api {
// //
static const userIncomeTotal = '/mall-service/wallet/userIncomeTotal'; static const userIncomeTotal = '/mall-service/wallet/userIncomeTotal';
//
static const relationInvite = '/user-service/user/relation/invite';
} }

View File

@ -311,8 +311,8 @@ class DioManager {
} }
// //
var info = await FlutterBugly.uploadException( var info = await FlutterBugly.uploadException(
message: url + e.error.toString(), message: url + ':' + e.error.toString(),
detail: Platform.isIOS ? 'crash_attach.log' : 'extraMessage.txt', detail: e.message ?? '',
); );
print(info); print(info);
return {'code': 500, 'msg': '服务器开小差了,请重试'}; return {'code': 500, 'msg': '服务器开小差了,请重试'};
@ -324,7 +324,7 @@ class DioManager {
// //
var info = await FlutterBugly.uploadException( var info = await FlutterBugly.uploadException(
message: url + e.toString(), message: url + e.toString(),
detail: Platform.isIOS ? 'crash_attach.log' : 'extraMessage.txt', detail: '',
); );
// //
return {'code': 500, 'msg': '加载中...'}; return {'code': 500, 'msg': '加载中...'};

View File

@ -29,11 +29,9 @@ class _CachedImgState extends State<CachedImg> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return CachedNetworkImage( return CachedNetworkImage(
imageUrl: widget.imageUrl, imageUrl: widget.imageUrl,
fit: widget.fit, fit: widget.fit ?? BoxFit.cover,
width: widget.width, width: widget.width,
height: widget.height, height: widget.height,
useOldImageOnUrlChange:true,
memCacheWidth: Get.width.toInt(),
errorWidget: (context, url, error) => CachedNetworkImage( errorWidget: (context, url, error) => CachedNetworkImage(
imageUrl:Api.defaultAvatar, imageUrl:Api.defaultAvatar,
fit: BoxFit.cover, fit: BoxFit.cover,

View File

@ -1025,22 +1025,8 @@ sendApplyRelationTypeCustomMsg(String userId, String data, String desc) async {
// //
sendInventRelationTypeCustomMsg(String userId, String data, String desc) async { sendInventRelationTypeCustomMsg(String userId, String data, String desc) async {
// //
// V2TimValueCallback<V2TimMsgCreateInfoResult> createCustomMessageRes =
// await TencentImSDKPlugin.v2TIMManager
// .getMessageManager()
// .createCustomMessage(
// data: data,
// desc: desc,
// extension: 'InventRelationType',
// );
// if (createCustomMessageRes.code == 0) {
// String? id = createCustomMessageRes.data?.id;
// //
// EventBusManager.fire(SendCoustomMessage(createCustomMessageRes));
// }
Map info = jsonDecode(data); Map info = jsonDecode(data);
var result = await DioManager.instance.post(url: Api.relationTypeApply,params: {'type':2,'relationTypeId':info['typeId'],'targetId':userId.split('_').last});//extension var result = await DioManager.instance.post(url: Api.relationInvite,params: {'type':2,'relationTypeId':info['typeId'],'targetId':userId.split('_').last});//extension
if (result['code'] == 200) { if (result['code'] == 200) {
info['relationTypeId'] = result['data']; info['relationTypeId'] = result['data'];
data = jsonEncode(info); data = jsonEncode(info);
@ -1639,9 +1625,10 @@ pushPage(String action,String param,{String name = '',bool isShowUpdate = true})
} }
} else if (action == 'receive_user_welfare') { } else if (action == 'receive_user_welfare') {
if (Get.isRegistered<World_call_outLogic>()) {
World_call_outLogic logic = Get.find<World_call_outLogic>(); World_call_outLogic logic = Get.find<World_call_outLogic>();
logic.getWelfareDetailData(param,-1); logic.getWelfareDetailData(param,-1);
}
} else if (action == 'watch_free_castle_gift') { } else if (action == 'watch_free_castle_gift') {
World_call_outLogic logic = Get.find<World_call_outLogic>(); World_call_outLogic logic = Get.find<World_call_outLogic>();
logic.treatWatch(param); logic.treatWatch(param);

View File

@ -240,6 +240,7 @@ void showFloatingButtonOverlay(BuildContext context, String nickname,
void showGiftButtonOverlay(BuildContext context, String content, Map sendUser, void showGiftButtonOverlay(BuildContext context, String content, Map sendUser,
Map recevierUser, NoticeCallback noticeCallback) { Map recevierUser, NoticeCallback noticeCallback) {
if (Get.currentRoute == Routes.Chat) return;
OverlayState? overlayState = Overlay.of(context); OverlayState? overlayState = Overlay.of(context);
late OverlayEntry overlayEntry; late OverlayEntry overlayEntry;
bool showMessage = false; bool showMessage = false;
@ -463,6 +464,7 @@ void showGiftButtonOverlay(BuildContext context, String content, Map sendUser,
void showPeopleCallOutOverlay( void showPeopleCallOutOverlay(
BuildContext context, String content, NoticeCallback noticeCallback) { BuildContext context, String content, NoticeCallback noticeCallback) {
if (content == null) return; if (content == null) return;
if (Get.currentRoute == Routes.Chat) return;
OverlayState? overlayState = Overlay.of(context); OverlayState? overlayState = Overlay.of(context);
late OverlayEntry overlayEntry; late OverlayEntry overlayEntry;
bool showMessage = false; bool showMessage = false;