收藏
回答

APP拉起微信客服功能,有flutter的相关插件吗?

APP拉起微信客服功能,有flutter的相关插件吗?还是需要业务方自己去封装插件呢?

https://developers.weixin.qq.com/doc/oplatform/Mobile_App/APP_launch_wechat_customer_service.html

回答关注问题邀请回答
收藏

1 个回答

  • hello world
    hello world
    2024-04-24

    微信官方没有,这是第三方封装好的:https://github.com/OpenFlutter/fluwx

    2024-04-24
    有用 1
    回复 2
    • 杨保疆
      杨保疆
      2024-04-25
      使用这个插件可以唤起“微信客服功能”?我现在在Flutter项目中直接使用launchUrl()也能唤起来,但都是先打开的一个浏览器,然后从浏览器里面打开的微信客服,这个体验太糟糕了
      2024-04-25
      回复
    • ZYQ
      ZYQ
      2024-12-30回复杨保疆
      这样就可以了
      static Future<bool> openCustomerServiceChat() async {
          Fluwx fluwx = Fluwx();
          final registerApi = await fluwx.registerApi(
            appId: Config.wxAppId,
            universalLink: Config.universalLink,
          );
          bool haveWx = await fluwx.isWeChatInstalled;
          if (!haveWx) {
            $toast.showToast(title: "您未安装微信");
            return false;
          }
          if (!registerApi) {
            return false;
          }
          return await fluwx.open(
            target: CustomerServiceChat(
              corpId: Config.wxCustomerCorpId,
              url: Config.wxCustomerUrl,
            ),
          );
        }
      2024-12-30
      回复
登录 后发表内容