Files
tekelanew_acs/acs/nladmin-ui/node_modules/xe-utils/getBaseURL.js

17 lines
460 B
JavaScript
Raw Normal View History

2024-12-03 17:40:13 +08:00
var staticLocation = require('./staticLocation')
var helperGetLocatOrigin = require('./helperGetLocatOrigin')
var lastIndexOf = require('./lastIndexOf')
function getBaseURL () {
if (staticLocation) {
var pathname = staticLocation.pathname
var lastIndex = lastIndexOf(pathname, '/') + 1
return helperGetLocatOrigin() + (lastIndex === pathname.length ? pathname : pathname.substring(0, lastIndex))
}
return ''
}
module.exports = getBaseURL