1.0.3 • Published 6 years ago
wx-promise-api v1.0.3
#Introduction This project make eache wechat xiao cheng xu function return a promise.Now you write like as blew;
wx.getStorageInfo().then(function(res){
console.log("then:success",res)
},function (error) {
console.log(error)
}).then(function() {
console.log('complete')
})
wx.getStorageInfoSync().then(function(res){
console.log('sync:',res)
},function(error) {
}).then(function() {
console.log('complete')
})
##How to use init in app.js,in onLaunch function,add wrapper.wrapper() as early as you can.