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

26 lines
393 B
JavaScript
Raw Normal View History

2021-01-12 18:04:14 +08:00
import store from '@/store'
class Xiao4rBase {
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'})
}
}
export default new Xiao4rBase()