diff --git a/src/pages/review/list/index.vue b/src/pages/review/list/index.vue index ba0e93c..e7b77d6 100644 --- a/src/pages/review/list/index.vue +++ b/src/pages/review/list/index.vue @@ -19,17 +19,27 @@ export default { let url = `${location.origin}/reviewCenter/` if (Setting.isDev) url = `http://192.168.31.125:8099/` if (cache) { - url += `#${cache}${cache.includes('?') ? `&` : '?'}token=${this.token}&nakadai=` + url += '#' + this.replaceParam(cache, Date.now()) } else { - url += `#/myReview?token=${this.token}&nakadai=` + url += `#/myReview?nakadai=${Setting.isDev ? `&token=${this.token}` : ''}&v=${Date.now()}` } - url += `&v=${Date.now()}` console.log("🚀 ~ mounted ~ url:", url) localStorage.setItem('review_token', this.token) this.url = url }, methods: { + replaceParam (url, newVValue) { + const vParamRegex = /v=[^&]+/g + let newUrl = url.replace(vParamRegex, `v=${newVValue}`) + + const [baseUrl, hash] = newUrl.split('#'); + if (hash) { + newUrl = `${baseUrl}#${hash.replace(vParamRegex, `v=${newVValue}`)}` + } + + return newUrl + } } }; diff --git a/src/setting.js b/src/setting.js index 775a6a6..09153de 100644 --- a/src/setting.js +++ b/src/setting.js @@ -10,7 +10,7 @@ const isTest = url.includes('121.37.12.51'); //中台测试服 const isSq = url.includes('10.20.100.204'); // 商丘 let zcPath = `120.78.139.126:8879` // 众筹 -let bankPath = `${location.origin}/banksystem` // 银行系统地址 +let bankPath = `${location.origin}/systembank` // 银行系统地址 let sandPath = `${location.origin}/sandbox` // 沙盘地址 let jumpPath = `${location.origin}/judgmentPoint` let host = `${location.origin}/`