提交 173a14e8 authored 作者: pengxiaohui's avatar pengxiaohui

修复微信openId为null的bug

上级 11adaba3
...@@ -96,6 +96,9 @@ export default { ...@@ -96,6 +96,9 @@ export default {
beforeMount() { beforeMount() {
this.fetchGoodsDetails() this.fetchGoodsDetails()
this.fetchShopDetails() this.fetchShopDetails()
let openId = window.localStorage.getItem('openId')
if (openId === 'undefined' || openId === 'null') openId = ''
this.openId = openId // 'oF3a-t9pFpmL2gWuTmtWs5HlDGkU'
if (this.isWxBrowser && !this.openId) { if (this.isWxBrowser && !this.openId) {
const { code } = this.$route.query const { code } = this.$route.query
if (code) this.fetchOpenId(code) if (code) this.fetchOpenId(code)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论