代码提交

This commit is contained in:
CYH 2025-07-14 14:09:36 +08:00
parent 01856e42ce
commit aacd7a0db3
11 changed files with 126 additions and 148 deletions

View File

@ -71,8 +71,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode 117
versionName "2.6.7"
versionCode 121
versionName "2.7.1"
manifestPlaceholders = [
vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

View File

@ -400,7 +400,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
@ -551,7 +551,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
@ -596,7 +596,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.example.kyApp;
PRODUCT_BUNDLE_IDENTIFIER = com.zncdts.app123;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;

View File

@ -73,8 +73,7 @@ class Call_outLogic extends GetxController {
super.onInit();
loadPushInterestData();
var data =
await DioManager.instance.get(url: Api.getConfig, params: {});
var data = await DioManager.instance.get(url: Api.getConfig, params: {});
var bean = BaseResponse<ConfigBean>.fromJson(
data, (data) => ConfigBean.fromJson(data));
if (bean.isSuccess()) {
@ -93,14 +92,12 @@ class Call_outLogic extends GetxController {
url: "/up-service/interest/${numbers.first.id}",
);
if (result['code'] == 200) {
isLocal = result['data']['isLocal'];
localNumberList.addAll(myConfigData);
}
if(numbers.length>0 && !isLocal) {
if (numbers.length > 0 && !isLocal) {
circleName = numbers[0].name;
}
update();
@ -125,19 +122,16 @@ class Call_outLogic extends GetxController {
//
// update();
// }
}
HomeLogic logic = Get.find<HomeLogic>();
if ((logic.model!.vip ?? 0) == 2) {
isCheck = true;
vip = logic.model!.vip;
}
update();
loadQiniuToken();
StreamSubscription subscription =
@ -147,8 +141,7 @@ class Call_outLogic extends GetxController {
}
loadPushInterestData() async {
var result =
await DioManager.instance.get(url: Api.getPushInterest);
var result = await DioManager.instance.get(url: Api.getPushInterest);
if (result['code'] == 200) {
interests = List<Interest>.from(
result['data'].map((x) => Interest.fromJson(x)),
@ -169,7 +162,7 @@ class Call_outLogic extends GetxController {
Get.bottomSheet(
Scaffold(
backgroundColor: Colors.transparent,
body: Open_vip_tipPage(true,'super_callout'),
body: Open_vip_tipPage(true, 'super_callout'),
),
isScrollControlled: true,
enableDrag: false);
@ -216,7 +209,8 @@ class Call_outLogic extends GetxController {
List atList = [];
if (selectedList.isNotEmpty) {
selectedList.forEach((element) {
atList.add({'userId': element.id.toString(), 'nickName': element.nickname});
atList.add(
{'userId': element.id.toString(), 'nickName': element.nickname});
});
}
@ -228,10 +222,12 @@ class Call_outLogic extends GetxController {
'interest_id': numbers[0].id,
'use_queen': isCheck ? 1 : 0,
'localInterestId': isLocal ? localNumberList.first.id : '',
'at':atList.isNotEmpty ? json.encode(atList) : ''
'at': atList.isNotEmpty ? json.encode(atList) : ''
};
var data = await DioManager.instance.post(url:Get.arguments is String ? Api.worldPush : Api.SendShout, params: params);
var data = await DioManager.instance.post(
url: Get.arguments is String ? Api.worldPush : Api.SendShout,
params: params);
SmartDialog.dismiss();
var beandata = BaseResponse<dynamic>.fromJson(
data,
@ -259,7 +255,7 @@ class Call_outLogic extends GetxController {
showRechargeScreenDialog('call_out');
} else if (beandata.code == 30503) {
List words = beandata.data;
upFilterWordsData(textEditingController.text,words,3);
upFilterWordsData(textEditingController.text, words, 3);
showOKToast(beandata.msg);
var callOutBean = BaseResponse<List<String>>.fromJson(
data,
@ -289,17 +285,23 @@ class Call_outLogic extends GetxController {
// // widget.bean.is_limit = false;
// });
UnlockCallDialog().showUnlockBottomSheet(numbers[0].id,callOutBean.data.amount.toString(),callOutBean.data.oldAmount.toString(),iositem: callOutBean.data.ios_item);
UnlockCallDialog().showUnlockBottomSheet(
numbers[0].id,
callOutBean.data.amount.toString(),
callOutBean.data.oldAmount.toString(),
iositem: callOutBean.data.ios_item);
// tipWdiget()
} else if (beandata.code == 4005) {
Get.bottomSheet(BanDialog(time:data['data'],),isScrollControlled:true);
Get.bottomSheet(
BanDialog(
time: data['data'],
),
isScrollControlled: true);
} else {
showOKToast(beandata.msg);
}
}
startSelectCircleActivity() async {
var data = await Get.toNamed(Routes.SelectCirclePage, arguments: {
"interestMap": configBean.calloutInterests,
@ -326,7 +328,9 @@ class Call_outLogic extends GetxController {
showOKToast("最多上传6张图片哦~");
return;
}
final XFile? pickedFile = await _picker.pickImage(source: ImageSource.gallery,);
final XFile? pickedFile = await _picker.pickImage(
source: ImageSource.gallery,
);
if (null == pickedFile) {
return;
}
@ -411,9 +415,8 @@ class Call_outLogic extends GetxController {
}
});
uploadQiniuVideo(
File(pickedFile.path), pickedFile.name, ImgPath.CALL_OUT_VIDEO, quToken,
(result) {
uploadQiniuVideo(File(pickedFile.path), pickedFile.name,
ImgPath.CALL_OUT_VIDEO, quToken, (result) {
SmartDialog.dismiss();
state.videolist.add(result);
update();
@ -423,9 +426,7 @@ class Call_outLogic extends GetxController {
showOKToast("请上传5-30秒的视频当前视频长度为:$durationInSeconds" "");
}
} catch (e) {}
}
}
class MyBean {

View File

@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:connectivity/connectivity.dart';
import 'package:flutter_bugly/flutter_bugly.dart';
import 'package:http/http.dart' as http;
import 'package:circle_app/circle_app/minefragment/logic.dart';
@ -39,6 +40,9 @@ class LoginLogic extends GetxController {
bool showOthner = false;
String isAuto = '';
StreamSubscription? sub;
bool isChange = false;
@override
void onReady() {
@ -79,8 +83,14 @@ class LoginLogic extends GetxController {
}
isAuto = sharedPreferences!.getString(SharedPreferencesHelper.firstLogin) ?? '';
if (isAuto.isEmpty && phoneEditingController.text.isEmpty) {
sub = Connectivity().onConnectivityChanged.listen((event) {
if (event != ConnectivityResult.none) {
if (isChange) return;
isChange = true;
isInitSuccess(isAuto:true);
sharedPreferences.setString(SharedPreferencesHelper.firstLogin, '1');
}
});
} else {
isInitSuccess(isAuto:false);
loginType = 1;
@ -178,7 +188,7 @@ class LoginLogic extends GetxController {
/// sdk
void isInitSuccess({bool isAuto = false}) async {
// 55aaa02cbbfe4e0fa6be83e2b4df2d26
// 24c0af46d1324ef78455e8b6c3a90281
// 24c0af46d1324ef78455e8b6c3a90281 zncdts.app123
var result =
await quickLoginPlugin.init("55aaa02cbbfe4e0fa6be83e2b4df2d26", 4);
@ -243,7 +253,8 @@ class LoginLogic extends GetxController {
message: '${map?['code']}- ${ydToken}',
detail: 'login',
);
if (map?['code'] == -1) {
// "resultCode" -> 401
if (map?['code'] == -1 || map?['resultCode'] == 401) {
isInitSuccess();
showOKToast('当前使用用户过多,请重试');
} else {
@ -364,6 +375,7 @@ class LoginLogic extends GetxController {
@override
void dispose() {
super.dispose();
sub?.cancel();
t?.cancel();
}

View File

@ -395,10 +395,9 @@ class LoginPage extends StatelessWidget {
Container(
width: 280.sp,
child: Row(
mainAxisAlignment: !logic.showOthner
? MainAxisAlignment.spaceBetween
: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (logic.showOthner)
GestureDetector(
onTap: () {
if (!logic.check) {
@ -442,10 +441,6 @@ class LoginPage extends StatelessWidget {
Get.bottomSheet(privacyDialog(),
isScrollControlled: true);
} else {
if (logic.loginType == 1) {
showOKToast('请先切换验证码登录');
return;
}
logic.login();
}
},
@ -464,35 +459,7 @@ class LoginPage extends StatelessWidget {
Color(0xffD739EA)
])),
child: Text(
'验证码登录',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w500),
),
),
),
if (!logic.showOthner)
GestureDetector(
onTap: () {
logic.preLogin();
},
child: Container(
width: 85.sp,
height: 40.sp,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(25.sp),
gradient: const LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xff0AFCFF),
Color(0xffD739EA)
])),
child: Text(
'一键登录',
'注册/登录',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
@ -500,15 +467,58 @@ class LoginPage extends StatelessWidget {
),
),
),
// if (!logic.showOthner)
// GestureDetector(
// onTap: () {
// logic.preLogin();
// },
// child: Container(
// width: 85.sp,
// height: 40.sp,
// alignment: Alignment.center,
// decoration: BoxDecoration(
// borderRadius:
// BorderRadius.circular(25.sp),
// gradient: const LinearGradient(
// begin: Alignment.centerLeft,
// end: Alignment.centerRight,
// colors: [
// Color(0xff0AFCFF),
// Color(0xffD739EA)
// ])),
// child: Text(
// '一键登录',
// style: TextStyle(
// color: Colors.white,
// fontSize: 16.sp,
// fontWeight: FontWeight.w500),
// ),
// ),
// ),
],
),
),
if (!logic.showOthner)
Container(
margin: EdgeInsets.only(top: 15.sp),
child: Text(
'若验证码未收到请打开数据网络使用[一键登录]',
child: Row(
children: [
Text(
'若验证码未收到请打开数据网络使用',
style: TextStyle(
color: Colors.white, fontSize: 14.sp),
color: Colors.white, fontSize: 16.sp),
),
InkWell(
onTap: () {
logic.preLogin();
},
child: Text(
'[一键登录]',
style: TextStyle(
color: AppColor.mainColor, fontSize: 16.sp),
),
),
],
),
)
],

View File

@ -5,7 +5,6 @@ import 'package:carousel_slider/carousel_slider.dart';
import 'package:circle_app/commons/colors/app_color.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bugly/flutter_bugly.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_slidable_for_tencent_im/flutter_slidable.dart';
import 'package:get/get.dart';

View File

@ -45,14 +45,14 @@ class SplashLogic extends GetxController {
checkStatus() async {
if ((await getAuthorization()).isEmpty) {
if (Platform.isIOS) {
pushLoginPage();
Get.offAllNamed(Routes.Login);
return;
}
bool isAgreemement = await getAgreemement();
if (!isAgreemement) {
showReportDialog();
} else {
pushLoginPage();
Get.offAllNamed(Routes.Login);
initUmengSDK();
}
} else {
@ -115,7 +115,7 @@ class SplashLogic extends GetxController {
bean.code == 5001 ||
bean.code == 5002 ||
bean.code == 5003) {
pushLoginPage();
Get.offAllNamed(Routes.Login);
return;
}
showOKToast(bean.msg.toString());
@ -125,7 +125,7 @@ class SplashLogic extends GetxController {
if (token.isNotEmpty) {
Get.offNamed(Routes.Home);
} else {
pushLoginPage();
Get.offAllNamed(Routes.Login);
}
}

View File

@ -413,7 +413,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
style: TextStyle(color: Colors.white, fontSize: 14.sp),
),
Text(
"TA设置了解锁价格,解锁小票全归TA",
"TA设置了价格,解锁就能免费加TA",
style: TextStyle(
color: const Color(0xFFEFD84E), fontSize: 10.0.sp),
),

View File

@ -49,7 +49,7 @@ final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
OverlayEntry? mainOverlayEntry;
void main() {
void main() async {
if (!kDebugMode) {
FlutterError.onError = (FlutterErrorDetails details) {
// Bugly
@ -64,7 +64,7 @@ void main() {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
systemNavigationBarColor: Colors.black, //
));
FlutterBugly.postCatchedException(() async {
// FlutterBugly.postCatchedException(() async {
// ensureInitialized
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
@ -85,7 +85,7 @@ void main() {
iOSAppId: "51e7b4e472",
);
}
});
// });
}
setCustomErrorWidget() {
@ -278,42 +278,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
}
}
getLoginStyle() async {
if ((await getAuthorization()).isEmpty) {
pushLoginPage();
FlutterNativeSplash.remove();
} else {
var data =
await DioManager.instance.put(url: Api.refreshToken, params: {});
var bean = BaseResponse<LoginData>.fromJson(
data, (data) => LoginData.fromJson(data));
if (bean.code == 200) {
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
sharedPreferences.setString(SharedPreferencesHelper.AUTHORIZATION,
bean.data!.Authorization.toString());
});
FlutterNativeSplash.remove();
Get.offNamed(Routes.Home);
return;
} else if (bean.code == 30002) {
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
sharedPreferences.setString(SharedPreferencesHelper.AUTHORIZATION,
bean.data!.Authorization.toString());
});
Get.offNamed(Routes.Complete_materialPage);
FlutterNativeSplash.remove();
return;
}
showOKToast(bean.msg.toString());
if (bean.code == 500) {
await Future.delayed(const Duration(seconds: 5));
getLoginStyle();
return;
}
}
}
initIM() {
coreInstance.init(
sdkAppID: IM_SDK_APP_ID,

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:
@ -638,14 +638,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

@ -113,9 +113,9 @@ dependencies:
#边框渐变
gradient_borders: ^1.0.0
#系统设置 安卓4.3.1 苹果4.0.4
app_settings: 4.3.1
app_settings: 4.0.4
#安装apk
flutter_install_app: 1.3.0
# flutter_install_app: 1.3.0
#通知权限
notification_permissions: ^0.6.1
#分帧