fix(接口定义) 修复切换页面问题

This commit is contained in:
fit2-zhao 2021-09-17 18:33:10 +08:00 committed by fit2-zhao
parent 3a6311692b
commit 457d8624fb
1 changed files with 3 additions and 0 deletions

View File

@ -228,6 +228,9 @@ export default {
}) })
}, },
init() { init() {
if (Object.prototype.toString.call(this.request).match(/\[object (\w+)\]/)[1].toLowerCase() !== 'object') {
this.request = JSON.parse(this.request);
}
if (!this.request.body) { if (!this.request.body) {
this.request.body = new Body(); this.request.body = new Body();
} }