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.
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode 62
|
||||
versionName "2.1.2"
|
||||
versionCode 64
|
||||
versionName "2.1.4"
|
||||
manifestPlaceholders = [
|
||||
vivo_APPID: "105669716",
|
||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.7.10'
|
||||
ext.kotlin_version = '1.9.10'
|
||||
repositories {
|
||||
google()
|
||||
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/extobjc (= 2.2.0)
|
||||
- Mantle/extobjc (2.2.0)
|
||||
- notification_permissions (0.4.4):
|
||||
- Flutter
|
||||
- package_info_plus (0.4.5):
|
||||
- Flutter
|
||||
- pasteboard (0.0.1):
|
||||
@ -194,6 +196,7 @@ DEPENDENCIES:
|
||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/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`)
|
||||
- notification_permissions (from `.symlinks/plugins/notification_permissions/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- pasteboard (from `.symlinks/plugins/pasteboard/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"
|
||||
local_notifications_for_us:
|
||||
:path: ".symlinks/plugins/local_notifications_for_us/ios"
|
||||
notification_permissions:
|
||||
:path: ".symlinks/plugins/notification_permissions/ios"
|
||||
package_info_plus:
|
||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||
pasteboard:
|
||||
@ -345,6 +350,7 @@ SPEC CHECKSUMS:
|
||||
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
|
||||
local_notifications_for_us: d4bb63b93eb429c4697edd0ee66bbe8bade29633
|
||||
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
|
||||
notification_permissions: 825ea1bf2a52ab585c53fd7b5e8e96876d735d4b
|
||||
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||
pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0
|
||||
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
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();
|
||||
},
|
||||
child: Image.asset(
|
||||
"assets/images/navigator/back.png",
|
||||
"data/img/nav/back.png",
|
||||
width: 24.sp,
|
||||
height: 24.sp,
|
||||
),
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -15,11 +14,10 @@ class ChatMsgCardItem extends StatefulWidget {
|
||||
Map info;
|
||||
String title;
|
||||
String conversationID;
|
||||
ChatMsgCardItem(this.isSelf,this.info,this.title,this.conversationID);
|
||||
ChatMsgCardItem(this.isSelf, this.info, this.title, this.conversationID);
|
||||
|
||||
@override
|
||||
_ChatMsgCardItemState createState() => new _ChatMsgCardItemState();
|
||||
|
||||
}
|
||||
|
||||
class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
@ -38,8 +36,40 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
info = widget.info;
|
||||
title = widget.title;
|
||||
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 {
|
||||
var data = await DioManager.instance.get(
|
||||
@ -53,14 +83,10 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
UserBean userInfoBean = bean.data.user;
|
||||
unLockWxNum = userInfoBean!.contact!.contains('*') ? 0 : 1;
|
||||
setState(() {});
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: add widget build method
|
||||
@ -69,8 +95,8 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
Container(
|
||||
// height: info.containsKey('city') ? 175.sp : 135.sp,
|
||||
width: Get.width,
|
||||
margin: EdgeInsets.only(
|
||||
left: isSelf ? 16 : 0, right: isSelf ? 0 : 16),
|
||||
margin:
|
||||
EdgeInsets.only(left: isSelf ? 16 : 0, right: isSelf ? 0 : 16),
|
||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||
// color: Colors.red,
|
||||
decoration: BoxDecoration(
|
||||
@ -92,8 +118,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
width: 3.sp,
|
||||
height: 3.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(1.5.sp),
|
||||
borderRadius: BorderRadius.circular(1.5.sp),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Text(
|
||||
@ -117,8 +142,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
width: 3.sp,
|
||||
height: 3.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(1.5.sp),
|
||||
borderRadius: BorderRadius.circular(1.5.sp),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Text(
|
||||
@ -142,8 +166,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
width: 3,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(1.5),
|
||||
borderRadius: BorderRadius.circular(1.5),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(
|
||||
@ -164,21 +187,21 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: 5.sp,top: 10.sp),
|
||||
margin: EdgeInsets.only(right: 5.sp, top: 10.sp),
|
||||
width: 3,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1.5),
|
||||
color: Color(0xFF00FFF4)),
|
||||
),
|
||||
Expanded(child: Text(
|
||||
Expanded(
|
||||
child: Text(
|
||||
isSelf
|
||||
? '交友宣言:' + info['user']['signature']
|
||||
: '交友宣言:' + info['my']['signature'],
|
||||
@ -195,9 +218,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
width: Get.width,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
interestWdiget(isSelf
|
||||
? info['interests']
|
||||
: info['myInterests'])
|
||||
interestWdiget(isSelf ? info['interests'] : info['myInterests'])
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -205,9 +226,7 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
Container(
|
||||
width: Get.width,
|
||||
margin: EdgeInsets.only(
|
||||
top: 10.sp,
|
||||
left: isSelf ? 16 : 0,
|
||||
right: isSelf ? 0 : 16),
|
||||
top: 10.sp, left: isSelf ? 16 : 0, right: isSelf ? 0 : 16),
|
||||
// margin: EdgeInsets.only(top: 10.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -240,15 +259,20 @@ class _ChatMsgCardItemState extends State<ChatMsgCardItem> {
|
||||
),
|
||||
if (unLockWxNum == 0)
|
||||
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) {
|
||||
if (!data.isNotEmpty) return Container(height: 0,);
|
||||
if (!data.isNotEmpty)
|
||||
return Container(
|
||||
height: 0,
|
||||
);
|
||||
return Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
height: 49.sp,
|
||||
|
||||
@ -110,10 +110,17 @@ class CircleLogic extends GetxController {
|
||||
t?.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
// loadRecommendCircleFriendData();
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
loadRecommendCircleFriendData();
|
||||
|
||||
loadCircleListData();
|
||||
loadCirclePeopleData();
|
||||
initGerder();
|
||||
@ -129,6 +136,8 @@ class CircleLogic extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
startTimer() {
|
||||
t = Timer.periodic(const Duration(milliseconds: 1000), (timer) {
|
||||
seconds++;
|
||||
|
||||
@ -32,7 +32,7 @@ import '../userinfo/logic.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
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 {
|
||||
const CirclePage({Key? key}) : super(key: key);
|
||||
@ -899,6 +899,8 @@ class _CirclePageState extends State<CirclePage>
|
||||
isHaveCity: _tabController.index == 1,
|
||||
callback: (genderList, orientationList, roleList) {
|
||||
if (_tabController.index == 1) {
|
||||
|
||||
EventBusManager.fire(NearScrollTap());
|
||||
_onRefresh();
|
||||
} else if (_tabController.index == 0) {
|
||||
List<String> genders = [];
|
||||
@ -1039,7 +1041,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
// controller.state.city = controller.cityMap[res[0]][res[1]][0];
|
||||
// logic.state.city = res[1];
|
||||
logic.cityName = res[1];
|
||||
|
||||
EventBusManager.fire(NearScrollTap());
|
||||
_onRefresh();
|
||||
// logic.getSuccess();
|
||||
// logic.update();
|
||||
|
||||
@ -101,7 +101,7 @@ class _PlayVideoViewState extends State<PlayVideoView> {
|
||||
Get.back();
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/images/navigator/back.png',
|
||||
'data/img/nav/back.png',
|
||||
width: 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/net/api.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:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -40,10 +41,23 @@ class LikeLogic extends GetxController {
|
||||
bool isLoadFial = false;
|
||||
|
||||
Data? homeData;
|
||||
|
||||
var sub;
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
sub.cancel();
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
sub = EventBusManager.on<ChangeCircleIndex>().listen((event) {
|
||||
changeCircle(event.param);
|
||||
});
|
||||
await loadMyInfo();
|
||||
rightCtr.addListener(() {
|
||||
if (rightCtr.position.pixels ==
|
||||
@ -243,4 +257,23 @@ class LikeLogic extends GetxController {
|
||||
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,
|
||||
),
|
||||
Text(
|
||||
'${convertToTenThousand(interestAgentMap.isNotEmpty ? interestAgentMap['rewardCoin'] : 0)}',
|
||||
'${convertToThousand(interestAgentMap.isNotEmpty ? interestAgentMap['rewardCoin'] : 0)}',
|
||||
style: TextStyle(color: Colors.white, fontSize: 13.sp),
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
@ -545,6 +545,7 @@ class _RightCircleItenState extends State<RightCircleIten>
|
||||
return true;
|
||||
},
|
||||
child: SmartRefresher(
|
||||
|
||||
controller: refreshController,
|
||||
onRefresh: () {
|
||||
EventBusManager.fire(RightRefreshContrller(_tabController.index));
|
||||
@ -564,27 +565,11 @@ class _RightCircleItenState extends State<RightCircleIten>
|
||||
headerSliverBuilder: (context, isScrolled) {
|
||||
print('isScrolled' + isScrolled.toString());
|
||||
return [
|
||||
SliverAppBar(
|
||||
stretch: false,
|
||||
elevation: 0,
|
||||
primary: true,
|
||||
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(
|
||||
SliverToBoxAdapter(
|
||||
child: circleTiitleWidget(
|
||||
urlList,
|
||||
widgets,
|
||||
),
|
||||
),
|
||||
)
|
||||
)),
|
||||
];
|
||||
},
|
||||
body: Column(
|
||||
@ -699,9 +684,13 @@ class _RightCircleItenState extends State<RightCircleIten>
|
||||
children: [
|
||||
RightCircleListWidget(widget.index, widget.bean, widget.logic,0,scrollController,interestAgentMap,() {
|
||||
_tabController.index = 1;
|
||||
|
||||
setState(() {
|
||||
|
||||
});
|
||||
Future.delayed(Duration(milliseconds: 200),() {
|
||||
EventBusManager.fire(RightScrollViewIsEnd(true));
|
||||
});
|
||||
}),
|
||||
RightCircleListWidget(widget.index, widget.bean, widget.logic,1,scrollController,interestAgentMap,(){
|
||||
|
||||
@ -1173,7 +1162,12 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
||||
// TODO: implement dispose
|
||||
|
||||
sub.cancel();
|
||||
try {
|
||||
sub1.camcel();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
callRefreshCicle?.cancel();
|
||||
scrollController.dispose();
|
||||
super.dispose();
|
||||
@ -1219,7 +1213,6 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
||||
if (widget.type == 0 && refreshController.footerStatus == LoadStatus.noMore) {
|
||||
widget.changeTab();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
GridScrollController.addListener(() {
|
||||
@ -1446,6 +1439,7 @@ class _RightCircleListWidgetState extends State<RightCircleListWidget>
|
||||
scrollDirection: Axis.vertical,
|
||||
controller: scrollController,
|
||||
itemCount: lists.length,
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
|
||||
Lists list = lists[index];
|
||||
|
||||
@ -2,7 +2,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/cupertino.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:url_launcher/url_launcher.dart';
|
||||
|
||||
@ -263,7 +263,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
||||
});
|
||||
DioManager.instance.setReceiveTimeout(30);
|
||||
// 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() {
|
||||
Get.lazyPut(() => HomeLogic());
|
||||
Get.lazyPut(() => CircleLogic());
|
||||
|
||||
Get.lazyPut(() => World_call_outLogic());
|
||||
Get.lazyPut(() => MsgLogic());
|
||||
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/tencent_cloud_chat_uikit.dart';
|
||||
|
||||
import '../../commons/Widgets/today_people_dialog.dart';
|
||||
import '../../utils/PaymentUtils.dart';
|
||||
import '../../utils/SharedPreferencesHelper.dart';
|
||||
import '../../utils/eventBus.dart';
|
||||
@ -65,6 +66,8 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
|
||||
bool isProd = true;
|
||||
|
||||
bool isFirst = true;
|
||||
|
||||
String accountId = '';
|
||||
|
||||
String inviteCode = '';
|
||||
@ -107,6 +110,8 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
loadMyCircleData();
|
||||
|
||||
initWxApi();
|
||||
|
||||
awaitShowTodayDialog();
|
||||
}
|
||||
|
||||
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 bean = BaseResponse<MineResponseBean>.fromJson(
|
||||
data, (data) => MineResponseBean.fromJson(data));
|
||||
@ -506,6 +511,8 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
inviteCode = info.data!.inviteCode!;
|
||||
link = info.data!.link!;
|
||||
}
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
bool isGreaterThan30Days = isDifferenceGreaterThan30Days(
|
||||
(model!.createTime?.isNotEmpty ?? false)
|
||||
? model!.createTime!
|
||||
@ -520,6 +527,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool isDifferenceGreaterThan30Days(String dateString) {
|
||||
// 获取当前时间
|
||||
@ -539,6 +547,21 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
|
||||
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 {
|
||||
|
||||
@ -9,7 +9,7 @@ import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
const loginBgWidget = Image(
|
||||
image: AssetImage('assets/images/base/bg.png'),
|
||||
image: AssetImage('data/img/base/bg.png'),
|
||||
fit: BoxFit.fill,
|
||||
);
|
||||
|
||||
|
||||
@ -24,14 +24,14 @@ import '../../utils/util.dart';
|
||||
import '../msg/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(
|
||||
image: AssetImage(vipIcon),
|
||||
fit: BoxFit.fill,
|
||||
);
|
||||
|
||||
const vipIcon1 = 'assets/images/home/icon_one_vip.png';
|
||||
const vipIcon1 = 'data/img/home/icon_one_vip.png';
|
||||
|
||||
const MyImageWidget1 = Image(
|
||||
image: AssetImage(vipIcon1),
|
||||
|
||||
@ -1322,7 +1322,7 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
var data = await DioManager.instance.get(
|
||||
url: Api.chatRecommendFriend,
|
||||
);
|
||||
|
||||
EventBusManager.fire(SearchAnimationEnd());
|
||||
if (data['code'] == 200) {
|
||||
List dataList = data['data'];
|
||||
if (dataList.isNotEmpty) {
|
||||
@ -1330,10 +1330,17 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
|
||||
setState(() {});
|
||||
}
|
||||
} else {
|
||||
if ((data['code'] == 21201 || data['code'] == 21202) &&
|
||||
recommendCircleFriendData.isNotEmpty) {
|
||||
if ((data['code'] == 21201 || data['code'] == 21202) ) {
|
||||
if (recommendCircleFriendData.isNotEmpty) {
|
||||
showOKToast(data['msg']);
|
||||
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:circle_app/utils/eventBus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:gradient_borders/box_borders/gradient_box_border.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 '../../router/routers.dart';
|
||||
import '../../utils/cache_img.dart';
|
||||
@ -25,6 +27,26 @@ class RecommendCircleFriendItem extends StatefulWidget {
|
||||
class _RecommendCircleFriendItemState extends State<RecommendCircleFriendItem> {
|
||||
// TODO: add state variables and methods
|
||||
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
|
||||
Widget build(BuildContext context) {
|
||||
@ -32,7 +54,7 @@ class _RecommendCircleFriendItemState extends State<RecommendCircleFriendItem> {
|
||||
// TODO: add widget build method
|
||||
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(
|
||||
onTap: () {
|
||||
widget.getDataCallBack();
|
||||
isShowLoad = true;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
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(
|
||||
height: MediaQuery.of(context).padding.bottom,
|
||||
color: Color(0xFF090B14),
|
||||
|
||||
@ -21,7 +21,7 @@ import 'TIMUIKitConversation/tim_uikit_conversation.dart';
|
||||
import 'logic.dart';
|
||||
const msgBgWidget = DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: AssetImage('assets/images/base/home_back.png'));
|
||||
image: AssetImage('data/img/base/home_back.png'));
|
||||
class MsgPage extends StatefulWidget {
|
||||
MsgPage({Key? key}) : super(key: key);
|
||||
|
||||
@ -202,12 +202,17 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
child: ShaderMask(
|
||||
shaderCallback: (Rect bounds) {
|
||||
return const LinearGradient(
|
||||
begin: Alignment(0.0,-1.0),
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [Color(0xff71F3F2), Color(0xffF657FF)],
|
||||
).createShader(Offset.zero & bounds.size);
|
||||
},
|
||||
child:Text(
|
||||
'消息',
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.mainColor,
|
||||
style: TextStyle(fontSize: 18.sp,fontWeight: FontWeight.w600,color: Colors.white,shadows: [Shadow(color: Color(0xffF657FF), offset: Offset(0.0, -1))]),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -243,6 +248,8 @@ class _MsgPageState extends State<MsgPage> with AutomaticKeepAliveClientMixin {
|
||||
Row(
|
||||
children: [
|
||||
GestureDetector(onTap: () {
|
||||
ctr.isShowNotifyTip = false;
|
||||
ctr.update();
|
||||
AppSettings.openAppSettings();
|
||||
},child:Text('去开启',style: TextStyle(color: AppColor.mainColor,fontSize: 14.sp),)),
|
||||
SizedBox(width: 4.sp,),
|
||||
|
||||
@ -15,6 +15,8 @@ class MyCircleLogic extends GetxController {
|
||||
final CircleState state = CircleState();
|
||||
int page = 1;
|
||||
|
||||
Map agentData = {};
|
||||
|
||||
bool isMore = true;
|
||||
|
||||
@override
|
||||
@ -28,6 +30,7 @@ class MyCircleLogic extends GetxController {
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
await loadData();
|
||||
loadAgentData();
|
||||
scrollController.addListener(() {
|
||||
if (scrollController.position.pixels ==
|
||||
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 {
|
||||
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/commons/Widgets/circle_share.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 'package:circle_app/router/routers.dart';
|
||||
import 'package:circle_app/utils/util.dart';
|
||||
@ -72,7 +73,11 @@ class _My_circlePageState extends State<My_circlePage>
|
||||
}
|
||||
|
||||
var bean = logic.circle.lists[index];
|
||||
return GestureDetector(
|
||||
return Column(
|
||||
children: [
|
||||
if (index == 0 && ((logic.agentData['rewardTotal'] ?? 0) > 0 || (logic.agentData['interestTotal'] ?? 0) > 0))
|
||||
agentWidget(),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () {
|
||||
|
||||
@ -80,7 +85,9 @@ class _My_circlePageState extends State<My_circlePage>
|
||||
|
||||
},
|
||||
child: circleInfoItemWidget(
|
||||
logic.circle.lists[index]));
|
||||
logic.circle.lists[index])),
|
||||
],
|
||||
);
|
||||
},
|
||||
itemCount: logic.circle.lists.length + 1,
|
||||
))
|
||||
@ -123,6 +130,93 @@ class _My_circlePageState extends State<My_circlePage>
|
||||
|
||||
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) {
|
||||
List<JoinUser> urlList = bean.lastJoinUsers;
|
||||
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),
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.only(
|
||||
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(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/base/launch_back.webp'),
|
||||
image: AssetImage('data/img/base/launch_back.webp'),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
|
||||
@ -7,6 +7,7 @@ class SwiperLogic extends GetxController {
|
||||
final SwiperState state = SwiperState();
|
||||
List<String> imgList = Get.arguments['imaglist'] ;
|
||||
int index = Get.arguments['index'] ;
|
||||
bool isVague = Get.arguments['isVague'] ?? false;
|
||||
String userId = '';
|
||||
SwiperController swiperController = SwiperController();
|
||||
@override
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import 'dart:ui';
|
||||
|
||||
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/utils/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -164,7 +167,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
||||
},
|
||||
padding: EdgeInsets.only(left: 15.sp),
|
||||
icon: Image.asset(
|
||||
'assets/images/navigator/back.png',
|
||||
'data/img/nav/back.png',
|
||||
width: 30.sp,
|
||||
height: 30.sp,
|
||||
),
|
||||
@ -181,6 +184,7 @@ class _SwiperPageState extends State<SwiperPage> {
|
||||
itemWidget(SwiperLogic logic, int index, bool isShow) {
|
||||
String link = homeLogic.link + '#code=' + homeLogic.inviteCode;
|
||||
return Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
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(
|
||||
|
||||
@ -68,7 +68,7 @@ class UserinfoLogic extends GetxController {
|
||||
@override
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
SmartDialog.showLoading();
|
||||
// SmartDialog.showLoading();
|
||||
|
||||
sharedPreferences = await SharedPreferences.getInstance();
|
||||
int? sharedUserId =
|
||||
@ -93,7 +93,7 @@ class UserinfoLogic extends GetxController {
|
||||
fetchUrgeStatus("${Api.getUrgeStatus + userId}/urge/album/status");
|
||||
fetchIsBlack("${Api.setBlock + userId}/block");
|
||||
}
|
||||
SmartDialog.dismiss();
|
||||
// SmartDialog.dismiss();
|
||||
fetchQnToken(Api.getqiniuToken);
|
||||
loadGiftListData();
|
||||
}
|
||||
@ -393,7 +393,7 @@ class UserinfoLogic extends GetxController {
|
||||
return;
|
||||
}
|
||||
|
||||
SmartDialog.showLoading();
|
||||
SmartDialog.showLoading(msg: '上传中');
|
||||
uploadImage(quToken, pickedFile, ImgPath.USER_ALBUM_IMAGE, (result) async {
|
||||
var data = await DioManager.instance
|
||||
.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:circle_app/circle_app/userinfo/widgets/home_call_out.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) {
|
||||
if (isSetState) {
|
||||
isSetState = false;
|
||||
setState(() {});
|
||||
scrollController.animateTo(0, duration: Duration(milliseconds: 250), curve: Curves.easeIn);
|
||||
}
|
||||
});
|
||||
scrollController.addListener(() {
|
||||
@ -52,12 +54,12 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
print('2222');
|
||||
isSetState = true;
|
||||
EventBusManager.fire(ScrollViewIsEnd(true));
|
||||
setState(() {});
|
||||
// setState(() {});
|
||||
} else {
|
||||
EventBusManager.fire(ScrollViewIsEnd(false));
|
||||
if (isSetState) {
|
||||
isSetState = false;
|
||||
setState(() {});
|
||||
// setState(() {});
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -246,16 +248,18 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
],
|
||||
),
|
||||
)
|
||||
:Container(
|
||||
: Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
// width: 200.sp,
|
||||
// color: Colors.red,
|
||||
margin: EdgeInsets.only(left: 5.sp, bottom: 5.sp),
|
||||
margin:
|
||||
EdgeInsets.only(left: 5.sp, bottom: 5.sp),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
userWxStatusWidget(
|
||||
!logic.userInfoBean!.contact!.contains('*'),
|
||||
!logic.userInfoBean!.contact!
|
||||
.contains('*'),
|
||||
logic.userInfoBean!.contact!,
|
||||
logic.userId.toString(),
|
||||
logic.userInfoBean!.contactType!,
|
||||
@ -282,28 +286,13 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
controller: scrollController,
|
||||
headerSliverBuilder: (context, isScrolled) {
|
||||
return [
|
||||
SliverAppBar(
|
||||
stretch: false,
|
||||
elevation: 0,
|
||||
primary: true,
|
||||
pinned: false,
|
||||
floating: true,
|
||||
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),
|
||||
),
|
||||
)
|
||||
SliverOverlapAbsorber(
|
||||
handle:
|
||||
NestedScrollView.sliverOverlapAbsorberHandleFor(
|
||||
context),
|
||||
sliver: SliverToBoxAdapter(
|
||||
child: buildContent(logic),
|
||||
))
|
||||
];
|
||||
},
|
||||
body: contentWidget(logic),
|
||||
@ -766,7 +755,9 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
: _imageAdapter(controller),
|
||||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||||
? Container()
|
||||
: HomeCallOutView(controller.userId),
|
||||
:
|
||||
HomeCallOutView(controller.userId),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -968,7 +959,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
children: [
|
||||
Text(
|
||||
controller.likeMeCount.toString(),
|
||||
style: TextStyle(color:AppColor.mainColor),
|
||||
style: TextStyle(color: AppColor.mainColor),
|
||||
),
|
||||
Text(
|
||||
'位圈友感兴趣,其中',
|
||||
@ -976,7 +967,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
),
|
||||
Text(
|
||||
controller.imageUrgeCount.toString(),
|
||||
style: TextStyle(color:AppColor.mainColor),
|
||||
style: TextStyle(color: AppColor.mainColor),
|
||||
),
|
||||
Text(
|
||||
'位已催您更新',
|
||||
@ -1030,7 +1021,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
if (controller.state.imaglist.length >= 15) {
|
||||
showOKToast("最大只可上传15张图片哦~");
|
||||
showOKToast("最多只能上传15张,可长按删除一些再上传~");
|
||||
return;
|
||||
}
|
||||
controller.getImageFile();
|
||||
@ -1063,8 +1054,8 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
child: _buildImageItem(
|
||||
controller.state.imaglist[index].urlThumb,
|
||||
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(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: ClipRRect(
|
||||
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: GestureDetector(
|
||||
onLongPress: () {
|
||||
if (logic.isMe) {
|
||||
showImgTipPop(url,index,isTop == 1, controller);
|
||||
showImgTipPop(url, index, isTop == 1, controller);
|
||||
}
|
||||
},
|
||||
onTap: () {
|
||||
@ -1212,7 +1204,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
imaglist.add(element.url);
|
||||
}
|
||||
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(
|
||||
fit: BoxFit.cover,
|
||||
@ -1221,29 +1213,54 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
),
|
||||
),
|
||||
),
|
||||
// if (controller.userId == "")
|
||||
// Positioned(
|
||||
// top: 0,
|
||||
// right: 0,
|
||||
// child: GestureDetector(
|
||||
// onTap: () {
|
||||
// _showDelImgDialog(context, controller, index);
|
||||
// },
|
||||
// child: Visibility(
|
||||
// visible: controller.isEdit,
|
||||
// child: Image(
|
||||
// image: AssetImage(getMineImage("icon_img_del")),
|
||||
// width: 20.sp,
|
||||
// height: 20.sp,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
if (!logic.isMe && index > 0 && homeLogic.model!.vip == 0)
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () async {
|
||||
showOKToast('开通会员后可以解锁TA和其他所有人的形象照');
|
||||
await showOepnVipDialog();
|
||||
homeLogic.loadMyInfoData();
|
||||
},
|
||||
child: ClipRect(
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
),
|
||||
)),
|
||||
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(
|
||||
CupertinoActionSheet(
|
||||
title: Text(
|
||||
@ -1255,7 +1272,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
CupertinoActionSheetAction(
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
logic.setTopAlbum(!isTop,index);
|
||||
logic.setTopAlbum(!isTop, index);
|
||||
},
|
||||
child: Text(isTop ? '取消置顶' : '置顶'),
|
||||
),
|
||||
|
||||
@ -101,7 +101,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView>
|
||||
: ListView.builder(
|
||||
// physics: const AlwaysScrollableScrollPhysics(),
|
||||
physics: isEnd
|
||||
? AlwaysScrollableScrollPhysics()
|
||||
? BouncingScrollPhysics()
|
||||
: NeverScrollableScrollPhysics(),
|
||||
// shrinkWrap:true,
|
||||
padding: EdgeInsets.only(
|
||||
|
||||
@ -51,22 +51,6 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
||||
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
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<World_call_outLogic>(builder: (logic) {
|
||||
@ -182,9 +166,9 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
||||
print('111');
|
||||
}
|
||||
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,
|
||||
controller: logic.scrollController,
|
||||
@ -240,272 +224,81 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
||||
});
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
double getBottomHeight(context) {
|
||||
if (logic.showKeyboard) {
|
||||
final currentKeyboardHeight = MediaQuery.of(context).viewInsets.bottom;
|
||||
final height = currentKeyboardHeight;
|
||||
return height;
|
||||
} else if (logic.showEmojiPanel) {
|
||||
return 240.0 + MediaQuery.of(context).viewInsets.bottom;
|
||||
} else {
|
||||
picHeight = 200.sp;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
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) {
|
||||
return list.interest!.image != null
|
||||
? GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.SignalCircleListPage, arguments: list.interest!.id!);
|
||||
},
|
||||
child: ClipRRect(
|
||||
Widget getBottomContainer() {
|
||||
|
||||
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);
|
||||
return const SizedBox(height: 0);
|
||||
}
|
||||
|
||||
void addStickerToText(String sticker) {
|
||||
final oldText = logic.inputController.text;
|
||||
if (currentCursor != null && currentCursor! > -1) {
|
||||
final firstString = oldText.substring(0, currentCursor);
|
||||
final secondString = oldText.substring(currentCursor!);
|
||||
currentCursor = currentCursor! + sticker.length;
|
||||
logic.inputController.text = "$firstString$sticker$secondString";
|
||||
} else {
|
||||
await logic.outCircle(list.interest!.id!.toString(),
|
||||
list.interest!.isJoin!);
|
||||
if (Get.isRegistered<LikeLogic>()) {
|
||||
LikeLogic likeLogic = Get.find<LikeLogic>();
|
||||
likeLogic.loadMyCircleData();
|
||||
logic.inputController.text = "$oldText$sticker";
|
||||
}
|
||||
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) {
|
||||
return picHeight > 0
|
||||
? Container(
|
||||
height: picHeight,
|
||||
alignment: Alignment.topLeft,
|
||||
margin: EdgeInsets.only(left: 10.sp, right: 10.sp,bottom: 5.sp),
|
||||
child: picHeight == 200.sp
|
||||
? VideoItemWidget(list.album![0].url!)
|
||||
: 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!);
|
||||
backSpaceText() {
|
||||
String originalText = logic.inputController.text;
|
||||
dynamic text;
|
||||
|
||||
if (originalText == zeroWidthSpace) {
|
||||
} else {
|
||||
text = originalText.characters.skipLast(1);
|
||||
logic.inputController.text = text;
|
||||
// handleSetDraftText();
|
||||
}
|
||||
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) {
|
||||
// 和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) {
|
||||
return sysItemWidget(index, list);
|
||||
}
|
||||
@ -727,7 +520,7 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
||||
}
|
||||
|
||||
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 picWidth = Get.width - 90.sp;
|
||||
|
||||
@ -925,8 +718,8 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
||||
),
|
||||
if (!isSelf && list.jumpInfo != null)
|
||||
Positioned(
|
||||
right: 15.sp,
|
||||
bottom: 0.sp,
|
||||
right: 25.sp,
|
||||
bottom: 5.sp,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
pushPage(list.jumpInfo!.scene!, list.jumpInfo!.param!);
|
||||
@ -948,61 +741,329 @@ class _WorldCallOutPageState extends State<WorldCallOutPage>
|
||||
);
|
||||
}
|
||||
|
||||
double getBottomHeight(context) {
|
||||
if (logic.showKeyboard) {
|
||||
final currentKeyboardHeight = MediaQuery.of(context).viewInsets.bottom;
|
||||
final height = currentKeyboardHeight;
|
||||
return height;
|
||||
} else if (logic.showEmojiPanel) {
|
||||
return 240.0 + MediaQuery.of(context).viewInsets.bottom;
|
||||
picOrVideoItem(double picHeight, WorldLists list) {
|
||||
return picHeight > 0
|
||||
? Container(
|
||||
height: picHeight,
|
||||
alignment: Alignment.topLeft,
|
||||
margin: EdgeInsets.only(left: 10.sp, right: 10.sp,bottom: 5.sp),
|
||||
child: picHeight == 200.sp
|
||||
? VideoItemWidget(list.album![0].url!)
|
||||
: 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 {
|
||||
return 0;
|
||||
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();
|
||||
}
|
||||
|
||||
Widget getBottomContainer() {
|
||||
|
||||
return const SizedBox(height: 0);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void addStickerToText(String sticker) {
|
||||
final oldText = logic.inputController.text;
|
||||
if (currentCursor != null && currentCursor! > -1) {
|
||||
final firstString = oldText.substring(0, currentCursor);
|
||||
final secondString = oldText.substring(currentCursor!);
|
||||
currentCursor = currentCursor! + sticker.length;
|
||||
logic.inputController.text = "$firstString$sticker$secondString";
|
||||
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 {
|
||||
logic.inputController.text = "$oldText$sticker";
|
||||
picHeight = 200.sp;
|
||||
}
|
||||
}
|
||||
|
||||
backSpaceText() {
|
||||
String originalText = logic.inputController.text;
|
||||
dynamic text;
|
||||
|
||||
if (originalText == zeroWidthSpace) {
|
||||
} else {
|
||||
text = originalText.characters.skipLast(1);
|
||||
logic.inputController.text = text;
|
||||
// handleSetDraftText();
|
||||
}
|
||||
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),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 和onSubmitted一样,只是保持焦点的不同
|
||||
onEmojiSubmitted() {
|
||||
final text = logic.inputController.text.trim();
|
||||
|
||||
if (text.isNotEmpty) {}
|
||||
logic.inputController.clear();
|
||||
|
||||
currentCursor = null;
|
||||
exitEditText();
|
||||
picOrVideoItem(double picHeight, WorldLists list) {
|
||||
return picHeight > 0
|
||||
? Container(
|
||||
height: picHeight,
|
||||
alignment: Alignment.topLeft,
|
||||
margin: EdgeInsets.only(left: 10.sp, right: 10.sp,bottom: 5.sp),
|
||||
child: picHeight == 200.sp
|
||||
? VideoItemWidget(list.album![0].url!)
|
||||
: 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!);
|
||||
}
|
||||
|
||||
exitEditText() {
|
||||
logic.showKeyboard = false;
|
||||
logic.showEmojiPanel = false;
|
||||
logic.focusNode.unfocus();
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import '../circle_app/userinfo/logic.dart';
|
||||
import 'Widgets/base_tip_widget.dart';
|
||||
|
||||
const bgAssetImage = DecorationImage(
|
||||
image: AssetImage('assets/images/base/bg.png'),
|
||||
image: AssetImage('data/img/base/bg.png'),
|
||||
fit: BoxFit.cover,
|
||||
);
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
this.title = '',
|
||||
this.centerTitle = '',
|
||||
this.actionWdiget,
|
||||
this.backImg = 'assets/images/navigator/back.png',
|
||||
this.backImg = 'data/img/nav/back.png',
|
||||
this.backImgColor,
|
||||
this.onPressed,
|
||||
this.isDiyBack = false,
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import 'package:circle_app/commons/colors/app_color.dart';
|
||||
import 'package:circle_app/utils/util.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.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/dio_manager.dart';
|
||||
import '../../router/routers.dart';
|
||||
import '../Widgets/base_tip_widget.dart';
|
||||
|
||||
class UserTagWidget extends StatelessWidget {
|
||||
int type;
|
||||
@ -22,7 +24,7 @@ class UserTagWidget extends StatelessWidget {
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
if (type == 1) {
|
||||
if (type == 2) {
|
||||
var con;
|
||||
if (kDebugMode) {
|
||||
con = V2TimConversation(
|
||||
@ -39,6 +41,9 @@ class UserTagWidget extends StatelessWidget {
|
||||
}
|
||||
Get.toNamed(Routes.Chat, arguments: con);
|
||||
DioManager.instance.post(url: Api.goodAuth);
|
||||
} else if (type == 1) {
|
||||
showOKToast('充值小票就可以通过金主认证,一次认证,永久有效~');
|
||||
showRechargeScreenDialog();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@ -17,10 +17,11 @@ import 'dart:math' as math;
|
||||
|
||||
class TodayPeopleDialog extends StatefulWidget {
|
||||
bool isShow;
|
||||
TodayPeopleDialog({super.key, this.isShow = false});
|
||||
String urlStr;
|
||||
TodayPeopleDialog({super.key, this.isShow = false, this.urlStr = ''});
|
||||
|
||||
@override
|
||||
_TodayPeopleDialogState createState() => new _TodayPeopleDialogState();
|
||||
_TodayPeopleDialogState createState() => _TodayPeopleDialogState();
|
||||
}
|
||||
|
||||
class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
@ -34,8 +35,12 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
if (widget.urlStr.isNotEmpty) {
|
||||
isLoad = false;
|
||||
}
|
||||
fetchMyAlbum(Api.getMyAlbum);
|
||||
// loadRecommendCircleFriendData();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -54,18 +59,21 @@ class _TodayPeopleDialogState extends State<TodayPeopleDialog> {
|
||||
|
||||
|
||||
void loadRecommendCircleFriendData() async {
|
||||
if (widget.urlStr.isEmpty) {
|
||||
isLoad = true;
|
||||
}
|
||||
|
||||
recommendCircleFriendData = {};
|
||||
setState(() {
|
||||
|
||||
});
|
||||
var data = await DioManager.instance.get(
|
||||
url: Api.chatRecommendFriend,
|
||||
url: widget.urlStr.isNotEmpty ? widget.urlStr : Api.chatRecommendFriend,
|
||||
);
|
||||
|
||||
if (data['code'] == 200) {
|
||||
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
|
||||
if (await sp.isShowMatch() && imgList.isEmpty) {
|
||||
if (await sp.isShowMatch() && imgList.isEmpty && widget.urlStr.isEmpty) {
|
||||
showOKToast('上传真实头像和形象照后更容易匹配到想认识的人哦~');
|
||||
}
|
||||
isLoad = false;
|
||||
|
||||
@ -350,7 +350,7 @@ class _WxEditDialogState extends State<WxEditDialog> {
|
||||
|
||||
var result = await DioManager().postBody(url: Api.confset,params: { "guideText": descEditingController.text,
|
||||
"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,
|
||||
"contact": wxEditingController.text});
|
||||
if (result['code'] ==200) {
|
||||
|
||||
@ -441,4 +441,10 @@ class Api {
|
||||
|
||||
//圈子代理统计
|
||||
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
|
||||
baseUrl:
|
||||
// Api.baseUrl2,
|
||||
Api.baseUrl,
|
||||
// Api.baseUrl,
|
||||
|
||||
// type == 1 ? Api.baseUrl2 : Api.baseUrl1,
|
||||
type == 1 ? Api.baseUrl2 : Api.baseUrl1,
|
||||
// 连接服务器超时时间,单位是毫秒
|
||||
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: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/ascendancy__apex/binding.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/radiant__nexus/binding.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/view.dart';
|
||||
import '../circle_app/solstice/binding.dart';
|
||||
@ -365,6 +369,17 @@ class PageList {
|
||||
page: () => Invent_recordPage(),
|
||||
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(
|
||||
name: Routes.InviteRecordPage,
|
||||
|
||||
@ -33,6 +33,8 @@ abstract class Routes {
|
||||
|
||||
static const SignalCircleListPage = '/msg/chat/SignalCircleListPage';
|
||||
|
||||
static const AgentSignalCircleListPage = '/msg/AgentSignalCircleListPage';
|
||||
|
||||
static const InvitePage = '/mine/InvitePage';
|
||||
|
||||
static const DisCover = '/DisCover';
|
||||
@ -53,6 +55,8 @@ abstract class Routes {
|
||||
static const QuickPage = '/msg/QuickPage';
|
||||
|
||||
static const WorldCallOut = '/world_call_out';
|
||||
static const Revenue_Details = '/Revenue_details';
|
||||
|
||||
|
||||
|
||||
/*新加入*/
|
||||
|
||||
@ -23,6 +23,8 @@ class SharedPreferencesHelper {
|
||||
|
||||
static const FirstMatch = 'FirstMatch';
|
||||
|
||||
static const FirstAutoMatch = 'FirstAutoMatch';
|
||||
|
||||
static SharedPreferencesHelper? _instance;
|
||||
static SharedPreferences? _preferences;
|
||||
|
||||
@ -84,7 +86,7 @@ class SharedPreferencesHelper {
|
||||
|
||||
|
||||
Future<bool> isShowMatch() async {
|
||||
String time = await preferences!.getString(FirstMatch) ?? '';
|
||||
String time = preferences!.getString(FirstMatch) ?? '';
|
||||
if (time.isNotEmpty) {
|
||||
DateTime dateTime = DateTime.parse(time);
|
||||
bool isShow = !isSameDay(dateTime,DateTime.now());
|
||||
@ -98,6 +100,23 @@ class SharedPreferencesHelper {
|
||||
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) {
|
||||
return time1.year == time2.year &&
|
||||
time1.month == time2.month &&
|
||||
|
||||
@ -30,6 +30,7 @@ import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:video_compress/video_compress.dart';
|
||||
|
||||
import '../circle_app/circle/logic.dart';
|
||||
import '../circle_app/circle_list/logic.dart';
|
||||
import '../circle_app/home/logic.dart';
|
||||
import '../circle_app/select_circle/logic.dart';
|
||||
import '../commons/Widgets/open_vip_tip/view.dart';
|
||||
@ -83,6 +84,7 @@ String getCircleImage(String image) {
|
||||
showOKToast(String msg) {
|
||||
showToast(
|
||||
msg,
|
||||
textAlign: TextAlign.left,
|
||||
duration: Duration(seconds: msg.length > 15 ? 5 : msg.length > 10 ? 3 : 2),
|
||||
position: ToastPosition.center,
|
||||
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 {
|
||||
await logoutIM();
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
@ -1197,7 +1209,20 @@ pushPage(String action,String param,{String name = ''}) async {
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.outCrrcle + param + "/join",
|
||||
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"
|
||||
description:
|
||||
name: app_settings
|
||||
sha256: "2ec421f375d747916c4c0193933567074ea60c4f01c4a68642f07fef1002524e"
|
||||
sha256: e6a34735d4ddb24ca9c5fd7e965ec65c8b611cbd3a329152c294f9e9f4bacb33
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.0.4"
|
||||
version: "4.3.1"
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -630,6 +630,14 @@ packages:
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@ -90,7 +90,7 @@ dependencies:
|
||||
fluwx: ^3.8.1+1
|
||||
event_bus: ^2.0.0
|
||||
#安装apk
|
||||
# flutter_install_app: 1.3.0
|
||||
flutter_install_app: 1.3.0
|
||||
#闪屏页
|
||||
flutter_native_splash: 2.2.16
|
||||
#腾讯离线推送
|
||||
@ -112,11 +112,11 @@ dependencies:
|
||||
#边框渐变
|
||||
gradient_borders: ^1.0.0
|
||||
#系统设置 安卓4.3.1 苹果4.0.4
|
||||
app_settings: 4.0.4
|
||||
app_settings: 4.3.1
|
||||
#百度定位插件
|
||||
flutter_bmflocation: ^3.6.0
|
||||
#通知权限
|
||||
notification_permissions: any
|
||||
notification_permissions: ^0.6.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user