更新记录

2.1.6(2021-12-24) 下载此版本

增加私信管理自动回复 修改websocket的链接的问题

1.1.6(2021-12-16) 下载此版本

有提醒组件时 在跳转页面时需要 发送事件关闭提醒组件的websocket 且监听关闭后在进行跳转 详见看示例项目

1.1.5(2021-11-18) 下载此版本

修改按钮兼容

查看更多

平台兼容性

uni-app

Vue2 Vue3 Chrome Safari app-vue app-nvue Android iOS 鸿蒙
√ - - - √ - - - -
微信小程序 支付宝小程序 抖音小程序 百度小程序 快手小程序 京东小程序 鸿蒙元服务 QQ小程序 飞书小程序 小红书小程序 快应用-华为 快应用-联盟
- - - - - - - - - - - -

lyfz-kf

集成插件

  1. 在pages.json文件中写入插件路径
        <!-- 聊天页面必须要 -->
        {
            "path":"uni_modules/lyfz-kf/pages/conversation/conversation",
            "style":{
                "bounce":"none" // ios禁用上下回弹
            }
        }
        <!-- 自动回复页面 -->
        {
            "path":"uni_modules/lyfz-kf/pages/manage/manage",
            "style":{
                "bounce":"none"
            }
        },
        <!-- 快捷回复页面 -->
        {
            "path":"uni_modules/lyfz-kf/pages/quickReply/quickReply",
            "style":{
                "bounce":"none"
            }
        },
        <!-- 对话设置 -->
        {
            "path":"uni_modules/lyfz-kf/pages/autoReply/autoReply",
            "style":{
                "bounce":"none"
            }
        },
        {
            "path":"uni_modules/lyfz-kf/pages/autoReplyList/autoReplyList",
            "style":{
                "bounce":"none"
            }
        },
        {
            "path":"uni_modules/lyfz-kf/pages/autoReplyItemDetail/autoReplyItemDetail",
            "style":{
                "bounce":"none"
            }
        },
        <!-- 自动追粉 -->
        {
            "path":"uni_modules/lyfz-kf/pages/autoChase/autoChase",
            "style":{
                "bounce":"none"
            }
        },
        {
            "path":"uni_modules/lyfz-kf/pages/autoChaseDetail/autoChaseDetail",
            "style":{
                "bounce":"none"
            }
        },
        {
            "path":"uni_modules/lyfz-kf/pages/autoChaseList/autoChaseList",
            "style":{
                "bounce":"none"
            }
        },
        <!-- 异常回复 -->
        {
            "path":"uni_modules/lyfz-kf/pages/noHitReply/noHitReply",
            "style":{
                "bounce":"none"
            }
        },
        <!-- 客资回复设置 -->
        {
            "path":"uni_modules/lyfz-kf/pages/gainClient/gainClient",
            "style":{
                "bounce":"none"
            }
        }
  1. 需要在main.js入口文件混入需要的js文件
    import Mixin from 'uni_modules/lyfz-kf/polyfill/mixins';
    Vue.mixin(Mixin);
    app.mixin(Mixin); // 新版HBX创建的项目 有条件判断 两个都需要混入

    使用方式

  2. 在需要 智能客服 新消息提醒的页面引入注册组件
    // 路径根据文件位置
    import remind from 'uni_modules/lyfz-kf/components/lyfz-kf/remind/remind'
    components: {
        remind
    },
    参数说明 参数 类型 必填 默认值 描述
    appId stirng 是 应用ID
    user stirng 是 需要新消息提醒的用户ID
    bottom number 是 距离页面底部数值
    float stirng 是 浮动位置 left/right
    env stirng 是 环境标识 test/production
    newMessage callback 否 新消息事件通知

跳转方式

'../../uni_modules/lyfz-kf/pages/conversation/conversation?appId=b734197937ed5f36&conversationId=1YIpn9Za2No2xq6UV3NnSzz4TYLnG93Q&fromUser=lyfz_01AAa0R001q50M827LQ92F5cB34vxaqB3&toUser=lyfz_006PwxftF8hF5Y3QnDumwgq2IcQUak9p1&fromUserPortrait=https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83epmBmNzSU9po3MMFUHpTZfK7PiaiaDCtDzMsvfw3HvV97zcOOibMZ9pmYMbdhrsiaZ4vkYC6o59ThGRzQ/132&fromUserNickname=海边丿&toUserPortrait=https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIfia86X9IcWxb3qQlVNvGkzKM0FC2DqzsttblY9hR1VQdpyXn6iacUbtTFW8XNf6s4GR4OVXknvIOg/132&toUserNickname=小事儿&env=test'

参数说明

参数 类型 必填 默认值 描述 备注
appId stirng 是 应用ID 无
conversationId stirng 是 会话ID 无
fromUser string 是 会话消息发送人user标识ID 无
toUser stirng 是 会话消息接收人user标识ID 无
fromUserPortrait stirng 是 会话消息发送人头像 无
toUserPortrait string 是 会话消息接收人头像 无
fromUserNickname string 是 会话消息发送人昵称 无
toUserNickname string 是 会话消息接收人昵称 无
env string 是 环境标识 test测试环境 production生产环境 无
withItem bool 否 带项目信息 true false 以下字段为true时必填 无
itemTitle string 否 项目标题 无
itemCover string 否 项目封面 需使用encodeURIComponent()函数编码
itemPrice string 否 项目价格,可不带价格 无
itemUrl string 否 项目详情页跳转路由(完整路由,例:/pages/index/index) 需使用encodeURIComponent()函数编码
itemType number 否 0 跳转类型 无
miniAppId string 否 小程序appId 不为空时,将以跳转新小程序打开路由,否则默认跳转使用方小程序路由 无

服务端消息推送

  1. RocketMQ 事件推送

相关参数

consumerGroup:GID_IM_SERVER_CALLBACK_MSG
topic:TOPIC_IM_SERVER_CALLBACK_MSG
tag:${接收方应用appId值}
  1. HTTPS 推送
  • 请求方式 POST
  • 推送示例
    {
    "code": 1000,
    "msg": "success",
    "data": [
        {
            "appId": "应用ID",
            "shopId": "",
            "companyId": "",
            "messageId": "消息ID",
            "fromUser": "发送方ID",
            "toUser": "接收方ID",
            "conversationId": "会话ID",
            "messageType": "消息类型",
            "messageData": {},
        }
    ]
    }
  • 消息类型以及对应数据实体
  1. 文本(1)
    {
    "content":"内容"
    }
  2. 图片(2)
    {
    "fileUrl":"图片文件",
    "cover":"缩略图"
    }
  3. 视频(3)
    {
    "fileUrl":"视频文件",
    "cover":"封面"
    }
  4. 语音(4)
    {
    "fileUrl":"语音文件",
    "duration":"时长"
    }
  5. 位置(5)
    {
    "lat":"纬度",
    "lng":"经度",
    "road":"地址",
    "landmark":"地址",
    }

隐私、权限声明

1. 本插件需要申请的系统权限列表:

定位 语音 相册

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

插件不采集任何数据

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

无

许可协议

MIT协议

暂无用户评论。