|
@@ -1,4 +1,5 @@
|
|
|
const isDev = $("#coreServer").val() === 'https://core-b.caimei365.com';
|
|
|
+const dataBaseLink = isDev ? 'https://material-b.caimei365.com' : 'https://material.caimei365.com'
|
|
|
|
|
|
var dataBaseShare = {
|
|
|
mounted: function () {
|
|
@@ -27,13 +28,13 @@ var dataBaseShare = {
|
|
|
shopIsOrder:res.data.shopIsOrder
|
|
|
};
|
|
|
localStorage.setItem('userInfo', JSON.stringify(userData))
|
|
|
- const link = isDev ? 'https://material-b.caimei365.com' : 'https://material.caimei365.com'
|
|
|
setTimeout(() => {
|
|
|
- window.location.href = `${link}/preview?t=${params.t}&id=${params.id}&uid=${res.data.userId}&spId=${params.spId}`
|
|
|
+ window.location.href = `${dataBaseLink}/preview?t=${params.t}&id=${params.id}&uid=${res.data.userId}&spId=${params.spId}`
|
|
|
}, 1000)
|
|
|
}
|
|
|
},
|
|
|
routeParams() {
|
|
|
+ if (sessionStorage.getItem('saveParams')) return
|
|
|
const p = window.location.href?.split('?')[1]?.split('&')
|
|
|
const f = {}
|
|
|
if (p && p.some(e => e.indexOf('isDataBase') !== -1)) {
|
|
@@ -43,13 +44,19 @@ var dataBaseShare = {
|
|
|
window.sessionStorage.setItem('saveParams', JSON.stringify(f))
|
|
|
}
|
|
|
},
|
|
|
+ // 升级机构后
|
|
|
updateStatus() {
|
|
|
const params = JSON.parse(window.sessionStorage.getItem('saveParams'))
|
|
|
const userInfo = JSON.parse(window.localStorage.getItem('userInfo'))
|
|
|
- const link = isDev ? 'https://material-b.caimei365.com' : 'https://material.caimei365.com'
|
|
|
setTimeout(() => {
|
|
|
- window.location.href = `${link}/preview?t=${params.t}&id=${params.id}&uid=${userInfo.userId}&spId=${params.spId}`
|
|
|
+ window.location.href = `${dataBaseLink}/preview?t=${params.t}&id=${params.id}&uid=${userInfo.userId}&spId=${params.spId}`
|
|
|
}, 1000)
|
|
|
+ },
|
|
|
+ isShowWeChat() {
|
|
|
+ if (sessionStorage.getItem('saveParams')) return false
|
|
|
+ else {
|
|
|
+ return window.location.href.indexOf('isDataBase') === -1;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|