Compare commits

..

No commits in common. "56bd9f61638bb30f10103984a061a62732dc1607" and "d2db9f1478fcd0b5b780e46648760d85b247570b" have entirely different histories.

42 changed files with 624 additions and 1711 deletions

View File

@ -65,8 +65,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21 minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode 4 versionCode 2
versionName "1.0.3" versionName "1.0.1"
manifestPlaceholders = [ manifestPlaceholders = [
vivo_APPID: "105669716", vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122", vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

View File

@ -9,12 +9,15 @@ buildscript {
maven{url 'https://maven.aliyun.com/repository/jcenter' } maven{url 'https://maven.aliyun.com/repository/jcenter' }
maven {url 'https://developer.huawei.com/repo/'} maven {url 'https://developer.huawei.com/repo/'}
maven { url 'https://developer.hihonor.com/repo/' } maven { url 'https://developer.hihonor.com/repo/' }
maven { url "https://mvn.mob.com/android"}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.2.0' classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.huawei.agconnect:agcp:1.6.0.300' classpath 'com.huawei.agconnect:agcp:1.6.0.300'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.mob.sdk:MobSDK:+'
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -141,6 +141,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
596550B3B6FD4574F751EEF4 /* [CP] Embed Pods Frameworks */, 596550B3B6FD4574F751EEF4 /* [CP] Embed Pods Frameworks */,
043A78F4D9CB2782E40309BF /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -199,6 +200,23 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
043A78F4D9CB2782E40309BF /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1; alwaysOutOfDate = 1;
@ -368,7 +386,6 @@
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料"; INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布"; INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
@ -382,7 +399,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.1.0; MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp; PRODUCT_BUNDLE_IDENTIFIER = com.example.circleApp123;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO; SUPPORTS_MACCATALYST = NO;
@ -517,7 +534,6 @@
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料"; INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布"; INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
@ -531,7 +547,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.1.0; MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp; PRODUCT_BUNDLE_IDENTIFIER = com.example.circleApp123;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO; SUPPORTS_MACCATALYST = NO;
@ -560,7 +576,6 @@
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料"; INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "应用想要访问您的位置,用于设置个人资料";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "应用想要访问您的麦克风,用于发送语音消息";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "是否同意应用将图片保存到相册中?";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布"; INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "应用想要访问您的相册,用于设置头像/动态发布";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
@ -574,7 +589,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.1.0; MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp; PRODUCT_BUNDLE_IDENTIFIER = com.example.circleApp123;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO; SUPPORTS_MACCATALYST = NO;

View File

@ -2,6 +2,41 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixinULAPI</string>
<string>weixin</string>
<string>wechat</string>
<string>mqqapi</string>
<string>mqq</string>
<string>mqqOpensdkSSoLogin</string>
<string>mqqconnect</string>
<string>mqqopensdkdataline</string>
<string>mqqopensdkgrouptribeshare</string>
<string>mqqopensdkfriend</string>
<string>mqqopensdkapi</string>
<string>mqqopensdkapiV2</string>
<string>mqqopensdkapiV3</string>
<string>mqzoneopensdk</string>
<string>wtloginmqq</string>
<string>wtloginmqq2</string>
<string>mqqwpa</string>
<string>mqzone</string>
<string>mqzonev2</string>
<string>mqzoneshare</string>
<string>wtloginqzone</string>
<string>mqzonewx</string>
<string>mqzoneopensdkapiV2</string>
<string>mqzoneopensdkapi19</string>
<string>mqzoneopensdkapi</string>
<string>mqqbrowser</string>
<string>mttbrowser</string>
<string>baidumap</string>
<string>iosamap</string>
<string>weibosdk</string>
<string>sinaweibo</string>
<string>sinaweibohd</string>
</array>
<key>App Transport Security Settings </key> <key>App Transport Security Settings </key>
<true/> <true/>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
@ -21,15 +56,11 @@
</array> </array>
</dict> </dict>
</array> </array>
<key>LSApplicationQueriesSchemes</key> <key>MOBAppKey</key>
<array> <string>3872b1e955498</string>
<string>weixinULAPI</string> <key>MOBAppSecret</key>
<string>weixin</string> <string>30dc517b609c8aefe297b9ac3eb8dbde</string>
<string>wechat</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict> </dict>
</plist> </plist>

View File

@ -1,10 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict/>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:https://www.leyuan666.com/</string>
</array>
</dict>
</plist> </plist>

View File

@ -6,7 +6,6 @@ import 'package:circle_app/app/minefragment/logic.dart';
import 'package:circle_app/common/Widgets/open_vip_tip/view.dart'; import 'package:circle_app/common/Widgets/open_vip_tip/view.dart';
import 'package:circle_app/network/api.dart'; import 'package:circle_app/network/api.dart';
import 'package:circle_app/network/dio_manager.dart'; import 'package:circle_app/network/dio_manager.dart';
import 'package:circle_app/util/SharedPreferencesHelper.dart';
import 'package:circle_app/util/util.dart'; import 'package:circle_app/util/util.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -777,19 +776,14 @@ class _TIMTextFieldLayoutNarrowState
Future checkVipStatus() async { Future checkVipStatus() async {
if (!isVip) { if (!isVip) {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance(); var data = await DioManager.instance.get(url: Api.getUserMine);
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') { var bean = BaseResponse<MineResponseBean>.fromJson(
isVip = true; data, (data) => MineResponseBean.fromJson(data));
return true; if (bean.isSuccess()) {
} else { User userInfoBean = bean.data.user!;
var data = await DioManager.instance.get(url: Api.getUserMine); isVip = userInfoBean.vip > 0;
var bean = BaseResponse<MineResponseBean>.fromJson(
data, (data) => MineResponseBean.fromJson(data));
if (bean.isSuccess()) {
User userInfoBean = bean.data.user!;
isVip = userInfoBean.vip > 0;
}
} }
} }
if (!isVip) { if (!isVip) {
showOKToast('开通会员之后才能发送图片'); showOKToast('开通会员之后才能发送图片');

View File

@ -56,7 +56,6 @@ class CircleLogic extends GetxController {
if (circle.lists.length < 20) { if (circle.lists.length < 20) {
isMore = false; isMore = false;
} }
update(); update();
} }
myVip = await getVip(); myVip = await getVip();

View File

@ -18,11 +18,6 @@ import '../select_circle/logic.dart';
import '../userinfo/logic.dart'; import '../userinfo/logic.dart';
import 'logic.dart'; import 'logic.dart';
const bgWidget = DecorationImage(
fit: BoxFit.fill,
image: AssetImage('assets/images/base/home_back.png'));
class CirclePage extends StatefulWidget { class CirclePage extends StatefulWidget {
CirclePage({Key? key}) : super(key: key); CirclePage({Key? key}) : super(key: key);
@ -76,9 +71,11 @@ class _CirclePageState extends State<CirclePage>
return Container( return Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
decoration: const BoxDecoration( decoration: BoxDecoration(
color: Color(0xFF423055), color: const Color(0xFF423055),
image: bgWidget), image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage(getBaseImage('home_back')))),
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: SafeArea( body: SafeArea(
@ -544,7 +541,7 @@ class _CirclePageState extends State<CirclePage>
viewportFraction: 0.93, viewportFraction: 0.93,
// scale: 0.9, // scale: 0.9,
loop: false, loop: false,
// key: UniqueKey(), key: UniqueKey(),
// pagination: new SwiperPagination(),// // pagination: new SwiperPagination(),//
// control: new SwiperControl(),// // control: new SwiperControl(),//
); );
@ -729,57 +726,15 @@ class _CirclePageState extends State<CirclePage>
Positioned( Positioned(
right: 0, right: 0,
child: logic.isShowCircle child: logic.isShowCircle
? ? GestureDetector(
GestureDetector( onTap: () {
onTap: (){ Get.toNamed(AppRoutes.MyCircle, arguments: '');
Get.toNamed(AppRoutes.Invite); },
}, child: Image.asset(
child: Container( getCircleImage('my_circle'),
decoration: BoxDecoration( width: 64.sp,
borderRadius: BorderRadius.circular(17.0),
gradient: const LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
),
color: const Color(0xFF392D53),
),
child: Container(
margin: EdgeInsets.all(0.6.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.0),
color: const Color(0xFF392D53),
),
child: Padding(
padding: EdgeInsets.only(
top: 5.sp,
bottom: 4.sp,
left: 15.sp,
right: 15.sp,
), ),
child: const Center( )
child: Text(
"邀请得会员",
style: TextStyle(
fontSize: 11,
color: Colors.white,
),
),
),
),
),
),
)
// GestureDetector(
// onTap: () {
// Get.toNamed(AppRoutes.MyCircle, arguments: '');
// },
// child: Image.asset(
// getCircleImage('my_circle'),
// width: 64.sp,
// ),
// )
: GestureDetector( : GestureDetector(
onTap: () { onTap: () {
_showBottomSheet(context); _showBottomSheet(context);

View File

@ -20,10 +20,7 @@ import 'package:shared_preferences/shared_preferences.dart';
import '../../../util/SharedPreferencesHelper.dart'; import '../../../util/SharedPreferencesHelper.dart';
import '../../../util/eventBus.dart'; import '../../../util/eventBus.dart';
const listBgWidget = Image(
image: AssetImage('assets/images/circle/circle_bg.png'),
fit: BoxFit.fill,
);
class InfoListView extends StatefulWidget { class InfoListView extends StatefulWidget {
// Get.lazyPut(() => ListLogic()); // Get.lazyPut(() => ListLogic());
@ -270,7 +267,10 @@ class InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClien
borderRadius: BorderRadius.circular(10.sp), borderRadius: BorderRadius.circular(10.sp),
child: SizedBox( child: SizedBox(
width: Get.width, width: Get.width,
child: listBgWidget child: Image.asset(
getCircleImage('circle_bg'),
fit: BoxFit.fill,
),
)), )),
Container( Container(
height: Get.height, height: Get.height,

View File

@ -2,7 +2,7 @@ import 'dart:io';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_install_app/flutter_install_app.dart'; // import 'package:flutter_install_app/flutter_install_app.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -23,7 +23,6 @@ double myProgress = 0;
class _CustomDialogState extends State<UpdateDialog> { class _CustomDialogState extends State<UpdateDialog> {
bool isDownload = false; bool isDownload = false;
bool isShowWeb = false;
void incrementCounter() {} void incrementCounter() {}
@ -112,78 +111,42 @@ class _CustomDialogState extends State<UpdateDialog> {
onTap: () async { onTap: () async {
//incrementCounter(); //incrementCounter();
}, },
child: Column( child: Container(
children: [ margin: EdgeInsets.only(top: 24.sp),
Container( child: CircularProgressIndicator(
margin: EdgeInsets.only(top: 4.sp), value: myProgress,
child: CircularProgressIndicator( backgroundColor: Colors.grey,
value: myProgress, valueColor: const AlwaysStoppedAnimation<Color>(
backgroundColor: Colors.grey, Color(0xFF30FFD9)),
valueColor: strokeWidth: 4.0.sp,
const AlwaysStoppedAnimation<Color>( ),
Color(0xFF30FFD9)),
strokeWidth: 4.0.sp,
),
),
GestureDetector(
onTap: () async {
final String appStoreUrl = widget.updateInfo
.downloadUrl; // App Store链接示例
if (await canLaunch(appStoreUrl)) {
await launch(appStoreUrl,
forceSafariVC: false);
} else {
throw 'Could not open App Store.';
}
},
child:isShowWeb? Container(
margin: EdgeInsets.only(top: 4.sp),
child: Text(
"下载太慢?试试游览器下载吧。",
style: TextStyle(
color: Colors.blue, //
decoration:
TextDecoration.underline, // 线
),
),
): Container(),
)
],
), ),
) )
: GestureDetector( : GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () async { onTap: () async {
if (Platform.isIOS) { if (Platform.isIOS) {
final String appStoreUrl = widget final String appStoreUrl = widget.updateInfo.downloadUrl; // App Store链接示例
.updateInfo.downloadUrl; // App Store链接示例
if (await canLaunch(appStoreUrl)) { if (await canLaunch(appStoreUrl)) {
await launch(appStoreUrl, await launch(appStoreUrl,forceSafariVC : false);
forceSafariVC: false);
} else { } else {
throw 'Could not open App Store.'; throw 'Could not open App Store.';
} }
} else { } else {
final String appStoreUrl = widget
.updateInfo.downloadUrl; // App Store链接示例
if (appStoreUrl.contains("apk")) { final String appStoreUrl = widget.updateInfo.downloadUrl; // App Store链接示例
if(appStoreUrl.contains("apk")){
updataApk(appStoreUrl); updataApk(appStoreUrl);
setDownloadUi(); setDownloadUi();
await Future.delayed(Duration(seconds: 10)); }else{
setState(() {
isShowWeb = true;
});
} else {
if (await canLaunch(appStoreUrl)) { if (await canLaunch(appStoreUrl)) {
await launch(appStoreUrl, await launch(appStoreUrl,forceSafariVC : false);
forceSafariVC: false);
} else { } else {
throw 'Could not open App Store.'; throw 'Could not open App Store.';
} }
} }
} }
//Navigator.pop(context); //Navigator.pop(context);
@ -225,17 +188,12 @@ class _CustomDialogState extends State<UpdateDialog> {
Positioned( Positioned(
right: 8.sp, right: 8.sp,
top: 8.sp, top: 8.sp,
child: widget.isDismiss child: widget.isDismiss? GestureDetector(
? GestureDetector( onTap: (){
onTap: () {
Navigator.pop(context); Navigator.pop(context);
}, },
child: Icon( child: Icon(Icons.close,color: Colors.white,size: 24.sp,)):Container())
Icons.close,
color: Colors.white,
size: 24.sp,
))
: Container())
], ],
), ),
), ),
@ -260,7 +218,7 @@ class _CustomDialogState extends State<UpdateDialog> {
// SmartDialog.dismiss(); // SmartDialog.dismiss();
print(error); print(error);
}); });
await AppInstaller.installApk(filePath, actionRequired: false); // await AppInstaller.installApk(filePath, actionRequired: false);
} }
} }

View File

@ -1,5 +1,4 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'dart:ffi'; import 'dart:ffi';
@ -19,7 +18,6 @@ import 'package:tencent_cloud_chat_uikit/data_services/services_locatar.dart';
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart'; import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
import '../../util/eventBus.dart'; import '../../util/eventBus.dart';
import '../../view/notice.dart';
import '../circle/view.dart'; import '../circle/view.dart';
import '../dialog/UpdateDialog.dart'; import '../dialog/UpdateDialog.dart';
import '../minefragment/view.dart'; import '../minefragment/view.dart';
@ -57,58 +55,14 @@ class HomeLogic extends GetxController {
userInfo, userInfo,
text, text,
) async { ) async {
print("收到新消息" + text); print("收到新消息"+text);
unreadSIze.value = (int.parse(unreadSIze.value) + 1).toString(); unreadSIze.value = (int.parse(unreadSIze.value)+1).toString();
//getUnreadSize(); //getUnreadSize();
}, onRecvC2CCustomMessage: (
String msgID,
V2TimUserInfo sender,
String customData,
) {
if (sender.userID == "qpqz_dev_10_10000000000" ||
sender.userID == "qpqz_prod_10_10000000000") {
print("123123123123"+customData);
Map<String, dynamic> jsonData = json.decode(customData);
int event = jsonData['event'];
Map<String, dynamic> content = jsonData['content'];
switch(event){
case 1://
String ageMsg = "${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}";
if(content['isFollow']==1){//
showFloatingButtonOverlay(Get.context!,content['nickname'],ageMsg,content['avatarThumb'],3,(){
pushChatPage(content['id'].toString(), content['imId'],
content['nickname']);
});
}else{
showFloatingButtonOverlay(Get.context!,content['nickname'],ageMsg,content['avatarThumb'],1,(){
setLike(content['id'].toString());
});
}
break;
case 2://线
String ageMsg = "${content['genderName']}·${content['age']}·${content['roleName']}·${content['orientationName']}";
showFloatingButtonOverlay(Get.context!,content['nickname'],ageMsg,content['avatarThumb'],2,(){
pushChatPage(content['id'].toString(), content['imId'],
content['nickname']);
});
break;
}
}
}); });
_messageService.addSimpleMsgListener(listener: msgListener); _messageService.addSimpleMsgListener(listener: msgListener);
var data = await DioManager.instance.get(url: Api.APP_VERSION); var data = await DioManager.instance.get(url: Api.APP_VERSION);
var bean = BaseResponse<UpdateInfo>.fromJson( var bean = BaseResponse<UpdateInfo>.fromJson(
data, (data) => UpdateInfo.fromJson(data)); data, (data) => UpdateInfo.fromJson(data));
@ -116,55 +70,41 @@ class HomeLogic extends GetxController {
showReportDialog(Get.context!, bean.data.constraint == 0, bean.data); showReportDialog(Get.context!, bean.data.constraint == 0, bean.data);
} }
} }
setLike(String userId) async {
var data = await DioManager.instance.post(
url: "${Api.setLike + userId}/follow",
params: {'status': "1"});
var bean = BaseResponse<dynamic>.fromJson(
data,
(jsonData) => jsonData,
);
if (bean.isSuccess()) {
update();
}
showOKToast(bean.msg);
}
getUnreadSize() async { getUnreadSize() async {
V2TimValueCallback<int> getTotalUnreadMessageCountRes = V2TimValueCallback<int> getTotalUnreadMessageCountRes =
await TencentImSDKPlugin.v2TIMManager await TencentImSDKPlugin.v2TIMManager
.getConversationManager() .getConversationManager()
.getTotalUnreadMessageCount(); .getTotalUnreadMessageCount();
print("未读数量desc=" + print("未读数量desc=" + getTotalUnreadMessageCountRes.desc.toString()+"code="+getTotalUnreadMessageCountRes.code.toString()+"data="+getTotalUnreadMessageCountRes.data.toString());
getTotalUnreadMessageCountRes.desc.toString() +
"code=" +
getTotalUnreadMessageCountRes.code.toString() +
"data=" +
getTotalUnreadMessageCountRes.data.toString());
if (getTotalUnreadMessageCountRes.code == 0) { if (getTotalUnreadMessageCountRes.code == 0) {
unreadSIze.value = getTotalUnreadMessageCountRes.data.toString(); unreadSIze.value = getTotalUnreadMessageCountRes.data.toString();
if (Platform.isAndroid) { if (Platform.isAndroid) {
setOfflinePushStatus(status: AppStatus.foreground); setOfflinePushStatus(status: AppStatus.foreground);
} }
} else {
}else{
getUnreadSize(); getUnreadSize();
} }
} }
@override @override
Future<V2TimCallback> setOfflinePushStatus( Future<V2TimCallback> setOfflinePushStatus(
{required AppStatus status, int? totalCount}) { {required AppStatus status, int? totalCount}) {
if (status == AppStatus.foreground) {
// status为前台时doForeground() if (status == AppStatus.foreground) {
return TencentImSDKPlugin.v2TIMManager // status为前台时doForeground()
.getOfflinePushManager() return TencentImSDKPlugin.v2TIMManager
.doForeground(); .getOfflinePushManager()
} else { .doForeground();
// status为后台时doBackground() } else {
return TencentImSDKPlugin.v2TIMManager // status为后台时doBackground()
.getOfflinePushManager() return TencentImSDKPlugin.v2TIMManager
.doBackground(unreadCount: totalCount ?? 0); .getOfflinePushManager()
} .doBackground(unreadCount: totalCount ?? 0);
}
} }
@override @override
@ -173,6 +113,7 @@ class HomeLogic extends GetxController {
super.onReady(); super.onReady();
FlutterNativeSplash.remove(); FlutterNativeSplash.remove();
} }
void showReportDialog( void showReportDialog(

View File

@ -1,6 +1,3 @@
import 'package:circle_app/network/api.dart';
import 'package:circle_app/network/dio_manager.dart';
import 'package:circle_app/util/util.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -8,157 +5,5 @@ import 'state.dart';
class InviteLogic extends GetxController { class InviteLogic extends GetxController {
final InviteState state = InviteState(); final InviteState state = InviteState();
bool isLoad = true;
TextEditingController codeEditingController = TextEditingController(); TextEditingController codeEditingController = TextEditingController();
Data? homeData;
List sysData = [];
@override
void onInit() {
// TODO: implement onInit
super.onInit();
loadData();
}
void loadData() async {
var data = await DioManager.instance.get(url: Api.inviteMainPage);
if (data['code'] == 200) {
Autogenerated result = Autogenerated.fromJson(data);
homeData = result.data;
}
var recorddata = await DioManager.instance.get(url: Api.inviteSysRecord);
if (recorddata['code'] == 200) {
sysData = recorddata['data'];
isLoad = false;
update();
}
}
addCode(String code) async {
var recorddata = await DioManager.instance.post(url: Api.inviteFillIn,params: {'invite_code':code});
if (recorddata['code'] == 200) {
showOKToast('填写成功');
} else {
showOKToast(recorddata['msg']);
}
}
}
class Autogenerated {
int? code;
Data? data;
String? msg;
Autogenerated({this.code, this.data, this.msg});
Autogenerated.fromJson(Map<String, dynamic> json) {
code = json['code'];
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
msg = json['msg'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['code'] = this.code;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
data['msg'] = this.msg;
return data;
}
}
class Data {
int? achieveCount;
int? achieveRewardDay;
int? diffAwardCount;
List<InviteAwardConf>? inviteAwardConf;
int? inviteAwardCount;
String? inviteCode;
String? link;
int? inviteCount;
Data(
{this.achieveCount,
this.achieveRewardDay,
this.diffAwardCount,
this.inviteAwardConf,
this.inviteAwardCount,
this.inviteCode,
this.link,
this.inviteCount});
Data.fromJson(Map<String, dynamic> json) {
achieveCount = json['achieve_count'];
achieveRewardDay = json['achieve_reward_day'];
diffAwardCount = json['diff_award_count'];
if (json['invite_award_conf'] != null) {
inviteAwardConf = <InviteAwardConf>[];
json['invite_award_conf'].forEach((v) {
inviteAwardConf!.add(new InviteAwardConf.fromJson(v));
});
}
inviteAwardCount = json['invite_award_count'];
inviteCode = json['invite_code'];
link = json['site_link'];
inviteCount = json['invite_count'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['achieve_count'] = this.achieveCount;
data['achieve_reward_day'] = this.achieveRewardDay;
data['diff_award_count'] = this.diffAwardCount;
if (this.inviteAwardConf != null) {
data['invite_award_conf'] =
this.inviteAwardConf!.map((v) => v.toJson()).toList();
}
data['invite_award_count'] = this.inviteAwardCount;
data['invite_code'] = this.inviteCode;
data['invite_count'] = this.inviteCount;
return data;
}
}
class InviteAwardConf {
int? achieveId;
int? inviteCount;
int? isAchieved;
double? rebateRate;
int? rewardDay;
InviteAwardConf(
{this.achieveId,
this.inviteCount,
this.isAchieved,
this.rebateRate,
this.rewardDay});
InviteAwardConf.fromJson(Map<String, dynamic> json) {
achieveId = json['achieve_id'];
inviteCount = json['invite_count'];
isAchieved = json['is_achieved'];
rebateRate = json['rebate_rate'];
rewardDay = json['reward_day'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['achieve_id'] = this.achieveId;
data['invite_count'] = this.inviteCount;
data['is_achieved'] = this.isAchieved;
data['rebate_rate'] = this.rebateRate;
data['reward_day'] = this.rewardDay;
return data;
}
} }

View File

@ -1,487 +0,0 @@
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:circle_app/app/minefragment/logic.dart';
import 'package:circle_app/util/util.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:image_gallery_saver/image_gallery_saver.dart';
import 'dart:ui' as ui;
import 'package:fluwx/fluwx.dart' as fluwx;
import 'package:path_provider/path_provider.dart';
import 'package:qr_flutter/qr_flutter.dart';
class Share extends StatefulWidget {
String code;
String link;
Share(this.code, this.link);
@override
State<Share> createState() => _ShareState();
}
class _ShareState extends State<Share> {
GlobalKey _globalKey = GlobalKey();
MinefragmentLogic logic = Get.find<MinefragmentLogic>();
@override
Widget build(BuildContext context) {
// TODO: add widget build method
return Scaffold(
backgroundColor: Colors.transparent,
body: Container(
child: Stack(
alignment: Alignment.center,
children: [
Positioned(
top: 84.sp,
child: Container(
width: Get.width - 40.sp,
height: Get.height - 84.sp - Get.bottomBarHeight - 164.sp - 10.sp,
child:SingleChildScrollView(
child: RepaintBoundary(
key: _globalKey,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getCircleImage("open_vip_bg")),
fit: BoxFit.fill,
),
),
child: Column(
children: [
Container(
width: Get.width,
height: 65.sp,
margin: EdgeInsets.only(left: 15.sp, top: 20.sp),
child: Row(
children: [
Center(
child: Stack(
alignment: Alignment.center,
children: [
Container(
width: 47.sp,
height: 47.sp,
decoration: const BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(
colors: [
Color(0xFFDD3DF4),
Color(0xFF30FFD9)
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
),
),
SizedBox(
width: 46.sp,
height: 46.sp,
child: _buildAvatar1(logic),
)
],
),
),
Expanded(
child: Container(
padding: EdgeInsets.only(left: 10.sp),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
_buildNameRow(logic),
SizedBox(height: 10.sp),
_buildInfoRow(logic),
],
),
),
),
Image.asset(
getBaseImage("ic_launcher"),
width: 80.sp,
height: 80.sp,
)
],
),
),
// Expanded(
// child:
Container(
padding: EdgeInsets.only(left: 10.sp,right: 10.sp),
// color: Colors.red,
// height: 310.sp,
child: Column(
children: [
SizedBox(
height: 20.sp,
),
Container(
padding: EdgeInsets.only(left: 15.sp,right: 15.sp),
child: Image.asset(
getMineImage('share_title'),
),
),
SizedBox(
height: 10.sp,
),
Image.asset(
getMineImage('share_content_bg'),
// height: 260.sp,
fit:BoxFit.fitWidth
),
],
),
),
Container(
height: 90.sp,
// color: Color(0xFF334141),
alignment: Alignment.center,
// color: Colors.yellow,
// width: Get.width-40.sp,
margin: EdgeInsets.only(bottom: 15.sp,top: 10.sp),
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
child: Row(
children: [
Expanded(
child: Container(
// color: Colors.red,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
// color: Colors.blue,
child: Row(
children: [
Text(
'专属邀请码',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp),
),
SizedBox(
width: 8.sp,
),
Container(
alignment: Alignment.center,
padding: EdgeInsets.only(
left: 10.sp, right: 10.sp),
height: 25.sp,
decoration: BoxDecoration(
// color: Color(0xFFDC5BFD),
gradient:
const LinearGradient(
colors: [
Color(0xFF0DF5F7),
Color(0xFFD263FB)
],
begin:
Alignment.centerLeft,
end:
Alignment.centerRight,
),
borderRadius:
BorderRadius.circular(
12.5.sp)),
child: Text(
widget.code,
style: TextStyle(
color: Colors.black,
fontSize: 12.sp),
),
)
],
),
),
Container(
margin: EdgeInsets.only(top: 10.sp),
width: Get.width - 200.sp,
child: Text(
'扫码或长按识别下载APP认识更多小众圈子里的人给生活带来更多乐趣',
style: TextStyle(
color: Colors.white,
fontSize: 12.sp)),
)
],
),
),
),
// Image.asset(getBaseImage("ic_launcher"),width: 80.sp,height: 80.sp,)
Stack(
alignment: Alignment.center,
children: [
Container(
color: Colors.white,
width: 90.sp,
height: 90.sp,
),
QrImageView(
data: widget.link,
padding: EdgeInsets.zero,
version: QrVersions.auto,
size: 80.sp,
gapless: false,
// backgroundColor: Colors.black,
)
],
)
],
),
)
],
),
))
),
),
),
Positioned(
bottom: 0,
child: SafeArea(
top: false,
child: Container(
height: 164.sp,
width: Get.width,
color: Color(0xFF292247),
child: Column(
children: [
Expanded(
child: Container(
padding: EdgeInsets.only(
top: 15.sp, left: 15.sp, right: 15.sp),
alignment: Alignment.center,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
shareAction('wx', '微信', () {
shareWxData(1);
}),
shareAction('wxq', '朋友圈', () {
shareWxData(2);
}),
shareAction('qq', 'QQ', () {
copyInviteText(logic.name);
}),
shareAction('wb', '微博', () {
copyInviteText(logic.name);
}),
shareAction('hb', '保存海报', () {
_saveLocalImage();
}),
],
),
)),
Container(
height: 1.sp,
color: Color(0x33FFFFFF),
),
GestureDetector(
onTap: () {
Get.back();
},
child: Container(
height: 67.sp,
alignment: Alignment.center,
child: Text(
'取消',
style: TextStyle(
color: Colors.white, fontSize: 14.sp),
),
),
)
],
),
)))
],
),
),
);
}
Widget _buildAvatar1(MinefragmentLogic logic) {
return ClipOval(
child: GestureDetector(
onTap: () {
if (logic.userInfoBean != null) {
var imgList = <String>[];
imgList.add(logic.userInfoBean!.avatar);
// Get.toNamed(AppRoutes.Swiper,arguments:imgList);
// Get.toNamed(AppRoutes.Swiper, arguments: {
// 'imaglist': imgList,
// 'index': 0
// });
}
},
child: logic.userInfoBean == null
? SizedBox(
width: 63.sp,
height: 63.sp,
)
: CachedNetworkImage(
fit: BoxFit.cover,
placeholder: null,
imageUrl: logic.avatar,
width: 63.sp,
height: 63.sp,
),
),
);
}
Widget _buildNameRow(MinefragmentLogic logic) {
return Container(
margin: EdgeInsets.only(top: 6.sp),
child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
logic.name,
style: TextStyle(
color: const Color.fromRGBO(247, 250, 250, 1.0),
fontSize: 16.sp,
),
),
SizedBox(
width: 4.sp,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: const LinearGradient(
colors: [
Color.fromRGBO(141, 255, 248, 1.0),
Color.fromRGBO(181, 211, 255, 1.0),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
child: Text(
logic.ageMsg,
style: TextStyle(
color: Colors.black,
fontSize: 10.sp,
),
),
),
],
),
);
}
Widget _buildInfoRow(MinefragmentLogic logic) {
return Row(
children: [
Text('邀请您加入',
style: TextStyle(
color: Colors.white,
fontSize: 12.sp,
)),
Text('【微乐园APP】',
style: TextStyle(
color: Color(0xFF0DF5F7),
fontSize: 12.sp,
)),
],
);
}
shareAction(String img, String name, GestureTapCallback onTap) {
return GestureDetector(
onTap: onTap,
child: Container(
child: Column(
children: [
Image.asset(
getMineImage(img),
width: 40.sp,
),
SizedBox(
height: 10.sp,
),
Text(
name,
style: TextStyle(color: Colors.white, fontSize: 12.sp),
)
],
),
),
);
}
_saveLocalImage() async {
RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = await boundary.toImage(pixelRatio: ui.window.devicePixelRatio);
ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) {
final result =
await ImageGallerySaver.saveImage(byteData.buffer.asUint8List());
print(result);
// isSuccess
if (result['isSuccess']) {
showOKToast('保存成功');
} else {
showOKToast('保存失败,请检查相册权限是否开启');
}
}
}
copyInviteText(
String username,
) {
Clipboard.setData(ClipboardData(
text: '${username}】邀请你加入“微乐园”,邀请码为${widget.code},点击进入${widget.link}'));
showOKToast('您已成功复制分享链接,前往对应平台粘贴发送即可~');
}
/**
*
* file=
* url=
* asset=app的资源图片
* scene=123
*/
void shareWxData(int scene) async {
SmartDialog.showLoading(msg:'正在生成分享图片...');
RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = await boundary.toImage(pixelRatio: ui.window.devicePixelRatio);
ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png));
String filePath = '';
if (byteData != null) {
Uint8List pngBytes = byteData!.buffer.asUint8List();
Directory directory = await getApplicationDocumentsDirectory();
filePath = '${directory.path}/widget_image.png';
File imageFile = File(filePath);
imageFile.writeAsBytesSync(pngBytes);
}
SmartDialog.dismiss();
fluwx.WeChatScene wxScene = fluwx.WeChatScene.SESSION;
if (scene == 2) {
wxScene = fluwx.WeChatScene.TIMELINE;
}
fluwx.WeChatShareImageModel? model;
if (filePath.isNotEmpty) {
model = fluwx.WeChatShareImageModel(fluwx.WeChatImage.file(File(filePath)),
title: '', description: '', scene: wxScene);
}
if (model != null) {
fluwx.shareToWeChat(model!);
}
}
}

