starter for wechat mini program
- 支持npm,通过npm可下载相应组件
- 支持微信api promise化
- 支持实时log功能
- 增加weui组件
const wxp = require('./utils/wxp')
wxp.login()
.then(res => {
return wxp.getSetting()
})
.then(res => {
return res.authSetting['scope.userInfo'] ? wxp.getUserInfo() : Promise.resolve(undefined)
})
.then(res => {
if (!res) return
this.globalData.userInfo = res.userInfo
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
})
const log = require('./utils/log')
log.info(`App onLaunch`)