const cloud = require('@alipay/faas-server-sdk');
cloud.init();

exports.main = async (event, context) => {
  const res = await cloud.openapi.alipayOpenAppQrcodeCreate.request({
    bizContent: {
      url_param: 'page/component/component-pages/view/view',
      query_param: 'x=1',
      describe: '二维码描述',
      color: '0x00BFFF',
      size: 's',
    },
  });
  console.log('云调用结果:', res);
  return res;
};