View File

@ -1,5 +1,3 @@
import 'package:circle_app/app/invite/share.dart';
import 'package:circle_app/app/swiper/view.dart'; import 'package:circle_app/app/swiper/view.dart';
import 'package:circle_app/common/Widgets/rich_text.dart'; import 'package:circle_app/common/Widgets/rich_text.dart';
import 'package:circle_app/components/my_app_bar.dart'; import 'package:circle_app/components/my_app_bar.dart';
@ -16,9 +14,7 @@ class InvitePage extends StatelessWidget {
InvitePage({Key? key}) : super(key: key); InvitePage({Key? key}) : super(key: key);
final logic = Get.find<InviteLogic>(); final logic = Get.find<InviteLogic>();
final state = Get final state = Get.find<InviteLogic>().state;
.find<InviteLogic>()
.state;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -32,386 +28,348 @@ class InvitePage extends StatelessWidget {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: MyAppBar( appBar: MyAppBar(
centerTitle: "邀请得会员", centerTitle: "邀请有奖",
actionWdiget: Container( actionWdiget: Container(
alignment: Alignment.center, alignment: Alignment.center,
height: 22.sp, height: 22.sp,
width: 62.sp, width: 62.sp,
child: Image.asset(getMineImage('invite_right_icon'), decoration: BoxDecoration(
color: Color(0xffD739EA),
borderRadius: BorderRadius.circular(31.sp)),
child: Text(
'邀请攻略',
style: TextStyle(color: Colors.white, fontSize: 11.sp),
), ),
), ),
), ),
body: GetBuilder<InviteLogic>(builder: (logic) { body: SingleChildScrollView(
List<Widget> peopleCountList = []; child: Column(children: [
List<Widget> dayCountList = []; Container(
List<TextSpan> allSpan = []; height: 203.sp,
if (logic.isLoad == false) { margin: EdgeInsets.only(
logic.homeData!.inviteAwardConf!.forEach((element) { left: 20.sp,
peopleCountList.add(peopleCountWidget('${element!.inviteCount! ?? '0'}',(element!.inviteCount! ?? 0) <= logic.homeData!.inviteCount!)); right: 20.sp,
),
if ((element.rewardDay! ?? 0) > 365) { decoration: BoxDecoration(
dayCountList.add(timeWidget('${(element.rewardDay! / 365).toInt()}')); borderRadius: BorderRadius.circular(10.sp),
} else { color: Color(0x1AFFFFFF),
dayCountList.add(timeWidget('${element.rewardDay!}')); ),
} child: Column(
// timeWidget( children: [
// '+30天',
// ),
});
getTextSpanList(
'Tip您已成功邀请 ${logic.homeData!.inviteCount! ?? 0}位同好,免费获得会员${logic.homeData!.achieveRewardDay! ?? '0'}天, 再邀请${logic.homeData!.diffAwardCount}位同友可领取更多奖励~',
Color(0xFFDC5BFD),
12.sp,
searchContent: 'Tip');
allSpan.addAll(getTextSpanList(
'Tip您已成功邀请',
Color(0xFF0DF5F7),
12.sp,
searchContent: 'Tip'));
allSpan.addAll(getTextSpanList(
' ${logic.homeData!.inviteCount! ?? 0} 位同好,',
Color(0xFFDC5BFD),
12.sp,
searchContent: '${logic.homeData!.inviteCount! ?? 0}'));
allSpan.addAll(getTextSpanList(
'免费获得会员 ${logic.homeData!.achieveRewardDay! ?? '0'} 天,',
Color(0xFFDC5BFD),
12.sp,
searchContent: '${logic.homeData!.achieveRewardDay! ?? '0'} '));
allSpan.addAll(getTextSpanList(
' 再邀请 ${logic.homeData!.diffAwardCount} 位同友可领取更多奖励~',
Color(0xFFDC5BFD),
12.sp,
searchContent: '${logic.homeData!.diffAwardCount}'));
}
return logic.isLoad ? loaddingWidget(true) : SingleChildScrollView(
child: Column(children: [
Container( Container(
height: 203.sp, padding: EdgeInsets.only(
margin: EdgeInsets.only( left: 14.sp, right: 14.sp, top: 24.sp),
left: 20.sp, child: Row(
right: 20.sp, mainAxisAlignment: MainAxisAlignment.spaceBetween,
top: 10.sp
),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getCircleImage("pic_bg")),
fit: BoxFit.fill,
),
),
child: Column(
children: [ children: [
Container( Text(
padding: EdgeInsets.only( '我的专属邀请码',
left: 14.sp, right: 14.sp, top: 24.sp), style: TextStyle(
child: Row( color: Colors.white,
mainAxisAlignment: MainAxisAlignment.spaceBetween, fontSize: 16.sp,
children: [ fontWeight: FontWeight.w500),
Text(
'我的专属邀请码',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w500),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
showCodePicker(logic);
},
child: Container(
alignment: Alignment.center,
width: 84.sp,
child: Image.asset(getMineImage('add_code_icon')),
),
)
],
),
),
Container(
margin: EdgeInsets.only(top: 10.sp),
child: Row(
children: [
SizedBox(width: 20.sp,),
Text(
logic.homeData!.inviteCode! ?? '',
style: TextStyle(
fontSize: 30.sp,
fontWeight: FontWeight.w600,
color: Color(0xffF657FF)
),
),
SizedBox(
width: 4.sp,
),
GestureDetector(
onTap: () {
Clipboard.setData(
ClipboardData(text: logic.homeData!.inviteCode! ?? ''));
showOKToast('复制成功');
},
child: Text(
'复制',
style: TextStyle(
color: Color(0xff0DF5F7),
fontSize: 14.sp),
)),
Expanded(child: Container())
],
),
), ),
GestureDetector( GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
shopSharePiker(logic.homeData!.inviteCode! ?? '',(logic.homeData!.link! ?? '') + showCodePicker(logic);
'?code=${logic.homeData!.inviteCode! ?? ''}');
}, },
child: Container( child: Container(
width: 174.sp,
height: 42.sp,
margin: EdgeInsets.only(top: 35.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(21.sp),
gradient: const LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
)),
alignment: Alignment.center, alignment: Alignment.center,
height: 29.sp,
width: 76.sp,
decoration: BoxDecoration(
border: Border.all(
color: Color(0xffD739EA), width: 1.sp),
borderRadius: BorderRadius.circular(14.5.sp)),
child: Text( child: Text(
'立即邀请', '填码对接',
style: TextStyle( style: TextStyle(
color: Color(0xFF000000), color: Color(0xffD739EA), fontSize: 12.sp),
fontSize: 16,
fontWeight: FontWeight.w600),
), ),
), ),
), )
], ],
), ),
), ),
Container( Container(
height: 62.sp, margin: EdgeInsets.only(top: 40.sp),
margin: EdgeInsets.only( child: Row(
left: 20.sp, right: 20.sp, top: 15.sp), children: [
decoration: BoxDecoration( Expanded(child: Container()),
image: DecorationImage( Semantics(
image: AssetImage(getMineImage("invite_sys_bg")), namesRoute: true,
fit: BoxFit.fill, header: true,
), child: ShaderMask(
), shaderCallback: (Rect bounds) {
child: Swiper( return const LinearGradient(
physics: NeverScrollableScrollPhysics(), begin: Alignment(0.0, -1.0),
autoplay: true, end: Alignment.bottomCenter,
// controller: 5, colors: [
index: 0, Color(0xff71F3F2),
itemBuilder: (BuildContext context, int index) { Color(0xffF657FF)
Map data = logic.sysData[index]; ],
return Container( ).createShader(Offset.zero & bounds.size);
child: Row( },
mainAxisAlignment: MainAxisAlignment.center, child: Text(
children: [ 'F2324424',
Text(
data['inviter_name'],
style: TextStyle( style: TextStyle(
color: Color(0xff0DF5F7), fontSize: 30.sp,
fontSize: 14.sp, fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500), color: Colors.white,
shadows: [
Shadow(
color: Color(0xffF657FF),
offset: Offset(0.0, -1))
]),
), ),
Container( )),
margin: EdgeInsets.only( SizedBox(
left: 5.sp, right: 5.sp), width: 4.sp,
child: Text( ),
'邀请', GestureDetector(
style: TextStyle( onTap: () {
color: Colors.white, Clipboard.setData(
fontSize: 14.sp, ClipboardData(text: '复制到剪切板'));
fontWeight: FontWeight.w500), showOKToast('复制成功');
)), },
Text( child: Text(
data['invitee_name'], '复制',
style: TextStyle( style: TextStyle(
color: Color(0xff0DF5F7), color: Color(0xB3FFFFFF), fontSize: 14.sp),
fontSize: 14.sp, )),
fontWeight: FontWeight.w500), Expanded(child: Container())
), ],
Container(
margin: EdgeInsets.only(left: 5.sp),
child: Text(
'加入微乐园',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp,
fontWeight: FontWeight.w500),
)),
],
),
);
},
itemCount: logic.sysData.length,
), ),
), ),
Container( Container(
height: 220.sp, width: 224.sp,
width: Get.width-30.sp, height: 42.sp,
margin: margin: EdgeInsets.only(top: 15.sp),
EdgeInsets.only(top: 15.sp), decoration: BoxDecoration(
padding: EdgeInsets.only(top: 10.sp,bottom: 10.sp,left: 10.sp,right: 10.sp), borderRadius: BorderRadius.circular(21.sp),
decoration: BoxDecoration( gradient: const LinearGradient(
image:DecorationImage( colors: [
image: AssetImage(getMineImage("invite_count_bg")), Color(0xFF06F9FA),
fit: BoxFit.fill, Color(0xFFDC5BFD),
), ],
), )),
child: Column( alignment: Alignment.center,
children: [ child: Text(
Container( '立即邀请',
margin: EdgeInsets.only(top: 15.sp), style: TextStyle(
alignment: Alignment.center, color: Colors.white,
child: Image.asset(getMineImage('invite_title'),height: 22.sp,), fontSize: 16,
), fontWeight: FontWeight.w600),
Container(
margin: EdgeInsets.only(top: 15.sp),
alignment: Alignment.center,
child: Image.asset(getMineImage('invite_line'),height: 1.2.sp,),
),
Container(
height: 70.sp,
margin: EdgeInsets.only(
left: 15.sp, right: 15.sp),
child: Row(
children: [
Text(
'邀请人数',
style: TextStyle(
color: Color(0xFF0DF5F7),
fontSize: 14.sp,
fontWeight: FontWeight.w500),
),
Expanded(
child: Stack(
// fit: StackFit.expand,
alignment: Alignment.center,
children: [
Container(
margin: EdgeInsets.only(
left: 61.sp, right: 46.sp),
height: 2.sp,
color: Color(0xFF0DF5F7),
),
Container(
margin: EdgeInsets.only(
left: 15.sp),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children:peopleCountList,
),
)
],
))
],
)),
Container(
height: 20.sp,
margin: EdgeInsets.only(
left: 15.sp, right: 15.sp),
child: Row(
children: [
Text(
'会员时长',
style: TextStyle(
color: Color(0xFF0DF5F7),
fontSize: 14.sp,
fontWeight: FontWeight.w500),
),
Expanded(
child: Stack(
// fit: StackFit.expand,
alignment: Alignment.center,
children: [
Container(
margin: EdgeInsets.only(
left: 25.sp, right: 15.sp),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: dayCountList
),
)
],
)),
],
)),
Expanded(child: Container()),
Container(
margin: EdgeInsets.only(
left: 15.sp, right: 15.sp,bottom: 15.sp),
child: RichText(
text: TextSpan(
children: allSpan
)))
],
)),
SafeArea(
child: Container(
margin: EdgeInsets.only(top: 15.sp),
alignment: Alignment.center,
child: Image.asset(getMineImage('invite_vip_desc'),width: Get.width-30.sp,),
), ),
), ),
// Container( ],
// height: 203.sp, ),
// margin: ),
// EdgeInsets.only(left: 20.sp, right: 20.sp, top: 20.sp), Container(
// decoration: BoxDecoration( height: 40.sp,
// borderRadius: BorderRadius.circular(10.sp), margin: EdgeInsets.only(left: 20.sp, right: 20.sp, top: 30.sp),
// color: Color(0x1AFFFFFF), decoration: BoxDecoration(
// ), color: Color(0x1AFFFFFF),
// child: Column(children: [ borderRadius: BorderRadius.circular(10.sp)),
// Expanded( child: Swiper(
// child: ListView.builder( physics: NeverScrollableScrollPhysics(),
// itemBuilder: (BuildContext context, int index) { autoplay: true,
// return Container( // controller: 5,
// margin: EdgeInsets.only(top: 10.sp), index: 0,
// padding: EdgeInsets.only(left: 15.sp, right: 15.sp), itemBuilder: (BuildContext context, int index) {
// child: Row( return Container(
// children: [ child: Row(
// ClipOval( mainAxisAlignment: MainAxisAlignment.center,
// child: Image.network( children: [
// 'https://p26-passport.byteacctimg.com/img/user-avatar/b0541a2a377dd239a22eea2934709967~100x100.awebp', Text(
// width: 40.sp, '哟刚说A',
// height: 40.sp, style: TextStyle(
// ), color: Color(0xFFDC5BFD),
// ), fontSize: 14.sp,
// SizedBox( fontWeight: FontWeight.w500),
// width: 4.sp, ),
// ), Container(
// Column( margin: EdgeInsets.only(left: 5.sp, right: 5.sp),
// children: [ child: Text(
// Text( '邀请',
// '2222', style: TextStyle(
// style: TextStyle( color: Colors.white,
// color: Colors.white, fontSize: 14.sp), fontSize: 14.sp,
// ), fontWeight: FontWeight.w500),
// ], )),
// ) Text(
// ], '扥扥',
// ), style: TextStyle(
// ); color: Color(0xFFDC5BFD),
// }, fontSize: 14.sp,
// itemCount: 5, fontWeight: FontWeight.w500),
// )) ),
// ])), Container(
])); margin: EdgeInsets.only(left: 5.sp),
}))); child: Text(
'加入微乐园',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp,
fontWeight: FontWeight.w500),
)),
],
),
);
},
itemCount: 5,
),
),
Container(
height: 203.sp,
margin:
EdgeInsets.only(left: 20.sp, right: 20.sp, top: 20.sp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.sp),
color: Color(0x1AFFFFFF),
),
child: Column(
children: [
Container(
height: 80.sp,
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
child: Row(
children: [
Text(
'邀请人数',
style: TextStyle(
color: Color(0xFFDC5BFD),
fontSize: 14.sp,
fontWeight: FontWeight.w500),
),
Expanded(
child: Stack(
// fit: StackFit.expand,
alignment: Alignment.center,
children: [
Container(
margin: EdgeInsets.only(
left: 61.sp, right: 46.sp),
height: 2.sp,
color: Color(0xFFDC5BFD).withOpacity(0.4),
),
Container(
margin: EdgeInsets.only(left: 15.sp),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
peopleCountWidget('20', true),
peopleCountWidget('50', true),
peopleCountWidget('100', true),
peopleCountWidget('500', true),
],
),
)
],
))
],
)),
Container(
height: 80.sp,
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
child: Row(
children: [
Text(
'会员时长',
style: TextStyle(
color: Color(0xFFDC5BFD),
fontSize: 14.sp,
fontWeight: FontWeight.w500),
),
Expanded(
child: Stack(
// fit: StackFit.expand,
alignment: Alignment.center,
children: [
Container(
margin: EdgeInsets.only(
left: 20.sp, right: 10.sp),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
timeWidget(
'+30天',
),
timeWidget(
'+100天',
),
timeWidget(
'+365天',
),
timeWidget(
'+3年',
),
],
),
)
],
)),
],
)),
Container(
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
child: RichText(
text: TextSpan(
children: getTextSpanList(
'Tip您已成功邀请 19位同好免费获得会员120天 再邀请1位同友可领取更多奖励~',
Color(0xFFDC5BFD),
14.sp,
searchContent: 'Tip'),
)))
],
)),
// Container(
// height: 203.sp,
// margin:
// EdgeInsets.only(left: 20.sp, right: 20.sp, top: 20.sp),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10.sp),
// color: Color(0x1AFFFFFF),
// ),
// child: Column(children: [
// Expanded(
// child: ListView.builder(
// itemBuilder: (BuildContext context, int index) {
// return Container(
// margin: EdgeInsets.only(top: 10.sp),
// padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
// child: Row(
// children: [
// ClipOval(
// child: Image.network(
// 'https://p26-passport.byteacctimg.com/img/user-avatar/b0541a2a377dd239a22eea2934709967~100x100.awebp',
// width: 40.sp,
// height: 40.sp,
// ),
// ),
// SizedBox(
// width: 4.sp,
// ),
// Column(
// children: [
// Text(
// '2222',
// style: TextStyle(
// color: Colors.white, fontSize: 14.sp),
// ),
// ],
// )
// ],
// ),
// );
// },
// itemCount: 5,
// ))
// ])),
]))));
} }
peopleCountWidget(String count, bool isCheck) { peopleCountWidget(String count, bool isCheck) {
@ -420,10 +378,10 @@ class InvitePage extends StatelessWidget {
height: 46.sp, height: 46.sp,
alignment: Alignment.center, alignment: Alignment.center,
decoration: decoration:
BoxDecoration(color: isCheck ? Color(0xFF0DF5F7) : Color(0xFF504261), shape: BoxShape.circle), BoxDecoration(color: Color(0xFFDC5BFD), shape: BoxShape.circle),
child: Text( child: Text(
'$count人', '$count人',
style: TextStyle(color:isCheck ? Color(0xFF000000) : Colors.white, fontSize: 12.sp), style: TextStyle(color: Colors.white, fontSize: 12.sp),
), ),
); );
} }
@ -434,13 +392,6 @@ class InvitePage extends StatelessWidget {
style: TextStyle(color: Colors.white, fontSize: 12.sp), style: TextStyle(color: Colors.white, fontSize: 12.sp),
); );
} }
void shopSharePiker(String code,String link) {
Get.bottomSheet(
Share(code,link), isScrollControlled: true,
enableDrag: false
);
}
} }
void showCodePicker(InviteLogic logic) { void showCodePicker(InviteLogic logic) {
@ -469,7 +420,7 @@ void showCodePicker(InviteLogic logic) {
), ),
), ),
Container( Container(
margin: EdgeInsets.only(left: 20, right: 20.sp, top: 30.sp), margin: EdgeInsets.only(left: 20, right: 20.sp,top: 30.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0x1AFFFFFF), color: Color(0x1AFFFFFF),
borderRadius: BorderRadius.circular(6.sp)), borderRadius: BorderRadius.circular(6.sp)),
@ -483,7 +434,7 @@ void showCodePicker(InviteLogic logic) {
decoration: InputDecoration( decoration: InputDecoration(
hintText: '请输入邀请码', hintText: '请输入邀请码',
hintStyle: hintStyle:
TextStyle(color: Colors.white70, fontSize: 16.sp), TextStyle(color: Colors.white70, fontSize: 16.sp),
border: InputBorder.none, border: InputBorder.none,
counterText: '', counterText: '',
contentPadding: EdgeInsets.only(left: 16.sp)), contentPadding: EdgeInsets.only(left: 16.sp)),
@ -499,8 +450,7 @@ void showCodePicker(InviteLogic logic) {
), ),
Expanded(child: Container()), Expanded(child: Container()),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 40.sp,right: 40.sp,bottom: 20.sp),
left: 40.sp, right: 40.sp, bottom: 20.sp),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -517,20 +467,12 @@ void showCodePicker(InviteLogic logic) {
color: Color(0x1AFFFFFF)), color: Color(0x1AFFFFFF)),
child: const Text( child: const Text(
'放弃对接', '放弃对接',
style: TextStyle( style: TextStyle(color: Colors.white, fontSize: 16),
color: Colors.white, fontSize: 16),
), ),
), ),
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {},
if (logic.codeEditingController.text.isEmpty) {
showOKToast('请输入邀请码');
return;
}
Get.back();
logic.addCode(logic.codeEditingController.text);
},
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
width: 114.sp, width: 114.sp,
@ -546,7 +488,7 @@ void showCodePicker(InviteLogic logic) {
child: const Text( child: const Text(
'确认对接', '确认对接',
style: TextStyle( style: TextStyle(
color: Colors.black, fontSize: 16), color: Colors.white, fontSize: 16),
), ),
), ),
) )

