2.1.3代码提交
This commit is contained in:
parent
b1f7e237ff
commit
2b27857857
@ -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 62
|
versionCode 64
|
||||||
versionName "2.1.2"
|
versionName "2.1.4"
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
vivo_APPID: "105669716",
|
vivo_APPID: "105669716",
|
||||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.7.10'
|
ext.kotlin_version = '1.9.10'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
BIN
circle_app/data/img/mine/my_wallet.png
Normal file
BIN
circle_app/data/img/mine/my_wallet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
BIN
circle_app/data/img/mine/my_wallet_bg.png
Normal file
BIN
circle_app/data/img/mine/my_wallet_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 208 KiB |
@ -103,6 +103,8 @@ PODS:
|
|||||||
- Mantle (2.2.0):
|
- Mantle (2.2.0):
|
||||||
- Mantle/extobjc (= 2.2.0)
|
- Mantle/extobjc (= 2.2.0)
|
||||||
- Mantle/extobjc (2.2.0)
|
- Mantle/extobjc (2.2.0)
|
||||||
|
- notification_permissions (0.4.4):
|
||||||
|
- Flutter
|
||||||
- package_info_plus (0.4.5):
|
- package_info_plus (0.4.5):
|
||||||
- Flutter
|
- Flutter
|
||||||
- pasteboard (0.0.1):
|
- pasteboard (0.0.1):
|
||||||
@ -194,6 +196,7 @@ DEPENDENCIES:
|
|||||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||||
- in_app_purchase_storekit (from `.symlinks/plugins/in_app_purchase_storekit/ios`)
|
- in_app_purchase_storekit (from `.symlinks/plugins/in_app_purchase_storekit/ios`)
|
||||||
- local_notifications_for_us (from `.symlinks/plugins/local_notifications_for_us/ios`)
|
- local_notifications_for_us (from `.symlinks/plugins/local_notifications_for_us/ios`)
|
||||||
|
- notification_permissions (from `.symlinks/plugins/notification_permissions/ios`)
|
||||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
|
||||||
@ -277,6 +280,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/in_app_purchase_storekit/ios"
|
:path: ".symlinks/plugins/in_app_purchase_storekit/ios"
|
||||||
local_notifications_for_us:
|
local_notifications_for_us:
|
||||||
:path: ".symlinks/plugins/local_notifications_for_us/ios"
|
:path: ".symlinks/plugins/local_notifications_for_us/ios"
|
||||||
|
notification_permissions:
|
||||||
|
:path: ".symlinks/plugins/notification_permissions/ios"
|
||||||
package_info_plus:
|
package_info_plus:
|
||||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||||
pasteboard:
|
pasteboard:
|
||||||
@ -345,6 +350,7 @@ SPEC CHECKSUMS:
|
|||||||
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
|
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
|
||||||
local_notifications_for_us: d4bb63b93eb429c4697edd0ee66bbe8bade29633
|
local_notifications_for_us: d4bb63b93eb429c4697edd0ee66bbe8bade29633
|
||||||
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
|
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
|
||||||
|
notification_permissions: 825ea1bf2a52ab585c53fd7b5e8e96876d735d4b
|
||||||
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||||
pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0
|
pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0
|
||||||
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
</Testables>
|
</Testables>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Release"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
|
|||||||
10
circle_app/lib/circle_app/agent_circle_list/binding.dart
Normal file
10
circle_app/lib/circle_app/agent_circle_list/binding.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class Agent_circle_listBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => Agent_circle_listLogic());
|
||||||
|
}
|
||||||
|
}
|
||||||
5
circle_app/lib/circle_app/agent_circle_list/logic.dart
Normal file
5
circle_app/lib/circle_app/agent_circle_list/logic.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
class Agent_circle_listLogic extends GetxController {
|
||||||
|
|
||||||
|
}
|
||||||
51
circle_app/lib/circle_app/agent_circle_list/view.dart
Normal file
51
circle_app/lib/circle_app/agent_circle_list/view.dart
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import 'package:circle_app/circle_app/circle/state.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class Agent_circle_listPage extends StatefulWidget {
|
||||||
|
Agent_circle_listPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<Agent_circle_listPage> createState() => _Agent_circle_listPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Agent_circle_listPageState extends State<Agent_circle_listPage> with AutomaticKeepAliveClientMixin, SingleTickerProviderStateMixin {
|
||||||
|
@override
|
||||||
|
bool get wantKeepAlive => true;
|
||||||
|
final ScrollController scrollController = ScrollController();
|
||||||
|
final RefreshController refreshController = RefreshController();
|
||||||
|
late TabController _tabController;
|
||||||
|
|
||||||
|
int callOutPage = 1;
|
||||||
|
int currentIndex = 0;
|
||||||
|
int count = 0;
|
||||||
|
bool isLoad = true;
|
||||||
|
bool callOutMore = true;
|
||||||
|
var circleId = '';
|
||||||
|
List<Lists> lists = [];
|
||||||
|
|
||||||
|
bool isSetState = false;
|
||||||
|
|
||||||
|
var sub;
|
||||||
|
|
||||||
|
Map interestAgentMap = {};
|
||||||
|
|
||||||
|
// TODO: add state variables and methods
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
// TODO: implement dispose
|
||||||
|
super.dispose();
|
||||||
|
sub.cancel();
|
||||||
|
}
|
||||||
|
final logic = Get.find<Agent_circle_listLogic>();
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -78,7 +78,7 @@ class _BillState extends State<BillPage> with SingleTickerProviderStateMixin {
|
|||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
"assets/images/navigator/back.png",
|
"data/img/nav/back.png",
|
||||||
width: 24.sp,
|
width: 24.sp,
|
||||||
height: 24.sp,
|
height: 24.sp,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -15,11 +14,10 @@ class ChatMsgCardItem extends StatefulWidget {
|
|||||||
Map info;
|
Map info;
|
||||||
String title;
|
String title;
|
||||||
String conversationID;
|
String conversationID;
|
||||||
ChatMsgCardItem(this.isSelf,this.info,this.title,this.conversationID);
|
ChatMsgCardItem(this.isSelf, this.info, this.title, this.conversationID);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ChatMsgCardItemState createState() => new _ChatMsgCardItemState();
|
_ChatMsgCardItemState createState() => new _ChatMsgCardItemState();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||||
@ -38,13 +36,45 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
info = widget.info;
|
info = widget.info;
|
||||||
title = widget.title;
|
title = widget.title;
|
||||||
loadUserData();
|
loadUserData();
|
||||||
|
loadChatCardData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadChatCardData() async {
|
||||||
|
var data = await DioManager.instance.get(
|
||||||
|
url:
|
||||||
|
'msg-service/user/${widget.conversationID.split('_').last}/chat/card',
|
||||||
|
);
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
// title
|
||||||
|
|
||||||
|
var recommendCircleFriendData = data['data'];
|
||||||
|
|
||||||
|
if (recommendCircleFriendData['is_follow_me']) {
|
||||||
|
title = '对方喜欢了你';
|
||||||
|
} else if (recommendCircleFriendData['is_follow_to']) {
|
||||||
|
title = '你喜欢了TA';
|
||||||
|
} else if (recommendCircleFriendData['has_both_friend']) {
|
||||||
|
title = '你们有共同喜欢的圈友';
|
||||||
|
} else if (recommendCircleFriendData['is_new_user']) {
|
||||||
|
title = '我刚来到这里哦';
|
||||||
|
} else if (recommendCircleFriendData['has_friend_follow_to']) {
|
||||||
|
title = '你喜欢的圈友也喜欢TA';
|
||||||
|
} else if (recommendCircleFriendData['is_wanna_meet']) {
|
||||||
|
title = '很多圈友都喜欢TA';
|
||||||
|
} else if (recommendCircleFriendData['is_excellent_qz_leader']) {
|
||||||
|
title = 'TA是乐园优秀圈主哦~';
|
||||||
|
} else if (recommendCircleFriendData['is_most_fans']) {
|
||||||
|
title = '可能是你想认识的人';
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void loadUserData() async {
|
void loadUserData() async {
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
url:
|
url:
|
||||||
"${Api.getUserInfoTA + widget.conversationID.split('_').last}/home");
|
"${Api.getUserInfoTA + widget.conversationID.split('_').last}/home");
|
||||||
var bean = BaseResponse<ResponseBean>.fromJson(
|
var bean = BaseResponse<ResponseBean>.fromJson(
|
||||||
data, (data) => ResponseBean.fromJson(data));
|
data, (data) => ResponseBean.fromJson(data));
|
||||||
|
|
||||||
@ -53,14 +83,10 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
UserBean userInfoBean = bean.data.user;
|
UserBean userInfoBean = bean.data.user;
|
||||||
unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1;
|
unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} catch (e) {
|
} catch (e) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// TODO: add widget build method
|
// TODO: add widget build method
|
||||||
@ -69,8 +95,8 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
Container(
|
Container(
|
||||||
// height: info.containsKey('city') ? 175.sp : 135.sp,
|
// height: info.containsKey('city') ? 175.sp : 135.sp,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
margin: EdgeInsets.only(
|
margin:
|
||||||
left: isSelf ? 16 : 0, right: isSelf ? 0 : 16),
|
EdgeInsets.only(left: isSelf ? 16 : 0, right: isSelf ? 0 : 16),
|
||||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@ -92,8 +118,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
width: 3.sp,
|
width: 3.sp,
|
||||||
height: 3.sp,
|
height: 3.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(1.5.sp),
|
||||||
BorderRadius.circular(1.5.sp),
|
|
||||||
color: Color(0xFF00FFF4)),
|
color: Color(0xFF00FFF4)),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
@ -109,28 +134,27 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
if (info.containsKey('city'))
|
if (info.containsKey('city'))
|
||||||
info['city'].toString().isNotEmpty
|
info['city'].toString().isNotEmpty
|
||||||
? Container(
|
? Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(right: 5.sp),
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
width: 3.sp,
|
width: 3.sp,
|
||||||
height: 3.sp,
|
height: 3.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(1.5.sp),
|
||||||
BorderRadius.circular(1.5.sp),
|
color: Color(0xFF00FFF4)),
|
||||||
color: Color(0xFF00FFF4)),
|
),
|
||||||
),
|
Text(
|
||||||
Text(
|
info['city'],
|
||||||
info['city'],
|
style: TextStyle(
|
||||||
style: TextStyle(
|
color: Colors.white,
|
||||||
color: Colors.white,
|
fontSize: 14.sp,
|
||||||
fontSize: 14.sp,
|
fontWeight: FontWeight.w500),
|
||||||
fontWeight: FontWeight.w500),
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Container(),
|
: Container(),
|
||||||
if (info.containsKey('both_interests'))
|
if (info.containsKey('both_interests'))
|
||||||
Container(
|
Container(
|
||||||
@ -142,8 +166,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
width: 3,
|
width: 3,
|
||||||
height: 3,
|
height: 3,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
BorderRadius.circular(1.5),
|
|
||||||
color: Color(0xFF00FFF4)),
|
color: Color(0xFF00FFF4)),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -164,21 +187,21 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin:
|
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||||
EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(right: 5.sp,top: 10.sp),
|
margin: EdgeInsets.only(right: 5.sp, top: 10.sp),
|
||||||
width: 3,
|
width: 3,
|
||||||
height: 3,
|
height: 3,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(1.5),
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
color: Color(0xFF00FFF4)),
|
color: Color(0xFF00FFF4)),
|
||||||
),
|
),
|
||||||
Expanded(child: Text(
|
Expanded(
|
||||||
|
child: Text(
|
||||||
isSelf
|
isSelf
|
||||||
? '交友宣言:' + info['user']['signature']
|
? '交友宣言:' + info['user']['signature']
|
||||||
: '交友宣言:' + info['my']['signature'],
|
: '交友宣言:' + info['my']['signature'],
|
||||||
@ -195,60 +218,61 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
|||||||
width: Get.width,
|
width: Get.width,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
),
|
),
|
||||||
interestWdiget(isSelf
|
interestWdiget(isSelf ? info['interests'] : info['myInterests'])
|
||||||
? info['interests']
|
|
||||||
: info['myInterests'])
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (unLockWxNum == 1)
|
if (unLockWxNum == 1)
|
||||||
Container(
|
Container(
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
top: 10.sp,
|
top: 10.sp, left: isSelf ? 16 : 0, right: isSelf ? 0 : 16),
|
||||||
left: isSelf ? 16 : 0,
|
// margin: EdgeInsets.only(top: 10.sp),
|
||||||
right: isSelf ? 0 : 16),
|
child: Row(
|
||||||
// margin: EdgeInsets.only(top: 10.sp),
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
child: Row(
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
Text(
|
||||||
children: [
|
'骂人、诈骗、造谣均属于严重违规行为,请严格遵守',
|
||||||
Text(
|
|
||||||
'骂人、诈骗、造谣均属于严重违规行为,请严格遵守',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 11.sp,
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.sp,
|
|
||||||
),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
navigateToCodeOfConduct();
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
'《文明公约》',
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xff00FFF4),
|
color: Colors.white,
|
||||||
fontSize: 11.sp,
|
fontSize: 11.sp,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 2.sp,
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
navigateToCodeOfConduct();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'《文明公约》',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff00FFF4),
|
||||||
|
fontSize: 11.sp,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
if (unLockWxNum == 0)
|
if (unLockWxNum == 0)
|
||||||
Container(
|
Container(
|
||||||
margin:EdgeInsets.only(top: 4.sp),child: Text('解锁联系方式是唯一合理方式,直接发送属于诈骗高危行为',style: TextStyle(color: AppColor.mainColor,fontSize: 12.sp),))
|
margin: EdgeInsets.only(top: 4.sp),
|
||||||
|
child: Text(
|
||||||
|
'解锁联系方式是唯一合理方式,直接发送属于诈骗高危行为',
|
||||||
|
style: TextStyle(color: AppColor.mainColor, fontSize: 12.sp),
|
||||||
|
))
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interestWdiget(List data) {
|
interestWdiget(List data) {
|
||||||
if (!data.isNotEmpty) return Container(height: 0,);
|
if (!data.isNotEmpty)
|
||||||
|
return Container(
|
||||||
|
height: 0,
|
||||||
|
);
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
height: 49.sp,
|
height: 49.sp,
|
||||||
|
|||||||
@ -110,10 +110,17 @@ class CircleLogic extends GetxController {
|
|||||||
t?.cancel();
|
t?.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onReady() {
|
||||||
|
// TODO: implement onReady
|
||||||
|
super.onReady();
|
||||||
|
// loadRecommendCircleFriendData();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
loadRecommendCircleFriendData();
|
|
||||||
loadCircleListData();
|
loadCircleListData();
|
||||||
loadCirclePeopleData();
|
loadCirclePeopleData();
|
||||||
initGerder();
|
initGerder();
|
||||||
@ -129,6 +136,8 @@ class CircleLogic extends GetxController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
startTimer() {
|
startTimer() {
|
||||||
t = Timer.periodic(const Duration(milliseconds: 1000), (timer) {
|
t = Timer.periodic(const Duration(milliseconds: 1000), (timer) {
|
||||||
seconds++;
|
seconds++;
|
||||||
|
|||||||
@ -32,7 +32,7 @@ import '../userinfo/logic.dart';
|
|||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
const bgWidget = DecorationImage(
|
const bgWidget = DecorationImage(
|
||||||
fit: BoxFit.fill, image: AssetImage('assets/images/base/home_back.png'));
|
fit: BoxFit.fill, image: AssetImage('data/img/base/home_back.png'));
|
||||||
|
|
||||||
class CirclePage extends StatefulWidget {
|
class CirclePage extends StatefulWidget {
|
||||||
const CirclePage({Key? key}) : super(key: key);
|
const CirclePage({Key? key}) : super(key: key);
|
||||||
@ -899,6 +899,8 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
isHaveCity: _tabController.index == 1,
|
isHaveCity: _tabController.index == 1,
|
||||||
callback: (genderList, orientationList, roleList) {
|
callback: (genderList, orientationList, roleList) {
|
||||||
if (_tabController.index == 1) {
|
if (_tabController.index == 1) {
|
||||||
|
|
||||||
|
EventBusManager.fire(NearScrollTap());
|
||||||
_onRefresh();
|
_onRefresh();
|
||||||
} else if (_tabController.index == 0) {
|
} else if (_tabController.index == 0) {
|
||||||
List<String> genders = [];
|
List<String> genders = [];
|
||||||
@ -1039,7 +1041,7 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
// controller.state.city = controller.cityMap[res[0]][res[1]][0];
|
// controller.state.city = controller.cityMap[res[0]][res[1]][0];
|
||||||
// logic.state.city = res[1];
|
// logic.state.city = res[1];
|
||||||
logic.cityName = res[1];
|
logic.cityName = res[1];
|
||||||
|
EventBusManager.fire(NearScrollTap());
|
||||||
_onRefresh();
|
_onRefresh();
|
||||||
// logic.getSuccess();
|
// logic.getSuccess();
|
||||||
// logic.update();
|
// logic.update();
|
||||||
|
|||||||
@ -101,7 +101,7 @@ class _PlayVideoViewState extends State<PlayVideoView> {
|
|||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'assets/images/navigator/back.png',
|
'data/img/nav/back.png',
|
||||||
width: 36.sp,
|
width: 36.sp,
|
||||||
height: 36.sp,
|
height: 36.sp,
|
||||||
)),
|
)),
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'package:circle_app/circle_app/home/logic.dart';
|
|||||||
import 'package:circle_app/circle_app/invite/logic.dart';
|
import 'package:circle_app/circle_app/invite/logic.dart';
|
||||||
import 'package:circle_app/net/api.dart';
|
import 'package:circle_app/net/api.dart';
|
||||||
import 'package:circle_app/net/dio_manager.dart';
|
import 'package:circle_app/net/dio_manager.dart';
|
||||||
|
import 'package:circle_app/utils/eventBus.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -40,10 +41,23 @@ class LikeLogic extends GetxController {
|
|||||||
bool isLoadFial = false;
|
bool isLoadFial = false;
|
||||||
|
|
||||||
Data? homeData;
|
Data? homeData;
|
||||||
|
|
||||||
|
var sub;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
// TODO: implement onClose
|
||||||
|
super.onClose();
|
||||||
|
sub.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
// TODO: implement onInit
|
// TODO: implement onInit
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
sub = EventBusManager.on<ChangeCircleIndex>().listen((event) {
|
||||||
|
changeCircle(event.param);
|
||||||
|
});
|
||||||
await loadMyInfo();
|
await loadMyInfo();
|
||||||
rightCtr.addListener(() {
|
rightCtr.addListener(() {
|
||||||
if (rightCtr.position.pixels ==
|
if (rightCtr.position.pixels ==
|
||||||
@ -243,4 +257,23 @@ class LikeLogic extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void changeCircle(String param) async {
|
||||||
|
await loadMyCircleData();
|
||||||
|
int changeIndex = 0;
|
||||||
|
mycircle.lists.forEach((element) {
|
||||||
|
if (element.id.toString() == param) {
|
||||||
|
changeIndex = mycircle.lists.indexOf(element);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
currentIndex = changeIndex;
|
||||||
|
update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class ChangeCircleIndex {
|
||||||
|
String param;
|
||||||
|
ChangeCircleIndex(this.param);
|
||||||
|
}
|
||||||
@ -329,7 +329,7 @@ class _RightCircleItenState extends State<RightCircleIten>
|
|||||||
width: 20.sp,
|
width: 20.sp,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${convertToTenThousand(interestAgentMap.isNotEmpty ? interestAgentMap['rewardCoin'] : 0)}',
|
'${convertToThousand(interestAgentMap.isNotEmpty ? interestAgentMap['rewardCoin'] : 0)}',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 13.sp),
|
style: TextStyle(color: Colors.white, fontSize: 13.sp),
|
||||||
),
|
),
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
@ -545,6 +545,7 @@ class _RightCircleItenState extends State<RightCircleIten>
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
child: SmartRefresher(
|
child: SmartRefresher(
|
||||||
|
|
||||||
controller: refreshController,
|
controller: refreshController,
|
||||||
onRefresh: () {
|
onRefresh: () {
|
||||||
EventBusManager.fire(RightRefreshContrller(_tabController.index));
|
EventBusManager.fire(RightRefreshContrller(_tabController.index));
|
||||||
@ -564,27 +565,11 @@ class _RightCircleItenState extends State<RightCircleIten>
|
|||||||
headerSliverBuilder: (context, isScrolled) {
|
headerSliverBuilder: (context, isScrolled) {
|
||||||
print('isScrolled' + isScrolled.toString());
|
print('isScrolled' + isScrolled.toString());
|
||||||
return [
|
return [
|
||||||
SliverAppBar(
|
SliverToBoxAdapter(
|
||||||
stretch: false,
|
child: circleTiitleWidget(
|
||||||
elevation: 0,
|
urlList,
|
||||||
primary: true,
|
widgets,
|
||||||
pinned: false,
|
)),
|
||||||
floating: true,
|
|
||||||
forceElevated: true,
|
|
||||||
toolbarHeight: 0,
|
|
||||||
foregroundColor: Colors.transparent,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
expandedHeight: 58.sp + textHeight + (interestAgentMap.isNotEmpty ? 45.sp : 0),
|
|
||||||
flexibleSpace: FlexibleSpaceBar(
|
|
||||||
expandedTitleScale: 1.0,
|
|
||||||
centerTitle: true,
|
|
||||||
titlePadding: EdgeInsets.zero,
|
|
||||||
title: circleTiitleWidget(
|
|
||||||
urlList,
|
|
||||||
widgets,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
body: Column(
|
body: Column(
|
||||||
@ -699,9 +684,13 @@ class _RightCircleItenState extends State<RightCircleIten>
|
|||||||
children: [
|
children: [
|
||||||
RightCircleListWidget(widget.index, widget.bean, widget.logic,0,scrollController,interestAgentMap,() {
|
RightCircleListWidget(widget.index, widget.bean, widget.logic,0,scrollController,interestAgentMap,() {
|
||||||
_tabController.index = 1;
|
_tabController.index = 1;
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Future.delayed(Duration(milliseconds: 200),() {
|
||||||
|
EventBusManager.fire(RightScrollViewIsEnd(true));
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
RightCircleListWidget(widget.index, widget.bean, widget.logic,1,scrollController,interestAgentMap,(){
|
RightCircleListWidget(widget.index, widget.bean, widget.logic,1,scrollController,interestAgentMap,(){
|
||||||
|
|
||||||
@ -1173,7 +1162,12 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
|||||||
// TODO: implement dispose
|
// TODO: implement dispose
|
||||||
|
|
||||||
sub.cancel();
|
sub.cancel();
|
||||||
sub1.camcel();
|
try {
|
||||||
|
sub1.camcel();
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
callRefreshCicle?.cancel();
|
callRefreshCicle?.cancel();
|
||||||
scrollController.dispose();
|
scrollController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@ -1219,7 +1213,6 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
|||||||
if (widget.type == 0 && refreshController.footerStatus == LoadStatus.noMore) {
|
if (widget.type == 0 && refreshController.footerStatus == LoadStatus.noMore) {
|
||||||
widget.changeTab();
|
widget.changeTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
GridScrollController.addListener(() {
|
GridScrollController.addListener(() {
|
||||||
@ -1446,6 +1439,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
|||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
itemCount: lists.length,
|
itemCount: lists.length,
|
||||||
|
shrinkWrap: true,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
|
|
||||||
Lists list = lists[index];
|
Lists list = lists[index];
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
// import 'package:flutter_install_app/flutter_install_app.dart';
|
import 'package:flutter_install_app/flutter_install_app.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
|||||||
});
|
});
|
||||||
DioManager.instance.setReceiveTimeout(30);
|
DioManager.instance.setReceiveTimeout(30);
|
||||||
// flutter_install_app
|
// flutter_install_app
|
||||||
// await AppInstaller.installApk(filePath, actionRequired: false);
|
await AppInstaller.installApk(filePath, actionRequired: false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ class HomeBinding extends Bindings {
|
|||||||
void dependencies() {
|
void dependencies() {
|
||||||
Get.lazyPut(() => HomeLogic());
|
Get.lazyPut(() => HomeLogic());
|
||||||
Get.lazyPut(() => CircleLogic());
|
Get.lazyPut(() => CircleLogic());
|
||||||
|
|
||||||
Get.lazyPut(() => World_call_outLogic());
|
Get.lazyPut(() => World_call_outLogic());
|
||||||
Get.lazyPut(() => MsgLogic());
|
Get.lazyPut(() => MsgLogic());
|
||||||
Get.lazyPut(() => MinefragmentLogic());
|
Get.lazyPut(() => MinefragmentLogic());
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import 'package:tencent_cloud_chat_uikit/data_services/message/message_services.
|
|||||||
import 'package:tencent_cloud_chat_uikit/data_services/services_locatar.dart';
|
import 'package:tencent_cloud_chat_uikit/data_services/services_locatar.dart';
|
||||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||||
|
|
||||||
|
import '../../commons/Widgets/today_people_dialog.dart';
|
||||||
import '../../utils/PaymentUtils.dart';
|
import '../../utils/PaymentUtils.dart';
|
||||||
import '../../utils/SharedPreferencesHelper.dart';
|
import '../../utils/SharedPreferencesHelper.dart';
|
||||||
import '../../utils/eventBus.dart';
|
import '../../utils/eventBus.dart';
|
||||||
@ -65,6 +66,8 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
|
|
||||||
bool isProd = true;
|
bool isProd = true;
|
||||||
|
|
||||||
|
bool isFirst = true;
|
||||||
|
|
||||||
String accountId = '';
|
String accountId = '';
|
||||||
|
|
||||||
String inviteCode = '';
|
String inviteCode = '';
|
||||||
@ -107,6 +110,8 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
loadMyCircleData();
|
loadMyCircleData();
|
||||||
|
|
||||||
initWxApi();
|
initWxApi();
|
||||||
|
|
||||||
|
awaitShowTodayDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
void addMsgListener() {
|
void addMsgListener() {
|
||||||
@ -494,7 +499,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void loadMyInfoData() async {
|
loadMyInfoData() async {
|
||||||
var data = await DioManager.instance.get(url: Api.getUserMine);
|
var data = await DioManager.instance.get(url: Api.getUserMine);
|
||||||
var bean = BaseResponse<MineResponseBean>.fromJson(
|
var bean = BaseResponse<MineResponseBean>.fromJson(
|
||||||
data, (data) => MineResponseBean.fromJson(data));
|
data, (data) => MineResponseBean.fromJson(data));
|
||||||
@ -506,18 +511,21 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
inviteCode = info.data!.inviteCode!;
|
inviteCode = info.data!.inviteCode!;
|
||||||
link = info.data!.link!;
|
link = info.data!.link!;
|
||||||
}
|
}
|
||||||
bool isGreaterThan30Days = isDifferenceGreaterThan30Days(
|
if (isFirst) {
|
||||||
(model!.createTime?.isNotEmpty ?? false)
|
isFirst = false;
|
||||||
? model!.createTime!
|
bool isGreaterThan30Days = isDifferenceGreaterThan30Days(
|
||||||
: DateTime.now().toString());
|
(model!.createTime?.isNotEmpty ?? false)
|
||||||
|
? model!.createTime!
|
||||||
|
: DateTime.now().toString());
|
||||||
|
|
||||||
if (isGreaterThan30Days) {
|
if (isGreaterThan30Days) {
|
||||||
currentIndex = 0;
|
currentIndex = 0;
|
||||||
} else {
|
} else {
|
||||||
currentIndex = 1;
|
currentIndex = 1;
|
||||||
|
}
|
||||||
|
updateIndex(currentIndex);
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
updateIndex(currentIndex);
|
|
||||||
update();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,6 +547,21 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void awaitShowTodayDialog() {
|
||||||
|
|
||||||
|
Future.delayed(Duration(seconds: 60), () async {
|
||||||
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
|
if (await sp.isFirstAutoMatch()) {
|
||||||
|
Get.bottomSheet(
|
||||||
|
TodayPeopleDialog(isShow: false,urlStr:Api.dayOnline),
|
||||||
|
isScrollControlled: true,
|
||||||
|
enableDrag: false,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class conTop {
|
class conTop {
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
|||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
const loginBgWidget = Image(
|
const loginBgWidget = Image(
|
||||||
image: AssetImage('assets/images/base/bg.png'),
|
image: AssetImage('data/img/base/bg.png'),
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -24,14 +24,14 @@ import '../../utils/util.dart';
|
|||||||
import '../msg/logic.dart';
|
import '../msg/logic.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
const vipIcon = 'assets/images/home/icon_vip_more.png';
|
const vipIcon = 'data/img/home/icon_vip_more.png';
|
||||||
|
|
||||||
const MyImageWidget = Image(
|
const MyImageWidget = Image(
|
||||||
image: AssetImage(vipIcon),
|
image: AssetImage(vipIcon),
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
);
|
);
|
||||||
|
|
||||||
const vipIcon1 = 'assets/images/home/icon_one_vip.png';
|
const vipIcon1 = 'data/img/home/icon_one_vip.png';
|
||||||
|
|
||||||
const MyImageWidget1 = Image(
|
const MyImageWidget1 = Image(
|
||||||
image: AssetImage(vipIcon1),
|
image: AssetImage(vipIcon1),
|
||||||
|
|||||||
@ -1322,7 +1322,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
url: Api.chatRecommendFriend,
|
url: Api.chatRecommendFriend,
|
||||||
);
|
);
|
||||||
|
EventBusManager.fire(SearchAnimationEnd());
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
List dataList = data['data'];
|
List dataList = data['data'];
|
||||||
if (dataList.isNotEmpty) {
|
if (dataList.isNotEmpty) {
|
||||||
@ -1330,11 +1330,18 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((data['code'] == 21201 || data['code'] == 21202) &&
|
if ((data['code'] == 21201 || data['code'] == 21202) ) {
|
||||||
recommendCircleFriendData.isNotEmpty) {
|
if (recommendCircleFriendData.isNotEmpty) {
|
||||||
showOKToast(data['msg']);
|
showOKToast(data['msg']);
|
||||||
showVipDialog();
|
showVipDialog();
|
||||||
}
|
} else {
|
||||||
|
recommendCircleFriendData = data['data'][0];
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
} else if (data['code'] == 31002) {
|
||||||
|
recommendCircleFriendData = data['data'][0];
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:circle_app/utils/eventBus.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
||||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||||
|
|
||||||
|
import '../../commons/Widgets/today_people_dialog.dart';
|
||||||
import '../../commons/colors/app_color.dart';
|
import '../../commons/colors/app_color.dart';
|
||||||
import '../../router/routers.dart';
|
import '../../router/routers.dart';
|
||||||
import '../../utils/cache_img.dart';
|
import '../../utils/cache_img.dart';
|
||||||
@ -25,6 +27,26 @@ class RecommendCircleFriendItem extends StatefulWidget {
|
|||||||
class _RecommendCircleFriendItemState extends State<RecommendCircleFriendItem> {
|
class _RecommendCircleFriendItemState extends State<RecommendCircleFriendItem> {
|
||||||
// TODO: add state variables and methods
|
// TODO: add state variables and methods
|
||||||
var recommendCircleFriendData;
|
var recommendCircleFriendData;
|
||||||
|
bool isShowLoad = false;
|
||||||
|
var sub;
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
super.initState();
|
||||||
|
sub = EventBusManager.on<SearchAnimationEnd>().listen((event) {
|
||||||
|
isShowLoad = false;
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
// TODO: implement dispose
|
||||||
|
super.dispose();
|
||||||
|
sub.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -32,7 +54,7 @@ class _RecommendCircleFriendItemState extends State<RecommendCircleFriendItem> {
|
|||||||
// TODO: add widget build method
|
// TODO: add widget build method
|
||||||
ErrorWidget.builder = (FlutterErrorDetails errorDetails) => Container();
|
ErrorWidget.builder = (FlutterErrorDetails errorDetails) => Container();
|
||||||
|
|
||||||
return recommendCircleFriendData == null ? Container() : recommendCircleFriendWidget();
|
return recommendCircleFriendData == null ? Container() : isShowLoad ? SearchAnimationWidget() : recommendCircleFriendWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -128,6 +150,10 @@ class _RecommendCircleFriendItemState extends State<RecommendCircleFriendItem> {
|
|||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
widget.getDataCallBack();
|
widget.getDataCallBack();
|
||||||
|
isShowLoad = true;
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -586,3 +612,8 @@ class _CircleInfoItemState extends State<CircleInfoItem> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class SearchAnimationEnd {
|
||||||
|
|
||||||
|
}
|
||||||
@ -210,6 +210,10 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (logic.con!.showName != '官方通知' &&
|
||||||
|
logic.con!.showName != '系统通知' &&
|
||||||
|
logic.con!.showName != '活动驿站' &&
|
||||||
|
logic.con!.showName != '互动通知')
|
||||||
Container(
|
Container(
|
||||||
height: MediaQuery.of(context).padding.bottom,
|
height: MediaQuery.of(context).padding.bottom,
|
||||||
color: Color(0xFF090B14),
|
color: Color(0xFF090B14),
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import 'TIMUIKitConversation/tim_uikit_conversation.dart';
|
|||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
const msgBgWidget = DecorationImage(
|
const msgBgWidget = DecorationImage(
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
image: AssetImage('assets/images/base/home_back.png'));
|
image: AssetImage('data/img/base/home_back.png'));
|
||||||
class MsgPage extends StatefulWidget {
|
class MsgPage extends StatefulWidget {
|
||||||
MsgPage({Key? key}) : super(key: key);
|
MsgPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@ -202,13 +202,18 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
curve: Curves.easeInOut,
|
curve: Curves.easeInOut,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: ShaderMask(
|
||||||
'消息',
|
shaderCallback: (Rect bounds) {
|
||||||
style: TextStyle(
|
return const LinearGradient(
|
||||||
fontSize: 18.sp,
|
begin: Alignment(0.0,-1.0),
|
||||||
fontWeight: FontWeight.w600,
|
end: Alignment.bottomCenter,
|
||||||
color: AppColor.mainColor,
|
colors: [Color(0xff71F3F2), Color(0xffF657FF)],
|
||||||
),
|
).createShader(Offset.zero & bounds.size);
|
||||||
|
},
|
||||||
|
child:Text(
|
||||||
|
'消息',
|
||||||
|
style: TextStyle(fontSize: 18.sp,fontWeight: FontWeight.w600,color: Colors.white,shadows: [Shadow(color: Color(0xffF657FF), offset: Offset(0.0, -1))]),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
@ -243,6 +248,8 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(onTap: () {
|
GestureDetector(onTap: () {
|
||||||
|
ctr.isShowNotifyTip = false;
|
||||||
|
ctr.update();
|
||||||
AppSettings.openAppSettings();
|
AppSettings.openAppSettings();
|
||||||
},child:Text('去开启',style: TextStyle(color: AppColor.mainColor,fontSize: 14.sp),)),
|
},child:Text('去开启',style: TextStyle(color: AppColor.mainColor,fontSize: 14.sp),)),
|
||||||
SizedBox(width: 4.sp,),
|
SizedBox(width: 4.sp,),
|
||||||
|
|||||||
@ -15,6 +15,8 @@ class MyCircleLogic extends GetxController {
|
|||||||
final CircleState state = CircleState();
|
final CircleState state = CircleState();
|
||||||
int page = 1;
|
int page = 1;
|
||||||
|
|
||||||
|
Map agentData = {};
|
||||||
|
|
||||||
bool isMore = true;
|
bool isMore = true;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -28,6 +30,7 @@ class MyCircleLogic extends GetxController {
|
|||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
await loadData();
|
await loadData();
|
||||||
|
loadAgentData();
|
||||||
scrollController.addListener(() {
|
scrollController.addListener(() {
|
||||||
if (scrollController.position.pixels ==
|
if (scrollController.position.pixels ==
|
||||||
scrollController.position.maxScrollExtent) {
|
scrollController.position.maxScrollExtent) {
|
||||||
@ -36,7 +39,14 @@ class MyCircleLogic extends GetxController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadAgentData() async {
|
||||||
|
var data = await DioManager.instance
|
||||||
|
.get(url: Api.agentTotal, );
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
agentData = data['data'];
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> loadData() async {
|
Future<void> loadData() async {
|
||||||
var data = await DioManager.instance
|
var data = await DioManager.instance
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import 'package:circle_app/circle_app/my_circle/logic.dart';
|
|||||||
import 'package:circle_app/circle_app/select_circle/logic.dart';
|
import 'package:circle_app/circle_app/select_circle/logic.dart';
|
||||||
import 'package:circle_app/commons/Widgets/circle_share.dart';
|
import 'package:circle_app/commons/Widgets/circle_share.dart';
|
||||||
import 'package:circle_app/commons/Widgets/text_more.dart';
|
import 'package:circle_app/commons/Widgets/text_more.dart';
|
||||||
|
import 'package:circle_app/commons/colors/app_color.dart';
|
||||||
import '../../commons/Widgets/my_app_bar.dart';
|
import '../../commons/Widgets/my_app_bar.dart';
|
||||||
import 'package:circle_app/router/routers.dart';
|
import 'package:circle_app/router/routers.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
@ -72,15 +73,21 @@ class _My_circlePageState extends State<My_circlePage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
var bean = logic.circle.lists[index];
|
var bean = logic.circle.lists[index];
|
||||||
return GestureDetector(
|
return Column(
|
||||||
behavior: HitTestBehavior.translucent,
|
children: [
|
||||||
onTap: () {
|
if (index == 0 && ((logic.agentData['rewardTotal'] ?? 0) > 0 || (logic.agentData['interestTotal'] ?? 0) > 0))
|
||||||
|
agentWidget(),
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.translucent,
|
||||||
|
onTap: () {
|
||||||
|
|
||||||
Get.toNamed(Routes.SignalCircleListPage, arguments: bean.id);
|
Get.toNamed(Routes.SignalCircleListPage, arguments: bean.id);
|
||||||
|
|
||||||
},
|
},
|
||||||
child: circleInfoItemWidget(
|
child: circleInfoItemWidget(
|
||||||
logic.circle.lists[index]));
|
logic.circle.lists[index])),
|
||||||
|
],
|
||||||
|
);
|
||||||
},
|
},
|
||||||
itemCount: logic.circle.lists.length + 1,
|
itemCount: logic.circle.lists.length + 1,
|
||||||
))
|
))
|
||||||
@ -123,6 +130,93 @@ class _My_circlePageState extends State<My_circlePage>
|
|||||||
|
|
||||||
var MyinfoListViewKey;
|
var MyinfoListViewKey;
|
||||||
|
|
||||||
|
agentWidget() {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(left: 10.sp,right: 10.sp,bottom: 10.sp),
|
||||||
|
padding: EdgeInsets.only(left: 5.sp,right: 10.sp),
|
||||||
|
height: 65.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
// gradient: AppColor.mainVerLinearGradient,
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getMineImage("my_wallet_bg")),
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
getMineImage('my_wallet'),
|
||||||
|
width: 50.sp,
|
||||||
|
),
|
||||||
|
SizedBox(width: 6.sp,),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'圈子代理人',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
Expanded(child: Container()),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(Routes.Revenue_Details);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'收益明细',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColor.mainColor, fontSize: 14.sp),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 5.sp,),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'已代理',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
logic.agentData['interestTotal'].toString(),
|
||||||
|
style:
|
||||||
|
TextStyle(color: Color(0xFFF95FF9), fontSize: 14.sp,fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'个圈子,',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
// Expanded(child: Container()),
|
||||||
|
Text(
|
||||||
|
'累计收益:',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
convertToThousand(logic.agentData['rewardTotal']),
|
||||||
|
style:
|
||||||
|
TextStyle(color: Color(0xFFF95FF9), fontSize: 14.sp,fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'小票',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
circleInfoItemWidget(Circle bean) {
|
circleInfoItemWidget(Circle bean) {
|
||||||
List<JoinUser> urlList = bean.lastJoinUsers;
|
List<JoinUser> urlList = bean.lastJoinUsers;
|
||||||
List<Widget> widgets = [];
|
List<Widget> widgets = [];
|
||||||
@ -147,6 +241,7 @@ class _My_circlePageState extends State<My_circlePage>
|
|||||||
margin: EdgeInsets.only(bottom: 10.sp, left: 10.sp, right: 10.sp),
|
margin: EdgeInsets.only(bottom: 10.sp, left: 10.sp, right: 10.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(10.sp),
|
topLeft: Radius.circular(10.sp),
|
||||||
|
|||||||
10
circle_app/lib/circle_app/revenue_details/binding.dart
Normal file
10
circle_app/lib/circle_app/revenue_details/binding.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class Revenue_detailsBinding extends Bindings {
|
||||||
|
@override
|
||||||
|
void dependencies() {
|
||||||
|
Get.lazyPut(() => Revenue_detailsLogic());
|
||||||
|
}
|
||||||
|
}
|
||||||
5
circle_app/lib/circle_app/revenue_details/logic.dart
Normal file
5
circle_app/lib/circle_app/revenue_details/logic.dart
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
class Revenue_detailsLogic extends GetxController {
|
||||||
|
|
||||||
|
}
|
||||||
119
circle_app/lib/circle_app/revenue_details/view.dart
Normal file
119
circle_app/lib/circle_app/revenue_details/view.dart
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
import 'package:circle_app/commons/Widgets/my_app_bar.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
|
import '../../net/api.dart';
|
||||||
|
import '../../net/dio_manager.dart';
|
||||||
|
import '../../utils/util.dart';
|
||||||
|
import '../bill/logic.dart';
|
||||||
|
import '../bill/view.dart';
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class Revenue_detailsPage extends StatefulWidget {
|
||||||
|
Revenue_detailsPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<Revenue_detailsPage> createState() => _Revenue_detailsPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Revenue_detailsPageState extends State<Revenue_detailsPage> {
|
||||||
|
final logic = Get.find<Revenue_detailsLogic>();
|
||||||
|
|
||||||
|
List<BillItem> list = [];
|
||||||
|
|
||||||
|
int page = 1;
|
||||||
|
RefreshController controller = RefreshController();
|
||||||
|
|
||||||
|
onRefresh() {
|
||||||
|
page = 1;
|
||||||
|
loadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoading() {
|
||||||
|
loadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
super.initState();
|
||||||
|
loadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getBaseImage("bg")),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
appBar: MyAppBar(
|
||||||
|
centerTitle: '收益明细',
|
||||||
|
),
|
||||||
|
body: list.isNotEmpty
|
||||||
|
? Container(
|
||||||
|
margin: EdgeInsets.only(top: 22.sp),
|
||||||
|
child: SmartRefresher(
|
||||||
|
controller: controller!,
|
||||||
|
onRefresh: () => onRefresh(),
|
||||||
|
onLoading: () => onLoading(),
|
||||||
|
enablePullUp: true,
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount: list.length,
|
||||||
|
// Replace 'yourList' with the actual list you want to display
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return ListItemWidget(
|
||||||
|
item: list[index],
|
||||||
|
type: 0,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: noResultWidget(),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadData() async {
|
||||||
|
var data = await DioManager.getInstance().post(url: Api.interestAgentBill, params: {
|
||||||
|
"type": 0,
|
||||||
|
"page": page,
|
||||||
|
"pageSize": 20,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
BillResponse billResponse = BillResponse.fromJson(data);
|
||||||
|
list.addAll(billResponse.list);
|
||||||
|
if (page == 1) {
|
||||||
|
controller.refreshCompleted();
|
||||||
|
controller.resetNoData();
|
||||||
|
if (billResponse.list.isNotEmpty) {
|
||||||
|
controller.loadComplete();
|
||||||
|
page++;
|
||||||
|
} else {
|
||||||
|
controller.loadNoData();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (billResponse.list.isNotEmpty) {
|
||||||
|
controller.loadComplete();
|
||||||
|
page++;
|
||||||
|
} else {
|
||||||
|
controller.loadNoData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -15,7 +15,7 @@ class SplashPage extends StatelessWidget {
|
|||||||
return Container(
|
return Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('assets/images/base/launch_back.webp'),
|
image: AssetImage('data/img/base/launch_back.webp'),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -7,6 +7,7 @@ class SwiperLogic extends GetxController {
|
|||||||
final SwiperState state = SwiperState();
|
final SwiperState state = SwiperState();
|
||||||
List<String> imgList = Get.arguments['imaglist'] ;
|
List<String> imgList = Get.arguments['imaglist'] ;
|
||||||
int index = Get.arguments['index'] ;
|
int index = Get.arguments['index'] ;
|
||||||
|
bool isVague = Get.arguments['isVague'] ?? false;
|
||||||
String userId = '';
|
String userId = '';
|
||||||
SwiperController swiperController = SwiperController();
|
SwiperController swiperController = SwiperController();
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
||||||
import 'package:circle_app/commons/colors/app_color.dart';
|
import 'package:circle_app/commons/colors/app_color.dart';
|
||||||
import 'package:circle_app/utils/util.dart';
|
import 'package:circle_app/utils/util.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -164,7 +167,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
},
|
},
|
||||||
padding: EdgeInsets.only(left: 15.sp),
|
padding: EdgeInsets.only(left: 15.sp),
|
||||||
icon: Image.asset(
|
icon: Image.asset(
|
||||||
'assets/images/navigator/back.png',
|
'data/img/nav/back.png',
|
||||||
width: 30.sp,
|
width: 30.sp,
|
||||||
height: 30.sp,
|
height: 30.sp,
|
||||||
),
|
),
|
||||||
@ -181,6 +184,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
itemWidget(SwiperLogic logic, int index, bool isShow) {
|
itemWidget(SwiperLogic logic, int index, bool isShow) {
|
||||||
String link = homeLogic.link + '#code=' + homeLogic.inviteCode;
|
String link = homeLogic.link + '#code=' + homeLogic.inviteCode;
|
||||||
return Stack(
|
return Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
@ -315,6 +319,65 @@ class _SwiperPageState extends State<SwiperPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
))),
|
))),
|
||||||
|
if (logic.isVague && logic.index > 0)
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
showOKToast('开通会员后可以解锁TA和其他所有人的形象照');
|
||||||
|
showOepnVipDialog().then((value) async {
|
||||||
|
HomeLogic homeLogic = Get.find<HomeLogic>();
|
||||||
|
await homeLogic.loadMyInfoData();
|
||||||
|
if (homeLogic.model!.vip == 0) {
|
||||||
|
logic.isVague = true;
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: ClipRect(
|
||||||
|
child: BackdropFilter(
|
||||||
|
filter: ImageFilter.blur( sigmaX: 8,
|
||||||
|
sigmaY: 8),
|
||||||
|
child: Container(
|
||||||
|
color: Colors.transparent,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (logic.isVague && logic.index > 0)
|
||||||
|
Positioned(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
showOKToast('开通会员后可以解锁TA和其他所有人的形象照');
|
||||||
|
showOepnVipDialog().then((value) async {
|
||||||
|
HomeLogic homeLogic = Get.find<HomeLogic>();
|
||||||
|
await homeLogic.loadMyInfoData();
|
||||||
|
if (homeLogic.model!.vip == 0) {
|
||||||
|
logic.isVague = true;
|
||||||
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 30.sp,
|
||||||
|
width: 55.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
|
borderRadius: BorderRadius.circular(15.sp)
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text('解锁全部',style: TextStyle(color: Colors.white,fontSize: 12.sp),),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
// return Container(
|
// return Container(
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class UserinfoLogic extends GetxController {
|
|||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
SmartDialog.showLoading();
|
// SmartDialog.showLoading();
|
||||||
|
|
||||||
sharedPreferences = await SharedPreferences.getInstance();
|
sharedPreferences = await SharedPreferences.getInstance();
|
||||||
int? sharedUserId =
|
int? sharedUserId =
|
||||||
@ -93,7 +93,7 @@ class UserinfoLogic extends GetxController {
|
|||||||
fetchUrgeStatus("${Api.getUrgeStatus + userId}/urge/album/status");
|
fetchUrgeStatus("${Api.getUrgeStatus + userId}/urge/album/status");
|
||||||
fetchIsBlack("${Api.setBlock + userId}/block");
|
fetchIsBlack("${Api.setBlock + userId}/block");
|
||||||
}
|
}
|
||||||
SmartDialog.dismiss();
|
// SmartDialog.dismiss();
|
||||||
fetchQnToken(Api.getqiniuToken);
|
fetchQnToken(Api.getqiniuToken);
|
||||||
loadGiftListData();
|
loadGiftListData();
|
||||||
}
|
}
|
||||||
@ -393,7 +393,7 @@ class UserinfoLogic extends GetxController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SmartDialog.showLoading();
|
SmartDialog.showLoading(msg: '上传中');
|
||||||
uploadImage(quToken, pickedFile, ImgPath.USER_ALBUM_IMAGE, (result) async {
|
uploadImage(quToken, pickedFile, ImgPath.USER_ALBUM_IMAGE, (result) async {
|
||||||
var data = await DioManager.instance
|
var data = await DioManager.instance
|
||||||
.post(url: Api.updataAlbum, params: {"type": 1, "url": result});
|
.post(url: Api.updataAlbum, params: {"type": 1, "url": result});
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:circle_app/circle_app/userinfo/widgets/home_call_out.dart';
|
import 'package:circle_app/circle_app/userinfo/widgets/home_call_out.dart';
|
||||||
import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
import 'package:circle_app/commons/Widgets/base_tip_widget.dart';
|
||||||
@ -43,7 +45,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
sub = EventBusManager.on<ScrollViewScrollTop>().listen((event) {
|
sub = EventBusManager.on<ScrollViewScrollTop>().listen((event) {
|
||||||
if (isSetState) {
|
if (isSetState) {
|
||||||
isSetState = false;
|
isSetState = false;
|
||||||
setState(() {});
|
scrollController.animateTo(0, duration: Duration(milliseconds: 250), curve: Curves.easeIn);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
scrollController.addListener(() {
|
scrollController.addListener(() {
|
||||||
@ -52,12 +54,12 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
print('2222');
|
print('2222');
|
||||||
isSetState = true;
|
isSetState = true;
|
||||||
EventBusManager.fire(ScrollViewIsEnd(true));
|
EventBusManager.fire(ScrollViewIsEnd(true));
|
||||||
setState(() {});
|
// setState(() {});
|
||||||
} else {
|
} else {
|
||||||
EventBusManager.fire(ScrollViewIsEnd(false));
|
EventBusManager.fire(ScrollViewIsEnd(false));
|
||||||
if (isSetState) {
|
if (isSetState) {
|
||||||
isSetState = false;
|
isSetState = false;
|
||||||
setState(() {});
|
// setState(() {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -246,25 +248,27 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
:Container(
|
: Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
// width: 200.sp,
|
// width: 200.sp,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
margin: EdgeInsets.only(left: 5.sp, bottom: 5.sp),
|
margin:
|
||||||
child: Row(
|
EdgeInsets.only(left: 5.sp, bottom: 5.sp),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
child: Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
userWxStatusWidget(
|
children: [
|
||||||
!logic.userInfoBean!.contact!.contains('*'),
|
userWxStatusWidget(
|
||||||
logic.userInfoBean!.contact!,
|
!logic.userInfoBean!.contact!
|
||||||
logic.userId.toString(),
|
.contains('*'),
|
||||||
logic.userInfoBean!.contactType!,
|
logic.userInfoBean!.contact!,
|
||||||
logic.userInfoBean!.avatar!, () {
|
logic.userId.toString(),
|
||||||
logic.fetchUserInfo(
|
logic.userInfoBean!.contactType!,
|
||||||
"${Api.getUserInfoTA + logic.userId}/home");
|
logic.userInfoBean!.avatar!, () {
|
||||||
}),
|
logic.fetchUserInfo(
|
||||||
],
|
"${Api.getUserInfoTA + logic.userId}/home");
|
||||||
))
|
}),
|
||||||
|
],
|
||||||
|
))
|
||||||
: Container())
|
: Container())
|
||||||
: MyAppBar(
|
: MyAppBar(
|
||||||
centerTitle: logic.userInfoBean != null
|
centerTitle: logic.userInfoBean != null
|
||||||
@ -282,28 +286,13 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
headerSliverBuilder: (context, isScrolled) {
|
headerSliverBuilder: (context, isScrolled) {
|
||||||
return [
|
return [
|
||||||
SliverAppBar(
|
SliverOverlapAbsorber(
|
||||||
stretch: false,
|
handle:
|
||||||
elevation: 0,
|
NestedScrollView.sliverOverlapAbsorberHandleFor(
|
||||||
primary: true,
|
context),
|
||||||
pinned: false,
|
sliver: SliverToBoxAdapter(
|
||||||
floating: true,
|
child: buildContent(logic),
|
||||||
forceElevated: true,
|
))
|
||||||
toolbarHeight: 0,
|
|
||||||
foregroundColor: Colors.transparent,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
expandedHeight: 362.sp,
|
|
||||||
// bottom: PreferredSize(
|
|
||||||
// preferredSize: Size(Get.width, 40),
|
|
||||||
// child: titleTab(logic),
|
|
||||||
// ),
|
|
||||||
flexibleSpace: FlexibleSpaceBar(
|
|
||||||
expandedTitleScale: 1.0,
|
|
||||||
centerTitle: true,
|
|
||||||
titlePadding: EdgeInsets.zero,
|
|
||||||
title: buildContent(logic),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
body: contentWidget(logic),
|
body: contentWidget(logic),
|
||||||
@ -766,7 +755,9 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
: _imageAdapter(controller),
|
: _imageAdapter(controller),
|
||||||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||||||
? Container()
|
? Container()
|
||||||
: HomeCallOutView(controller.userId),
|
:
|
||||||
|
HomeCallOutView(controller.userId),
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -968,7 +959,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
controller.likeMeCount.toString(),
|
controller.likeMeCount.toString(),
|
||||||
style: TextStyle(color:AppColor.mainColor),
|
style: TextStyle(color: AppColor.mainColor),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'位圈友感兴趣,其中',
|
'位圈友感兴趣,其中',
|
||||||
@ -976,7 +967,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
controller.imageUrgeCount.toString(),
|
controller.imageUrgeCount.toString(),
|
||||||
style: TextStyle(color:AppColor.mainColor),
|
style: TextStyle(color: AppColor.mainColor),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'位已催您更新',
|
'位已催您更新',
|
||||||
@ -1030,7 +1021,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (controller.state.imaglist.length >= 15) {
|
if (controller.state.imaglist.length >= 15) {
|
||||||
showOKToast("最大只可上传15张图片哦~");
|
showOKToast("最多只能上传15张,可长按删除一些再上传~");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
controller.getImageFile();
|
controller.getImageFile();
|
||||||
@ -1061,10 +1052,10 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
margin: EdgeInsets.all(5.sp),
|
margin: EdgeInsets.all(5.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: _buildImageItem(
|
child: _buildImageItem(
|
||||||
controller.state.imaglist[index].urlThumb,
|
controller.state.imaglist[index].urlThumb,
|
||||||
controller,
|
controller,
|
||||||
index,0
|
index,
|
||||||
),
|
0),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1191,19 +1182,20 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildImageItem(String url, UserinfoLogic controller, int index,int isTop) {
|
Widget _buildImageItem(
|
||||||
|
String url, UserinfoLogic controller, int index, int isTop) {
|
||||||
return Stack(
|
return Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
|
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
if (logic.isMe) {
|
if (logic.isMe) {
|
||||||
showImgTipPop(url,index,isTop == 1, controller);
|
showImgTipPop(url, index, isTop == 1, controller);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -1212,7 +1204,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
imaglist.add(element.url);
|
imaglist.add(element.url);
|
||||||
}
|
}
|
||||||
Get.toNamed(Routes.SwiperPage,
|
Get.toNamed(Routes.SwiperPage,
|
||||||
arguments: {'imaglist': imaglist, 'index': index});
|
arguments: {'imaglist': imaglist, 'index': index,'isVague':homeLogic.model!.vip == 0})!.then((value) => logic.update());
|
||||||
},
|
},
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
@ -1221,29 +1213,54 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// if (controller.userId == "")
|
if (!logic.isMe && index > 0 && homeLogic.model!.vip == 0)
|
||||||
// Positioned(
|
GestureDetector(
|
||||||
// top: 0,
|
behavior: HitTestBehavior.opaque,
|
||||||
// right: 0,
|
onTap: () async {
|
||||||
// child: GestureDetector(
|
showOKToast('开通会员后可以解锁TA和其他所有人的形象照');
|
||||||
// onTap: () {
|
await showOepnVipDialog();
|
||||||
// _showDelImgDialog(context, controller, index);
|
homeLogic.loadMyInfoData();
|
||||||
// },
|
},
|
||||||
// child: Visibility(
|
child: ClipRect(
|
||||||
// visible: controller.isEdit,
|
child: BackdropFilter(
|
||||||
// child: Image(
|
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
|
||||||
// image: AssetImage(getMineImage("icon_img_del")),
|
child: Container(
|
||||||
// width: 20.sp,
|
color: Colors.transparent,
|
||||||
// height: 20.sp,
|
),
|
||||||
// ),
|
),
|
||||||
// ),
|
)),
|
||||||
// ),
|
if (!logic.isMe && index > 0 && homeLogic.model!.vip == 0)
|
||||||
// ),
|
Positioned(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
showOKToast('开通会员后可以解锁TA和其他所有人的形象照');
|
||||||
|
await showOepnVipDialog();
|
||||||
|
homeLogic.loadMyInfoData();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 30.sp,
|
||||||
|
width: 55.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
|
borderRadius: BorderRadius.circular(15.sp)),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
'解锁全部',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
showImgTipPop(String url,int index, bool isTop,var contrller) {
|
showImgTipPop(String url, int index, bool isTop, var contrller) {
|
||||||
Get.bottomSheet(
|
Get.bottomSheet(
|
||||||
CupertinoActionSheet(
|
CupertinoActionSheet(
|
||||||
title: Text(
|
title: Text(
|
||||||
@ -1255,7 +1272,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
CupertinoActionSheetAction(
|
CupertinoActionSheetAction(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
logic.setTopAlbum(!isTop,index);
|
logic.setTopAlbum(!isTop, index);
|
||||||
},
|
},
|
||||||
child: Text(isTop ? '取消置顶' : '置顶'),
|
child: Text(isTop ? '取消置顶' : '置顶'),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -101,7 +101,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
|||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
// physics: const AlwaysScrollableScrollPhysics(),
|
// physics: const AlwaysScrollableScrollPhysics(),
|
||||||
physics: isEnd
|
physics: isEnd
|
||||||
? AlwaysScrollableScrollPhysics()
|
? BouncingScrollPhysics()
|
||||||
: NeverScrollableScrollPhysics(),
|
: NeverScrollableScrollPhysics(),
|
||||||
// shrinkWrap:true,
|
// shrinkWrap:true,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
|
|||||||
@ -51,22 +51,6 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
WidgetsBinding.instance.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @override
|
|
||||||
// void didChangeMetrics() {
|
|
||||||
// super.didChangeMetrics();
|
|
||||||
// WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
// if (MediaQuery.of(context).viewInsets.bottom == 0) {
|
|
||||||
// /// 键盘收回
|
|
||||||
// logic.showKeyboard = false;
|
|
||||||
// } else {
|
|
||||||
// /// 键盘弹出
|
|
||||||
// logic.showKeyboard = true;
|
|
||||||
// logic.showEmojiPanel = false;
|
|
||||||
// logic.update();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GetBuilder<World_call_outLogic>(builder: (logic) {
|
return GetBuilder<World_call_outLogic>(builder: (logic) {
|
||||||
@ -182,9 +166,9 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
print('111');
|
print('111');
|
||||||
}
|
}
|
||||||
if (data.showType == 2) {
|
if (data.showType == 2) {
|
||||||
return sigalItemWidget(index, data);
|
return SigalItemWidget(index, data);
|
||||||
}
|
}
|
||||||
return itemWidget(index, logic.lists[index]);
|
return SysItemWidget(index, logic.lists[index],logic);
|
||||||
},
|
},
|
||||||
itemCount: logic.lists.length,
|
itemCount: logic.lists.length,
|
||||||
controller: logic.scrollController,
|
controller: logic.scrollController,
|
||||||
@ -240,272 +224,81 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget sigalItemWidget(int index, WorldLists list) {
|
double getBottomHeight(context) {
|
||||||
double picHeight = 0.0;
|
if (logic.showKeyboard) {
|
||||||
double picWidth = Get.width - 90.sp;
|
final currentKeyboardHeight = MediaQuery.of(context).viewInsets.bottom;
|
||||||
if (list.album != null) {
|
final height = currentKeyboardHeight;
|
||||||
if (list.album!.isNotEmpty) {
|
return height;
|
||||||
Album info = list.album!.first;
|
} else if (logic.showEmojiPanel) {
|
||||||
picHeight = 140.sp;
|
return 240.0 + MediaQuery.of(context).viewInsets.bottom;
|
||||||
if (info.type == 1) {
|
} else {
|
||||||
if (list.album!.length > 3 && list.album!.length < 7) {
|
return 0;
|
||||||
picHeight = picHeight * 2;
|
|
||||||
} else if (list.album!.length >= 7) {
|
|
||||||
picHeight = picHeight * 3;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
picHeight = 200.sp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: 8.sp, bottom: 8.sp, left: 10.sp, right: 10.sp),
|
|
||||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: list.borderType == 2
|
|
||||||
? GradientBoxBorder(
|
|
||||||
gradient: AppColor.mainVerLinearGradient,
|
|
||||||
width: 1.sp,
|
|
||||||
)
|
|
||||||
: Border.all(
|
|
||||||
color: Colors.white.withOpacity(0.1), width: 1.sp),
|
|
||||||
borderRadius: BorderRadius.circular(20.sp)),
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
Get.toNamed(Routes.UserInfoPage,
|
|
||||||
arguments: list.user!.id!.toString());
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
ClipOval(
|
|
||||||
child: CachedImg(
|
|
||||||
imageUrl: list.user!.avatar ?? '',
|
|
||||||
width: 20.sp,
|
|
||||||
height: 20.sp,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 4.sp,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
list.user!.nickname ?? '',
|
|
||||||
style: TextStyle(color: AppColor.mainColor, fontSize: 12.sp),
|
|
||||||
),
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Text(list.content ?? '',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFFF7FAFA), fontSize: 12.sp)),
|
|
||||||
picOrVideoItem(picHeight, list),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 4.sp,
|
|
||||||
),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
pushPage(
|
|
||||||
list.jumpInfo!.scene ?? '', list.jumpInfo!.param ?? '');
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: 22.sp,
|
|
||||||
padding: EdgeInsets.only(left: 5.sp, right: 5.sp),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
gradient: AppColor.tagVerLinearGradient,
|
|
||||||
borderRadius: BorderRadius.circular(11.sp)),
|
|
||||||
child: Text(
|
|
||||||
list.jumpInfo!.btnText ?? '',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white.withOpacity(0.75),
|
|
||||||
fontSize: 14.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
circleInfoItem(WorldLists list) {
|
Widget getBottomContainer() {
|
||||||
return list.interest!.image != null
|
|
||||||
? GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
Get.toNamed(Routes.SignalCircleListPage, arguments: list.interest!.id!);
|
|
||||||
},
|
|
||||||
child: ClipRRect(
|
|
||||||
|
|
||||||
child: Container(
|
return const SizedBox(height: 0);
|
||||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
|
||||||
height: 40.sp,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
|
||||||
border: Border.all(color: Colors.white.withOpacity(0.1),width: 1.sp)
|
|
||||||
// image: DecorationImage(
|
|
||||||
// fit: BoxFit.fill,
|
|
||||||
// image: AssetImage(getCircleImage('top_circle_bg')))
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 32.sp,
|
|
||||||
height: 32.sp,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
gradient: const LinearGradient(
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: [
|
|
||||||
Color(0xFF71F3F2),
|
|
||||||
Color(0xFFF558FF),
|
|
||||||
],
|
|
||||||
stops: [0.0365, 0.9427],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
padding: EdgeInsets.all(1.sp),
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
child: CachedImg(
|
|
||||||
imageUrl: list.interest!.image!,
|
|
||||||
width: 30.sp,
|
|
||||||
height: 30.sp,
|
|
||||||
fit: BoxFit.cover),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: GestureDetector(
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: () {
|
|
||||||
// scrollController.animateTo(
|
|
||||||
// 0.0, // Scroll to the top
|
|
||||||
// duration: Duration(milliseconds: 300),
|
|
||||||
// curve: Curves.easeInOut,
|
|
||||||
// );
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(left: 8.sp, top: 2.sp),
|
|
||||||
// alignment: Alignment.,
|
|
||||||
// height: 40.sp,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
list.interest!.title!,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 14.sp,),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 2.sp,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'${convertToTenThousand(list.interest!.viewTotal!)}人看过',
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white.withOpacity(0.5),
|
|
||||||
fontSize: 10.sp,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
GestureDetector(
|
|
||||||
//加入圈子
|
|
||||||
onTap: () async {
|
|
||||||
if (list.interest!.isJoin!) {
|
|
||||||
Map<String, dynamic> info = list.interest!.toJson();
|
|
||||||
Get.bottomSheet(
|
|
||||||
CircleShare('', '', Circle.fromJson(info)),
|
|
||||||
isScrollControlled: true,
|
|
||||||
enableDrag: false);
|
|
||||||
} else {
|
|
||||||
await logic.outCircle(list.interest!.id!.toString(),
|
|
||||||
list.interest!.isJoin!);
|
|
||||||
if (Get.isRegistered<LikeLogic>()) {
|
|
||||||
LikeLogic likeLogic = Get.find<LikeLogic>();
|
|
||||||
likeLogic.loadMyCircleData();
|
|
||||||
}
|
|
||||||
logic.update();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Stack(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
|
||||||
Opacity(
|
|
||||||
opacity: 0.5,
|
|
||||||
child: Image.asset(
|
|
||||||
getCircleImage('add'),
|
|
||||||
width: 60.sp,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
!list.interest!.isJoin! ? '申请加入' : '分享有奖',
|
|
||||||
style:
|
|
||||||
TextStyle(color: Colors.white, fontSize: 12.sp),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
)
|
|
||||||
: Container();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
picOrVideoItem(double picHeight, WorldLists list) {
|
void addStickerToText(String sticker) {
|
||||||
return picHeight > 0
|
final oldText = logic.inputController.text;
|
||||||
? Container(
|
if (currentCursor != null && currentCursor! > -1) {
|
||||||
height: picHeight,
|
final firstString = oldText.substring(0, currentCursor);
|
||||||
alignment: Alignment.topLeft,
|
final secondString = oldText.substring(currentCursor!);
|
||||||
margin: EdgeInsets.only(left: 10.sp, right: 10.sp,bottom: 5.sp),
|
currentCursor = currentCursor! + sticker.length;
|
||||||
child: picHeight == 200.sp
|
logic.inputController.text = "$firstString$sticker$secondString";
|
||||||
? VideoItemWidget(list.album![0].url!)
|
} else {
|
||||||
: GridView.builder(
|
logic.inputController.text = "$oldText$sticker";
|
||||||
itemCount: list.album!.length,
|
}
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 3, //横轴三个子widget
|
|
||||||
crossAxisSpacing: 4.sp,
|
|
||||||
mainAxisSpacing: 4.sp,
|
|
||||||
childAspectRatio: 0.7 //宽高比为1时,子widget
|
|
||||||
),
|
|
||||||
itemBuilder: (contentxt, currentIndex) {
|
|
||||||
Album album = list.album![currentIndex];
|
|
||||||
return GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
var imgList = <String>[];
|
|
||||||
for (var element in list.album!) {
|
|
||||||
imgList.add(element.url!);
|
|
||||||
}
|
|
||||||
Get.toNamed(Routes.SwiperPage, arguments: {
|
|
||||||
'imaglist': imgList,
|
|
||||||
'index': currentIndex
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.circular(6.sp),
|
|
||||||
child: CachedImg(
|
|
||||||
imageUrl: album.url!,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}))
|
|
||||||
: Container();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget itemWidget(int index, WorldLists list) {
|
backSpaceText() {
|
||||||
|
String originalText = logic.inputController.text;
|
||||||
|
dynamic text;
|
||||||
|
|
||||||
|
if (originalText == zeroWidthSpace) {
|
||||||
|
} else {
|
||||||
|
text = originalText.characters.skipLast(1);
|
||||||
|
logic.inputController.text = text;
|
||||||
|
// handleSetDraftText();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 和onSubmitted一样,只是保持焦点的不同
|
||||||
|
onEmojiSubmitted() {
|
||||||
|
final text = logic.inputController.text.trim();
|
||||||
|
|
||||||
|
if (text.isNotEmpty) {}
|
||||||
|
logic.inputController.clear();
|
||||||
|
|
||||||
|
currentCursor = null;
|
||||||
|
exitEditText();
|
||||||
|
}
|
||||||
|
|
||||||
|
exitEditText() {
|
||||||
|
logic.showKeyboard = false;
|
||||||
|
logic.showEmojiPanel = false;
|
||||||
|
logic.focusNode.unfocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class SysItemWidget extends StatefulWidget {
|
||||||
|
int index; WorldLists list; World_call_outLogic logic;
|
||||||
|
SysItemWidget(this.index,this.list, this.logic);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<SysItemWidget> createState() => _SysItemWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SysItemWidgetState extends State<SysItemWidget> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return itemWidget(widget.index,widget.list,widget.logic);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget itemWidget(int index, WorldLists list,World_call_outLogic logic) {
|
||||||
if (list.isSystem! == 1) {
|
if (list.isSystem! == 1) {
|
||||||
return sysItemWidget(index, list);
|
return sysItemWidget(index, list);
|
||||||
}
|
}
|
||||||
@ -538,20 +331,20 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
)
|
)
|
||||||
: Container(
|
: Container(
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
child: HideText(
|
child: HideText(
|
||||||
text: list.content!,
|
text: list.content!,
|
||||||
maxWidth: Get.width - 90.sp,
|
maxWidth: Get.width - 90.sp,
|
||||||
additionText: '查看更多',
|
additionText: '查看更多',
|
||||||
maxLines: 15,
|
maxLines: 15,
|
||||||
style: TextStyle(color: Color(0xFFF7FAFA), fontSize: 14.sp),
|
style: TextStyle(color: Color(0xFFF7FAFA), fontSize: 14.sp),
|
||||||
additionStyle:
|
additionStyle:
|
||||||
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
TextStyle(color: const Color(0xFFFF4DF6), fontSize: 14.sp),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
logic.openCallOutIdList.add(list.id!);
|
logic.openCallOutIdList.add(list.id!);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp,bottom:10.sp),
|
margin: EdgeInsets.only(top: 10.sp,bottom:10.sp),
|
||||||
@ -635,18 +428,18 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
width: Get.width - 90.sp,
|
width: Get.width - 90.sp,
|
||||||
margin: EdgeInsets.only(top: 8.sp),
|
margin: EdgeInsets.only(top: 8.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// image: DecorationImage(
|
// image: DecorationImage(
|
||||||
// fit: BoxFit.fill,
|
// fit: BoxFit.fill,
|
||||||
// image: AssetImage(getCircleImage('normal_bg'))),
|
// image: AssetImage(getCircleImage('normal_bg'))),
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
border: list!.isQueen!
|
border: list!.isQueen!
|
||||||
? GradientBoxBorder(
|
? GradientBoxBorder(
|
||||||
gradient: AppColor.mainVerLinearGradient,
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
width: 1.sp,
|
width: 1.sp,
|
||||||
)
|
)
|
||||||
: Border.all(
|
: Border.all(
|
||||||
color: Colors.white.withOpacity(0.1),
|
color: Colors.white.withOpacity(0.1),
|
||||||
width: 1.sp)),
|
width: 1.sp)),
|
||||||
// height: widgetAllHeight + wordsHeight,
|
// height: widgetAllHeight + wordsHeight,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
@ -687,9 +480,9 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
// WidgetSpan(
|
// WidgetSpan(
|
||||||
// child:descText)
|
// child:descText)
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: list.content!,
|
text: list.content!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFF7FAFA), fontSize: 14.sp)),
|
color: Color(0xFFF7FAFA), fontSize: 14.sp)),
|
||||||
@ -727,7 +520,7 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
sysItemWidget(int index, WorldLists list) {
|
sysItemWidget(int index, WorldLists list) {
|
||||||
bool isSelf = logic.myUserId == list.user!.id!.toString();
|
bool isSelf = widget.logic.myUserId == list.user!.id!.toString();
|
||||||
double picHeight = 0.0;
|
double picHeight = 0.0;
|
||||||
double picWidth = Get.width - 90.sp;
|
double picWidth = Get.width - 90.sp;
|
||||||
|
|
||||||
@ -838,12 +631,12 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
image: AssetImage(getCircleImage('normal_bg'))),
|
image: AssetImage(getCircleImage('normal_bg'))),
|
||||||
border: list.isQueen!
|
border: list.isQueen!
|
||||||
? GradientBoxBorder(
|
? GradientBoxBorder(
|
||||||
gradient: AppColor.mainVerLinearGradient,
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
width: 1.sp,
|
width: 1.sp,
|
||||||
)
|
)
|
||||||
: Border.all(
|
: Border.all(
|
||||||
color: Colors.white.withOpacity(0.1),
|
color: Colors.white.withOpacity(0.1),
|
||||||
width: 1.sp)),
|
width: 1.sp)),
|
||||||
// height: widgetAllHeight + wordsHeight,
|
// height: widgetAllHeight + wordsHeight,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
@ -925,8 +718,8 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
),
|
),
|
||||||
if (!isSelf && list.jumpInfo != null)
|
if (!isSelf && list.jumpInfo != null)
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 15.sp,
|
right: 25.sp,
|
||||||
bottom: 0.sp,
|
bottom: 5.sp,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
pushPage(list.jumpInfo!.scene!, list.jumpInfo!.param!);
|
pushPage(list.jumpInfo!.scene!, list.jumpInfo!.param!);
|
||||||
@ -948,61 +741,329 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
double getBottomHeight(context) {
|
picOrVideoItem(double picHeight, WorldLists list) {
|
||||||
if (logic.showKeyboard) {
|
return picHeight > 0
|
||||||
final currentKeyboardHeight = MediaQuery.of(context).viewInsets.bottom;
|
? Container(
|
||||||
final height = currentKeyboardHeight;
|
height: picHeight,
|
||||||
return height;
|
alignment: Alignment.topLeft,
|
||||||
} else if (logic.showEmojiPanel) {
|
margin: EdgeInsets.only(left: 10.sp, right: 10.sp,bottom: 5.sp),
|
||||||
return 240.0 + MediaQuery.of(context).viewInsets.bottom;
|
child: picHeight == 200.sp
|
||||||
} else {
|
? VideoItemWidget(list.album![0].url!)
|
||||||
return 0;
|
: GridView.builder(
|
||||||
|
itemCount: list.album!.length,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 3, //横轴三个子widget
|
||||||
|
crossAxisSpacing: 4.sp,
|
||||||
|
mainAxisSpacing: 4.sp,
|
||||||
|
childAspectRatio: 0.7 //宽高比为1时,子widget
|
||||||
|
),
|
||||||
|
itemBuilder: (contentxt, currentIndex) {
|
||||||
|
Album album = list.album![currentIndex];
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
var imgList = <String>[];
|
||||||
|
for (var element in list.album!) {
|
||||||
|
imgList.add(element.url!);
|
||||||
|
}
|
||||||
|
Get.toNamed(Routes.SwiperPage, arguments: {
|
||||||
|
'imaglist': imgList,
|
||||||
|
'index': currentIndex
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(6.sp),
|
||||||
|
child: CachedImg(
|
||||||
|
imageUrl: album.url!,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}))
|
||||||
|
: Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
circleInfoItem(WorldLists list) {
|
||||||
|
return list.interest!.image != null
|
||||||
|
? GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(Routes.SignalCircleListPage, arguments: list.interest!.id!);
|
||||||
|
},
|
||||||
|
child: ClipRRect(
|
||||||
|
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||||
|
height: 40.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
|
border: Border.all(color: Colors.white.withOpacity(0.1),width: 1.sp)
|
||||||
|
// image: DecorationImage(
|
||||||
|
// fit: BoxFit.fill,
|
||||||
|
// image: AssetImage(getCircleImage('top_circle_bg')))
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 32.sp,
|
||||||
|
height: 32.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
colors: [
|
||||||
|
Color(0xFF71F3F2),
|
||||||
|
Color(0xFFF558FF),
|
||||||
|
],
|
||||||
|
stops: [0.0365, 0.9427],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(1.sp),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
child: CachedImg(
|
||||||
|
imageUrl: list.interest!.image!,
|
||||||
|
width: 30.sp,
|
||||||
|
height: 30.sp,
|
||||||
|
fit: BoxFit.cover),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
// scrollController.animateTo(
|
||||||
|
// 0.0, // Scroll to the top
|
||||||
|
// duration: Duration(milliseconds: 300),
|
||||||
|
// curve: Curves.easeInOut,
|
||||||
|
// );
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.only(left: 8.sp, top: 2.sp),
|
||||||
|
// alignment: Alignment.,
|
||||||
|
// height: 40.sp,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
list.interest!.title!,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 2.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${convertToTenThousand(list.interest!.viewTotal!)}人看过',
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white.withOpacity(0.5),
|
||||||
|
fontSize: 10.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
GestureDetector(
|
||||||
|
//加入圈子
|
||||||
|
onTap: () async {
|
||||||
|
if (list.interest!.isJoin!) {
|
||||||
|
Map<String, dynamic> info = list.interest!.toJson();
|
||||||
|
Get.bottomSheet(
|
||||||
|
CircleShare('', '', Circle.fromJson(info)),
|
||||||
|
isScrollControlled: true,
|
||||||
|
enableDrag: false);
|
||||||
|
} else {
|
||||||
|
await widget.logic.outCircle(list.interest!.id!.toString(),
|
||||||
|
list.interest!.isJoin!);
|
||||||
|
if (Get.isRegistered<LikeLogic>()) {
|
||||||
|
LikeLogic likeLogic = Get.find<LikeLogic>();
|
||||||
|
likeLogic.loadMyCircleData();
|
||||||
|
}
|
||||||
|
widget.logic.update();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Opacity(
|
||||||
|
opacity: 0.5,
|
||||||
|
child: Image.asset(
|
||||||
|
getCircleImage('add'),
|
||||||
|
width: 60.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
!list.interest!.isJoin! ? '申请加入' : '分享有奖',
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 12.sp),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
)
|
||||||
|
: Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class SigalItemWidget extends StatefulWidget {
|
||||||
|
int index; WorldLists list;
|
||||||
|
SigalItemWidget(this.index,this.list);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<SigalItemWidget> createState() => _SigalItemWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SigalItemWidgetState extends State<SigalItemWidget> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return sigalItemWidget(widget.index, widget.list);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget sigalItemWidget(int index, WorldLists list) {
|
||||||
|
double picHeight = 0.0;
|
||||||
|
double picWidth = Get.width - 90.sp;
|
||||||
|
if (list.album != null) {
|
||||||
|
if (list.album!.isNotEmpty) {
|
||||||
|
Album info = list.album!.first;
|
||||||
|
picHeight = 140.sp;
|
||||||
|
if (info.type == 1) {
|
||||||
|
if (list.album!.length > 3 && list.album!.length < 7) {
|
||||||
|
picHeight = picHeight * 2;
|
||||||
|
} else if (list.album!.length >= 7) {
|
||||||
|
picHeight = picHeight * 3;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
picHeight = 200.sp;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 8.sp, bottom: 8.sp, left: 10.sp, right: 10.sp),
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: list.borderType == 2
|
||||||
|
? GradientBoxBorder(
|
||||||
|
gradient: AppColor.mainVerLinearGradient,
|
||||||
|
width: 1.sp,
|
||||||
|
)
|
||||||
|
: Border.all(
|
||||||
|
color: Colors.white.withOpacity(0.1), width: 1.sp),
|
||||||
|
borderRadius: BorderRadius.circular(20.sp)),
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(Routes.UserInfoPage,
|
||||||
|
arguments: list.user!.id!.toString());
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
ClipOval(
|
||||||
|
child: CachedImg(
|
||||||
|
imageUrl: list.user!.avatar ?? '',
|
||||||
|
width: 20.sp,
|
||||||
|
height: 20.sp,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
list.user!.nickname ?? '',
|
||||||
|
style: TextStyle(color: AppColor.mainColor, fontSize: 12.sp),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Text(list.content ?? '',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFF7FAFA), fontSize: 12.sp)),
|
||||||
|
picOrVideoItem(picHeight, list),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4.sp,
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
pushPage(
|
||||||
|
list.jumpInfo!.scene ?? '', list.jumpInfo!.param ?? '');
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 22.sp,
|
||||||
|
padding: EdgeInsets.only(left: 5.sp, right: 5.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: AppColor.tagVerLinearGradient,
|
||||||
|
borderRadius: BorderRadius.circular(11.sp)),
|
||||||
|
child: Text(
|
||||||
|
list.jumpInfo!.btnText ?? '',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white.withOpacity(0.75),
|
||||||
|
fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getBottomContainer() {
|
picOrVideoItem(double picHeight, WorldLists list) {
|
||||||
|
return picHeight > 0
|
||||||
return const SizedBox(height: 0);
|
? Container(
|
||||||
}
|
height: picHeight,
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
void addStickerToText(String sticker) {
|
margin: EdgeInsets.only(left: 10.sp, right: 10.sp,bottom: 5.sp),
|
||||||
final oldText = logic.inputController.text;
|
child: picHeight == 200.sp
|
||||||
if (currentCursor != null && currentCursor! > -1) {
|
? VideoItemWidget(list.album![0].url!)
|
||||||
final firstString = oldText.substring(0, currentCursor);
|
: GridView.builder(
|
||||||
final secondString = oldText.substring(currentCursor!);
|
itemCount: list.album!.length,
|
||||||
currentCursor = currentCursor! + sticker.length;
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
logic.inputController.text = "$firstString$sticker$secondString";
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
} else {
|
crossAxisCount: 3, //横轴三个子widget
|
||||||
logic.inputController.text = "$oldText$sticker";
|
crossAxisSpacing: 4.sp,
|
||||||
}
|
mainAxisSpacing: 4.sp,
|
||||||
}
|
childAspectRatio: 0.7 //宽高比为1时,子widget
|
||||||
|
),
|
||||||
backSpaceText() {
|
itemBuilder: (contentxt, currentIndex) {
|
||||||
String originalText = logic.inputController.text;
|
Album album = list.album![currentIndex];
|
||||||
dynamic text;
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
if (originalText == zeroWidthSpace) {
|
var imgList = <String>[];
|
||||||
} else {
|
for (var element in list.album!) {
|
||||||
text = originalText.characters.skipLast(1);
|
imgList.add(element.url!);
|
||||||
logic.inputController.text = text;
|
}
|
||||||
// handleSetDraftText();
|
Get.toNamed(Routes.SwiperPage, arguments: {
|
||||||
}
|
'imaglist': imgList,
|
||||||
}
|
'index': currentIndex
|
||||||
|
});
|
||||||
// 和onSubmitted一样,只是保持焦点的不同
|
},
|
||||||
onEmojiSubmitted() {
|
child: ClipRRect(
|
||||||
final text = logic.inputController.text.trim();
|
borderRadius: BorderRadius.circular(6.sp),
|
||||||
|
child: CachedImg(
|
||||||
if (text.isNotEmpty) {}
|
imageUrl: album.url!,
|
||||||
logic.inputController.clear();
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
currentCursor = null;
|
),
|
||||||
exitEditText();
|
);
|
||||||
}
|
}))
|
||||||
|
: Container();
|
||||||
exitEditText() {
|
|
||||||
logic.showKeyboard = false;
|
|
||||||
logic.showEmojiPanel = false;
|
|
||||||
logic.focusNode.unfocus();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import '../circle_app/userinfo/logic.dart';
|
|||||||
import 'Widgets/base_tip_widget.dart';
|
import 'Widgets/base_tip_widget.dart';
|
||||||
|
|
||||||
const bgAssetImage = DecorationImage(
|
const bgAssetImage = DecorationImage(
|
||||||
image: AssetImage('assets/images/base/bg.png'),
|
image: AssetImage('data/img/base/bg.png'),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
this.title = '',
|
this.title = '',
|
||||||
this.centerTitle = '',
|
this.centerTitle = '',
|
||||||
this.actionWdiget,
|
this.actionWdiget,
|
||||||
this.backImg = 'assets/images/navigator/back.png',
|
this.backImg = 'data/img/nav/back.png',
|
||||||
this.backImgColor,
|
this.backImgColor,
|
||||||
this.onPressed,
|
this.onPressed,
|
||||||
this.isDiyBack = false,
|
this.isDiyBack = false,
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import 'package:circle_app/commons/colors/app_color.dart';
|
import 'package:circle_app/commons/colors/app_color.dart';
|
||||||
|
import 'package:circle_app/utils/util.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -8,6 +9,7 @@ import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
|||||||
import '../../net/api.dart';
|
import '../../net/api.dart';
|
||||||
import '../../net/dio_manager.dart';
|
import '../../net/dio_manager.dart';
|
||||||
import '../../router/routers.dart';
|
import '../../router/routers.dart';
|
||||||
|
import '../Widgets/base_tip_widget.dart';
|
||||||
|
|
||||||
class UserTagWidget extends StatelessWidget {
|
class UserTagWidget extends StatelessWidget {
|
||||||
int type;
|
int type;
|
||||||
@ -22,7 +24,7 @@ class UserTagWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (type == 1) {
|
if (type == 2) {
|
||||||
var con;
|
var con;
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
con = V2TimConversation(
|
con = V2TimConversation(
|
||||||
@ -39,6 +41,9 @@ class UserTagWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
Get.toNamed(Routes.Chat, arguments: con);
|
Get.toNamed(Routes.Chat, arguments: con);
|
||||||
DioManager.instance.post(url: Api.goodAuth);
|
DioManager.instance.post(url: Api.goodAuth);
|
||||||
|
} else if (type == 1) {
|
||||||
|
showOKToast('充值小票就可以通过金主认证,一次认证,永久有效~');
|
||||||
|
showRechargeScreenDialog();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
@ -17,10 +17,11 @@ import 'dart:math' as math;
|
|||||||
|
|
||||||
class TodayPeopleDialog extends StatefulWidget {
|
class TodayPeopleDialog extends StatefulWidget {
|
||||||
bool isShow;
|
bool isShow;
|
||||||
TodayPeopleDialog({super.key, this.isShow = false});
|
String urlStr;
|
||||||
|
TodayPeopleDialog({super.key, this.isShow = false, this.urlStr = ''});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_TodayPeopleDialogState createState() => new _TodayPeopleDialogState();
|
_TodayPeopleDialogState createState() => _TodayPeopleDialogState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||||
@ -34,8 +35,12 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
|
if (widget.urlStr.isNotEmpty) {
|
||||||
|
isLoad = false;
|
||||||
|
}
|
||||||
fetchMyAlbum(Api.getMyAlbum);
|
fetchMyAlbum(Api.getMyAlbum);
|
||||||
// loadRecommendCircleFriendData();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -54,18 +59,21 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
|||||||
|
|
||||||
|
|
||||||
void loadRecommendCircleFriendData() async {
|
void loadRecommendCircleFriendData() async {
|
||||||
isLoad = true;
|
if (widget.urlStr.isEmpty) {
|
||||||
|
isLoad = true;
|
||||||
|
}
|
||||||
|
|
||||||
recommendCircleFriendData = {};
|
recommendCircleFriendData = {};
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
||||||
});
|
});
|
||||||
var data = await DioManager.instance.get(
|
var data = await DioManager.instance.get(
|
||||||
url: Api.chatRecommendFriend,
|
url: widget.urlStr.isNotEmpty ? widget.urlStr : Api.chatRecommendFriend,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (data['code'] == 200) {
|
if (data['code'] == 200) {
|
||||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||||
if (await sp.isShowMatch() && imgList.isEmpty) {
|
if (await sp.isShowMatch() && imgList.isEmpty && widget.urlStr.isEmpty) {
|
||||||
showOKToast('上传真实头像和形象照后更容易匹配到想认识的人哦~');
|
showOKToast('上传真实头像和形象照后更容易匹配到想认识的人哦~');
|
||||||
}
|
}
|
||||||
isLoad = false;
|
isLoad = false;
|
||||||
|
|||||||
@ -350,7 +350,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
|||||||
|
|
||||||
var result = await DioManager().postBody(url: Api.confset,params: { "guideText": descEditingController.text,
|
var result = await DioManager().postBody(url: Api.confset,params: { "guideText": descEditingController.text,
|
||||||
"hideContact": wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] : 0,
|
"hideContact": wxInfo.containsKey('hideContact') ? wxInfo['hideContact'] : 0,
|
||||||
"price": moneyEditingController.text,
|
"price": (wxInfo['price'] != null ? wxInfo['price'].toString() : '').isNotEmpty ? moneyEditingController.text.isEmpty ? 0 : moneyEditingController.text : '',
|
||||||
'contactType':type,
|
'contactType':type,
|
||||||
"contact": wxEditingController.text});
|
"contact": wxEditingController.text});
|
||||||
if (result['code'] ==200) {
|
if (result['code'] ==200) {
|
||||||
|
|||||||
@ -441,4 +441,10 @@ class Api {
|
|||||||
|
|
||||||
//圈子代理统计
|
//圈子代理统计
|
||||||
static const agentTotal = '/up-service/interest/agent/total';
|
static const agentTotal = '/up-service/interest/agent/total';
|
||||||
|
|
||||||
|
//查询圈子代理人账单
|
||||||
|
static const interestAgentBill = '/mall-service/wallet/interestAgentBill';
|
||||||
|
|
||||||
|
//每日在线圈友推荐
|
||||||
|
static const dayOnline = '/msg-service/im/chat/recommend/dayOnline';
|
||||||
}
|
}
|
||||||
@ -43,9 +43,9 @@ class DioManager {
|
|||||||
// baseUrl2
|
// baseUrl2
|
||||||
baseUrl:
|
baseUrl:
|
||||||
// Api.baseUrl2,
|
// Api.baseUrl2,
|
||||||
Api.baseUrl,
|
// Api.baseUrl,
|
||||||
|
|
||||||
// type == 1 ? Api.baseUrl2 : Api.baseUrl1,
|
type == 1 ? Api.baseUrl2 : Api.baseUrl1,
|
||||||
// 连接服务器超时时间,单位是毫秒
|
// 连接服务器超时时间,单位是毫秒
|
||||||
connectTimeout: const Duration(seconds: 30),
|
connectTimeout: const Duration(seconds: 30),
|
||||||
// 接收数据的最长时限
|
// 接收数据的最长时限
|
||||||
|
|||||||
@ -64,6 +64,8 @@ import 'package:circle_app/circle_app/webview/binding.dart';
|
|||||||
import 'package:circle_app/circle_app/webview/view.dart';
|
import 'package:circle_app/circle_app/webview/view.dart';
|
||||||
import 'package:get/get_navigation/src/routes/get_route.dart';
|
import 'package:get/get_navigation/src/routes/get_route.dart';
|
||||||
|
|
||||||
|
import '../circle_app/agent_circle_list/binding.dart';
|
||||||
|
import '../circle_app/agent_circle_list/view.dart';
|
||||||
import '../circle_app/arcane _archive/view.dart';
|
import '../circle_app/arcane _archive/view.dart';
|
||||||
import '../circle_app/ascendancy__apex/binding.dart';
|
import '../circle_app/ascendancy__apex/binding.dart';
|
||||||
import '../circle_app/ascendancy__apex/view.dart';
|
import '../circle_app/ascendancy__apex/view.dart';
|
||||||
@ -148,6 +150,8 @@ import '../circle_app/quasar/view.dart';
|
|||||||
import '../circle_app/quick/binding.dart';
|
import '../circle_app/quick/binding.dart';
|
||||||
import '../circle_app/radiant__nexus/binding.dart';
|
import '../circle_app/radiant__nexus/binding.dart';
|
||||||
import '../circle_app/radiant__nexus/view.dart';
|
import '../circle_app/radiant__nexus/view.dart';
|
||||||
|
import '../circle_app/revenue_details/binding.dart';
|
||||||
|
import '../circle_app/revenue_details/view.dart';
|
||||||
import '../circle_app/seraphic__sanctuary/binding.dart';
|
import '../circle_app/seraphic__sanctuary/binding.dart';
|
||||||
import '../circle_app/seraphic__sanctuary/view.dart';
|
import '../circle_app/seraphic__sanctuary/view.dart';
|
||||||
import '../circle_app/solstice/binding.dart';
|
import '../circle_app/solstice/binding.dart';
|
||||||
@ -365,6 +369,17 @@ class PageList {
|
|||||||
page: () => Invent_recordPage(),
|
page: () => Invent_recordPage(),
|
||||||
binding: Invent_recordBinding()),
|
binding: Invent_recordBinding()),
|
||||||
|
|
||||||
|
GetPage(
|
||||||
|
name: Routes.Revenue_Details,
|
||||||
|
page: () => Revenue_detailsPage(),
|
||||||
|
binding: Revenue_detailsBinding()),
|
||||||
|
|
||||||
|
GetPage(
|
||||||
|
name: Routes.AgentSignalCircleListPage,
|
||||||
|
page: () => Agent_circle_listPage(),
|
||||||
|
binding: Agent_circle_listBinding()),
|
||||||
|
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routes.InviteRecordPage,
|
name: Routes.InviteRecordPage,
|
||||||
|
|||||||
@ -33,6 +33,8 @@ abstract class Routes {
|
|||||||
|
|
||||||
static const SignalCircleListPage = '/msg/chat/SignalCircleListPage';
|
static const SignalCircleListPage = '/msg/chat/SignalCircleListPage';
|
||||||
|
|
||||||
|
static const AgentSignalCircleListPage = '/msg/AgentSignalCircleListPage';
|
||||||
|
|
||||||
static const InvitePage = '/mine/InvitePage';
|
static const InvitePage = '/mine/InvitePage';
|
||||||
|
|
||||||
static const DisCover = '/DisCover';
|
static const DisCover = '/DisCover';
|
||||||
@ -53,6 +55,8 @@ abstract class Routes {
|
|||||||
static const QuickPage = '/msg/QuickPage';
|
static const QuickPage = '/msg/QuickPage';
|
||||||
|
|
||||||
static const WorldCallOut = '/world_call_out';
|
static const WorldCallOut = '/world_call_out';
|
||||||
|
static const Revenue_Details = '/Revenue_details';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*新加入*/
|
/*新加入*/
|
||||||
|
|||||||
@ -23,6 +23,8 @@ class SharedPreferencesHelper {
|
|||||||
|
|
||||||
static const FirstMatch = 'FirstMatch';
|
static const FirstMatch = 'FirstMatch';
|
||||||
|
|
||||||
|
static const FirstAutoMatch = 'FirstAutoMatch';
|
||||||
|
|
||||||
static SharedPreferencesHelper? _instance;
|
static SharedPreferencesHelper? _instance;
|
||||||
static SharedPreferences? _preferences;
|
static SharedPreferences? _preferences;
|
||||||
|
|
||||||
@ -84,7 +86,7 @@ class SharedPreferencesHelper {
|
|||||||
|
|
||||||
|
|
||||||
Future<bool> isShowMatch() async {
|
Future<bool> isShowMatch() async {
|
||||||
String time = await preferences!.getString(FirstMatch) ?? '';
|
String time = preferences!.getString(FirstMatch) ?? '';
|
||||||
if (time.isNotEmpty) {
|
if (time.isNotEmpty) {
|
||||||
DateTime dateTime = DateTime.parse(time);
|
DateTime dateTime = DateTime.parse(time);
|
||||||
bool isShow = !isSameDay(dateTime,DateTime.now());
|
bool isShow = !isSameDay(dateTime,DateTime.now());
|
||||||
@ -98,6 +100,23 @@ class SharedPreferencesHelper {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Future<bool> isFirstAutoMatch() async {
|
||||||
|
String time = preferences!.getString(FirstAutoMatch) ?? '';
|
||||||
|
if (time.isNotEmpty) {
|
||||||
|
DateTime dateTime = DateTime.parse(time);
|
||||||
|
bool isShow = !isSameDay(dateTime,DateTime.now());
|
||||||
|
if (isShow) {
|
||||||
|
preferences!.setString(FirstAutoMatch, DateTime.now().toString());
|
||||||
|
}
|
||||||
|
return isShow;
|
||||||
|
} else {
|
||||||
|
preferences!.setString(FirstAutoMatch, DateTime.now().toString());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool isSameDay(DateTime time1, DateTime time2) {
|
bool isSameDay(DateTime time1, DateTime time2) {
|
||||||
return time1.year == time2.year &&
|
return time1.year == time2.year &&
|
||||||
time1.month == time2.month &&
|
time1.month == time2.month &&
|
||||||
|
|||||||
@ -30,6 +30,7 @@ import 'package:url_launcher/url_launcher.dart';
|
|||||||
import 'package:video_compress/video_compress.dart';
|
import 'package:video_compress/video_compress.dart';
|
||||||
|
|
||||||
import '../circle_app/circle/logic.dart';
|
import '../circle_app/circle/logic.dart';
|
||||||
|
import '../circle_app/circle_list/logic.dart';
|
||||||
import '../circle_app/home/logic.dart';
|
import '../circle_app/home/logic.dart';
|
||||||
import '../circle_app/select_circle/logic.dart';
|
import '../circle_app/select_circle/logic.dart';
|
||||||
import '../commons/Widgets/open_vip_tip/view.dart';
|
import '../commons/Widgets/open_vip_tip/view.dart';
|
||||||
@ -83,6 +84,7 @@ String getCircleImage(String image) {
|
|||||||
showOKToast(String msg) {
|
showOKToast(String msg) {
|
||||||
showToast(
|
showToast(
|
||||||
msg,
|
msg,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
duration: Duration(seconds: msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2),
|
duration: Duration(seconds: msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2),
|
||||||
position: ToastPosition.center,
|
position: ToastPosition.center,
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
@ -193,6 +195,16 @@ String convertToTenThousand(int number) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String convertToThousand(int number) {
|
||||||
|
if (number >= 10000) {
|
||||||
|
double result = number / 10000;
|
||||||
|
return '${result.toStringAsFixed(2)}万';
|
||||||
|
} else {
|
||||||
|
return number.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pushLoginPage() async {
|
pushLoginPage() async {
|
||||||
await logoutIM();
|
await logoutIM();
|
||||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
@ -1197,7 +1209,20 @@ pushPage(String action,String param,{String name = ''}) async {
|
|||||||
var data = await DioManager.instance.post(
|
var data = await DioManager.instance.post(
|
||||||
url: Api.outCrrcle + param + "/join",
|
url: Api.outCrrcle + param + "/join",
|
||||||
params: {"status": "1"});
|
params: {"status": "1"});
|
||||||
Get.toNamed(Routes.SignalCircleListPage,arguments: param);
|
HomeLogic logic = Get.find<HomeLogic>();
|
||||||
|
logic.updateIndex(1);
|
||||||
|
if (Get.isRegistered<LikeLogic>()) {
|
||||||
|
LikeLogic likeLogic = Get.find<LikeLogic>();
|
||||||
|
likeLogic.changeCircle(param);
|
||||||
|
} else {
|
||||||
|
Future.delayed(Duration(milliseconds: 250),() {
|
||||||
|
EventBusManager.fire(ChangeCircleIndex(param));
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// EventBusManager.fire();
|
||||||
|
// Get.toNamed(Routes.AgentSignalCircleListPage,arguments: param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,10 +45,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: app_settings
|
name: app_settings
|
||||||
sha256: "2ec421f375d747916c4c0193933567074ea60c4f01c4a68642f07fef1002524e"
|
sha256: e6a34735d4ddb24ca9c5fd7e965ec65c8b611cbd3a329152c294f9e9f4bacb33
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.4"
|
version: "4.3.1"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -630,6 +630,14 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.3"
|
version: "1.1.3"
|
||||||
|
flutter_install_app:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_install_app
|
||||||
|
sha256: "9b117006d17c900e671c26bcbc9b15c7b8efd15d6f9b4442ad5d576de20fab53"
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.0"
|
||||||
flutter_intl:
|
flutter_intl:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -90,7 +90,7 @@ dependencies:
|
|||||||
fluwx: ^3.8.1+1
|
fluwx: ^3.8.1+1
|
||||||
event_bus: ^2.0.0
|
event_bus: ^2.0.0
|
||||||
#安装apk
|
#安装apk
|
||||||
# flutter_install_app: 1.3.0
|
flutter_install_app: 1.3.0
|
||||||
#闪屏页
|
#闪屏页
|
||||||
flutter_native_splash: 2.2.16
|
flutter_native_splash: 2.2.16
|
||||||
#腾讯离线推送
|
#腾讯离线推送
|
||||||
@ -112,11 +112,11 @@ dependencies:
|
|||||||
#边框渐变
|
#边框渐变
|
||||||
gradient_borders: ^1.0.0
|
gradient_borders: ^1.0.0
|
||||||
#系统设置 安卓4.3.1 苹果4.0.4
|
#系统设置 安卓4.3.1 苹果4.0.4
|
||||||
app_settings: 4.0.4
|
app_settings: 4.3.1
|
||||||
#百度定位插件
|
#百度定位插件
|
||||||
flutter_bmflocation: ^3.6.0
|
flutter_bmflocation: ^3.6.0
|
||||||
#通知权限
|
#通知权限
|
||||||
notification_permissions: any
|
notification_permissions: ^0.6.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user