无法获取云函数内容,上传云端也无法获取。云函数是没问题的
exports.main = async (event, context) => {  
  const db = uniCloud.database();  
  const collection = db.collection('app');  
  try {  
    const res = await collection.field({  
      Url: true,  
      description: true,  
      icon: true,  
      name: true,  
      tutorial: true  
    }).get();  
    return {  
      code: 200,  
      data: res.data,  
      message: '获取数据成功'  
    };  
  } catch (err) {  
    return {  
      code: -1,  
      message: '获取数据失败',  
      error: err  
    };  
  }  
};  
 
             
             
             
			 
                                        
                                     
            
1 个回复
唐家三少 - 我要写代码
什么叫
无法获取云函数内容?没拿到响应值?通过chrome控制台,查看一下网络请求,看看是否有报错。