代码提交

This commit is contained in:
CYH 2024-08-19 09:04:37 +08:00
parent c4c0b8d155
commit ed59f1caed
13 changed files with 214 additions and 29 deletions

View File

@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.1.6</string>
<string>2.1.8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>

View File

@ -131,7 +131,7 @@ class _ChatPageState extends State<ChatPage> {
tip = 'TA发布了喊话您发布后形象会更完善';
} else if (otherUserBean!.userType == 1 && userInfoBean!.userType != 1) {
isShowTip = true;
tip = 'TA完成了good号认证您认证后可获得多种特权联系客服';
tip = 'TA完成了good号认证您认证后可获得多种特权';
}
}
if (isShowTip) {

View File

@ -2,8 +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_screenutil/flutter_screenutil.dart';
// import 'package:flutter_install_app/flutter_install_app.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:url_launcher/url_launcher.dart';
@ -302,7 +301,7 @@ class _CustomDialogState extends State<UpdateDialog> {
installApk() async {
//flutter_install_app
await AppInstaller.installApk(filePath, actionRequired: false);
// await AppInstaller.installApk(filePath, actionRequired: false);
}
}

View File

@ -1,4 +1,5 @@
import 'package:circle_app/circle_app/home/logic.dart';
import 'package:circle_app/router/routers.dart';
import 'package:flutter/material.dart';
import 'package:circle_app/commons/colors/app_color.dart';
@ -80,7 +81,7 @@ class LikePeoleSendedCallOutDialog extends StatelessWidget {
),
alignment: Alignment.center,
child: Text(
'放弃',
'关闭',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
@ -90,7 +91,7 @@ class LikePeoleSendedCallOutDialog extends StatelessWidget {
),
GestureDetector(
onTap: () async {
Get.back();
Get.until((route) => route.settings.name == Routes.Home);
HomeLogic logic = Get.find<HomeLogic>();
logic.updateIndex(1);
Future.delayed(Duration(milliseconds: 500),() {
@ -109,7 +110,7 @@ class LikePeoleSendedCallOutDialog extends StatelessWidget {
gradient: AppColor.mainVerLinearGradient
),
child: Text(
'前往查看',
'查看',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,

View File

@ -238,7 +238,7 @@ class HomeLogic extends GetxController with WidgetsBindingObserver {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
if (await sp.isFirstPeopleSendCallOut()) {
Future.delayed(Duration(seconds: 20),() {
showSendedCallOutDialog(message.customElem!.desc!.toString());
EventBusManager.fire(ShowpeopleCallOutNotifi(message.customElem!.desc!.toString()));
});
}
} else if (int.parse(event) == 5) {
@ -630,4 +630,9 @@ class MsgRecommendCardRefresh {}
class ShowGiftNotifi {
Map info;
ShowGiftNotifi(this.info);
}
class ShowpeopleCallOutNotifi {
String content;
ShowpeopleCallOutNotifi(this.content);
}

View File

@ -13,6 +13,7 @@ import 'package:get/get.dart';
import '../../main.dart';
import '../../router/routers.dart';
import '../../view/notice.dart';
import '../circle_list/logic.dart';
import '../circle_list/view.dart';
import '../world_call_out/logic.dart';
import 'logic.dart';
@ -34,6 +35,7 @@ class _HomePageState extends State<HomePage>
HomeLogic logic = Get.find<HomeLogic>();
var sub;
var sub1;
@override
void initState() {
// TODO: implement initState
@ -54,6 +56,22 @@ class _HomePageState extends State<HomePage>
});
});
sub1 = EventBusManager.on<ShowpeopleCallOutNotifi>().listen((event) {
showPeopleCallOutOverlay(context, event.content, () {
Get.until((route) => route.settings.name == Routes.Home);
logic.updateIndex(1);
Future.delayed(Duration(milliseconds: 500),() {
final likeLogic = Get.find<LikeLogic>();
likeLogic.currentIndex == -2;
likeLogic.update();
});
});
//
// });
});
}
@override

View File

@ -34,15 +34,17 @@ class MinefragmentLogic extends GetxController {
String joinedCircle = "";
String vipMsg = "十几种专属特权等你领取";
bool isProxy = true;
@override
void onInit() async {
super.onInit();
// SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
// if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
// isProxy = true;
// } else {
// isProxy = false;
// }
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
isProxy = true;
} else {
isProxy = false;
}
getMode();
checkVersion();

View File

@ -227,7 +227,7 @@ class _MinefragmentPageState extends State<MinefragmentPage> with RouteAware {
return Column(
children: [_circleItemView(logic),_invienItemView(),_shareItemView(),_editGoodReviewItemView(), _helpItemView(),_setUpItemView()],
children: [_circleItemView(logic),_invienItemView(), logic.isProxy ? Container() : _shareItemView(),_editGoodReviewItemView(), _helpItemView(),_setUpItemView()],
);
}

View File

@ -3,18 +3,28 @@ import 'package:get/get.dart';
import '../../net/api.dart';
import '../../net/dio_manager.dart';
import '../../utils/SharedPreferencesHelper.dart';
class My_assetsLogic extends GetxController {
AssetsDataData? myAssest;
var sub;
bool isProxy = false;
@override
void onInit() {
void onInit() async {
// TODO: implement onInit
super.onInit();
sub = EventBusManager.on<AssestEvent>().listen((event) {
loadMyAssest();
});
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
isProxy = true;
} else {
isProxy = false;
}
loadMyAssest();
}

View File

@ -282,6 +282,7 @@ class My_assetsPage extends StatelessWidget {
),
],
)),
if (!logic.isProxy)
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {

View File

@ -449,6 +449,163 @@ void showGiftButtonOverlay(BuildContext context,String content,
overlayState?.insert(overlayEntry!);
}
void showPeopleCallOutOverlay(BuildContext context,String content,
NoticeCallback noticeCallback) {
OverlayState? overlayState = Overlay.of(context);
late OverlayEntry overlayEntry;
bool showMessage = false;
int countdownSeconds = 5; //
// Timer
late Timer countdownTimer;
// OverlayEntry
overlayEntry = OverlayEntry(
builder: (BuildContext context) {
return Stack(
alignment: Alignment.center,
children: [
Positioned(
top: MediaQuery.of(context).padding.top,
// right: 16,
child: AnimatedContainer(
duration: const Duration(milliseconds: 500),
curve: Curves.easeInOut,
height: showMessage ? 55 : 0,
child: Container(
width: Get.width - 8,
// margin: EdgeInsets.only(top:10.sp),
padding: EdgeInsets.fromLTRB(10.sp, 8.sp, 10.sp, 8.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: const Color(0xFF353443),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// const SizedBox(width: 8),
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
// direction: Axis.vertical,
children: [
Container(
// width: 70.sp,
child: Text(
content,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color.fromRGBO(247, 250, 250, 1.0),
fontSize: 15.sp,
),
),
),
],
),
),
GestureDetector(
onTap: () {
countdownTimer.cancel();
try {
overlayEntry!.remove();
} catch (e) {}
mainOverlayEntry = null;
noticeCallback();
// logic.setLike();
// logic.showMessage = false;
// logic.update();
},
child: Container(
// margin: EdgeInsets.only(top: 6.sp),
height: 24,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
gradient: const LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.symmetric(
horizontal: 8.sp, vertical: 0.sp),
child: Text(
'查看',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp,
),
),
),
),
// ),
],
),
),
),
),
Positioned(
top: MediaQuery.of(context).padding.top,
right: 7.sp,
child: GestureDetector(
onTap: () {
countdownTimer.cancel();
//
try {
overlayEntry!.remove();
} catch (e) {}
mainOverlayEntry = null;
},
child: Container(
height: 15,
width: 20,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topRight: Radius.circular(10),
bottomLeft: Radius.circular(10)),
gradient: AppColor.tagVerLinearGradient),
alignment: Alignment.center,
child: Icon(
Icons.close,
size: 15,
color: Colors.white,
),
),
))
],
);
},
);
// setState(() {});
showMessage = true;
mainOverlayEntry = overlayEntry;
countdownTimer = Timer.periodic(Duration(seconds: 1), (timer) {
if (countdownSeconds > 0) {
countdownSeconds--;
// overlayEntry.markNeedsBuild(); // OverlayEntry
} else {
//
timer.cancel();
try {
overlayEntry!.remove();
} catch (e) {}
mainOverlayEntry = null;
}
});
// OverlayEntry Overlay
overlayState?.insert(overlayEntry!);
}
void showTipFloatingButtonOverlay(BuildContext context, String tip) {
OverlayState? overlayState = Overlay.of(context);

View File

@ -45,10 +45,10 @@ packages:
dependency: "direct main"
description:
name: app_settings
sha256: e6a34735d4ddb24ca9c5fd7e965ec65c8b611cbd3a329152c294f9e9f4bacb33
sha256: "2ec421f375d747916c4c0193933567074ea60c4f01c4a68642f07fef1002524e"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.3.1"
version: "4.0.4"
archive:
dependency: transitive
description:
@ -630,14 +630,6 @@ 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:

View File

@ -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,7 +112,7 @@ dependencies:
#边框渐变
gradient_borders: ^1.0.0
#系统设置 安卓4.3.1 苹果4.0.4
app_settings: 4.3.1
app_settings: 4.0.4
#百度定位插件
flutter_bmflocation: ^3.6.0
#通知权限