Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
xinhot
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fb63b2df
authored
Mar 15, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
9eb032c6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
js/global.js
js/global.js
View file @
fb63b2df
...
...
@@ -20,19 +20,20 @@
return
object
[
value
];
},
getData
:
function
(
params
,
type
,
callback
)
{
var
index
=
layer
.
load
(
1
,
{
if
(
type
==
1
)
{
var
index
=
layer
.
load
(
1
,
{
offset
:
[
'50%'
,
"50%"
],
shade
:
false
});
if
(
type
==
1
)
{
$
.
ajax
({
type
:
"GET"
,
url
:
"https://api.ichunt.com/xht/companyinfo"
,
data
:
params
,
xhrFields
:
{
withCredentials
:
true
},
success
:
function
(
data
)
{
layer
.
close
(
index
);
if
(
data
.
err_code
==
0
)
{
typeof
callback
==
'function'
&&
callback
(
data
);
layer
.
close
(
index
);
}
}
});
...
...
@@ -43,7 +44,6 @@
data
:
params
,
xhrFields
:
{
withCredentials
:
true
},
success
:
function
(
data
)
{
layer
.
close
(
index
);
if
(
data
.
err_code
==
0
)
{
typeof
callback
==
'function'
&&
callback
(
data
);
}
...
...
@@ -53,6 +53,18 @@
},
handleBind
:
function
(
opt
)
{
//menu
this
.
getData
(
null
,
2
,
function
(
res
)
{
var
html
=
[];
for
(
var
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
html
.
push
(
'<dd><a target="_blank" href="product_tep.html?id='
+
(
parseInt
(
i
)
+
1
)
+
'">'
+
res
.
data
[
i
].
sample_name
+
'</a></dd>'
)
}
$
(
"#menu"
).
empty
().
append
(
html
.
join
(
''
));
});
//nav hover
$
(
".pc-nav-wrap"
).
find
(
'li'
).
hover
(
function
()
{
$
(
this
).
children
(
'dl'
).
slideDown
(
'slow'
);
...
...
@@ -139,20 +151,7 @@
}
});
if
(
$
(
"#temp"
).
length
>
0
){
//menu
this
.
getData
(
null
,
2
,
function
(
res
)
{
var
html
=
[];
for
(
var
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
html
.
push
(
'<dd><a target="_blank" href="product_tep.html?id='
+
(
parseInt
(
i
)
+
1
)
+
'">'
+
res
.
data
[
i
].
sample_name
+
'</a></dd>'
)
}
$
(
"#menu"
).
empty
().
append
(
html
.
join
(
''
));
});
if
(
$
(
"#temp"
).
length
>
0
)
{
//产品详情
var
id
=
opt
.
getRequest
(
'id'
);
if
(
id
)
{
...
...
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