formID 41028错误
发布于 6 年前 作者 jqian 2767 次浏览 来自 问答

代码片段:

formSubmit: e => {
    //console.log(e.detail.formID)
    wx.request({
      url: "https://api.weixin.qq.com/cgi-bin/token?xxxxxxxx",
      success: jieguo => {
        console.log(jieguo.data.access_token)
        wx.login({
          success: res => {
            wx.request({
              url: "https://api.weixin.qq.com/sns/jscode2session?yyyyyyy&js_code=" + res.code + "&grant_type=authorization_code",
              success: info => {
                console.log(info.data.openid)
                wx.request({
                  url: "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=" + jieguo.data.access_token,
                  data: {
                    touser: info.data.openid,
                    template_id: "EYJ2_crt1IU9FSuJhxZhhkDrh6EVoX7hhhgAdDrFAjE",
                    page: "pages/guanliyuan/guanliyuan",
                    form_id: e.detail.formID,
                    data: {

然后返回

  1. data:{errcode41028errmsg"invalid form id hint: [EI5GVa00173934]"}

  2. errMsg:"request:ok"

1 回复

有些多此一举啊,为什么不在后端发送呢?还方便以后换模版什么的

回到顶部