|
@@ -31,5 +31,20 @@ new Vue({
|
|
|
created () {
|
|
|
// 保存整站vuex本地储存初始状态
|
|
|
window.SITE_CONFIG.storeState = cloneDeep(store.state)
|
|
|
+ this.reloadInWX()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /**
|
|
|
+ * 处理微信内二次分享
|
|
|
+ */
|
|
|
+ reloadInWX () {
|
|
|
+ let href = decodeURIComponent(window.location.href)
|
|
|
+ // 微信环境二次分享
|
|
|
+ if (href.indexOf('groupmessage') > -1 || href.indexOf('singlemessage') > -1 || href.indexOf('timeline') > -1 || href.indexOf('isappinstalled') > -1) {
|
|
|
+ href = href.replace(/from=(groupmessage|singlemessage|timeline|isappinstalled)(\S*)/, '')
|
|
|
+ location.replace(href)
|
|
|
+ location.reload(true)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}).$mount('#app')
|