jump.vm
1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script>
function getParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
var web = getParam("web");
var url = getParam("url");
switch (web) {
case "www":
window.location = "$config.getWwwUrl("")"+url;
break;
case "erp":
window.location = "$config.getErpUrl("")"+url;
break;
case "employee":
window.location = "$config.getEmployeeUrl("")"+url;
break;
case "member":
window.location = "$config.getMemberUrl("")"+url;
break;
case "open":
window.location = "$config.getOpenUrl("")"+url;
break;
case "customer":
window.location = "$config.getCustomerUrl("")"+url;
break;
case "supplier":
window.location = "$config.getSupplierUrl("")"+url;
break;
case "service":
window.location = "$config.getServiceUrl("")"+url;
break;
case "auth":
window.location = "$config.getAuthUrl("")"+url;
break;
default :
break;
}
</script>