wzj-boot/mini-app/src/appManager.js

26 lines
393 B
JavaScript
Raw Normal View History

2021-01-12 18:04:14 +08:00
import store from '@/store'
2021-01-15 12:00:20 +08:00
class AppManager {
2021-01-12 18:04:14 +08:00
saveOpenid(openid) {
wx.setStorageSync('openid', openid)
store.dispatch('setOpenidAction', openid)
}
getOpenid() {
return wx.getStorageSync('openid')
}
navigateTo(url) {
wx.navigateTo({
url: url
})
}
showToast(msg) {
wx.showToast({title: msg, icon: 'none'})
}
}
2021-01-15 12:00:20 +08:00
export default new AppManager()