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 {
|
||||
|
||||
@ -31,19 +31,30 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
logic.scrollController.addListener(() {
|
||||
if (logic.scrollController.position.pixels ==
|
||||
logic.scrollController.position.maxScrollExtent) {
|
||||
logic.startSelectCircleActivity();
|
||||
}
|
||||
});
|
||||
|
||||
logic.textscrollController.addListener(() {
|
||||
print(logic.textscrollController.offset);
|
||||
if (logic.textscrollController.offset <= 1.0) {
|
||||
logic.allScrollController.animateTo(0,
|
||||
duration: Duration(milliseconds: 150), curve: Curves.easeIn);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
super.dispose();
|
||||
logic.scrollController.dispose();
|
||||
logic.textscrollController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
@ -54,6 +65,10 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
isShowKeyboard = false;
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
@ -62,8 +77,11 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage(getBaseImage('home_back')))),
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
Scaffold(
|
||||
// resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
centerTitle: '圈内喊话',
|
||||
@ -75,11 +93,16 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
logic.sendShout();
|
||||
},
|
||||
),
|
||||
body: SafeArea(
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
body: Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Column(
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
controller: logic.allScrollController,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@ -88,36 +111,42 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
},
|
||||
child: Container(
|
||||
height: 45.sp,
|
||||
padding:
|
||||
EdgeInsets.only(left: 17.sp, right: 17.sp),
|
||||
padding: EdgeInsets.only(
|
||||
left: 17.sp, right: 17.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'🌍选择圈子:',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 16.sp),
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
logic.circleName == ''
|
||||
? Container(
|
||||
child: Text(
|
||||
'选择合适的圈子更容易吸引圈友',
|
||||
style:
|
||||
TextStyle(color: Colors.grey),
|
||||
style: TextStyle(
|
||||
color: Colors.grey),
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 7.sp, right: 7.sp),
|
||||
left: 7.sp,
|
||||
right: 7.sp),
|
||||
height: 21.sp,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
21 * 0.5.sp),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
BorderRadius
|
||||
.circular(21 *
|
||||
0.5.sp),
|
||||
gradient:
|
||||
const LinearGradient(
|
||||
begin: Alignment
|
||||
.centerLeft,
|
||||
end: Alignment
|
||||
.centerRight,
|
||||
colors: [
|
||||
Color(0xff0AFCFF),
|
||||
Color(0xffD739EA)
|
||||
@ -146,170 +175,178 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 15.sp),
|
||||
child: Stack(
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
top: 5.sp, bottom: 5.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 150.sp,
|
||||
if (controller
|
||||
.state.imaglist.isNotEmpty)
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 5.sp,
|
||||
left: 10.sp,
|
||||
bottom: 5.sp,
|
||||
right: 10.sp,
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: logic
|
||||
.state
|
||||
.imaglist
|
||||
.length >
|
||||
3
|
||||
? 240.sp
|
||||
: 120.sp),
|
||||
child:
|
||||
_imageAdapter(controller)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 0.sp,
|
||||
left: 15.sp,
|
||||
right: 15.sp,
|
||||
bottom: 0.sp),
|
||||
child: _showVideo(controller),
|
||||
),
|
||||
Container(
|
||||
// color: Colors.yellow,
|
||||
margin: EdgeInsets.symmetric(horizontal: 16.sp),
|
||||
child: SizedBox(
|
||||
height: Get.height -
|
||||
MediaQuery.of(context).padding.top -
|
||||
MediaQuery.of(context).padding.bottom -
|
||||
300.sp,
|
||||
child: TextField(
|
||||
controller:
|
||||
controller.textEditingController,
|
||||
onChanged: (value) {
|
||||
controller.update();
|
||||
maxLines: 15,
|
||||
scrollController: logic.textscrollController,
|
||||
// scrollPhysics: NeverScrollableScrollPhysics(),
|
||||
textAlignVertical: TextAlignVertical.center,
|
||||
maxLength: 200,
|
||||
controller: logic.textEditingController,
|
||||
|
||||
onChanged: (msg) {
|
||||
logic.update();
|
||||
},
|
||||
onTap: () {
|
||||
isShowKeyboard = true;
|
||||
setState(() {});
|
||||
logic.update();
|
||||
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
counterText: '',
|
||||
// isCollapsed: true,
|
||||
hintText: '请输入...(左下角上传图片或视频)',
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.grey.shade300,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
counterStyle: TextStyle(
|
||||
color: Colors.grey.shade300,
|
||||
fontSize: 14.0,
|
||||
),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 17.0.sp),
|
||||
maxLines: 32,
|
||||
maxLength: 200,
|
||||
decoration: InputDecoration(
|
||||
hintStyle: TextStyle(
|
||||
color: const Color.fromRGBO(
|
||||
255, 255, 255, 0.6),
|
||||
fontSize: 14.sp),
|
||||
hintText: '请输入...(左下角上传图片或视频)',
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.only(
|
||||
left: 17.sp, right: 17.sp),
|
||||
counter: const Text('')),
|
||||
fontSize: 14.0.sp,
|
||||
height: 1.5.sp,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
),
|
||||
),
|
||||
|
||||
// SizedBox(
|
||||
// height: Get.height -
|
||||
// MediaQuery.of(context)
|
||||
// .padding
|
||||
// .top -
|
||||
// MediaQuery.of(context)
|
||||
// .padding
|
||||
// .bottom -
|
||||
// 0.sp,
|
||||
// child: TextField(
|
||||
// controller: controller
|
||||
// .textEditingController,
|
||||
// scrollController:
|
||||
// logic.textscrollController,
|
||||
// textAlignVertical:
|
||||
// TextAlignVertical.center,
|
||||
// // scrollPhysics: NeverScrollableScrollPhysics(),
|
||||
// onChanged: (value) {
|
||||
// controller.update();
|
||||
// },
|
||||
// onTap: () {
|
||||
// isShowKeyboard = true;
|
||||
// setState(() {});
|
||||
// },
|
||||
// style: TextStyle(
|
||||
// color: Colors.white,
|
||||
// fontSize: 17.0.sp),
|
||||
// maxLines: 32,
|
||||
// maxLength: 200,
|
||||
// decoration: InputDecoration(
|
||||
// hintStyle: TextStyle(
|
||||
// color:
|
||||
// const Color.fromRGBO(
|
||||
// 255,
|
||||
// 255,
|
||||
// 255,
|
||||
// 0.6),
|
||||
// fontSize: 14.sp),
|
||||
// hintText:
|
||||
// '请输入...(左下角上传图片或视频)',
|
||||
// border: InputBorder.none,
|
||||
// contentPadding:
|
||||
// EdgeInsets.only(
|
||||
// left: 17.sp,
|
||||
// right: 17.sp),
|
||||
// counter: const Text('')),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 10.sp),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(child: Container()),
|
||||
Text(
|
||||
'${controller.textEditingController.text.length}/200',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12.sp),
|
||||
color: Colors.white, fontSize: 12.sp),
|
||||
),
|
||||
InkWell(onTap: () {
|
||||
navigateToContentGuidelines();
|
||||
},child: Container(margin: EdgeInsets.only(left: 5.sp),height: 20.sp,width: 20.sp,decoration: BoxDecoration(
|
||||
// color: const Color(0xFF898F99),
|
||||
borderRadius: BorderRadius.circular(10.sp),
|
||||
border: Border.all(color: Color(0xFF898F99),width: 1)
|
||||
),child: Icon(Icons.question_mark,color: const Color(0xFF898F99),size: 16.sp,))),
|
||||
|
||||
SizedBox(
|
||||
width: 15.sp,
|
||||
)
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
// Positioned(
|
||||
// right: 15.sp,
|
||||
// top: 100.sp,
|
||||
// child:),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 180.sp),
|
||||
child: _imageAdapter(controller)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 180.sp, left: 15.sp, right: 15.sp),
|
||||
child: _showVideo(controller),
|
||||
)
|
||||
],
|
||||
),
|
||||
)),
|
||||
if (!isShowKeyboard)
|
||||
Container(
|
||||
height: 90.sp,
|
||||
padding: EdgeInsets.only(
|
||||
left: 17.sp, right: 17.sp, bottom: 5.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
optionAtWidget(),
|
||||
Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.showImg();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('photo'),
|
||||
width: 30.sp,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
logic.showVideo();
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('video'),
|
||||
width: 30.sp,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
if (controller.vip == 2) {
|
||||
controller.isCheck =
|
||||
!controller.isCheck;
|
||||
controller.update();
|
||||
} else {
|
||||
showOKToast(
|
||||
"至尊喊话为年会员特权,开通年会员即可享受哦~");
|
||||
controller.showRechargeDialog();
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getCircleImage(
|
||||
controller.isCheck
|
||||
? 'check'
|
||||
: 'uncheck'),
|
||||
width: 17.5.sp,
|
||||
),
|
||||
SizedBox(
|
||||
width: 4.sp,
|
||||
),
|
||||
Text(
|
||||
'使用至尊喊话',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
navigateToContentGuidelines();
|
||||
},
|
||||
child: Text(
|
||||
'内容规范',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
if (isShowKeyboard)
|
||||
Positioned(
|
||||
bottom: keyboardSize,
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
height: 90.sp,
|
||||
height: 85.sp,
|
||||
margin: EdgeInsets.only(bottom: 15.sp),
|
||||
color: Colors.transparent,
|
||||
padding: EdgeInsets.only(
|
||||
left: 17.sp, right: 17.sp, bottom: 5.sp),
|
||||
left: 17.sp, right: 17.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
optionAtWidget(),
|
||||
Expanded(
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
@ -333,7 +370,26 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
width: 30.sp,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
Spacer(),
|
||||
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
FocusManager.instance.primaryFocus
|
||||
?.unfocus();
|
||||
isShowKeyboard = false;
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
'收起',
|
||||
style: TextStyle(
|
||||
color: isShowKeyboard ? Colors.white : Colors.transparent, fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Positioned(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
if (controller.vip == 2) {
|
||||
@ -369,26 +425,130 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
navigateToContentGuidelines();
|
||||
},
|
||||
child: Text(
|
||||
'内容规范',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// if (isShowKeyboard)
|
||||
// Column(
|
||||
// children: [
|
||||
// Expanded(child: Container()),
|
||||
// Container(
|
||||
// width: Get.width,
|
||||
// height: 105.sp,
|
||||
// // color: isShowKeyboard
|
||||
// // ? AppColor.bgColor
|
||||
// // : Colors.transparent,
|
||||
// margin: EdgeInsets.only(bottom: keyboardSize),
|
||||
// padding: EdgeInsets.only(
|
||||
// left: 17.sp, right: 17.sp, bottom: 5.sp),
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Container(
|
||||
// margin: EdgeInsets.only(bottom: 10.sp),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Expanded(child: Container()),
|
||||
// Text(
|
||||
// '${controller.textEditingController.text.length}/200',
|
||||
// style: TextStyle(
|
||||
// color: Colors.white, fontSize: 12.sp),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: 15.sp,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// optionAtWidget(),
|
||||
// Row(
|
||||
// children: [
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// logic.showImg();
|
||||
// },
|
||||
// child: Image.asset(
|
||||
// getCircleImage('photo'),
|
||||
// width: 30.sp,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// width: 16,
|
||||
// ),
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// logic.showVideo();
|
||||
// },
|
||||
// child: Image.asset(
|
||||
// getCircleImage('video'),
|
||||
// width: 30.sp,
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: GestureDetector(
|
||||
// onTap: () {
|
||||
// if (controller.vip == 2) {
|
||||
// controller.isCheck =
|
||||
// !controller.isCheck;
|
||||
// controller.update();
|
||||
// } else {
|
||||
// showOKToast("至尊喊话为年会员特权,开通年会员即可享受哦~");
|
||||
// controller.showRechargeDialog();
|
||||
// }
|
||||
// },
|
||||
// child: Row(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.center,
|
||||
// children: [
|
||||
// Image.asset(
|
||||
// getCircleImage(controller.isCheck
|
||||
// ? 'check'
|
||||
// : 'uncheck'),
|
||||
// width: 17.5.sp,
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: 4.sp,
|
||||
// ),
|
||||
// Text(
|
||||
// '使用至尊喊话',
|
||||
// style: TextStyle(
|
||||
// color: Colors.white,
|
||||
// fontSize: 16.sp),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// FocusManager.instance.primaryFocus
|
||||
// ?.unfocus();
|
||||
// isShowKeyboard = false;
|
||||
// if (mounted) {
|
||||
// setState(() {});
|
||||
// }
|
||||
// },
|
||||
// child: Text(
|
||||
// '收起',
|
||||
// style: TextStyle(
|
||||
// color: Colors.white, fontSize: 14.sp),
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
)));
|
||||
});
|
||||
}
|
||||
@ -408,16 +568,14 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
child: Container(
|
||||
height: 30.sp,
|
||||
width: Get.width,
|
||||
padding: EdgeInsets.only(left: 4.sp,right: 4.sp),
|
||||
padding: EdgeInsets.only(left: 4.sp, right: 4.sp),
|
||||
margin: EdgeInsets.only(
|
||||
|
||||
// left: 15.sp,
|
||||
bottom: 10.sp,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoColors.systemGrey.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(15.sp)
|
||||
),
|
||||
borderRadius: BorderRadius.circular(15.sp)),
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@ -509,7 +667,8 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.all(0.2.sp),
|
||||
padding: EdgeInsets.only(left: 5.sp, right: 5.sp, top: 5.sp),
|
||||
padding:
|
||||
EdgeInsets.only(left: 5.sp, right: 5.sp, top: 5.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
color: const Color(0xFF392D53),
|
||||
@ -527,7 +686,9 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4.sp,),
|
||||
SizedBox(
|
||||
height: 4.sp,
|
||||
),
|
||||
Text(
|
||||
interest.pushTitle,
|
||||
style: TextStyle(
|
||||
@ -537,10 +698,14 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
),
|
||||
],
|
||||
)),
|
||||
Positioned(top: 2.sp,right:4.sp,child: Image.asset(
|
||||
Positioned(
|
||||
top: 2.sp,
|
||||
right: 4.sp,
|
||||
child: Image.asset(
|
||||
getHomeImage('icon_in'),
|
||||
width: 24.sp,
|
||||
),)
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -560,7 +725,9 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
|
||||
// Widget _maxVideo(Call_outLogic controller){
|
||||
Widget _mixVideo(Call_outLogic controller) {
|
||||
return SizedBox(
|
||||
return Container(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: SizedBox(
|
||||
width: controller.videoPlayerController!.value.size.width <
|
||||
controller.videoPlayerController!.value.size.height
|
||||
? 135.sp
|
||||
@ -614,18 +781,20 @@ class _Call_outPageState extends State<Call_outPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _imageAdapter(Call_outLogic controller) {
|
||||
return GridView.builder(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, // 每行显示的项目数量
|
||||
crossAxisCount: 3,
|
||||
),
|
||||
itemCount: controller.state.imaglist.length, // 项目的总数量,包括固定图片和接口获取的项目
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Container(
|
||||
margin: EdgeInsets.all(5.sp),
|
||||
margin: EdgeInsets.all(2.5.sp),
|
||||
child: Center(
|
||||
child: _buildImageItem(
|
||||
controller.state.imaglist[index], controller, index)),
|
||||
|
||||
@ -359,7 +359,6 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_openEmojiPanel() {
|
||||
widget.onCursorChange();
|
||||
showKeyboard = showEmojiPanel;
|
||||
@ -542,10 +541,10 @@ class _TIMTextFieldLayoutNarrowState
|
||||
showSendSoundText = !showSendSoundText;
|
||||
});
|
||||
} else {
|
||||
|
||||
//未授权则发起一次申请
|
||||
if (Platform.isAndroid && !isShowVoiceOverLay) {
|
||||
EventBusManager.fire(PermissionInfo('麦克风权限申请说明', '为了发送语音消息,需要获取麦克风权限'));
|
||||
EventBusManager.fire(PermissionInfo(
|
||||
'麦克风权限申请说明', '为了发送语音消息,需要获取麦克风权限'));
|
||||
}
|
||||
var data =
|
||||
await Permission.microphone.request();
|
||||
@ -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,7 +764,8 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
getTakeImageFile();
|
||||
},
|
||||
child: Opacity(opacity: 0.75,
|
||||
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!});
|
||||
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,8 +1036,11 @@ 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();
|
||||
@ -1025,15 +1048,19 @@ class _TIMTextFieldLayoutNarrowState
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var result = await DioManager()
|
||||
.post(url: Api.unlockWx, params: {'targetUserId': userInfoBean!.id});
|
||||
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(
|
||||
@ -1101,23 +1133,20 @@ class _TIMTextFieldLayoutNarrowState
|
||||
int code = data['code'];
|
||||
if (code == 200) {
|
||||
try {
|
||||
var result =
|
||||
await DioManager.instance.get(url: Api.adImstate + widget.conversationID.split('_').last);
|
||||
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'),
|
||||
body: Open_vip_tipPage(false, 'chat'),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
enableDrag: false);
|
||||
imStatusOK = false;
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
|
||||
}
|
||||
} 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 变量
|
||||
|
||||
@ -1495,7 +1530,9 @@ 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,
|
||||
@ -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,19 +286,20 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
logic.update();
|
||||
} else if (int.parse(event) == 8) {
|
||||
//有新的喊话
|
||||
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') {
|
||||
'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();
|
||||
|
||||
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,7 +390,9 @@ class _HomePageState extends State<HomePage>
|
||||
try {
|
||||
overlayEntry!.remove();
|
||||
} catch (e) {}
|
||||
|
||||
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>();
|
||||
@ -394,6 +401,7 @@ class _HomePageState extends State<HomePage>
|
||||
calloutLogic.isMore = true;
|
||||
calloutLogic.refreshController.resetNoData();
|
||||
calloutLogic.loadData();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width - 8,
|
||||
@ -412,21 +420,11 @@ 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(
|
||||
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,
|
||||
@ -446,7 +444,6 @@ class _HomePageState extends State<HomePage>
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
// width: 70.sp,
|
||||
child: Text(
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:app_settings/app_settings.dart';
|
||||
@ -32,9 +31,8 @@ class Complete_materialLogic extends GetxController {
|
||||
// TODO: implement onReady
|
||||
// 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,33 +102,42 @@ 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{
|
||||
} 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, "填写/更新微信需要消耗{}小票哦");
|
||||
|
||||
} else {
|
||||
wxStatusInfo['${data['code']}'] = data['msg'];
|
||||
}
|
||||
@ -142,13 +148,11 @@ class Complete_materialLogic extends GetxController {
|
||||
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;
|
||||
}
|
||||
@ -276,12 +276,12 @@ 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;
|
||||
}
|
||||
@ -302,9 +302,9 @@ class Complete_materialLogic extends GetxController {
|
||||
state.brithday = time;
|
||||
}
|
||||
|
||||
|
||||
if (state.wxEditingController.text.isNotEmpty) {
|
||||
bool isPass = false;
|
||||
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}$');
|
||||
@ -318,15 +318,35 @@ class Complete_materialLogic extends GetxController {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
if (wxStatusInfo.containsKey('4000')) {
|
||||
showOKToast(wxStatusInfo['40000']);
|
||||
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,18 +438,20 @@ 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 (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}$');
|
||||
@ -445,14 +466,36 @@ class Complete_materialLogic extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
||||
if (wxStatusInfo.containsKey('4000')) {
|
||||
showOKToast(wxStatusInfo['40000']);
|
||||
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');
|
||||
@ -471,17 +514,15 @@ class Complete_materialLogic extends GetxController {
|
||||
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,26 +396,31 @@ 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(
|
||||
:MediaQuery.removePadding(
|
||||
removeTop: true,
|
||||
context: context,
|
||||
child: GridView.builder(
|
||||
controller: scrollController,
|
||||
itemCount: lists.album!.length,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, //横轴三个子widget
|
||||
crossAxisSpacing: 8.sp,
|
||||
mainAxisSpacing: 8.sp,
|
||||
crossAxisSpacing: 4.sp,
|
||||
mainAxisSpacing: 4.sp,
|
||||
childAspectRatio: 0.8 //宽高比为1时,子widget
|
||||
),
|
||||
itemBuilder: (contentxt, currentIndex) {
|
||||
@ -439,6 +446,7 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
if (widget.userId.isEmpty)
|
||||
Container(
|
||||
width: Get.width,
|
||||
@ -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,7 +746,10 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
borderRadius: BorderRadius.circular(6.sp),
|
||||
child:
|
||||
VideoItemWidget(lists.album![0].url!))
|
||||
: GridView.builder(
|
||||
: MediaQuery.removePadding(
|
||||
removeTop: true,
|
||||
context: context,
|
||||
child: GridView.builder(
|
||||
controller: scrollController,
|
||||
// shrinkWrap: true,
|
||||
itemCount: lists.album!.length,
|
||||
@ -770,7 +786,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
||||
),
|
||||
),
|
||||
);
|
||||
}))
|
||||
}),
|
||||
))
|
||||
: 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);
|
||||
} 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