怎么配置访问指定的云环境的里的函数
发布于 4 年前 作者 tdong 13816 次浏览 来自 问答
wx.cloud.callFunction({
      env: 'shop001',
      name: 'getdata',
      data: {
        action: 'getOne',
      },
      success: res => {
        console.warn('[云函数] [openapi] getOne.send 调用成功:', res)
      },
      fail: err => {
        console.error('[云函数] [openapi] templateMessage.send 调用失败:', err)
      }
    })

云函数这样调用不到指定的环境里函数

VM48138:1 [云函数] [openapi] templateMessage.send 调用失败: Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail cloud function service error code -504002, error message Function not found: [getdata]; at cloud.callFunction api;
1 回复

config: {  env: ‘xxx’}

回到顶部