源文件
This commit is contained in:
17
jeepay-ui-uapp-cashier/util/index.js
Normal file
17
jeepay-ui-uapp-cashier/util/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
console.log(window.location,'windowlocationwindowlocation')
|
||||
console.log(window.location.pathname.split('/pages/hub/'),'46541651651651615')
|
||||
let pathname = window.location.pathname.split('/pages/hub/').slice(-1)[0]
|
||||
let pathnameList = pathname.split("/")
|
||||
let pathnameString = window.location.pathname
|
||||
console.log(pathnameList[1],'pathnameString')
|
||||
if (pathnameList.length >= 2) {
|
||||
let parameterToRemove = pathnameList[1]
|
||||
pathnameString = pathnameString.replace(parameterToRemove, "");
|
||||
}
|
||||
console.log(pathnameString,'pathnameStringpathnameString')
|
||||
|
||||
// 支持多服务商码牌地址
|
||||
if(/^\/cashier\/(.+)\/pages\/hub\/(default|h5|lite)\/$/.test(pathname)){
|
||||
console.log(pathnameList,'windowlocationwindowlocation')
|
||||
window.location.href= '/cashier/pages/hub/' + pathnameList[0] + window.location.search
|
||||
}
|
||||
Reference in New Issue
Block a user