customer_service.dart 682 B

12345678910111213141516171819
  1. /// 七陌客服 H5 接入
  2. ///
  3. /// 已从原生 SDK 迁移为 H5 WebView 方案,修复 iOS Debug 模式下的 crash 问题
  4. class CustomerService {
  5. /// H5 模式下始终可用(不再区分真机/模拟器,两端都支持 WebView)
  6. static Future<bool> isDeviceAvailable() async {
  7. return true;
  8. }
  9. /// startChat 逻辑已移至 lib/providers/customer_service_provider.dart
  10. /// 现在通过 WebView 方式展示客服对话框
  11. @Deprecated('使用 openCustomerService(context, ref) 替代')
  12. static Future<void> startChat({
  13. required String userName,
  14. required String userId,
  15. }) async {
  16. // 此方法已弃用,客服功能通过 WebView 实现
  17. }
  18. }