function authorizationToWX(callback){
console.log('1' + JSON.stringify(callback))
}
authorizationToWX({
success: function(data){
window.localStorage && window.localStorage.setItem('wxalreadylogin', JSON.stringify(data));
setTimeout(function(){
alert(123)
me.investSuccessMoneyInfoApp();
},3000)
},
error: function() {
window.localStorage && window.localStorage.setItem('wxalreadylogin', JSON.stringify(data));
setTimeout(function(){
alert(12)
me.investSuccessMoneyInfoApp();
},3000)
}
})
The result obtained is 1{}, why is the function missing? ?
The first floor has explained the specific situation, 6666
Your callback is not json, so it cannot be consoled.
What I want to say is:
Why isn’t this behavior made into a db method? It’s always ?? && dosomething. Isn’t it annoying? And if ?? is false, it is not processed at all, then what do you want?? && dosomething is actually Just to report one less error. The point is that IE8 and above already support localstorage.