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.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 85
|
versionCode 87
|
||||||
versionName "2.4.0"
|
versionName "2.4.2"
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
vivo_APPID: "105669716",
|
vivo_APPID: "105669716",
|
||||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
|
|||||||
@ -45,6 +45,13 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>weixinURLParamsAPI</string>
|
||||||
|
<string>weixinULAPI</string>
|
||||||
|
<string>weixin</string>
|
||||||
|
<string>wechat</string>
|
||||||
|
</array>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
|
|||||||
@ -37,6 +37,9 @@ class Call_outLogic extends GetxController {
|
|||||||
final Call_outState state = Call_outState();
|
final Call_outState state = Call_outState();
|
||||||
TextEditingController textEditingController = TextEditingController();
|
TextEditingController textEditingController = TextEditingController();
|
||||||
ScrollController scrollController = ScrollController();
|
ScrollController scrollController = ScrollController();
|
||||||
|
|
||||||
|
ScrollController allScrollController = ScrollController();
|
||||||
|
ScrollController textscrollController = ScrollController();
|
||||||
bool isCheck = false;
|
bool isCheck = false;
|
||||||
late ConfigBean configBean;
|
late ConfigBean configBean;
|
||||||
String circleName = "";
|
String circleName = "";
|
||||||
@ -335,7 +338,7 @@ class Call_outLogic extends GetxController {
|
|||||||
// String outputPath = path+"ceshishuiyin";
|
// String outputPath = path+"ceshishuiyin";
|
||||||
// File(outputPath).writeAsBytesSync(img.encodeJpg(watermarkedImage));
|
// File(outputPath).writeAsBytesSync(img.encodeJpg(watermarkedImage));
|
||||||
|
|
||||||
SmartDialog.showLoading();
|
SmartDialog.showLoading(msg: '上传中');
|
||||||
uploadImage(quToken, pickedFile!, ImgPath.CALL_OUT_IMAGE, (result) {
|
uploadImage(quToken, pickedFile!, ImgPath.CALL_OUT_IMAGE, (result) {
|
||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
state.imaglist.add(result);
|
state.imaglist.add(result);
|
||||||
@ -387,12 +390,13 @@ class Call_outLogic extends GetxController {
|
|||||||
if (null == pickedFile) {
|
if (null == pickedFile) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SmartDialog.showLoading();
|
SmartDialog.showLoading(msg: '上传中');
|
||||||
// var path = await getApplicationSupportDirectoryPath();
|
// var path = await getApplicationSupportDirectoryPath();
|
||||||
videoPlayerController = VideoPlayerController.file(
|
videoPlayerController = VideoPlayerController.file(
|
||||||
File(pickedFile.path),
|
File(pickedFile.path),
|
||||||
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
|
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
|
||||||
);
|
);
|
||||||
|
|
||||||
await videoPlayerController?.initialize();
|
await videoPlayerController?.initialize();
|
||||||
final Duration videoDuration = videoPlayerController!.value.duration;
|
final Duration videoDuration = videoPlayerController!.value.duration;
|
||||||
final double durationInSeconds = videoDuration.inSeconds.toDouble();
|
final double durationInSeconds = videoDuration.inSeconds.toDouble();
|
||||||
@ -417,57 +421,8 @@ class Call_outLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
//压缩 感觉越压越大
|
|
||||||
// try {
|
|
||||||
// final XFile? pickedFile = await _picker.pickVideo(
|
|
||||||
// source: ImageSource.gallery,
|
|
||||||
// );
|
|
||||||
// if(null==pickedFile){
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// SmartDialog.showLoading();
|
|
||||||
// var path = await getApplicationSupportDirectoryPath();
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// compressVideo(pickedFile.path, path, (result) async {
|
|
||||||
// print(result);
|
|
||||||
// videoPlayerController = VideoPlayerController.file(
|
|
||||||
// File(result),
|
|
||||||
// videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
|
|
||||||
// );
|
|
||||||
// await videoPlayerController?.initialize();
|
|
||||||
// final Duration videoDuration = videoPlayerController!.value.duration;
|
|
||||||
// final double durationInSeconds = videoDuration.inSeconds.toDouble();
|
|
||||||
// print("////////////");
|
|
||||||
// print(durationInSeconds.toString());
|
|
||||||
// if (durationInSeconds >= 5 && durationInSeconds <= 30) {
|
|
||||||
// videoPlayerController?.setLooping(true);
|
|
||||||
// videoPlayerController?.addListener(() {
|
|
||||||
// if (!videoPlayerController!.value.isPlaying) {
|
|
||||||
// // Navigator.pop(context);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// updataQiniu(result, pickedFile.name, CONFIG.CALL_OUT_VIDEO, quToken,
|
|
||||||
// (result) {
|
|
||||||
// SmartDialog.dismiss();
|
|
||||||
// state.videolist.add(result);
|
|
||||||
// update();
|
|
||||||
// });
|
|
||||||
// } else {
|
|
||||||
// SmartDialog.dismiss();
|
|
||||||
// showToast("请上传5-30秒的视频");
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// } catch (e) {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<ClosedCaptionFile> _loadCaptions(BuildContext context) async {
|
|
||||||
final String fileContents = await DefaultAssetBundle.of(context)
|
|
||||||
.loadString('assets/bumble_bee_captions.vtt');
|
|
||||||
return WebVTTCaptionFile(
|
|
||||||
fileContents); // For vtt files, use WebVTTCaptionFile
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyBean {
|
class MyBean {
|
||||||
|
|||||||
@ -31,19 +31,30 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
logic.scrollController.addListener(() {
|
logic.scrollController.addListener(() {
|
||||||
if (logic.scrollController.position.pixels ==
|
if (logic.scrollController.position.pixels ==
|
||||||
logic.scrollController.position.maxScrollExtent) {
|
logic.scrollController.position.maxScrollExtent) {
|
||||||
logic.startSelectCircleActivity();
|
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
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
super.dispose();
|
super.dispose();
|
||||||
logic.scrollController.dispose();
|
logic.scrollController.dispose();
|
||||||
|
logic.textscrollController.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -54,6 +65,10 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
|
isShowKeyboard = false;
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
@ -62,8 +77,11 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
image: AssetImage(getBaseImage('home_back')))),
|
image: AssetImage(getBaseImage('home_back')))),
|
||||||
child: Scaffold(
|
child: Stack(
|
||||||
resizeToAvoidBottomInset: false,
|
fit: StackFit.expand,
|
||||||
|
children: [
|
||||||
|
Scaffold(
|
||||||
|
// resizeToAvoidBottomInset: false,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: MyAppBar(
|
appBar: MyAppBar(
|
||||||
centerTitle: '圈内喊话',
|
centerTitle: '圈内喊话',
|
||||||
@ -75,11 +93,16 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
logic.sendShout();
|
logic.sendShout();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: Container(
|
||||||
child: Stack(
|
child: Column(
|
||||||
fit: StackFit.expand,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
controller: logic.allScrollController,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
@ -88,36 +111,42 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 45.sp,
|
height: 45.sp,
|
||||||
padding:
|
padding: EdgeInsets.only(
|
||||||
EdgeInsets.only(left: 17.sp, right: 17.sp),
|
left: 17.sp, right: 17.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'🌍选择圈子:',
|
'🌍选择圈子:',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white, fontSize: 16.sp),
|
color: Colors.white,
|
||||||
|
fontSize: 16.sp),
|
||||||
),
|
),
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
logic.circleName == ''
|
logic.circleName == ''
|
||||||
? Container(
|
? Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
'选择合适的圈子更容易吸引圈友',
|
'选择合适的圈子更容易吸引圈友',
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(color: Colors.grey),
|
color: Colors.grey),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Container(
|
: Container(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: 7.sp, right: 7.sp),
|
left: 7.sp,
|
||||||
|
right: 7.sp),
|
||||||
height: 21.sp,
|
height: 21.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(
|
BorderRadius
|
||||||
21 * 0.5.sp),
|
.circular(21 *
|
||||||
gradient: const LinearGradient(
|
0.5.sp),
|
||||||
begin: Alignment.centerLeft,
|
gradient:
|
||||||
end: Alignment.centerRight,
|
const LinearGradient(
|
||||||
|
begin: Alignment
|
||||||
|
.centerLeft,
|
||||||
|
end: Alignment
|
||||||
|
.centerRight,
|
||||||
colors: [
|
colors: [
|
||||||
Color(0xff0AFCFF),
|
Color(0xff0AFCFF),
|
||||||
Color(0xffD739EA)
|
Color(0xffD739EA)
|
||||||
@ -146,170 +175,178 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Container(
|
||||||
child: Container(
|
padding: EdgeInsets.only(
|
||||||
padding: EdgeInsets.only(top: 15.sp),
|
top: 5.sp, bottom: 5.sp),
|
||||||
child: Stack(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
if (controller
|
||||||
children: [
|
.state.imaglist.isNotEmpty)
|
||||||
SizedBox(
|
Container(
|
||||||
height: 150.sp,
|
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(
|
child: TextField(
|
||||||
controller:
|
maxLines: 15,
|
||||||
controller.textEditingController,
|
scrollController: logic.textscrollController,
|
||||||
onChanged: (value) {
|
// scrollPhysics: NeverScrollableScrollPhysics(),
|
||||||
controller.update();
|
textAlignVertical: TextAlignVertical.center,
|
||||||
|
maxLength: 200,
|
||||||
|
controller: logic.textEditingController,
|
||||||
|
|
||||||
|
onChanged: (msg) {
|
||||||
|
logic.update();
|
||||||
},
|
},
|
||||||
onTap: () {
|
onTap: () {
|
||||||
isShowKeyboard = true;
|
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(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 17.0.sp),
|
fontSize: 14.0.sp,
|
||||||
maxLines: 32,
|
height: 1.5.sp,
|
||||||
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('')),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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: [
|
children: [
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
Text(
|
Text(
|
||||||
'${controller.textEditingController.text.length}/200',
|
'${controller.textEditingController.text.length}/200',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white, fontSize: 12.sp),
|
||||||
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(
|
SizedBox(
|
||||||
width: 15.sp,
|
width: 15.sp,
|
||||||
)
|
),
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Positioned(
|
),
|
||||||
// right: 15.sp,
|
|
||||||
// top: 100.sp,
|
|
||||||
// child:),
|
|
||||||
Container(
|
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,
|
width: Get.width,
|
||||||
height: 90.sp,
|
height: 85.sp,
|
||||||
|
margin: EdgeInsets.only(bottom: 15.sp),
|
||||||
|
color: Colors.transparent,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: 17.sp, right: 17.sp, bottom: 5.sp),
|
left: 17.sp, right: 17.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
optionAtWidget(),
|
optionAtWidget(),
|
||||||
|
Expanded(
|
||||||
|
child: Stack(
|
||||||
|
fit: StackFit.expand,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
@ -333,7 +370,26 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
width: 30.sp,
|
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(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (controller.vip == 2) {
|
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),
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// )
|
||||||
],
|
],
|
||||||
),
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)));
|
)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -410,14 +570,12 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
width: Get.width,
|
width: Get.width,
|
||||||
padding: EdgeInsets.only(left: 4.sp, right: 4.sp),
|
padding: EdgeInsets.only(left: 4.sp, right: 4.sp),
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
|
|
||||||
// left: 15.sp,
|
// left: 15.sp,
|
||||||
bottom: 10.sp,
|
bottom: 10.sp,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: CupertinoColors.systemGrey.withOpacity(0.2),
|
color: CupertinoColors.systemGrey.withOpacity(0.2),
|
||||||
borderRadius: BorderRadius.circular(15.sp)
|
borderRadius: BorderRadius.circular(15.sp)),
|
||||||
),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@ -509,7 +667,8 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.all(0.2.sp),
|
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(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
color: const Color(0xFF392D53),
|
color: const Color(0xFF392D53),
|
||||||
@ -527,7 +686,9 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 4.sp,),
|
SizedBox(
|
||||||
|
height: 4.sp,
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
interest.pushTitle,
|
interest.pushTitle,
|
||||||
style: TextStyle(
|
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'),
|
getHomeImage('icon_in'),
|
||||||
width: 24.sp,
|
width: 24.sp,
|
||||||
),)
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -560,7 +725,9 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
|
|
||||||
// Widget _maxVideo(Call_outLogic controller){
|
// Widget _maxVideo(Call_outLogic controller){
|
||||||
Widget _mixVideo(Call_outLogic controller) {
|
Widget _mixVideo(Call_outLogic controller) {
|
||||||
return SizedBox(
|
return Container(
|
||||||
|
alignment: Alignment.bottomLeft,
|
||||||
|
child: SizedBox(
|
||||||
width: controller.videoPlayerController!.value.size.width <
|
width: controller.videoPlayerController!.value.size.width <
|
||||||
controller.videoPlayerController!.value.size.height
|
controller.videoPlayerController!.value.size.height
|
||||||
? 135.sp
|
? 135.sp
|
||||||
@ -614,18 +781,20 @@ class _Call_outPageState extends State<Call_outPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _imageAdapter(Call_outLogic controller) {
|
Widget _imageAdapter(Call_outLogic controller) {
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3, // 每行显示的项目数量
|
crossAxisCount: 3,
|
||||||
),
|
),
|
||||||
itemCount: controller.state.imaglist.length, // 项目的总数量,包括固定图片和接口获取的项目
|
itemCount: controller.state.imaglist.length, // 项目的总数量,包括固定图片和接口获取的项目
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.all(5.sp),
|
margin: EdgeInsets.all(2.5.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: _buildImageItem(
|
child: _buildImageItem(
|
||||||
controller.state.imaglist[index], controller, index)),
|
controller.state.imaglist[index], controller, index)),
|
||||||
|
|||||||
@ -359,7 +359,6 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_openEmojiPanel() {
|
_openEmojiPanel() {
|
||||||
widget.onCursorChange();
|
widget.onCursorChange();
|
||||||
showKeyboard = showEmojiPanel;
|
showKeyboard = showEmojiPanel;
|
||||||
@ -542,10 +541,10 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
showSendSoundText = !showSendSoundText;
|
showSendSoundText = !showSendSoundText;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//未授权则发起一次申请
|
//未授权则发起一次申请
|
||||||
if (Platform.isAndroid && !isShowVoiceOverLay) {
|
if (Platform.isAndroid && !isShowVoiceOverLay) {
|
||||||
EventBusManager.fire(PermissionInfo('麦克风权限申请说明', '为了发送语音消息,需要获取麦克风权限'));
|
EventBusManager.fire(PermissionInfo(
|
||||||
|
'麦克风权限申请说明', '为了发送语音消息,需要获取麦克风权限'));
|
||||||
}
|
}
|
||||||
var data =
|
var data =
|
||||||
await Permission.microphone.request();
|
await Permission.microphone.request();
|
||||||
@ -751,9 +750,10 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
getImageFile();
|
getImageFile();
|
||||||
},
|
},
|
||||||
child:
|
child: Opacity(
|
||||||
Opacity(opacity: 0.75,
|
opacity: 0.75,
|
||||||
child: Image.asset(getMsgImage('photo'), width: 40.sp)),
|
child: Image.asset(getMsgImage('photo'),
|
||||||
|
width: 40.sp)),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -764,7 +764,8 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
getTakeImageFile();
|
getTakeImageFile();
|
||||||
},
|
},
|
||||||
child: Opacity(opacity: 0.75,
|
child: Opacity(
|
||||||
|
opacity: 0.75,
|
||||||
child: Image.asset(getMsgImage('take_photo'),
|
child: Image.asset(getMsgImage('take_photo'),
|
||||||
width: 40.sp),
|
width: 40.sp),
|
||||||
),
|
),
|
||||||
@ -792,7 +793,8 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
getVideoFile(ImageSource.gallery);
|
getVideoFile(ImageSource.gallery);
|
||||||
},
|
},
|
||||||
child: Opacity(opacity: 0.75,
|
child: Opacity(
|
||||||
|
opacity: 0.75,
|
||||||
child: Image.asset(getMsgImage('icon_video'),
|
child: Image.asset(getMsgImage('icon_video'),
|
||||||
width: 40.sp),
|
width: 40.sp),
|
||||||
),
|
),
|
||||||
@ -806,7 +808,8 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
getVideoFile(ImageSource.camera);
|
getVideoFile(ImageSource.camera);
|
||||||
},
|
},
|
||||||
child: Opacity(opacity: 0.75,
|
child: Opacity(
|
||||||
|
opacity: 0.75,
|
||||||
child: Image.asset(getMsgImage('icon_video_camera'),
|
child: Image.asset(getMsgImage('icon_video_camera'),
|
||||||
width: 40.sp),
|
width: 40.sp),
|
||||||
),
|
),
|
||||||
@ -864,17 +867,19 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
_showIsCancelBlackDialog(context);
|
_showIsCancelBlackDialog(context);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var reulst1 =
|
var reulst1 = await DioManager.instance.get(
|
||||||
await DioManager.instance.get(url: Api.canMsgRandOne + widget.conversationID.split('_').last);
|
url: Api.canMsgRandOne +
|
||||||
|
widget.conversationID.split('_').last);
|
||||||
if (reulst1['code'] == 200) {
|
if (reulst1['code'] == 200) {
|
||||||
var reulst =
|
var reulst = await DioManager.instance
|
||||||
await DioManager.instance.get(url: Api.msgRandOne);
|
.get(url: Api.msgRandOne);
|
||||||
String text = reulst['data'];
|
String text = reulst['data'];
|
||||||
var result = await widget.model.sendTextMessage(
|
var result = await widget.model.sendTextMessage(
|
||||||
text: text,
|
text: text,
|
||||||
convID: widget.conversationID,
|
convID: widget.conversationID,
|
||||||
convType: ConvType.c2c);
|
convType: ConvType.c2c);
|
||||||
sendHotAction(1, widget.conversationID.split('_').last);
|
sendHotAction(
|
||||||
|
1, widget.conversationID.split('_').last);
|
||||||
} else {
|
} else {
|
||||||
showOKToast(reulst1['msg']);
|
showOKToast(reulst1['msg']);
|
||||||
}
|
}
|
||||||
@ -896,7 +901,9 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
enableDrag: false);
|
enableDrag: false);
|
||||||
}),
|
}),
|
||||||
if (userInfoBean != null && logic.isProd)
|
if (userInfoBean != null && logic.isProd)
|
||||||
userInfoBean!.contact.isNotEmpty ? chatWxActionWidget() : chatWantWxActionWidget()
|
userInfoBean!.contact.isNotEmpty
|
||||||
|
? chatWxActionWidget()
|
||||||
|
: chatWantWxActionWidget()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -908,7 +915,10 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
|
|
||||||
opacityWidget(Widget child) {
|
opacityWidget(Widget child) {
|
||||||
return Opacity(opacity: 0.75,child: widget,);
|
return Opacity(
|
||||||
|
opacity: 0.75,
|
||||||
|
child: widget,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
chatActionWidget(String img, String action, GestureTapCallback onTap) {
|
chatActionWidget(String img, String action, GestureTapCallback onTap) {
|
||||||
@ -931,7 +941,8 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Image.asset( getMsgImage(img),
|
Image.asset(
|
||||||
|
getMsgImage(img),
|
||||||
width: 20.sp,
|
width: 20.sp,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -947,12 +958,15 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
chatWantWxActionWidget() {
|
chatWantWxActionWidget() {
|
||||||
double textWidth = boundingTextSize(Get.context!, userInfoBean!.contact!, TextStyle(color: Colors.white, fontSize: 16.sp)).width;
|
double textWidth = boundingTextSize(Get.context!, userInfoBean!.contact!,
|
||||||
|
TextStyle(color: Colors.white, fontSize: 16.sp))
|
||||||
|
.width;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var result = await DioManager.instance.get(url: Api.noticeWxNum + userInfoBean!.id.toString(),);
|
var result = await DioManager.instance.get(
|
||||||
|
url: Api.noticeWxNum + userInfoBean!.id.toString(),
|
||||||
|
);
|
||||||
if (result['code'] == 200) {
|
if (result['code'] == 200) {
|
||||||
showOKToast('已提醒对方填写');
|
showOKToast('已提醒对方填写');
|
||||||
} else {
|
} else {
|
||||||
@ -990,7 +1004,6 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
'想要联系方式',
|
'想要联系方式',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 13.sp),
|
style: TextStyle(color: Colors.white, fontSize: 13.sp),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
@ -998,17 +1011,24 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
|
|
||||||
chatWxActionWidget() {
|
chatWxActionWidget() {
|
||||||
double textWidth = boundingTextSize(Get.context!, userInfoBean!.contact!, TextStyle(color: Colors.white, fontSize: 16.sp)).width;
|
double textWidth = boundingTextSize(Get.context!, userInfoBean!.contact!,
|
||||||
|
TextStyle(color: Colors.white, fontSize: 16.sp))
|
||||||
|
.width;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (unLockWxNum != 1) {
|
if (unLockWxNum != 1) {
|
||||||
var result = await DioManager().post(url: Api.unlockStatus,params: {'targetUserId':userInfoBean!.id!});
|
var result = await DioManager().post(
|
||||||
|
url: Api.unlockStatus,
|
||||||
|
params: {'targetUserId': userInfoBean!.id!});
|
||||||
if (result['code'] == 200) {
|
if (result['code'] == 200) {
|
||||||
int price = result['data']['unlockPrice'];
|
int price = result['data']['unlockPrice'];
|
||||||
int residueUnlockNum = result['data']['residueUnlockNum'];
|
int residueUnlockNum = result['data']['residueUnlockNum'];
|
||||||
if (price > 0 && (residueUnlockNum == -1 || residueUnlockNum > 0)) {
|
if (price > 0 && (residueUnlockNum == -1 || residueUnlockNum > 0)) {
|
||||||
Get.bottomSheet(UnlockWxTip(userInfoBean!.id.toString(), userInfoBean!.avatar,false),
|
Get.bottomSheet(
|
||||||
isScrollControlled: true, enableDrag: false)
|
UnlockWxTip(userInfoBean!.id.toString(),
|
||||||
|
userInfoBean!.avatar, false),
|
||||||
|
isScrollControlled: true,
|
||||||
|
enableDrag: false)
|
||||||
.then((value) {
|
.then((value) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
sendHotAction(3, userInfoBean!.id.toString());
|
sendHotAction(3, userInfoBean!.id.toString());
|
||||||
@ -1016,8 +1036,11 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (price > 0) {
|
} else if (price > 0) {
|
||||||
Get.bottomSheet(UnlockWxTip(userInfoBean!.id.toString(), userInfoBean!.avatar,true),
|
Get.bottomSheet(
|
||||||
isScrollControlled: true, enableDrag: true)
|
UnlockWxTip(userInfoBean!.id.toString(),
|
||||||
|
userInfoBean!.avatar, true),
|
||||||
|
isScrollControlled: true,
|
||||||
|
enableDrag: true)
|
||||||
.then((value) {
|
.then((value) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
loadUserData();
|
loadUserData();
|
||||||
@ -1025,15 +1048,19 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var result = await DioManager()
|
var result = await DioManager().post(
|
||||||
.post(url: Api.unlockWx, params: {'targetUserId': userInfoBean!.id});
|
url: Api.unlockWx,
|
||||||
|
params: {'targetUserId': userInfoBean!.id});
|
||||||
if (result['code'] == 200) {
|
if (result['code'] == 200) {
|
||||||
showOKToast('解锁成功');
|
showOKToast('解锁成功');
|
||||||
sendHotAction(3, userInfoBean!.id.toString());
|
sendHotAction(3, userInfoBean!.id.toString());
|
||||||
loadUserData();
|
loadUserData();
|
||||||
} else {
|
} else {
|
||||||
Get.bottomSheet(UnlockWxTip(userInfoBean!.id.toString(), userInfoBean!.avatar,true),
|
Get.bottomSheet(
|
||||||
isScrollControlled: true, enableDrag: false)
|
UnlockWxTip(userInfoBean!.id.toString(),
|
||||||
|
userInfoBean!.avatar, true),
|
||||||
|
isScrollControlled: true,
|
||||||
|
enableDrag: false)
|
||||||
.then((value) {
|
.then((value) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
loadUserData();
|
loadUserData();
|
||||||
@ -1046,7 +1073,8 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: textWidth + (userInfoBean!.contact!.contains('*')? 50.sp : 30.sp),
|
width:
|
||||||
|
textWidth + (userInfoBean!.contact!.contains('*') ? 50.sp : 30.sp),
|
||||||
height: 28.sp,
|
height: 28.sp,
|
||||||
margin: EdgeInsets.only(right: 4.sp),
|
margin: EdgeInsets.only(right: 4.sp),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
@ -1066,7 +1094,11 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
width: 4.sp,
|
width: 4.sp,
|
||||||
),
|
),
|
||||||
Image.asset(
|
Image.asset(
|
||||||
getMineImage(userInfoBean!.contactType! == 1 ? 'phone_icon' : userInfoBean!.contactType! == 3 ? 'qq' : 'wx'),
|
getMineImage(userInfoBean!.contactType! == 1
|
||||||
|
? 'phone_icon'
|
||||||
|
: userInfoBean!.contactType! == 3
|
||||||
|
? 'qq'
|
||||||
|
: 'wx'),
|
||||||
width: 20.sp,
|
width: 20.sp,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -1101,8 +1133,8 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
int code = data['code'];
|
int code = data['code'];
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
try {
|
try {
|
||||||
var result =
|
var result = await DioManager.instance
|
||||||
await DioManager.instance.get(url: Api.adImstate + widget.conversationID.split('_').last);
|
.get(url: Api.adImstate + widget.conversationID.split('_').last);
|
||||||
if (result['code'] == 21201) {
|
if (result['code'] == 21201) {
|
||||||
Get.bottomSheet(
|
Get.bottomSheet(
|
||||||
Scaffold(
|
Scaffold(
|
||||||
@ -1114,10 +1146,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
imStatusOK = false;
|
imStatusOK = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
imStatusOK = true;
|
imStatusOK = true;
|
||||||
} else {
|
} else {
|
||||||
@ -1160,16 +1189,25 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
if (widget.userId?.contains('qpqz_prod_10_') ?? false) {
|
if (widget.userId?.contains('qpqz_prod_10_') ?? false) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
var data =
|
var data = await DioManager.instance.get(
|
||||||
await DioManager.instance.get(url: Api.getIsVips,params: {'plate':plate,'targetId':widget.userId!.split('_').last});
|
url: Api.getIsVips,
|
||||||
|
params: {'plate': plate, 'targetId': widget.userId!.split('_').last});
|
||||||
|
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
isVip = !data['data'];
|
isVip = !data['data'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isVip) {
|
if (!isVip) {
|
||||||
showOKToast(plate== 5 ? '开通会员之后才能发送语音' : (plate == 1 || plate == 3) ? '开通会员之后才能发送图片' : '开通会员之后才能发送视频');
|
showOKToast(plate == 5
|
||||||
String source = plate== 5 ? 'chat_send_voice' : (plate == 1 || plate == 3) ? 'chat_send_photo' : 'chat_send_video';
|
? '开通会员之后才能发送语音'
|
||||||
|
: (plate == 1 || plate == 3)
|
||||||
|
? '开通会员之后才能发送图片'
|
||||||
|
: '开通会员之后才能发送视频');
|
||||||
|
String source = plate == 5
|
||||||
|
? 'chat_send_voice'
|
||||||
|
: (plate == 1 || plate == 3)
|
||||||
|
? 'chat_send_photo'
|
||||||
|
: 'chat_send_video';
|
||||||
Get.bottomSheet(
|
Get.bottomSheet(
|
||||||
Scaffold(
|
Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
@ -1184,8 +1222,6 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
return isVip;
|
return isVip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
addChatRecord(String msgContent, String msgId, String sendTime) async {
|
addChatRecord(String msgContent, String msgId, String sendTime) async {
|
||||||
String str = DateTime.now().toString().split('.').first;
|
String str = DateTime.now().toString().split('.').first;
|
||||||
|
|
||||||
@ -1213,7 +1249,6 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
await requestStoragePermission();
|
await requestStoragePermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XFile? pickedFile;
|
XFile? pickedFile;
|
||||||
String? thumbnailPath; // 声明 thumbnailPath 变量
|
String? thumbnailPath; // 声明 thumbnailPath 变量
|
||||||
|
|
||||||
@ -1495,7 +1530,9 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
Get.back();
|
Get.back();
|
||||||
var data = await DioManager.instance.post(
|
var data = await DioManager.instance.post(
|
||||||
url: '${Api.setBlock + widget.conversationID.split('_').last}/block', params: {'status': '0'});
|
url:
|
||||||
|
'${Api.setBlock + widget.conversationID.split('_').last}/block',
|
||||||
|
params: {'status': '0'});
|
||||||
var bean = BaseResponse<dynamic>.fromJson(
|
var bean = BaseResponse<dynamic>.fromJson(
|
||||||
data,
|
data,
|
||||||
(jsonData) => jsonData,
|
(jsonData) => jsonData,
|
||||||
@ -1559,15 +1596,11 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
userInfoBean = bean.data.user;
|
userInfoBean = bean.data.user;
|
||||||
unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1;
|
unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} catch (e) {
|
} catch (e) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class ChatFuncAction {
|
class ChatFuncAction {
|
||||||
int index;
|
int index;
|
||||||
String imId;
|
String imId;
|
||||||
|
|||||||
@ -79,7 +79,8 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
|||||||
child: Container(
|
child: Container(
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColor.bgColor,
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(10.sp),
|
topLeft: Radius.circular(10.sp),
|
||||||
topRight: Radius.circular(10.sp))),
|
topRight: Radius.circular(10.sp))),
|
||||||
@ -87,7 +88,6 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
|||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
children: [
|
children: [
|
||||||
Container(width: Get.width, height: 40.sp),
|
Container(width: Get.width, height: 40.sp),
|
||||||
// "intimacy" -> 2315
|
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 110.sp),
|
margin: EdgeInsets.only(left: 110.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -145,18 +145,26 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
|||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 10.sp,
|
height: 10.sp,
|
||||||
color: AppColor.bgColor,
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
color: AppColor.bgColor,
|
// color: AppColor.bgColor,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||||
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.all(10.sp),
|
margin: EdgeInsets.all(10.sp),
|
||||||
padding: EdgeInsets.all(10.sp),
|
padding: EdgeInsets.all(10.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
color: AppColor.bgColor,
|
||||||
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
// gradient: LinearGradient(
|
||||||
|
// colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||||
borderRadius: BorderRadius.circular(10.sp)),
|
borderRadius: BorderRadius.circular(10.sp)),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -295,7 +303,10 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
color: AppColor.bgColor,
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||||
|
),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
// rewardConfs
|
// rewardConfs
|
||||||
@ -306,7 +317,10 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
|||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
Container(
|
Container(
|
||||||
color: AppColor.bgColor,
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF132B40), Color(0xFF251240)]),
|
||||||
|
),
|
||||||
height: 10.sp + MediaQuery.of(context).padding.bottom,
|
height: 10.sp + MediaQuery.of(context).padding.bottom,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -319,7 +333,7 @@ class _InitmacyDialogState extends State<InitmacyDialog> {
|
|||||||
|
|
||||||
actionWidget(Map info) {
|
actionWidget(Map info) {
|
||||||
return Container(
|
return Container(
|
||||||
color: AppColor.bgColor,
|
// color: AppColor.bgColor,
|
||||||
padding: EdgeInsets.only(top: 20.sp, left: 15.sp, right: 15.sp),
|
padding: EdgeInsets.only(top: 20.sp, left: 15.sp, right: 15.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -1175,7 +1175,6 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 72.sp,
|
height: 72.sp,
|
||||||
child: Row(
|
child: Row(
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: ()async {
|
onTap: ()async {
|
||||||
@ -1492,6 +1491,7 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
|
|||||||
|
|
||||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 72.sp,
|
height: 72.sp,
|
||||||
|
|||||||
@ -529,9 +529,9 @@ class _NewPeopleItemState extends State<NewPeopleItem> {
|
|||||||
// 新人报道(7天内)-在n个圈子发布n喊话—最新加入了「**圈」-填写了联系方式-成为「**榜榜首」-绑定了「**」关系
|
// 新人报道(7天内)-在n个圈子发布n喊话—最新加入了「**圈」-填写了联系方式-成为「**榜榜首」-绑定了「**」关系
|
||||||
|
|
||||||
item.vip == 2
|
item.vip == 2
|
||||||
? '成为了「年VIP」'
|
? '通过开通年度会员成为「年VIP」'
|
||||||
: item.isBacker == 1
|
: item.isBacker == 1
|
||||||
? '通过金主认证'
|
? '通过充值小票成为「金主」'
|
||||||
: item.lastAgentInterest
|
: item.lastAgentInterest
|
||||||
.isNotEmpty
|
.isNotEmpty
|
||||||
? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏'
|
? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏'
|
||||||
@ -556,7 +556,7 @@ class _NewPeopleItemState extends State<NewPeopleItem> {
|
|||||||
1
|
1
|
||||||
? '填写了联系方式'
|
? '填写了联系方式'
|
||||||
: item.lastRankTopDesc.isNotEmpty
|
: item.lastRankTopDesc.isNotEmpty
|
||||||
? '成为「${item.lastRankTopDesc}」'
|
? '通过冲榜成为「${item.lastRankTopDesc}」'
|
||||||
: '绑定了「${item.lastUserRelation}」关系',
|
: '绑定了「${item.lastUserRelation}」关系',
|
||||||
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@ -20,6 +20,7 @@ class _VideoItemWidgetState extends State<VideoItemWidget> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
|
|
||||||
width: Get.width - 120.sp,
|
width: Get.width - 120.sp,
|
||||||
alignment: Alignment.topLeft,
|
alignment: Alignment.topLeft,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
|
|||||||
@ -286,19 +286,20 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
logic.update();
|
logic.update();
|
||||||
} else if (int.parse(event) == 8) {
|
} 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']);
|
Map jump = jsonDecode(jsonData['content']);
|
||||||
if (jump.containsKey('jumpInfo')) {
|
if (jump.containsKey('jumpInfo')) {
|
||||||
Map jumpInfo = jsonDecode(jump['jumpInfo']);
|
Map jumpInfo = jsonDecode(jump['jumpInfo']);
|
||||||
if (jumpInfo['scene'] == 'receive_user_welfare' || jumpInfo['scene'] ==
|
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));
|
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('一个福袋')) {
|
if (jump['content'].toString().contains('一个福袋')) {
|
||||||
logic.loadBannerData();
|
logic.loadBannerData();
|
||||||
}
|
}
|
||||||
@ -555,7 +556,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
data['data']['account_id'].toString(), data['data']['user_sig']);
|
data['data']['account_id'].toString(), data['data']['user_sig']);
|
||||||
accountId = data['data']['account_id'].toString();
|
accountId = data['data']['account_id'].toString();
|
||||||
} else {
|
} else {
|
||||||
if (Get.currentRoute != Routes.Login) {
|
if (Get.currentRoute != Routes.Login || data['code'] > 5000) {
|
||||||
getIMData();
|
getIMData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -752,7 +753,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void awaitShowLikeRecomandDialog() {
|
void awaitShowLikeRecomandDialog() {
|
||||||
// Future.delayed(Duration(seconds: 1), () async {
|
// Future.delayed(Duration(seconds: 30), () async {
|
||||||
// var data = await DioManager.instance.get(
|
// var data = await DioManager.instance.get(
|
||||||
// url: Api.recommendLikeList,
|
// url: Api.recommendLikeList,
|
||||||
// );
|
// );
|
||||||
|
|||||||
@ -61,6 +61,10 @@ class _HomePageState extends State<HomePage>
|
|||||||
vsync: this,
|
vsync: this,
|
||||||
initialIndex: 0,
|
initialIndex: 0,
|
||||||
animationDuration: Duration.zero);
|
animationDuration: Duration.zero);
|
||||||
|
addSub();
|
||||||
|
}
|
||||||
|
|
||||||
|
void addSub() {
|
||||||
sub = EventBusManager.on<ShowGiftNotifi>().listen((event) {
|
sub = EventBusManager.on<ShowGiftNotifi>().listen((event) {
|
||||||
var info = event.info;
|
var info = event.info;
|
||||||
showGiftButtonOverlay(context!, info['msg'], info['fromUser'], info['toUser'], () {
|
showGiftButtonOverlay(context!, info['msg'], info['fromUser'], info['toUser'], () {
|
||||||
@ -121,8 +125,8 @@ class _HomePageState extends State<HomePage>
|
|||||||
sub1.cancel();
|
sub1.cancel();
|
||||||
giftAnimationNotifySub.cancel();
|
giftAnimationNotifySub.cancel();
|
||||||
callOutActionNotifySub.cancel();
|
callOutActionNotifySub.cancel();
|
||||||
// permissionNotifySub.canel();
|
permissionNotifySub.cancel();
|
||||||
|
permissionCloseNotifySub.cancel();
|
||||||
routeObserver.unsubscribe(this);
|
routeObserver.unsubscribe(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,6 +345,7 @@ class _HomePageState extends State<HomePage>
|
|||||||
void showFloatingCallOutActionOverlay(
|
void showFloatingCallOutActionOverlay(
|
||||||
Map info
|
Map info
|
||||||
) {
|
) {
|
||||||
|
if (Get.currentRoute == Routes.Chat) return;
|
||||||
OverlayState? overlayState = Overlay.of(context);
|
OverlayState? overlayState = Overlay.of(context);
|
||||||
late OverlayEntry overlayEntry;
|
late OverlayEntry overlayEntry;
|
||||||
bool showMessage = false;
|
bool showMessage = false;
|
||||||
@ -385,7 +390,9 @@ class _HomePageState extends State<HomePage>
|
|||||||
try {
|
try {
|
||||||
overlayEntry!.remove();
|
overlayEntry!.remove();
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
if (action == '立即拜访') {
|
||||||
|
Get.toNamed(Routes.UserInfoPage,arguments:info['userId'].toString());
|
||||||
|
} else {
|
||||||
Get.until((route) => route.isFirst);
|
Get.until((route) => route.isFirst);
|
||||||
logic.updateIndex(2);
|
logic.updateIndex(2);
|
||||||
World_call_outLogic calloutLogic = Get.find<World_call_outLogic>();
|
World_call_outLogic calloutLogic = Get.find<World_call_outLogic>();
|
||||||
@ -394,6 +401,7 @@ class _HomePageState extends State<HomePage>
|
|||||||
calloutLogic.isMore = true;
|
calloutLogic.isMore = true;
|
||||||
calloutLogic.refreshController.resetNoData();
|
calloutLogic.refreshController.resetNoData();
|
||||||
calloutLogic.loadData();
|
calloutLogic.loadData();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: Get.width - 8,
|
width: Get.width - 8,
|
||||||
@ -412,21 +420,11 @@ class _HomePageState extends State<HomePage>
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
// direction: Axis.vertical,
|
// direction: Axis.vertical,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
Row(
|
||||||
onTap: () {
|
|
||||||
countdownTimer.cancel();
|
|
||||||
try {
|
|
||||||
overlayEntry!.remove();
|
|
||||||
} catch (e) {}
|
|
||||||
// "userId" -> 30629
|
|
||||||
Get.toNamed(Routes.UserInfoPage,arguments:info['userId'].toString());
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
children: [
|
children: [
|
||||||
ClipOval(
|
ClipOval(
|
||||||
child: CachedImg(
|
child: CachedImg(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
// "avatarUrl" -> "https://qiniuyun.ikuayou.com/ky_user_info_avatar/202401/sk1Y2_pT52gc1L3vimage_picker_82A96698-792D-4..."
|
|
||||||
imageUrl: info['avatarUrl'],
|
imageUrl: info['avatarUrl'],
|
||||||
width: 30.sp,
|
width: 30.sp,
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
@ -446,7 +444,6 @@ class _HomePageState extends State<HomePage>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Container(
|
Container(
|
||||||
// width: 70.sp,
|
// width: 70.sp,
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:app_settings/app_settings.dart';
|
import 'package:app_settings/app_settings.dart';
|
||||||
@ -32,9 +31,8 @@ class Complete_materialLogic extends GetxController {
|
|||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
// FlutterNativeSplash.remove();
|
// FlutterNativeSplash.remove();
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final Complete_materialState state = Complete_materialState();
|
final Complete_materialState state = Complete_materialState();
|
||||||
final ImagePicker _picker = ImagePicker();
|
final ImagePicker _picker = ImagePicker();
|
||||||
var type = Get.arguments ?? "";
|
var type = Get.arguments ?? "";
|
||||||
@ -49,7 +47,7 @@ class Complete_materialLogic extends GetxController {
|
|||||||
int unLockWxNum = 0;
|
int unLockWxNum = 0;
|
||||||
|
|
||||||
Map wxStatusInfo = {};
|
Map wxStatusInfo = {};
|
||||||
|
Map wxInfo = {};
|
||||||
late ConfigBean configBean;
|
late ConfigBean configBean;
|
||||||
List<MyConfigData> numbers = [];
|
List<MyConfigData> numbers = [];
|
||||||
|
|
||||||
@ -97,7 +95,6 @@ class Complete_materialLogic extends GetxController {
|
|||||||
element.isSelect = true;
|
element.isSelect = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
state.orientationId = userInfoBean!.orientation.toString();
|
state.orientationId = userInfoBean!.orientation.toString();
|
||||||
state.textEditingController.text = userInfoBean!.nickname;
|
state.textEditingController.text = userInfoBean!.nickname;
|
||||||
@ -105,33 +102,42 @@ class Complete_materialLogic extends GetxController {
|
|||||||
state.descEditingController.text = userInfoBean!.signature;
|
state.descEditingController.text = userInfoBean!.signature;
|
||||||
headUrl = userInfoBean!.avatar;
|
headUrl = userInfoBean!.avatar;
|
||||||
userInfoBean!.interests.forEach((element) {
|
userInfoBean!.interests.forEach((element) {
|
||||||
numbers.add(MyConfigData(element.id.toString(),element.title,false));
|
numbers
|
||||||
|
.add(MyConfigData(element.id.toString(), element.title, false));
|
||||||
});
|
});
|
||||||
|
await loadMyWxInfoData();
|
||||||
update();
|
update();
|
||||||
// state.nickName = userInfoBean!.nickname;
|
// state.nickName = userInfoBean!.nickname;
|
||||||
} else {
|
} else {
|
||||||
showOKToast(bean.msg);
|
showOKToast(bean.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
watchGenderList[1].isSelect = true;
|
watchGenderList[1].isSelect = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
loadMyWxInfoData() async {
|
||||||
|
var data =
|
||||||
|
await DioManager.instance.get(url: Api.mycontactConf, params: {});
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
wxInfo = data['data'];
|
||||||
|
|
||||||
|
state.wxEditingController.text = wxInfo['contact'] ?? '';
|
||||||
|
contactType = wxInfo['contactType'] ?? 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loadWXEditStatus() async {
|
loadWXEditStatus() async {
|
||||||
var data =
|
var data = await DioManager.instance.get(
|
||||||
await DioManager.instance.get(url: Api.checkWxNumState,);
|
url: Api.checkWxNumState,
|
||||||
|
);
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
// code 200 直接跳填微信,不提示,4000 不让填写,32100 弹返回的提示
|
// code 200 直接跳填微信,不提示,4000 不让填写,32100 弹返回的提示
|
||||||
//
|
//
|
||||||
// BAN_ACTION(4000, "用户当前操作被禁止"),
|
// BAN_ACTION(4000, "用户当前操作被禁止"),
|
||||||
//
|
//
|
||||||
// NOTICE_UPDATE_WXNUM(32100, "填写/更新微信需要消耗{}小票哦");
|
// NOTICE_UPDATE_WXNUM(32100, "填写/更新微信需要消耗{}小票哦");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
wxStatusInfo['${data['code']}'] = data['msg'];
|
wxStatusInfo['${data['code']}'] = data['msg'];
|
||||||
}
|
}
|
||||||
@ -146,9 +152,7 @@ class Complete_materialLogic extends GetxController {
|
|||||||
quToken = bean.data!.token.toString();
|
quToken = bean.data!.token.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var data1 = await DioManager.instance.get(url: Api.getConfig, params: {});
|
||||||
var data1 =
|
|
||||||
await DioManager.instance.get(url: Api.getConfig, params: {});
|
|
||||||
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||||
data1, (data1) => ConfigBean.fromJson(data1));
|
data1, (data1) => ConfigBean.fromJson(data1));
|
||||||
configBean = bean1.data!;
|
configBean = bean1.data!;
|
||||||
@ -192,8 +196,6 @@ class Complete_materialLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future getImageFile() async {
|
Future getImageFile() async {
|
||||||
|
|
||||||
|
|
||||||
checkPhotosStatus();
|
checkPhotosStatus();
|
||||||
try {
|
try {
|
||||||
final XFile? pickedFile = await _picker.pickImage(
|
final XFile? pickedFile = await _picker.pickImage(
|
||||||
@ -208,7 +210,6 @@ class Complete_materialLogic extends GetxController {
|
|||||||
headUrl = result;
|
headUrl = result;
|
||||||
update();
|
update();
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
print(e);
|
print(e);
|
||||||
@ -221,7 +222,6 @@ class Complete_materialLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
checkInfo() async {
|
checkInfo() async {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
if (headUrl == '') {
|
if (headUrl == '') {
|
||||||
@ -302,9 +302,9 @@ class Complete_materialLogic extends GetxController {
|
|||||||
state.brithday = time;
|
state.brithday = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (state.wxEditingController.text.isNotEmpty) {
|
if (state.wxEditingController.text.isNotEmpty) {
|
||||||
bool isPass = false;
|
bool isPass = false;
|
||||||
|
if (contactType == 2) {
|
||||||
if (state.wxEditingController.text.length == 11) {
|
if (state.wxEditingController.text.length == 11) {
|
||||||
RegExp exp = RegExp(
|
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}$');
|
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;
|
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')) {
|
if (wxStatusInfo.containsKey('4000')) {
|
||||||
showOKToast(wxStatusInfo['40000']);
|
showOKToast(wxStatusInfo['40000']);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<String,dynamic> params = {
|
||||||
|
"hideContact": wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] : 0,
|
||||||
|
'contactType':contactType,
|
||||||
|
"contact": state.wxEditingController.text};
|
||||||
|
|
||||||
|
var result = await DioManager().postBody(url: Api.confset,params: params);
|
||||||
var result = await DioManager().post(url: Api.updateWxNum,params: {'type':2,'wxNum':state.wxEditingController.text});
|
|
||||||
if (result['code'] == 31201) {
|
if (result['code'] == 31201) {
|
||||||
// showToast.
|
// showToast.
|
||||||
showOKToast(result['msg']);
|
showOKToast(result['msg']);
|
||||||
@ -349,7 +369,6 @@ class Complete_materialLogic extends GetxController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
|
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
|
||||||
'avatar_url': headUrl,
|
'avatar_url': headUrl,
|
||||||
'birthday': state.brithday,
|
'birthday': state.brithday,
|
||||||
@ -429,8 +448,10 @@ class Complete_materialLogic extends GetxController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.wxEditingController.text.isNotEmpty && userInfoBean!.wx_num != state.wxEditingController.text) {
|
if (state.wxEditingController.text.isNotEmpty &&
|
||||||
|
(userInfoBean!.wx_num != state.wxEditingController.text || contactType != (wxInfo['contactType'] ?? 2))) {
|
||||||
bool isPass = false;
|
bool isPass = false;
|
||||||
|
if (contactType == 2) {
|
||||||
if (state.wxEditingController.text.length == 11) {
|
if (state.wxEditingController.text.length == 11) {
|
||||||
RegExp exp = RegExp(
|
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}$');
|
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')) {
|
if (wxStatusInfo.containsKey('4000')) {
|
||||||
showOKToast(wxStatusInfo['40000']);
|
showOKToast(wxStatusInfo['40000']);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<String,dynamic> params = {
|
||||||
|
"hideContact": wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] : 0,
|
||||||
|
'contactType':contactType,
|
||||||
|
"contact": state.wxEditingController.text};
|
||||||
|
|
||||||
var result = await DioManager().post(url: Api.updateWxNum,params: {'type':2,'wxNum':state.wxEditingController.text});
|
var result = await DioManager().postBody(url: Api.confset,params: params);
|
||||||
if (result['code'] == 31201) {
|
if (result['code'] == 10081) {
|
||||||
// showToast.
|
// showToast.
|
||||||
showOKToast(result['msg']);
|
showOKToast(result['msg']);
|
||||||
showRechargeScreenDialog('set_contact');
|
showRechargeScreenDialog('set_contact');
|
||||||
@ -471,7 +514,6 @@ class Complete_materialLogic extends GetxController {
|
|||||||
interestsList.add(element.id);
|
interestsList.add(element.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
bool isNickOK = await checkText(state.textEditingController, '昵称');
|
bool isNickOK = await checkText(state.textEditingController, '昵称');
|
||||||
if (!isNickOK) {
|
if (!isNickOK) {
|
||||||
return;
|
return;
|
||||||
@ -481,7 +523,6 @@ class Complete_materialLogic extends GetxController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
|
var data = await DioManager.instance.put(url: Api.UpdataUserInfo, params: {
|
||||||
'avatar_url': headUrl,
|
'avatar_url': headUrl,
|
||||||
'birthday': state.brithday,
|
'birthday': state.brithday,
|
||||||
@ -508,9 +549,6 @@ class Complete_materialLogic extends GetxController {
|
|||||||
mineFragment.orientation = int.parse(state.orientationId);
|
mineFragment.orientation = int.parse(state.orientationId);
|
||||||
mineFragment.update();
|
mineFragment.update();
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
showOKToast(bean.msg);
|
showOKToast(bean.msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,9 +39,9 @@ class LoginLogic extends GetxController {
|
|||||||
// TODO: implement onInit
|
// TODO: implement onInit
|
||||||
super.onInit();
|
super.onInit();
|
||||||
readClipboardData();
|
readClipboardData();
|
||||||
if (!kDebugMode) {
|
// if (!kDebugMode) {
|
||||||
checkNetworkUrl();
|
// checkNetworkUrl();
|
||||||
}
|
// }
|
||||||
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
|
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
|
||||||
String loginPhone =
|
String loginPhone =
|
||||||
await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE) ??
|
await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE) ??
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
|
import 'package:fluwx/fluwx.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
@ -115,6 +116,9 @@ class MinefragmentLogic extends GetxController {
|
|||||||
loadDyanmicListData() async {
|
loadDyanmicListData() async {
|
||||||
String requestUserId = '';
|
String requestUserId = '';
|
||||||
HomeLogic homeLogic = Get.find<HomeLogic>();
|
HomeLogic homeLogic = Get.find<HomeLogic>();
|
||||||
|
if (homeLogic.model == null) {
|
||||||
|
await homeLogic.loadMyInfoData();
|
||||||
|
}
|
||||||
requestUserId = homeLogic.model!.id.toString();
|
requestUserId = homeLogic.model!.id.toString();
|
||||||
|
|
||||||
var result = await DioManager.instance.get(url: Api.userTrends,
|
var result = await DioManager.instance.get(url: Api.userTrends,
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
with AutomaticKeepAliveClientMixin {
|
with AutomaticKeepAliveClientMixin {
|
||||||
@override
|
@override
|
||||||
bool get wantKeepAlive => true;
|
bool get wantKeepAlive => true;
|
||||||
HomeCallOutLogic? listsLg;
|
UserHomeCallOutLogic? listsLg;
|
||||||
final RefreshController refreshController = RefreshController();
|
final RefreshController refreshController = RefreshController();
|
||||||
ScrollController scrollController = ScrollController();
|
ScrollController scrollController = ScrollController();
|
||||||
MinefragmentLogic logic = Get.find<MinefragmentLogic>();
|
MinefragmentLogic logic = Get.find<MinefragmentLogic>();
|
||||||
@ -70,8 +70,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
scrollController.jumpTo(0);
|
scrollController.jumpTo(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
Get.lazyPut(() => HomeCallOutLogic());
|
Get.lazyPut(() => UserHomeCallOutLogic());
|
||||||
listsLg = Get.find<HomeCallOutLogic>();
|
listsLg = Get.find<UserHomeCallOutLogic>();
|
||||||
listsLg?.loadCallOutListData(widget.userId);
|
listsLg?.loadCallOutListData(widget.userId);
|
||||||
|
|
||||||
listsLg!.scrollController.addListener(() {
|
listsLg!.scrollController.addListener(() {
|
||||||
@ -90,12 +90,12 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
scrollController.dispose();
|
scrollController.dispose();
|
||||||
sub.cancel();
|
sub.cancel();
|
||||||
sub1.cancel();
|
sub1.cancel();
|
||||||
listsLg?.onClose();
|
// listsLg?.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GetBuilder<HomeCallOutLogic>(
|
return GetBuilder<UserHomeCallOutLogic>(
|
||||||
assignId: true,
|
assignId: true,
|
||||||
builder: (listLogic) {
|
builder: (listLogic) {
|
||||||
return listLogic.lists.isEmpty
|
return listLogic.lists.isEmpty
|
||||||
@ -147,7 +147,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
||||||
? Text(
|
? Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||||
|
height: 1.8),
|
||||||
)
|
)
|
||||||
: HideText(
|
: HideText(
|
||||||
text: lists.content!,
|
text: lists.content!,
|
||||||
@ -156,7 +157,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
: Get.width - 20.sp,
|
: Get.width - 20.sp,
|
||||||
additionText: '查看更多',
|
additionText: '查看更多',
|
||||||
maxLines: 15,
|
maxLines: 15,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||||
|
height: 1.8),
|
||||||
additionStyle:
|
additionStyle:
|
||||||
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -394,26 +396,31 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
),
|
),
|
||||||
atWidget,
|
atWidget,
|
||||||
Container(
|
Container(
|
||||||
|
// color: Colors.red,
|
||||||
alignment: Alignment.topLeft,
|
alignment: Alignment.topLeft,
|
||||||
// margin: EdgeInsets.only(top: 4.sp),
|
// margin: EdgeInsets.only(top: 4.sp),
|
||||||
child: descText,
|
child: descText,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: picHeight,
|
height: picHeight,
|
||||||
|
// color: Colors.blue,
|
||||||
margin: EdgeInsets.only(top: 5.sp),
|
margin: EdgeInsets.only(top: 5.sp),
|
||||||
child: picHeight == 200.sp
|
child: picHeight == 200.sp
|
||||||
? ClipRRect(
|
? ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(6.sp),
|
borderRadius: BorderRadius.circular(6.sp),
|
||||||
child: VideoItemWidget(lists.album![0]!.url!))
|
child: VideoItemWidget(lists.album![0]!.url!))
|
||||||
: GridView.builder(
|
:MediaQuery.removePadding(
|
||||||
|
removeTop: true,
|
||||||
|
context: context,
|
||||||
|
child: GridView.builder(
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
itemCount: lists.album!.length,
|
itemCount: lists.album!.length,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
gridDelegate:
|
gridDelegate:
|
||||||
SliverGridDelegateWithFixedCrossAxisCount(
|
SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3, //横轴三个子widget
|
crossAxisCount: 3, //横轴三个子widget
|
||||||
crossAxisSpacing: 8.sp,
|
crossAxisSpacing: 4.sp,
|
||||||
mainAxisSpacing: 8.sp,
|
mainAxisSpacing: 4.sp,
|
||||||
childAspectRatio: 0.8 //宽高比为1时,子widget
|
childAspectRatio: 0.8 //宽高比为1时,子widget
|
||||||
),
|
),
|
||||||
itemBuilder: (contentxt, currentIndex) {
|
itemBuilder: (contentxt, currentIndex) {
|
||||||
@ -439,6 +446,7 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
if (widget.userId.isEmpty)
|
if (widget.userId.isEmpty)
|
||||||
Container(
|
Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
@ -481,7 +489,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
||||||
? Text(
|
? Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||||
|
height: 1.8),
|
||||||
)
|
)
|
||||||
: HideText(
|
: HideText(
|
||||||
text: lists.content!,
|
text: lists.content!,
|
||||||
@ -490,9 +499,11 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
: Get.width - 20.sp,
|
: Get.width - 20.sp,
|
||||||
additionText: '查看更多',
|
additionText: '查看更多',
|
||||||
maxLines: 15,
|
maxLines: 15,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||||
|
height: 1.8),
|
||||||
additionStyle:
|
additionStyle:
|
||||||
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||||
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
logic.openCallOutIdList.add(lists.id);
|
logic.openCallOutIdList.add(lists.id);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
@ -558,6 +569,7 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 14.sp, bottom: 10.sp),
|
margin: EdgeInsets.only(top: 14.sp, bottom: 10.sp),
|
||||||
@ -615,9 +627,10 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
Container(
|
Container(
|
||||||
// height: 130.sp + contentHeight(lists.content!) + picHeight,
|
// height: 130.sp + contentHeight(lists.content!) + picHeight,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
// color: Colors.blue,
|
|
||||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
height: 72.sp,
|
height: 72.sp,
|
||||||
@ -733,7 +746,10 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
borderRadius: BorderRadius.circular(6.sp),
|
borderRadius: BorderRadius.circular(6.sp),
|
||||||
child:
|
child:
|
||||||
VideoItemWidget(lists.album![0].url!))
|
VideoItemWidget(lists.album![0].url!))
|
||||||
: GridView.builder(
|
: MediaQuery.removePadding(
|
||||||
|
removeTop: true,
|
||||||
|
context: context,
|
||||||
|
child: GridView.builder(
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
// shrinkWrap: true,
|
// shrinkWrap: true,
|
||||||
itemCount: lists.album!.length,
|
itemCount: lists.album!.length,
|
||||||
@ -770,7 +786,8 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}))
|
}),
|
||||||
|
))
|
||||||
: Container(),
|
: Container(),
|
||||||
if (widget.userId.isEmpty)
|
if (widget.userId.isEmpty)
|
||||||
Container(
|
Container(
|
||||||
@ -1227,3 +1244,5 @@ class _MyCallOutViewState extends State<MyCallOutView>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -412,10 +412,15 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
if (end > userIdList.length) {
|
if (end > userIdList.length) {
|
||||||
end = userIdList.length; // 防止越界
|
end = userIdList.length; // 防止越界
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
List<V2TimUserFullInfo> dataList = (await getUserListData(userIdList.sublist(start, end)))
|
||||||
|
.whereType<V2TimUserFullInfo>()
|
||||||
|
.toList();
|
||||||
|
|
||||||
List<V2TimUserFullInfo> dataList = await getUserListData(
|
|
||||||
userIdList.sublist(start, end));
|
|
||||||
list.addAll(dataList);
|
list.addAll(dataList);
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -113,6 +113,7 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
child: Swiper(
|
child: Swiper(
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
loop: true,
|
loop: true,
|
||||||
|
autoplayDelay: 6000,
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
Map item = controller.bannerList[index];
|
Map item = controller.bannerList[index];
|
||||||
|
|||||||
@ -1199,9 +1199,9 @@ class _LocationItemState extends State<LocationItem> {
|
|||||||
// 新人报道(7天内)-在n个圈子发布n喊话—最新加入了「**圈」-填写了联系方式-成为「**榜榜首」-绑定了「**」关系
|
// 新人报道(7天内)-在n个圈子发布n喊话—最新加入了「**圈」-填写了联系方式-成为「**榜榜首」-绑定了「**」关系
|
||||||
|
|
||||||
item.vip == 2
|
item.vip == 2
|
||||||
? '成为了「年VIP」'
|
? '通过开通年度会员成为「年VIP'
|
||||||
: item.isBacker == 1
|
: item.isBacker == 1
|
||||||
? '通过金主认证'
|
? '通过充值小票成为「金主」'
|
||||||
: item.lastAgentInterest
|
: item.lastAgentInterest
|
||||||
.isNotEmpty
|
.isNotEmpty
|
||||||
? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏'
|
? '最近代理了「${item.lastAgentInterest['title']}」并收到打赏'
|
||||||
@ -1225,7 +1225,7 @@ class _LocationItemState extends State<LocationItem> {
|
|||||||
1
|
1
|
||||||
? '填写了联系方式'
|
? '填写了联系方式'
|
||||||
: item.lastRankTopDesc.isNotEmpty
|
: item.lastRankTopDesc.isNotEmpty
|
||||||
? '成为「${item.lastRankTopDesc}」'
|
? '通过冲榜成为「${item.lastRankTopDesc}」'
|
||||||
: '绑定了「${item.lastUserRelation}」关系',
|
: '绑定了「${item.lastUserRelation}」关系',
|
||||||
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@ -888,6 +888,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (logic.relationTypeList.isNotEmpty)
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (Get.isRegistered<Relationship_buildingLogic>()) {
|
if (Get.isRegistered<Relationship_buildingLogic>()) {
|
||||||
@ -1128,7 +1129,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
}
|
}
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
padding: EdgeInsets.only(left: 0, right: 10.sp),
|
padding: EdgeInsets.only(left: 10.sp, right: 10.sp),
|
||||||
height: 27.sp,
|
height: 27.sp,
|
||||||
child: Row(
|
child: Row(
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
@ -1342,7 +1343,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
// :
|
// :
|
||||||
return Container(
|
return Container(
|
||||||
// margin: EdgeInsets.only( 0.sp),
|
// margin: EdgeInsets.only( 0.sp),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 19.sp),
|
padding: EdgeInsets.symmetric(horizontal: 10.sp),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
@ -1424,7 +1425,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
controller.getImageFile();
|
controller.getImageFile();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.all(5.sp),
|
margin: EdgeInsets.all(2.5.sp),
|
||||||
child: Image(
|
child: Image(
|
||||||
image: AssetImage(
|
image: AssetImage(
|
||||||
getMineImage("icon_img_add")),
|
getMineImage("icon_img_add")),
|
||||||
@ -1433,7 +1434,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.all(5.sp),
|
margin: EdgeInsets.all(2.5.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: _buildImageItem(
|
child: _buildImageItem(
|
||||||
controller.state.imaglist[index - 1].url,
|
controller.state.imaglist[index - 1].url,
|
||||||
@ -1446,7 +1447,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.all(5.sp),
|
margin: EdgeInsets.all(2.5.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: _buildImageItem(
|
child: _buildImageItem(
|
||||||
controller.state.imaglist[index].urlThumb,
|
controller.state.imaglist[index].urlThumb,
|
||||||
|
|||||||
@ -136,7 +136,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
||||||
? Text(
|
? Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||||
|
height: 1.8),
|
||||||
)
|
)
|
||||||
: HideText(
|
: HideText(
|
||||||
text: lists.content!,
|
text: lists.content!,
|
||||||
@ -145,7 +146,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
: Get.width - 20.sp,
|
: Get.width - 20.sp,
|
||||||
additionText: '查看更多',
|
additionText: '查看更多',
|
||||||
maxLines: 15,
|
maxLines: 15,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||||
|
height: 1.8),
|
||||||
additionStyle:
|
additionStyle:
|
||||||
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -459,7 +461,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
Widget descText = logic.openCallOutIdList.contains(lists.id)
|
||||||
? Text(
|
? Text(
|
||||||
lists.content!,
|
lists.content!,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||||
|
height: 1.8),
|
||||||
)
|
)
|
||||||
: HideText(
|
: HideText(
|
||||||
text: lists.content!,
|
text: lists.content!,
|
||||||
@ -468,7 +471,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
: Get.width - 20.sp,
|
: Get.width - 20.sp,
|
||||||
additionText: '查看更多',
|
additionText: '查看更多',
|
||||||
maxLines: 15,
|
maxLines: 15,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14.sp),
|
style: TextStyle(color: Colors.white, fontSize: 14.sp,letterSpacing: 1.3.sp, // 设置字间距,单位是像素
|
||||||
|
height: 1.8),
|
||||||
additionStyle:
|
additionStyle:
|
||||||
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -584,6 +588,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
// color: Colors.blue,
|
// color: Colors.blue,
|
||||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
crossAxisAlignment:CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
height: 72.sp,
|
height: 72.sp,
|
||||||
|
|||||||
@ -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 = [];
|
List<String> result = [];
|
||||||
int subIndex = -1;
|
int subIndex = -1;
|
||||||
for (int i = 0; i < tempLists.length; i++) {
|
for (int i = 0; i < tempLists.length; i++) {
|
||||||
|
|||||||
@ -638,4 +638,7 @@ class Api {
|
|||||||
//用户收入总计
|
//用户收入总计
|
||||||
static const userIncomeTotal = '/mall-service/wallet/userIncomeTotal';
|
static const userIncomeTotal = '/mall-service/wallet/userIncomeTotal';
|
||||||
|
|
||||||
|
//关系邀请
|
||||||
|
static const relationInvite = '/user-service/user/relation/invite';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -311,8 +311,8 @@ class DioManager {
|
|||||||
}
|
}
|
||||||
// 其他类型的错误(如协议错误、解析错误等)
|
// 其他类型的错误(如协议错误、解析错误等)
|
||||||
var info = await FlutterBugly.uploadException(
|
var info = await FlutterBugly.uploadException(
|
||||||
message: url + e.error.toString(),
|
message: url + ':' + e.error.toString(),
|
||||||
detail: Platform.isIOS ? 'crash_attach.log' : 'extraMessage.txt',
|
detail: e.message ?? '',
|
||||||
);
|
);
|
||||||
print(info);
|
print(info);
|
||||||
return {'code': 500, 'msg': '服务器开小差了,请重试'};
|
return {'code': 500, 'msg': '服务器开小差了,请重试'};
|
||||||
@ -324,7 +324,7 @@ class DioManager {
|
|||||||
// 其他类型的错误(如协议错误、解析错误等)
|
// 其他类型的错误(如协议错误、解析错误等)
|
||||||
var info = await FlutterBugly.uploadException(
|
var info = await FlutterBugly.uploadException(
|
||||||
message: url + e.toString(),
|
message: url + e.toString(),
|
||||||
detail: Platform.isIOS ? 'crash_attach.log' : 'extraMessage.txt',
|
detail: '',
|
||||||
);
|
);
|
||||||
// 其他一些意外的报错
|
// 其他一些意外的报错
|
||||||
return {'code': 500, 'msg': '加载中...'};
|
return {'code': 500, 'msg': '加载中...'};
|
||||||
|
|||||||
@ -29,11 +29,9 @@ class _CachedImgState extends State<CachedImg> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return CachedNetworkImage(
|
return CachedNetworkImage(
|
||||||
imageUrl: widget.imageUrl,
|
imageUrl: widget.imageUrl,
|
||||||
fit: widget.fit,
|
fit: widget.fit ?? BoxFit.cover,
|
||||||
width: widget.width,
|
width: widget.width,
|
||||||
height: widget.height,
|
height: widget.height,
|
||||||
useOldImageOnUrlChange:true,
|
|
||||||
memCacheWidth: Get.width.toInt(),
|
|
||||||
errorWidget: (context, url, error) => CachedNetworkImage(
|
errorWidget: (context, url, error) => CachedNetworkImage(
|
||||||
imageUrl:Api.defaultAvatar,
|
imageUrl:Api.defaultAvatar,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
|||||||
@ -1025,22 +1025,8 @@ sendApplyRelationTypeCustomMsg(String userId, String data, String desc) async {
|
|||||||
|
|
||||||
//发送邀请关系自定义消息
|
//发送邀请关系自定义消息
|
||||||
sendInventRelationTypeCustomMsg(String userId, String data, String desc) async {
|
sendInventRelationTypeCustomMsg(String userId, String data, String desc) async {
|
||||||
// // 创建自定义消息
|
|
||||||
// V2TimValueCallback<V2TimMsgCreateInfoResult> createCustomMessageRes =
|
|
||||||
// await TencentImSDKPlugin.v2TIMManager
|
|
||||||
// .getMessageManager()
|
|
||||||
// .createCustomMessage(
|
|
||||||
// data: data,
|
|
||||||
// desc: desc,
|
|
||||||
// extension: 'InventRelationType',
|
|
||||||
// );
|
|
||||||
// if (createCustomMessageRes.code == 0) {
|
|
||||||
// String? id = createCustomMessageRes.data?.id;
|
|
||||||
// // 发送自定义消息
|
|
||||||
// EventBusManager.fire(SendCoustomMessage(createCustomMessageRes));
|
|
||||||
// }
|
|
||||||
Map info = jsonDecode(data);
|
Map info = jsonDecode(data);
|
||||||
var result = await DioManager.instance.post(url: Api.relationTypeApply,params: {'type':2,'relationTypeId':info['typeId'],'targetId':userId.split('_').last});//自定义extension
|
var result = await DioManager.instance.post(url: Api.relationInvite,params: {'type':2,'relationTypeId':info['typeId'],'targetId':userId.split('_').last});//自定义extension
|
||||||
if (result['code'] == 200) {
|
if (result['code'] == 200) {
|
||||||
info['relationTypeId'] = result['data'];
|
info['relationTypeId'] = result['data'];
|
||||||
data = jsonEncode(info);
|
data = jsonEncode(info);
|
||||||
@ -1639,9 +1625,10 @@ pushPage(String action,String param,{String name = '',bool isShowUpdate = true})
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if (action == 'receive_user_welfare') {
|
} else if (action == 'receive_user_welfare') {
|
||||||
|
if (Get.isRegistered<World_call_outLogic>()) {
|
||||||
World_call_outLogic logic = Get.find<World_call_outLogic>();
|
World_call_outLogic logic = Get.find<World_call_outLogic>();
|
||||||
logic.getWelfareDetailData(param,-1);
|
logic.getWelfareDetailData(param,-1);
|
||||||
|
}
|
||||||
} else if (action == 'watch_free_castle_gift') {
|
} else if (action == 'watch_free_castle_gift') {
|
||||||
World_call_outLogic logic = Get.find<World_call_outLogic>();
|
World_call_outLogic logic = Get.find<World_call_outLogic>();
|
||||||
logic.treatWatch(param);
|
logic.treatWatch(param);
|
||||||
|
|||||||
@ -240,6 +240,7 @@ void showFloatingButtonOverlay(BuildContext context, String nickname,
|
|||||||
|
|
||||||
void showGiftButtonOverlay(BuildContext context, String content, Map sendUser,
|
void showGiftButtonOverlay(BuildContext context, String content, Map sendUser,
|
||||||
Map recevierUser, NoticeCallback noticeCallback) {
|
Map recevierUser, NoticeCallback noticeCallback) {
|
||||||
|
if (Get.currentRoute == Routes.Chat) return;
|
||||||
OverlayState? overlayState = Overlay.of(context);
|
OverlayState? overlayState = Overlay.of(context);
|
||||||
late OverlayEntry overlayEntry;
|
late OverlayEntry overlayEntry;
|
||||||
bool showMessage = false;
|
bool showMessage = false;
|
||||||
@ -463,6 +464,7 @@ void showGiftButtonOverlay(BuildContext context, String content, Map sendUser,
|
|||||||
void showPeopleCallOutOverlay(
|
void showPeopleCallOutOverlay(
|
||||||
BuildContext context, String content, NoticeCallback noticeCallback) {
|
BuildContext context, String content, NoticeCallback noticeCallback) {
|
||||||
if (content == null) return;
|
if (content == null) return;
|
||||||
|
if (Get.currentRoute == Routes.Chat) return;
|
||||||
OverlayState? overlayState = Overlay.of(context);
|
OverlayState? overlayState = Overlay.of(context);
|
||||||
late OverlayEntry overlayEntry;
|
late OverlayEntry overlayEntry;
|
||||||
bool showMessage = false;
|
bool showMessage = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user