收藏
回答

在button里,wx.openCustomerServiceChat调用没反应?

在button里,wx.openCustomerServiceChat调用没反应?

我想搞的是open-type="getPhoneNumber"的button里调用

即获取了手机号信息之后跳转至客服页面。真机测试试了没反应...

wx.openCustomerServiceChat是只能在没指定open-type的button里调用么?

https://developers.weixin.qq.com/s/uu5NEzmy7mHw

以上为代码片段,点击第二个按钮可以跳转客服,第一个获取电话讯息后再调用就不行

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

2 个回答

  • 大熊
    大熊
    2023-04-19
    1. 在小程序点击功能-客服-接入微信客服,这里添加上才行(你有没有接入)
    2. 点击事件随便写哪里, 都能调用 微信客服; ( 提示: 微信客服不是小程序客服)

    2023-04-19
    有用
    回复 5
    • 。
      2023-04-19
      你说的1我已经添加了。我在普通buttom里调用成功了的。(代码片段里有两种。 就是填了opentype的button不行。。。
      2023-04-19
      回复
    • 大熊
      大熊
      2023-04-19回复
      我看了你的代码,  报错了, 你把fail打印出来openCustomerServiceChat:fail corpId is not bound to current miniprogram
      2023-04-19
      回复
    • 大熊
      大熊
      2023-04-19回复
      这里两个不能混用, open-type=getPhoneNumber
      2023-04-19
      回复
    • 大熊
      大熊
      2023-04-19回复
      openCustomerServiceChat:fail can only be invoked by user TAP gesture
      2023-04-19
      回复
    • kisses
      kisses
      02-02回复大熊
      这个是什么原因呢openCustomerServiceChat:fail corpId is not bound to current miniprogram
      02-02
      回复
  • 睡前原谅一切
    睡前原谅一切
    2023-04-19

    wx.openCustomerServiceChat是只能在没指定open-type的button里调用么?

    ————————————————————————————————————

    是的

    2023-04-19
    有用
    回复
登录 后发表内容