Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
network-assets-topology
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
network-assets-topology
Commits
b8bac284
Commit
b8bac284
authored
Aug 03, 2023
by
liyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:debug
parent
b3961490
Pipeline
#657
failed with stages
Changes
11
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1396 additions
and
1795 deletions
+1396
-1795
datav3.q.common.js
js/q/datav3.q.common.js
+2
-0
datav3.q.exportdata.js
js/q/datav3.q.exportdata.js
+1
-0
datav3.q.initwebgl.js
js/q/datav3.q.initwebgl.js
+2
-0
datav3.q.left.js
js/q/datav3.q.left.js
+2
-0
datav3.q.lemap.js
js/q/datav3.q.lemap.js
+348
-343
datav3.q.map.js
js/q/datav3.q.map.js
+6
-3
datav3.q.right.js
js/q/datav3.q.right.js
+144
-123
datav3.q.utils.js
js/q/datav3.q.utils.js
+392
-890
json.js
js/q/json.js
+81
-58
svgHeader2.js
js/q/svgHeader2.js
+65
-67
text.js
js/q/text.js
+353
-311
No files found.
js/q/datav3.q.common.js
View file @
b8bac284
console
.
log
(
"------ datav3.q.common.js debug ------"
)
var
map
=
null
;
var
map
=
null
;
var
phyTopoin
=
null
;
var
phyTopoin
=
null
;
var
phyInterRouter
=
null
;
var
phyInterRouter
=
null
;
...
...
js/q/datav3.q.exportdata.js
View file @
b8bac284
console
.
log
(
"------ datav3.q.exportdata.js debug ------"
)
$
(
'#logic-export'
).
click
(
function
(){
$
(
'#logic-export'
).
click
(
function
(){
var
inputValue
=
$
(
this
).
siblings
(
'input'
).
val
();
var
inputValue
=
$
(
this
).
siblings
(
'input'
).
val
();
...
...
js/q/datav3.q.initwebgl.js
View file @
b8bac284
console
.
log
(
"------ datav3.q.initwebgl.js debug ------"
)
// 声明变量,用于存储渲染器、场景、相机、容器宽高、控制器和克隆相机
// 声明变量,用于存储渲染器、场景、相机、容器宽高、控制器和克隆相机
var
renderer
;
var
renderer
;
var
scene
;
var
scene
;
...
...
js/q/datav3.q.left.js
View file @
b8bac284
console
.
log
(
"------ datav3.q.left.js debug ------"
)
$
(
function
(){
$
(
function
(){
var
leftinfo
=
$
(
'.leftinfo'
);
var
leftinfo
=
$
(
'.leftinfo'
);
var
leftinfoR
=
$
(
'.right'
);
var
leftinfoR
=
$
(
'.right'
);
...
...
js/q/datav3.q.lemap.js
View file @
b8bac284
var
PhyInterRouter
=
function
(
as1
,
as2
,
searchip
){
console
.
log
(
"------ datav3.q.lemap.js debug ------"
);
var
_ajax_url_
=
datav_config
.
server_url
;
var
PhyInterRouter
=
function
(
as1
,
as2
,
searchip
)
{
var
_ajax_url_
=
datav_config
.
server_url
;
removeAllMap
();
removeAllMap
();
init_map
();
init_map
();
$
(
"#asoutiframe"
).
hide
();
$
(
"#asoutiframe"
).
hide
();
...
@@ -9,74 +10,74 @@ var PhyInterRouter = function(as1,as2,searchip){
...
@@ -9,74 +10,74 @@ var PhyInterRouter = function(as1,as2,searchip){
// map.setView([32.30,14.36], 2);
// map.setView([32.30,14.36], 2);
var
intermediateIcon
=
L
.
divIcon
({
var
intermediateIcon
=
L
.
divIcon
({
className
:
'interIcon iconfont icon-luyou'
,
className
:
"interIcon iconfont icon-luyou"
,
iconAnchor
:
[
12
,
12
],
iconAnchor
:
[
12
,
12
],
iconSize
:
[
30
,
30
],
iconSize
:
[
30
,
30
],
shadowAnchor
:
[
0
,
0
],
shadowAnchor
:
[
0
,
0
],
popupAnchor
:
[
0
,
-
5
]
popupAnchor
:
[
0
,
-
5
],
});
});
var
areaIcon
=
L
.
divIcon
({
var
areaIcon
=
L
.
divIcon
({
className
:
'areaIcon iconfont icon-luyou'
,
className
:
"areaIcon iconfont icon-luyou"
,
iconAnchor
:
[
12
,
12
],
iconAnchor
:
[
12
,
12
],
iconSize
:
[
30
,
30
],
iconSize
:
[
30
,
30
],
shadowAnchor
:
[
0
,
0
],
shadowAnchor
:
[
0
,
0
],
popupAnchor
:
[
0
,
-
5
]
popupAnchor
:
[
0
,
-
5
],
});
});
var
overlay
=
new
L
.
echartsLayer
(
map
,
echarts
);
var
overlay
=
new
L
.
echartsLayer
(
map
,
echarts
);
var
chartsContainer
=
overlay
.
getEchartsContainer
();
var
chartsContainer
=
overlay
.
getEchartsContainer
();
$
(
chartsContainer
).
css
({
zIndex
:
999
})
$
(
chartsContainer
).
css
({
zIndex
:
999
});
var
myChart
=
overlay
.
initECharts
(
chartsContainer
);
var
myChart
=
overlay
.
initECharts
(
chartsContainer
);
window
.
onresize
=
myChart
.
onresize
;
window
.
onresize
=
myChart
.
onresize
;
var
option
=
{
var
option
=
{
color
:
[
'gold'
,
'aqua'
,
'lime'
],
color
:
[
"gold"
,
"aqua"
,
"lime"
],
title
:
{
title
:
{
text
:
''
,
text
:
""
,
subtext
:
''
,
subtext
:
""
,
x
:
'center'
,
x
:
"center"
,
textStyle
:
{
textStyle
:
{
color
:
'#fff'
color
:
"#fff"
,
}
},
},
},
tooltip
:
{
tooltip
:
{
trigger
:
'item'
,
trigger
:
"item"
,
formatter
:
'{b}'
formatter
:
"{b}"
,
},
},
toolbox
:
{
toolbox
:
{
show
:
false
,
show
:
false
,
orient
:
'vertical'
,
orient
:
"vertical"
,
x
:
'right'
,
x
:
"right"
,
y
:
'center'
,
y
:
"center"
,
feature
:
{
feature
:
{
mark
:
{
show
:
true
},
mark
:
{
show
:
true
},
dataView
:
{
show
:
true
,
readOnly
:
false
},
dataView
:
{
show
:
true
,
readOnly
:
false
},
restore
:
{
show
:
true
},
restore
:
{
show
:
true
},
saveAsImage
:
{
show
:
true
}
saveAsImage
:
{
show
:
true
},
}
},
},
series
:
[
},
series
:
[
{
{
name
:
'all lines'
,
name
:
"all lines"
,
type
:
'map'
,
type
:
"map"
,
roam
:
true
,
roam
:
true
,
hoverable
:
true
,
hoverable
:
true
,
mapType
:
'none'
,
mapType
:
"none"
,
itemStyle
:{
itemStyle
:
{
normal
:{
normal
:
{
borderColor
:
'rgba(100,149,237,1)'
,
borderColor
:
"rgba(100,149,237,1)"
,
borderWidth
:
1
,
borderWidth
:
1
,
areaStyle
:{
areaStyle
:
{
color
:
'#1b1b1b'
color
:
"#1b1b1b"
,
}
},
}
},
},
data
:[],
},
markLine
:
{
data
:
[],
markLine
:
{
effect
:
{
effect
:
{
color
:
'rgba(204, 246, 255, 0.5)'
,
color
:
"rgba(204, 246, 255, 0.5)"
,
show
:
true
,
show
:
true
,
period
:
40
period
:
40
,
},
},
// bundling: {
// bundling: {
// // enable: true
// // enable: true
...
@@ -84,40 +85,39 @@ var PhyInterRouter = function(as1,as2,searchip){
...
@@ -84,40 +85,39 @@ var PhyInterRouter = function(as1,as2,searchip){
// large: true,
// large: true,
smooth
:
true
,
smooth
:
true
,
smoothness
:
0.1
,
smoothness
:
0.1
,
symbol
:
[
'none'
,
'none'
],
symbol
:
[
"none"
,
"none"
],
symbolSize
:
3
,
symbolSize
:
3
,
itemStyle
:
{
itemStyle
:
{
normal
:
{
normal
:
{
color
:
'#fff'
,
color
:
"#fff"
,
borderWidth
:
1
,
borderWidth
:
1
,
borderColor
:
'rgba(255, 0, 0,0.5)'
,
borderColor
:
"rgba(255, 0, 0,0.5)"
,
lineStyle
:
{
lineStyle
:
{
// color: 'rgba(255, 69, 0,0.7)',
// color: 'rgba(255, 69, 0,0.7)',
color
:
'rgba(102, 255, 103,0.6)'
,
color
:
"rgba(102, 255, 103,0.6)"
,
type
:
'solid'
,
type
:
"solid"
,
width
:
0.7
,
width
:
0.7
,
// opacity: 0.6
// opacity: 0.6
}
}
},
},
data
:
[],
},
},
geoCoord
:
{}
},
data
:
[],
},
geoCoord
:
{},
},
},
{
{
name
:
'source ip'
,
name
:
"source ip"
,
// type: 'map',
// type: 'map',
type
:
'map'
,
type
:
"map"
,
mapType
:
'none'
,
mapType
:
"none"
,
data
:
[],
data
:
[],
markPoint
:
{
markPoint
:
{
// symbol:'emptyCircle',
// symbol:'emptyCircle',
// symbol:'circle',
// symbol:'circle',
symbol
:
"image://images/intermediaterouter.png"
,
symbol
:
"image://images/intermediaterouter.png"
,
symbolSize
:
function
(
v
)
{
symbolSize
:
function
(
v
)
{
// return 10 + v/10
// return 10 + v/10
return
[
10
,
10
]
return
[
10
,
10
];
},
},
// effect : {
// effect : {
// show: true,
// show: true,
...
@@ -139,45 +139,45 @@ var PhyInterRouter = function(as1,as2,searchip){
...
@@ -139,45 +139,45 @@ var PhyInterRouter = function(as1,as2,searchip){
// borderWidth: 10
// borderWidth: 10
// }
// }
// },
// },
data
:
[]
data
:
[],
}
},
},
},
{
{
name
:
'destnation ip'
,
name
:
"destnation ip"
,
type
:
'map'
,
type
:
"map"
,
mapType
:
'none'
,
mapType
:
"none"
,
data
:
[],
data
:
[],
markPoint
:
{
markPoint
:
{
// symbol:'emptyCircle',
// symbol:'emptyCircle',
symbol
:
'circle'
,
symbol
:
"circle"
,
symbol
:
"image://images/arearouter.png"
,
symbol
:
"image://images/arearouter.png"
,
symbolSize
:
function
(
v
)
{
symbolSize
:
function
(
v
)
{
// return 10 + v/10
// return 10 + v/10
return
[
10
,
10
]
return
[
10
,
10
];
},
},
// effect : {
// effect : {
// show: true,
// show: true,
// shadowBlur : 0
// shadowBlur : 0
// },
// },
itemStyle
:
{
itemStyle
:
{
normal
:
{
normal
:
{
color
:
'rgba(129, 227, 238,0.5)'
,
color
:
"rgba(129, 227, 238,0.5)"
,
label
:{
show
:
false
}
label
:
{
show
:
false
},
},
},
emphasis
:
{
emphasis
:
{
label
:{
position
:
'top'
},
label
:
{
position
:
"top"
},
offset
:
1
,
offset
:
1
,
color
:
'rgba(25, 183, 20,0.5)'
,
color
:
"rgba(25, 183, 20,0.5)"
,
size
:
16
,
size
:
16
,
shadowColor
:
'rgba(25, 183, 20,0.5)'
,
shadowColor
:
"rgba(25, 183, 20,0.5)"
,
shadowBlur
:
100
,
shadowBlur
:
100
,
borderWidth
:
10
borderWidth
:
10
,
}
},
},
data
:
[]
}
},
},
]
data
:
[],
},
},
],
};
};
//数据格式
//数据格式
...
@@ -209,7 +209,7 @@ var PhyInterRouter = function(as1,as2,searchip){
...
@@ -209,7 +209,7 @@ var PhyInterRouter = function(as1,as2,searchip){
zoomToBoundsOnClick
:
false
,
zoomToBoundsOnClick
:
false
,
maxClusterRadius
:
0.0001
,
maxClusterRadius
:
0.0001
,
// maxClusterRadius: 500,
// maxClusterRadius: 500,
spiderfyDistanceMultiplier
:
1
,
spiderfyDistanceMultiplier
:
1
,
});
});
var
allLines
=
[];
var
allLines
=
[];
// var sPoints = [];
// var sPoints = [];
...
@@ -219,10 +219,10 @@ var PhyInterRouter = function(as1,as2,searchip){
...
@@ -219,10 +219,10 @@ var PhyInterRouter = function(as1,as2,searchip){
var
geoCoord
=
{};
var
geoCoord
=
{};
$
.
ajax
({
$
.
ajax
({
url
:
_ajax_url_
+
'visual/control/vs/v3/topology/getInterfaceByASnumber'
,
url
:
_ajax_url_
+
"visual/control/vs/v3/topology/getInterfaceByASnumber"
,
type
:
'post'
,
type
:
"post"
,
datatype
:
'json'
,
datatype
:
"json"
,
headers
:
{
'Content-type'
:
'application/json;charset=UTF-8'
},
headers
:
{
"Content-type"
:
"application/json;charset=UTF-8"
},
// data: JSON.stringify({
// data: JSON.stringify({
// "as1":"10010",
// "as1":"10010",
// "as2":"17682"
// "as2":"17682"
...
@@ -236,44 +236,45 @@ var PhyInterRouter = function(as1,as2,searchip){
...
@@ -236,44 +236,45 @@ var PhyInterRouter = function(as1,as2,searchip){
// "as2":"3356"
// "as2":"3356"
// })
// })
data
:
JSON
.
stringify
({
data
:
JSON
.
stringify
({
"as1"
:
as1
,
as1
:
as1
,
"as2"
:
as2
as2
:
as2
,
}),
})
})
}).
done
(
function
(
data
){
.
done
(
function
(
data
)
{
if
(
data
&&
data
.
list
&&
data
.
list
.
length
>
0
)
{
if
(
data
&&
data
.
list
&&
data
.
list
.
length
>
0
){
$
.
each
(
data
.
list
,
function
(
i
,
d
)
{
$
.
each
(
data
.
list
,
function
(
i
,
d
){
//echart连线数据
//echart连线数据
geoCoord
[
d
.
ip1
]
=
[
d
.
ip1_info
.
j
,
d
.
ip1_info
.
w
];
geoCoord
[
d
.
ip1
]
=
[
d
.
ip1_info
.
j
,
d
.
ip1_info
.
w
];
geoCoord
[
d
.
ip2
]
=
[
d
.
ip2_info
.
j
,
d
.
ip2_info
.
w
];
geoCoord
[
d
.
ip2
]
=
[
d
.
ip2_info
.
j
,
d
.
ip2_info
.
w
];
allLines
.
push
([{
name
:
d
.
ip1
},{
name
:
d
.
ip2
}]);
allLines
.
push
([{
name
:
d
.
ip1
},
{
name
:
d
.
ip2
}]);
sPointsM
.
push
(
d
.
ip1
);
sPointsM
.
push
(
d
.
ip1
);
dPointsM
.
push
(
d
.
ip2
);
dPointsM
.
push
(
d
.
ip2
);
})
});
sPointsM
=
_
.
uniq
(
sPointsM
);
sPointsM
=
_
.
uniq
(
sPointsM
);
dPointsM
=
_
.
uniq
(
dPointsM
);
dPointsM
=
_
.
uniq
(
dPointsM
);
//聚簇点
//聚簇点
$
.
each
(
sPointsM
,
function
(
i
,
d
){
$
.
each
(
sPointsM
,
function
(
i
,
d
)
{
var
m1
=
L
.
marker
([
geoCoord
[
d
][
1
],
geoCoord
[
d
][
0
]],{
//这里需传入纬度,经度,echart中的数据为经度,纬度
var
m1
=
L
.
marker
([
geoCoord
[
d
][
1
],
geoCoord
[
d
][
0
]],
{
//这里需传入纬度,经度,echart中的数据为经度,纬度
icon
:
intermediateIcon
,
icon
:
intermediateIcon
,
// ip:d.ip1
// ip:d.ip1
name
:
d
name
:
d
,
}).
bindPopup
(
'<div>起始IP:'
+
d
+
'</div>'
);
}).
bindPopup
(
"<div>起始IP:"
+
d
+
"</div>"
);
m1
.
on
(
'click'
,
handleClickM
)
m1
.
on
(
"click"
,
handleClickM
);
markers
.
addLayer
(
m1
);
markers
.
addLayer
(
m1
);
})
});
$
.
each
(
dPointsM
,
function
(
i
,
d
)
{
$
.
each
(
dPointsM
,
function
(
i
,
d
)
{
var
m2
=
L
.
marker
([
geoCoord
[
d
][
1
],
geoCoord
[
d
][
0
]],
{
var
m2
=
L
.
marker
([
geoCoord
[
d
][
1
],
geoCoord
[
d
][
0
]],
{
icon
:
areaIcon
,
icon
:
areaIcon
,
// ip:d.ip2
// ip:d.ip2
name
:
d
name
:
d
,
}).
bindPopup
(
'<div>目的IP:'
+
d
+
'</div>'
);
}).
bindPopup
(
"<div>目的IP:"
+
d
+
"</div>"
);
m2
.
on
(
'click'
,
handleClickM
)
m2
.
on
(
"click"
,
handleClickM
);
markers
.
addLayer
(
m2
);
markers
.
addLayer
(
m2
);
})
});
map
.
addLayer
(
markers
);
map
.
addLayer
(
markers
);
map
.
fitBounds
(
markers
.
getBounds
());
map
.
fitBounds
(
markers
.
getBounds
());
...
@@ -282,87 +283,91 @@ var PhyInterRouter = function(as1,as2,searchip){
...
@@ -282,87 +283,91 @@ var PhyInterRouter = function(as1,as2,searchip){
// option.series[1].markPoint.data = sPoints;
// option.series[1].markPoint.data = sPoints;
// option.series[2].markPoint.data = dPoints;
// option.series[2].markPoint.data = dPoints;
if
(
!
searchip
)
{
if
(
!
searchip
)
{
option
.
series
[
0
].
markLine
.
data
=
allLines
;
option
.
series
[
0
].
markLine
.
data
=
allLines
;
}
}
myChart
=
overlay
.
initECharts
(
chartsContainer
);
myChart
=
overlay
.
initECharts
(
chartsContainer
);
overlay
.
setOption
(
option
);
overlay
.
setOption
(
option
);
// searchRouter(ip)
// searchRouter(ip)
}
else
{
}
else
{
console
.
log
(
'无相连路由器'
)
console
.
log
(
"无相连路由器"
);
}
}
}).
done
(
function
(){
})
if
(
searchip
){
.
done
(
function
()
{
setTimeout
(
function
(){
if
(
searchip
)
{
setTimeout
(
function
()
{
searchRouter
(
searchip
);
searchRouter
(
searchip
);
},
500
)
},
500
);
}
}
})
}).
fail
(
function
(
err
)
{
.
fail
(
function
(
err
)
{
// handleError()
// handleError()
});
});
// 添加图例
// 添加图例
showLengend
()
showLengend
();
function
showLengend
()
{
function
showLengend
()
{
$
(
'.logrouter_tips'
).
hide
();
$
(
".logrouter_tips"
).
hide
();
$
(
'.tips'
).
hide
();
$
(
".tips"
).
hide
();
$
(
'.phyrouter_tips'
).
hide
();
$
(
".phyrouter_tips"
).
hide
();
$
(
'.backtodomainouter'
).
hide
();
$
(
".backtodomainouter"
).
hide
();
$
(
'.intodomain'
).
hide
();
$
(
".intodomain"
).
hide
();
$
(
'.chose_icon .myicon'
).
hide
();
$
(
".chose_icon .myicon"
).
hide
();
$
(
'.inter_r_tips'
).
show
();
$
(
".inter_r_tips"
).
show
();
}
}
function
handleClickM
(
e
)
{
function
handleClickM
(
e
)
{
var
searchValue
=
e
.
target
.
options
.
name
;
var
searchValue
=
e
.
target
.
options
.
name
;
var
asNumber
=
input_record
.
input_value
;
var
asNumber
=
input_record
.
input_value
;
$
(
'#export-form .search-input'
).
val
(
searchValue
);
$
(
"#export-form .search-input"
).
val
(
searchValue
);
fetchData
.
getInterfaceByASnumber
({
as1
:
asNumber
[
0
],
as2
:
asNumber
[
1
],
key
:
searchValue
});
fetchData
.
getInterfaceByASnumber
({
as1
:
asNumber
[
0
],
as2
:
asNumber
[
1
],
key
:
searchValue
,
});
redrawLines
(
searchValue
);
redrawLines
(
searchValue
);
}
}
function
searchRouter
(
ip
)
{
function
searchRouter
(
ip
)
{
spiderfy
(
ip
);
spiderfy
(
ip
);
redrawLines
(
ip
);
redrawLines
(
ip
);
}
}
function
spiderfy
(
ip
)
{
function
spiderfy
(
ip
)
{
if
(
ip
)
{
if
(
ip
)
{
//展开聚簇
//展开聚簇
markers
.
eachLayer
(
function
(
layer
){
markers
.
eachLayer
(
function
(
layer
)
{
if
(
layer
.
options
.
name
==
ip
)
{
if
(
layer
.
options
.
name
==
ip
)
{
if
(
!
layer
.
getElement
())
{
if
(
!
layer
.
getElement
())
{
layer
.
__parent
.
spiderfy
();
layer
.
__parent
.
spiderfy
();
layer
.
openPopup
();
layer
.
openPopup
();
}
}
}
}
})
});
}
else
{
}
else
{
markers
.
_unspiderfy
();
markers
.
_unspiderfy
();
}
}
}
}
function
redrawLines
(
ip
)
{
function
redrawLines
(
ip
)
{
if
(
ip
)
{
if
(
ip
)
{
//重新绘制连线
//重新绘制连线
var
new_lines
=
[];
var
new_lines
=
[];
for
(
var
j
=
0
;
j
<
allLines
.
length
;
j
++
){
for
(
var
j
=
0
;
j
<
allLines
.
length
;
j
++
)
{
if
(
allLines
[
j
][
0
].
name
==
ip
||
allLines
[
j
][
1
].
name
==
ip
)
{
if
(
allLines
[
j
][
0
].
name
==
ip
||
allLines
[
j
][
1
].
name
==
ip
)
{
new_lines
.
push
(
allLines
[
j
]);
new_lines
.
push
(
allLines
[
j
]);
}
}
}
}
option
.
series
[
0
].
markLine
.
data
=
new_lines
;
option
.
series
[
0
].
markLine
.
data
=
new_lines
;
myChart
=
overlay
.
initECharts
(
chartsContainer
);
myChart
=
overlay
.
initECharts
(
chartsContainer
);
overlay
.
setOption
(
option
);
overlay
.
setOption
(
option
);
}
else
{
}
else
{
option
.
series
[
0
].
markLine
.
data
=
allLines
;
option
.
series
[
0
].
markLine
.
data
=
allLines
;
myChart
=
overlay
.
initECharts
(
chartsContainer
);
myChart
=
overlay
.
initECharts
(
chartsContainer
);
overlay
.
setOption
(
option
);
overlay
.
setOption
(
option
);
}
}
}
}
// searchRouter();
// searchRouter();
return
{
return
{
searchRouter
:
searchRouter
searchRouter
:
searchRouter
,
}
};
}
};
\ No newline at end of file
js/q/datav3.q.map.js
View file @
b8bac284
//自动执行函数
//自动执行函数
(
function
()
{
(
function
()
{
console
.
log
(
"------ datav3.q.map debug ------"
)
console
.
log
(
"------ datav3.q.map debug ------"
)
;
// 公共鼠标拾取变量
// 公共鼠标拾取变量
var
raycaster
=
new
THREE
.
Raycaster
();
var
raycaster
=
new
THREE
.
Raycaster
();
var
mouse
=
new
THREE
.
Vector2
();
var
mouse
=
new
THREE
.
Vector2
();
...
@@ -492,7 +492,10 @@
...
@@ -492,7 +492,10 @@
transformSVGPathExposed
(
path
(
feature
)),
transformSVGPathExposed
(
path
(
feature
)),
extrudeSettings
extrudeSettings
),
),
new
THREE
.
MeshLambertMaterial
({
color
:
0xffffff
,
depthTest
:
true
})
new
THREE
.
MeshLambertMaterial
({
color
:
0xffffff
,
depthTest
:
true
,
})
);
);
map_mesh
.
name
=
"map_"
+
country_code
;
map_mesh
.
name
=
"map_"
+
country_code
;
country_geomap_map
.
add
(
map_mesh
);
country_geomap_map
.
add
(
map_mesh
);
...
@@ -525,7 +528,7 @@
...
@@ -525,7 +528,7 @@
country_AScount_list
.
push
(
_
.
size
(
country_ASes
));
country_AScount_list
.
push
(
_
.
size
(
country_ASes
));
}
}
var
country_AScount_max
=
_
.
max
(
country_AScount_list
);
var
country_AScount_max
=
_
.
max
(
country_AScount_list
);
console
.
log
(
"------------"
)
console
.
log
(
"------------"
)
;
// 点处理
// 点处理
var
Land_points
=
new
THREE
.
Geometry
();
var
Land_points
=
new
THREE
.
Geometry
();
valid_country_names
=
[];
// 实际有效的绘图国家列表
valid_country_names
=
[];
// 实际有效的绘图国家列表
...
...
js/q/datav3.q.right.js
View file @
b8bac284
console
.
log
(
"------ datav3.q.right.js debug ------"
);
//***********右侧信息展示中供index调用的接口封装***********/
//***********右侧信息展示中供index调用的接口封装***********/
// 右下按钮动画
// 右下按钮动画
$
(
function
()
{
$
(
function
()
{
var
right_btm
=
$
(
'.right-btm'
);
var
right_btm
=
$
(
".right-btm"
);
var
content
=
right_btm
.
find
(
'.content'
);
var
content
=
right_btm
.
find
(
".content"
);
var
content_list
=
content
.
find
(
'.content-list'
);
var
content_list
=
content
.
find
(
".content-list"
);
right_btm
.
find
(
'.rb-btn'
).
each
(
function
()
{
right_btm
.
find
(
".rb-btn"
).
each
(
function
()
{
rbBtnAnimate
(
$
(
this
));
rbBtnAnimate
(
$
(
this
));
})
});
// rbBtnAnimate(right_btm.find('.rb-btn2'));
// rbBtnAnimate(right_btm.find('.rb-btn2'));
function
rbBtnAnimate
(
$ele
){
function
rbBtnAnimate
(
$ele
)
{
var
btn_country
=
$ele
.
find
(
".rb-btn-center"
);
var
btn_country
=
$ele
.
find
(
'.rb-btn-center'
);
var
rb_btn_outer
=
$ele
.
find
(
".rb-btn-outer"
);
var
rb_btn_outer
=
$ele
.
find
(
'.rb-btn-outer'
);
var
btn_transition_time
=
500
;
var
btn_transition_time
=
500
;
var
img_len
=
rb_btn_outer
.
find
(
'img'
).
length
;
var
img_len
=
rb_btn_outer
.
find
(
"img"
).
length
;
var
per_deg
=
360
/
img_len
;
var
per_deg
=
360
/
img_len
;
// var init_rotate = 140;
// var init_rotate = 140;
if
(
img_len
==
2
)
{
if
(
img_len
==
2
)
{
btn_country
.
click
(
function
()
{
btn_country
.
click
(
function
()
{
$_this
=
$
(
this
);
$_this
=
$
(
this
);
var
anim1
=
scaleBtnCountry
(
$_this
);
var
anim1
=
scaleBtnCountry
(
$_this
);
anim1
.
then
(
function
(){
anim1
.
then
(
function
()
{
resetBtnCountry
(
$_this
);
;
resetBtnCountry
(
$_this
)
;
})
});
})
});
}
else
{
}
else
{
btn_country
.
click
(
function
()
{
btn_country
.
click
(
function
()
{
$_this
=
$
(
this
);
$_this
=
$
(
this
);
var
anim1
=
transiteBtnOuterDown
(
$_this
,
-
200
);
var
anim1
=
transiteBtnOuterDown
(
$_this
,
-
200
);
anim1
.
then
(
function
(){
anim1
.
then
(
function
()
{
resetBtnOuter
(
$_this
);
;
resetBtnOuter
(
$_this
)
;
})
});
})
});
}
}
function
scaleBtnCountry
(
$_el
)
{
function
scaleBtnCountry
(
$_el
)
{
var
dtd
=
$
.
Deferred
();
var
dtd
=
$
.
Deferred
();
$_el
.
transition
({
$_el
.
transition
(
transform
:
'scale(0.8) rotate(-40deg)'
{
},
btn_transition_time
,
function
(){
transform
:
"scale(0.8) rotate(-40deg)"
,
},
btn_transition_time
,
function
()
{
dtd
.
resolve
();
dtd
.
resolve
();
})
}
);
return
dtd
.
promise
();
return
dtd
.
promise
();
}
}
function
resetBtnCountry
(
$_el
)
{
function
resetBtnCountry
(
$_el
)
{
var
dtd
=
$
.
Deferred
();
var
dtd
=
$
.
Deferred
();
$_el
.
transition
({
$_el
.
transition
(
transform
:
'scale(1) rotate(-40deg)'
{
},
btn_transition_time
,
function
(){
transform
:
"scale(1) rotate(-40deg)"
,
},
btn_transition_time
,
function
()
{
dtd
.
resolve
();
dtd
.
resolve
();
})
}
);
return
dtd
.
promise
();
return
dtd
.
promise
();
}
}
rb_btn_outer
.
find
(
'img'
).
each
(
function
(
i
,
d
){
rb_btn_outer
.
find
(
"img"
).
each
(
function
(
i
,
d
)
{
$
(
this
).
on
(
"click.animate"
,
function
()
{
$
(
this
).
on
(
'click.animate'
,
function
(){
var
$_this
=
$
(
this
);
var
$_this
=
$
(
this
);
var
rotate_deg
=
i
*
per_deg
;
var
rotate_deg
=
i
*
per_deg
;
var
anim1
=
transiteBtnOuterDown
(
$_this
);
var
anim1
=
transiteBtnOuterDown
(
$_this
);
anim1
.
then
(
function
(){
anim1
transiteBtnOuterUp
(
$_this
)
.
then
(
function
()
{
return
rotateBtn
(
$_this
,
rotate_deg
);
transiteBtnOuterUp
(
$_this
);
}).
then
(
function
(){
return
rotateBtn
(
$_this
,
rotate_deg
);
resetBtnOuter
(
$_this
);
})
})
.
then
(
function
()
{
resetBtnOuter
(
$_this
);
});
// $_this.addClass('active');
// $_this.addClass('active');
})
});
})
});
function
transiteBtnOuterDown
(
$_el
,
transZ
)
{
function
transiteBtnOuterDown
(
$_el
,
transZ
)
{
var
dtd
=
$
.
Deferred
();
var
dtd
=
$
.
Deferred
();
var
transZ
=
transZ
||
-
40
;
var
transZ
=
transZ
||
-
40
;
$_el
.
transition
({
$_el
.
transition
(
transform
:
'translate3d(0px,0px,'
+
transZ
+
'px)'
{
},
btn_transition_time
,
function
(){
transform
:
"translate3d(0px,0px,"
+
transZ
+
"px)"
,
},
btn_transition_time
,
function
()
{
dtd
.
resolve
();
dtd
.
resolve
();
})
}
);
return
dtd
.
promise
();
return
dtd
.
promise
();
}
}
function
transiteBtnOuterUp
(
$_el
,
transZ
)
{
function
transiteBtnOuterUp
(
$_el
,
transZ
)
{
var
dtd
=
$
.
Deferred
();
var
dtd
=
$
.
Deferred
();
var
transZ
=
transZ
||
50
;
var
transZ
=
transZ
||
50
;
$_el
.
transition
({
$_el
.
transition
(
transform
:
'translate3d(0px,0px,'
+
transZ
+
'px)'
{
},
btn_transition_time
,
function
(){
transform
:
"translate3d(0px,0px,"
+
transZ
+
"px)"
,
},
btn_transition_time
,
function
()
{
dtd
.
resolve
();
dtd
.
resolve
();
})
}
);
return
dtd
.
promise
();
return
dtd
.
promise
();
}
}
function
rotateBtn
(
$_el
,
rotate_deg
)
{
function
rotateBtn
(
$_el
,
rotate_deg
)
{
var
dtd
=
$
.
Deferred
();
var
dtd
=
$
.
Deferred
();
$_el
.
parent
().
transition
({
$_el
.
parent
().
transition
(
transform
:
'rotate(-'
+
rotate_deg
+
'deg)'
{
},
btn_transition_time
,
function
(){
transform
:
"rotate(-"
+
rotate_deg
+
"deg)"
,
},
btn_transition_time
,
function
()
{
dtd
.
resolve
();
dtd
.
resolve
();
})
}
);
return
dtd
.
promise
();
return
dtd
.
promise
();
}
}
function
resetBtnOuter
(
$_el
){
function
resetBtnOuter
(
$_el
)
{
$_el
.
transition
(
$_el
.
transition
({
{
transform
:
'translate3d(0px,0px,0px)'
transform
:
"translate3d(0px,0px,0px)"
,
},
btn_transition_time
)
},
btn_transition_time
);
}
}
}
}
//右下信息中交互操作
//右下信息中交互操作
$
(
'.aslist .content-list'
).
each
(
function
(){
$
(
".aslist .content-list"
).
each
(
function
()
{
$
(
this
).
hover
(
function
(){
$
(
this
).
hover
(
function
()
{
$
(
this
).
addClass
(
'active'
);
$
(
this
).
addClass
(
"active"
);
},
function
(){
},
$
(
this
).
removeClass
(
'active'
)
function
()
{
})
$
(
this
).
removeClass
(
"active"
);
})
}
);
})
});
});
js/q/datav3.q.utils.js
View file @
b8bac284
console
.
log
(
"------ datav3.q.utils.js debug ------"
);
function
isAsnumber
(
val
)
{
function
isAsnumber
(
val
)
{
var
regAs
=
/^
[
0-9
]
*$/
;
var
regAs
=
/^
[
0-9
]
*$/
;
if
(
val
!==
''
&&
regAs
.
test
(
val
)
&&
0
<=
val
&&
val
<=
4294967295
)
{
if
(
val
!==
""
&&
regAs
.
test
(
val
)
&&
0
<=
val
&&
val
<=
4294967295
)
{
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
}
}
}
}
function
isReservedPrivateAs
(
val
)
{
function
isReservedPrivateAs
(
val
)
{
var
regAs
=
/^
[
0-9
]
*$/
;
var
regAs
=
/^
[
0-9
]
*$/
;
if
((
val
!==
''
&&
regAs
.
test
(
val
)
&&
64512
<=
val
&&
val
<=
65534
)
||
(
4200000000
<=
val
&&
val
<=
4294967294
))
{
if
(
(
val
!==
""
&&
regAs
.
test
(
val
)
&&
64512
<=
val
&&
val
<=
65534
)
||
(
4200000000
<=
val
&&
val
<=
4294967294
)
)
{
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
}
}
}
}
function
isReservedAs
(
val
)
{
function
isReservedAs
(
val
)
{
var
regAs
=
/^
[
0-9
]
*$/
;
var
regAs
=
/^
[
0-9
]
*$/
;
if
(
if
(
(
val
!==
''
&&
regAs
.
test
(
val
)
&&
val
==
0
)
||
(
val
!==
""
&&
regAs
.
test
(
val
)
&&
val
==
0
)
||
(
64496
<=
val
&&
val
<=
64511
)
||
(
64496
<=
val
&&
val
<=
64511
)
||
(
65535
<=
val
&&
val
<=
131071
)
||
(
65535
<=
val
&&
val
<=
131071
)
||
val
==
4294967295
val
==
4294967295
...
@@ -28,572 +33,70 @@ function isAsnumber(val) {
...
@@ -28,572 +33,70 @@ function isAsnumber(val) {
}
else
{
}
else
{
return
false
;
return
false
;
}
}
}
}
function
isCountry
(
val
)
{
function
isCountry
(
val
)
{
var
regCountry
=
/
[
a-zA-Z
\u
4e00-
\u
9fa5
]
+/
;
var
regCountry
=
/
[
a-zA-Z
\u
4e00-
\u
9fa5
]
+/
;
// var regCountry = /[a-zA-Z]+/;
// var regCountry = /[a-zA-Z]+/;
return
regCountry
.
test
(
val
);
return
regCountry
.
test
(
val
);
}
}
function
isTopoinAS
(
as
)
{
function
isTopoinAS
(
as
)
{
var
topoinASNumber
=
[
var
topoinASNumber
=
[
10026
,
10026
,
131588
,
133038
,
133893
,
135373
,
17990
,
24058
,
38197
,
45485
,
4862
,
131588
,
58451
,
63946
,
9266
,
10032
,
131589
,
133054
,
133904
,
135386
,
18040
,
24077
,
133038
,
38277
,
45496
,
5017
,
58453
,
63955
,
9269
,
10082
,
131590
,
133077
,
133905
,
133893
,
135387
,
18042
,
24112
,
38385
,
45504
,
5018
,
58516
,
63959
,
9289
,
10085
,
131591
,
135373
,
133089
,
133929
,
135391
,
18045
,
24115
,
38452
,
45508
,
55298
,
58579
,
63977
,
17990
,
9293
,
10098
,
131593
,
133107
,
133946
,
135413
,
18046
,
24154
,
38469
,
45561
,
24058
,
55334
,
58627
,
63981
,
9304
,
10099
,
131596
,
133115
,
133948
,
135414
,
18047
,
38197
,
24155
,
38475
,
45562
,
55350
,
58683
,
64033
,
9311
,
10103
,
131597
,
133126
,
45485
,
133953
,
1659
,
18049
,
24157
,
38478
,
45572
,
55355
,
58708
,
64047
,
9346
,
10108
,
4862
,
131599
,
133142
,
134094
,
17408
,
18116
,
24158
,
38486
,
45590
,
55361
,
58730
,
58451
,
64067
,
9381
,
10116
,
131603
,
133158
,
134121
,
17416
,
18177
,
24160
,
38531
,
63946
,
45597
,
55367
,
58744
,
64078
,
9409
,
10118
,
131994
,
133190
,
134127
,
17420
,
9266
,
18179
,
24163
,
38574
,
45599
,
55369
,
58779
,
64087
,
9415
,
10126
,
132017
,
10032
,
133199
,
134167
,
17421
,
18181
,
24164
,
38578
,
45640
,
55417
,
58797
,
7468
,
9416
,
131589
,
10127
,
132056
,
133201
,
134175
,
17444
,
18182
,
24165
,
38580
,
45750
,
55480
,
133054
,
58807
,
7478
,
9420
,
10135
,
132057
,
133204
,
134243
,
17485
,
18183
,
24167
,
133904
,
38591
,
45753
,
55489
,
58815
,
7479
,
9444
,
10138
,
132157
,
133209
,
134366
,
135386
,
17487
,
18185
,
24168
,
38603
,
45761
,
55512
,
58908
,
7481
,
9468
,
10147
,
132169
,
18040
,
133322
,
134379
,
17537
,
18218
,
24182
,
38658
,
45816
,
55517
,
58931
,
7482
,
9474
,
24077
,
10202
,
132252
,
133325
,
134387
,
17540
,
18382
,
24224
,
38797
,
45855
,
55536
,
38277
,
58933
,
7484
,
9502
,
10205
,
132295
,
133372
,
134401
,
17554
,
18410
,
24235
,
45496
,
38802
,
45908
,
55552
,
58944
,
7499
,
9505
,
10229
,
132310
,
133380
,
134446
,
5017
,
17555
,
18411
,
24236
,
38814
,
45910
,
55558
,
58958
,
7532
,
9513
,
10231
,
132342
,
58453
,
133398
,
134449
,
17619
,
18413
,
24246
,
38819
,
45911
,
55639
,
58985
,
7533
,
9520
,
63955
,
10232
,
132364
,
133405
,
134518
,
17630
,
18415
,
24304
,
38837
,
45930
,
55649
,
9269
,
59207
,
7535
,
9536
,
10238
,
132368
,
133424
,
134519
,
17651
,
18417
,
24329
,
10082
,
38841
,
45932
,
55725
,
59214
,
7539
,
9538
,
131091
,
132422
,
133428
,
134523
,
131590
,
17653
,
18419
,
24333
,
38843
,
4594
,
55743
,
59217
,
7540
,
9584
,
131142
,
132490
,
133077
,
133448
,
134524
,
17657
,
18420
,
24334
,
38844
,
4605
,
55750
,
59234
,
7577
,
9590
,
133905
,
131143
,
132499
,
133460
,
134544
,
17706
,
18421
,
24396
,
38845
,
4616
,
55778
,
135387
,
59237
,
7581
,
9660
,
131144
,
132506
,
133467
,
134548
,
17709
,
18422
,
24399
,
18042
,
38847
,
4623
,
55789
,
59248
,
7617
,
9671
,
131146
,
132549
,
133485
,
134608
,
24112
,
17710
,
18424
,
24449
,
38848
,
4635
,
55807
,
59268
,
7619
,
9674
,
131148
,
132585
,
38385
,
133486
,
134670
,
17711
,
18426
,
24462
,
38850
,
4637
,
55852
,
59270
,
7649
,
9676
,
45504
,
131149
,
132591
,
133488
,
134684
,
17712
,
18429
,
24506
,
38866
,
4641
,
55858
,
5018
,
59337
,
7650
,
9680
,
131150
,
132593
,
133549
,
134687
,
17713
,
201223
,
24545
,
58516
,
38870
,
4642
,
55940
,
59352
,
7651
,
9729
,
131184
,
132597
,
133578
,
134700
,
63959
,
17714
,
203926
,
24549
,
38873
,
4645
,
55952
,
59371
,
7656
,
9732
,
131188
,
132609
,
9289
,
133617
,
134705
,
17716
,
23648
,
24568
,
4058
,
4655
,
55953
,
62294
,
7695
,
9735
,
10085
,
131189
,
132610
,
133734
,
134706
,
17744
,
23709
,
2706
,
4158
,
4656
,
56059
,
131591
,
63527
,
7710
,
9831
,
131224
,
132698
,
133741
,
134729
,
17759
,
23712
,
3363
,
4352
,
133089
,
4658
,
56080
,
63834
,
9216
,
9879
,
131234
,
132702
,
133747
,
134795
,
17764
,
133929
,
23730
,
3462
,
45136
,
4662
,
56103
,
63845
,
9221
,
9906
,
131271
,
132714
,
133752
,
135391
,
134823
,
17793
,
23749
,
3661
,
4515
,
4748
,
56136
,
63849
,
9229
,
9908
,
131274
,
18045
,
132737
,
133771
,
134835
,
17794
,
23875
,
3662
,
45165
,
4760
,
56180
,
63855
,
9231
,
24115
,
9916
,
131278
,
132742
,
133772
,
134969
,
17809
,
23881
,
3693
,
45187
,
4780
,
38452
,
56190
,
63889
,
9237
,
9918
,
131280
,
132818
,
133777
,
135062
,
17814
,
23890
,
45508
,
38056
,
45247
,
4781
,
56195
,
63911
,
9242
,
9919
,
131324
,
132837
,
133779
,
55298
,
135081
,
17888
,
23985
,
38059
,
45250
,
4782
,
56276
,
63915
,
9244
,
9924
,
131337
,
58579
,
132865
,
133783
,
135140
,
17924
,
24002
,
38166
,
4528
,
4783
,
56302
,
63916
,
9253
,
63977
,
9925
,
131584
,
132883
,
133789
,
135147
,
17929
,
24010
,
38176
,
45327
,
4828
,
9293
,
58411
,
63927
,
9259
,
131586
,
132899
,
133793
,
135166
,
17975
,
24023
,
38177
,
10098
,
45346
,
4845
,
58426
,
63928
,
9263
,
131587
,
133027
,
133849
,
135314
,
17988
,
131593
,
24043
,
38186
,
45474
,
4849
,
58441
,
63929
,
9264
,
133107
,
133946
,
135413
,
18046
,
24154
,
38469
,
45561
,
55334
,
58627
,
63981
,
9304
,
10099
,
131596
,
133115
,
133948
,
135414
,
18047
,
24155
,
38475
,
45562
,
55350
,
58683
,
64033
,
9311
,
10103
,
131597
,
133126
,
133953
,
1659
,
18049
,
24157
,
38478
,
45572
,
55355
,
58708
,
64047
,
9346
,
10108
,
131599
,
133142
,
134094
,
17408
,
18116
,
24158
,
38486
,
45590
,
55361
,
58730
,
64067
,
9381
,
10116
,
131603
,
133158
,
134121
,
17416
,
18177
,
24160
,
38531
,
45597
,
55367
,
58744
,
64078
,
9409
,
10118
,
131994
,
133190
,
134127
,
17420
,
18179
,
24163
,
38574
,
45599
,
55369
,
58779
,
64087
,
9415
,
10126
,
132017
,
133199
,
134167
,
17421
,
18181
,
24164
,
38578
,
45640
,
55417
,
58797
,
7468
,
9416
,
10127
,
132056
,
133201
,
134175
,
17444
,
18182
,
24165
,
38580
,
45750
,
55480
,
58807
,
7478
,
9420
,
10135
,
132057
,
133204
,
134243
,
17485
,
18183
,
24167
,
38591
,
45753
,
55489
,
58815
,
7479
,
9444
,
10138
,
132157
,
133209
,
134366
,
17487
,
18185
,
24168
,
38603
,
45761
,
55512
,
58908
,
7481
,
9468
,
10147
,
132169
,
133322
,
134379
,
17537
,
18218
,
24182
,
38658
,
45816
,
55517
,
58931
,
7482
,
9474
,
10202
,
132252
,
133325
,
134387
,
17540
,
18382
,
24224
,
38797
,
45855
,
55536
,
58933
,
7484
,
9502
,
10205
,
132295
,
133372
,
134401
,
17554
,
18410
,
24235
,
38802
,
45908
,
55552
,
58944
,
7499
,
9505
,
10229
,
132310
,
133380
,
134446
,
17555
,
18411
,
24236
,
38814
,
45910
,
55558
,
58958
,
7532
,
9513
,
10231
,
132342
,
133398
,
134449
,
17619
,
18413
,
24246
,
38819
,
45911
,
55639
,
58985
,
7533
,
9520
,
10232
,
132364
,
133405
,
134518
,
17630
,
18415
,
24304
,
38837
,
45930
,
55649
,
59207
,
7535
,
9536
,
10238
,
132368
,
133424
,
134519
,
17651
,
18417
,
24329
,
38841
,
45932
,
55725
,
59214
,
7539
,
9538
,
131091
,
132422
,
133428
,
134523
,
17653
,
18419
,
24333
,
38843
,
4594
,
55743
,
59217
,
7540
,
9584
,
131142
,
132490
,
133448
,
134524
,
17657
,
18420
,
24334
,
38844
,
4605
,
55750
,
59234
,
7577
,
9590
,
131143
,
132499
,
133460
,
134544
,
17706
,
18421
,
24396
,
38845
,
4616
,
55778
,
59237
,
7581
,
9660
,
131144
,
132506
,
133467
,
134548
,
17709
,
18422
,
24399
,
38847
,
4623
,
55789
,
59248
,
7617
,
9671
,
131146
,
132549
,
133485
,
134608
,
17710
,
18424
,
24449
,
38848
,
4635
,
55807
,
59268
,
7619
,
9674
,
131148
,
132585
,
133486
,
134670
,
17711
,
18426
,
24462
,
38850
,
4637
,
55852
,
59270
,
7649
,
9676
,
131149
,
132591
,
133488
,
134684
,
17712
,
18429
,
24506
,
38866
,
4641
,
55858
,
59337
,
7650
,
9680
,
131150
,
132593
,
133549
,
134687
,
17713
,
201223
,
24545
,
38870
,
4642
,
55940
,
59352
,
7651
,
9729
,
131184
,
132597
,
133578
,
134700
,
17714
,
203926
,
24549
,
38873
,
4645
,
55952
,
59371
,
7656
,
9732
,
131188
,
132609
,
133617
,
134705
,
17716
,
23648
,
24568
,
4058
,
4655
,
55953
,
62294
,
7695
,
9735
,
131189
,
132610
,
133734
,
134706
,
17744
,
23709
,
2706
,
4158
,
4656
,
56059
,
63527
,
7710
,
9831
,
131224
,
132698
,
133741
,
134729
,
17759
,
23712
,
3363
,
4352
,
4658
,
56080
,
63834
,
9216
,
9879
,
131234
,
132702
,
133747
,
134795
,
17764
,
23730
,
3462
,
45136
,
4662
,
56103
,
63845
,
9221
,
9906
,
131271
,
132714
,
133752
,
134823
,
17793
,
23749
,
3661
,
4515
,
4748
,
56136
,
63849
,
9229
,
9908
,
131274
,
132737
,
133771
,
134835
,
17794
,
23875
,
3662
,
45165
,
4760
,
56180
,
63855
,
9231
,
9916
,
131278
,
132742
,
133772
,
134969
,
17809
,
23881
,
3693
,
45187
,
4780
,
56190
,
63889
,
9237
,
9918
,
131280
,
132818
,
133777
,
135062
,
17814
,
23890
,
38056
,
45247
,
4781
,
56195
,
63911
,
9242
,
9919
,
131324
,
132837
,
133779
,
135081
,
17888
,
23985
,
38059
,
45250
,
4782
,
56276
,
63915
,
9244
,
9924
,
131337
,
132865
,
133783
,
135140
,
17924
,
24002
,
38166
,
4528
,
4783
,
56302
,
63916
,
9253
,
9925
,
131584
,
132883
,
133789
,
135147
,
17929
,
24010
,
38176
,
45327
,
4828
,
58411
,
63927
,
9259
,
131586
,
132899
,
133793
,
135166
,
17975
,
24023
,
38177
,
45346
,
4845
,
58426
,
63928
,
9263
,
131587
,
133027
,
133849
,
135314
,
17988
,
24043
,
38186
,
45474
,
4849
,
58441
,
63929
,
9264
,
];
];
for
(
var
i
=
0
;
i
<
topoinASNumber
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
topoinASNumber
.
length
;
i
++
)
{
if
(
topoinASNumber
[
i
]
==
as
)
{
if
(
topoinASNumber
[
i
]
==
as
)
{
...
@@ -602,298 +105,297 @@ function isAsnumber(val) {
...
@@ -602,298 +105,297 @@ function isAsnumber(val) {
}
}
return
false
;
return
false
;
}
}
var
util
=
{};
var
util
=
{};
// util.countries =[{"country_cn":"欧盟","countrycode":"EU"},{"country_cn":"不丹","countrycode":"BT"},{"country_cn":"中国","countrycode":"CN"},{"country_cn":"中非","countrycode":"CF"},{"country_cn":"丹麦","countrycode":"DK"},{"country_cn":"乌克兰","countrycode":"UA"},{"country_cn":"乌兹别克斯坦","countrycode":"UZ"},{"country_cn":"乌干达","countrycode":"UG"},{"country_cn":"乌拉圭","countrycode":"UY"},{"country_cn":"乍得","countrycode":"TD"},{"country_cn":"也门","countrycode":"YE"},{"country_cn":"亚美尼亚","countrycode":"AM"},{"country_cn":"以色列","countrycode":"IL"},{"country_cn":"伊拉克","countrycode":"IQ"},{"country_cn":"伊朗","countrycode":"IR"},{"country_cn":"伯里兹","countrycode":"BZ"},{"country_cn":"佛得角","countrycode":"CV"},{"country_cn":"俄罗斯","countrycode":"RU"},{"country_cn":"保加利亚","countrycode":"BG"},{"country_cn":"克罗地亚","countrycode":"HR"},{"country_cn":"关岛","countrycode":"GU"},{"country_cn":"冈比亚","countrycode":"GM"},{"country_cn":"冰岛","countrycode":"IS"},{"country_cn":"几内亚","countrycode":"GN"},{"country_cn":"几内亚比绍","countrycode":"GW"},{"country_cn":"列支顿士登","countrycode":"LI"},{"country_cn":"刚果(布)","countrycode":"CG"},{"country_cn":"刚果(金)","countrycode":"CD"},{"country_cn":"利比亚","countrycode":"LY"},{"country_cn":"利比里亚","countrycode":"LR"},{"country_cn":"加拿大","countrycode":"CA"},{"country_cn":"加纳","countrycode":"GH"},{"country_cn":"加蓬","countrycode":"GA"},{"country_cn":"匈牙利","countrycode":"HU"},{"country_cn":"南苏丹","countrycode":"SS"},{"country_cn":"南非","countrycode":"ZA"},{"country_cn":"博茨瓦纳","countrycode":"BW"},{"country_cn":"卡塔尔","countrycode":"QA"},{"country_cn":"卢旺达","countrycode":"RW"},{"country_cn":"卢森堡","countrycode":"LU"},{"country_cn":"印度","countrycode":"IN"},{"country_cn":"印度尼西亚","countrycode":"ID"},{"country_cn":"危地马拉","countrycode":"GT"},{"country_cn":"厄瓜多尔","countrycode":"EC"},{"country_cn":"厄立特里亚","countrycode":"ER"},{"country_cn":"叙利亚","countrycode":"SY"},{"country_cn":"古巴","countrycode":"CU"},{"country_cn":"吉尔吉斯斯坦","countrycode":"KG"},{"country_cn":"吉布提","countrycode":"DJ"},{"country_cn":"哈萨克斯坦","countrycode":"KZ"},{"country_cn":"哥伦比亚","countrycode":"CO"},{"country_cn":"哥斯达黎加","countrycode":"CR"},{"country_cn":"喀麦隆","countrycode":"CM"},{"country_cn":"图瓦卢","countrycode":"TV"},{"country_cn":"土尔其","countrycode":"TR"},{"country_cn":"土库曼斯坦","countrycode":"TM"},{"country_cn":"圣基茨和尼维斯","countrycode":"KN"},{"country_cn":"圣多美和普林西比","countrycode":"ST"},{"country_cn":"圣巴泰勒米岛","countrycode":"BL"},{"country_cn":"圣文森特和格陵纳丁斯","countrycode":"VC"},{"country_cn":"圣皮埃尔和密克隆","countrycode":"PM"},{"country_cn":"圣马力诺","countrycode":"SM"},{"country_cn":"圭亚那","countrycode":"GY"},{"country_cn":"坦桑尼亚","countrycode":"TZ"},{"country_cn":"埃及","countrycode":"EG"},{"country_cn":"埃塞俄比亚","countrycode":"ET"},{"country_cn":"基里巴斯","countrycode":"KI"},{"country_cn":"塔吉克斯坦","countrycode":"TJ"},{"country_cn":"塞内加尔","countrycode":"SN"},{"country_cn":"塞尔维亚","countrycode":"RS"},{"country_cn":"塞拉利昂","countrycode":"SL"},{"country_cn":"塞普路斯","countrycode":"CY"},{"country_cn":"塞舌尔","countrycode":"SC"},{"country_cn":"墨西哥","countrycode":"MX"},{"country_cn":"多哥","countrycode":"TG"},{"country_cn":"多米尼加共和国","countrycode":"DM"},{"country_cn":"多米尼加联邦","countrycode":"DO"},{"country_cn":"奥兰群岛","countrycode":"AX"},{"country_cn":"奥地利","countrycode":"AT"},{"country_cn":"委内瑞拉","countrycode":"VE"},{"country_cn":"孟加拉","countrycode":"BD"},{"country_cn":"安哥拉","countrycode":"AO"},{"country_cn":"安圭拉","countrycode":"AI"},{"country_cn":"安提瓜和巴布达","countrycode":"AG"},{"country_cn":"安道尔","countrycode":"AD"},{"country_cn":"尼加拉瓜","countrycode":"NI"},{"country_cn":"尼日利亚","countrycode":"NG"},{"country_cn":"尼日尔","countrycode":"NE"},{"country_cn":"尼泊尔","countrycode":"NP"},{"country_cn":"巴勒斯坦","countrycode":"PS"},{"country_cn":"巴哈马","countrycode":"BS"},{"country_cn":"巴基斯坦","countrycode":"PK"},{"country_cn":"巴巴多斯","countrycode":"BB"},{"country_cn":"巴布亚新几内亚","countrycode":"PG"},{"country_cn":"巴拉圭","countrycode":"PY"},{"country_cn":"巴拿马","countrycode":"PA"},{"country_cn":"巴林","countrycode":"BH"},{"country_cn":"巴西","countrycode":"BR"},{"country_cn":"布基纳法索","countrycode":"BF"},{"country_cn":"布隆迪","countrycode":"BI"},{"country_cn":"希腊","countrycode":"GR"},{"country_cn":"帕劳","countrycode":"PW"},{"country_cn":"库克群岛","countrycode":"CK"},{"country_cn":"库拉索","countrycode":"CW"},{"country_cn":"开曼群岛","countrycode":"KY"},{"country_cn":"德国","countrycode":"DE"},{"country_cn":"意大利","countrycode":"IT"},{"country_cn":"所罗门群岛","countrycode":"SB"},{"country_cn":"拉托维亚","countrycode":"LV"},{"country_cn":"挪威","countrycode":"NO"},{"country_cn":"捷克","countrycode":"CZ"},{"country_cn":"摩尔多瓦","countrycode":"MD"},{"country_cn":"摩洛哥","countrycode":"MA"},{"country_cn":"摩纳哥","countrycode":"MC"},{"country_cn":"文莱布鲁萨兰","countrycode":"BN"},{"country_cn":"斐济","countrycode":"FJ"},{"country_cn":"斯威士兰","countrycode":"SZ"},{"country_cn":"斯洛伐克","countrycode":"SK"},{"country_cn":"斯罗文尼亚","countrycode":"SI"},{"country_cn":"斯里兰卡","countrycode":"LK"},{"country_cn":"新加坡","countrycode":"SG"},{"country_cn":"新卡里多尼亚","countrycode":"NC"},{"country_cn":"新西兰","countrycode":"NZ"},{"country_cn":"日本","countrycode":"JP"},{"country_cn":"智利","countrycode":"CL"},{"country_cn":"朝鲜","countrycode":"KP"},{"country_cn":"柬埔寨","countrycode":"KH"},{"country_cn":"根西岛","countrycode":"GG"},{"country_cn":"格林纳达","countrycode":"GD"},{"country_cn":"格陵兰岛","countrycode":"GL"},{"country_cn":"格鲁吉亚","countrycode":"GE"},{"country_cn":"梵蒂岗","countrycode":"VA"},{"country_cn":"比利时","countrycode":"BE"},{"country_cn":"毛里塔尼亚","countrycode":"MR"},{"country_cn":"毛里求斯","countrycode":"MU"},{"country_cn":"汤加","countrycode":"TO"},{"country_cn":"沙特阿拉伯","countrycode":"SA"},{"country_cn":"法国","countrycode":"FR"},{"country_cn":"法属圣马丁","countrycode":"MF"},{"country_cn":"法属圭亚那","countrycode":"GF"},{"country_cn":"法属尼留旺岛","countrycode":"RE"},{"country_cn":"中国香港","countrycode":"HK"},{"country_cn":"法属玻里尼西亚","countrycode":"PF"},{"country_cn":"法罗群岛","countrycode":"FO"},{"country_cn":"波兰","countrycode":"PL"},{"country_cn":"波多黎各","countrycode":"PR"},{"country_cn":"波黑","countrycode":"BA"},{"country_cn":"泰国","countrycode":"TH"},{"country_cn":"泽西岛","countrycode":"JE"},{"country_cn":"津巴布韦","countrycode":"ZW"},{"country_cn":"洪都拉斯","countrycode":"HN"},{"country_cn":"海地","countrycode":"HT"},{"country_cn":"澳大利亚","countrycode":"AU"},{"country_cn":"中国台湾","countrycode":"TW"},{"country_cn":"爱尔兰","countrycode":"IE"},{"country_cn":"爱沙尼亚","countrycode":"EE"},{"country_cn":"牙买加","countrycode":"JM"},{"country_cn":"特克斯和凯科斯群岛","countrycode":"TC"},{"country_cn":"特立尼达和多巴哥","countrycode":"TT"},{"country_cn":"玻利维亚","countrycode":"BO"},{"country_cn":"瑙鲁","countrycode":"NR"},{"country_cn":"瑞典","countrycode":"SE"},{"country_cn":"瑞士","countrycode":"CH"},{"country_cn":"瓦努阿鲁","countrycode":"VU"},{"country_cn":"白俄罗斯","countrycode":"BY"},{"country_cn":"百慕大","countrycode":"BM"},{"country_cn":"直布罗陀","countrycode":"GI"},{"country_cn":"科威特","countrycode":"KW"},{"country_cn":"科摩罗","countrycode":"KM"},{"country_cn":"科特迪瓦","countrycode":"CI"},{"country_cn":"秘鲁","countrycode":"PE"},{"country_cn":"突尼斯","countrycode":"TN"},{"country_cn":"立陶宛","countrycode":"LT"},{"country_cn":"米克罗尼西亚","countrycode":"FM"},{"country_cn":"索马里","countrycode":"SO"},{"country_cn":"约旦","countrycode":"JO"},{"country_cn":"纳米比亚","countrycode":"NA"},{"country_cn":"缅甸","countrycode":"MM"},{"country_cn":"罗马尼亚","countrycode":"RO"},{"country_cn":"美国","countrycode":"US"},{"country_cn":"美属维尔京群岛","countrycode":"VI"},{"country_cn":"老挝","countrycode":"LA"},{"country_cn":"肯尼亚","countrycode":"KE"},{"country_cn":"芬兰","countrycode":"FI"},{"country_cn":"苏丹","countrycode":"SD"},{"country_cn":"苏里南","countrycode":"SR"},{"country_cn":"英国","countrycode":"GB"},{"country_cn":"英属印度洋领地","countrycode":"IO"},{"country_cn":"英属维京群岛","countrycode":"VG"},{"country_cn":"荷兰","countrycode":"NL"},{"country_cn":"荷兰加勒比区","countrycode":"BQ"},{"country_cn":"荷属圣马丁","countrycode":"SX"},{"country_cn":"莫桑比克","countrycode":"MZ"},{"country_cn":"莱索托","countrycode":"LS"},{"country_cn":"菲律宾","countrycode":"PH"},{"country_cn":"萨尔瓦多","countrycode":"SV"},{"country_cn":"萨摩亚","countrycode":"WS"},{"country_cn":"葡萄牙","countrycode":"PT"},{"country_cn":"蒙古","countrycode":"MN"},{"country_cn":"西班牙","countrycode":"ES"},{"country_cn":"诺福克岛","countrycode":"NF"},{"country_cn":"贝宁","countrycode":"BJ"},{"country_cn":"赞比亚","countrycode":"ZM"},{"country_cn":"赤道几内亚","countrycode":"GQ"},{"country_cn":"越南","countrycode":"VN"},{"country_cn":"阿塞拜疆","countrycode":"AZ"},{"country_cn":"阿富汗","countrycode":"AF"},{"country_cn":"阿尔及利亚","countrycode":"DZ"},{"country_cn":"阿尔巴尼亚","countrycode":"AL"},{"country_cn":"阿曼","countrycode":"OM"},{"country_cn":"阿根廷","countrycode":"AR"},{"country_cn":"阿联酋","countrycode":"AE"},{"country_cn":"阿鲁巴","countrycode":"AW"},{"country_cn":"韩国","countrycode":"KR"},{"country_cn":"马其顿","countrycode":"MK"},{"country_cn":"马尔代夫","countrycode":"MV"},{"country_cn":"马恩岛","countrycode":"IM"},{"country_cn":"马拉维","countrycode":"MW"},{"country_cn":"马来西亚","countrycode":"MY"},{"country_cn":"马绍尔群岛","countrycode":"MH"},{"country_cn":"马耳他","countrycode":"MT"},{"country_cn":"马达加斯加","countrycode":"MG"},{"country_cn":"马里","countrycode":"ML"},{"country_cn":"黎巴嫩","countrycode":"LB"},{"country_cn":"黑山","countrycode":"ME"},{"country_cn":"东萨摩亚","countrycode":"AS"}];
// util.countries =[{"country_cn":"欧盟","countrycode":"EU"},{"country_cn":"不丹","countrycode":"BT"},{"country_cn":"中国","countrycode":"CN"},{"country_cn":"中非","countrycode":"CF"},{"country_cn":"丹麦","countrycode":"DK"},{"country_cn":"乌克兰","countrycode":"UA"},{"country_cn":"乌兹别克斯坦","countrycode":"UZ"},{"country_cn":"乌干达","countrycode":"UG"},{"country_cn":"乌拉圭","countrycode":"UY"},{"country_cn":"乍得","countrycode":"TD"},{"country_cn":"也门","countrycode":"YE"},{"country_cn":"亚美尼亚","countrycode":"AM"},{"country_cn":"以色列","countrycode":"IL"},{"country_cn":"伊拉克","countrycode":"IQ"},{"country_cn":"伊朗","countrycode":"IR"},{"country_cn":"伯里兹","countrycode":"BZ"},{"country_cn":"佛得角","countrycode":"CV"},{"country_cn":"俄罗斯","countrycode":"RU"},{"country_cn":"保加利亚","countrycode":"BG"},{"country_cn":"克罗地亚","countrycode":"HR"},{"country_cn":"关岛","countrycode":"GU"},{"country_cn":"冈比亚","countrycode":"GM"},{"country_cn":"冰岛","countrycode":"IS"},{"country_cn":"几内亚","countrycode":"GN"},{"country_cn":"几内亚比绍","countrycode":"GW"},{"country_cn":"列支顿士登","countrycode":"LI"},{"country_cn":"刚果(布)","countrycode":"CG"},{"country_cn":"刚果(金)","countrycode":"CD"},{"country_cn":"利比亚","countrycode":"LY"},{"country_cn":"利比里亚","countrycode":"LR"},{"country_cn":"加拿大","countrycode":"CA"},{"country_cn":"加纳","countrycode":"GH"},{"country_cn":"加蓬","countrycode":"GA"},{"country_cn":"匈牙利","countrycode":"HU"},{"country_cn":"南苏丹","countrycode":"SS"},{"country_cn":"南非","countrycode":"ZA"},{"country_cn":"博茨瓦纳","countrycode":"BW"},{"country_cn":"卡塔尔","countrycode":"QA"},{"country_cn":"卢旺达","countrycode":"RW"},{"country_cn":"卢森堡","countrycode":"LU"},{"country_cn":"印度","countrycode":"IN"},{"country_cn":"印度尼西亚","countrycode":"ID"},{"country_cn":"危地马拉","countrycode":"GT"},{"country_cn":"厄瓜多尔","countrycode":"EC"},{"country_cn":"厄立特里亚","countrycode":"ER"},{"country_cn":"叙利亚","countrycode":"SY"},{"country_cn":"古巴","countrycode":"CU"},{"country_cn":"吉尔吉斯斯坦","countrycode":"KG"},{"country_cn":"吉布提","countrycode":"DJ"},{"country_cn":"哈萨克斯坦","countrycode":"KZ"},{"country_cn":"哥伦比亚","countrycode":"CO"},{"country_cn":"哥斯达黎加","countrycode":"CR"},{"country_cn":"喀麦隆","countrycode":"CM"},{"country_cn":"图瓦卢","countrycode":"TV"},{"country_cn":"土尔其","countrycode":"TR"},{"country_cn":"土库曼斯坦","countrycode":"TM"},{"country_cn":"圣基茨和尼维斯","countrycode":"KN"},{"country_cn":"圣多美和普林西比","countrycode":"ST"},{"country_cn":"圣巴泰勒米岛","countrycode":"BL"},{"country_cn":"圣文森特和格陵纳丁斯","countrycode":"VC"},{"country_cn":"圣皮埃尔和密克隆","countrycode":"PM"},{"country_cn":"圣马力诺","countrycode":"SM"},{"country_cn":"圭亚那","countrycode":"GY"},{"country_cn":"坦桑尼亚","countrycode":"TZ"},{"country_cn":"埃及","countrycode":"EG"},{"country_cn":"埃塞俄比亚","countrycode":"ET"},{"country_cn":"基里巴斯","countrycode":"KI"},{"country_cn":"塔吉克斯坦","countrycode":"TJ"},{"country_cn":"塞内加尔","countrycode":"SN"},{"country_cn":"塞尔维亚","countrycode":"RS"},{"country_cn":"塞拉利昂","countrycode":"SL"},{"country_cn":"塞普路斯","countrycode":"CY"},{"country_cn":"塞舌尔","countrycode":"SC"},{"country_cn":"墨西哥","countrycode":"MX"},{"country_cn":"多哥","countrycode":"TG"},{"country_cn":"多米尼加共和国","countrycode":"DM"},{"country_cn":"多米尼加联邦","countrycode":"DO"},{"country_cn":"奥兰群岛","countrycode":"AX"},{"country_cn":"奥地利","countrycode":"AT"},{"country_cn":"委内瑞拉","countrycode":"VE"},{"country_cn":"孟加拉","countrycode":"BD"},{"country_cn":"安哥拉","countrycode":"AO"},{"country_cn":"安圭拉","countrycode":"AI"},{"country_cn":"安提瓜和巴布达","countrycode":"AG"},{"country_cn":"安道尔","countrycode":"AD"},{"country_cn":"尼加拉瓜","countrycode":"NI"},{"country_cn":"尼日利亚","countrycode":"NG"},{"country_cn":"尼日尔","countrycode":"NE"},{"country_cn":"尼泊尔","countrycode":"NP"},{"country_cn":"巴勒斯坦","countrycode":"PS"},{"country_cn":"巴哈马","countrycode":"BS"},{"country_cn":"巴基斯坦","countrycode":"PK"},{"country_cn":"巴巴多斯","countrycode":"BB"},{"country_cn":"巴布亚新几内亚","countrycode":"PG"},{"country_cn":"巴拉圭","countrycode":"PY"},{"country_cn":"巴拿马","countrycode":"PA"},{"country_cn":"巴林","countrycode":"BH"},{"country_cn":"巴西","countrycode":"BR"},{"country_cn":"布基纳法索","countrycode":"BF"},{"country_cn":"布隆迪","countrycode":"BI"},{"country_cn":"希腊","countrycode":"GR"},{"country_cn":"帕劳","countrycode":"PW"},{"country_cn":"库克群岛","countrycode":"CK"},{"country_cn":"库拉索","countrycode":"CW"},{"country_cn":"开曼群岛","countrycode":"KY"},{"country_cn":"德国","countrycode":"DE"},{"country_cn":"意大利","countrycode":"IT"},{"country_cn":"所罗门群岛","countrycode":"SB"},{"country_cn":"拉托维亚","countrycode":"LV"},{"country_cn":"挪威","countrycode":"NO"},{"country_cn":"捷克","countrycode":"CZ"},{"country_cn":"摩尔多瓦","countrycode":"MD"},{"country_cn":"摩洛哥","countrycode":"MA"},{"country_cn":"摩纳哥","countrycode":"MC"},{"country_cn":"文莱布鲁萨兰","countrycode":"BN"},{"country_cn":"斐济","countrycode":"FJ"},{"country_cn":"斯威士兰","countrycode":"SZ"},{"country_cn":"斯洛伐克","countrycode":"SK"},{"country_cn":"斯罗文尼亚","countrycode":"SI"},{"country_cn":"斯里兰卡","countrycode":"LK"},{"country_cn":"新加坡","countrycode":"SG"},{"country_cn":"新卡里多尼亚","countrycode":"NC"},{"country_cn":"新西兰","countrycode":"NZ"},{"country_cn":"日本","countrycode":"JP"},{"country_cn":"智利","countrycode":"CL"},{"country_cn":"朝鲜","countrycode":"KP"},{"country_cn":"柬埔寨","countrycode":"KH"},{"country_cn":"根西岛","countrycode":"GG"},{"country_cn":"格林纳达","countrycode":"GD"},{"country_cn":"格陵兰岛","countrycode":"GL"},{"country_cn":"格鲁吉亚","countrycode":"GE"},{"country_cn":"梵蒂岗","countrycode":"VA"},{"country_cn":"比利时","countrycode":"BE"},{"country_cn":"毛里塔尼亚","countrycode":"MR"},{"country_cn":"毛里求斯","countrycode":"MU"},{"country_cn":"汤加","countrycode":"TO"},{"country_cn":"沙特阿拉伯","countrycode":"SA"},{"country_cn":"法国","countrycode":"FR"},{"country_cn":"法属圣马丁","countrycode":"MF"},{"country_cn":"法属圭亚那","countrycode":"GF"},{"country_cn":"法属尼留旺岛","countrycode":"RE"},{"country_cn":"中国香港","countrycode":"HK"},{"country_cn":"法属玻里尼西亚","countrycode":"PF"},{"country_cn":"法罗群岛","countrycode":"FO"},{"country_cn":"波兰","countrycode":"PL"},{"country_cn":"波多黎各","countrycode":"PR"},{"country_cn":"波黑","countrycode":"BA"},{"country_cn":"泰国","countrycode":"TH"},{"country_cn":"泽西岛","countrycode":"JE"},{"country_cn":"津巴布韦","countrycode":"ZW"},{"country_cn":"洪都拉斯","countrycode":"HN"},{"country_cn":"海地","countrycode":"HT"},{"country_cn":"澳大利亚","countrycode":"AU"},{"country_cn":"中国台湾","countrycode":"TW"},{"country_cn":"爱尔兰","countrycode":"IE"},{"country_cn":"爱沙尼亚","countrycode":"EE"},{"country_cn":"牙买加","countrycode":"JM"},{"country_cn":"特克斯和凯科斯群岛","countrycode":"TC"},{"country_cn":"特立尼达和多巴哥","countrycode":"TT"},{"country_cn":"玻利维亚","countrycode":"BO"},{"country_cn":"瑙鲁","countrycode":"NR"},{"country_cn":"瑞典","countrycode":"SE"},{"country_cn":"瑞士","countrycode":"CH"},{"country_cn":"瓦努阿鲁","countrycode":"VU"},{"country_cn":"白俄罗斯","countrycode":"BY"},{"country_cn":"百慕大","countrycode":"BM"},{"country_cn":"直布罗陀","countrycode":"GI"},{"country_cn":"科威特","countrycode":"KW"},{"country_cn":"科摩罗","countrycode":"KM"},{"country_cn":"科特迪瓦","countrycode":"CI"},{"country_cn":"秘鲁","countrycode":"PE"},{"country_cn":"突尼斯","countrycode":"TN"},{"country_cn":"立陶宛","countrycode":"LT"},{"country_cn":"米克罗尼西亚","countrycode":"FM"},{"country_cn":"索马里","countrycode":"SO"},{"country_cn":"约旦","countrycode":"JO"},{"country_cn":"纳米比亚","countrycode":"NA"},{"country_cn":"缅甸","countrycode":"MM"},{"country_cn":"罗马尼亚","countrycode":"RO"},{"country_cn":"美国","countrycode":"US"},{"country_cn":"美属维尔京群岛","countrycode":"VI"},{"country_cn":"老挝","countrycode":"LA"},{"country_cn":"肯尼亚","countrycode":"KE"},{"country_cn":"芬兰","countrycode":"FI"},{"country_cn":"苏丹","countrycode":"SD"},{"country_cn":"苏里南","countrycode":"SR"},{"country_cn":"英国","countrycode":"GB"},{"country_cn":"英属印度洋领地","countrycode":"IO"},{"country_cn":"英属维京群岛","countrycode":"VG"},{"country_cn":"荷兰","countrycode":"NL"},{"country_cn":"荷兰加勒比区","countrycode":"BQ"},{"country_cn":"荷属圣马丁","countrycode":"SX"},{"country_cn":"莫桑比克","countrycode":"MZ"},{"country_cn":"莱索托","countrycode":"LS"},{"country_cn":"菲律宾","countrycode":"PH"},{"country_cn":"萨尔瓦多","countrycode":"SV"},{"country_cn":"萨摩亚","countrycode":"WS"},{"country_cn":"葡萄牙","countrycode":"PT"},{"country_cn":"蒙古","countrycode":"MN"},{"country_cn":"西班牙","countrycode":"ES"},{"country_cn":"诺福克岛","countrycode":"NF"},{"country_cn":"贝宁","countrycode":"BJ"},{"country_cn":"赞比亚","countrycode":"ZM"},{"country_cn":"赤道几内亚","countrycode":"GQ"},{"country_cn":"越南","countrycode":"VN"},{"country_cn":"阿塞拜疆","countrycode":"AZ"},{"country_cn":"阿富汗","countrycode":"AF"},{"country_cn":"阿尔及利亚","countrycode":"DZ"},{"country_cn":"阿尔巴尼亚","countrycode":"AL"},{"country_cn":"阿曼","countrycode":"OM"},{"country_cn":"阿根廷","countrycode":"AR"},{"country_cn":"阿联酋","countrycode":"AE"},{"country_cn":"阿鲁巴","countrycode":"AW"},{"country_cn":"韩国","countrycode":"KR"},{"country_cn":"马其顿","countrycode":"MK"},{"country_cn":"马尔代夫","countrycode":"MV"},{"country_cn":"马恩岛","countrycode":"IM"},{"country_cn":"马拉维","countrycode":"MW"},{"country_cn":"马来西亚","countrycode":"MY"},{"country_cn":"马绍尔群岛","countrycode":"MH"},{"country_cn":"马耳他","countrycode":"MT"},{"country_cn":"马达加斯加","countrycode":"MG"},{"country_cn":"马里","countrycode":"ML"},{"country_cn":"黎巴嫩","countrycode":"LB"},{"country_cn":"黑山","countrycode":"ME"},{"country_cn":"东萨摩亚","countrycode":"AS"}];
util
.
countries
=
[
util
.
countries
=
[
// { country_cn: '欧盟', countrycode: 'EU' },
// { country_cn: '欧盟', countrycode: 'EU' },
{
country_cn
:
'不丹'
,
countrycode
:
'BT'
},
{
country_cn
:
"不丹"
,
countrycode
:
"BT"
},
{
country_cn
:
'中国'
,
countrycode
:
'CN'
},
{
country_cn
:
"中国"
,
countrycode
:
"CN"
},
{
country_cn
:
'中非'
,
countrycode
:
'CF'
},
{
country_cn
:
"中非"
,
countrycode
:
"CF"
},
{
country_cn
:
'丹麦'
,
countrycode
:
'DK'
},
{
country_cn
:
"丹麦"
,
countrycode
:
"DK"
},
{
country_cn
:
'乌克兰'
,
countrycode
:
'UA'
},
{
country_cn
:
"乌克兰"
,
countrycode
:
"UA"
},
{
country_cn
:
'乌兹别克斯坦'
,
countrycode
:
'UZ'
},
{
country_cn
:
"乌兹别克斯坦"
,
countrycode
:
"UZ"
},
{
country_cn
:
'乌干达'
,
countrycode
:
'UG'
},
{
country_cn
:
"乌干达"
,
countrycode
:
"UG"
},
{
country_cn
:
'乌拉圭'
,
countrycode
:
'UY'
},
{
country_cn
:
"乌拉圭"
,
countrycode
:
"UY"
},
{
country_cn
:
'乍得'
,
countrycode
:
'TD'
},
{
country_cn
:
"乍得"
,
countrycode
:
"TD"
},
{
country_cn
:
'也门'
,
countrycode
:
'YE'
},
{
country_cn
:
"也门"
,
countrycode
:
"YE"
},
{
country_cn
:
'亚美尼亚'
,
countrycode
:
'AM'
},
{
country_cn
:
"亚美尼亚"
,
countrycode
:
"AM"
},
{
country_cn
:
'以色列'
,
countrycode
:
'IL'
},
{
country_cn
:
"以色列"
,
countrycode
:
"IL"
},
{
country_cn
:
'伊拉克'
,
countrycode
:
'IQ'
},
{
country_cn
:
"伊拉克"
,
countrycode
:
"IQ"
},
{
country_cn
:
'伊朗'
,
countrycode
:
'IR'
},
{
country_cn
:
"伊朗"
,
countrycode
:
"IR"
},
{
country_cn
:
'伯利兹'
,
countrycode
:
'BZ'
},
{
country_cn
:
"伯利兹"
,
countrycode
:
"BZ"
},
{
country_cn
:
'佛得角'
,
countrycode
:
'CV'
},
{
country_cn
:
"佛得角"
,
countrycode
:
"CV"
},
{
country_cn
:
'俄罗斯'
,
countrycode
:
'RU'
},
{
country_cn
:
"俄罗斯"
,
countrycode
:
"RU"
},
{
country_cn
:
'保加利亚'
,
countrycode
:
'BG'
},
{
country_cn
:
"保加利亚"
,
countrycode
:
"BG"
},
{
country_cn
:
'克罗地亚'
,
countrycode
:
'HR'
},
{
country_cn
:
"克罗地亚"
,
countrycode
:
"HR"
},
{
country_cn
:
'关岛'
,
countrycode
:
'GU'
},
{
country_cn
:
"关岛"
,
countrycode
:
"GU"
},
{
country_cn
:
'冈比亚'
,
countrycode
:
'GM'
},
{
country_cn
:
"冈比亚"
,
countrycode
:
"GM"
},
{
country_cn
:
'冰岛'
,
countrycode
:
'IS'
},
{
country_cn
:
"冰岛"
,
countrycode
:
"IS"
},
{
country_cn
:
'几内亚'
,
countrycode
:
'GN'
},
{
country_cn
:
"几内亚"
,
countrycode
:
"GN"
},
{
country_cn
:
'几内亚比绍'
,
countrycode
:
'GW'
},
{
country_cn
:
"几内亚比绍"
,
countrycode
:
"GW"
},
// { country_cn: '列支顿士登', countrycode: 'LI' },
// { country_cn: '列支顿士登', countrycode: 'LI' },
{
country_cn
:
'列支敦士登'
,
countrycode
:
'LI'
},
{
country_cn
:
"列支敦士登"
,
countrycode
:
"LI"
},
{
country_cn
:
'刚果(布)'
,
countrycode
:
'CG'
},
{
country_cn
:
"刚果(布)"
,
countrycode
:
"CG"
},
{
country_cn
:
'刚果(金)'
,
countrycode
:
'CD'
},
{
country_cn
:
"刚果(金)"
,
countrycode
:
"CD"
},
{
country_cn
:
'利比亚'
,
countrycode
:
'LY'
},
{
country_cn
:
"利比亚"
,
countrycode
:
"LY"
},
{
country_cn
:
'利比里亚'
,
countrycode
:
'LR'
},
{
country_cn
:
"利比里亚"
,
countrycode
:
"LR"
},
{
country_cn
:
'加拿大'
,
countrycode
:
'CA'
},
{
country_cn
:
"加拿大"
,
countrycode
:
"CA"
},
{
country_cn
:
'加纳'
,
countrycode
:
'GH'
},
{
country_cn
:
"加纳"
,
countrycode
:
"GH"
},
{
country_cn
:
'加蓬'
,
countrycode
:
'GA'
},
{
country_cn
:
"加蓬"
,
countrycode
:
"GA"
},
{
country_cn
:
'匈牙利'
,
countrycode
:
'HU'
},
{
country_cn
:
"匈牙利"
,
countrycode
:
"HU"
},
{
country_cn
:
'南苏丹'
,
countrycode
:
'SS'
},
{
country_cn
:
"南苏丹"
,
countrycode
:
"SS"
},
{
country_cn
:
'南非'
,
countrycode
:
'ZA'
},
{
country_cn
:
"南非"
,
countrycode
:
"ZA"
},
{
country_cn
:
'博茨瓦纳'
,
countrycode
:
'BW'
},
{
country_cn
:
"博茨瓦纳"
,
countrycode
:
"BW"
},
{
country_cn
:
'卡塔尔'
,
countrycode
:
'QA'
},
{
country_cn
:
"卡塔尔"
,
countrycode
:
"QA"
},
{
country_cn
:
'卢旺达'
,
countrycode
:
'RW'
},
{
country_cn
:
"卢旺达"
,
countrycode
:
"RW"
},
{
country_cn
:
'卢森堡'
,
countrycode
:
'LU'
},
{
country_cn
:
"卢森堡"
,
countrycode
:
"LU"
},
{
country_cn
:
'印度'
,
countrycode
:
'IN'
},
{
country_cn
:
"印度"
,
countrycode
:
"IN"
},
{
country_cn
:
'印度尼西亚'
,
countrycode
:
'ID'
},
{
country_cn
:
"印度尼西亚"
,
countrycode
:
"ID"
},
{
country_cn
:
'危地马拉'
,
countrycode
:
'GT'
},
{
country_cn
:
"危地马拉"
,
countrycode
:
"GT"
},
{
country_cn
:
'厄瓜多尔'
,
countrycode
:
'EC'
},
{
country_cn
:
"厄瓜多尔"
,
countrycode
:
"EC"
},
{
country_cn
:
'厄立特里亚'
,
countrycode
:
'ER'
},
{
country_cn
:
"厄立特里亚"
,
countrycode
:
"ER"
},
{
country_cn
:
'叙利亚'
,
countrycode
:
'SY'
},
{
country_cn
:
"叙利亚"
,
countrycode
:
"SY"
},
{
country_cn
:
'古巴'
,
countrycode
:
'CU'
},
{
country_cn
:
"古巴"
,
countrycode
:
"CU"
},
{
country_cn
:
'吉尔吉斯斯坦'
,
countrycode
:
'KG'
},
{
country_cn
:
"吉尔吉斯斯坦"
,
countrycode
:
"KG"
},
{
country_cn
:
'吉布提'
,
countrycode
:
'DJ'
},
{
country_cn
:
"吉布提"
,
countrycode
:
"DJ"
},
{
country_cn
:
'哈萨克斯坦'
,
countrycode
:
'KZ'
},
{
country_cn
:
"哈萨克斯坦"
,
countrycode
:
"KZ"
},
{
country_cn
:
'哥伦比亚'
,
countrycode
:
'CO'
},
{
country_cn
:
"哥伦比亚"
,
countrycode
:
"CO"
},
{
country_cn
:
'哥斯达黎加'
,
countrycode
:
'CR'
},
{
country_cn
:
"哥斯达黎加"
,
countrycode
:
"CR"
},
{
country_cn
:
'喀麦隆'
,
countrycode
:
'CM'
},
{
country_cn
:
"喀麦隆"
,
countrycode
:
"CM"
},
{
country_cn
:
'图瓦卢'
,
countrycode
:
'TV'
},
{
country_cn
:
"图瓦卢"
,
countrycode
:
"TV"
},
// { country_cn: '土尔其', countrycode: 'TR' },
// { country_cn: '土尔其', countrycode: 'TR' },
{
country_cn
:
'土耳其'
,
countrycode
:
'TR'
},
{
country_cn
:
"土耳其"
,
countrycode
:
"TR"
},
{
country_cn
:
'土库曼斯坦'
,
countrycode
:
'TM'
},
{
country_cn
:
"土库曼斯坦"
,
countrycode
:
"TM"
},
{
country_cn
:
'圣基茨和尼维斯'
,
countrycode
:
'KN'
},
{
country_cn
:
"圣基茨和尼维斯"
,
countrycode
:
"KN"
},
{
country_cn
:
'圣多美和普林西比'
,
countrycode
:
'ST'
},
{
country_cn
:
"圣多美和普林西比"
,
countrycode
:
"ST"
},
{
country_cn
:
'圣巴泰勒米岛'
,
countrycode
:
'BL'
},
{
country_cn
:
"圣巴泰勒米岛"
,
countrycode
:
"BL"
},
// { country_cn: '圣文森特和格陵纳丁斯', countrycode: 'VC' },
// { country_cn: '圣文森特和格陵纳丁斯', countrycode: 'VC' },
{
country_cn
:
'圣文森特和格林纳丁斯'
,
countrycode
:
'VC'
},
{
country_cn
:
"圣文森特和格林纳丁斯"
,
countrycode
:
"VC"
},
// { country_cn: '圣皮埃尔和密克隆', countrycode: 'PM' },
// { country_cn: '圣皮埃尔和密克隆', countrycode: 'PM' },
{
country_cn
:
'圣皮埃尔和密克隆群岛'
,
countrycode
:
'PM'
},
{
country_cn
:
"圣皮埃尔和密克隆群岛"
,
countrycode
:
"PM"
},
{
country_cn
:
'圣马力诺'
,
countrycode
:
'SM'
},
{
country_cn
:
"圣马力诺"
,
countrycode
:
"SM"
},
{
country_cn
:
'圭亚那'
,
countrycode
:
'GY'
},
{
country_cn
:
"圭亚那"
,
countrycode
:
"GY"
},
{
country_cn
:
'坦桑尼亚'
,
countrycode
:
'TZ'
},
{
country_cn
:
"坦桑尼亚"
,
countrycode
:
"TZ"
},
{
country_cn
:
'埃及'
,
countrycode
:
'EG'
},
{
country_cn
:
"埃及"
,
countrycode
:
"EG"
},
{
country_cn
:
'埃塞俄比亚'
,
countrycode
:
'ET'
},
{
country_cn
:
"埃塞俄比亚"
,
countrycode
:
"ET"
},
{
country_cn
:
'基里巴斯'
,
countrycode
:
'KI'
},
{
country_cn
:
"基里巴斯"
,
countrycode
:
"KI"
},
{
country_cn
:
'塔吉克斯坦'
,
countrycode
:
'TJ'
},
{
country_cn
:
"塔吉克斯坦"
,
countrycode
:
"TJ"
},
{
country_cn
:
'塞内加尔'
,
countrycode
:
'SN'
},
{
country_cn
:
"塞内加尔"
,
countrycode
:
"SN"
},
{
country_cn
:
'塞尔维亚'
,
countrycode
:
'RS'
},
{
country_cn
:
"塞尔维亚"
,
countrycode
:
"RS"
},
{
country_cn
:
'塞拉利昂'
,
countrycode
:
'SL'
},
{
country_cn
:
"塞拉利昂"
,
countrycode
:
"SL"
},
// { country_cn: '塞普路斯', countrycode: 'CY' },
// { country_cn: '塞普路斯', countrycode: 'CY' },
{
country_cn
:
'塞浦路斯'
,
countrycode
:
'CY'
},
{
country_cn
:
"塞浦路斯"
,
countrycode
:
"CY"
},
{
country_cn
:
'塞舌尔'
,
countrycode
:
'SC'
},
{
country_cn
:
"塞舌尔"
,
countrycode
:
"SC"
},
{
country_cn
:
'墨西哥'
,
countrycode
:
'MX'
},
{
country_cn
:
"墨西哥"
,
countrycode
:
"MX"
},
{
country_cn
:
'多哥'
,
countrycode
:
'TG'
},
{
country_cn
:
"多哥"
,
countrycode
:
"TG"
},
// { country_cn: '多米尼加共和国', countrycode: 'DM' },
// { country_cn: '多米尼加共和国', countrycode: 'DM' },
{
country_cn
:
'多米尼克'
,
countrycode
:
'DM'
},
{
country_cn
:
"多米尼克"
,
countrycode
:
"DM"
},
{
country_cn
:
'多米尼加共和国'
,
countrycode
:
'DO'
},
{
country_cn
:
"多米尼加共和国"
,
countrycode
:
"DO"
},
// { country_cn: '多米尼加联邦', countrycode: 'DO' },
// { country_cn: '多米尼加联邦', countrycode: 'DO' },
{
country_cn
:
'奥兰群岛'
,
countrycode
:
'AX'
},
{
country_cn
:
"奥兰群岛"
,
countrycode
:
"AX"
},
{
country_cn
:
'奥地利'
,
countrycode
:
'AT'
},
{
country_cn
:
"奥地利"
,
countrycode
:
"AT"
},
{
country_cn
:
'委内瑞拉'
,
countrycode
:
'VE'
},
{
country_cn
:
"委内瑞拉"
,
countrycode
:
"VE"
},
{
country_cn
:
'孟加拉'
,
countrycode
:
'BD'
},
{
country_cn
:
"孟加拉"
,
countrycode
:
"BD"
},
{
country_cn
:
'安哥拉'
,
countrycode
:
'AO'
},
{
country_cn
:
"安哥拉"
,
countrycode
:
"AO"
},
{
country_cn
:
'安圭拉'
,
countrycode
:
'AI'
},
{
country_cn
:
"安圭拉"
,
countrycode
:
"AI"
},
{
country_cn
:
'安提瓜和巴布达'
,
countrycode
:
'AG'
},
{
country_cn
:
"安提瓜和巴布达"
,
countrycode
:
"AG"
},
{
country_cn
:
'安道尔'
,
countrycode
:
'AD'
},
{
country_cn
:
"安道尔"
,
countrycode
:
"AD"
},
{
country_cn
:
'尼加拉瓜'
,
countrycode
:
'NI'
},
{
country_cn
:
"尼加拉瓜"
,
countrycode
:
"NI"
},
{
country_cn
:
'尼日利亚'
,
countrycode
:
'NG'
},
{
country_cn
:
"尼日利亚"
,
countrycode
:
"NG"
},
{
country_cn
:
'尼日尔'
,
countrycode
:
'NE'
},
{
country_cn
:
"尼日尔"
,
countrycode
:
"NE"
},
{
country_cn
:
'尼泊尔'
,
countrycode
:
'NP'
},
{
country_cn
:
"尼泊尔"
,
countrycode
:
"NP"
},
{
country_cn
:
'巴勒斯坦'
,
countrycode
:
'PS'
},
{
country_cn
:
"巴勒斯坦"
,
countrycode
:
"PS"
},
{
country_cn
:
'巴哈马'
,
countrycode
:
'BS'
},
{
country_cn
:
"巴哈马"
,
countrycode
:
"BS"
},
{
country_cn
:
'巴基斯坦'
,
countrycode
:
'PK'
},
{
country_cn
:
"巴基斯坦"
,
countrycode
:
"PK"
},
{
country_cn
:
'巴巴多斯'
,
countrycode
:
'BB'
},
{
country_cn
:
"巴巴多斯"
,
countrycode
:
"BB"
},
{
country_cn
:
'巴布亚新几内亚'
,
countrycode
:
'PG'
},
{
country_cn
:
"巴布亚新几内亚"
,
countrycode
:
"PG"
},
{
country_cn
:
'巴拉圭'
,
countrycode
:
'PY'
},
{
country_cn
:
"巴拉圭"
,
countrycode
:
"PY"
},
{
country_cn
:
'巴拿马'
,
countrycode
:
'PA'
},
{
country_cn
:
"巴拿马"
,
countrycode
:
"PA"
},
{
country_cn
:
'巴林'
,
countrycode
:
'BH'
},
{
country_cn
:
"巴林"
,
countrycode
:
"BH"
},
{
country_cn
:
'巴西'
,
countrycode
:
'BR'
},
{
country_cn
:
"巴西"
,
countrycode
:
"BR"
},
{
country_cn
:
'布基纳法索'
,
countrycode
:
'BF'
},
{
country_cn
:
"布基纳法索"
,
countrycode
:
"BF"
},
{
country_cn
:
'布隆迪'
,
countrycode
:
'BI'
},
{
country_cn
:
"布隆迪"
,
countrycode
:
"BI"
},
{
country_cn
:
'希腊'
,
countrycode
:
'GR'
},
{
country_cn
:
"希腊"
,
countrycode
:
"GR"
},
{
country_cn
:
'帕劳'
,
countrycode
:
'PW'
},
{
country_cn
:
"帕劳"
,
countrycode
:
"PW"
},
{
country_cn
:
'库克群岛'
,
countrycode
:
'CK'
},
{
country_cn
:
"库克群岛"
,
countrycode
:
"CK"
},
{
country_cn
:
'库拉索岛'
,
countrycode
:
'CW'
},
{
country_cn
:
"库拉索岛"
,
countrycode
:
"CW"
},
{
country_cn
:
'开曼群岛'
,
countrycode
:
'KY'
},
{
country_cn
:
"开曼群岛"
,
countrycode
:
"KY"
},
{
country_cn
:
'德国'
,
countrycode
:
'DE'
},
{
country_cn
:
"德国"
,
countrycode
:
"DE"
},
{
country_cn
:
'意大利'
,
countrycode
:
'IT'
},
{
country_cn
:
"意大利"
,
countrycode
:
"IT"
},
{
country_cn
:
'所罗门群岛'
,
countrycode
:
'SB'
},
{
country_cn
:
"所罗门群岛"
,
countrycode
:
"SB"
},
// { country_cn: '拉托维亚', countrycode: 'LV' },
// { country_cn: '拉托维亚', countrycode: 'LV' },
{
country_cn
:
'拉脱维亚'
,
countrycode
:
'LV'
},
{
country_cn
:
"拉脱维亚"
,
countrycode
:
"LV"
},
{
country_cn
:
'挪威'
,
countrycode
:
'NO'
},
{
country_cn
:
"挪威"
,
countrycode
:
"NO"
},
{
country_cn
:
'捷克'
,
countrycode
:
'CZ'
},
{
country_cn
:
"捷克"
,
countrycode
:
"CZ"
},
{
country_cn
:
'摩尔多瓦'
,
countrycode
:
'MD'
},
{
country_cn
:
"摩尔多瓦"
,
countrycode
:
"MD"
},
{
country_cn
:
'摩洛哥'
,
countrycode
:
'MA'
},
{
country_cn
:
"摩洛哥"
,
countrycode
:
"MA"
},
{
country_cn
:
'摩纳哥'
,
countrycode
:
'MC'
},
{
country_cn
:
"摩纳哥"
,
countrycode
:
"MC"
},
{
country_cn
:
'文莱'
,
countrycode
:
'BN'
},
{
country_cn
:
"文莱"
,
countrycode
:
"BN"
},
{
country_cn
:
'斐济'
,
countrycode
:
'FJ'
},
{
country_cn
:
"斐济"
,
countrycode
:
"FJ"
},
{
country_cn
:
'斯威士兰'
,
countrycode
:
'SZ'
},
{
country_cn
:
"斯威士兰"
,
countrycode
:
"SZ"
},
{
country_cn
:
'斯洛伐克'
,
countrycode
:
'SK'
},
{
country_cn
:
"斯洛伐克"
,
countrycode
:
"SK"
},
// { country_cn: '斯罗文尼亚', countrycode: 'SI' },
// { country_cn: '斯罗文尼亚', countrycode: 'SI' },
{
country_cn
:
'斯洛文尼亚'
,
countrycode
:
'SI'
},
{
country_cn
:
"斯洛文尼亚"
,
countrycode
:
"SI"
},
{
country_cn
:
'斯里兰卡'
,
countrycode
:
'LK'
},
{
country_cn
:
"斯里兰卡"
,
countrycode
:
"LK"
},
{
country_cn
:
'新加坡'
,
countrycode
:
'SG'
},
{
country_cn
:
"新加坡"
,
countrycode
:
"SG"
},
// { country_cn: '新卡里多尼亚', countrycode: 'NC' },
// { country_cn: '新卡里多尼亚', countrycode: 'NC' },
{
country_cn
:
'新喀里多尼亚'
,
countrycode
:
'NC'
},
{
country_cn
:
"新喀里多尼亚"
,
countrycode
:
"NC"
},
{
country_cn
:
'新西兰'
,
countrycode
:
'NZ'
},
{
country_cn
:
"新西兰"
,
countrycode
:
"NZ"
},
{
country_cn
:
'日本'
,
countrycode
:
'JP'
},
{
country_cn
:
"日本"
,
countrycode
:
"JP"
},
{
country_cn
:
'智利'
,
countrycode
:
'CL'
},
{
country_cn
:
"智利"
,
countrycode
:
"CL"
},
{
country_cn
:
'朝鲜'
,
countrycode
:
'KP'
},
{
country_cn
:
"朝鲜"
,
countrycode
:
"KP"
},
{
country_cn
:
'柬埔寨'
,
countrycode
:
'KH'
},
{
country_cn
:
"柬埔寨"
,
countrycode
:
"KH"
},
{
country_cn
:
'根西岛'
,
countrycode
:
'GG'
},
{
country_cn
:
"根西岛"
,
countrycode
:
"GG"
},
{
country_cn
:
'格林纳达'
,
countrycode
:
'GD'
},
{
country_cn
:
"格林纳达"
,
countrycode
:
"GD"
},
// { country_cn: '格陵兰岛', countrycode: 'GL' },
// { country_cn: '格陵兰岛', countrycode: 'GL' },
{
country_cn
:
'格陵兰'
,
countrycode
:
'GL'
},
{
country_cn
:
"格陵兰"
,
countrycode
:
"GL"
},
{
country_cn
:
'格鲁吉亚'
,
countrycode
:
'GE'
},
{
country_cn
:
"格鲁吉亚"
,
countrycode
:
"GE"
},
// { country_cn: '梵蒂岗', countrycode: 'VA' },
// { country_cn: '梵蒂岗', countrycode: 'VA' },
{
country_cn
:
'梵蒂冈'
,
countrycode
:
'VA'
},
{
country_cn
:
"梵蒂冈"
,
countrycode
:
"VA"
},
{
country_cn
:
'比利时'
,
countrycode
:
'BE'
},
{
country_cn
:
"比利时"
,
countrycode
:
"BE"
},
{
country_cn
:
'毛里塔尼亚'
,
countrycode
:
'MR'
},
{
country_cn
:
"毛里塔尼亚"
,
countrycode
:
"MR"
},
{
country_cn
:
'毛里求斯'
,
countrycode
:
'MU'
},
{
country_cn
:
"毛里求斯"
,
countrycode
:
"MU"
},
{
country_cn
:
'汤加'
,
countrycode
:
'TO'
},
{
country_cn
:
"汤加"
,
countrycode
:
"TO"
},
{
country_cn
:
'沙特阿拉伯'
,
countrycode
:
'SA'
},
{
country_cn
:
"沙特阿拉伯"
,
countrycode
:
"SA"
},
{
country_cn
:
'法国'
,
countrycode
:
'FR'
},
{
country_cn
:
"法国"
,
countrycode
:
"FR"
},
{
country_cn
:
'法属圣马丁'
,
countrycode
:
'MF'
},
{
country_cn
:
"法属圣马丁"
,
countrycode
:
"MF"
},
{
country_cn
:
'法属圭亚那'
,
countrycode
:
'GF'
},
{
country_cn
:
"法属圭亚那"
,
countrycode
:
"GF"
},
// { country_cn: '法属尼留旺岛', countrycode: 'RE' },
// { country_cn: '法属尼留旺岛', countrycode: 'RE' },
{
country_cn
:
'留尼汪岛'
,
countrycode
:
'RE'
},
{
country_cn
:
"留尼汪岛"
,
countrycode
:
"RE"
},
{
country_cn
:
'中国香港'
,
countrycode
:
'HK'
},
{
country_cn
:
"中国香港"
,
countrycode
:
"HK"
},
// { country_cn: '法属玻里尼西亚', countrycode: 'PF' },
// { country_cn: '法属玻里尼西亚', countrycode: 'PF' },
{
country_cn
:
'法属波利尼西亚'
,
countrycode
:
'PF'
},
{
country_cn
:
"法属波利尼西亚"
,
countrycode
:
"PF"
},
{
country_cn
:
'法罗群岛'
,
countrycode
:
'FO'
},
{
country_cn
:
"法罗群岛"
,
countrycode
:
"FO"
},
{
country_cn
:
'波兰'
,
countrycode
:
'PL'
},
{
country_cn
:
"波兰"
,
countrycode
:
"PL"
},
{
country_cn
:
'波多黎各'
,
countrycode
:
'PR'
},
{
country_cn
:
"波多黎各"
,
countrycode
:
"PR"
},
{
country_cn
:
'波黑'
,
countrycode
:
'BA'
},
{
country_cn
:
"波黑"
,
countrycode
:
"BA"
},
{
country_cn
:
'泰国'
,
countrycode
:
'TH'
},
{
country_cn
:
"泰国"
,
countrycode
:
"TH"
},
{
country_cn
:
'泽西岛'
,
countrycode
:
'JE'
},
{
country_cn
:
"泽西岛"
,
countrycode
:
"JE"
},
{
country_cn
:
'津巴布韦'
,
countrycode
:
'ZW'
},
{
country_cn
:
"津巴布韦"
,
countrycode
:
"ZW"
},
{
country_cn
:
'洪都拉斯'
,
countrycode
:
'HN'
},
{
country_cn
:
"洪都拉斯"
,
countrycode
:
"HN"
},
{
country_cn
:
'海地'
,
countrycode
:
'HT'
},
{
country_cn
:
"海地"
,
countrycode
:
"HT"
},
{
country_cn
:
'澳大利亚'
,
countrycode
:
'AU'
},
{
country_cn
:
"澳大利亚"
,
countrycode
:
"AU"
},
{
country_cn
:
'中国台湾'
,
countrycode
:
'TW'
},
{
country_cn
:
"中国台湾"
,
countrycode
:
"TW"
},
{
country_cn
:
'爱尔兰'
,
countrycode
:
'IE'
},
{
country_cn
:
"爱尔兰"
,
countrycode
:
"IE"
},
{
country_cn
:
'爱沙尼亚'
,
countrycode
:
'EE'
},
{
country_cn
:
"爱沙尼亚"
,
countrycode
:
"EE"
},
{
country_cn
:
'牙买加'
,
countrycode
:
'JM'
},
{
country_cn
:
"牙买加"
,
countrycode
:
"JM"
},
{
country_cn
:
'特克斯和凯科斯群岛'
,
countrycode
:
'TC'
},
{
country_cn
:
"特克斯和凯科斯群岛"
,
countrycode
:
"TC"
},
{
country_cn
:
'特立尼达和多巴哥'
,
countrycode
:
'TT'
},
{
country_cn
:
"特立尼达和多巴哥"
,
countrycode
:
"TT"
},
{
country_cn
:
'玻利维亚'
,
countrycode
:
'BO'
},
{
country_cn
:
"玻利维亚"
,
countrycode
:
"BO"
},
{
country_cn
:
'瑙鲁'
,
countrycode
:
'NR'
},
{
country_cn
:
"瑙鲁"
,
countrycode
:
"NR"
},
{
country_cn
:
'瑞典'
,
countrycode
:
'SE'
},
{
country_cn
:
"瑞典"
,
countrycode
:
"SE"
},
{
country_cn
:
'瑞士'
,
countrycode
:
'CH'
},
{
country_cn
:
"瑞士"
,
countrycode
:
"CH"
},
// { country_cn: '瓦努阿鲁', countrycode: 'VU' },
// { country_cn: '瓦努阿鲁', countrycode: 'VU' },
{
country_cn
:
'瓦努阿图'
,
countrycode
:
'VU'
},
{
country_cn
:
"瓦努阿图"
,
countrycode
:
"VU"
},
{
country_cn
:
'白俄罗斯'
,
countrycode
:
'BY'
},
{
country_cn
:
"白俄罗斯"
,
countrycode
:
"BY"
},
{
country_cn
:
'百慕大'
,
countrycode
:
'BM'
},
{
country_cn
:
"百慕大"
,
countrycode
:
"BM"
},
{
country_cn
:
'直布罗陀'
,
countrycode
:
'GI'
},
{
country_cn
:
"直布罗陀"
,
countrycode
:
"GI"
},
{
country_cn
:
'科威特'
,
countrycode
:
'KW'
},
{
country_cn
:
"科威特"
,
countrycode
:
"KW"
},
{
country_cn
:
'科摩罗'
,
countrycode
:
'KM'
},
{
country_cn
:
"科摩罗"
,
countrycode
:
"KM"
},
{
country_cn
:
'科特迪瓦'
,
countrycode
:
'CI'
},
{
country_cn
:
"科特迪瓦"
,
countrycode
:
"CI"
},
{
country_cn
:
'秘鲁'
,
countrycode
:
'PE'
},
{
country_cn
:
"秘鲁"
,
countrycode
:
"PE"
},
{
country_cn
:
'突尼斯'
,
countrycode
:
'TN'
},
{
country_cn
:
"突尼斯"
,
countrycode
:
"TN"
},
{
country_cn
:
'立陶宛'
,
countrycode
:
'LT'
},
{
country_cn
:
"立陶宛"
,
countrycode
:
"LT"
},
// { country_cn: '米克罗尼西亚', countrycode: 'FM' },
// { country_cn: '米克罗尼西亚', countrycode: 'FM' },
{
country_cn
:
'密克罗尼西亚联邦'
,
countrycode
:
'FM'
},
{
country_cn
:
"密克罗尼西亚联邦"
,
countrycode
:
"FM"
},
{
country_cn
:
'索马里'
,
countrycode
:
'SO'
},
{
country_cn
:
"索马里"
,
countrycode
:
"SO"
},
{
country_cn
:
'约旦'
,
countrycode
:
'JO'
},
{
country_cn
:
"约旦"
,
countrycode
:
"JO"
},
{
country_cn
:
'纳米比亚'
,
countrycode
:
'NA'
},
{
country_cn
:
"纳米比亚"
,
countrycode
:
"NA"
},
{
country_cn
:
'缅甸'
,
countrycode
:
'MM'
},
{
country_cn
:
"缅甸"
,
countrycode
:
"MM"
},
{
country_cn
:
'罗马尼亚'
,
countrycode
:
'RO'
},
{
country_cn
:
"罗马尼亚"
,
countrycode
:
"RO"
},
{
country_cn
:
'美国'
,
countrycode
:
'US'
},
{
country_cn
:
"美国"
,
countrycode
:
"US"
},
{
country_cn
:
'美属维尔京群岛'
,
countrycode
:
'VI'
},
{
country_cn
:
"美属维尔京群岛"
,
countrycode
:
"VI"
},
{
country_cn
:
'老挝'
,
countrycode
:
'LA'
},
{
country_cn
:
"老挝"
,
countrycode
:
"LA"
},
{
country_cn
:
'肯尼亚'
,
countrycode
:
'KE'
},
{
country_cn
:
"肯尼亚"
,
countrycode
:
"KE"
},
{
country_cn
:
'芬兰'
,
countrycode
:
'FI'
},
{
country_cn
:
"芬兰"
,
countrycode
:
"FI"
},
{
country_cn
:
'苏丹'
,
countrycode
:
'SD'
},
{
country_cn
:
"苏丹"
,
countrycode
:
"SD"
},
{
country_cn
:
'苏里南'
,
countrycode
:
'SR'
},
{
country_cn
:
"苏里南"
,
countrycode
:
"SR"
},
{
country_cn
:
'英国'
,
countrycode
:
'GB'
},
{
country_cn
:
"英国"
,
countrycode
:
"GB"
},
{
country_cn
:
'英属印度洋领地'
,
countrycode
:
'IO'
},
{
country_cn
:
"英属印度洋领地"
,
countrycode
:
"IO"
},
// { country_cn: '英属维京群岛', countrycode: 'VG' },
// { country_cn: '英属维京群岛', countrycode: 'VG' },
{
country_cn
:
'英属维尔京群岛'
,
countrycode
:
'VG'
},
{
country_cn
:
"英属维尔京群岛"
,
countrycode
:
"VG"
},
{
country_cn
:
'荷兰'
,
countrycode
:
'NL'
},
{
country_cn
:
"荷兰"
,
countrycode
:
"NL"
},
{
country_cn
:
'荷兰加勒比区'
,
countrycode
:
'BQ'
},
{
country_cn
:
"荷兰加勒比区"
,
countrycode
:
"BQ"
},
// { country_cn: '荷属圣马丁', countrycode: 'SX' },
// { country_cn: '荷属圣马丁', countrycode: 'SX' },
{
country_cn
:
'圣马丁岛'
,
countrycode
:
'SX'
},
{
country_cn
:
"圣马丁岛"
,
countrycode
:
"SX"
},
{
country_cn
:
'莫桑比克'
,
countrycode
:
'MZ'
},
{
country_cn
:
"莫桑比克"
,
countrycode
:
"MZ"
},
{
country_cn
:
'莱索托'
,
countrycode
:
'LS'
},
{
country_cn
:
"莱索托"
,
countrycode
:
"LS"
},
{
country_cn
:
'菲律宾'
,
countrycode
:
'PH'
},
{
country_cn
:
"菲律宾"
,
countrycode
:
"PH"
},
{
country_cn
:
'萨尔瓦多'
,
countrycode
:
'SV'
},
{
country_cn
:
"萨尔瓦多"
,
countrycode
:
"SV"
},
{
country_cn
:
'萨摩亚'
,
countrycode
:
'WS'
},
{
country_cn
:
"萨摩亚"
,
countrycode
:
"WS"
},
{
country_cn
:
'葡萄牙'
,
countrycode
:
'PT'
},
{
country_cn
:
"葡萄牙"
,
countrycode
:
"PT"
},
{
country_cn
:
'蒙古'
,
countrycode
:
'MN'
},
{
country_cn
:
"蒙古"
,
countrycode
:
"MN"
},
{
country_cn
:
'西班牙'
,
countrycode
:
'ES'
},
{
country_cn
:
"西班牙"
,
countrycode
:
"ES"
},
{
country_cn
:
'诺福克岛'
,
countrycode
:
'NF'
},
{
country_cn
:
"诺福克岛"
,
countrycode
:
"NF"
},
{
country_cn
:
'贝宁'
,
countrycode
:
'BJ'
},
{
country_cn
:
"贝宁"
,
countrycode
:
"BJ"
},
{
country_cn
:
'赞比亚'
,
countrycode
:
'ZM'
},
{
country_cn
:
"赞比亚"
,
countrycode
:
"ZM"
},
{
country_cn
:
'赤道几内亚'
,
countrycode
:
'GQ'
},
{
country_cn
:
"赤道几内亚"
,
countrycode
:
"GQ"
},
{
country_cn
:
'越南'
,
countrycode
:
'VN'
},
{
country_cn
:
"越南"
,
countrycode
:
"VN"
},
{
country_cn
:
'阿塞拜疆'
,
countrycode
:
'AZ'
},
{
country_cn
:
"阿塞拜疆"
,
countrycode
:
"AZ"
},
{
country_cn
:
'阿富汗'
,
countrycode
:
'AF'
},
{
country_cn
:
"阿富汗"
,
countrycode
:
"AF"
},
{
country_cn
:
'阿尔及利亚'
,
countrycode
:
'DZ'
},
{
country_cn
:
"阿尔及利亚"
,
countrycode
:
"DZ"
},
{
country_cn
:
'阿尔巴尼亚'
,
countrycode
:
'AL'
},
{
country_cn
:
"阿尔巴尼亚"
,
countrycode
:
"AL"
},
{
country_cn
:
'阿曼'
,
countrycode
:
'OM'
},
{
country_cn
:
"阿曼"
,
countrycode
:
"OM"
},
{
country_cn
:
'阿根廷'
,
countrycode
:
'AR'
},
{
country_cn
:
"阿根廷"
,
countrycode
:
"AR"
},
{
country_cn
:
'阿联酋'
,
countrycode
:
'AE'
},
{
country_cn
:
"阿联酋"
,
countrycode
:
"AE"
},
{
country_cn
:
'阿鲁巴'
,
countrycode
:
'AW'
},
{
country_cn
:
"阿鲁巴"
,
countrycode
:
"AW"
},
{
country_cn
:
'韩国'
,
countrycode
:
'KR'
},
{
country_cn
:
"韩国"
,
countrycode
:
"KR"
},
{
country_cn
:
'马其顿'
,
countrycode
:
'MK'
},
{
country_cn
:
"马其顿"
,
countrycode
:
"MK"
},
{
country_cn
:
'马尔代夫'
,
countrycode
:
'MV'
},
{
country_cn
:
"马尔代夫"
,
countrycode
:
"MV"
},
{
country_cn
:
'马恩岛'
,
countrycode
:
'IM'
},
{
country_cn
:
"马恩岛"
,
countrycode
:
"IM"
},
{
country_cn
:
'马拉维'
,
countrycode
:
'MW'
},
{
country_cn
:
"马拉维"
,
countrycode
:
"MW"
},
{
country_cn
:
'马来西亚'
,
countrycode
:
'MY'
},
{
country_cn
:
"马来西亚"
,
countrycode
:
"MY"
},
{
country_cn
:
'马绍尔群岛'
,
countrycode
:
'MH'
},
{
country_cn
:
"马绍尔群岛"
,
countrycode
:
"MH"
},
{
country_cn
:
'马耳他'
,
countrycode
:
'MT'
},
{
country_cn
:
"马耳他"
,
countrycode
:
"MT"
},
{
country_cn
:
'马达加斯加'
,
countrycode
:
'MG'
},
{
country_cn
:
"马达加斯加"
,
countrycode
:
"MG"
},
{
country_cn
:
'马里'
,
countrycode
:
'ML'
},
{
country_cn
:
"马里"
,
countrycode
:
"ML"
},
{
country_cn
:
'黎巴嫩'
,
countrycode
:
'LB'
},
{
country_cn
:
"黎巴嫩"
,
countrycode
:
"LB"
},
{
country_cn
:
'黑山'
,
countrycode
:
'ME'
},
{
country_cn
:
"黑山"
,
countrycode
:
"ME"
},
// { country_cn: '东萨摩亚', countrycode: 'AS' },
// { country_cn: '东萨摩亚', countrycode: 'AS' },
{
country_cn
:
'美属萨摩亚'
,
countrycode
:
'AS'
},
{
country_cn
:
"美属萨摩亚"
,
countrycode
:
"AS"
},
{
country_cn
:
'东帝汶'
,
countrycode
:
'TL'
},
{
country_cn
:
"东帝汶"
,
countrycode
:
"TL"
},
{
country_cn
:
'圣卢西亚'
,
countrycode
:
'LC'
},
{
country_cn
:
"圣卢西亚"
,
countrycode
:
"LC"
},
{
country_cn
:
'瓜德罗普'
,
countrycode
:
'GP'
},
{
country_cn
:
"瓜德罗普"
,
countrycode
:
"GP"
},
{
country_cn
:
'马约特'
,
countrycode
:
'YT'
},
{
country_cn
:
"马约特"
,
countrycode
:
"YT"
},
{
country_cn
:
'马提尼克'
,
countrycode
:
'MQ'
},
{
country_cn
:
"马提尼克"
,
countrycode
:
"MQ"
},
{
country_cn
:
'美国本土外小岛屿'
,
countrycode
:
'UM'
},
{
country_cn
:
"美国本土外小岛屿"
,
countrycode
:
"UM"
},
{
country_cn
:
'福克兰群岛'
,
countrycode
:
'FK'
},
{
country_cn
:
"福克兰群岛"
,
countrycode
:
"FK"
},
{
country_cn
:
'北马里亚纳群岛'
,
countrycode
:
'MP'
},
{
country_cn
:
"北马里亚纳群岛"
,
countrycode
:
"MP"
},
{
country_cn
:
'瓦利斯和富图纳群岛'
,
countrycode
:
'WF'
},
{
country_cn
:
"瓦利斯和富图纳群岛"
,
countrycode
:
"WF"
},
{
country_cn
:
'圣诞岛'
,
countrycode
:
'CX'
},
{
country_cn
:
"圣诞岛"
,
countrycode
:
"CX"
},
{
country_cn
:
'科科斯群岛'
,
countrycode
:
'CC'
},
{
country_cn
:
"科科斯群岛"
,
countrycode
:
"CC"
},
{
country_cn
:
'蒙塞拉特岛'
,
countrycode
:
'MS'
},
{
country_cn
:
"蒙塞拉特岛"
,
countrycode
:
"MS"
},
{
country_cn
:
'南乔治亚岛与南桑威奇群岛'
,
countrycode
:
'GS'
},
{
country_cn
:
"南乔治亚岛与南桑威奇群岛"
,
countrycode
:
"GS"
},
{
country_cn
:
'布韦岛'
,
countrycode
:
'BV'
},
{
country_cn
:
"布韦岛"
,
countrycode
:
"BV"
},
{
country_cn
:
'托克劳群岛'
,
countrycode
:
'TK'
},
{
country_cn
:
"托克劳群岛"
,
countrycode
:
"TK"
},
{
country_cn
:
'皮特凯恩群岛'
,
countrycode
:
'PN'
},
{
country_cn
:
"皮特凯恩群岛"
,
countrycode
:
"PN"
},
{
country_cn
:
'纽埃'
,
countrycode
:
'NU'
},
{
country_cn
:
"纽埃"
,
countrycode
:
"NU"
},
{
country_cn
:
'斯瓦尔巴群岛和扬马延岛'
,
countrycode
:
'SJ'
},
{
country_cn
:
"斯瓦尔巴群岛和扬马延岛"
,
countrycode
:
"SJ"
},
{
country_cn
:
'圣赫勒拿岛'
,
countrycode
:
'SH'
},
{
country_cn
:
"圣赫勒拿岛"
,
countrycode
:
"SH"
},
{
country_cn
:
'西撒哈拉'
,
countrycode
:
'EH'
},
{
country_cn
:
"西撒哈拉"
,
countrycode
:
"EH"
},
{
country_cn
:
'赫德岛和麦克唐纳群岛'
,
countrycode
:
'HM'
},
{
country_cn
:
"赫德岛和麦克唐纳群岛"
,
countrycode
:
"HM"
},
{
country_cn
:
'法属南部领地'
,
countrycode
:
'TF'
},
{
country_cn
:
"法属南部领地"
,
countrycode
:
"TF"
},
{
country_cn
:
'科索沃'
,
countrycode
:
'XK'
},
{
country_cn
:
"科索沃"
,
countrycode
:
"XK"
},
];
];
util
.
judgeCountry
=
function
(
input_value
)
{
util
.
judgeCountry
=
function
(
input_value
)
{
var
countries
=
this
.
countries
;
var
countries
=
this
.
countries
;
for
(
var
j
=
0
;
j
<
countries
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
countries
.
length
;
j
++
)
{
// var country = country_code[j]["country"]; //全称
// var country = country_code[j]["country"]; //全称
var
countrycode
=
countries
[
j
][
'countrycode'
];
//简称
var
countrycode
=
countries
[
j
][
"countrycode"
];
//简称
var
country_cn
=
countries
[
j
][
'country_cn'
];
//中文名称
var
country_cn
=
countries
[
j
][
"country_cn"
];
//中文名称
if
(
if
(
input_value
.
toUpperCase
()
==
countrycode
.
toUpperCase
()
||
input_value
.
toUpperCase
()
==
countrycode
.
toUpperCase
()
||
input_value
.
toLowerCase
()
==
countrycode
.
toLowerCase
()
||
input_value
.
toLowerCase
()
==
countrycode
.
toLowerCase
()
||
input_value
==
country_cn
input_value
==
country_cn
)
{
)
{
return
countries
[
j
][
'countrycode'
];
return
countries
[
j
][
"countrycode"
];
}
}
}
}
return
false
;
return
false
;
};
};
\ No newline at end of file
js/q/json.js
View file @
b8bac284
console
.
log
(
"------ q/json.js debug ------"
);
/** @license
/** @license
* RequireJS plugin for loading JSON files
* RequireJS plugin for loading JSON files
* - depends on Text plugin and it was HEAVILY "inspired" by it as well.
* - depends on Text plugin and it was HEAVILY "inspired" by it as well.
...
@@ -5,31 +7,44 @@
...
@@ -5,31 +7,44 @@
* Version: 0.4.0 (2014/04/10)
* Version: 0.4.0 (2014/04/10)
* Released under the MIT license
* Released under the MIT license
*/
*/
define
([
'text'
],
function
(
text
){
define
([
"text"
],
function
(
text
)
{
var
CACHE_BUST_QUERY_PARAM
=
"bust"
,
var
CACHE_BUST_QUERY_PARAM
=
'bust'
,
CACHE_BUST_FLAG
=
"!bust"
,
CACHE_BUST_FLAG
=
'!bust'
,
jsonParse
=
jsonParse
=
(
typeof
JSON
!==
'undefined'
&&
typeof
JSON
.
parse
===
'function'
)?
JSON
.
parse
:
function
(
val
){
typeof
JSON
!==
"undefined"
&&
typeof
JSON
.
parse
===
"function"
return
eval
(
'('
+
val
+
')'
);
//quick and dirty
?
JSON
.
parse
:
function
(
val
)
{
return
eval
(
"("
+
val
+
")"
);
//quick and dirty
},
},
buildMap
=
{};
buildMap
=
{};
function
cacheBust
(
url
){
function
cacheBust
(
url
)
{
url
=
url
.
replace
(
CACHE_BUST_FLAG
,
''
);
url
=
url
.
replace
(
CACHE_BUST_FLAG
,
""
);
url
+=
(
url
.
indexOf
(
'?'
)
<
0
)?
'?'
:
'&'
;
url
+=
url
.
indexOf
(
"?"
)
<
0
?
"?"
:
"&"
;
return
url
+
CACHE_BUST_QUERY_PARAM
+
'='
+
Math
.
round
(
2147483647
*
Math
.
random
());
return
(
url
+
CACHE_BUST_QUERY_PARAM
+
"="
+
Math
.
round
(
2147483647
*
Math
.
random
())
);
}
}
//API
//API
return
{
return
{
load
:
function
(
name
,
req
,
onLoad
,
config
)
{
load
:
function
(
name
,
req
,
onLoad
,
config
)
{
if
(
if
((
config
.
isBuild
&&
(
config
.
inlineJSON
===
false
||
name
.
indexOf
(
CACHE_BUST_QUERY_PARAM
+
'='
)
!==
-
1
))
||
(
req
.
toUrl
(
name
).
indexOf
(
'empty:'
)
===
0
))
{
(
config
.
isBuild
&&
(
config
.
inlineJSON
===
false
||
name
.
indexOf
(
CACHE_BUST_QUERY_PARAM
+
"="
)
!==
-
1
))
||
req
.
toUrl
(
name
).
indexOf
(
"empty:"
)
===
0
)
{
//avoid inlining cache busted JSON or if inlineJSON:false
//avoid inlining cache busted JSON or if inlineJSON:false
//and don't inline files marked as empty!
//and don't inline files marked as empty!
onLoad
(
null
);
onLoad
(
null
);
}
else
{
}
else
{
text
.
get
(
req
.
toUrl
(
name
),
function
(
data
){
text
.
get
(
req
.
toUrl
(
name
),
function
(
data
)
{
var
parsed
;
var
parsed
;
if
(
config
.
isBuild
)
{
if
(
config
.
isBuild
)
{
buildMap
[
name
]
=
data
;
buildMap
[
name
]
=
data
;
...
@@ -43,14 +58,15 @@ define(['text'], function(text){
...
@@ -43,14 +58,15 @@ define(['text'], function(text){
onLoad
(
parsed
);
onLoad
(
parsed
);
}
}
},
},
onLoad
.
error
,
{
onLoad
.
error
,
accept
:
'application/json'
{
accept
:
"application/json"
,
}
}
);
);
}
}
},
},
normalize
:
function
(
name
,
normalize
)
{
normalize
:
function
(
name
,
normalize
)
{
// used normalize to avoid caching references to a "cache busted" request
// used normalize to avoid caching references to a "cache busted" request
if
(
name
.
indexOf
(
CACHE_BUST_FLAG
)
!==
-
1
)
{
if
(
name
.
indexOf
(
CACHE_BUST_FLAG
)
!==
-
1
)
{
name
=
cacheBust
(
name
);
name
=
cacheBust
(
name
);
...
@@ -61,12 +77,19 @@ define(['text'], function(text){
...
@@ -61,12 +77,19 @@ define(['text'], function(text){
//write method based on RequireJS official text plugin by James Burke
//write method based on RequireJS official text plugin by James Burke
//https://github.com/jrburke/requirejs/blob/master/text.js
//https://github.com/jrburke/requirejs/blob/master/text.js
write
:
function
(
pluginName
,
moduleName
,
write
)
{
write
:
function
(
pluginName
,
moduleName
,
write
)
{
if
(
moduleName
in
buildMap
)
{
if
(
moduleName
in
buildMap
)
{
var
content
=
buildMap
[
moduleName
];
var
content
=
buildMap
[
moduleName
];
write
(
'define("'
+
pluginName
+
'!'
+
moduleName
+
'", function(){ return '
+
content
+
';});
\
n'
);
write
(
}
'define("'
+
pluginName
+
"!"
+
moduleName
+
'", function(){ return '
+
content
+
";});
\n
"
);
}
}
},
};
};
});
});
js/q/svgHeader2.js
View file @
b8bac284
var
SvgHeader
=
function
(
el
,
textid
){
console
.
log
(
"------ q/svgHeader2.js debug ------"
);
var
SvgHeader
=
function
(
el
,
textid
)
{
var
el
=
el
;
var
el
=
el
;
var
width
=
180
;
var
width
=
180
;
...
@@ -8,34 +10,33 @@ var SvgHeader = function(el,textid){
...
@@ -8,34 +10,33 @@ var SvgHeader = function(el,textid){
var
xlinkNS
=
"http://www.w3.org/1999/xlink"
;
var
xlinkNS
=
"http://www.w3.org/1999/xlink"
;
var
svg
=
document
.
createElementNS
(
NS
,
"svg"
);
var
svg
=
document
.
createElementNS
(
NS
,
"svg"
);
// var rec1 = document.createElementNS(NS, "path");
// var rec1 = document.createElementNS(NS, "path");
// var rec2 = document.createElementNS(NS, "path");
// var rec2 = document.createElementNS(NS, "path");
var
circle
=
document
.
createElementNS
(
NS
,
"path"
);
var
circle
=
document
.
createElementNS
(
NS
,
"path"
);
var
text
=
document
.
createElementNS
(
NS
,
"text"
);
var
text
=
document
.
createElementNS
(
NS
,
"text"
);
var
textPath
=
document
.
createElementNS
(
NS
,
"textPath"
);
var
textPath
=
document
.
createElementNS
(
NS
,
"textPath"
);
svg
.
setAttribute
(
"viewBox"
,
"0 0"
+
' '
+
width
+
' '
+
height
);
svg
.
setAttribute
(
"viewBox"
,
"0 0"
+
" "
+
width
+
" "
+
height
);
circle
.
setAttribute
(
"d"
,
"m 90,12 A 78,78 0 1,0 91,12"
);
circle
.
setAttribute
(
"d"
,
"m 90,12 A 78,78 0 1,0 91,12"
);
circle
.
setAttribute
(
"id"
,
textid
);
circle
.
setAttribute
(
"id"
,
textid
);
circle
.
setAttribute
(
"class"
,
"text_circle"
);
circle
.
setAttribute
(
"class"
,
"text_circle"
);
textPath
.
setAttributeNS
(
xlinkNS
,
"xlink:href"
,
"#"
+
textid
);
textPath
.
setAttributeNS
(
xlinkNS
,
"xlink:href"
,
"#"
+
textid
);
textPath
.
setAttribute
(
'id'
,
'textpath'
+
textid
);
textPath
.
setAttribute
(
"id"
,
"textpath"
+
textid
);
text
.
appendChild
(
textPath
);
text
.
appendChild
(
textPath
);
svg
.
appendChild
(
circle
);
svg
.
appendChild
(
circle
);
svg
.
appendChild
(
text
);
svg
.
appendChild
(
text
);
textPath
.
textContent
=
''
;
textPath
.
textContent
=
""
;
el
.
appendChild
(
svg
);
el
.
appendChild
(
svg
);
var
textend_deg
=
120
;
var
textend_deg
=
120
;
var
r_text
=
80
;
var
r_text
=
80
;
svg
.
querySelectorAll
(
'.circle'
)
svg
.
querySelectorAll
(
".circle"
);
function
setContent
(
content
)
{
function
setContent
(
content
)
{
// textPath.textContent = '';
// textPath.textContent = '';
textPath
.
textContent
=
content
;
textPath
.
textContent
=
content
;
// console.log('content')
// console.log('content')
...
@@ -46,27 +47,24 @@ var SvgHeader = function(el,textid){
...
@@ -46,27 +47,24 @@ var SvgHeader = function(el,textid){
// console.log(text.getNumberOfChars())
// console.log(text.getNumberOfChars())
// var textstart_deg =text.textLength.animVal.value; //使用svg内部精确的计算值计算
// var textstart_deg =text.textLength.animVal.value; //使用svg内部精确的计算值计算
var
textstart_deg
=
186
-
content
.
length
*
9
/
2
;
// 每个字符按10度计算
var
textstart_deg
=
186
-
(
content
.
length
*
9
)
/
2
;
// 每个字符按10度计算
// console.log(textstart_deg)
// console.log(textstart_deg)
function
degToArc
(
deg
)
{
function
degToArc
(
deg
)
{
return
deg
*
2
*
Math
.
PI
*
r_text
/
360
;
return
(
deg
*
2
*
Math
.
PI
*
r_text
)
/
360
;
}
}
// var m=document.querySelectorAll("circle")[3];
// var m=document.querySelectorAll("circle")[3];
circle
.
setAttribute
(
'transform'
,
'rotate(-'
+
textstart_deg
+
' 90 90)'
);
circle
.
setAttribute
(
"transform"
,
"rotate(-"
+
textstart_deg
+
" 90 90)"
);
// midcircle.setAttribute('stroke-dasharray', arc_length+' '+(2*Math.PI*r_text-arc_length));
// midcircle.setAttribute('stroke-dasharray', arc_length+' '+(2*Math.PI*r_text-arc_length));
textstart_deg
=
0
;
textstart_deg
=
0
;
}
}
return
{
return
{
setContent
:
setContent
setContent
:
setContent
,
}
};
}
};
// var circular_as = $('.circular').eq(0).get()[0];
// var circular_as = $('.circular').eq(0).get()[0];
// var svgHeaderAs = new SvgHeader(circular_as,'textcircleas');
// var svgHeaderAs = new SvgHeader(circular_as,'textcircleas');
// svgHeaderAs.setContent('333333333333')
// svgHeaderAs.setContent('333333333333')
js/q/text.js
View file @
b8bac284
console
.
log
(
"------ q/text.js debug ------"
);
/**
/**
* @license RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* @license RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* Available via the MIT or new BSD license.
...
@@ -8,22 +10,24 @@
...
@@ -8,22 +10,24 @@
define: false, window: false, process: false, Packages: false,
define: false, window: false, process: false, Packages: false,
java: false, location: false */
java: false, location: false */
define
([
'module'
],
function
(
module
)
{
define
([
"module"
],
function
(
module
)
{
'use strict'
;
"use strict"
;
var
text
,
fs
,
var
text
,
progIds
=
[
'Msxml2.XMLHTTP'
,
'Microsoft.XMLHTTP'
,
'Msxml2.XMLHTTP.4.0'
],
fs
,
progIds
=
[
"Msxml2.XMLHTTP"
,
"Microsoft.XMLHTTP"
,
"Msxml2.XMLHTTP.4.0"
],
xmlRegExp
=
/^
\s
*<
\?
xml
(\s)
+version=
[\'\"](\d)
*.
(\d)
*
[\'\"](\s)
*
\?
>/im
,
xmlRegExp
=
/^
\s
*<
\?
xml
(\s)
+version=
[\'\"](\d)
*.
(\d)
*
[\'\"](\s)
*
\?
>/im
,
bodyRegExp
=
/<body
[^
>
]
*>
\s
*
([\s\S]
+
)\s
*<
\/
body>/im
,
bodyRegExp
=
/<body
[^
>
]
*>
\s
*
([\s\S]
+
)\s
*<
\/
body>/im
,
hasLocation
=
typeof
location
!==
'undefined'
&&
location
.
href
,
hasLocation
=
typeof
location
!==
"undefined"
&&
location
.
href
,
defaultProtocol
=
hasLocation
&&
location
.
protocol
&&
location
.
protocol
.
replace
(
/
\:
/
,
''
),
defaultProtocol
=
hasLocation
&&
location
.
protocol
&&
location
.
protocol
.
replace
(
/
\:
/
,
""
),
defaultHostName
=
hasLocation
&&
location
.
hostname
,
defaultHostName
=
hasLocation
&&
location
.
hostname
,
defaultPort
=
hasLocation
&&
(
location
.
port
||
undefined
),
defaultPort
=
hasLocation
&&
(
location
.
port
||
undefined
),
buildMap
=
[],
buildMap
=
[],
masterConfig
=
(
module
.
config
&&
module
.
config
())
||
{};
masterConfig
=
(
module
.
config
&&
module
.
config
())
||
{};
text
=
{
text
=
{
version
:
'2.0.5'
,
version
:
"2.0.5"
,
strip
:
function
(
content
)
{
strip
:
function
(
content
)
{
//Strips <?xml ...?> declarations so that external SVG and XML
//Strips <?xml ...?> declarations so that external SVG and XML
...
@@ -42,7 +46,8 @@
...
@@ -42,7 +46,8 @@
},
},
jsEscape
:
function
(
content
)
{
jsEscape
:
function
(
content
)
{
return
content
.
replace
(
/
([
'
\\])
/g
,
'
\\
$1'
)
return
content
.
replace
(
/
([
'
\\])
/g
,
"
\\
$1"
)
.
replace
(
/
[\f]
/g
,
"
\\
f"
)
.
replace
(
/
[\f]
/g
,
"
\\
f"
)
.
replace
(
/
[\b]
/g
,
"
\\
b"
)
.
replace
(
/
[\b]
/g
,
"
\\
b"
)
.
replace
(
/
[\n]
/g
,
"
\
\n
"
)
.
replace
(
/
[\n]
/g
,
"
\
\n
"
)
...
@@ -52,7 +57,9 @@
...
@@ -52,7 +57,9 @@
.
replace
(
/
[\u
2029
]
/g
,
"
\\
u2029"
);
.
replace
(
/
[\u
2029
]
/g
,
"
\\
u2029"
);
},
},
createXhr
:
masterConfig
.
createXhr
||
function
()
{
createXhr
:
masterConfig
.
createXhr
||
function
()
{
//Would love to dump the ActiveX crap in here. Need IE 6 to die first.
//Would love to dump the ActiveX crap in here. Need IE 6 to die first.
var
xhr
,
i
,
progId
;
var
xhr
,
i
,
progId
;
if
(
typeof
XMLHttpRequest
!==
"undefined"
)
{
if
(
typeof
XMLHttpRequest
!==
"undefined"
)
{
...
@@ -83,11 +90,12 @@
...
@@ -83,11 +90,12 @@
* where strip is a boolean.
* where strip is a boolean.
*/
*/
parseName
:
function
(
name
)
{
parseName
:
function
(
name
)
{
var
modName
,
ext
,
temp
,
var
modName
,
ext
,
temp
,
strip
=
false
,
strip
=
false
,
index
=
name
.
indexOf
(
"."
),
index
=
name
.
indexOf
(
"."
),
isRelative
=
name
.
indexOf
(
'./'
)
===
0
||
isRelative
=
name
.
indexOf
(
"./"
)
===
0
||
name
.
indexOf
(
"../"
)
===
0
;
name
.
indexOf
(
'../'
)
===
0
;
if
(
index
!==
-
1
&&
(
!
isRelative
||
index
>
1
))
{
if
(
index
!==
-
1
&&
(
!
isRelative
||
index
>
1
))
{
modName
=
name
.
substring
(
0
,
index
);
modName
=
name
.
substring
(
0
,
index
);
...
@@ -112,7 +120,7 @@
...
@@ -112,7 +120,7 @@
return
{
return
{
moduleName
:
modName
,
moduleName
:
modName
,
ext
:
ext
,
ext
:
ext
,
strip
:
strip
strip
:
strip
,
};
};
},
},
...
@@ -127,7 +135,9 @@
...
@@ -127,7 +135,9 @@
* @returns Boolean
* @returns Boolean
*/
*/
useXhr
:
function
(
url
,
protocol
,
hostname
,
port
)
{
useXhr
:
function
(
url
,
protocol
,
hostname
,
port
)
{
var
uProtocol
,
uHostName
,
uPort
,
var
uProtocol
,
uHostName
,
uPort
,
match
=
text
.
xdRegExp
.
exec
(
url
);
match
=
text
.
xdRegExp
.
exec
(
url
);
if
(
!
match
)
{
if
(
!
match
)
{
return
true
;
return
true
;
...
@@ -135,13 +145,15 @@
...
@@ -135,13 +145,15 @@
uProtocol
=
match
[
2
];
uProtocol
=
match
[
2
];
uHostName
=
match
[
3
];
uHostName
=
match
[
3
];
uHostName
=
uHostName
.
split
(
':'
);
uHostName
=
uHostName
.
split
(
":"
);
uPort
=
uHostName
[
1
];
uPort
=
uHostName
[
1
];
uHostName
=
uHostName
[
0
];
uHostName
=
uHostName
[
0
];
return
(
!
uProtocol
||
uProtocol
===
protocol
)
&&
return
(
(
!
uProtocol
||
uProtocol
===
protocol
)
&&
(
!
uHostName
||
uHostName
.
toLowerCase
()
===
hostname
.
toLowerCase
())
&&
(
!
uHostName
||
uHostName
.
toLowerCase
()
===
hostname
.
toLowerCase
())
&&
((
!
uPort
&&
!
uHostName
)
||
uPort
===
port
);
((
!
uPort
&&
!
uHostName
)
||
uPort
===
port
)
);
},
},
finishLoad
:
function
(
name
,
strip
,
content
,
onLoad
)
{
finishLoad
:
function
(
name
,
strip
,
content
,
onLoad
)
{
...
@@ -170,29 +182,38 @@
...
@@ -170,29 +182,38 @@
masterConfig
.
isBuild
=
config
.
isBuild
;
masterConfig
.
isBuild
=
config
.
isBuild
;
var
parsed
=
text
.
parseName
(
name
),
var
parsed
=
text
.
parseName
(
name
),
nonStripName
=
parsed
.
moduleName
+
nonStripName
=
parsed
.
moduleName
+
(
parsed
.
ext
?
"."
+
parsed
.
ext
:
""
),
(
parsed
.
ext
?
'.'
+
parsed
.
ext
:
''
),
url
=
req
.
toUrl
(
nonStripName
),
url
=
req
.
toUrl
(
nonStripName
),
useXhr
=
(
masterConfig
.
useXhr
)
||
useXhr
=
masterConfig
.
useXhr
||
text
.
useXhr
;
text
.
useXhr
;
//Load the text. Use XHR if possible and in a browser.
//Load the text. Use XHR if possible and in a browser.
if
(
!
hasLocation
||
useXhr
(
url
,
defaultProtocol
,
defaultHostName
,
defaultPort
))
{
if
(
text
.
get
(
url
,
function
(
content
)
{
!
hasLocation
||
useXhr
(
url
,
defaultProtocol
,
defaultHostName
,
defaultPort
)
)
{
text
.
get
(
url
,
function
(
content
)
{
text
.
finishLoad
(
name
,
parsed
.
strip
,
content
,
onLoad
);
text
.
finishLoad
(
name
,
parsed
.
strip
,
content
,
onLoad
);
},
function
(
err
)
{
},
function
(
err
)
{
if
(
onLoad
.
error
)
{
if
(
onLoad
.
error
)
{
onLoad
.
error
(
err
);
onLoad
.
error
(
err
);
}
}
});
}
);
}
else
{
}
else
{
//Need to fetch the resource across domains. Assume
//Need to fetch the resource across domains. Assume
//the resource has been optimized into a JS module. Fetch
//the resource has been optimized into a JS module. Fetch
//by the module name + extension, but do not include the
//by the module name + extension, but do not include the
//!strip part to avoid file system issues.
//!strip part to avoid file system issues.
req
([
nonStripName
],
function
(
content
)
{
req
([
nonStripName
],
function
(
content
)
{
text
.
finishLoad
(
parsed
.
moduleName
+
'.'
+
parsed
.
ext
,
text
.
finishLoad
(
parsed
.
strip
,
content
,
onLoad
);
parsed
.
moduleName
+
"."
+
parsed
.
ext
,
parsed
.
strip
,
content
,
onLoad
);
});
});
}
}
},
},
...
@@ -200,25 +221,28 @@
...
@@ -200,25 +221,28 @@
write
:
function
(
pluginName
,
moduleName
,
write
,
config
)
{
write
:
function
(
pluginName
,
moduleName
,
write
,
config
)
{
if
(
buildMap
.
hasOwnProperty
(
moduleName
))
{
if
(
buildMap
.
hasOwnProperty
(
moduleName
))
{
var
content
=
text
.
jsEscape
(
buildMap
[
moduleName
]);
var
content
=
text
.
jsEscape
(
buildMap
[
moduleName
]);
write
.
asModule
(
pluginName
+
"!"
+
moduleName
,
write
.
asModule
(
"define(function () { return '"
+
pluginName
+
"!"
+
moduleName
,
content
+
"define(function () { return '"
+
content
+
"';});
\n
"
"';});
\n
"
);
);
}
}
},
},
writeFile
:
function
(
pluginName
,
moduleName
,
req
,
write
,
config
)
{
writeFile
:
function
(
pluginName
,
moduleName
,
req
,
write
,
config
)
{
var
parsed
=
text
.
parseName
(
moduleName
),
var
parsed
=
text
.
parseName
(
moduleName
),
extPart
=
parsed
.
ext
?
'.'
+
parsed
.
ext
:
''
,
extPart
=
parsed
.
ext
?
"."
+
parsed
.
ext
:
""
,
nonStripName
=
parsed
.
moduleName
+
extPart
,
nonStripName
=
parsed
.
moduleName
+
extPart
,
//Use a '.js' file name so that it indicates it is a
//Use a '.js' file name so that it indicates it is a
//script that can be loaded across domains.
//script that can be loaded across domains.
fileName
=
req
.
toUrl
(
parsed
.
moduleName
+
extPart
)
+
'.js'
;
fileName
=
req
.
toUrl
(
parsed
.
moduleName
+
extPart
)
+
".js"
;
//Leverage own load() method to load plugin value, but only
//Leverage own load() method to load plugin value, but only
//write out values that do not have the strip argument,
//write out values that do not have the strip argument,
//to avoid any potential issues with ! in file names.
//to avoid any potential issues with ! in file names.
text
.
load
(
nonStripName
,
req
,
function
(
value
)
{
text
.
load
(
nonStripName
,
req
,
function
(
value
)
{
//Use own write() method to construct full module value.
//Use own write() method to construct full module value.
//But need to create shell that translates writeFile's
//But need to create shell that translates writeFile's
//write() to the right interface.
//write() to the right interface.
...
@@ -230,30 +254,38 @@
...
@@ -230,30 +254,38 @@
};
};
text
.
write
(
pluginName
,
nonStripName
,
textWrite
,
config
);
text
.
write
(
pluginName
,
nonStripName
,
textWrite
,
config
);
},
config
);
},
}
config
);
},
};
};
if
(
masterConfig
.
env
===
'node'
||
(
!
masterConfig
.
env
&&
if
(
masterConfig
.
env
===
"node"
||
(
!
masterConfig
.
env
&&
typeof
process
!==
"undefined"
&&
typeof
process
!==
"undefined"
&&
process
.
versions
&&
process
.
versions
&&
!!
process
.
versions
.
node
))
{
!!
process
.
versions
.
node
)
)
{
//Using special require.nodeRequire, something added by r.js.
//Using special require.nodeRequire, something added by r.js.
fs
=
require
.
nodeRequire
(
'fs'
);
fs
=
require
.
nodeRequire
(
"fs"
);
text
.
get
=
function
(
url
,
callback
)
{
text
.
get
=
function
(
url
,
callback
)
{
var
file
=
fs
.
readFileSync
(
url
,
'utf8'
);
var
file
=
fs
.
readFileSync
(
url
,
"utf8"
);
//Remove BOM (Byte Mark Order) from utf8 files if it is there.
//Remove BOM (Byte Mark Order) from utf8 files if it is there.
if
(
file
.
indexOf
(
'
\
uFEFF'
)
===
0
)
{
if
(
file
.
indexOf
(
"
\
uFEFF"
)
===
0
)
{
file
=
file
.
substring
(
1
);
file
=
file
.
substring
(
1
);
}
}
callback
(
file
);
callback
(
file
);
};
};
}
else
if
(
masterConfig
.
env
===
'xhr'
||
(
!
masterConfig
.
env
&&
}
else
if
(
text
.
createXhr
()))
{
masterConfig
.
env
===
"xhr"
||
(
!
masterConfig
.
env
&&
text
.
createXhr
())
)
{
text
.
get
=
function
(
url
,
callback
,
errback
,
headers
)
{
text
.
get
=
function
(
url
,
callback
,
errback
,
headers
)
{
var
xhr
=
text
.
createXhr
(),
header
;
var
xhr
=
text
.
createXhr
(),
xhr
.
open
(
'GET'
,
url
,
true
);
header
;
xhr
.
open
(
"GET"
,
url
,
true
);
//Allow plugins direct access to xhr headers
//Allow plugins direct access to xhr headers
if
(
headers
)
{
if
(
headers
)
{
...
@@ -277,7 +309,7 @@
...
@@ -277,7 +309,7 @@
status
=
xhr
.
status
;
status
=
xhr
.
status
;
if
(
status
>
399
&&
status
<
600
)
{
if
(
status
>
399
&&
status
<
600
)
{
//An http 4xx or 5xx error. Signal an error.
//An http 4xx or 5xx error. Signal an error.
err
=
new
Error
(
url
+
' HTTP status: '
+
status
);
err
=
new
Error
(
url
+
" HTTP status: "
+
status
);
err
.
xhr
=
xhr
;
err
.
xhr
=
xhr
;
errback
(
err
);
errback
(
err
);
}
else
{
}
else
{
...
@@ -287,16 +319,26 @@
...
@@ -287,16 +319,26 @@
};
};
xhr
.
send
(
null
);
xhr
.
send
(
null
);
};
};
}
else
if
(
masterConfig
.
env
===
'rhino'
||
(
!
masterConfig
.
env
&&
}
else
if
(
typeof
Packages
!==
'undefined'
&&
typeof
java
!==
'undefined'
))
{
masterConfig
.
env
===
"rhino"
||
(
!
masterConfig
.
env
&&
typeof
Packages
!==
"undefined"
&&
typeof
java
!==
"undefined"
)
)
{
//Why Java, why is this so awkward?
//Why Java, why is this so awkward?
text
.
get
=
function
(
url
,
callback
)
{
text
.
get
=
function
(
url
,
callback
)
{
var
stringBuffer
,
line
,
var
stringBuffer
,
line
,
encoding
=
"utf-8"
,
encoding
=
"utf-8"
,
file
=
new
java
.
io
.
File
(
url
),
file
=
new
java
.
io
.
File
(
url
),
lineSeparator
=
java
.
lang
.
System
.
getProperty
(
"line.separator"
),
lineSeparator
=
java
.
lang
.
System
.
getProperty
(
"line.separator"
),
input
=
new
java
.
io
.
BufferedReader
(
new
java
.
io
.
InputStreamReader
(
new
java
.
io
.
FileInputStream
(
file
),
encoding
)),
input
=
new
java
.
io
.
BufferedReader
(
content
=
''
;
new
java
.
io
.
InputStreamReader
(
new
java
.
io
.
FileInputStream
(
file
),
encoding
)
),
content
=
""
;
try
{
try
{
stringBuffer
=
new
java
.
lang
.
StringBuffer
();
stringBuffer
=
new
java
.
lang
.
StringBuffer
();
line
=
input
.
readLine
();
line
=
input
.
readLine
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment