diff --git a/assets/images/Frame 8.svg b/assets/images/Frame 8.svg
deleted file mode 100755
index 6935d79..0000000
--- a/assets/images/Frame 8.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/Frame_8.svg b/assets/images/Frame_8.svg
deleted file mode 100755
index 6935d79..0000000
--- a/assets/images/Frame_8.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/connect_norouz.PNG b/assets/images/connect_norouz.PNG
deleted file mode 100755
index 280edc5..0000000
Binary files a/assets/images/connect_norouz.PNG and /dev/null differ
diff --git a/assets/images/delete_account.png b/assets/images/delete_account.png
deleted file mode 100755
index 47fe965..0000000
Binary files a/assets/images/delete_account.png and /dev/null differ
diff --git a/assets/images/disconnect_norouz.PNG b/assets/images/disconnect_norouz.PNG
deleted file mode 100755
index 05bcb56..0000000
Binary files a/assets/images/disconnect_norouz.PNG and /dev/null differ
diff --git a/assets/images/home_ct.svg b/assets/images/home_ct.svg
deleted file mode 100755
index 76e260d..0000000
--- a/assets/images/home_ct.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/home_list_location.svg b/assets/images/home_list_location.svg
deleted file mode 100755
index bbf9706..0000000
--- a/assets/images/home_list_location.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/home_msg.png b/assets/images/home_msg.png
deleted file mode 100755
index 8519261..0000000
Binary files a/assets/images/home_msg.png and /dev/null differ
diff --git a/assets/images/home_server.svg b/assets/images/home_server.svg
deleted file mode 100755
index f324dbd..0000000
--- a/assets/images/home_server.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/invite_top_bg.png b/assets/images/invite_top_bg.png
deleted file mode 100755
index 7760514..0000000
Binary files a/assets/images/invite_top_bg.png and /dev/null differ
diff --git a/assets/images/language_switch.svg b/assets/images/language_switch.svg
deleted file mode 100755
index 100e9c4..0000000
--- a/assets/images/language_switch.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/location.svg b/assets/images/location.svg
deleted file mode 100755
index 23a3507..0000000
--- a/assets/images/location.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/assets/images/login_account.svg b/assets/images/login_account.svg
deleted file mode 100755
index 94d8865..0000000
--- a/assets/images/login_account.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/assets/images/login_close.svg b/assets/images/login_close.svg
deleted file mode 100755
index 7041c2f..0000000
--- a/assets/images/login_close.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/assets/images/login_code.svg b/assets/images/login_code.svg
deleted file mode 100755
index 7231181..0000000
--- a/assets/images/login_code.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/assets/images/login_psd.svg b/assets/images/login_psd.svg
deleted file mode 100755
index a13860c..0000000
--- a/assets/images/login_psd.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/assets/images/logo.svg b/assets/images/logo.svg
deleted file mode 100755
index 3771822..0000000
--- a/assets/images/logo.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/assets/images/my_ads.svg b/assets/images/my_ads.svg
deleted file mode 100755
index b8348eb..0000000
--- a/assets/images/my_ads.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_buy_tp.svg b/assets/images/my_buy_tp.svg
deleted file mode 100755
index 5584044..0000000
--- a/assets/images/my_buy_tp.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_cn_us.svg b/assets/images/my_cn_us.svg
deleted file mode 100755
index 35eaf95..0000000
--- a/assets/images/my_cn_us.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_dns.svg b/assets/images/my_dns.svg
deleted file mode 100755
index 6e5ab66..0000000
--- a/assets/images/my_dns.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_email.svg b/assets/images/my_email.svg
deleted file mode 100755
index 242b7c7..0000000
--- a/assets/images/my_email.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_et.svg b/assets/images/my_et.svg
deleted file mode 100755
index 0fbfe08..0000000
--- a/assets/images/my_et.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_jinggao.svg b/assets/images/my_jinggao.svg
deleted file mode 100755
index aab0952..0000000
--- a/assets/images/my_jinggao.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_kf.svg b/assets/images/my_kf.svg
deleted file mode 100755
index d6c9cd2..0000000
--- a/assets/images/my_kf.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_kf_msg.svg b/assets/images/my_kf_msg.svg
deleted file mode 100755
index ad1b815..0000000
--- a/assets/images/my_kf_msg.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_net_index.svg b/assets/images/my_net_index.svg
deleted file mode 100755
index 6935d79..0000000
--- a/assets/images/my_net_index.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_phone.svg b/assets/images/my_phone.svg
deleted file mode 100755
index 2fbc548..0000000
--- a/assets/images/my_phone.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_set.svg b/assets/images/my_set.svg
deleted file mode 100755
index c24f3c3..0000000
--- a/assets/images/my_set.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/my_telegram.svg b/assets/images/my_telegram.svg
deleted file mode 100755
index 569f12e..0000000
--- a/assets/images/my_telegram.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
\ No newline at end of file
diff --git a/assets/images/payment_success.svg b/assets/images/payment_success.svg
deleted file mode 100755
index 8f75329..0000000
--- a/assets/images/payment_success.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/splash_illustration.svg b/assets/images/splash_illustration.svg
deleted file mode 100755
index 84847ca..0000000
--- a/assets/images/splash_illustration.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/images/tab_home_n.svg b/assets/images/tab_home_n.svg
deleted file mode 100755
index 99081e8..0000000
--- a/assets/images/tab_home_n.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/assets/images/tab_home_s.svg b/assets/images/tab_home_s.svg
deleted file mode 100755
index bd5dbca..0000000
--- a/assets/images/tab_home_s.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/assets/images/tab_invite_n.svg b/assets/images/tab_invite_n.svg
deleted file mode 100755
index be3e986..0000000
--- a/assets/images/tab_invite_n.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/assets/images/tab_invite_s.svg b/assets/images/tab_invite_s.svg
deleted file mode 100755
index c51aab7..0000000
--- a/assets/images/tab_invite_s.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/assets/images/tab_my_n.svg b/assets/images/tab_my_n.svg
deleted file mode 100755
index 3ae0326..0000000
--- a/assets/images/tab_my_n.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/assets/images/tab_my_s.svg b/assets/images/tab_my_s.svg
deleted file mode 100755
index 0f98b01..0000000
--- a/assets/images/tab_my_s.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/assets/images/tab_statistics_n.svg b/assets/images/tab_statistics_n.svg
deleted file mode 100755
index 2e63c45..0000000
--- a/assets/images/tab_statistics_n.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
diff --git a/assets/images/tab_statistics_s.svg b/assets/images/tab_statistics_s.svg
deleted file mode 100755
index 7b5a94d..0000000
--- a/assets/images/tab_statistics_s.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/devtools_options.yaml b/devtools_options.yaml
index fa0b357..f592d85 100755
--- a/devtools_options.yaml
+++ b/devtools_options.yaml
@@ -1,3 +1,4 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:
+ - drift: true
\ No newline at end of file
diff --git a/lib/app/common/app_config.dart b/lib/app/common/app_config.dart
index 385cab1..3c91f6a 100755
--- a/lib/app/common/app_config.dart
+++ b/lib/app/common/app_config.dart
@@ -3,6 +3,7 @@ import '../services/api_service/kr_api.user.dart';
import '../utils/kr_update_util.dart';
import '../utils/kr_secure_storage.dart';
import '../utils/kr_log_util.dart';
+import '../utils/kr_http_adapter_util.dart';
import '../services/singbox_imp/kr_sing_box_imp.dart';
import '../utils/kr_init_log_collector.dart'; // 🔧 新增:导入日志收集器
import 'dart:async';
@@ -31,7 +32,7 @@ class KRDomain {
// static String kr_currentDomain = "apicn.bearvpn.top";
static List kr_baseDomains = ["api.hifast.biz", "api.airovpn.tel",];
- static String kr_currentDomain = "api.hifast.biz1";
+ static String kr_currentDomain = "api.hifast.biz";
// 备用域名获取地址列表
static List kr_backupDomainUrls = [
@@ -67,21 +68,14 @@ class KRDomain {
// Dio 实例及初始化
static final Dio _dio = (() {
- final dio = Dio();
- // 🔧 配置HttpClientAdapter使用sing-box的mixed代理
- dio.httpClientAdapter = IOHttpClientAdapter(
- createHttpClient: () {
- final client = HttpClient();
- client.findProxy = (url) {
- final proxyConfig = KRSingBoxImp.instance.kr_buildProxyRule();
- KRLogUtil.kr_i(
- '🔍 KRDomain 请求使用代理: $proxyConfig, url: $url',
- tag: 'KRDomain',
- );
- return proxyConfig;
- };
- return client;
- },
+ final dio = Dio(BaseOptions(
+ connectTimeout: const Duration(seconds: kr_domainTimeout),
+ sendTimeout: const Duration(seconds: kr_domainTimeout),
+ receiveTimeout: const Duration(seconds: kr_domainTimeout),
+ ));
+ // 🔧 使用统一的 Adapter 转换工具
+ dio.httpClientAdapter = KRHttpAdapterUtil.createAdapter(
+ timeout: const Duration(seconds: kr_domainTimeout),
);
return dio;
})();
diff --git a/lib/app/common/app_run_data.dart b/lib/app/common/app_run_data.dart
index ebc7297..9d60ea6 100755
--- a/lib/app/common/app_run_data.dart
+++ b/lib/app/common/app_run_data.dart
@@ -44,6 +44,9 @@ class KRAppRunData {
/// 用户邀请码(从用户信息接口获取)
final RxString kr_referCode = ''.obs;
+ /// 邀请人ID(谁邀请了当前用户)
+ final RxInt kr_refererId = 0.obs;
+
/// 用户余额
final RxInt kr_balance = 0.obs;
@@ -597,12 +600,14 @@ class KRAppRunData {
// 保存到全局状态
kr_referCode.value = userInfo.referCode;
+ kr_refererId.value = userInfo.refererId;
kr_account.value = authType == 'device' ? '9000${userInfo.id}' : authIdentifier;
kr_balance.value = userInfo.balance;
kr_commission.value = userInfo.commission;
KRLogUtil.kr_i('💾 [AppRunData] 用户信息已保存到全局状态:', tag: 'AppRunData');
KRLogUtil.kr_i(' - kr_referCode: "${kr_referCode.value}"', tag: 'AppRunData');
+ KRLogUtil.kr_i(' - kr_refererId: ${kr_refererId.value}', tag: 'AppRunData');
KRLogUtil.kr_i(' - kr_balance: ${kr_balance.value}', tag: 'AppRunData');
KRLogUtil.kr_i(' - kr_commission: ${kr_commission.value}', tag: 'AppRunData');
},
diff --git a/lib/app/modules/kr_country_selector/bindings/kr_country_selector_binding.dart b/lib/app/modules/kr_country_selector/bindings/kr_country_selector_binding.dart
deleted file mode 100755
index 8716802..0000000
--- a/lib/app/modules/kr_country_selector/bindings/kr_country_selector_binding.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-import 'package:get/get.dart';
-
-import '../controllers/kr_country_selector_controller.dart';
-
-class KRCountrySelectorBinding extends Bindings {
- @override
- void dependencies() {
- Get.lazyPut(
- () => KRCountrySelectorController(),
- );
- }
-}
\ No newline at end of file
diff --git a/lib/app/modules/kr_country_selector/controllers/kr_country_selector_controller.dart b/lib/app/modules/kr_country_selector/controllers/kr_country_selector_controller.dart
deleted file mode 100755
index 4c602f2..0000000
--- a/lib/app/modules/kr_country_selector/controllers/kr_country_selector_controller.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-import 'package:get/get.dart';
-import 'package:kaer_with_panels/app/common/app_config.dart';
-import 'package:kaer_with_panels/app/utils/kr_country_util.dart';
-
-import '../../../services/singbox_imp/kr_sing_box_imp.dart';
-
-class KRCountrySelectorController extends GetxController {
- // 使用 KRCountry 枚举来加载国家
- final RxList kr_countries = [].obs;
- // 当前选中的国家
- final Rx kr_selectedCountry = KRCountry.cn.obs;
-
- @override
- void onInit() {
- super.onInit();
- kr_selectedCountry.value = KRCountryUtil.kr_currentCountry.value;
- kr_loadCountries();
- }
-
- // 加载国家数据
- void kr_loadCountries() {
- kr_countries.value = KRCountryUtil.kr_getSupportedCountries();
-
- }
-
- // 选择国家
- Future kr_selectCountry(KRCountry country) async {
- kr_selectedCountry.value = country;
- // try {
- // await KRSingBoxImp().kr_updateCountry(country);
- // // Get.back();
- // } catch (err) {
-
- // }
- }
-
- @override
- void onClose() {
- // TODO: implement onClose
- super.onClose();
- KRSingBoxImp().kr_updateCountry(kr_selectedCountry.value);
- }
-}
\ No newline at end of file
diff --git a/lib/app/modules/kr_country_selector/views/kr_country_selector_view.dart b/lib/app/modules/kr_country_selector/views/kr_country_selector_view.dart
deleted file mode 100755
index 6295e70..0000000
--- a/lib/app/modules/kr_country_selector/views/kr_country_selector_view.dart
+++ /dev/null
@@ -1,116 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:kaer_with_panels/app/localization/app_translations.dart';
-
-import 'package:kaer_with_panels/app/utils/kr_country_util.dart';
-import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
-import 'package:kaer_with_panels/app/widgets/kr_country_flag.dart';
-import '../controllers/kr_country_selector_controller.dart';
-
-class KRCountrySelectorView extends GetView {
- const KRCountrySelectorView({super.key});
-
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- extendBodyBehindAppBar: true,
- backgroundColor: Theme.of(context).primaryColor,
- body: Container(
- decoration: BoxDecoration(
- gradient: LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [
- Color.fromRGBO(23, 151, 255, 0.15), // 渐变开始颜色
- Color.fromRGBO(23, 151, 255, 0.05), // 中间过渡颜色
- // 非渐变色区域
- ],
- stops: [0.0, 0.28], // 调整渐变结束位置
- ),
- ),
- child: Column(
- children: [
- AppBar(
- backgroundColor: Colors.transparent,
- elevation: 0,
- leading: IconButton(
- icon: Icon(
- Icons.arrow_back_ios,
- size: 20.r,
- color: Theme.of(context).textTheme.bodyMedium?.color,
- ),
- onPressed: () => Get.back(),
- ),
- title: Text(
- AppTranslations.kr_setting.countrySelector,
- style: KrAppTextStyle(
- color: Theme.of(context).textTheme.bodyMedium?.color,
- fontSize: 16,
- fontWeight: FontWeight.w500,
- ),
- ),
- centerTitle: true,
- ),
- Expanded(
- child: Obx(
- () => ListView.separated(
- padding: EdgeInsets.all(16.r),
- itemCount: controller.kr_countries.length,
- separatorBuilder: (context, index) => SizedBox(height: 12.h),
- itemBuilder: (context, index) {
- final country = controller.kr_countries[index];
- return _kr_buildCountryCard(country, context);
- },
- ),
- ),
- ),
- ],
- ),
- ),
- );
- }
-
- // 构建国家卡片
- Widget _kr_buildCountryCard(KRCountry country, BuildContext context) {
- return Obx(
- () => InkWell(
- onTap: () => controller.kr_selectCountry(country),
- child: Container(
- padding: EdgeInsets.all(16.r),
- decoration: BoxDecoration(
- color: Theme.of(context).cardColor,
- borderRadius: BorderRadius.circular(12.r),
- ),
- child: Row(
- children: [
- // 国家图标
- KRCountryFlag(
- countryCode: country.kr_code,
- width: 24.r,
- height: 24.r,
- ),
- SizedBox(width: 12.w),
- // 国家名称
- Text(
- KRCountryUtil.kr_getCountryName(country),
- style: KrAppTextStyle(
- fontSize: 14,
- color: Theme.of(context).textTheme.bodyMedium?.color,
- ),
- ),
- const Spacer(),
- // 选中标记
- if (controller.kr_selectedCountry.value == country)
- Icon(
- Icons.check_circle,
- color: Colors.blue,
- size: 20.r,
- ),
- ],
- ),
- ),
- ),
- );
- }
-}
diff --git a/lib/app/modules/kr_device_management/bindings/kr_device_management_binding.dart b/lib/app/modules/kr_device_management/bindings/kr_device_management_binding.dart
deleted file mode 100644
index 28d0aa7..0000000
--- a/lib/app/modules/kr_device_management/bindings/kr_device_management_binding.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-import 'package:get/get.dart';
-
-import '../controllers/kr_device_management_controller.dart';
-
-class KRDeviceManagementBinding extends Bindings {
- @override
- void dependencies() {
- Get.lazyPut(
- () => KRDeviceManagementController(),
- );
- }
-}
diff --git a/lib/app/modules/kr_device_management/controllers/kr_device_management_controller.dart b/lib/app/modules/kr_device_management/controllers/kr_device_management_controller.dart
deleted file mode 100644
index 89c0499..0000000
--- a/lib/app/modules/kr_device_management/controllers/kr_device_management_controller.dart
+++ /dev/null
@@ -1,294 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:get/get.dart';
-import 'package:kaer_with_panels/app/utils/kr_log_util.dart';
-import 'package:kaer_with_panels/app/services/api_service/kr_api.user.dart';
-import 'package:kaer_with_panels/app/widgets/dialogs/kr_dialog.dart';
-import 'package:kaer_with_panels/app/common/app_run_data.dart';
-import 'package:kaer_with_panels/app/services/api_service/kr_auth_api.dart';
-import 'package:kaer_with_panels/app/services/kr_site_config_service.dart';
-import 'package:kaer_with_panels/app/services/kr_device_info_service.dart';
-import 'package:kaer_with_panels/app/services/kr_subscribe_service.dart';
-import 'package:kaer_with_panels/app/model/enum/kr_request_type.dart';
-import 'package:kaer_with_panels/app/localization/app_translations.dart';
-import 'dart:io';
-import 'dart:math';
-
-class KRDeviceManagementController extends GetxController {
- // 设备列表
- final RxList