2.4.3代码提交
This commit is contained in:
parent
0687ee37f6
commit
730ec0f5cd
@ -71,8 +71,8 @@ android {
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode 85
|
||||
versionName "2.4.0"
|
||||
versionCode 87
|
||||
versionName "2.4.2"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
@ -45,6 +45,13 @@
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<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>
|
||||
<true/>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
|
||||
@ -37,6 +37,9 @@ class Call_outLogic extends GetxController {
|
||||
final Call_outState state = Call_outState();
|
||||
TextEditingController textEditingController = TextEditingController();
|
||||
ScrollController scrollController = ScrollController();
|
||||
|
||||
ScrollController allScrollController = ScrollController();
|
||||
ScrollController textscrollController = ScrollController();
|
||||
bool isCheck = false;
|
||||
late ConfigBean configBean;
|
||||
String circleName = "";
|
||||
@ -335,7 +338,7 @@ class Call_outLogic extends GetxController {
|
||||
// String outputPath = path+"ceshishuiyin";
|
||||
// File(outputPath).writeAsBytesSync(img.encodeJpg(watermarkedImage));
|
||||
|
||||
SmartDialog.showLoading();
|
||||
SmartDialog.showLoading(msg: '上传中');
|
||||
uploadImage(quToken, pickedFile!, ImgPath.CALL_OUT_IMAGE, (result) {
|
||||
SmartDialog.dismiss();
|
||||
state.imaglist.add(result);
|
||||
@ -387,12 +390,13 @@ class Call_outLogic extends GetxController {
|
||||
if (null == pickedFile) {
|
||||
return;
|
||||
}
|
||||
SmartDialog.showLoading();
|
||||
SmartDialog.showLoading(msg: '上传中');
|
||||
// var path = await getApplicationSupportDirectoryPath();
|
||||
videoPlayerController = VideoPlayerController.file(
|
||||
File(pickedFile.path),
|
||||
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
|
||||
);
|
||||
|
||||
await videoPlayerController?.initialize();
|
||||
final Duration videoDuration = videoPlayerController!.value.duration;
|
||||
final double durationInSeconds = videoDuration.inSeconds.toDouble();
|
||||
@ -417,57 +421,8 @@ class Call_outLogic extends GetxController {
|
||||
}
|
||||
} 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 {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -359,7 +359,6 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_openEmojiPanel() {
|
||||
widget.onCursorChange();
|
||||
showKeyboard = showEmojiPanel;
|
||||
@ -542,13 +541,13 @@ class _TIMTextFieldLayoutNarrowState
|
||||
showSendSoundText = !showSendSoundText;
|
||||
});
|
||||
} else {
|
||||
|
||||
//未授权则发起一次申请
|
||||
if (Platform.isAndroid && !isShowVoiceOverLay) {
|
||||
EventBusManager.fire(PermissionInfo('麦克风权限申请说明', '为了发送语音消息,需要获取麦克风权限'));
|
||||
EventBusManager.fire(PermissionInfo(
|
||||
'麦克风权限申请说明', '为了发送语音消息,需要获取麦克风权限'));
|
||||
}
|
||||
var data =
|
||||
await Permission.microphone.request();
|
||||
await Permission.microphone.request();
|
||||
if (Platform.isAndroid) {
|
||||
isShowVoiceOverLay = true;
|
||||
EventBusManager.fire(PermissionClose());
|
||||
@ -629,7 +628,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
: TextInputAction
|
||||
.send,
|
||||
onEditingComplete: () {
|
||||
widget.onSubmitted();
|
||||
widget.onSubmitted();
|
||||
if (showKeyboard) {
|
||||
widget.focusNode
|
||||
.requestFocus();
|
||||
@ -751,9 +750,10 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
getImageFile();
|
||||
},
|
||||
child:
|
||||
Opacity(opacity: 0.75,
|
||||
child: Image.asset(getMsgImage('photo'), width: 40.sp)),
|
||||
child: Opacity(
|
||||
opacity: 0.75,
|
||||
child: Image.asset(getMsgImage('photo'),
|
||||
width: 40.sp)),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
@ -764,8 +764,9 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
getTakeImageFile();
|
||||
},
|
||||
child: Opacity(opacity: 0.75,
|
||||
child: Image.asset(getMsgImage('take_photo'),
|
||||
child: Opacity(
|
||||
opacity: 0.75,
|
||||
child: Image.asset(getMsgImage('take_photo'),
|
||||
width: 40.sp),
|
||||
),
|
||||
),
|
||||
@ -792,7 +793,8 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
getVideoFile(ImageSource.gallery);
|
||||
},
|
||||
child: Opacity(opacity: 0.75,
|
||||
child: Opacity(
|
||||
opacity: 0.75,
|
||||
child: Image.asset(getMsgImage('icon_video'),
|
||||
width: 40.sp),
|
||||
),
|
||||
@ -806,7 +808,8 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
getVideoFile(ImageSource.camera);
|
||||
},
|
||||
child: Opacity(opacity: 0.75,
|
||||
child: Opacity(
|
||||
opacity: 0.75,
|
||||
child: Image.asset(getMsgImage('icon_video_camera'),
|
||||
width: 40.sp),
|
||||
),
|
||||
@ -864,17 +867,19 @@ class _TIMTextFieldLayoutNarrowState
|
||||
_showIsCancelBlackDialog(context);
|
||||
return;
|
||||
}
|
||||
var reulst1 =
|
||||
await DioManager.instance.get(url: Api.canMsgRandOne + widget.conversationID.split('_').last);
|
||||
var reulst1 = await DioManager.instance.get(
|
||||
url: Api.canMsgRandOne +
|
||||
widget.conversationID.split('_').last);
|
||||
if (reulst1['code'] == 200) {
|
||||
var reulst =
|
||||
await DioManager.instance.get(url: Api.msgRandOne);
|
||||
var reulst = await DioManager.instance
|
||||
.get(url: Api.msgRandOne);
|
||||
String text = reulst['data'];
|
||||
var result = await widget.model.sendTextMessage(
|
||||
text: text,
|
||||
convID: widget.conversationID,
|
||||
convType: ConvType.c2c);
|
||||
sendHotAction(1, widget.conversationID.split('_').last);
|
||||
sendHotAction(
|
||||
1, widget.conversationID.split('_').last);
|
||||
} else {
|
||||
showOKToast(reulst1['msg']);
|
||||
}
|
||||
@ -896,7 +901,9 @@ class _TIMTextFieldLayoutNarrowState
|
||||
enableDrag: false);
|
||||
}),
|
||||
if (userInfoBean != null && logic.isProd)
|
||||
userInfoBean!.contact.isNotEmpty ? chatWxActionWidget() : chatWantWxActionWidget()
|
||||
userInfoBean!.contact.isNotEmpty
|
||||
? chatWxActionWidget()
|
||||
: chatWantWxActionWidget()
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -908,7 +915,10 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
|
||||
opacityWidget(Widget child) {
|
||||
return Opacity(opacity: 0.75,child: widget,);
|
||||
return Opacity(
|
||||
opacity: 0.75,
|
||||
child: widget,
|
||||
);
|
||||
}
|
||||
|
||||
chatActionWidget(String img, String action, GestureTapCallback onTap) {
|
||||
@ -931,7 +941,8 @@ class _TIMTextFieldLayoutNarrowState
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset( getMsgImage(img),
|
||||
Image.asset(
|
||||
getMsgImage(img),
|
||||
width: 20.sp,
|
||||
),
|
||||
SizedBox(
|
||||
@ -947,12 +958,15 @@ class _TIMTextFieldLayoutNarrowState
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
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(
|
||||
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) {
|
||||
showOKToast('已提醒对方填写');
|
||||
} else {
|
||||
@ -960,7 +974,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width:115.sp,
|
||||
width: 115.sp,
|
||||
height: 28.sp,
|
||||
margin: EdgeInsets.only(right: 4.sp),
|
||||
alignment: Alignment.center,
|
||||
@ -990,7 +1004,6 @@ class _TIMTextFieldLayoutNarrowState
|
||||
'想要联系方式',
|
||||
style: TextStyle(color: Colors.white, fontSize: 13.sp),
|
||||
),
|
||||
|
||||
],
|
||||
)),
|
||||
),
|
||||
@ -998,17 +1011,24 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
|
||||
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(
|
||||
onTap: () async {
|
||||
if (unLockWxNum != 1) {
|
||||
var result = await DioManager().post(url: Api.unlockStatus,params: {'targetUserId':userInfoBean!.id!});
|
||||
if (unLockWxNum != 1) {
|
||||
var result = await DioManager().post(
|
||||
url: Api.unlockStatus,
|
||||
params: {'targetUserId': userInfoBean!.id!});
|
||||
if (result['code'] == 200) {
|
||||
int price = result['data']['unlockPrice'];
|
||||
int residueUnlockNum = result['data']['residueUnlockNum'];
|
||||
if (price > 0 && (residueUnlockNum == -1 || residueUnlockNum > 0)) {
|
||||
Get.bottomSheet(UnlockWxTip(userInfoBean!.id.toString(), userInfoBean!.avatar,false),
|
||||
isScrollControlled: true, enableDrag: false)
|
||||
Get.bottomSheet(
|
||||
UnlockWxTip(userInfoBean!.id.toString(),
|
||||
userInfoBean!.avatar, false),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false)
|
||||
.then((value) {
|
||||
if (value != null) {
|
||||
sendHotAction(3, userInfoBean!.id.toString());
|
||||
@ -1016,24 +1036,31 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
});
|
||||
} else if (price > 0) {
|
||||
Get.bottomSheet(UnlockWxTip(userInfoBean!.id.toString(), userInfoBean!.avatar,true),
|
||||
isScrollControlled: true, enableDrag: true)
|
||||
Get.bottomSheet(
|
||||
UnlockWxTip(userInfoBean!.id.toString(),
|
||||
userInfoBean!.avatar, true),
|
||||
isScrollControlled: true,
|
||||
enableDrag: true)
|
||||
.then((value) {
|
||||
if (value != null) {
|
||||
loadUserData();
|
||||
sendHotAction(3, userInfoBean!.id.toString());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var result = await DioManager()
|
||||
.post(url: Api.unlockWx, params: {'targetUserId': userInfoBean!.id});
|
||||
} else {
|
||||
var result = await DioManager().post(
|
||||
url: Api.unlockWx,
|
||||
params: {'targetUserId': userInfoBean!.id});
|
||||
if (result['code'] == 200) {
|
||||
showOKToast('解锁成功');
|
||||
sendHotAction(3, userInfoBean!.id.toString());
|
||||
loadUserData();
|
||||
} else {
|
||||
Get.bottomSheet(UnlockWxTip(userInfoBean!.id.toString(), userInfoBean!.avatar,true),
|
||||
isScrollControlled: true, enableDrag: false)
|
||||
Get.bottomSheet(
|
||||
UnlockWxTip(userInfoBean!.id.toString(),
|
||||
userInfoBean!.avatar, true),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false)
|
||||
.then((value) {
|
||||
if (value != null) {
|
||||
loadUserData();
|
||||
@ -1046,7 +1073,8 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: textWidth + (userInfoBean!.contact!.contains('*')? 50.sp : 30.sp),
|
||||
width:
|
||||
textWidth + (userInfoBean!.contact!.contains('*') ? 50.sp : 30.sp),
|
||||
height: 28.sp,
|
||||
margin: EdgeInsets.only(right: 4.sp),
|
||||
alignment: Alignment.center,
|
||||
@ -1066,7 +1094,11 @@ class _TIMTextFieldLayoutNarrowState
|
||||
width: 4.sp,
|
||||
),
|
||||
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,
|
||||
),
|
||||
SizedBox(
|
||||
@ -1100,24 +1132,21 @@ class _TIMTextFieldLayoutNarrowState
|
||||
|
||||
int code = data['code'];
|
||||
if (code == 200) {
|
||||
try {
|
||||
var result =
|
||||
await DioManager.instance.get(url: Api.adImstate + widget.conversationID.split('_').last);
|
||||
if (result['code'] == 21201) {
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(false,'chat'),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
imStatusOK = false;
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
|
||||
}
|
||||
try {
|
||||
var result = await DioManager.instance
|
||||
.get(url: Api.adImstate + widget.conversationID.split('_').last);
|
||||
if (result['code'] == 21201) {
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(false, 'chat'),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
imStatusOK = false;
|
||||
return false;
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
imStatusOK = true;
|
||||
} else {
|
||||
@ -1125,7 +1154,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(false,'chat'),
|
||||
body: Open_vip_tipPage(false, 'chat'),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
@ -1160,20 +1189,29 @@ class _TIMTextFieldLayoutNarrowState
|
||||
if (widget.userId?.contains('qpqz_prod_10_') ?? false) {
|
||||
return true;
|
||||
}
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.getIsVips,params: {'plate':plate,'targetId':widget.userId!.split('_').last});
|
||||
var data = await DioManager.instance.get(
|
||||
url: Api.getIsVips,
|
||||
params: {'plate': plate, 'targetId': widget.userId!.split('_').last});
|
||||
|
||||
if (data['code'] == 200) {
|
||||
isVip = !data['data'];
|
||||
}
|
||||
|
||||
if (!isVip) {
|
||||
showOKToast(plate== 5 ? '开通会员之后才能发送语音' : (plate == 1 || plate == 3) ? '开通会员之后才能发送图片' : '开通会员之后才能发送视频');
|
||||
String source = plate== 5 ? 'chat_send_voice' : (plate == 1 || plate == 3) ? 'chat_send_photo' : 'chat_send_video';
|
||||
showOKToast(plate == 5
|
||||
? '开通会员之后才能发送语音'
|
||||
: (plate == 1 || plate == 3)
|
||||
? '开通会员之后才能发送图片'
|
||||
: '开通会员之后才能发送视频');
|
||||
String source = plate == 5
|
||||
? 'chat_send_voice'
|
||||
: (plate == 1 || plate == 3)
|
||||
? 'chat_send_photo'
|
||||
: 'chat_send_video';
|
||||
Get.bottomSheet(
|
||||
Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Open_vip_tipPage(false,source),
|
||||
body: Open_vip_tipPage(false, source),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
@ -1184,8 +1222,6 @@ class _TIMTextFieldLayoutNarrowState
|
||||
return isVip;
|
||||
}
|
||||
|
||||
|
||||
|
||||
addChatRecord(String msgContent, String msgId, String sendTime) async {
|
||||
String str = DateTime.now().toString().split('.').first;
|
||||
|
||||
@ -1213,7 +1249,6 @@ class _TIMTextFieldLayoutNarrowState
|
||||
await requestStoragePermission();
|
||||
}
|
||||
|
||||
|
||||
XFile? pickedFile;
|
||||
String? thumbnailPath; // 声明 thumbnailPath 变量
|
||||
|
||||
@ -1298,7 +1333,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
if (!isOK) {
|
||||
return;
|
||||
}
|
||||
checkPhotosStatus();
|
||||
checkPhotosStatus();
|
||||
try {
|
||||
final XFile? pickedFile = await _picker.pickImage(
|
||||
source: ImageSource.gallery,
|
||||
@ -1432,7 +1467,7 @@ class _TIMTextFieldLayoutNarrowState
|
||||
child: Text(
|
||||
"是否解除拉黑",
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
@ -1495,14 +1530,16 @@ class _TIMTextFieldLayoutNarrowState
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
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(
|
||||
data,
|
||||
(jsonData) => jsonData,
|
||||
(jsonData) => jsonData,
|
||||
);
|
||||
if (bean.isSuccess()) {
|
||||
final FriendshipServices _friendshipServices =
|
||||
serviceLocator<FriendshipServices>();
|
||||
serviceLocator<FriendshipServices>();
|
||||
isBlack = false;
|
||||
}
|
||||
showOKToast(bean.msg);
|
||||
@ -1559,17 +1596,13 @@ class _TIMTextFieldLayoutNarrowState
|
||||
userInfoBean = bean.data.user;
|
||||
unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1;
|
||||
setState(() {});
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class ChatFuncAction {
|
||||
int index;
|
||||
String imId;
|
||||
ChatFuncAction(this.index,this.imId);
|
||||
ChatFuncAction(this.index, this.imId);
|
||||
}
|
||||
@ -79,7 +79,8 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
||||
child: Container(
|
||||
height: 40.sp,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.bgColor,
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(10.sp),
|
||||
topRight: Radius.circular(10.sp))),
|
||||
@ -87,7 +88,6 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
||||
alignment: Alignment.centerLeft,
|
||||
children: [
|
||||
Container(width: Get.width, height: 40.sp),
|
||||
// "intimacy" -> 2315
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 110.sp),
|
||||
child: Text(
|
||||
@ -145,18 +145,26 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
||||
),
|
||||
Container(
|
||||
height: 10.sp,
|
||||
color: AppColor.bgColor,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
color: AppColor.bgColor,
|
||||
// color: AppColor.bgColor,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.all(10.sp),
|
||||
padding: EdgeInsets.all(10.sp),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||
color: AppColor.bgColor,
|
||||
// gradient: LinearGradient(
|
||||
// colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||
borderRadius: BorderRadius.circular(10.sp)),
|
||||
child: Column(
|
||||
children: [
|
||||
@ -295,7 +303,10 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
color: AppColor.bgColor,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
// rewardConfs
|
||||
@ -306,7 +317,10 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
color: AppColor.bgColor,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||
),
|
||||
height: 10.sp + MediaQuery.of(context).padding.bottom,
|
||||
)
|
||||
],
|
||||
@ -319,7 +333,7 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
||||
|
||||
actionWidget(Map info) {
|
||||
return Container(
|
||||
color: AppColor.bgColor,
|
||||
// color: AppColor.bgColor,
|
||||
padding: EdgeInsets.only(top: 20.sp, left: 15.sp, right: 15.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
|
||||
@ -1175,7 +1175,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
SizedBox(
|
||||
height: 72.sp,
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: ()async {
|
||||
@ -1492,6 +1491,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
||||
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 72.sp,
|
||||
|
||||
@ -529,9 +529,9 @@ class _NewPeopleItemState extends State<NewPeopleItem> {
|
||||
// 新人报道(7天内)-在n个圈子发布n喊话—最新加入了「**圈」-填写了联系方式-成为「**榜榜首」-绑定了「**」关系
|
||||
|
||||
item.vip == 2
|
||||
? '成为了「年VIP」'
|
||||
? '通过开通年度会员成为「年VIP」'
|
||||
: item.isBacker == 1
|
||||
? '通过金主认证'
|
||||
? '通过充值小票成为「金主」'
|
||||
: item.lastAgentInterest
|
||||
.isNotEmpty
|
||||
? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏'
|
||||
@ -556,7 +556,7 @@ class _NewPeopleItemState extends State<NewPeopleItem> {
|
||||
1
|
||||
? '填写了联系方式'
|
||||
: item.lastRankTopDesc.isNotEmpty
|
||||
? '成为「${item.lastRankTopDesc}」'
|
||||
? '通过冲榜成为「${item.lastRankTopDesc}」'
|
||||
: '绑定了「${item.lastUserRelation}」关系',
|
||||
|
||||
style: TextStyle(
|
||||
|
||||
@ -20,6 +20,7 @@ class _VideoItemWidgetState extends State<VideoItemWidget> {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
// color: Colors.red,
|
||||
|
||||
width: Get.width - 120.sp,
|
||||
alignment: Alignment.topLeft,
|
||||
child: GestureDetector(
|
||||
|
||||
@ -286,18 +286,19 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
logic.update();
|
||||
} 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>()) {
|
||||
World_call_outLogic logic = Get.find<World_call_outLogic>();
|
||||
logic.isNewMsg = true;
|
||||
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('一个福袋')) {
|
||||
logic.loadBannerData();
|
||||
@ -555,7 +556,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
data['data']['account_id'].toString(), data['data']['user_sig']);
|
||||
accountId = data['data']['account_id'].toString();
|
||||
} else {
|
||||
if (Get.currentRoute != Routes.Login) {
|
||||
if (Get.currentRoute != Routes.Login || data['code'] > 5000) {
|
||||
getIMData();
|
||||
}
|
||||
}
|
||||
@ -752,7 +753,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
}
|
||||
|
||||
void awaitShowLikeRecomandDialog() {
|
||||
// Future.delayed(Duration(seconds: 1), () async {
|
||||
// Future.delayed(Duration(seconds: 30), () async {
|
||||
// var data = await DioManager.instance.get(
|
||||
// url: Api.recommendLikeList,
|
||||
// );
|
||||
|
||||
@ -61,6 +61,10 @@ class _HomePageState extends State<HomePage>
|
||||
vsync: this,
|
||||
initialIndex: 0,
|
||||
animationDuration: Duration.zero);
|
||||
addSub();
|
||||
}
|
||||
|
||||
void addSub() {
|
||||
sub = EventBusManager.on<ShowGiftNotifi>().listen((event) {
|
||||
var info = event.info;
|
||||
showGiftButtonOverlay(context!, info['msg'], info['fromUser'], info['toUser'], () {
|
||||
@ -121,8 +125,8 @@ class _HomePageState extends State<HomePage>
|
||||
sub1.cancel();
|
||||
giftAnimationNotifySub.cancel();
|
||||
callOutActionNotifySub.cancel();
|
||||
// permissionNotifySub.canel();
|
||||
|
||||
permissionNotifySub.cancel();
|
||||
permissionCloseNotifySub.cancel();
|
||||
routeObserver.unsubscribe(this);
|
||||
}
|
||||
|
||||
@ -341,6 +345,7 @@ class _HomePageState extends State<HomePage>
|
||||
void showFloatingCallOutActionOverlay(
|
||||
Map info
|
||||
) {
|
||||
if (Get.currentRoute == Routes.Chat) return;
|
||||
OverlayState? overlayState = Overlay.of(context);
|
||||
late OverlayEntry overlayEntry;
|
||||
bool showMessage = false;
|
||||
@ -385,15 +390,18 @@ class _HomePageState extends State<HomePage>
|
||||
try {
|
||||
overlayEntry!.remove();
|
||||
} catch (e) {}
|
||||
|
||||
Get.until((route) => route.isFirst);
|
||||
logic.updateIndex(2);
|
||||
World_call_outLogic calloutLogic = Get.find<World_call_outLogic>();
|
||||
calloutLogic.isNewMsg = false;
|
||||
calloutLogic.index = 1;
|
||||
calloutLogic.isMore = true;
|
||||
calloutLogic.refreshController.resetNoData();
|
||||
calloutLogic.loadData();
|
||||
if (action == '立即拜访') {
|
||||
Get.toNamed(Routes.UserInfoPage,arguments:info['userId'].toString());
|
||||
} else {
|
||||
Get.until((route) => route.isFirst);
|
||||
logic.updateIndex(2);
|
||||
World_call_outLogic calloutLogic = Get.find<World_call_outLogic>();
|
||||
calloutLogic.isNewMsg = false;
|
||||
calloutLogic.index = 1;
|
||||
calloutLogic.isMore = true;
|
||||
calloutLogic.refreshController.resetNoData();
|
||||
calloutLogic.loadData();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width - 8,
|
||||
@ -412,40 +420,29 @@ class _HomePageState extends State<HomePage>
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// direction: Axis.vertical,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
countdownTimer.cancel();
|
||||
try {
|
||||
overlayEntry!.remove();
|
||||
} catch (e) {}
|
||||
// "userId" -> 30629
|
||||
Get.toNamed(Routes.UserInfoPage,arguments:info['userId'].toString());
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
ClipOval(
|
||||
child: CachedImg(
|
||||
fit: BoxFit.cover,
|
||||
// "avatarUrl" -> "https://qiniuyun.ikuayou.com/ky_user_info_avatar/202401/sk1Y2_pT52gc1L3vimage_picker_82A96698-792D-4..."
|
||||
imageUrl: info['avatarUrl'],
|
||||
width: 30.sp,
|
||||
height: 30.sp,
|
||||
Row(
|
||||
children: [
|
||||
ClipOval(
|
||||
child: CachedImg(
|
||||
fit: BoxFit.cover,
|
||||
imageUrl: info['avatarUrl'],
|
||||
width: 30.sp,
|
||||
height: 30.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 2.sp,),
|
||||
Container(
|
||||
// width: 70.sp,
|
||||
child: Text(
|
||||
info['nickname'],
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
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(
|
||||
// width: 70.sp,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:app_settings/app_settings.dart';
|
||||
@ -30,11 +29,10 @@ class Complete_materialLogic extends GetxController {
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
// FlutterNativeSplash.remove();
|
||||
// FlutterNativeSplash.remove();
|
||||
super.onReady();
|
||||
|
||||
|
||||
}
|
||||
|
||||
final Complete_materialState state = Complete_materialState();
|
||||
final ImagePicker _picker = ImagePicker();
|
||||
var type = Get.arguments ?? "";
|
||||
@ -49,7 +47,7 @@ class Complete_materialLogic extends GetxController {
|
||||
int unLockWxNum = 0;
|
||||
|
||||
Map wxStatusInfo = {};
|
||||
|
||||
Map wxInfo = {};
|
||||
late ConfigBean configBean;
|
||||
List<MyConfigData> numbers = [];
|
||||
|
||||
@ -63,7 +61,7 @@ class Complete_materialLogic extends GetxController {
|
||||
|
||||
List<Province> provinceList = [];
|
||||
|
||||
List<int> genderTagList = [];//你想认识
|
||||
List<int> genderTagList = []; //你想认识
|
||||
|
||||
List<SysTag> watchGenderList = [];
|
||||
Map cityMap = {};
|
||||
@ -73,16 +71,16 @@ class Complete_materialLogic extends GetxController {
|
||||
FlutterNativeSplash.remove();
|
||||
await loadCofigData();
|
||||
getCityList();
|
||||
if(type!=''){
|
||||
if (type != '') {
|
||||
loadWXEditStatus();
|
||||
var data = await DioManager.instance.get(url: Api.getUserInfo);
|
||||
var bean = BaseResponse<ResponseBean>.fromJson(
|
||||
data, (data) => ResponseBean.fromJson(data));
|
||||
if(bean.isSuccess()){
|
||||
if (bean.isSuccess()) {
|
||||
unLockWxNum = bean.data.unLockWxNum;
|
||||
|
||||
userInfoBean = bean.data.user;
|
||||
state.wxEditingController.text = userInfoBean!.wx_num ;
|
||||
state.wxEditingController.text = userInfoBean!.wx_num;
|
||||
state.nickName = userInfoBean!.nickname;
|
||||
state.sex = getGenderStr(userInfoBean!.gender);
|
||||
state.genderId = userInfoBean!.gender.toString();
|
||||
@ -97,7 +95,6 @@ class Complete_materialLogic extends GetxController {
|
||||
element.isSelect = true;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
state.orientationId = userInfoBean!.orientation.toString();
|
||||
state.textEditingController.text = userInfoBean!.nickname;
|
||||
@ -105,50 +102,57 @@ class Complete_materialLogic extends GetxController {
|
||||
state.descEditingController.text = userInfoBean!.signature;
|
||||
headUrl = userInfoBean!.avatar;
|
||||
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();
|
||||
// state.nickName = userInfoBean!.nickname;
|
||||
}else{
|
||||
// state.nickName = userInfoBean!.nickname;
|
||||
} else {
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
|
||||
} else {
|
||||
watchGenderList[1].isSelect = true;
|
||||
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 {
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.checkWxNumState,);
|
||||
var data = await DioManager.instance.get(
|
||||
url: Api.checkWxNumState,
|
||||
);
|
||||
if (data['code'] == 200) {
|
||||
// code 200 直接跳填微信,不提示,4000 不让填写,32100 弹返回的提示
|
||||
//
|
||||
// BAN_ACTION(4000, "用户当前操作被禁止"),
|
||||
//
|
||||
// NOTICE_UPDATE_WXNUM(32100, "填写/更新微信需要消耗{}小票哦");
|
||||
|
||||
// code 200 直接跳填微信,不提示,4000 不让填写,32100 弹返回的提示
|
||||
//
|
||||
// BAN_ACTION(4000, "用户当前操作被禁止"),
|
||||
//
|
||||
// NOTICE_UPDATE_WXNUM(32100, "填写/更新微信需要消耗{}小票哦");
|
||||
} else {
|
||||
wxStatusInfo['${data['code']}'] = data['msg'];
|
||||
}
|
||||
}
|
||||
|
||||
loadCofigData() async {
|
||||
loadCofigData() async {
|
||||
var data =
|
||||
await DioManager.instance.get(url: Api.getqiniuToken, params: {});
|
||||
var bean = BaseResponse<QnTokenData>.fromJson(
|
||||
data, (data) => QnTokenData.fromJson(data));
|
||||
if(bean.isSuccess()){
|
||||
if (bean.isSuccess()) {
|
||||
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(
|
||||
data1, (data1) => ConfigBean.fromJson(data1));
|
||||
configBean = bean1.data!;
|
||||
@ -192,36 +196,32 @@ class Complete_materialLogic extends GetxController {
|
||||
}
|
||||
|
||||
Future getImageFile() async {
|
||||
|
||||
|
||||
checkPhotosStatus();
|
||||
try {
|
||||
final XFile? pickedFile = await _picker.pickImage(
|
||||
source: ImageSource.gallery,
|
||||
);
|
||||
if(null==pickedFile){
|
||||
if (null == pickedFile) {
|
||||
return;
|
||||
}
|
||||
SmartDialog.showLoading(msg: '上传中');
|
||||
uploadImage(quToken,pickedFile!,ImgPath.USER_INFO_AVATAR,(result){
|
||||
uploadImage(quToken, pickedFile!, ImgPath.USER_INFO_AVATAR, (result) {
|
||||
SmartDialog.dismiss(force: true);
|
||||
headUrl = result;
|
||||
update();
|
||||
});
|
||||
|
||||
} catch (e) {
|
||||
SmartDialog.dismiss();
|
||||
print(e);
|
||||
|
||||
PlatformException? exception = e as PlatformException?;
|
||||
// invalid_image
|
||||
if(exception!.code == 'invalid_image') {
|
||||
if (exception!.code == 'invalid_image') {
|
||||
showOKToast('不支持的图片格式,请另外选择图片');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
checkInfo() async {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
if (headUrl == '') {
|
||||
@ -232,10 +232,10 @@ class Complete_materialLogic extends GetxController {
|
||||
showOKToast('请输入您的昵称');
|
||||
focusNickNode.requestFocus();
|
||||
return;
|
||||
} else if(state.textEditingController.text.length < 2){
|
||||
} else if (state.textEditingController.text.length < 2) {
|
||||
showOKToast('昵称不能低于两个字');
|
||||
return;
|
||||
} else if(state.textEditingController.text.length > 6){
|
||||
} else if (state.textEditingController.text.length > 6) {
|
||||
showOKToast('昵称最多输入6个字');
|
||||
return;
|
||||
}
|
||||
@ -258,7 +258,7 @@ class Complete_materialLogic extends GetxController {
|
||||
return;
|
||||
} else if (numbers.isEmpty) {
|
||||
showOKToast('请选择您的兴趣圈子');
|
||||
return;
|
||||
return;
|
||||
} else if (state.descEditingController.text.isEmpty) {
|
||||
showOKToast('请输入您的交友宣言');
|
||||
focusNode.requestFocus();
|
||||
@ -267,7 +267,7 @@ class Complete_materialLogic extends GetxController {
|
||||
showOKToast('您的交友宣言太短');
|
||||
focusNode.requestFocus();
|
||||
return;
|
||||
} else if (state.descEditingController.text.length > 40) {
|
||||
} else if (state.descEditingController.text.length > 40) {
|
||||
showOKToast('您的交友宣言超出40个字啦');
|
||||
focusNode.requestFocus();
|
||||
return;
|
||||
@ -276,17 +276,17 @@ class Complete_materialLogic extends GetxController {
|
||||
genderTagList.clear();
|
||||
List tagIds = [];
|
||||
watchGenderList.forEach((element) {
|
||||
if(element.isSelect){
|
||||
if (element.isSelect) {
|
||||
tagIds.add(element.id);
|
||||
genderTagList.add(element.id);
|
||||
}
|
||||
});
|
||||
if(genderTagList.isEmpty){
|
||||
if (genderTagList.isEmpty) {
|
||||
// showOKToast("请点击选择你想认识的人");
|
||||
// return;
|
||||
}
|
||||
|
||||
// LatLng location = await getLocation();
|
||||
// LatLng location = await getLocation();
|
||||
List<String> interestsList = [];
|
||||
numbers.forEach((element) {
|
||||
interestsList.add(element.id);
|
||||
@ -294,7 +294,7 @@ class Complete_materialLogic extends GetxController {
|
||||
if (state.brithday.isEmpty) {
|
||||
var date = PDuration.now();
|
||||
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 day = p.day! < 10 ? '0${p.day!}' : p.day!.toString();
|
||||
@ -302,19 +302,36 @@ class Complete_materialLogic extends GetxController {
|
||||
state.brithday = time;
|
||||
}
|
||||
|
||||
|
||||
if (state.wxEditingController.text.isNotEmpty) {
|
||||
bool isPass = false;
|
||||
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 (contactType == 2) {
|
||||
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 (state.wxEditingController.text.isNotEmpty && !isPass) {
|
||||
RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
||||
if (!wxReg.hasMatch(state.wxEditingController.text)) {
|
||||
showOKToast('请输入正确的微信号');
|
||||
if (state.wxEditingController.text.isNotEmpty && !isPass) {
|
||||
RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
||||
if (!wxReg.hasMatch(state.wxEditingController.text)) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -324,9 +341,12 @@ class Complete_materialLogic extends GetxController {
|
||||
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) {
|
||||
// showToast.
|
||||
showOKToast(result['msg']);
|
||||
@ -340,16 +360,15 @@ class Complete_materialLogic extends GetxController {
|
||||
print(result);
|
||||
}
|
||||
|
||||
bool isNickOK = await checkText(state.textEditingController,'昵称');
|
||||
bool isNickOK = await checkText(state.textEditingController, '昵称');
|
||||
if (!isNickOK) {
|
||||
return;
|
||||
}
|
||||
bool isDescOk = await checkText(state.descEditingController,'交友宣言');
|
||||
bool isDescOk = await checkText(state.descEditingController, '交友宣言');
|
||||
if (!isDescOk) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
|
||||
'avatar_url': headUrl,
|
||||
'birthday': state.brithday,
|
||||
@ -357,8 +376,8 @@ class Complete_materialLogic extends GetxController {
|
||||
'role': state.roleId, //Int 角色
|
||||
'interests': interestsList, //兴趣
|
||||
'orientation': state.orientationId, //Int 爱好
|
||||
'city':state.city.isNotEmpty ? state.city : '上海市',
|
||||
'orientations':genderTagList.isEmpty ? [2] : genderTagList,
|
||||
'city': state.city.isNotEmpty ? state.city : '上海市',
|
||||
'orientations': genderTagList.isEmpty ? [2] : genderTagList,
|
||||
// 'lat': location.latitude,
|
||||
// 'lng': location.longitude,
|
||||
'nickname': state.textEditingController.text.trim(),
|
||||
@ -367,7 +386,7 @@ class Complete_materialLogic extends GetxController {
|
||||
var bean = BaseResponse<String>.fromJson(data, (data) => data);
|
||||
if (bean.code == 200) {
|
||||
Get.offAllNamed(Routes.Home);
|
||||
}else{
|
||||
} else {
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
}
|
||||
@ -378,11 +397,11 @@ class Complete_materialLogic extends GetxController {
|
||||
showOKToast('请输入您的昵称');
|
||||
focusNickNode.requestFocus();
|
||||
return;
|
||||
} else if(state.textEditingController.text.length>6){
|
||||
} else if (state.textEditingController.text.length > 6) {
|
||||
showOKToast('昵称最多输入6个字');
|
||||
focusNickNode.requestFocus();
|
||||
return;
|
||||
}else if (state.sex.isEmpty) {
|
||||
} else if (state.sex.isEmpty) {
|
||||
showOKToast('请选择您的属性');
|
||||
return;
|
||||
} else if (state.age.isEmpty) {
|
||||
@ -419,28 +438,48 @@ class Complete_materialLogic extends GetxController {
|
||||
genderTagList.clear();
|
||||
List tagIds = [];
|
||||
watchGenderList.forEach((element) {
|
||||
if(element.isSelect){
|
||||
if (element.isSelect) {
|
||||
tagIds.add(element.id);
|
||||
genderTagList.add(element.id);
|
||||
}
|
||||
});
|
||||
if(genderTagList.isEmpty){
|
||||
if (genderTagList.isEmpty) {
|
||||
showOKToast("请点击选择你想认识的人");
|
||||
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;
|
||||
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 (contactType == 2) {
|
||||
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 (state.wxEditingController.text.isNotEmpty && !isPass) {
|
||||
RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
||||
if (!wxReg.hasMatch(state.wxEditingController.text)) {
|
||||
showOKToast('请输入正确的微信号');
|
||||
if (state.wxEditingController.text.isNotEmpty && !isPass) {
|
||||
RegExp wxReg = RegExp(r'^[-_a-zA-Z][-_a-zA-Z0-9]{5,19}$');
|
||||
if (!wxReg.hasMatch(state.wxEditingController.text)) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -450,9 +489,13 @@ class Complete_materialLogic extends GetxController {
|
||||
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});
|
||||
if (result['code'] == 31201) {
|
||||
var result = await DioManager().postBody(url: Api.confset,params: params);
|
||||
if (result['code'] == 10081) {
|
||||
// showToast.
|
||||
showOKToast(result['msg']);
|
||||
showRechargeScreenDialog('set_contact');
|
||||
@ -465,23 +508,21 @@ class Complete_materialLogic extends GetxController {
|
||||
print(result);
|
||||
}
|
||||
//TODO 强制获取经纬度
|
||||
// LatLng location = await getLocation();
|
||||
// LatLng location = await getLocation();
|
||||
List<String> interestsList = [];
|
||||
numbers.forEach((element) {
|
||||
interestsList.add(element.id);
|
||||
});
|
||||
|
||||
|
||||
bool isNickOK = await checkText(state.textEditingController,'昵称');
|
||||
bool isNickOK = await checkText(state.textEditingController, '昵称');
|
||||
if (!isNickOK) {
|
||||
return;
|
||||
}
|
||||
bool isDescOk = await checkText(state.descEditingController,'交友宣言');
|
||||
bool isDescOk = await checkText(state.descEditingController, '交友宣言');
|
||||
if (!isDescOk) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
|
||||
'avatar_url': headUrl,
|
||||
'birthday': state.brithday,
|
||||
@ -489,8 +530,8 @@ class Complete_materialLogic extends GetxController {
|
||||
'role': state.roleId, //Int 角色
|
||||
'interests': interestsList, //兴趣
|
||||
'orientation': state.orientationId, //Int 爱好
|
||||
'orientations':genderTagList,
|
||||
'city':state.city,
|
||||
'orientations': genderTagList,
|
||||
'city': state.city,
|
||||
// 'lat': location.latitude,
|
||||
// 'lng': location.longitude,
|
||||
'nickname': state.textEditingController.text,
|
||||
@ -508,9 +549,6 @@ class Complete_materialLogic extends GetxController {
|
||||
mineFragment.orientation = int.parse(state.orientationId);
|
||||
mineFragment.update();
|
||||
Get.back();
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
showOKToast(bean.msg);
|
||||
}
|
||||
|
||||
@ -39,9 +39,9 @@ class LoginLogic extends GetxController {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
readClipboardData();
|
||||
if (!kDebugMode) {
|
||||
checkNetworkUrl();
|
||||
}
|
||||
// if (!kDebugMode) {
|
||||
// checkNetworkUrl();
|
||||
// }
|
||||
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
|
||||
String loginPhone =
|
||||
await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE) ??
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:fluwx/fluwx.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
@ -115,6 +116,9 @@ class MinefragmentLogic extends GetxController {
|
||||
loadDyanmicListData() async {
|
||||
String requestUserId = '';
|
||||
HomeLogic homeLogic = Get.find<HomeLogic>();
|
||||
if (homeLogic.model == null) {
|
||||
await homeLogic.loadMyInfoData();
|
||||
}
|
||||
requestUserId = homeLogic.model!.id.toString();
|
||||
|
||||
var result = await DioManager.instance.get(url: Api.userTrends,
|
||||
|
||||
@ -38,7 +38,7 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
with AutomaticKeepAliveClientMixin {
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
HomeCallOutLogic? listsLg;
|
||||
UserHomeCallOutLogic? listsLg;
|
||||
final RefreshController refreshController = RefreshController();
|
||||
ScrollController scrollController = ScrollController();
|
||||
MinefragmentLogic logic = Get.find<MinefragmentLogic>();
|
||||
@ -70,8 +70,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
scrollController.jumpTo(0);
|
||||
});
|
||||
|
||||
Get.lazyPut(() => HomeCallOutLogic());
|
||||
listsLg = Get.find<HomeCallOutLogic>();
|
||||
Get.lazyPut(() => UserHomeCallOutLogic());
|
||||
listsLg = Get.find<UserHomeCallOutLogic>();
|
||||
listsLg?.loadCallOutListData(widget.userId);
|
||||
|
||||
listsLg!.scrollController.addListener(() {
|
||||
@ -90,12 +90,12 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
scrollController.dispose();
|
||||
sub.cancel();
|
||||
sub1.cancel();
|
||||
listsLg?.onClose();
|
||||
// listsLg?.onClose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<HomeCallOutLogic>(
|
||||
return GetBuilder<UserHomeCallOutLogic>(
|
||||
assignId: true,
|
||||
builder: (listLogic) {
|
||||
return listLogic.lists.isEmpty
|
||||
@ -147,7 +147,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
||||
? Text(
|
||||
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(
|
||||
text: lists.content!,
|
||||
@ -156,7 +157,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
: Get.width - 20.sp,
|
||||
additionText: '查看更多',
|
||||
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:
|
||||
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||
onTap: () {
|
||||
@ -394,50 +396,56 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
),
|
||||
atWidget,
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
alignment: Alignment.topLeft,
|
||||
// margin: EdgeInsets.only(top: 4.sp),
|
||||
child: descText,
|
||||
),
|
||||
Container(
|
||||
height: picHeight,
|
||||
// color: Colors.blue,
|
||||
margin: EdgeInsets.only(top: 5.sp),
|
||||
child: picHeight == 200.sp
|
||||
? ClipRRect(
|
||||
borderRadius: BorderRadius.circular(6.sp),
|
||||
child: VideoItemWidget(lists.album![0]!.url!))
|
||||
: GridView.builder(
|
||||
controller: scrollController,
|
||||
itemCount: lists.album!.length,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, //横轴三个子widget
|
||||
crossAxisSpacing: 8.sp,
|
||||
mainAxisSpacing: 8.sp,
|
||||
childAspectRatio: 0.8 //宽高比为1时,子widget
|
||||
),
|
||||
itemBuilder: (contentxt, currentIndex) {
|
||||
Album album = lists.album![currentIndex];
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
var imgList = <String>[];
|
||||
for (var element in lists.album!) {
|
||||
imgList.add(element.url!);
|
||||
}
|
||||
Get.toNamed(Routes.SwiperPage, arguments: {
|
||||
'imaglist': imgList,
|
||||
'index': currentIndex
|
||||
});
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(6.sp),
|
||||
child: CachedImg(
|
||||
imageUrl: album.url!,
|
||||
fit: BoxFit.cover,
|
||||
:MediaQuery.removePadding(
|
||||
removeTop: true,
|
||||
context: context,
|
||||
child: GridView.builder(
|
||||
controller: scrollController,
|
||||
itemCount: lists.album!.length,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, //横轴三个子widget
|
||||
crossAxisSpacing: 4.sp,
|
||||
mainAxisSpacing: 4.sp,
|
||||
childAspectRatio: 0.8 //宽高比为1时,子widget
|
||||
),
|
||||
itemBuilder: (contentxt, currentIndex) {
|
||||
Album album = lists.album![currentIndex];
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
var imgList = <String>[];
|
||||
for (var element in lists.album!) {
|
||||
imgList.add(element.url!);
|
||||
}
|
||||
Get.toNamed(Routes.SwiperPage, arguments: {
|
||||
'imaglist': imgList,
|
||||
'index': currentIndex
|
||||
});
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(6.sp),
|
||||
child: CachedImg(
|
||||
imageUrl: album.url!,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
if (widget.userId.isEmpty)
|
||||
Container(
|
||||
@ -481,7 +489,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
||||
? Text(
|
||||
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(
|
||||
text: lists.content!,
|
||||
@ -490,9 +499,11 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
: Get.width - 20.sp,
|
||||
additionText: '查看更多',
|
||||
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:
|
||||
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||
|
||||
onTap: () {
|
||||
logic.openCallOutIdList.add(lists.id);
|
||||
setState(() {});
|
||||
@ -558,6 +569,7 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
}
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 14.sp, bottom: 10.sp),
|
||||
@ -615,9 +627,10 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
Container(
|
||||
// height: 130.sp + contentHeight(lists.content!) + picHeight,
|
||||
width: Get.width,
|
||||
// color: Colors.blue,
|
||||
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
height: 72.sp,
|
||||
@ -733,44 +746,48 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
borderRadius: BorderRadius.circular(6.sp),
|
||||
child:
|
||||
VideoItemWidget(lists.album![0].url!))
|
||||
: GridView.builder(
|
||||
controller: scrollController,
|
||||
// shrinkWrap: true,
|
||||
itemCount: lists.album!.length,
|
||||
physics:
|
||||
const NeverScrollableScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, //横轴三个子widget
|
||||
crossAxisSpacing: 8.sp,
|
||||
mainAxisSpacing: 8.sp,
|
||||
childAspectRatio:
|
||||
0.8 //宽高比为1时,子widget
|
||||
),
|
||||
itemBuilder: (contentxt, currentIndex) {
|
||||
Album album = lists.album![currentIndex];
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
var imgList = <String>[];
|
||||
for (var element in lists.album!) {
|
||||
imgList.add(element.url!);
|
||||
}
|
||||
Get.toNamed(Routes.SwiperPage,
|
||||
arguments: {
|
||||
'imaglist': imgList,
|
||||
'index': currentIndex
|
||||
});
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(6.sp),
|
||||
child: CachedImg(
|
||||
imageUrl: album.url!,
|
||||
fit: BoxFit.cover,
|
||||
: MediaQuery.removePadding(
|
||||
removeTop: true,
|
||||
context: context,
|
||||
child: GridView.builder(
|
||||
controller: scrollController,
|
||||
// shrinkWrap: true,
|
||||
itemCount: lists.album!.length,
|
||||
physics:
|
||||
const NeverScrollableScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, //横轴三个子widget
|
||||
crossAxisSpacing: 8.sp,
|
||||
mainAxisSpacing: 8.sp,
|
||||
childAspectRatio:
|
||||
0.8 //宽高比为1时,子widget
|
||||
),
|
||||
itemBuilder: (contentxt, currentIndex) {
|
||||
Album album = lists.album![currentIndex];
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
var imgList = <String>[];
|
||||
for (var element in lists.album!) {
|
||||
imgList.add(element.url!);
|
||||
}
|
||||
Get.toNamed(Routes.SwiperPage,
|
||||
arguments: {
|
||||
'imaglist': imgList,
|
||||
'index': currentIndex
|
||||
});
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(6.sp),
|
||||
child: CachedImg(
|
||||
imageUrl: album.url!,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}))
|
||||
);
|
||||
}),
|
||||
))
|
||||
: Container(),
|
||||
if (widget.userId.isEmpty)
|
||||
Container(
|
||||
@ -1227,3 +1244,5 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -412,10 +412,15 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
if (end > userIdList.length) {
|
||||
end = userIdList.length; // 防止越界
|
||||
}
|
||||
try {
|
||||
List<V2TimUserFullInfo> dataList = (await getUserListData(userIdList.sublist(start, end)))
|
||||
.whereType<V2TimUserFullInfo>()
|
||||
.toList();
|
||||
|
||||
List<V2TimUserFullInfo> dataList = await getUserListData(
|
||||
userIdList.sublist(start, end));
|
||||
list.addAll(dataList);
|
||||
list.addAll(dataList);
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
return list;
|
||||
} else {
|
||||
|
||||
@ -113,6 +113,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||
child: Swiper(
|
||||
autoplay: true,
|
||||
loop: true,
|
||||
autoplayDelay: 6000,
|
||||
scrollDirection: Axis.vertical,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
Map item = controller.bannerList[index];
|
||||
|
||||
@ -1199,9 +1199,9 @@ class _LocationItemState extends State<LocationItem> {
|
||||
// 新人报道(7天内)-在n个圈子发布n喊话—最新加入了「**圈」-填写了联系方式-成为「**榜榜首」-绑定了「**」关系
|
||||
|
||||
item.vip == 2
|
||||
? '成为了「年VIP」'
|
||||
? '通过开通年度会员成为「年VIP'
|
||||
: item.isBacker == 1
|
||||
? '通过金主认证'
|
||||
? '通过充值小票成为「金主」'
|
||||
: item.lastAgentInterest
|
||||
.isNotEmpty
|
||||
? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏'
|
||||
@ -1225,7 +1225,7 @@ class _LocationItemState extends State<LocationItem> {
|
||||
1
|
||||
? '填写了联系方式'
|
||||
: item.lastRankTopDesc.isNotEmpty
|
||||
? '成为「${item.lastRankTopDesc}」'
|
||||
? '通过冲榜成为「${item.lastRankTopDesc}」'
|
||||
: '绑定了「${item.lastUserRelation}」关系',
|
||||
|
||||
style: TextStyle(
|
||||
|
||||
@ -888,6 +888,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
),
|
||||
),
|
||||
),
|
||||
if (logic.relationTypeList.isNotEmpty)
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (Get.isRegistered<Relationship_buildingLogic>()) {
|
||||
@ -1128,7 +1129,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
}
|
||||
return Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 0, right: 10.sp),
|
||||
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||
height: 27.sp,
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
@ -1342,7 +1343,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
// :
|
||||
return Container(
|
||||
// margin: EdgeInsets.only( 0.sp),
|
||||
padding: EdgeInsets.symmetric(horizontal: 19.sp),
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.sp),
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
@ -1424,7 +1425,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
controller.getImageFile();
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(5.sp),
|
||||
margin: EdgeInsets.all(2.5.sp),
|
||||
child: Image(
|
||||
image: AssetImage(
|
||||
getMineImage("icon_img_add")),
|
||||
@ -1433,7 +1434,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
margin: EdgeInsets.all(5.sp),
|
||||
margin: EdgeInsets.all(2.5.sp),
|
||||
child: Center(
|
||||
child: _buildImageItem(
|
||||
controller.state.imaglist[index - 1].url,
|
||||
@ -1446,7 +1447,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
}
|
||||
} else {
|
||||
return Container(
|
||||
margin: EdgeInsets.all(5.sp),
|
||||
margin: EdgeInsets.all(2.5.sp),
|
||||
child: Center(
|
||||
child: _buildImageItem(
|
||||
controller.state.imaglist[index].urlThumb,
|
||||
|
||||
@ -136,7 +136,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
||||
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
||||
? Text(
|
||||
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(
|
||||
text: lists.content!,
|
||||
@ -145,7 +146,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
||||
: Get.width - 20.sp,
|
||||
additionText: '查看更多',
|
||||
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:
|
||||
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||
onTap: () {
|
||||
@ -459,7 +461,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
||||
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
||||
? Text(
|
||||
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(
|
||||
text: lists.content!,
|
||||
@ -468,7 +471,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
||||
: Get.width - 20.sp,
|
||||
additionText: '查看更多',
|
||||
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:
|
||||
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||
onTap: () {
|
||||
@ -584,6 +588,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
||||
// color: Colors.blue,
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||
child: Column(
|
||||
crossAxisAlignment:CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
height: 72.sp,
|
||||
|
||||
@ -122,3 +122,8 @@ class HomeCallOutLogic extends GetxController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class UserHomeCallOutLogic extends HomeCallOutLogic {
|
||||
|
||||
}
|
||||
@ -181,7 +181,6 @@ class World_call_outLogic extends GetxController {
|
||||
}
|
||||
|
||||
|
||||
DateTime? lastHourStartTime = null; // 记录上一个小时开始的时间
|
||||
List<String> result = [];
|
||||
int subIndex = -1;
|
||||
for (int i = 0; i < tempLists.length; i++) {
|
||||
|
||||
@ -638,4 +638,7 @@ class Api {
|
||||
//用户收入总计
|
||||
static const userIncomeTotal = '/mall-service/wallet/userIncomeTotal';
|
||||
|
||||
//关系邀请
|
||||
static const relationInvite = '/user-service/user/relation/invite';
|
||||
|
||||
}
|
||||
|
||||
@ -311,8 +311,8 @@ class DioManager {
|
||||
}
|
||||
// 其他类型的错误(如协议错误、解析错误等)
|
||||
var info = await FlutterBugly.uploadException(
|
||||
message: url + e.error.toString(),
|
||||
detail: Platform.isIOS ? 'crash_attach.log' : 'extraMessage.txt',
|
||||
message: url + ':' + e.error.toString(),
|
||||
detail: e.message ?? '',
|
||||
);
|
||||
print(info);
|
||||
return {'code': 500, 'msg': '服务器开小差了,请重试'};
|
||||
@ -324,7 +324,7 @@ class DioManager {
|
||||
// 其他类型的错误(如协议错误、解析错误等)
|
||||
var info = await FlutterBugly.uploadException(
|
||||
message: url + e.toString(),
|
||||
detail: Platform.isIOS ? 'crash_attach.log' : 'extraMessage.txt',
|
||||
detail: '',
|
||||
);
|
||||
// 其他一些意外的报错
|
||||
return {'code': 500, 'msg': '加载中...'};
|
||||
|
||||
@ -29,11 +29,9 @@ class _CachedImgState extends State<CachedImg> {
|
||||
Widget build(BuildContext context) {
|
||||
return CachedNetworkImage(
|
||||
imageUrl: widget.imageUrl,
|
||||
fit: widget.fit,
|
||||
fit: widget.fit ?? BoxFit.cover,
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
useOldImageOnUrlChange:true,
|
||||
memCacheWidth: Get.width.toInt(),
|
||||
errorWidget: (context, url, error) => CachedNetworkImage(
|
||||
imageUrl:Api.defaultAvatar,
|
||||
fit: BoxFit.cover,
|
||||
|
||||
@ -1025,22 +1025,8 @@ sendApplyRelationTypeCustomMsg(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);
|
||||
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) {
|
||||
info['relationTypeId'] = result['data'];
|
||||
data = jsonEncode(info);
|
||||
@ -1639,9 +1625,10 @@ pushPage(String action,String param,{String name = '',bool isShowUpdate = true})
|
||||
}
|
||||
|
||||
} else if (action == 'receive_user_welfare') {
|
||||
if (Get.isRegistered<World_call_outLogic>()) {
|
||||
World_call_outLogic logic = Get.find<World_call_outLogic>();
|
||||
logic.getWelfareDetailData(param,-1);
|
||||
|
||||
}
|
||||
} else if (action == 'watch_free_castle_gift') {
|
||||
World_call_outLogic logic = Get.find<World_call_outLogic>();
|
||||
logic.treatWatch(param);
|
||||
|
||||
@ -240,6 +240,7 @@ void showFloatingButtonOverlay(BuildContext context, String nickname,
|
||||
|
||||
void showGiftButtonOverlay(BuildContext context, String content, Map sendUser,
|
||||
Map recevierUser, NoticeCallback noticeCallback) {
|
||||
if (Get.currentRoute == Routes.Chat) return;
|
||||
OverlayState? overlayState = Overlay.of(context);
|
||||
late OverlayEntry overlayEntry;
|
||||
bool showMessage = false;
|
||||
@ -463,6 +464,7 @@ void showGiftButtonOverlay(BuildContext context, String content, Map sendUser,
|
||||
void showPeopleCallOutOverlay(
|
||||
BuildContext context, String content, NoticeCallback noticeCallback) {
|
||||
if (content == null) return;
|
||||
if (Get.currentRoute == Routes.Chat) return;
|
||||
OverlayState? overlayState = Overlay.of(context);
|
||||
late OverlayEntry overlayEntry;
|
||||
bool showMessage = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user