Skip to content

getEventUnionId ​

▸ getEventUnionId(): undefined | string

获取发起云函数请求的用户 unionid

返回值 ​

undefined | string

示例

ts
import {createFaaS, getEventUnionId} from '@ifanrx/faas'

export default createFaaS(() => {
  const unionId = getEventUnionId()

  return 'success'
})

源码 ​

packages/faas/faas-utils.js