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
c5da3fc9
Commit
c5da3fc9
authored
Aug 01, 2016
by
liaili
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'express' of
http://gitlab.yanky.cn/liaili/www.fudou6.com
into express
parents
6c817adb
2935167a
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
835 additions
and
747 deletions
+835
-747
project.js
public/javascripts/project.js
+42
-23
project.js.map
public/javascripts/project.js.map
+1
-1
project.jsx
public/javascripts/project.jsx
+54
-42
project.min.js
public/javascripts/project.min.js
+1
-1
about.css
public/stylesheets/about.css
+175
-125
about.less
public/stylesheets/about.less
+102
-49
index.css
public/stylesheets/index.css
+13
-7
index.less
public/stylesheets/index.less
+47
-40
project.css
public/stylesheets/project.css
+64
-103
project.less
public/stylesheets/project.less
+77
-114
style.css
public/stylesheets/style.css
+11
-1
style.less
public/stylesheets/style.less
+10
-4
index.js
routes/index.js
+8
-4
product.js
routes/product.js
+123
-147
product.js.map
routes/product.js.map
+1
-1
product.jsx
routes/product.jsx
+2
-1
about.hbs
views/about.hbs
+47
-29
layout.hbs
views/layout.hbs
+6
-6
product.hbs
views/product.hbs
+15
-17
project.hbs
views/project.hbs
+36
-32
No files found.
public/javascripts/project.js
View file @
c5da3fc9
...
...
@@ -5,52 +5,71 @@
*/
(
function
()
{
var
$form
=
$
(
'#container .introducer'
);
var
$submit
=
$
(
'input[type="submit"]'
,
$form
);
var
$introducerMobile
=
$
(
'#introducerMobile'
,
$form
);
var
$projectDescription
=
$
(
'#projectDescription'
,
$form
);
var
$errorPhone
=
$
(
'.error-phone'
,
$form
);
var
$errorDescription
=
$
(
'.error-description'
,
$form
);
var
$successDialog
=
$
(
'.modal-box-success'
);
var
filterMobileInput
=
function
filterMobileInput
(
$mobile
)
{
$mobile
.
val
((
$mobile
.
val
()
+
''
).
replace
(
/
[^\d]
/g
,
''
));
};
var
validateMobile
=
function
validateMobile
(
mobile
)
{
return
(
/^
[\d]{11}
$/g
.
test
(
mobile
)
);
var
validateMobile
=
function
validateMobile
()
{
var
mobile
=
$
.
trim
(
$introducerMobile
.
val
()
+
''
);
if
(
/^
[\d]{11}
$/g
.
test
(
mobile
))
{
$errorPhone
.
empty
();
return
mobile
;
}
else
{
$errorPhone
.
html
(
'手机号输入错误!'
);
return
false
;
}
};
var
validateRequire
=
function
validateRequire
(
value
)
{
return
value
.
length
;
var
validateDescription
=
function
validateDescription
()
{
var
description
=
$
.
trim
(
$projectDescription
.
val
()
+
''
);
if
(
description
.
length
)
{
$errorDescription
.
empty
();
return
description
;
}
else
{
$errorDescription
.
html
(
'请输入项目描述内容!'
);
return
false
;
}
};
$introducerMobile
.
on
(
'keyup'
,
function
(
e
)
{
filterMobileInput
(
$introducerMobile
);
}).
on
(
'change blur'
,
function
(
e
)
{
validateMobile
(
$
.
trim
(
$introducerMobile
.
val
()
+
''
))
?
$errorPhone
.
empty
()
:
$errorPhone
.
html
(
'手机号输入错误!'
);
validateMobile
();
}).
on
(
'focus'
,
function
(
e
)
{
$errorPhone
.
empty
();
});
$projectDescription
.
on
(
'change blur'
,
function
(
e
)
{
validateRequire
(
$
.
trim
(
$projectDescription
.
val
()
+
''
))
?
$errorDescription
.
empty
()
:
$errorDescription
.
html
(
'请输入项目描述内容!'
);
validateDescription
();
}).
on
(
'focus'
,
function
(
e
)
{
$errorDescription
.
empty
();
});
$successDialog
.
on
(
'click'
,
'.modal-dialog-close'
,
function
(
e
)
{
$successDialog
.
fadeOut
(
300
);
});
$form
.
on
(
'submit'
,
function
(
e
)
{
var
mobile
=
$
.
trim
(
$introducerMobile
.
val
()
+
''
);
var
desc
=
$
.
trim
(
$projectDescription
.
val
()
+
''
);
if
(
validateMobile
(
mobile
))
{
$errorPhone
.
empty
();
}
else
{
$errorPhone
.
html
(
'手机号输入错误!'
);
return
;
}
if
(
validateRequire
(
desc
))
{
$errorDescription
.
empty
();
}
else
{
$errorDescription
.
html
(
'请输入项目描述内容!'
);
return
;
}
request
(
''
,
{},
'POST'
).
then
(
function
(
result
)
{
console
.
log
(
result
);
e
.
preventDefault
();
var
mobile
=
validateMobile
();
var
description
=
validateDescription
();
if
(
mobile
&&
description
)
{
request
(
'/api/1.0/proj/add.json'
,
{
mobile
:
mobile
,
description
:
description
},
'POST'
).
then
(
function
()
{
$successDialog
.
fadeIn
(
300
);
}).
catch
(
function
()
{
alert
(
'提交失败, 请稍后再试!'
);
});
}
});
})();
...
...
public/javascripts/project.js.map
View file @
c5da3fc9
{"version":3,"sources":["project.jsx"],"names":[],"mappings":";;AAAA;;;AAGA,CAAC,YAAI;AACD,QAAM,QAAQ,EAAE,wBAAF,CAAd;AACA,QAAM,oBAAoB,EAAE,mBAAF,EAAuB,KAAvB,CAA1B;AACA,QAAM,sBAAsB,EAAE,qBAAF,EAAyB,KAAzB,CAA5B;AACA,QAAM,cAAc,EAAE,cAAF,EAAkB,KAAlB,CAApB;AACA,QAAM,oBAAqB,EAAE,oBAAF,EAAwB,KAAxB,CAA3B;;AAEA,QAAM,oBAAoB,SAApB,iBAAoB,CAAC,OAAD,EAAW;AACjC,gBAAQ,GAAR,CAAY,CAAC,QAAQ,GAAR,KAAc,EAAf,EAAmB,OAAnB,CAA2B,QAA3B,EAAqC,EAArC,CAAZ;AACH,KAFD;;AAIA,QAAM,iBAAiB,SAAjB,cAAiB,CAAC,MAAD,EAAU;AAC7B,eAAO,eAAc,IAAd,CAAmB,MAAnB;AAAP;AACH,KAFD;;AAIA,QAAM,kBAAkB,SAAlB,eAAkB,CAAC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A1B,CAA6B,OAA7B,EAAqC,GAArC,EAAyC,UAAC,CAAD,EAAK;AAC1C,UAAE,cAAF;AACA,kBAAU,MAAV,CAAiB,GAAjB;AACH,KAHD;;AAKA,cAAU,EAAV,CAAa,OAAb,EAAsB,qBAAtB,EAA6C,UAAC,CAAD,EAAK;AAC9C,UAAE,cAAF;AACA,kBAAU,OAAV,CAAkB,GAAlB;AACH,KAHD;AAOH,CAfD;;AAsBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"project.js","sourcesContent":["/**\n * Created by Administrator on 2016/7/27.\n */\n(()=>{\n const $form = $('#container .introducer');\n const $introducerMobile = $('#introducerMobile', $form);\n const $projectDescription = $('#projectDescription', $form);\n const $errorPhone = $('.error-phone', $form);\n const $errorDescription = $('.error-description', $form);\n\n const filterMobileInput = ($mobile)=>{\n $mobile.val(($mobile.val()+'').replace(/[^\\d]/g, ''));\n };\n\n const validateMobile = (mobile)=>{\n return /^[\\d]{11}$/g.test(mobile);\n };\n\n const validateRequire = (value)=>{\n return value.length;\n };\n\n $introducerMobile.on('keyup', (e)=>{\n filterMobileInput($introducerMobile);\n }).on('change blur', (e)=>{\n validateMobile($.trim($introducerMobile.val()+'')) ?\n $errorPhone.empty() :\n $errorPhone.html('手机号输入错误!');\n });\n\n $projectDescription.on('change blur', (e)=>{\n validateRequire($.trim($projectDescription.val()+'')) ?\n $errorDescription.empty() :\n $errorDescription.html('请输入项目描述内容!');\n });\n\n $form.on('submit', (e)=>{\n let mobile = $.trim($introducerMobile.val()+'');\n let desc = $.trim($projectDescription.val()+'');\n if(validateMobile(mobile)){\n $errorPhone.empty()\n }else{\n $errorPhone.html('手机号输入错误!');\n return;\n }\n if(validateRequire(desc)){\n $errorDescription.empty()\n }else {\n $errorDescription.html('请输入项目描述内容!');\n return;\n }\n request('', {}, 'POST').then((result)=>{\n console.log(result);\n });\n });\n})();\n\n(()=>{\n const $modalBox = $('.modal-box');\n\n $('.hot-project-address').on('click','a',(e)=>{\n e.preventDefault();\n $modalBox.fadeIn(300);\n });\n\n $modalBox.on('click', '.modal-dialog-close', (e)=>{\n e.preventDefault();\n $modalBox.fadeOut(300);\n });\n\n\n\n})();\n\n\n\n\n\n\n// (function () {\n//\n//\n//\n//\n//\n// var $modalBoxProject = $('.modal-box-project');\n// var $modalBoxSuccess = $('.modal-box-success');\n//\n//\n//\n//\n// /**\n// * 地图项目地址弹框\n// */\n// $('.hot-project-address a').click(function (e) {\n// e.preventDefault();\n// $modalBox.fadeIn(300);\n// });\n// $('#modalBoxHidden').click(function (e) {\n// e.preventDefault();\n// $modalBox.fadeOut(300);\n// });\n//\n// /**\n// * 项目提交弹框\n// */\n// $submit.on('click',function(e){\n// e.preventDefault();\n// $modalBoxSuccess.fadeIn(300);\n// });\n// $('.modal-box-success a').on('click',function(e){\n// e.preventDefault();\n// $modalBoxSuccess.fadeOut(300);\n// });\n//\n//\n// })();"]}
\ No newline at end of file
{"version":3,"sources":["project.jsx"],"names":[],"mappings":";;AAAA;;;AAGA,CAAC,YAAK;AACF,QAAM,QAAQ,EAAE,wBAAF,CAAd;AACA,QAAM,UAAU,EAAE,sBAAF,EAA0B,KAA1B,CAAhB;AACA,QAAM,oBAAoB,EAAE,mBAAF,EAAuB,KAAvB,CAA1B;AACA,QAAM,sBAAsB,EAAE,qBAAF,EAAyB,KAAzB,CAA5B;AACA,QAAM,cAAc,EAAE,cAAF,EAAkB,KAAlB,CAApB;AACA,QAAM,oBAAoB,EAAE,oBAAF,EAAwB,KAAxB,CAA1B;AACA,QAAM,iBAAiB,EAAE,oBAAF,CAAvB;;AAEA,QAAM,oBAAoB,SAApB,iBAAoB,CAAC,OAAD,EAAY;AAClC,gBAAQ,GAAR,CAAY,CAAC,QAAQ,GAAR,KAAgB,EAAj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AS,gBAAb;AACA,YAAI,cAAc,qBAAlB;AACA,YAAI,UAAU,WAAd,EAA2B;AACvB,oBAAQ,wBAAR,EAAkC;AAC9B,8BAD8B;AAE9B;AAF8B,aAAlC,EAGG,MAHH,EAGW,IAHX,CAGgB,YAAK;AACjB,+BAAe,MAAf,CAAsB,GAAtB;AACH,aALD,EAKG,KALH,CAKS,YAAK;AACV,sBAAM,cAAN;AACH,aAPD;AAQH;AACJ,KAdD;AAeH,CArED;;AAuEA,CAAC,YAAK;AACF,QAAM,YAAY,EAAE,YAAF,CAAlB;;AAEA,MAAE,sBAAF,EAA0B,EAA1B,CAA6B,OAA7B,EAAsC,GAAtC,EAA2C,UAAC,CAAD,EAAM;AAC7C,UAAE,cAAF;AACA,kBAAU,MAAV,CAAiB,GAAjB;AACH,KAHD;;AAKA,cAAU,EAAV,CAAa,OAAb,EAAsB,qBAAtB,EAA6C,UAAC,CAAD,EAAM;AAC/C,UAAE,cAAF;AACA,kBAAU,OAAV,CAAkB,GAAlB;AACH,KAHD;AAMH,CAdD;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"project.js","sourcesContent":["/**\n * Created by Administrator on 2016/7/27.\n */\n(()=> {\n const $form = $('#container .introducer');\n const $submit = $('input[type=\"submit\"]', $form);\n const $introducerMobile = $('#introducerMobile', $form);\n const $projectDescription = $('#projectDescription', $form);\n const $errorPhone = $('.error-phone', $form);\n const $errorDescription = $('.error-description', $form);\n const $successDialog = $('.modal-box-success');\n\n const filterMobileInput = ($mobile)=> {\n $mobile.val(($mobile.val() + '').replace(/[^\\d]/g, ''));\n };\n\n const validateMobile = ()=> {\n let mobile = $.trim($introducerMobile.val() + '');\n if (/^[\\d]{11}$/g.test(mobile)) {\n $errorPhone.empty();\n return mobile;\n } else {\n $errorPhone.html('手机号输入错误!');\n return false;\n }\n };\n\n const validateDescription = ()=> {\n let description = $.trim($projectDescription.val() + '');\n if (description.length) {\n $errorDescription.empty();\n return description;\n } else {\n $errorDescription.html('请输入项目描述内容!');\n return false;\n }\n };\n\n $introducerMobile.on('keyup', (e)=> {\n filterMobileInput($introducerMobile);\n }).on('change blur', (e)=> {\n validateMobile();\n }).on('focus', (e)=> {\n $errorPhone.empty();\n });\n\n $projectDescription.on('change blur', (e)=> {\n validateDescription();\n }).on('focus', (e)=> {\n $errorDescription.empty();\n });\n\n\n $successDialog.on('click', '.modal-dialog-close', (e)=> {\n $successDialog.fadeOut(300);\n });\n\n $form.on('submit', (e)=> {\n e.preventDefault();\n let mobile = validateMobile();\n let description = validateDescription();\n if (mobile && description) {\n request('/api/1.0/proj/add.json', {\n mobile,\n description\n }, 'POST').then(()=> {\n $successDialog.fadeIn(300);\n }).catch(()=> {\n alert('提交失败, 请稍后再试!');\n });\n }\n });\n})();\n\n(()=> {\n const $modalBox = $('.modal-box');\n\n $('.hot-project-address').on('click', 'a', (e)=> {\n e.preventDefault();\n $modalBox.fadeIn(300);\n });\n\n $modalBox.on('click', '.modal-dialog-close', (e)=> {\n e.preventDefault();\n $modalBox.fadeOut(300);\n });\n\n\n})();\n\n\n// (function () {\n//\n//\n//\n//\n//\n// var $modalBoxProject = $('.modal-box-project');\n// var $modalBoxSuccess = $('.modal-box-success');\n//\n//\n//\n//\n// /**\n// * 地图项目地址弹框\n// */\n// $('.hot-project-address a').click(function (e) {\n// e.preventDefault();\n// $modalBox.fadeIn(300);\n// });\n// $('#modalBoxHidden').click(function (e) {\n// e.preventDefault();\n// $modalBox.fadeOut(300);\n// });\n//\n// /**\n// * 项目提交弹框\n// */\n// $submit.on('click',function(e){\n// e.preventDefault();\n// $modalBoxSuccess.fadeIn(300);\n// });\n// $('.modal-box-success a').on('click',function(e){\n// e.preventDefault();\n// $modalBoxSuccess.fadeOut(300);\n// });\n//\n//\n// })();"]}
\ No newline at end of file
public/javascripts/project.jsx
View file @
c5da3fc9
/**
* Created by Administrator on 2016/7/27.
*/
(()
=>
{
(()
=>
{
const
$form
=
$
(
'#container .introducer'
);
const
$submit
=
$
(
'input[type="submit"]'
,
$form
);
const
$introducerMobile
=
$
(
'#introducerMobile'
,
$form
);
const
$projectDescription
=
$
(
'#projectDescription'
,
$form
);
const
$errorPhone
=
$
(
'.error-phone'
,
$form
);
const
$errorDescription
=
$
(
'.error-description'
,
$form
);
const
$successDialog
=
$
(
'.modal-box-success'
);
const
filterMobileInput
=
(
$mobile
)
=>
{
$mobile
.
val
((
$mobile
.
val
()
+
''
).
replace
(
/
[^\d]
/g
,
''
));
const
filterMobileInput
=
(
$mobile
)
=>
{
$mobile
.
val
((
$mobile
.
val
()
+
''
).
replace
(
/
[^\d]
/g
,
''
));
};
const
validateMobile
=
(
mobile
)
=>
{
return
/^
[\d]{11}
$/g
.
test
(
mobile
);
const
validateMobile
=
()
=>
{
let
mobile
=
$
.
trim
(
$introducerMobile
.
val
()
+
''
);
if
(
/^
[\d]{11}
$/g
.
test
(
mobile
))
{
$errorPhone
.
empty
();
return
mobile
;
}
else
{
$errorPhone
.
html
(
'手机号输入错误!'
);
return
false
;
}
};
const
validateRequire
=
(
value
)
=>
{
return
value
.
length
;
const
validateDescription
=
()
=>
{
let
description
=
$
.
trim
(
$projectDescription
.
val
()
+
''
);
if
(
description
.
length
)
{
$errorDescription
.
empty
();
return
description
;
}
else
{
$errorDescription
.
html
(
'请输入项目描述内容!'
);
return
false
;
}
};
$introducerMobile
.
on
(
'keyup'
,
(
e
)
=>
{
$introducerMobile
.
on
(
'keyup'
,
(
e
)
=>
{
filterMobileInput
(
$introducerMobile
);
}).
on
(
'change blur'
,
(
e
)
=>
{
validateMobile
(
$
.
trim
(
$introducerMobile
.
val
()
+
''
))
?
$errorPhone
.
empty
()
:
$errorPhone
.
html
(
'手机号输入错误!'
);
}).
on
(
'change blur'
,
(
e
)
=>
{
validateMobile
(
);
}).
on
(
'focus'
,
(
e
)
=>
{
$errorPhone
.
empty
(
);
});
$projectDescription
.
on
(
'change blur'
,
(
e
)
=>
{
validate
Require
(
$
.
trim
(
$projectDescription
.
val
()
+
''
))
?
$errorDescription
.
empty
()
:
$errorDescription
.
html
(
'请输入项目描述内容!'
);
$projectDescription
.
on
(
'change blur'
,
(
e
)
=>
{
validate
Description
();
}).
on
(
'focus'
,
(
e
)
=>
{
$errorDescription
.
empty
(
);
});
$form
.
on
(
'submit'
,
(
e
)
=>
{
let
mobile
=
$
.
trim
(
$introducerMobile
.
val
()
+
''
);
let
desc
=
$
.
trim
(
$projectDescription
.
val
()
+
''
);
if
(
validateMobile
(
mobile
)){
$errorPhone
.
empty
()
}
else
{
$errorPhone
.
html
(
'手机号输入错误!'
);
return
;
}
if
(
validateRequire
(
desc
)){
$errorDescription
.
empty
()
}
else
{
$errorDescription
.
html
(
'请输入项目描述内容!'
);
return
;
}
request
(
''
,
{},
'POST'
).
then
((
result
)
=>
{
console
.
log
(
result
);
$successDialog
.
on
(
'click'
,
'.modal-dialog-close'
,
(
e
)
=>
{
$successDialog
.
fadeOut
(
300
);
});
$form
.
on
(
'submit'
,
(
e
)
=>
{
e
.
preventDefault
();
let
mobile
=
validateMobile
();
let
description
=
validateDescription
();
if
(
mobile
&&
description
)
{
request
(
'/api/1.0/proj/add.json'
,
{
mobile
,
description
},
'POST'
).
then
(()
=>
{
$successDialog
.
fadeIn
(
300
);
}).
catch
(()
=>
{
alert
(
'提交失败, 请稍后再试!'
);
});
}
});
})();
(()
=>
{
(()
=>
{
const
$modalBox
=
$
(
'.modal-box'
);
$
(
'.hot-project-address'
).
on
(
'click'
,
'a'
,(
e
)
=>
{
$
(
'.hot-project-address'
).
on
(
'click'
,
'a'
,
(
e
)
=>
{
e
.
preventDefault
();
$modalBox
.
fadeIn
(
300
);
});
$modalBox
.
on
(
'click'
,
'.modal-dialog-close'
,
(
e
)
=>
{
$modalBox
.
on
(
'click'
,
'.modal-dialog-close'
,
(
e
)
=>
{
e
.
preventDefault
();
$modalBox
.
fadeOut
(
300
);
});
})();
// (function () {
//
//
...
...
public/javascripts/project.min.js
View file @
c5da3fc9
"use strict"
;(
function
(){
var
$form
=
$
(
"#container .introducer"
);
var
$introducerMobile
=
$
(
"#introducerMobile"
,
$form
);
var
$projectDescription
=
$
(
"#projectDescription"
,
$form
);
var
$errorPhone
=
$
(
".error-phone"
,
$form
);
var
$errorDescription
=
$
(
".error-description"
,
$form
);
var
filterMobileInput
=
function
filterMobileInput
(
$mobile
){
$mobile
.
val
((
$mobile
.
val
()
+
""
).
replace
(
/
[^\d]
/g
,
""
))};
var
validateMobile
=
function
validateMobile
(
mobile
){
return
/^
[\d]{11}
$/g
.
test
(
mobile
)};
var
validateRequire
=
function
validateRequire
(
value
){
return
value
.
length
};
$introducerMobile
.
on
(
"keyup"
,
function
(
e
){
filterMobileInput
(
$introducerMobile
)}).
on
(
"change blur"
,
function
(
e
){
validateMobile
(
$
.
trim
(
$introducerMobile
.
val
()
+
""
))?
$errorPhone
.
empty
():
$errorPhone
.
html
(
"手机号输入错误!"
)});
$projectDescription
.
on
(
"change blur"
,
function
(
e
){
validateRequire
(
$
.
trim
(
$projectDescription
.
val
()
+
""
))?
$errorDescription
.
empty
():
$errorDescription
.
html
(
"请输入项目描述内容!"
)});
$form
.
on
(
"submit"
,
function
(
e
){
var
mobile
=
$
.
trim
(
$introducerMobile
.
val
()
+
""
);
var
desc
=
$
.
trim
(
$projectDescription
.
val
()
+
""
);
if
(
validateMobile
(
mobile
)){
$errorPhone
.
empty
()}
else
{
$errorPhone
.
html
(
"手机号输入错误!"
);
return
}
if
(
validateRequire
(
desc
)){
$errorDescription
.
empty
()}
else
{
$errorDescription
.
html
(
"请输入项目描述内容!"
);
return
}
request
(
""
,{},
"POST"
).
then
(
function
(
result
){
console
.
log
(
result
)})})})();(
function
(){
var
$modalBoxProject
=
$
(
".modal-box-project"
);
var
$modalBoxSuccess
=
$
(
".modal-box-success"
);
$
(
".hot-project-address a"
).
click
(
function
(
e
){
e
.
preventDefault
();
$modalBox
.
fadeIn
(
300
)});
$
(
"#modalBoxHidden"
).
click
(
function
(
e
){
e
.
preventDefault
();
$modalBox
.
fadeOut
(
300
)});
$submit
.
on
(
"click"
,
function
(
e
){
e
.
preventDefault
();
$modalBoxSuccess
.
fadeIn
(
300
)});
$
(
".modal-box-success a"
).
on
(
"click"
,
function
(
e
){
e
.
preventDefault
();
$modalBoxSuccess
.
fadeOut
(
300
)})})();
\ No newline at end of file
"use strict"
;(
function
(){
var
$form
=
$
(
"#container .introducer"
);
var
$submit
=
$
(
'input[type="submit"]'
,
$form
);
var
$introducerMobile
=
$
(
"#introducerMobile"
,
$form
);
var
$projectDescription
=
$
(
"#projectDescription"
,
$form
);
var
$errorPhone
=
$
(
".error-phone"
,
$form
);
var
$errorDescription
=
$
(
".error-description"
,
$form
);
var
$successDialog
=
$
(
".modal-box-success"
);
var
filterMobileInput
=
function
filterMobileInput
(
$mobile
){
$mobile
.
val
((
$mobile
.
val
()
+
""
).
replace
(
/
[^\d]
/g
,
""
))};
var
validateMobile
=
function
validateMobile
(){
var
mobile
=
$
.
trim
(
$introducerMobile
.
val
()
+
""
);
if
(
/^
[\d]{11}
$/g
.
test
(
mobile
)){
$errorPhone
.
empty
();
return
mobile
}
else
{
$errorPhone
.
html
(
"手机号输入错误!"
);
return
false
}};
var
validateDescription
=
function
validateDescription
(){
var
description
=
$
.
trim
(
$projectDescription
.
val
()
+
""
);
if
(
description
.
length
){
$errorDescription
.
empty
();
return
description
}
else
{
$errorDescription
.
html
(
"请输入项目描述内容!"
);
return
false
}};
$introducerMobile
.
on
(
"keyup"
,
function
(
e
){
filterMobileInput
(
$introducerMobile
)}).
on
(
"change blur"
,
function
(
e
){
validateMobile
()}).
on
(
"focus"
,
function
(
e
){
$errorPhone
.
empty
()});
$projectDescription
.
on
(
"change blur"
,
function
(
e
){
validateDescription
()}).
on
(
"focus"
,
function
(
e
){
$errorDescription
.
empty
()});
$successDialog
.
on
(
"click"
,
".modal-dialog-close"
,
function
(
e
){
$successDialog
.
fadeOut
(
300
)});
$form
.
on
(
"submit"
,
function
(
e
){
e
.
preventDefault
();
var
mobile
=
validateMobile
();
var
description
=
validateDescription
();
if
(
mobile
&&
description
){
request
(
"/api/1.0/proj/add.json"
,{
mobile
:
mobile
,
description
:
description
},
"POST"
).
then
(
function
(){
$successDialog
.
fadeIn
(
300
)}).
catch
(
function
(){
alert
(
"提交失败, 请稍后再试!"
)})}})})();(
function
(){
var
$modalBox
=
$
(
".modal-box"
);
$
(
".hot-project-address"
).
on
(
"click"
,
"a"
,
function
(
e
){
e
.
preventDefault
();
$modalBox
.
fadeIn
(
300
)});
$modalBox
.
on
(
"click"
,
".modal-dialog-close"
,
function
(
e
){
e
.
preventDefault
();
$modalBox
.
fadeOut
(
300
)})})();
\ No newline at end of file
public/stylesheets/about.css
View file @
c5da3fc9
/* .about-us-banner start */
.about-us-banner
{
width
:
100%
;
height
:
667px
;
background
:
url("../images/index/banner.jpg")
no-repeat
center
center
;
background-size
:
cover
;
...
...
@@ -8,7 +7,6 @@
text-align
:
center
;
}
.about-us-banner
.banner-box
{
width
:
1100px
;
margin
:
200px
auto
0
;
color
:
#fff
;
}
...
...
@@ -29,7 +27,6 @@
/* .about-us-banner end */
/* .about-us-banner-bottom start */
.about-us-banner-bottom
{
width
:
100%
;
height
:
824px
;
background
:
url("../images/about_us/bg_2.jpg")
no-repeat
center
center
;
background-size
:
cover
;
...
...
@@ -43,82 +40,23 @@
.about-us-banner-bottom
hr
{
display
:
block
;
width
:
73px
;
border
:
3px
solid
#0074c3
;
border-bottom-color
:
transparent
;
border-left-color
:
transparent
;
border-right-color
:
transparent
;
border
:
3px
solid
transparent
;
border-top-color
:
#0074c3
;
margin
:
0
auto
;
}
.about-us-banner-bottom
p
{
width
:
990px
;
margin
:
550px
auto
0
;
font-size
:
22px
;
width
:
992px
;
margin
:
552px
auto
0
;
line-height
:
42px
;
}
/* .about-us-banner-bottom end */
/* .company-introduction start */
.company-introduction
{
height
:
1300px
;
width
:
100%
;
background
:
#f6f6f6
;
}
.company-introduction
h2
{
width
:
1200px
;
height
:
74px
;
line-height
:
74px
;
font-size
:
46px
;
position
:
relative
;
padding-left
:
20px
;
margin
:
40px
auto
;
}
.company-introduction
h2
b
{
display
:
inline-block
;
height
:
74px
;
width
:
3px
;
background
:
#0074c3
;
position
:
absolute
;
left
:
0
;
top
:
0
;
}
.company-introduction
ul
{
width
:
1200px
;
margin
:
0
auto
;
}
.company-introduction
ul
li
{
text-align
:
center
;
float
:
left
;
width
:
300px
;
padding
:
0
50px
60px
;
}
.company-introduction
ul
li
h4
{
font-size
:
54px
;
color
:
#000
;
line-height
:
75px
;
}
.company-introduction
ul
li
h6
{
font-size
:
18px
;
color
:
#666666
;
margin
:
10px
0
20px
;
}
.company-introduction
ul
li
p
{
line-height
:
27px
;
font-size
:
15px
;
color
:
#000
;
text-align
:
left
;
}
.company-introduction
ul
li
:nth-child
(
1
)
{
width
:
299px
;
border-right
:
1px
solid
#c3c3c3
;
}
.company-introduction
ul
li
:nth-child
(
2
)
{
width
:
299px
;
border-right
:
1px
solid
#c3c3c3
;
}
.company-introduction
div
{
width
:
1200px
;
margin
:
0
auto
;
}
.company-introduction
div
a
{
/*div {
a {
display: inline-block;
width: 280px;
height: 270px;
...
...
@@ -126,12 +64,12 @@
margin-right: 17px;
border-right: 1px solid #c3c3c3;
position: relative;
}
.company-introduction
div
a
:nth-child
(
1
)
{
}
a:nth-child(1) {
background: url("../images/about_us/zhongjiang.jpg") no-repeat;
border-bottom: 1px solid #c3c3c3;
}
.company-introduction
div
a
:nth-child
(
1
)
::before
{
}
a:nth-child(1)::before {
content: '';
display: inline-block;
width: 17px;
...
...
@@ -140,8 +78,8 @@
left: 0;
bottom: -10px;
background: #f6f6f6;
}
.company-introduction
div
a
:nth-child
(
1
)
::after
{
}
a:nth-child(1)::after {
content: '';
display: inline-block;
width: 34px;
...
...
@@ -150,12 +88,12 @@
right: -17px;
bottom: -10px;
background: #f6f6f6;
}
.company-introduction
div
a
:nth-child
(
2
)
{
}
a:nth-child(2) {
background: url("../images/about_us/zhongrong.jpg") no-repeat;
border-bottom: 1px solid #c3c3c3;
}
.company-introduction
div
a
:nth-child
(
2
)
::after
{
}
a:nth-child(2)::after {
content: '';
display: inline-block;
width: 34px;
...
...
@@ -164,12 +102,12 @@
right: -17px;
bottom: -10px;
background: #f6f6f6;
}
.company-introduction
div
a
:nth-child
(
3
)
{
}
a:nth-child(3) {
background: url("../images/about_us/guomin.jpg") no-repeat;
border-bottom: 1px solid #c3c3c3;
}
.company-introduction
div
a
:nth-child
(
3
)
::after
{
}
a:nth-child(3)::after {
content: '';
display: inline-block;
width: 34px;
...
...
@@ -178,14 +116,14 @@
right: -17px;
bottom: -10px;
background: #f6f6f6;
}
.company-introduction
div
a
:nth-child
(
4
)
{
}
a:nth-child(4) {
background: url("../images/about_us/guangda.jpg") no-repeat;
margin-right: 0;
border-right: none;
border-bottom: 1px solid #c3c3c3;
}
.company-introduction
div
a
:nth-child
(
4
)
::after
{
}
a:nth-child(4)::after {
content: '';
display: inline-block;
width: 17px;
...
...
@@ -194,20 +132,102 @@
right: 0px;
bottom: -10px;
background: #f6f6f6;
}
.company-introduction
div
a
:nth-child
(
5
)
{
}
a:nth-child(5) {
background: url("../images/about_us/zhongxing.jpg") no-repeat;
}
.company-introduction
div
a
:nth-child
(
6
)
{
}
a:nth-child(6) {
background: url("../images/about_us/fangzheng.jpg") no-repeat;
}
.company-introduction
div
a
:nth-child
(
7
)
{
}
a:nth-child(7) {
background: url("../images/about_us/huaxing.jpg") no-repeat;
}
.company-introduction
div
a
:nth-child
(
8
)
{
}
a:nth-child(8) {
background: url("../images/about_us/zhongtai.jpg") no-repeat;
margin: 0;
border-right: none;
}
}*/
}
.company-introduction
>
div
{
width
:
1150px
;
margin
:
0
auto
;
padding-bottom
:
80px
;
}
.company-introduction
h2
{
height
:
50px
;
line-height
:
50px
;
font-size
:
36px
;
padding-left
:
20px
;
margin
:
40px
auto
;
border-left
:
3px
solid
#0074c3
;
}
.company-introduction
.gudong-list
{
margin
:
0
auto
;
}
.company-introduction
.gudong-list
li
{
float
:
left
;
width
:
33.33%
;
text-align
:
center
;
}
.company-introduction
.gudong-list
li
>
div
{
padding
:
0
50px
60px
;
border-right
:
1px
solid
#c3c3c3
;
}
.company-introduction
.gudong-list
li
h4
{
font-size
:
24px
;
color
:
#000
;
line-height
:
75px
;
}
.company-introduction
.gudong-list
li
h6
{
font-size
:
18px
;
color
:
#666666
;
margin
:
10px
0
20px
;
}
.company-introduction
.gudong-list
li
p
{
line-height
:
27px
;
font-size
:
15px
;
color
:
#000
;
text-align
:
left
;
}
.company-introduction
.gudong-list
li
:last-child
>
div
{
border-right
:
0
;
}
.company-introduction
.friend-list
a
{
float
:
left
;
position
:
relative
;
width
:
25%
;
height
:
287.5px
;
border-top
:
1px
solid
#c3c3c3
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
}
.company-introduction
.friend-list
a
:before
{
content
:
''
;
position
:
absolute
;
width
:
0
;
height
:
100%
;
border-left
:
1px
solid
#c3c3c3
;
}
.company-introduction
.friend-list
a
:after
{
content
:
''
;
position
:
absolute
;
width
:
40px
;
height
:
40px
;
background
:
#f6f6f6
;
bottom
:
-20px
;
right
:
-20px
;
z-index
:
1
;
}
.company-introduction
.friend-list
a
:nth-child
(
4n
+
1
)
:before
{
border-left
:
0
;
}
.company-introduction
.friend-list
a
:nth-child
(
1
),
.company-introduction
.friend-list
a
:nth-child
(
2
),
.company-introduction
.friend-list
a
:nth-child
(
3
),
.company-introduction
.friend-list
a
:nth-child
(
4
)
{
border-top
:
0
;
}
/* .company-introduction end */
/* .address-map */
...
...
@@ -268,3 +288,33 @@
margin-top
:
20px
;
}
/* .address-map */
@media
screen
and
(
min-width
:
769px
)
{
body
.company-introduction
>
div
,
body
.about-us-banner
.banner-box
{
width
:
990px
;
}
body
.company-introduction
.friend-list
a
{
width
:
247.5px
;
height
:
247.5px
;
}
}
@media
screen
and
(
min-width
:
1281px
)
{
body
.company-introduction
>
div
,
body
.about-us-banner
.banner-box
{
width
:
1150px
;
}
body
.company-introduction
.friend-list
a
{
width
:
287.5px
;
height
:
287.5px
;
}
}
@media
screen
and
(
min-width
:
1441px
)
{
body
.company-introduction
>
div
,
body
.about-us-banner
.banner-box
{
width
:
1360px
;
}
body
.company-introduction
.friend-list
a
{
width
:
340px
;
height
:
340px
;
}
}
public/stylesheets/about.less
View file @
c5da3fc9
...
...
@@ -3,14 +3,12 @@
/* .about-us-banner start */
.about-us-banner {
width: 100%;
height: 667px;
background: url("../images/index/banner.jpg") no-repeat center center;
background-size: cover;
color: #fff;
text-align: center;
.banner-box {
width: 1100px;
margin: 200px auto 0;
color: #fff;
h4 {
...
...
@@ -35,7 +33,6 @@
/* .about-us-banner-bottom start */
.about-us-banner-bottom {
width: 100%;
height: 824px;
background: url("../images/about_us/bg_2.jpg") no-repeat center center;
background-size: cover;
...
...
@@ -48,18 +45,15 @@
hr {
display: block;
width: 73px;
border: 3px solid #0074c3;
border-bottom-color:transparent;
border-left-color: transparent;
border-right-color: transparent;
border: 3px solid transparent;
border-top-color: #0074c3;
margin: 0 auto;
}
p {
width: 990px;
margin: 550px auto 0;
font-size: 22px;
width: 992px;
margin: 552px auto 0;
line-height: 42px;
}
}
...
...
@@ -68,37 +62,33 @@
/* .company-introduction start */
.company-introduction {
height: 1300px;
width: 100%;
background: #f6f6f6;
& > div {
width: @container-width;
margin: 0 auto;
padding-bottom:80px;
}
h2 {
width: 1200px;
height: 74px;
line-height: 74px;
font-size: 46px;
position: relative;
height: 50px;
line-height: 50px;
font-size: 36px;
padding-left: 20px;
margin: 40px auto;
b {
display: inline-block;
height: 74px;
width: 3px;
background: #0074c3;
position: absolute;
left: 0;
top: 0;
border-left: 3px solid #0074c3;
}
}
ul {
width: 1200px;
.gudong-list {
margin: 0 auto;
li {
float: left;
width: 33.33%;
text-align: center;
float:left;
width: 300px;
& > div {
padding: 0 50px 60px;
border-right: 1px solid #c3c3c3;
}
h4 {
font-size: 54px;
font-size:
24px; //
54px;
color: #000;
line-height: 75px;
}
...
...
@@ -113,19 +103,53 @@
color: #000;
text-align: left;
}
&:last-child > div {
border-right: 0;
}
li:nth-child(1) {
width: 299px;
border-right: 1px solid #c3c3c3;
}
li:nth-child(2) {
width: 299px;
border-right: 1px solid #c3c3c3;
}
.friend-list {
a {
float: left;
position: relative;
width: 25%;
height: @container-width /4;
border-top: 1px solid #c3c3c3;
background-repeat: no-repeat;
background-position: center center;
&:before {
content: '';
position: absolute;
width: 0;
height: 100%;
border-left: 1px solid #c3c3c3;
}
div {
width: 1200px;
margin: 0 auto;
&:after {
content: '';
position: absolute;
width: 40px;
height: 40px;
background: #f6f6f6;
bottom: -20px;
right: -20px;
z-index: 1;
}
&:nth-child(4n+1) {
&:before {
border-left: 0;
}
}
&:nth-child(1),
&:nth-child(2),
&:nth-child(3),
&:nth-child(4) {
border-top: 0;
}
}
}
/*div {
a {
display: inline-block;
width: 280px;
...
...
@@ -145,7 +169,7 @@
width: 17px;
height: 20px;
position: absolute;
left:0;
left:
0;
bottom: -10px;
background: #f6f6f6;
}
...
...
@@ -155,7 +179,7 @@
width: 34px;
height: 20px;
position: absolute;
right:-17px;
right:
-17px;
bottom: -10px;
background: #f6f6f6;
}
...
...
@@ -169,7 +193,7 @@
width: 34px;
height: 20px;
position: absolute;
right:-17px;
right:
-17px;
bottom: -10px;
background: #f6f6f6;
}
...
...
@@ -183,7 +207,7 @@
width: 34px;
height: 20px;
position: absolute;
right:-17px;
right:
-17px;
bottom: -10px;
background: #f6f6f6;
}
...
...
@@ -199,7 +223,7 @@
width: 17px;
height: 20px;
position: absolute;
right:0px;
right:
0px;
bottom: -10px;
background: #f6f6f6;
}
...
...
@@ -218,7 +242,7 @@
border-right: none;
}
}
}
*/
}
/* .company-introduction end */
...
...
@@ -283,3 +307,32 @@
}
/* .address-map */
.screen() {
.media(@screen-width-small, @container-width-small);
.media(@screen-width, @container-width);
.media(@screen-width-large, @container-width-large);
}
.media(@sw, @cw) {
@media screen and (min-width: @sw) {
.rules(@cw);
}
}
.rules(@cw) {
.company-introduction > div,
.about-us-banner .banner-box {
width: @cw;
}
.company-introduction {
.friend-list a {
width: @cw/4;
height: @cw/4;
}
}
}
body {
.screen();
}
\ No newline at end of file
public/stylesheets/index.css
View file @
c5da3fc9
...
...
@@ -318,11 +318,12 @@
}
.products
ul
li
:nth-child
(
1
)
>
div
:last-child
>
div
span
strong
,
.products
ul
li
:nth-child
(
2
)
>
div
:last-child
>
div
span
strong
{
font-size
:
17px
;
font-size
:
32px
;
font-weight
:
normal
;
}
.products
ul
li
:nth-child
(
1
)
>
div
:last-child
a
,
.products
ul
li
:nth-child
(
2
)
>
div
:last-child
a
{
font-size
:
2
4px
;
font-size
:
1
4px
;
color
:
#fff
;
}
.products
ul
li
:nth-child
(
n
+
3
)
{
...
...
@@ -345,10 +346,14 @@
}
.products
ul
li
:nth-child
(
n
+
3
)
>
div
:last-child
{
position
:
relative
;
transition
:
background
.3s
;
}
.products
ul
li
:nth-child
(
n
+
3
)
>
div
:last-child:hover
{
background-color
:
rgba
(
0
,
0
,
0
,
0.75
);
}
.products
ul
li
:nth-child
(
n
+
3
)
>
div
:last-child
h3
{
font-size
:
25px
;
margin
-top
:
80px
;
padding
-top
:
80px
;
text-align
:
center
;
line-height
:
30px
;
}
...
...
@@ -360,7 +365,7 @@
margin-bottom
:
24px
;
position
:
absolute
;
left
:
0
;
top
:
7
2px
;
top
:
15
2px
;
}
.products
ul
li
:nth-child
(
n
+
3
)
>
div
:last-child
>
div
:nth-child
(
3
)
span
{
width
:
33%
;
...
...
@@ -370,15 +375,16 @@
text-align
:
center
;
}
.products
ul
li
:nth-child
(
n
+
3
)
>
div
:last-child
>
div
:nth-child
(
3
)
span
strong
{
font-size
:
14px
;
font-size
:
32px
;
font-weight
:
normal
;
}
.products
ul
li
:nth-child
(
n
+
3
)
>
div
:last-child
>
div
:last-child
{
position
:
absolute
;
top
:
16
0px
;
top
:
27
0px
;
left
:
0
;
width
:
100%
;
text-align
:
center
;
font-size
:
2
4px
;
font-size
:
1
4px
;
}
.products
ul
li
:nth-child
(
n
+
3
)
>
div
:last-child
>
div
:last-child
a
{
color
:
#fff
;
...
...
public/stylesheets/index.less
View file @
c5da3fc9
...
...
@@ -155,7 +155,7 @@
}
}
}
.loop(@c) when (@c > 0){
.loop(@c) when (@c > 0)
{
.loop((@c - 1));
&:nth-child(@{c}) {
& > div {
...
...
@@ -316,12 +316,13 @@
float: left;
font-size: 16px;
strong {
font-size: 17px;
font-size: 32px;
font-weight: normal;
}
}
}
a {
font-size:
2
4px;
font-size:
1
4px;
color: #fff;
}
}
...
...
@@ -343,12 +344,16 @@
&:first-child {
background-size: cover;
}
}
& > div:last-child {
&:last-child {
position: relative;
transition: background .3s;
&:hover {
background-color: rgba(0, 0, 0, .75);
}
h3 {
font-size: 25px;
margin-top: 80px;
padding-top: 80px;
//margin-top: 80px;
text-align: center;
line-height: 30px;
}
...
...
@@ -360,7 +365,7 @@
margin-bottom: 24px;
position: absolute;
left: 0;
top: 7
2px;
top: 15
2px;
span {
width: 33%;
display: block;
...
...
@@ -368,17 +373,18 @@
font-size: 16px;
text-align: center;
strong {
font-size: 14px;
font-size: 32px;
font-weight: normal;
}
}
}
& > div:last-child {
position: absolute;
top: 16
0px;
top: 27
0px;
left: 0;
width: 100%;
text-align: center;
font-size: 2
4px;
font-size: 1
4px;
a {
color: #fff;
}
...
...
@@ -387,6 +393,7 @@
}
}
}
}
}
/*product end*/
...
...
@@ -412,7 +419,7 @@
width: @cw;
.mixin(@cw);
.download-element(@a, @b){
.download-element(@a, @b)
{
.android,
.iphone {
margin-left: @a;
...
...
@@ -485,7 +492,7 @@
width: (@cw + @mr)/3-@mr;
}
}
margin-bottom:@mr;
margin-bottom:
@mr;
}
&:nth-child(n+3) {
width: (@cw + @mr)/3-@mr;
...
...
public/stylesheets/project.css
View file @
c5da3fc9
...
...
@@ -118,7 +118,7 @@
border
:
none
;
font-size
:
24px
;
color
:
#fff
;
background
:
#
868686
;
background
:
#
ff4a4b
;
border-radius
:
10px
;
text-align
:
center
;
}
...
...
@@ -213,138 +213,96 @@
/* .hot-project-address end */
/* .hot-project-tabs start */
.hot-project-tabs
{
width
:
100%
;
height
:
690px
;
background
:
#f6f6f6
;
padding
:
180px
0
160px
0
;
}
.hot-project-tabs
ul
{
width
:
1203px
;
height
:
350px
;
margin
:
180px
auto
160px
;
width
:
1150px
;
margin
:
0
auto
;
border
:
1px
solid
#43abb6
;
}
.hot-project-tabs
ul
li
{
width
:
300px
;
height
:
100%
;
width
:
25%
;
float
:
left
;
font-size
:
16px
;
color
:
#000
;
text-align
:
center
;
background
:
#f6f6f6
;
transition-delay
:
.1s
;
transition
:
background
.5s
,
color
.5s
;
}
.hot-project-tabs
ul
li
dl
{
width
:
100%
;
.hot-project-tabs
ul
li
>
div
{
border-right
:
1px
solid
#43abb6
;
height
:
200px
;
padding-top
:
160px
;
position
:
relative
;
}
.hot-project-tabs
ul
li
dl
dt
{
width
:
115px
;
.hot-project-tabs
ul
li
>
div
:before
,
.hot-project-tabs
ul
li
>
div
:after
{
content
:
''
;
position
:
absolute
;
top
:
44px
;
left
:
50%
;
margin-left
:
-58px
;
height
:
115px
;
margin
:
44px
auto
0
;
width
:
115px
;
background
:
url(https://res.fudou6.com/c/4/20160801/by15pyq5qCH6aKYLTFfMDE=_480x240.png)
0
0
no-repeat
;
opacity
:
0
;
transform
:
scale
(
0
);
transition-delay
:
.1s
;
transition
:
.5s
;
}
.hot-project-tabs
ul
li
dl
dd
{
line-height
:
28px
;
.hot-project-tabs
ul
li
>
div
:before
{
transform
:
scale
(
1
);
opacity
:
1
;
}
.hot-project-tabs
ul
li
:last-child
>
div
{
border-right
:
0
;
}
.hot-project-tabs
ul
li
dl
dd
h4
{
.hot-project-tabs
ul
li
h4
{
font-size
:
28px
;
color
:
#43abb6
;
margin
:
1
4px
0
24
px
;
margin
:
1
0px
0
20
px
;
}
.hot-project-tabs
ul
li
:nth-child
(
1
)
{
b
order-right
:
1px
solid
#43abb6
;
.hot-project-tabs
ul
li
:nth-child
(
1
)
>
div
:before
{
b
ackground-position
:
-360px
-120px
;
}
.hot-project-tabs
ul
li
:nth-child
(
1
)
dt
{
background
:
url("https://res.fudou6.com/c/4/20160801/nbrdGFiczA1X2I=_115x115.png")
no-repeat
;
.hot-project-tabs
ul
li
:nth-child
(
1
)
>
div
:after
{
background
-position
:
-360px
0px
;
}
.hot-project-tabs
ul
li
:nth-child
(
2
)
{
b
order-right
:
1px
solid
#43abb6
;
.hot-project-tabs
ul
li
:nth-child
(
2
)
>
div
:before
{
b
ackground-position
:
-240px
-120px
;
}
.hot-project-tabs
ul
li
:nth-child
(
2
)
dt
{
background
:
url("https://res.fudou6.com/c/4/20160801/dgndGFiczA0X2I=_115x115.png")
no-repeat
;
.hot-project-tabs
ul
li
:nth-child
(
2
)
>
div
:after
{
background
-position
:
-240px
0px
;
}
.hot-project-tabs
ul
li
:nth-child
(
3
)
{
b
order-right
:
1px
solid
#43abb6
;
.hot-project-tabs
ul
li
:nth-child
(
3
)
>
div
:before
{
b
ackground-position
:
-120px
-120px
;
}
.hot-project-tabs
ul
li
:nth-child
(
3
)
dt
{
background
:
url("https://res.fudou6.com/c/4/20160801/p8edGFiczAzX2I=_115x115.png")
no-repeat
;
.hot-project-tabs
ul
li
:nth-child
(
3
)
>
div
:after
{
background
-position
:
-120px
0px
;
}
.hot-project-tabs
ul
li
:nth-child
(
4
)
dt
{
background
:
url("https://res.fudou6.com/c/4/20160801/6jpdGFiczAyX2I=_115x115.png")
no-repeat
;
.hot-project-tabs
ul
li
:nth-child
(
4
)
>
div
:before
{
background-position
:
0px
-120px
;
}
.hot-project-tabs
ul
li
:nth-child
(
4
)
>
div
:after
{
background-position
:
0px
0px
;
}
.hot-project-tabs
ul
li
:hover
{
transition-delay
:
0s
;
color
:
#fff
;
background
:
#43abb6
;
}
.hot-project-tabs
ul
li
:hover
h4
{
color
:
#fff
;
}
@-webkit-keyframes
changeOne
{
0
%
{
opacity
:
1
;
background
:
url("https://res.fudou6.com/c/4/20160801/nbrdGFiczA1X2I=_115x115.png")
no-repeat
;
}
50
%
{
opacity
:
0
;
}
100
%
{
background
:
url("https://res.fudou6.com/c/4/20160801/u42dGFiczA1X2E=_115x115.png")
no-repeat
;
opacity
:
1
;
}
}
.hot-project-tabs
ul
li
:nth-child
(
1
)
:hover
dt
{
animation-name
:
changeOne
;
animation-duration
:
0.5s
;
animation-fill-mode
:
forwards
;
}
@-webkit-keyframes
changeTwo
{
0
%
{
opacity
:
1
;
background
:
url("https://res.fudou6.com/c/4/20160801/dgndGFiczA0X2I=_115x115.png")
no-repeat
;
}
50
%
{
.hot-project-tabs
ul
li
:hover
>
div
:before
{
opacity
:
0
;
}
100
%
{
background
:
url("https://res.fudou6.com/c/4/20160801/n3ndGFiczA0X2E=_115x115.png")
no-repeat
;
opacity
:
1
;
}
}
.hot-project-tabs
ul
li
:nth-child
(
2
)
:hover
dt
{
animation-name
:
changeTwo
;
animation-duration
:
0.5s
;
animation-fill-mode
:
forwards
;
transform
:
scale
(
0
);
}
@-webkit-keyframes
changeThree
{
0
%
{
.hot-project-tabs
ul
li
:hover
>
div
:after
{
opacity
:
1
;
background
:
url("https://res.fudou6.com/c/4/20160801/p8edGFiczAzX2I=_115x115.png")
no-repeat
;
}
50
%
{
opacity
:
0
;
}
100
%
{
opacity
:
1
;
background
:
url("https://res.fudou6.com/c/4/20160801/za5dGFiczAzX2E=_115x115.png")
no-repeat
;
}
}
.hot-project-tabs
ul
li
:nth-child
(
3
)
:hover
dt
{
animation-name
:
changeThree
;
animation-duration
:
0.5s
;
animation-fill-mode
:
forwards
;
}
@-webkit-keyframes
changeFour
{
0
%
{
background
:
url("https://res.fudou6.com/c/4/20160801/6jpdGFiczAyX2I=_115x115.png")
no-repeat
;
}
50
%
{
opacity
:
0
;
}
100
%
{
opacity
:
1
;
background
:
url("https://res.fudou6.com/c/4/20160801/zsedGFiczAyX2E=_115x115.png")
no-repeat
;
}
}
.hot-project-tabs
ul
li
:nth-child
(
4
)
:hover
dt
{
animation-name
:
changeFour
;
animation-duration
:
0.5s
;
animation-fill-mode
:
forwards
;
transform
:
scale
(
1
);
}
/* .hot-project-tabs end */
/* .modal-box start */
...
...
@@ -479,17 +437,20 @@
}
/* .modal-box-success end */
@media
screen
and
(
min-width
:
769px
)
{
body
.hot-project-introducer
{
body
.hot-project-introducer
,
body
.hot-project-tabs
ul
{
width
:
990px
;
}
}
@media
screen
and
(
min-width
:
1281px
)
{
body
.hot-project-introducer
{
body
.hot-project-introducer
,
body
.hot-project-tabs
ul
{
width
:
1150px
;
}
}
@media
screen
and
(
min-width
:
1441px
)
{
body
.hot-project-introducer
{
body
.hot-project-introducer
,
body
.hot-project-tabs
ul
{
width
:
1360px
;
}
}
public/stylesheets/project.less
View file @
c5da3fc9
...
...
@@ -192,7 +192,7 @@
border: none;
font-size: 24px;
color: #fff;
background: #
868686
;
background: #
ff4a4b
;
border-radius: 10px;
text-align: center;
}
...
...
@@ -297,147 +297,109 @@
/* .hot-project-tabs start */
.hot-project-tabs {
width: 100%;
height: 690px;
background: #f6f6f6;
padding: 180px 0 160px 0;
ul {
width: 1203px;
height: 350px;
margin: 180px auto 160px;
width: @container-width;
margin: 0 auto;
border: 1px solid #43abb6;
li {
width: 300px;
height: 100%;
width: 25%;
float: left;
font-size: 16px;
color: #000;
text-align: center;
dl {
width: 100%;
dt {
width: 115px;
background: #f6f6f6;
transition-delay: .1s;
transition: background .5s, color .5s;
& > div {
border-right: 1px solid #43abb6;
height: 200px;
padding-top: 160px;
position: relative;
&:before,
&:after {
content: '';
position: absolute;
top: 44px;
left: 50%;
margin-left: -58px;
height: 115px;
margin: 44px auto 0;
width: 115px;
background: url(https://res.fudou6.com/c/4/20160801/by15pyq5qCH6aKYLTFfMDE=_480x240.png) 0 0 no-repeat;
opacity: 0;
transform: scale(0);
transition-delay: .1s;
transition: .5s;
}
dd {
line-height: 28px;
&:before {
transform: scale(1);
opacity: 1;
}
}
&:last-child > div {
border-right: 0;
}
h4 {
font-size: 28px;
color: #43abb6;
margin: 14px 0 24px;
margin: 10px 0 20px;
}
&:nth-child(1) > div {
&:before {
background-position: -360px -120px;
}
&:after {
background-position: -360px 0px;
}
}
&:nth-child(2) > div {
&:before {
background-position: -240px -120px;
}
li:nth-child(1) {
border-right: 1px solid #43abb6;
dt {
background: url("https://res.fudou6.com/c/4/20160801/nbrdGFiczA1X2I=_115x115.png") no-repeat;
&:after {
background-position: -240px 0px;
}
}
li:nth-child(2) {
border-right: 1px solid #43abb6;
dt {
background: url("https://res.fudou6.com/c/4/20160801/dgndGFiczA0X2I=_115x115.png") no-repeat;
&:nth-child(3) > div {
&:before {
background-position: -120px -120px;
}
&:after {
background-position: -120px 0px;
}
li:nth-child(3) {
border-right: 1px solid #43abb6;
dt {
background: url("https://res.fudou6.com/c/4/20160801/p8edGFiczAzX2I=_115x115.png") no-repeat;
}
&:nth-child(4) > div {
&:before {
background-position: 0px -120px;
}
li:nth-child(4) {
dt {
background: url("https://res.fudou6.com/c/4/20160801/6jpdGFiczAyX2I=_115x115.png") no-repeat;
&:after {
background-position: 0px 0px;
}
}
li:hover {
&:hover {
transition-delay: 0s;
color: #fff;
background: #43abb6;
h4 {
color: #fff;
}
}
li:nth-child(1):hover {
@-webkit-keyframes changeOne {
0% {
opacity: 1;
background: url("https://res.fudou6.com/c/4/20160801/nbrdGFiczA1X2I=_115x115.png") no-repeat;
}
50% {
opacity: 0;
}
100% {
background: url("https://res.fudou6.com/c/4/20160801/u42dGFiczA1X2E=_115x115.png") no-repeat;
opacity: 1;
}
}
dt {
animation-name: changeOne;
animation-duration: 0.5s;
animation-fill-mode: forwards;
}
}
li:nth-child(2):hover {
@-webkit-keyframes changeTwo {
0% {
opacity: 1;
background: url("https://res.fudou6.com/c/4/20160801/dgndGFiczA0X2I=_115x115.png") no-repeat;
}
50% {
opacity: 0;
}
100% {
background: url("https://res.fudou6.com/c/4/20160801/n3ndGFiczA0X2E=_115x115.png") no-repeat;
opacity: 1;
}
}
dt {
animation-name: changeTwo;
animation-duration: 0.5s;
animation-fill-mode: forwards;
}
}
li:nth-child(3):hover {
@-webkit-keyframes changeThree {
0% {
opacity: 1;
background: url("https://res.fudou6.com/c/4/20160801/p8edGFiczAzX2I=_115x115.png") no-repeat;
}
50% {
opacity: 0;
}
100% {
opacity: 1;
background: url("https://res.fudou6.com/c/4/20160801/za5dGFiczAzX2E=_115x115.png") no-repeat;
}
}
dt {
animation-name: changeThree;
animation-duration: 0.5s;
animation-fill-mode: forwards;
}
}
li:nth-child(4):hover {
@-webkit-keyframes changeFour {
0% {
background: url("https://res.fudou6.com/c/4/20160801/6jpdGFiczAyX2I=_115x115.png") no-repeat;
}
50% {
& > div {
&:before {
opacity: 0;
transform: scale(0);
}
100%
{
&:after
{
opacity: 1;
background: url("https://res.fudou6.com/c/4/20160801/zsedGFiczAyX2E=_115x115.png") no-repeat
;
transform: scale(1)
;
}
}
dt {
animation-name: changeFour;
animation-duration: 0.5s;
animation-fill-mode: forwards;
}
}
}
}
...
...
@@ -600,7 +562,8 @@
}
.rules(@cw) {
.hot-project-introducer {
.hot-project-introducer,
.hot-project-tabs ul {
width: @cw;
}
}
...
...
public/stylesheets/style.css
View file @
c5da3fc9
...
...
@@ -436,6 +436,16 @@ a {
content
:
''
;
display
:
table
;
}
input
:active
,
textarea
:active
,
select
:active
,
a
:active
,
input
:focus
,
textarea
:focus
,
select
:focus
,
a
:focus
{
outline
:
none
;
}
hr
.line-separate
{
position
:
relative
;
width
:
80%
;
...
...
@@ -507,7 +517,6 @@ hr.line-separate:after {
margin
:
50px
auto
30px
;
}
#footer
address
{
margin-top
:
60px
;
font-style
:
normal
;
}
#footer
address
,
...
...
@@ -515,6 +524,7 @@ hr.line-separate:after {
color
:
#00a4d8
;
}
#footer
.copyright
{
margin-top
:
80px
;
color
:
#aeaeae
;
}
#footer
.copyright
span
{
...
...
public/stylesheets/style.less
View file @
c5da3fc9
...
...
@@ -35,6 +35,13 @@ a {
}
}
input, textarea, select, a {
&:active,
&:focus {
outline: none;
}
}
hr.line-separate {
position: relative;
width: 80%;
...
...
@@ -67,7 +74,7 @@ hr.line-separate {
z-index: 999;
}
nav {
padding-left:@container-width / 4;
padding-left:
@container-width / 4;
font-size: 16px;
span {
float: left;
...
...
@@ -110,13 +117,13 @@ hr.line-separate {
margin: 50px auto 30px;
}
address {
margin-top: 60px;
font-style: normal;
&, a {
color: #00a4d8;
}
}
.copyright {
margin-top: 80px;
color: #aeaeae;
span {
color: #fff;
...
...
@@ -149,7 +156,6 @@ hr.line-separate {
}
}
/*.banner end*/
.screen() {
...
...
@@ -180,6 +186,6 @@ hr.line-separate {
}
}
body{
body
{
.screen();
}
\ No newline at end of file
routes/index.js
View file @
c5da3fc9
...
...
@@ -6,6 +6,7 @@ var product = require('./product');
/* GET home page. */
router
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
render
(
'index'
,
{
navIndex
:
'active'
,
styles
:
[
'index'
],
scripts
:[],
character
:
[
...
...
@@ -45,14 +46,14 @@ router.get('/', function (req, res) {
raiseTime
:
'28'
,
raiseFunds
:
'4'
,
maxProfits
:
'8.5%'
,
link
:
''
link
:
'
/products/20010
'
},
{
title
:
'中电投先融-天津市级政信'
,
img
:
'http://res.fudou6.com/c/4/20160730/m3gMDQxYzBjYw==_1000x600.jpg'
,
raiseTime
:
'28'
,
raiseFunds
:
'5'
,
maxProfits
:
'8.3%'
,
link
:
''
link
:
'
/products/20012
'
},
{
title
:
'中电投先融-锐金1-2号'
,
img
:
'http://res.fudou6.com/c/4/20160730/eedZmNmYmIwOA==_600x375.jpg'
,
...
...
@@ -66,14 +67,14 @@ router.get('/', function (req, res) {
raiseTime
:
'20'
,
raiseFunds
:
'2'
,
maxProfits
:
'8.5%'
,
link
:
''
link
:
'
/products/20008
'
},
{
title
:
'国信证券<br/>巴中市高明新区壁州大道'
,
img
:
'http://res.fudou6.com/c/4/20160730/pdeMzhiZTc4ZA==_1000x600.jpg'
,
raiseTime
:
'52'
,
raiseFunds
:
'1'
,
maxProfits
:
'10.6%'
,
link
:
''
link
:
'
/products/20013
'
},
]
});
...
...
@@ -81,12 +82,14 @@ router.get('/', function (req, res) {
router
.
get
(
'/about'
,
function
(
req
,
res
)
{
res
.
render
(
'about'
,
{
navAbout
:
'active'
,
styles
:
[
'about'
],
});
});
router
.
get
(
'/project'
,
function
(
req
,
res
)
{
res
.
render
(
'project'
,
{
navProject
:
'active'
,
styles
:
[
'project'
],
scripts
:[
'utils'
,
'project'
],
});
...
...
@@ -98,6 +101,7 @@ router.get('/project', function (req, res) {
router
.
get
(
'/products'
,
function
(
req
,
res
)
{
res
.
render
(
'products'
,
{
navProducts
:
'active'
,
styles
:
[
'products'
],
scripts
:[
'utils'
,
'products'
],
});
...
...
routes/product.js
View file @
c5da3fc9
(
function
(
global
,
factory
)
{
if
(
typeof
define
===
"function"
&&
define
.
amd
)
{
define
([
'module'
,
'exports'
,
'../utils/xFetch'
,
'express'
],
factory
);
}
else
if
(
typeof
exports
!==
"undefined"
)
{
factory
(
module
,
exports
,
require
(
'../utils/xFetch'
),
require
(
'express'
));
}
else
{
var
mod
=
{
exports
:
{}
};
factory
(
mod
,
mod
.
exports
,
global
.
xFetch
,
global
.
express
);
global
.
product
=
mod
.
exports
;
}
})(
this
,
function
(
module
,
exports
,
_xFetch
,
express
)
{
'use strict'
;
'use strict'
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
formatDateTime
=
exports
.
leftPad
=
exports
.
productStatusToString
=
exports
.
PRODUCT_STATUS
=
undefined
;
exports
.
formatMoney
=
formatMoney
;
});
exports
.
formatDateTime
=
exports
.
leftPad
=
exports
.
productStatusToString
=
exports
.
PRODUCT_STATUS
=
undefined
;
var
_xFetch2
=
_interopRequireDefault
(
_xFetch
)
;
var
_extends
=
Object
.
assign
||
function
(
target
)
{
for
(
var
i
=
1
;
i
<
arguments
.
length
;
i
++
)
{
var
source
=
arguments
[
i
];
for
(
var
key
in
source
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
source
,
key
))
{
target
[
key
]
=
source
[
key
];
}
}
}
return
target
;
}
;
function
_interopRequireDefault
(
obj
)
{
return
obj
&&
obj
.
__esModule
?
obj
:
{
default
:
obj
};
}
exports
.
formatMoney
=
formatMoney
;
var
_extends
=
Object
.
assign
||
function
(
target
)
{
for
(
var
i
=
1
;
i
<
arguments
.
length
;
i
++
)
{
var
source
=
arguments
[
i
];
var
_xFetch
=
require
(
'../utils/xFetch'
);
for
(
var
key
in
source
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
source
,
key
))
{
target
[
key
]
=
source
[
key
];
}
}
}
var
_xFetch2
=
_interopRequireDefault
(
_xFetch
);
return
target
;
};
function
_interopRequireDefault
(
obj
)
{
return
obj
&&
obj
.
__esModule
?
obj
:
{
default
:
obj
};
}
var
express
=
require
(
'express'
);
var
PRODUCT_STATUS
=
exports
.
PRODUCT_STATUS
=
{
var
PRODUCT_STATUS
=
exports
.
PRODUCT_STATUS
=
{
'-9'
:
'草稿'
,
0
:
'已删除'
,
1
:
'未发布'
,
...
...
@@ -50,13 +26,13 @@
17
:
'已暂停'
,
21
:
'已封账'
,
31
:
'已成立'
};
};
var
productStatusToString
=
exports
.
productStatusToString
=
function
productStatusToString
(
status
)
{
var
productStatusToString
=
exports
.
productStatusToString
=
function
productStatusToString
(
status
)
{
return
PRODUCT_STATUS
[
status
]
||
'未定义'
;
};
};
function
formatMoney
()
{
function
formatMoney
()
{
var
money
=
arguments
.
length
<=
0
||
arguments
[
0
]
===
undefined
?
0
:
arguments
[
0
];
var
ret
=
void
0
;
...
...
@@ -70,13 +46,13 @@
ret
=
money
/
1
E2
;
}
return
ret
;
}
}
var
leftPad
=
exports
.
leftPad
=
function
leftPad
(
num
)
{
var
leftPad
=
exports
.
leftPad
=
function
leftPad
(
num
)
{
return
num
>=
10
?
num
:
'0'
+
num
;
};
};
var
formatDateTime
=
exports
.
formatDateTime
=
function
formatDateTime
()
{
var
formatDateTime
=
exports
.
formatDateTime
=
function
formatDateTime
()
{
var
time
=
arguments
.
length
<=
0
||
arguments
[
0
]
===
undefined
?
0
:
arguments
[
0
];
var
format
=
arguments
.
length
<=
1
||
arguments
[
1
]
===
undefined
?
'YYYY-MM-DD hh:mm:ss'
:
arguments
[
1
];
...
...
@@ -92,9 +68,9 @@
return
format
.
replace
(
/
[
A-Za-z
]
+/g
,
function
(
metch
)
{
return
data
[
metch
];
});
};
};
module
.
exports
=
function
(
req
,
res
,
next
)
{
module
.
exports
=
function
(
req
,
res
,
next
)
{
Promise
.
all
([(
0
,
_xFetch2
.
default
)(
'https://m.fudou6.com/api/1.0/cate/cates.json'
),
(
0
,
_xFetch2
.
default
)(
'https://m.fudou6.com/api/1.0/prod/detail.json?itemId='
+
req
.
params
.
id
)]).
then
(
function
(
arr
)
{
var
pCates
=
arr
[
0
].
pCates
;
var
item
=
arr
[
1
].
item
;
...
...
@@ -119,7 +95,7 @@
item
.
elements
=
JSON
.
parse
(
item
.
elements
);
Object
.
keys
(
item
.
elements
).
forEach
(
function
(
key
)
{
console
.
log
(
'%s
\
t%s
\
t%s'
,
key
,
item
.
elements
[
key
][
0
],
item
.
elements
[
key
][
1
]);
//
console.log('%s\t%s\t%s', key, item.elements[key][0], item.elements[key][1]);
item
.
elements
[
key
]
=
item
.
elements
[
key
][
1
];
});
...
...
@@ -160,6 +136,7 @@
//console.log(item);
res
.
render
(
'product'
,
_extends
({
navProducts
:
'active'
,
styles
:
[
'product'
],
scripts
:
[
'utils'
,
'product'
]
},
item
));
...
...
@@ -167,7 +144,6 @@
console
.
log
(
err
);
next
(
err
);
});
};
});
};
//# sourceMappingURL=product.js.map
\ No newline at end of file
routes/product.js.map
View file @
c5da3fc9
{"version":3,"sources":["product.jsx"],"names":[],"mappings":";;wDAEsB,S;;qEAAA,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KAAK,aAAjB,CAA3B;;AAEA;;AAEA,gBAAI,MAAJ,CAAW,SAAX;AACI,wBAAO,CAAC,SAAD,CADX;AAEI,yBAAQ,CAAC,OAAD,EAAS,SAAT;AAFZ,eAGO,IAHP;AAMH,SAzED,EAyEG,KAzEH,CAyES,eAAM;AACX,oBAAQ,GAAR,CAAY,GAAZ;AACA,iBAAK,GAAL;AACH,SA5ED;AA8EH,KA/ED","file":"product.js","sourcesContent":["import xFetch from '../utils/xFetch';\n\nvar express = require('express');\n\nexport const PRODUCT_STATUS = {\n '-9': '草稿',\n 0: '已删除',\n 1: '未发布',\n 5: '预热中',\n 11: '募集中',\n 17: '已暂停',\n 21: '已封账',\n 31: '已成立',\n}\n\nexport const productStatusToString = status => {\n return PRODUCT_STATUS[status] || '未定义';\n};\n\nexport function formatMoney(money = 0) {\n let ret;\n if (isNaN(money)) {\n ret = '0';\n } else if (money >= 1E10) {\n ret = (money / 1E10) + '亿';\n } else if (money >= 1E6) {\n ret = (money / 1E6) + '万';\n } else {\n ret = (money / 1E2);\n }\n return ret;\n}\n\n\nexport const leftPad = num => {\n return num >= 10 ? num : ('0' + num);\n};\n\nexport const formatDateTime = (time = 0, format = 'YYYY-MM-DD hh:mm:ss') => {\n const date = new Date(time);\n const data = {\n YYYY: date.getFullYear(),\n MM: leftPad(date.getMonth() + 1),\n DD: leftPad(date.getDate()),\n hh: leftPad(date.getHours()),\n mm: leftPad(date.getMinutes()),\n ss: leftPad(date.getSeconds())\n };\n return format.replace(/[A-Za-z]+/g, metch => {\n return data[metch];\n });\n};\n\n\nmodule.exports = function (req, res, next) {\n Promise.all([\n xFetch('https://m.fudou6.com/api/1.0/cate/cates.json'),\n xFetch('https://m.fudou6.com/api/1.0/prod/detail.json?itemId=' + req.params.id)\n ]).then((arr)=> {\n const {pCates} = arr[0];\n const {item} = arr[1];\n\n\n\n if (!item || !pCates) {\n var err = new Error('Not Found');\n err.status = 404;\n next(err);\n }\n\n\n pCates.forEach(cate=> {\n cate.subCates.forEach(scate=> {\n if (scate.id == item.categoryId) {\n item.categoryName = scate.name;\n item.categoryParentId = cate.id;\n item.categroyParentName = cate.name;\n }\n });\n });\n\n item.elements = JSON.parse(item.elements);\n\n Object.keys(item.elements).forEach(key=>{\n console.log('%s\\t%s\\t%s', key, item.elements[key][0], item.elements[key][1]);\n item.elements[key] = item.elements[key][1];\n });\n\n item.commissionAlg = JSON.parse(item.commissionAlg);\n\n item.commissionAlg = item.commissionAlg.map(it=> {\n const {sy, yj} = (it.result || {});\n return {\n rowspan:item.commissionAlg.length,\n range: (it.min ? formatMoney(it.min)+' ≤ ':'') + ' x ' + (it.max ? ' < '+formatMoney(it.max) : ''),\n min: it.min,\n max: it.max,\n sy, yj\n };\n });\n\n item.fundRaisedStartTimeString = item.fundRaisedStartTime && formatDateTime(item.fundRaisedStartTime);\n item.fundRaisedEndTimeString = item.fundRaisedEndTime && formatDateTime(item.fundRaisedEndTime);\n\n\n\n item.statusString = productStatusToString(item.status);\n\n //募集目标\n item.fundRaisedTargetString = formatMoney(item.fundRaisedTarget);\n //已募集\n item.fundRaisedOverString = formatMoney(item.fundRaisedOver);\n item.fundRaisedPercentage = item.fundRaisedOver / item.fundRaisedTarget * 100;\n //募集剩余\n item.fundRaisedSurplus = Math.max(item.fundRaisedTarget - item.fundRaisedOver, 0);\n\n item.fundRaisedSurplusString = formatMoney(item.fundRaisedSurplus);\n //最小投资\n item.minimumAmountString = formatMoney(item.minimumAmount);\n\n //console.log(item);\n\n res.render('product', {\n styles:['product'],\n scripts:['utils','product'],\n ...item\n });\n\n }).catch(err=> {\n console.log(err);\n next(err);\n });\n\n};\n"]}
\ No newline at end of file
{"version":3,"sources":["product.jsx"],"names":[],"mappings":";;;;;;;;;QAmBgB,W,GAAA,W;;AAnBhB;;;;;;AAEA,IAAI,UAAU,QAAQ,SAAR,CAAd;;AAEO,IAAM,0CAAiB;AAC1B,UAAM,IADoB;AAE1B,OAAG,KAFuB;AAG1B,OAAG,KAHuB;AAI1B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ODUCT_STATUS = {\n '-9': '草稿',\n 0: '已删除',\n 1: '未发布',\n 5: '预热中',\n 11: '募集中',\n 17: '已暂停',\n 21: '已封账',\n 31: '已成立',\n}\n\nexport const productStatusToString = status => {\n return PRODUCT_STATUS[status] || '未定义';\n};\n\nexport function formatMoney(money = 0) {\n let ret;\n if (isNaN(money)) {\n ret = '0';\n } else if (money >= 1E10) {\n ret = (money / 1E10) + '亿';\n } else if (money >= 1E6) {\n ret = (money / 1E6) + '万';\n } else {\n ret = (money / 1E2);\n }\n return ret;\n}\n\n\nexport const leftPad = num => {\n return num >= 10 ? num : ('0' + num);\n};\n\nexport const formatDateTime = (time = 0, format = 'YYYY-MM-DD hh:mm:ss') => {\n const date = new Date(time);\n const data = {\n YYYY: date.getFullYear(),\n MM: leftPad(date.getMonth() + 1),\n DD: leftPad(date.getDate()),\n hh: leftPad(date.getHours()),\n mm: leftPad(date.getMinutes()),\n ss: leftPad(date.getSeconds())\n };\n return format.replace(/[A-Za-z]+/g, metch => {\n return data[metch];\n });\n};\n\n\nmodule.exports = function (req, res, next) {\n Promise.all([\n xFetch('https://m.fudou6.com/api/1.0/cate/cates.json'),\n xFetch('https://m.fudou6.com/api/1.0/prod/detail.json?itemId=' + req.params.id)\n ]).then((arr)=> {\n const {pCates} = arr[0];\n const {item} = arr[1];\n\n\n\n if (!item || !pCates) {\n var err = new Error('Not Found');\n err.status = 404;\n next(err);\n }\n\n\n pCates.forEach(cate=> {\n cate.subCates.forEach(scate=> {\n if (scate.id == item.categoryId) {\n item.categoryName = scate.name;\n item.categoryParentId = cate.id;\n item.categroyParentName = cate.name;\n }\n });\n });\n\n item.elements = JSON.parse(item.elements);\n\n Object.keys(item.elements).forEach(key=>{\n //console.log('%s\\t%s\\t%s', key, item.elements[key][0], item.elements[key][1]);\n item.elements[key] = item.elements[key][1];\n });\n\n item.commissionAlg = JSON.parse(item.commissionAlg);\n\n item.commissionAlg = item.commissionAlg.map(it=> {\n const {sy, yj} = (it.result || {});\n return {\n rowspan:item.commissionAlg.length,\n range: (it.min ? formatMoney(it.min)+' ≤ ':'') + ' x ' + (it.max ? ' < '+formatMoney(it.max) : ''),\n min: it.min,\n max: it.max,\n sy, yj\n };\n });\n\n item.fundRaisedStartTimeString = item.fundRaisedStartTime && formatDateTime(item.fundRaisedStartTime);\n item.fundRaisedEndTimeString = item.fundRaisedEndTime && formatDateTime(item.fundRaisedEndTime);\n\n\n\n item.statusString = productStatusToString(item.status);\n\n //募集目标\n item.fundRaisedTargetString = formatMoney(item.fundRaisedTarget);\n //已募集\n item.fundRaisedOverString = formatMoney(item.fundRaisedOver);\n item.fundRaisedPercentage = item.fundRaisedOver / item.fundRaisedTarget * 100;\n //募集剩余\n item.fundRaisedSurplus = Math.max(item.fundRaisedTarget - item.fundRaisedOver, 0);\n\n item.fundRaisedSurplusString = formatMoney(item.fundRaisedSurplus);\n //最小投资\n item.minimumAmountString = formatMoney(item.minimumAmount);\n\n //console.log(item);\n\n res.render('product', {\n navProducts:'active',\n styles:['product'],\n scripts:['utils','product'],\n ...item\n });\n\n }).catch(err=> {\n console.log(err);\n next(err);\n });\n\n};\n"]}
\ No newline at end of file
routes/product.jsx
View file @
c5da3fc9
...
...
@@ -82,7 +82,7 @@ module.exports = function (req, res, next) {
item
.
elements
=
JSON
.
parse
(
item
.
elements
);
Object
.
keys
(
item
.
elements
).
forEach
(
key
=>
{
console
.
log
(
'%s
\
t%s
\
t%s'
,
key
,
item
.
elements
[
key
][
0
],
item
.
elements
[
key
][
1
]);
//
console.log('%s\t%s\t%s', key, item.elements[key][0], item.elements[key][1]);
item
.
elements
[
key
]
=
item
.
elements
[
key
][
1
];
});
...
...
@@ -121,6 +121,7 @@ module.exports = function (req, res, next) {
//console.log(item);
res
.
render
(
'product'
,
{
navProducts
:
'active'
,
styles
:[
'product'
],
scripts
:[
'utils'
,
'product'
],
...
item
...
...
views/about.hbs
View file @
c5da3fc9
<div
class=
"about-us-banner clear"
>
<div
class=
"banner-box"
>
<h4>
海量资源 轻松抢单
</h4>
<p>
以科技为手段,面向财富管理行业从业人员的运营服务提供商。匹配用户风险偏好与投资品,利用互联网大数据,对用户行为、市场、产品等进行详细的分析,系统为客户推荐多元化的投资组合,避免客户与理财顾问之间可能的利益冲突,减少用户的投资理财成本支出,使投资人获得更多的收益。
</p>
<p>
以科技为手段,面向财富管理行业从业人员的运营服务提供商。匹配用户风险偏好与投资品,利用互联网大数据,对用户行为、市场、产品等进行详细的分析,系统为客户推荐多元化的投资组合,避免客户与理财顾问之间可能的利益冲突,减少用户的投资理财成本支出,使投资人获得更多的收益。
</p>
</div>
</div>
<div
class=
"about-us-banner-bottom clear"
>
<h4>
企业愿景
</h4>
<hr/>
<p>
通过自有的风控部门,严格审核项目背景,设计产品结构,同时搭建涵盖APP、微信、网站等多端口的互联网平台,通过科技金融与移动互联网技术,将信息流、业务流整合,让理财师轻松获取需要的优质金融产品,真正为客户提供资产配置服务。
</p>
<p>
通过自有的风控部门,严格审核项目背景,设计产品结构,同时搭建涵盖APP、微信、网站等多端口的互联网平台,通过科技金融与移动互联网技术,将信息流、业务流整合,让理财师轻松获取需要的优质金融产品,真正为客户提供资产配置服务。
</p>
</div>
<div
class=
"company-introduction clear"
>
<h2><b></b>
股东背景
</h2>
<ul
class=
"clear"
>
<li
class=
"fl"
>
<h4>
林俊贤
</h4>
<h6>
金融理财师
</h6>
<p>
MBA,上海财经大学工商管理硕士学位。曾任联合证券有限公司自营业务投资经理,东新国际投资管理有限公司股票基金经理。拥有15年证券从业经历。通过他的积极管理,东新公司在过去4年较为恶劣的市场环境中,仍然获得了及其良好的全球投资表现。
</p>
<div>
<h2>
股东背景
</h2>
<ul
class=
"gudong-list clear"
>
<li>
<div>
<h4>
深圳枢纽项目及销售团队
</h4>
<!--<h6>金融理财师</h6>-->
<p>
20人渠道销售团队,富有丰富的销售与市场管理经验,2012年销售信托5亿,
2013年40亿,2014年100亿。一年30个地方政府融资项目。
</p>
</div>
</li>
<li
class=
"fl"
>
<h4>
林俊贤
</h4>
<h6>
金融理财师
</h6>
<p>
MBA,上海财经大学工商管理硕士学位。曾任联合证券有限公司自营业务投资经理,东新国际投资管理有限公司股票基金经理。拥有15年证券从业经历。通过他的积极管理,东新公司在过去4年较为恶劣的市场环境中,仍然获得了及其良好的全球投资表现。
</p>
<li>
<div>
<h4>
券商及银行系投研团队
</h4>
<!--<h6>金融理财师</h6>-->
<p>
浙银俊诚:浙银资本的团队 资本市场权益类业务规模最大的团队之一。
<br/>
浙江礼翰:多个环保类并购项目,15年资管规模20亿。
</p>
</div>
</li>
<li
class=
"fl"
>
<h4>
林俊贤
</h4>
<h6>
金融理财师
</h6>
<p>
MBA,上海财经大学工商管理硕士学位。曾任联合证券有限公司自营业务投资经理,东新国际投资管理有限公司股票基金经理。拥有15年证券从业经历。通过他的积极管理,东新公司在过去4年较为恶劣的市场环境中,仍然获得了及其良好的全球投资表现。
</p>
<li>
<div>
<h4>
互联网团队
</h4>
<!--<h6>金融理财师</h6>-->
<p>
互联网团队由中供的铁军,淘宝,支付宝交易平台的技术核心开发人员,阿里妈妈广告平台的资源运营专家。
</p>
</div>
</li>
</ul>
<h2><b></b>
合作伙伴
</h2>
<div>
<a
href=
"javascrpt:;"
></a>
<a
href=
"javascrpt:;"
></a>
<a
href=
"javascrpt:;"
></a>
<a
href=
"javascrpt:;"
></a>
<a
href=
"javascrpt:;"
></a>
<a
href=
"javascrpt:;"
></a>
<a
href=
"javascrpt:;"
></a>
<a
href=
"javascrpt:;"
></a>
<h2>
合作伙伴
</h2>
<div
class=
"friend-list clear"
>
<a
href=
"javascrpt:;"
style=
"background-image:url(/images/about_us/zhongjiang.jpg);"
></a>
<a
href=
"javascrpt:;"
style=
"background-image:url(/images/about_us/zhongrong.jpg);"
></a>
<a
href=
"javascrpt:;"
style=
"background-image:url(/images/about_us/guomin.jpg);"
></a>
<a
href=
"javascrpt:;"
style=
"background-image:url(/images/about_us/guangda.jpg);"
></a>
<a
href=
"javascrpt:;"
style=
"background-image:url(/images/about_us/zhongxing.jpg);"
></a>
<a
href=
"javascrpt:;"
style=
"background-image:url(/images/about_us/fangzheng.jpg);"
></a>
<a
href=
"javascrpt:;"
style=
"background-image:url(/images/about_us/huaxing.jpg);"
></a>
<a
href=
"javascrpt:;"
style=
"background-image:url(/images/about_us/zhongtai.jpg);"
></a>
</div>
</div>
</div>
<div
class=
"address-map"
>
...
...
views/layout.hbs
View file @
c5da3fc9
...
...
@@ -14,10 +14,10 @@
<div
class=
"container"
>
<a
class=
"logo"
href=
"/"
><img
src=
"/images/logo.png"
alt=
"logo"
></a>
<nav
class=
"clear"
>
<span><a
href=
"/"
>
首页 / HOME
</a></span>
<span><a
href=
"/project"
>
项目合作 / PROJECT
</a></span>
<span><a
href=
"/products"
>
最新产品 / PRODUCT
</a></span>
<span><a
href=
"/about"
>
关于我们 / ABOUT
</a></span>
<span><a
href=
"/"
class=
"
{{
navIndex
}}
"
>
首页 / HOME
</a></span>
<span><a
href=
"/project"
class=
"
{{
navProject
}}
"
>
项目合作 / PROJECT
</a></span>
<span><a
href=
"/products"
class=
"
{{
navProducts
}}
"
>
最新产品 / PRODUCT
</a></span>
<span><a
href=
"/about"
class=
"
{{
navAbout
}}
"
>
关于我们 / ABOUT
</a></span>
</nav>
</div>
</header>
...
...
@@ -27,9 +27,9 @@
<footer
id=
"footer"
>
<h3>
全国客服热线 9:30-18:30
</h3>
<h2>
400-879-9900
</h2>
<hr
class=
"line-separate"
/>
<address>
浙江省杭州市余杭区良睦路1299号互联网村5-305 E-mail:
<a
href=
"mailto:hr@shuniu.com"
>
hr@shuniu.com
</a></address>
<!--<hr class="line-separate"/>-->
<p
class=
"copyright"
>
Copyright2016
<span>
shuniu
</span>
All Right Reserved
©
2014-2015 杭州枢纽科技有限公司 版权所有
</p>
<address>
浙江省杭州市余杭区良睦路1299号互联网村5-305 E-mail:
<a
href=
"mailto:hr@shuniu.com"
>
hr@shuniu.com
</a></address>
</footer>
<script
src=
"/javascripts/jquery-1.8.3.min.js"
></script>
{{#
each
scripts
}}
...
...
views/product.hbs
View file @
c5da3fc9
...
...
@@ -46,23 +46,21 @@
<p>
{{
statusString
}}
</p>
</div>
</div>
<div
class=
"appointment"
>
<h2
class=
"info-title"
>
在线预约
</h2>
<p>
留下联系方式我们帮您第一时间抢占稀缺额度
</p>
<form
id=
"form"
>
<div>
<input
type=
"text"
name=
"userName"
placeholder=
"请填写您的姓名"
/>
<input
type=
"text"
name=
"userTel"
placeholder=
"请填写手机号"
maxlength=
"11"
/>
<input
type=
"submit"
value=
"提交"
/>
</div>
<div>
<span
class=
"errorName"
></span>
<span
class=
"errorTel"
></span>
</div>
</form>
</div>
<!--<div class="appointment">-->
<!--<h2 class="info-title">在线预约</h2>-->
<!--<p>留下联系方式我们帮您第一时间抢占稀缺额度</p>-->
<!--<form id="form">-->
<!--<div>-->
<!--<input type="text" name="userName" placeholder="请填写您的姓名" />-->
<!--<input type="text" name="userTel" placeholder="请填写手机号" maxlength="11"/>-->
<!--<input type="submit" value="提交"/>-->
<!--</div>-->
<!--<div>-->
<!--<span class="errorName"></span>-->
<!--<span class="errorTel" ></span>-->
<!--</div>-->
<!--</form>-->
<!--</div>-->
<div
class=
"detail"
>
<h2
class=
"info-title"
>
产品详情
</h2>
<table>
...
...
views/project.hbs
View file @
c5da3fc9
...
...
@@ -40,7 +40,7 @@
placeholder=
"详细写明您的项目需求 例如:项目时间、内容、合作意向。"
></textarea>
<p
class=
"error-description"
></p>
</div>
<div><input
type=
"submit"
value=
"立即提交"
disabled
id=
"submit"
/></div>
<div><input
type=
"submit"
value=
"立即提交"
/></div>
</form>
</div>
<div
class=
"hot-project-address"
>
...
...
@@ -64,40 +64,44 @@
</div>
<div
class=
"hot-project-tabs clear"
>
<ul
class=
"clear"
>
<li
class=
"fl"
>
<dl>
<dt></dt>
<dd><h4>
海量资金
</h4></dd>
<dd>
20多万资金方
</dd>
<dd>
3万亿资金,快速融资
</dd>
</dl>
<li>
<div>
<h4>
海量资金
</h4>
<p>
20多万资金方
<br/>
3万亿资金,快速融资
</p>
</div>
</li>
<li
class=
"fl"
>
<dl>
<dt></dt>
<dd><h4>
安全可靠
</h4></dd>
<dd>
以对项目质量的严格把控。
</dd>
<dd>
和清晰的流程设计
</dd>
<dd>
让合投更规范、高效
</dd>
</dl>
<li>
<div>
<h4>
安全可靠
</h4>
<p>
以对项目质量的严格把控
<br/>
和清晰的流程设计
<br/>
让合投更规范、高效
</p>
</div>
</li>
<li
class=
"fl"
>
<dl>
<dt></dt>
<dd><h4>
融资高效
</h4></dd>
<dd>
多个大型项目经验,
</dd>
<dd>
融资流程
</dd>
<dd>
简单\迅速\到账快捷
</dd>
</dl>
<li>
<div>
<h4>
融资高效
</h4>
<p>
多个大型项目经验
<br/>
融资流程
<br/>
简单\迅速\到账快捷
</p>
</div>
</li>
<li
class=
"fl"
>
<dl>
<dt></dt>
<dd><h4>
专业服务
</h4></dd>
<dd>
专业的投资团队,
</dd>
<dd>
全程免费的投融资指导,
</dd>
<dd>
精准的对接推荐
</dd>
</dl>
<li>
<div>
<h4>
专业服务
</h4>
<p>
专业的投资团队
<br/>
全程免费的投融资指导
<br/>
精准的对接推荐
</p>
</div>
</li>
</ul>
</div>
...
...
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