Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
www.fudou6.com
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liaili
www.fudou6.com
Commits
195ea91a
Commit
195ea91a
authored
Aug 11, 2016
by
superman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改IE9 BUG
parent
1378803d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
26 deletions
+28
-26
products.jsx
public/javascripts/products.jsx
+3
-3
project.jsx
public/javascripts/project.jsx
+2
-2
utils.jsx
public/javascripts/utils.jsx
+23
-21
No files found.
public/javascripts/products.jsx
View file @
195ea91a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
function
fetch
(
query
,
panel
)
{
function
fetch
(
query
,
panel
)
{
const
data
=
{...
query
,
p
:
(
parseInt
(
query
.
p
,
10
)
||
1
)
-
1
};
const
data
=
{...
query
,
p
:
(
parseInt
(
query
.
p
,
10
)
||
1
)
-
1
};
request
(
'/api/1.0/prod/hList.json'
,
data
).
then
(({
hasNext
,
items
})
=>
{
request
(
'/api/1.0/prod/hList.json'
,
data
).
done
(({
hasNext
,
items
})
=>
{
if
(
items
&&
items
.
length
)
{
if
(
items
&&
items
.
length
)
{
let
html
=
items
.
map
(
item
=>
{
let
html
=
items
.
map
(
item
=>
{
return
`<li data-id="
${
item
.
id
}
" class="product-item status-
${
item
.
status
}
">
return
`<li data-id="
${
item
.
id
}
" class="product-item status-
${
item
.
status
}
">
...
@@ -49,13 +49,13 @@ function fetch(query, panel) {
...
@@ -49,13 +49,13 @@ function fetch(query, panel) {
$
(
'.pagination'
,
panel
).
html
(
pagination
.
join
(
''
));
$
(
'.pagination'
,
panel
).
html
(
pagination
.
join
(
''
));
history
.
replaceState
&&
history
.
replaceState
(
null
,
null
,
location
.
pathname
+
'?'
+
serialize
(
query
));
history
.
replaceState
&&
history
.
replaceState
(
null
,
null
,
location
.
pathname
+
'?'
+
serialize
(
query
));
}
}
}).
catch
(
err
=>
{
}).
fail
(
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
});
});
}
}
function
fetchCates
(
query
)
{
function
fetchCates
(
query
)
{
request
(
'/api/1.0/cate/cates.json'
).
then
(({
pCates
})
=>
{
request
(
'/api/1.0/cate/cates.json'
).
done
(({
pCates
})
=>
{
const
cates
=
[];
const
cates
=
[];
pCates
.
unshift
({
pCates
.
unshift
({
name
:
'全部'
,
name
:
'全部'
,
...
...
public/javascripts/project.jsx
View file @
195ea91a
...
@@ -63,9 +63,9 @@
...
@@ -63,9 +63,9 @@
request
(
'/api/1.0/proj/add.json'
,
{
request
(
'/api/1.0/proj/add.json'
,
{
mobile
,
mobile
,
description
description
},
'POST'
).
then
(()
=>
{
},
'POST'
).
done
(()
=>
{
$successDialog
.
fadeIn
(
300
);
$successDialog
.
fadeIn
(
300
);
}).
catch
(()
=>
{
}).
fail
(()
=>
{
alert
(
'提交失败, 请稍后再试!'
);
alert
(
'提交失败, 请稍后再试!'
);
});
});
$introducerMobile
.
val
(
''
);
$introducerMobile
.
val
(
''
);
...
...
public/javascripts/utils.jsx
View file @
195ea91a
function
request
(
url
,
data
,
method
=
'GET'
)
{
function
request
(
url
,
data
,
method
=
'GET'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
promise
=
$
.
Deferred
();
$
.
ajax
(
url
,
{
$
.
ajax
(
url
,
{
type
:
method
,
type
:
method
,
dataType
:
'json'
,
dataType
:
'json'
,
data
,
data
,
success
:
res
=>
{
success
:
res
=>
{
if
(
res
&&
res
.
status
==
1
)
{
if
(
res
&&
res
.
status
==
1
)
{
resolve
(
res
.
result
);
promise
.
resolve
(
res
.
result
);
}
else
{
}
else
{
reject
({
promise
.
reject
({
code
:
res
&&
res
.
code
||
0
,
code
:
res
&&
res
.
code
||
0
,
message
:
res
&&
res
.
msg
||
res
.
message
||
'系统错误,请稍后再试!'
message
:
res
&&
res
.
msg
||
res
.
message
||
'系统错误,请稍后再试!'
});
}
},
error
:
(
xhr
,
status
,
text
)
=>
{
console
.
log
(
xhr
,
status
,
text
);
reject
({
code
:
xhr
&&
xhr
.
status
||
status
,
message
:
text
});
});
}
}
});
},
error
:
(
xhr
,
status
,
text
)
=>
{
console
.
log
(
xhr
,
status
,
text
);
promise
.
reject
({
code
:
xhr
&&
xhr
.
status
||
status
,
message
:
text
});
}
});
});
return
promise
;
}
}
function
formatMoney
(
money
=
0
)
{
function
formatMoney
(
money
=
0
)
{
let
ret
;
let
ret
;
if
(
isNaN
(
money
))
{
if
(
isNaN
(
money
))
{
...
...
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