View File

@ -6,10 +6,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'logic.dart'; import 'logic.dart';
const loginBgWidget = Image(
image: AssetImage('assets/images/base/bg.png'),
fit: BoxFit.fill,
);
class LoginPage extends StatelessWidget { class LoginPage extends StatelessWidget {
LoginPage({Key? key}) : super(key: key); LoginPage({Key? key}) : super(key: key);
@ -22,9 +19,13 @@ class LoginPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Stack(
fit: StackFit.expand,
children: [ children: [
loginBgWidget, Image.asset(
getBaseImage('bg'),
fit: BoxFit.fill,
width: Get.width,
height: Get.height,
),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
FocusManager.instance.primaryFocus?.unfocus(); FocusManager.instance.primaryFocus?.unfocus();
@ -60,10 +61,10 @@ class LoginPage extends StatelessWidget {
child: Container( child: Container(
width: 280.sp, width: 280.sp,
height: 60.sp, height: 50.sp,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Colors.white60, // color: Colors.white60,
borderRadius: BorderRadius.circular(30.sp), borderRadius: BorderRadius.circular(25.sp),
border: Border.all(color: Colors.white60,width: 0.5.sp) border: Border.all(color: Colors.white60,width: 0.5.sp)
),)), ),)),
Row( Row(
@ -117,7 +118,7 @@ class LoginPage extends StatelessWidget {
), ),
), ),
Container( Container(
margin: EdgeInsets.only(top: 25.sp), margin: EdgeInsets.only(top: 20.sp),
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
@ -126,10 +127,10 @@ class LoginPage extends StatelessWidget {
child: Container( child: Container(
width: 280.sp, width: 280.sp,
height: 60.sp, height: 50.sp,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Colors.white60, // color: Colors.white60,
borderRadius: BorderRadius.circular(30.sp), borderRadius: BorderRadius.circular(25.sp),
border: Border.all(color: Colors.white60,width: 0.5.sp) border: Border.all(color: Colors.white60,width: 0.5.sp)
),)), ),)),
Row( Row(
@ -204,18 +205,18 @@ class LoginPage extends StatelessWidget {
logic.login(); logic.login();
}, },
child: Container( child: Container(
width: 200.sp, width: 168.sp,
height: 50.sp, height: 42.sp,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25.sp), borderRadius: BorderRadius.circular(21.sp),
gradient: const LinearGradient( gradient: const LinearGradient(
begin: Alignment.centerLeft, begin: Alignment.centerLeft,
end: Alignment.centerRight, end: Alignment.centerRight,
colors: [Color(0xff0AFCFF), Color(0xffD739EA)])), colors: [Color(0xff0AFCFF), Color(0xffD739EA)])),
child: Text( child: Text(
'登录', '登录',
style: TextStyle(color: Colors.white, fontSize: 16.sp,fontWeight: FontWeight.w500), style: TextStyle(color: Colors.white, fontSize: 16.sp),
), ),
), ),
), ),
@ -231,13 +232,13 @@ class LoginPage extends StatelessWidget {
child: Container( child: Container(
child: Row( child: Row(
children: [ children: [
!logic.check ? Container(width: 18.sp,height: 18.sp,decoration: BoxDecoration(border: Border.all(color: Colors.white70,width: 1.sp),borderRadius: BorderRadius.circular(10)),): Icon(Icons.check_circle_rounded,size: 19.sp,color: Color(0xff00FFF4),), !logic.check ? Container(width: 14.sp,height: 14.sp,decoration: BoxDecoration(border: Border.all(color: Colors.white70,width: 1.sp),borderRadius: BorderRadius.circular(10)),): Icon(Icons.check_circle_rounded,size: 15.sp,color: Color(0xff00FFF4),),
SizedBox(width: 4.sp,), SizedBox(width: 4.sp,),
Text( Text(
'同意', '同意',
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 14.sp, fontSize: 11.sp,
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
), ),
SizedBox( SizedBox(
@ -251,7 +252,7 @@ class LoginPage extends StatelessWidget {
'《用户协议》', '《用户协议》',
style: TextStyle( style: TextStyle(
color: Color(0xff00FFF4), color: Color(0xff00FFF4),
fontSize: 14.sp, fontSize: 11.sp,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
), ),
@ -260,7 +261,7 @@ class LoginPage extends StatelessWidget {
'', '',
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 14.sp, fontSize: 11.sp,
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
), ),
SizedBox( SizedBox(
@ -274,7 +275,7 @@ class LoginPage extends StatelessWidget {
'《隐私协议》', '《隐私协议》',
style: TextStyle( style: TextStyle(
color: Color(0xff00FFF4), color: Color(0xff00FFF4),
fontSize: 14.sp, fontSize: 11.sp,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
), ),

View File

@ -2,10 +2,8 @@
import 'dart:io'; import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:circle_app/app/circle/view.dart';
import 'package:circle_app/router/app_routers.dart'; import 'package:circle_app/router/app_routers.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -14,18 +12,11 @@ import '../../util/SharedPreferencesHelper.dart';
import '../../util/util.dart'; import '../../util/util.dart';
import 'logic.dart'; import 'logic.dart';
const vipIcon = 'assets/images/home/icon_vip.png';
const MyImageWidget = const Image(
image: AssetImage(vipIcon),
fit: BoxFit.fill,
);
class MinefragmentPage extends StatelessWidget { class MinefragmentPage extends StatelessWidget {
MinefragmentPage({Key? key}) : super(key: key); MinefragmentPage({Key? key}) : super(key: key);
final logic = Get.lazyPut(() => MinefragmentLogic()); final logic = Get.lazyPut(() => MinefragmentLogic());
final state = Get final state = Get
.find<MinefragmentLogic>() .find<MinefragmentLogic>()
.state; .state;
@ -43,10 +34,13 @@ class MinefragmentPage extends StatelessWidget {
body: Container( body: Container(
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
decoration: const BoxDecoration( decoration: BoxDecoration(
image: bgWidget image: DecorationImage(
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
), ),
child: Padding( child: Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 20.0 + statusBarHeight.sp, top: 20.0 + statusBarHeight.sp,
left: 11.sp, left: 11.sp,
@ -61,14 +55,17 @@ class MinefragmentPage extends StatelessWidget {
showRechargeDialog(logic); showRechargeDialog(logic);
}, },
child: Stack(children: [ child: Stack(children: [
MyImageWidget, Image(
image: AssetImage(getHomeImage("icon_vip")),
fit: BoxFit.fill,
),
Positioned( Positioned(
top: 58.sp, top: 54.sp,
left: 90.sp, left: 71.3.sp,
child: Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 12.sp),)), child: Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 12.sp),)),
Positioned( Positioned(
top: 32.sp, top: 24.sp,
left: 90.sp, left: 71.3.sp,
child: Text("会员-微乐园贵宾",style: TextStyle(color: const Color(0xFFFFFFFF),fontSize: 16.sp),)) child: Text("会员-微乐园贵宾",style: TextStyle(color: const Color(0xFFFFFFFF),fontSize: 16.sp),))
],), ],),
), ),
@ -83,7 +80,7 @@ class MinefragmentPage extends StatelessWidget {
Widget _circleLiveView(MinefragmentLogic logic) { Widget _circleLiveView(MinefragmentLogic logic) {
return Column( return Column(
children: [_circleItemView(logic), _invienItemView(), _helpItemView(),_setUpItemView()], children: [_circleItemView(logic), _helpItemView(), _invienItemView(), _setUpItemView()],
); );
} }
@ -191,7 +188,7 @@ class MinefragmentPage extends StatelessWidget {
Row( Row(
children: [ children: [
Image( Image(
image: AssetImage(getMineImage("invite_icon")), image: AssetImage(getHomeImage("mine_help")),
width: 24.sp, width: 24.sp,
height: 24.sp, height: 24.sp,
), ),
@ -206,7 +203,7 @@ class MinefragmentPage extends StatelessWidget {
Row( Row(
children: [ children: [
const Text( const Text(
"免费领会员", "免费领会员",
style: TextStyle(color: Colors.white60), style: TextStyle(color: Colors.white60),
), ),
Image( Image(

View File

@ -211,16 +211,6 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
.where( .where(
(element) => (element?.groupID != null || element?.userID != null)) (element) => (element?.groupID != null || element?.userID != null))
.toList(); .toList();
// userID
String devtTargetUserID = "qpqz_dev_10_10000000000";
String prodTargetUserID = "qpqz_dev_10_10000000000";
filteredConversationList = filteredConversationList
.where((conversation) =>
conversation?.userID != devtTargetUserID ||conversation?.userID != prodTargetUserID)
.toList();
if (widget.conversationCollector != null) { if (widget.conversationCollector != null) {
filteredConversationList = filteredConversationList filteredConversationList = filteredConversationList
.where(widget.conversationCollector!) .where(widget.conversationCollector!)
@ -465,13 +455,11 @@ class _TIMConversationState extends TIMUIKitState<TIMConversation> {
Map myInfo = jsonDecode(myuserFullInfo! Map myInfo = jsonDecode(myuserFullInfo!
.customInfo!['Label'] .customInfo!['Label']
.toString()); .toString());
if (myInfo != null) { if (myInfo.containsKey('city')) {
if (myInfo.containsKey('city')) { if (myInfo['city']
if (myInfo['city'] .toString()
.toString() .contains(otherInfo['city'].toString())) {
.contains(otherInfo['city'].toString())) { isSameCity = true;
isSameCity = true;
}
} }
} }
} }

View File

@ -68,7 +68,7 @@ class Sys_notify_listPage extends StatelessWidget {
if (data.image != null) { if (data.image != null) {
widgets.add(Image.network( widgets.add(Image.network(
data.image!, data.image!,
width: 0.712 * Get.width, width: 267,
height: 114.sp, height: 114.sp,
fit: BoxFit.fill, fit: BoxFit.fill,
)); ));
@ -171,7 +171,7 @@ class Sys_notify_listPage extends StatelessWidget {
Column( Column(
children: [ children: [
Container( Container(
width: 0.712 * Get.width, width: 267.sp,
margin: EdgeInsets.only(left: 10.sp), margin: EdgeInsets.only(left: 10.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.sp), borderRadius: BorderRadius.circular(10.sp),

View File

@ -1,7 +1,6 @@
import 'dart:math'; import 'dart:math';
import 'package:circle_app/app/circle/logic.dart'; import 'package:circle_app/app/circle/logic.dart';
import 'package:circle_app/app/circle/view.dart';
import 'package:circle_app/common/Widgets/open_vip_tip/view.dart'; import 'package:circle_app/common/Widgets/open_vip_tip/view.dart';
import 'package:circle_app/main.dart'; import 'package:circle_app/main.dart';
import 'package:circle_app/network/api.dart'; import 'package:circle_app/network/api.dart';
@ -64,8 +63,10 @@ class MsgPage extends StatelessWidget {
Container( Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
decoration: const BoxDecoration( decoration: BoxDecoration(
image: bgWidget), image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage(getBaseImage('home_back')))),
), ),
SafeArea( SafeArea(
child: GetBuilder(builder: (MsgLogic controller) { child: GetBuilder(builder: (MsgLogic controller) {
@ -252,20 +253,22 @@ class MsgPage extends StatelessWidget {
width: Get.width, width: Get.width,
child: Row( child: Row(
children: [ children: [
Column( Container(
children: [ child: Column(
Image.asset( children: [
getMsgImage('msg_first'), Image.asset(
width: 50.sp, getMsgImage('msg_first'),
), width: 50.sp,
SizedBox( ),
height: 4.sp, SizedBox(
), height: 4.sp,
Text( ),
'抢占第一', Text(
style: TextStyle(color: Colors.white, fontSize: 12.sp), '抢占第一',
), style: TextStyle(color: Colors.white, fontSize: 12.sp),
], ),
],
),
), ),
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(

View File

@ -23,26 +23,31 @@ class SplashLogic extends GetxController {
void onReady() async { void onReady() async {
// TODO: implement onReady // TODO: implement onReady
super.onReady(); super.onReady();
} }
@override @override
void onInit() async { void onInit() async {
super.onInit(); super.onInit();
// await Future.delayed(Duration(seconds: 30)); // await Future.delayed(Duration(seconds: 30));
if ((await getAuthorization()).isEmpty) { if ((await getAuthorization()).isEmpty) {
if (Platform.isIOS) { if(Platform.isIOS){
pushLoginPage(); pushLoginPage();
return; return;
} }
bool isAgreemement = await getAgreemement(); bool isAgreemement = await getAgreemement();
if (!isAgreemement) { if(!isAgreemement){
showReportDialog(); showReportDialog();
} else { }else{
pushLoginPage(); pushLoginPage();
} }
} else { } else {
var data = var data =
await DioManager.instance.put(url: Api.refreshToken, params: {}); await DioManager.instance.put(url: Api.refreshToken, params: {});
var bean = BaseResponse<LoginData>.fromJson( var bean = BaseResponse<LoginData>.fromJson(
data, (data) => LoginData.fromJson(data)); data, (data) => LoginData.fromJson(data));
if (bean.code == 200) { if (bean.code == 200) {
@ -60,10 +65,7 @@ class SplashLogic extends GetxController {
}); });
return; return;
} else if (bean.code == 5000 || } else if(bean.code == 5000||bean.code == 5001||bean.code == 5002||bean.code == 5003){
bean.code == 5001 ||
bean.code == 5002 ||
bean.code == 5003) {
pushLoginPage(); pushLoginPage();
return; return;
} }
@ -71,7 +73,7 @@ class SplashLogic extends GetxController {
if (bean.code == 500) { if (bean.code == 500) {
await Future.delayed(Duration(seconds: 5)); await Future.delayed(Duration(seconds: 5));
onInit(); onInit();
} else { }else {
pushLoginPage(); pushLoginPage();
} }
@ -79,6 +81,7 @@ class SplashLogic extends GetxController {
} }
} }
void showReportDialog() { void showReportDialog() {
FlutterNativeSplash.remove(); FlutterNativeSplash.remove();
showDialog( showDialog(

View File

@ -1,5 +1,3 @@
import 'dart:async';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@ -17,7 +15,6 @@ import '../../util/SharedPreferencesHelper.dart';
import '../../util/eventBus.dart'; import '../../util/eventBus.dart';
import '../../util/qiniu.dart'; import '../../util/qiniu.dart';
import '../../util/util.dart'; import '../../util/util.dart';
import '../../view/notice.dart';
import '../dialog/BaseDialog.dart'; import '../dialog/BaseDialog.dart';
import 'state.dart'; import 'state.dart';
@ -44,12 +41,6 @@ class UserinfoLogic extends GetxController {
bool isDestroy = false; bool isDestroy = false;
final startTime = DateTime.now(); final startTime = DateTime.now();
SharedPreferences? sharedPreferences; SharedPreferences? sharedPreferences;
@override
void onClose() {
// TODO: implement onClose
timer?.cancel();
super.onClose();
}
@override @override
void onInit() async { void onInit() async {
@ -83,10 +74,6 @@ class UserinfoLogic extends GetxController {
fetchQnToken(Api.getqiniuToken); fetchQnToken(Api.getqiniuToken);
} }
void showBlackDialog(BuildContext context) { void showBlackDialog(BuildContext context) {
showDialog( showDialog(
context: context, context: context,
@ -111,7 +98,6 @@ class UserinfoLogic extends GetxController {
if (bean.isSuccess()) { if (bean.isSuccess()) {
isMe = userId.isEmpty; isMe = userId.isEmpty;
isLike = bean.data.isFollow; isLike = bean.data.isFollow;
isLikeFoMsg = isLikeFoMsg =
"${bean.data.likeMeCount}位圈友感兴趣,其中${bean.data.imageUrgeCount}位已催您更新"; "${bean.data.likeMeCount}位圈友感兴趣,其中${bean.data.imageUrgeCount}位已催您更新";
userInfoBean = bean.data.user; userInfoBean = bean.data.user;
@ -121,9 +107,6 @@ class UserinfoLogic extends GetxController {
if (isMe) { if (isMe) {
isOnline = true; isOnline = true;
} else { } else {
if(!isLike){
startCountdown();
}
isOnline = userInfoBean!.isOnline; isOnline = userInfoBean!.isOnline;
isBlackBeen = bean.data.isBlock; isBlackBeen = bean.data.isBlock;
isDestroy = bean.data.isDestroy; isDestroy = bean.data.isDestroy;
@ -147,27 +130,6 @@ class UserinfoLogic extends GetxController {
update(); update();
} }
int countdown = 5;
Timer? timer = null;
startCountdown(){
timer = Timer.periodic(const Duration(seconds: 1), (t) {
if (countdown > 0) {
countdown--;
} else {
showFloatingButtonOverlay(Get.context!,userInfoBean!.nickname!,ageMsg,userInfoBean!.avatarThumb,0,(){
setLike();
});
timer?.cancel(); //
}
});
}
Future<void> fetchMyAlbum(String url) async { Future<void> fetchMyAlbum(String url) async {
var myAlbumData = await DioManager.instance.get(url: url); var myAlbumData = await DioManager.instance.get(url: url);
var myAlbumBean = BaseResponse<AlbumResponseBean>.fromJson( var myAlbumBean = BaseResponse<AlbumResponseBean>.fromJson(
@ -234,8 +196,6 @@ class UserinfoLogic extends GetxController {
(jsonData) => jsonData, (jsonData) => jsonData,
); );
if (bean.isSuccess()) { if (bean.isSuccess()) {
timer?.cancel();
isLike = !isLike; isLike = !isLike;
update(); update();
} }

View File

@ -4,6 +4,7 @@ import 'package:circle_app/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
import '../../components/my_app_bar.dart'; import '../../components/my_app_bar.dart';
import '../../router/app_routers.dart'; import '../../router/app_routers.dart';
@ -69,30 +70,26 @@ class MyTabbedScreenState extends State<UserinfoPage>
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
child: Stack( child: Scaffold(
children: [ backgroundColor: Colors.transparent,
Scaffold( appBar: MyAppBar(
backgroundColor: Colors.transparent, centerTitle: logic.userInfoBean != null
appBar: MyAppBar( ? "${logic.userInfoBean!.nickname}的主页"
centerTitle: logic.userInfoBean != null : "个人主页",
? "${logic.userInfoBean!.nickname}的主页" ),
: "个人主页", body: Stack(
), children: [
body: Stack(
children: [
Container(
child: buildContent(logic),
),
Positioned(
bottom: 27.sp,
width: Get.width,
child: _meInfoButton(logic),
),
],
),
),
], Container(
child: buildContent(logic),
),
Positioned(
bottom: 27.sp,
width: Get.width,
child: _meInfoButton(logic),
),
],
),
), ),
); );
} }
@ -175,7 +172,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
final chatButton = GestureDetector( final chatButton = GestureDetector(
onTap: () { onTap: () {
if (logic.isBlack || logic.isDestroy || logic.isBlackBeen) { if(logic.isBlack||logic.isDestroy||logic.isBlackBeen){
showOKToast("私聊失败,存在拉黑关系或者该账户已注销"); showOKToast("私聊失败,存在拉黑关系或者该账户已注销");
return; return;
} }
@ -252,7 +249,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
], ],
), ),
), ),
Container( Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 19.sp, horizontal: 19.sp,
), ),
@ -270,9 +267,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
), ),
), ),
SizedBox(width: 8.sp), SizedBox(width: 8.sp),
logic.isBlack || logic.isDestroy || logic.isBlackBeen logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): _buildInfoRow(controller),
? Container()
: _buildInfoRow(controller),
], ],
), ),
Row( Row(
@ -288,17 +283,15 @@ class MyTabbedScreenState extends State<UserinfoPage>
: const Color(0xFF787575), : const Color(0xFF787575),
), ),
), ),
logic.isBlack || logic.isDestroy || logic.isBlackBeen logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): Text(
? Container() controller.onLineCity,
: Text( style: TextStyle(
controller.onLineCity, fontSize: 12.sp,
style: TextStyle( color: logic.isOnline
fontSize: 12.sp, ? const Color(0xFF00FFF4)
color: logic.isOnline : const Color(0xFF787575),
? const Color(0xFF00FFF4) ),
: const Color(0xFF787575), ),
),
),
], ],
), ),
], ],
@ -306,9 +299,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
), ),
SizedBox( SizedBox(
height: 59.sp, height: 59.sp,
child: logic.isBlack || logic.isDestroy || logic.isBlackBeen child: logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): _buildInterestsListView(interests),
? Container()
: _buildInterestsListView(interests),
), ),
titleTab(controller), titleTab(controller),
Expanded( Expanded(
@ -318,12 +309,8 @@ class MyTabbedScreenState extends State<UserinfoPage>
_tabController.animateTo(index); _tabController.animateTo(index);
}, },
children: [ children: [
logic.isBlack || logic.isDestroy || logic.isBlackBeen logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container():_imageAdapter(controller),
? Container() logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): HomeCallOutView(controller.userId),
: _imageAdapter(controller),
logic.isBlack || logic.isDestroy || logic.isBlackBeen
? Container()
: HomeCallOutView(controller.userId),
], ],
), ),
), ),
@ -340,7 +327,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
itemBuilder: (context, index) { itemBuilder: (context, index) {
final interest = interests[index]; final interest = interests[index];
return GestureDetector( return GestureDetector(
onTap: () { onTap: (){
Get.toNamed(AppRoutes.Signal_circle_list, Get.toNamed(AppRoutes.Signal_circle_list,
arguments: interests[index].id); arguments: interests[index].id);
}, },
@ -424,51 +411,49 @@ class MyTabbedScreenState extends State<UserinfoPage>
); );
}, },
), ),
logic.isBlack || logic.isDestroy || logic.isBlackBeen logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): GestureDetector(
? Container() onTap: () {
: GestureDetector( if (controller.isMe) {
onTap: () { controller.isEdit = !controller.isEdit;
if (controller.isMe) { controller.update();
controller.isEdit = !controller.isEdit; } else {
controller.update(); controller.urgeChange();
} else { }
controller.urgeChange(); },
} child: Visibility(
}, visible: logic.isShowAlbum,
child: Visibility( child: Container(
visible: logic.isShowAlbum, decoration: BoxDecoration(
child: Container( borderRadius: BorderRadius.circular(17),
decoration: BoxDecoration( gradient: const LinearGradient(
borderRadius: BorderRadius.circular(17), colors: [
gradient: const LinearGradient( Color(0xFF06F9FA),
colors: [ Color(0xFFDC5BFD),
Color(0xFF06F9FA), ],
Color(0xFFDC5BFD), begin: Alignment.centerLeft,
], end: Alignment.centerRight,
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.symmetric(
vertical: 2.sp,
horizontal: 12.sp,
),
child: Text(
controller.isMe
? controller.isEdit
? "完成"
: "管理"
: controller.isUrgeStatus
? "已催更"
: "催更",
style: const TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
), ),
), ),
padding: EdgeInsets.symmetric(
vertical: 2.sp,
horizontal: 12.sp,
),
child: Text(
controller.isMe
? controller.isEdit
? "完成"
: "管理"
: controller.isUrgeStatus
? "已催更"
: "催更",
style: const TextStyle(
color: Colors.white,
fontSize: 12,
),
),
),
),
),
], ],
), ),
); );
@ -478,7 +463,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
//print(controller.state.imaglist); //print(controller.state.imaglist);
// : // :
return Container( return Container(
padding: EdgeInsets.symmetric(horizontal: 19.sp), padding: EdgeInsets.symmetric(horizontal: 19.sp),
child: Stack( child: Stack(
children: [ children: [
@ -614,8 +599,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
const SizedBox(width: 6), const SizedBox(width: 6),
if (controller.isVip > 0) if (controller.isVip > 0)
Image( Image(
image: AssetImage( image: AssetImage(getBaseImage( controller.isVip == 1 ? "vip" : 'year_vip')),
getBaseImage(controller.isVip == 1 ? "vip" : 'year_vip')),
width: 44.sp, width: 44.sp,
height: 18.sp, height: 18.sp,
), ),

View File

@ -51,15 +51,6 @@ loginIM(String userId, String sig) async {
); );
if (info.code == 0) { if (info.code == 0) {
uploadBuzIDAndToken(); uploadBuzIDAndToken();
V2TimCallback setC2CReceiveMessageOptRes = await TencentImSDKPlugin
.v2TIMManager
.getMessageManager()
.setC2CReceiveMessageOpt(
userIDList: ['qpqz_dev_10_10000000000','qpqz_prod_10_10000000000'], // id列表
opt: ReceiveMsgOptEnum.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE); //
if (setC2CReceiveMessageOptRes.code == 0) {
//
}
} }
} }
@ -76,9 +67,9 @@ void uploadBuzIDAndToken() async {
return; return;
} }
// if (Platform.isAndroid) { if (Platform.isAndroid) {
initWxApi(); initWxApi();
// } }
await ChannelPush.init((msg) {}); await ChannelPush.init((msg) {});
int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo); int? businessID = await TimUiKitPushPlugin.getBuzId(PushConfig.appInfo);
@ -443,7 +434,8 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
Widget build(BuildContext context) { Widget build(BuildContext context) {
//稿,dp //稿,dp
// configureDio(); // configureDio();
return ScreenUtilInit( return
ScreenUtilInit(
designSize: const Size(375, 812), designSize: const Size(375, 812),
minTextAdapt: true, minTextAdapt: true,
splitScreenMode: true, splitScreenMode: true,

View File

@ -246,15 +246,4 @@ class Api {
// //
static const applePayCallBack = 'mall-service/payment/apple/notify'; static const applePayCallBack = 'mall-service/payment/apple/notify';
//
static const inviteMainPage = 'user-service/invite/mainPage';
//
static const inviteSysRecord = 'user-service/invite/record/rand';
//
static const inviteFillIn = 'user-service/invite/fillin';
} }

View File

@ -247,10 +247,6 @@ class DioManager {
// } // }
return responseMap; return responseMap;
} on DioException catch (e) { } on DioException catch (e) {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
return {'code': 500, 'msg': ''};
}
// // DioError是指返回值不为200的情况 // // DioError是指返回值不为200的情况
// logger.shout('DioError报错${e.type}:${e.error.toString()}'); // logger.shout('DioError报错${e.type}:${e.error.toString()}');
// // // //
@ -259,12 +255,8 @@ class DioManager {
// String? errorMsg = isNetworkConnected // String? errorMsg = isNetworkConnected
// ? e.requestOptions.extra["errorMsg"] // ? e.requestOptions.extra["errorMsg"]
// : "网络连接断开,请检查网络设置"; // : "网络连接断开,请检查网络设置";
return {'code': 500, 'msg': '服务器开小差了,请重试'}; return {'code': 500, 'msg': '请求失败'};
} catch (e) { } catch (e) {
SharedPreferencesHelper sp = await SharedPreferencesHelper.getInstance();
if (sp.getString(SharedPreferencesHelper.LOGINPHONE) == '18800000100') {
return {'code': 500, 'msg': ''};
}
// //
return {'code': 500, 'msg': '请求异常'}; return {'code': 500, 'msg': '请求异常'};
} }

View File

@ -1,181 +0,0 @@
import 'dart:async';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
typedef void NoticeCallback();
void showFloatingButtonOverlay(
BuildContext context, String nickname, String ageMsg, String avatar,int event,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 Positioned(
top: 30,
// right: 16,
child: AnimatedContainer(
duration: const Duration(milliseconds: 500),
curve: Curves.easeInOut,
height: showMessage ? 95 : 0,
child: Container(
width: Get.width - 16,
margin: EdgeInsets.all(10.sp),
padding: EdgeInsets.fromLTRB(16.sp, 16.sp, 16.sp, 0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: const Color(0xFF353443),
),
child: SingleChildScrollView(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ClipOval(
child: CachedNetworkImage(
fit: BoxFit.cover,
placeholder: null,
imageUrl: avatar,
width: 48.sp,
height: 48.sp,
),
),
const SizedBox(width: 8),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
width: 50.sp,
child: Text(
nickname,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
color: Color.fromRGBO(247, 250, 250, 1.0),
fontSize: 14,
),
),
),
SizedBox(width: 8.sp),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: const LinearGradient(
colors: [
Color.fromRGBO(141, 255, 248, 1.0),
Color.fromRGBO(181, 211, 255, 1.0),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.only(
top: 2.sp,
bottom: 2.sp,
left: 10.sp,
right: 10.sp,
),
child: Text(
ageMsg,
style: const TextStyle(
color: Colors.black,
fontSize: 10,
),
),
),
],
),
const SizedBox(height: 8),
Text( event == 0
? "看了这么久,给我点个喜欢呗~"
: event == 1
? "我喜欢了你,可以喜欢我一下吗?"
: event == 2
? "你喜欢的人上线啦,赶紧找他聊天吧!"
: "我也喜欢了你,一起聊聊呗~",
style: TextStyle(
color: Colors.grey,
fontSize: 12.sp,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
const Spacer(),
GestureDetector(
onTap: () {
countdownTimer.cancel(); //
overlayEntry.remove();
noticeCallback();
// logic.setLike();
// logic.showMessage = false;
// logic.update();
},
child: Container(
margin: EdgeInsets.only(top: 6.sp),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17),
gradient: const LinearGradient(
colors: [
Color(0xFF06F9FA),
Color(0xFFDC5BFD),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
),
padding: EdgeInsets.symmetric(
horizontal: 16.sp, vertical: 6.sp),
child: Text(
event == 0
? "喜欢"
: event == 1
? "回关"
: event == 2
? "私聊"
: "私聊",
style: TextStyle(
color: Colors.white,
fontSize: 14.sp,
),
),
),
),
// ),
],
),
),
),
),
);
},
);
// setState(() {});
showMessage = true;
countdownTimer = Timer.periodic(Duration(seconds: 1), (timer) {
if (countdownSeconds > 0) {
countdownSeconds--;
// overlayEntry.markNeedsBuild(); // OverlayEntry
} else {
timer.cancel(); //
overlayEntry.remove(); // OverlayEntry
}
});
// OverlayEntry Overlay
overlayState?.insert(overlayEntry);
}

View File

@ -93,21 +93,15 @@ dependencies:
#event_bus: #event_bus:
event_bus: ^2.0.0 event_bus: ^2.0.0
#安装apk #安装apk
flutter_install_app: 1.3.0 # flutter_install_app: 1.3.0
#闪屏页 #闪屏页
flutter_native_splash: 2.2.16 flutter_native_splash: 2.2.16
#腾讯离线推送 #腾讯离线推送
tencent_chat_push_for_china: ^2.6.2+1 tencent_chat_push_for_china: ^2.6.2+1
#苹果内购 #苹果内购
in_app_purchase: ^3.0.8 in_app_purchase: ^3.0.8
#图片保存到相册
image_gallery_saver: ^1.7.1
#二维码生成
qr_flutter: ^4.0.0
#本地目录
path_provider: ^2.1.0
#第三方分享平台 #第三方分享平台
# sharesdk_plugin: 1.3.6 sharesdk_plugin: ^1.3.6
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: