1***@qq.com
1***@qq.com
  • 发布:2025-03-28 03:54
  • 更新:2025-03-28 04:20
  • 阅读:89

云函数调用地址问题

分类:uniCloud

问题描述:很简单的读取数据库列表,出现问题前没有进行过云函数的调整,页面调用云函数也就是下面代码的最简单调用方式,但是提示“获取列表失败, Error: request:fail abort statusCode:-1 Failed to connect to api.next.bspapp.com/127.0.0.1:443”
我使用的是真机调试的方式,不知道为什么指向了一个api.next.bspapp.com/127.0.0.1:443这个地址,云函数没有调用日志,相当于调用之前指向就错误了,但是不知道从何查找这个问题,试了很多次都不行,求位大神解惑!!

try {
const params = {
keyword: searchKeyword.value,
cuisine: selectedCuisine.value,
status: selectedStatus.value,
sort: selectedSort.value,
page: currentPage.value,
pageSize: pageSize.value
};

console.log('Calling getChefList with params:', params);  

const res = await uniCloud.callFunction({  
  name: 'getChefList',  
  data: params  
});
2025-03-28 03:54 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com (作者)

URL化访问可以正常读取。但是函数调用还是不行。

要回复问题请先登录注册