feat: 移除crisp客服
This commit is contained in:
parent
facfc15d9e
commit
b65539801d
@ -59,11 +59,6 @@ class HIMenuView extends GetView<HIMenuController> implements HasSwipeConfig {
|
|||||||
MenuItem(
|
MenuItem(
|
||||||
iconName: 'icon-5',
|
iconName: 'icon-5',
|
||||||
title: '在线客服',
|
title: '在线客服',
|
||||||
onTap: () => KRCommonUtil.kr_openCustomerService(),
|
|
||||||
),
|
|
||||||
const MenuItem(
|
|
||||||
iconName: 'icon-5',
|
|
||||||
title: '在线客服2',
|
|
||||||
route: Routes.KR_CHATWOOT,
|
route: Routes.KR_CHATWOOT,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
import 'package:get/get.dart';
|
|
||||||
import '../controllers/kr_crisp_controller.dart';
|
|
||||||
|
|
||||||
/// Crisp 聊天绑定
|
|
||||||
class KRCrispBinding implements Bindings {
|
|
||||||
@override
|
|
||||||
void dependencies() {
|
|
||||||
Get.lazyPut<KRCrispController>(() => KRCrispController());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,136 +0,0 @@
|
|||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:kaer_with_panels/app/common/app_config.dart';
|
|
||||||
import 'package:kaer_with_panels/app/common/app_run_data.dart';
|
|
||||||
import 'package:kaer_with_panels/app/localization/kr_language_utils.dart';
|
|
||||||
import 'dart:io' show Platform;
|
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
import '../../../services/kr_device_info_service.dart';
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
|
|
||||||
// 移动平台使用原生 SDK
|
|
||||||
import 'package:crisp_chat/crisp_chat.dart' as native_crisp;
|
|
||||||
|
|
||||||
/// 🔧 P15 重构: Crisp 聊天控制器
|
|
||||||
/// - 移动平台 (Android/iOS): 使用 crisp_chat 原生 SDK,解决 WebView 黑屏问题
|
|
||||||
/// - 桌面平台 (macOS/Windows): 使用 crisp_sdk WebView 实现
|
|
||||||
class KRCrispController extends GetxController {
|
|
||||||
// ========== 移动平台 (原生 SDK) ==========
|
|
||||||
native_crisp.CrispConfig? _nativeConfig;
|
|
||||||
|
|
||||||
// ========== 共享状态 ==========
|
|
||||||
final RxBool kr_isLoading = true.obs;
|
|
||||||
final RxBool kr_isInitialized = false.obs;
|
|
||||||
|
|
||||||
/// 是否为移动平台
|
|
||||||
bool get _isMobilePlatform => Platform.isAndroid || Platform.isIOS;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onInit() {
|
|
||||||
super.onInit();
|
|
||||||
debugPrint('🐛 [KRCrispController] onInit triggered (Hash: ${hashCode})');
|
|
||||||
if (_isMobilePlatform) {
|
|
||||||
_kr_prepareMobileConfig();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onReady() {
|
|
||||||
super.onReady();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==========================================
|
|
||||||
// 移动平台方法 (Android/iOS - 原生 SDK)
|
|
||||||
// ==========================================
|
|
||||||
|
|
||||||
/// 准备移动平台 Crisp 配置
|
|
||||||
void _kr_prepareMobileConfig() {
|
|
||||||
try {
|
|
||||||
kr_isLoading.value = false; // 原生 SDK 不需要加载状态
|
|
||||||
|
|
||||||
final appData = KRAppRunData();
|
|
||||||
final userEmail = appData.kr_account.value ?? '';
|
|
||||||
final deviceId = KRDeviceInfoService().deviceId ?? 'unknown';
|
|
||||||
final identifier = userEmail.isNotEmpty ? userEmail : deviceId;
|
|
||||||
|
|
||||||
// 创建原生 SDK 配置
|
|
||||||
_nativeConfig = native_crisp.CrispConfig(
|
|
||||||
websiteID: '47fcc1ac-9674-4ab1-9e3c-6b5666f59a38',
|
|
||||||
user: native_crisp.User(
|
|
||||||
email: null,
|
|
||||||
nickName: identifier,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
// 🔧 P15-Optim: 尝试在初始化时就设置 Session,而不是打开时
|
|
||||||
final currentLanguage = KRLanguageUtils.getCurrentLanguageCode();
|
|
||||||
native_crisp.FlutterCrispChat.setSessionString(
|
|
||||||
key: 'platform',
|
|
||||||
value: Platform.isAndroid ? 'android' : 'ios',
|
|
||||||
);
|
|
||||||
native_crisp.FlutterCrispChat.setSessionString(
|
|
||||||
key: 'language',
|
|
||||||
value: currentLanguage,
|
|
||||||
);
|
|
||||||
native_crisp.FlutterCrispChat.setSessionString(
|
|
||||||
key: 'device_id',
|
|
||||||
value: deviceId,
|
|
||||||
);
|
|
||||||
|
|
||||||
kr_isInitialized.value = true;
|
|
||||||
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] Crisp 原生 SDK 配置及Session已预设');
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] 准备 Crisp 配置时出错: $e');
|
|
||||||
}
|
|
||||||
kr_isInitialized.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 打开原生 Crisp 聊天界面 (移动平台)
|
|
||||||
Future<void> kr_openNativeCrispChat() async {
|
|
||||||
if (_nativeConfig == null) {
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] Crisp 配置未准备好');
|
|
||||||
}
|
|
||||||
// 尝试重新准备
|
|
||||||
_kr_prepareMobileConfig();
|
|
||||||
if (_nativeConfig == null) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] 正在打开 Crisp 原生聊天界面...');
|
|
||||||
}
|
|
||||||
|
|
||||||
await native_crisp.FlutterCrispChat.openCrispChat(config: _nativeConfig!);
|
|
||||||
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] Crisp 聊天界面已打开');
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] 打开 Crisp 聊天时出错: $e');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==========================================
|
|
||||||
// 生命周期管理
|
|
||||||
// ==========================================
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onClose() {
|
|
||||||
if (_isMobilePlatform) {
|
|
||||||
// 移动平台:原生 SDK 无需手动清理
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] onClose - 原生 SDK 无需手动清理');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
super.onClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,149 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/foundation.dart' show kDebugMode;
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'dart:io' show Platform;
|
|
||||||
import '../controllers/kr_crisp_controller.dart';
|
|
||||||
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
|
|
||||||
import '../../../widgets/kr_simple_loading.dart';
|
|
||||||
|
|
||||||
/// 🔧 P15 重构: Crisp 客服聊天视图
|
|
||||||
/// - 移动平台 (Android/iOS): 打开原生聊天界面后自动返回
|
|
||||||
/// - 桌面平台 (macOS/Windows/Linux): 直接跳转外部浏览器,不进入此页面
|
|
||||||
class KRCrispView extends GetView<KRCrispController> {
|
|
||||||
const KRCrispView({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
/// 是否为移动平台
|
|
||||||
bool get _isMobilePlatform => Platform.isAndroid || Platform.isIOS;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
||||||
appBar: _kr_buildAppBar(context),
|
|
||||||
body: _kr_buildBody(context),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 构建导航栏
|
|
||||||
PreferredSizeWidget _kr_buildAppBar(BuildContext context) {
|
|
||||||
return AppBar(
|
|
||||||
backgroundColor: Theme.of(context).cardColor,
|
|
||||||
elevation: 0,
|
|
||||||
title: Text(
|
|
||||||
AppTranslations.kr_userInfo.customerService,
|
|
||||||
style: KrAppTextStyle(
|
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
leading: IconButton(
|
|
||||||
icon: Icon(
|
|
||||||
Icons.arrow_back_ios,
|
|
||||||
size: 20.sp,
|
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
|
||||||
),
|
|
||||||
onPressed: () => Get.back(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 构建主体内容
|
|
||||||
Widget _kr_buildBody(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
color: Theme.of(context).scaffoldBackgroundColor,
|
|
||||||
child: Obx(() {
|
|
||||||
if (!controller.kr_isInitialized.value) {
|
|
||||||
return _kr_buildErrorView(context);
|
|
||||||
}
|
|
||||||
// 显示加载中界面,同时原生聊天界面在后台启动
|
|
||||||
return _kr_buildLoadingView(context, '正在加载客服');
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 打开原生 Crisp 聊天界面 (移动平台)
|
|
||||||
void _kr_openNativeCrispChat(BuildContext context) async {
|
|
||||||
if (!controller.kr_isInitialized.value) {
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] Crisp 未初始化,无法打开聊天');
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] 正在打开原生 Crisp 聊天界面...');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开原生聊天界面
|
|
||||||
await controller.kr_openNativeCrispChat();
|
|
||||||
} catch (e) {
|
|
||||||
if (kDebugMode) {
|
|
||||||
print('[P15-Mobile] 打开 Crisp 聊天时出错: $e');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 构建加载视图
|
|
||||||
Widget _kr_buildLoadingView(BuildContext context, String message) {
|
|
||||||
return Center(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
KRSimpleLoading(
|
|
||||||
color: Colors.blue,
|
|
||||||
size: 50.0,
|
|
||||||
),
|
|
||||||
if (message.isNotEmpty) SizedBox(height: 16.sp),
|
|
||||||
if (message.isNotEmpty)
|
|
||||||
Text(
|
|
||||||
message,
|
|
||||||
style: KrAppTextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 构建错误视图
|
|
||||||
Widget _kr_buildErrorView(BuildContext context) {
|
|
||||||
return Center(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.error_outline,
|
|
||||||
size: 64.sp,
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
SizedBox(height: 16.sp),
|
|
||||||
Text(
|
|
||||||
'crisp.initFailed'.tr,
|
|
||||||
style: KrAppTextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 24.sp),
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: () {
|
|
||||||
if (_isMobilePlatform) {
|
|
||||||
_kr_openNativeCrispChat(context);
|
|
||||||
} else {
|
|
||||||
Get.back(); // 桌面端不应进入此页面,直接返回
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Text('common.retry'.tr),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -12,8 +12,6 @@ import 'package:kaer_with_panels/app/modules/hi_anti_lost/views/hi_anti_lost_vie
|
|||||||
|
|
||||||
import '../modules/kr_chatwoot/bindings/kr_chatwoot_binding.dart';
|
import '../modules/kr_chatwoot/bindings/kr_chatwoot_binding.dart';
|
||||||
import '../modules/kr_chatwoot/views/kr_chatwoot_view.dart';
|
import '../modules/kr_chatwoot/views/kr_chatwoot_view.dart';
|
||||||
import '../modules/kr_crisp_chat/bindings/kr_crisp_binding.dart';
|
|
||||||
import '../modules/kr_crisp_chat/views/kr_crisp_view.dart';
|
|
||||||
import '../modules/kr_delete_account/bindings/kr_delete_account_binding.dart';
|
import '../modules/kr_delete_account/bindings/kr_delete_account_binding.dart';
|
||||||
import '../modules/kr_delete_account/views/kr_delete_account_view.dart';
|
import '../modules/kr_delete_account/views/kr_delete_account_view.dart';
|
||||||
import '../modules/kr_home/bindings/kr_home_binding.dart';
|
import '../modules/kr_home/bindings/kr_home_binding.dart';
|
||||||
@ -109,12 +107,6 @@ class AppPages {
|
|||||||
binding: KROrderStatusBinding(),
|
binding: KROrderStatusBinding(),
|
||||||
popGesture: false,
|
popGesture: false,
|
||||||
),
|
),
|
||||||
GetPage(
|
|
||||||
name: _Paths.KR_CRISP,
|
|
||||||
page: () => SwipeWrapper.detect(() => const KRCrispView()),
|
|
||||||
binding: KRCrispBinding(),
|
|
||||||
popGesture: false,
|
|
||||||
),
|
|
||||||
GetPage(
|
GetPage(
|
||||||
name: _Paths.HI_NODE_LIST,
|
name: _Paths.HI_NODE_LIST,
|
||||||
page: () => SwipeWrapper.detect(() => const HINodePageView()),
|
page: () => SwipeWrapper.detect(() => const HINodePageView()),
|
||||||
|
|||||||
@ -18,7 +18,6 @@ abstract class Routes {
|
|||||||
static const KR_MESSAGE = _Paths.KR_MESSAGE;
|
static const KR_MESSAGE = _Paths.KR_MESSAGE;
|
||||||
static const KR_DELETE_ACCOUNT = _Paths.KR_DELETE_ACCOUNT;
|
static const KR_DELETE_ACCOUNT = _Paths.KR_DELETE_ACCOUNT;
|
||||||
static const KR_ORDER_STATUS = '/kr-order-status';
|
static const KR_ORDER_STATUS = '/kr-order-status';
|
||||||
static const KR_CRISP = _Paths.KR_CRISP;
|
|
||||||
static const KR_DEVICE_MANAGEMENT = _Paths.KR_DEVICE_MANAGEMENT;
|
static const KR_DEVICE_MANAGEMENT = _Paths.KR_DEVICE_MANAGEMENT;
|
||||||
static const HI_MENU = _Paths.HI_MENU;
|
static const HI_MENU = _Paths.HI_MENU;
|
||||||
static const HI_NODE_LIST = _Paths.HI_NODE_LIST;
|
static const HI_NODE_LIST = _Paths.HI_NODE_LIST;
|
||||||
@ -44,7 +43,6 @@ abstract class _Paths {
|
|||||||
static const KR_PURCHASE_MEMBERSHIP = '/kr-purchase-membership';
|
static const KR_PURCHASE_MEMBERSHIP = '/kr-purchase-membership';
|
||||||
static const KR_MESSAGE = '/kr-message';
|
static const KR_MESSAGE = '/kr-message';
|
||||||
static const KR_DELETE_ACCOUNT = '/kr-delete-account';
|
static const KR_DELETE_ACCOUNT = '/kr-delete-account';
|
||||||
static const KR_CRISP = '/kr-crisp';
|
|
||||||
static const KR_DEVICE_MANAGEMENT = '/kr-device-management';
|
static const KR_DEVICE_MANAGEMENT = '/kr-device-management';
|
||||||
static const HI_MENU = '/hi_menu';
|
static const HI_MENU = '/hi_menu';
|
||||||
static const HI_NODE_LIST = '/hi_node_list';
|
static const HI_NODE_LIST = '/hi_node_list';
|
||||||
|
|||||||
@ -1,12 +1,8 @@
|
|||||||
import 'dart:io';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
|
||||||
import '../widgets/kr_toast.dart';
|
import '../widgets/kr_toast.dart';
|
||||||
import '../common/app_config.dart';
|
|
||||||
import '../routes/app_pages.dart';
|
import '../routes/app_pages.dart';
|
||||||
import '../widgets/dialogs/hi_dialog.dart';
|
import '../widgets/dialogs/hi_dialog.dart';
|
||||||
import '../modules/kr_crisp_chat/controllers/kr_crisp_controller.dart';
|
|
||||||
|
|
||||||
class KRCommonUtil {
|
class KRCommonUtil {
|
||||||
/// 是否正在打开客服(防重复点击)
|
/// 是否正在打开客服(防重复点击)
|
||||||
@ -14,13 +10,7 @@ class KRCommonUtil {
|
|||||||
|
|
||||||
/// 预热客服(提前初始化控制器)
|
/// 预热客服(提前初始化控制器)
|
||||||
static void kr_warmUpCustomerService() {
|
static void kr_warmUpCustomerService() {
|
||||||
// 桌面端全部使用外部浏览器打开,无需预热
|
// 统一使用内置 Chatwoot 页面,无需预热原生 SDK
|
||||||
if (Platform.isAndroid || Platform.isIOS) {
|
|
||||||
if (!Get.isRegistered<KRCrispController>()) {
|
|
||||||
Get.put(KRCrispController(), permanent: true);
|
|
||||||
debugPrint('客服系统预热中(持久模式)...');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 打开客服
|
/// 打开客服
|
||||||
@ -30,73 +20,18 @@ class KRCommonUtil {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final websiteId = '47fcc1ac-9674-4ab1-9e3c-6b5666f59a38'; // AppConfig.getInstance().kr_website_id;
|
_kr_isOpeningCustomerService = true;
|
||||||
if (websiteId.isEmpty) {
|
try {
|
||||||
HIDialog.show(
|
|
||||||
title: '提示',
|
|
||||||
message: '加载失败',
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 🔧 桌面端(Windows/macOS/Linux)直接跳转外部浏览器
|
|
||||||
if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
|
|
||||||
_kr_isOpeningCustomerService = true;
|
|
||||||
|
|
||||||
// 显示加载提示
|
|
||||||
kr_showToast('userInfo.openingCustomerService'.tr);
|
kr_showToast('userInfo.openingCustomerService'.tr);
|
||||||
|
await Get.toNamed(Routes.KR_CHATWOOT);
|
||||||
// 直接使用 zh
|
} catch (e) {
|
||||||
final Uri url = Uri.parse(
|
debugPrint('打开客服失败: $e');
|
||||||
'https://go.crisp.chat/chat/embed/?website_id=$websiteId&locale=zh',
|
HIDialog.show(title: '提示', message: '加载失败');
|
||||||
);
|
} finally {
|
||||||
|
Future.delayed(const Duration(seconds: 2), () {
|
||||||
try {
|
_kr_isOpeningCustomerService = false;
|
||||||
if (await canLaunchUrl(url)) {
|
});
|
||||||
await launchUrl(url, mode: LaunchMode.externalApplication);
|
|
||||||
} else {
|
|
||||||
kr_showToast("common.cannotOpenBrowser".tr);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
kr_showToast("common.openLinkFailed".tr);
|
|
||||||
} finally {
|
|
||||||
// 延迟重置状态
|
|
||||||
Future.delayed(const Duration(seconds: 2), () {
|
|
||||||
_kr_isOpeningCustomerService = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 移动平台 (Android/iOS):直接调用原生 SDK,避免页面跳转闪烁
|
|
||||||
if (Platform.isAndroid || Platform.isIOS) {
|
|
||||||
_kr_isOpeningCustomerService = true;
|
|
||||||
|
|
||||||
// 预先显示加载提示(可选,原生 SDK 启动很快)
|
|
||||||
// kr_showToast('userInfo.openingCustomerService'.tr);
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 优先使用已注册的控制器
|
|
||||||
KRCrispController crispController;
|
|
||||||
if (Get.isRegistered<KRCrispController>()) {
|
|
||||||
crispController = Get.find<KRCrispController>();
|
|
||||||
} else {
|
|
||||||
crispController = Get.put(KRCrispController(), permanent: true);
|
|
||||||
}
|
|
||||||
// 直接调用原生打开方法
|
|
||||||
await crispController.kr_openNativeCrispChat();
|
|
||||||
} catch (e) {
|
|
||||||
debugPrint('打开原生客服失败: $e');
|
|
||||||
// 如果原生失败,可以考虑降级到内置页面或报错
|
|
||||||
Get.toNamed(Routes.KR_CRISP);
|
|
||||||
} finally {
|
|
||||||
Future.delayed(const Duration(seconds: 2), () {
|
|
||||||
_kr_isOpeningCustomerService = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 提示 meesage: 提示内容, toastPosition: 提示显示的位置, timeout: 显示时间(毫秒)
|
/// 提示 meesage: 提示内容, toastPosition: 提示显示的位置, timeout: 显示时间(毫秒)
|
||||||
|
|||||||
@ -241,14 +241,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.2.0"
|
version: "3.2.0"
|
||||||
crisp_chat:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: crisp_chat
|
|
||||||
sha256: "938a6b771e9aa83ef57c043ac7e06be6b434dcf5f6a74c0e35a0d4f5a6d31be8"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.4.1"
|
|
||||||
cross_file:
|
cross_file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -73,7 +73,6 @@ dependencies:
|
|||||||
window_manager: ^0.4.3
|
window_manager: ^0.4.3
|
||||||
url_launcher: ^6.3.1
|
url_launcher: ^6.3.1
|
||||||
flutter_inappwebview: ^6.1.5 # 最新稳定版本
|
flutter_inappwebview: ^6.1.5 # 最新稳定版本
|
||||||
crisp_chat: 2.4.1 # 🔧 P15: 移动平台使用原生 SDK,解决 WebView 黑屏问题
|
|
||||||
protocol_handler_windows: ^0.2.0
|
protocol_handler_windows: ^0.2.0
|
||||||
share_plus: ^7.2.2
|
share_plus: ^7.2.2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user