提交 205147d8 编写于 作者: study夏羽's avatar study夏羽

Merge branch 'master' of https://github.com/dcloudio/uni-app

......@@ -308,3 +308,22 @@ content-length: 9897
<binary payload...>
```
##### 返回不同的状态码
如需重定向或返回4xx,5xx等自定义状态码等,可以使用如下方式
**注意:阿里云暂不支持在返回的header里面使用location**
```js
exports.main = function() {
return {
mpserverlessComposedResponse: false, // 使用阿里云返回集成响应是需要此字段为true
isBase64Encoded: false,
statusCode: 301,
headers: {
'location': 'http://www.baidu.com'
}
}
}
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册