【发布时间】:2019-08-31 11:51:55
【问题描述】:
我点击了以下链接
我还添加了 JsonStore 插件
尝试初始化 Cordova Mobile First 应用程序时未初始化 Wl.jsonStore
WL.JSONStore.init(collections).then(function (collections) {
alert("collections creted sucessfully");
console.log("Collections created sucessfully");
// handle success - collection.people (people's collection)
}).fail(function
(error) {
alert(error);
console.log(error);// handle failure });
WL.Store 需要初始化。 Kinldy 帮我解决这个问题。
【问题讨论】:
-
您能否添加更重要的代码 sn-p 显示集合对象的完整初始化。错误似乎是由 wlCOmmonInit 引起的 - 你能分享完整的 wlCommonInit 函数吗
-
是的,请检查下面的代码 var Messages = {}; var wlInitOptions = {}; var collectionName = '人';变种集合 = {};变种选项 = {};收藏[收藏名称] = {}; collections[collectionName].searchFields = {name: 'string', age: 'integer'}; function wlCommonInit() { WL.JSONStore.init(collections).then(function () { alert("集合创建成功"); console.log("集合创建成功"); }).fail(function (error) { alert(error); console.log(error); // 处理失败 }); loginApp.init(); }
标签: javascript ibm-mobilefirst jsonstore