我正在构建一个使用本地PouchDB并与Cloudant数据库交互的ionic2应用程序。在浏览器上应用程序工作正常,但在iOS模拟器上,我收到以下错误。 ionic run ios -c和 safari console error
代码如下:
getHives() {
return new Promise(resolve => {
this.db.query('DesignDoc/ViewName', {
include_docs: true,
attachments: true,
key: this.loggedInUser
}).then(result => {
this.someList = [];
result.rows.map((row) => {
console.log("Row : " + JSON.stringify(row));
if (row.doc.type == "someCondition") {
this.someList.push(row);
}
});
resolve(this.someList);
this.db.changes({
live: true,
since: 'now',
include_docs: true,
attachments: true,
filter: '_view',
view: 'DesignDoc/ViewName',
key: this.loggedInUser
}).on('change', (change) => {
this.handleChange(change);
});
});
}).catch((error) => {
console.log("Error : " + error);
});
}
有人可以帮助我解决这里出现的问题吗......还有我的cloudant网址之后的_local / xyz ...文字是什么?
感谢。