Cordova应用程序:Index.js中的意外标识符

时间:2017-07-30 14:45:26

标签: javascript cordova

这是说出问题的功能

saveData: function() {
$.ajax({
    //If you are using the google option, the type should be 'get'
    //If you are using the server option, the type should be 'post'
    type: 'post',
    url: '80.241.217.250',
    data: localStore,
    crossDomain: true,
    success: function(result) {
        var pid = localStore.participant_id,
            snoozed = localStore.snoozed,
            uniqueKey = localStore.uniqueKey;
        localStore.clear();
        localStore.participant_id = pid;
        localStore.snoozed = snoozed;
        localStore.uniqueKey = uniqueKey;
    },
    error: function(request, error) {
        console.log(error);
    }
});
}

代码来自github上的this文件。我正在关注ExperienceSampler.com的教程。当我运行它时,我收到错误Syntax Error: Unexpcted Identifier知道为什么?

The error

Uncaught SyntaxError: Unexpected identifier   index.js:601

该行是上面的函数

0 个答案:

没有答案