Files
fluwx/doc/Customer_Service.md
nick e558d330e0 增加APP拉起客服微信对应文档 (#713)
增加APP拉起客服微信对应文档,及示例代码
2025-06-26 20:19:54 +08:00

671 B

Open Customer Service

 static Fluwx _fluwx = Fluwx();
  static Future<void> openCustomerServiceChat() async {
    bool isInstall = await _fluwx.isWeChatInstalled;
    if (!isInstall) {
      if (Platform.isIOS) {
        jumpToAppStore();
      } else {
        EasyLoading.showToast("UnInstall");
      }
      return;
    }
    CustomerServiceChat chat = CustomerServiceChat(
        corpId: "wwdxxxxxx", 
        url: "https://work.weixin.qq.com/kfid/kfcxxxxxx");
    _fluwx.open(target: chat);
  }
jumpToAppStore() async {
  final uri = Uri.parse('https://apps.apple.com/app/id414478124');
  if (await canLaunchUrl(uri)) {
    await launchUrl(uri);
  }
}