<script>
async function fetchDatasetFields() {
const cloudFunctionName = 'cs'; // 可替换为任意云函数名,如 POST_auth
const url = https://env-*****.dev-hz.cloudbasefunction.cn/${cloudFunctionName}
;
const payload = {
dataset: "users" // 模拟参数,根据需求自定义
};
try {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
const data = await response.json();
document.getElementById('result').textContent = JSON.stringify(data, null, 2);
} catch (error) {
document.getElementById('result').textContent = '请求出错:' + error;
}
}
</script>
1***@qq.com (作者)
加上了,也不行还是一样的报错,我换成其他端口也加了都不行,就是突然不行的,2周前我用还能没问题
2025-04-30 11:28