Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
9 years ago
Commit
bdc4633809375de6c3af4a4e420042d23ed31de2
1 parent
32502b45
增加function bind polyfill,修证部分css样式问题
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
7 deletions
doraemon/views/partial/nav-menu.hbs
public/js/common/bind-polyfill.js
public/js/me/order/countdown.js
public/js/me/order/edit-order.js
public/js/me/order/validation.js
public/scss/me/order/_detail.css
doraemon/views/partial/nav-menu.hbs
View file @
bdc4633
...
...
@@ -58,7 +58,8 @@
<div
class=
"search-input"
>
<form
id=
"search-form"
action=
"
{{
..
/
siteUrl
}}
/product/query"
>
<span
class=
"iconfont left"
>

</span>
<input
type=
"text"
name=
"query"
id=
"search-key"
class=
"search-key"
placeholder=
"search"
autocomplete=
"off"
>
<input
type=
"text"
name=
"query"
id=
"search-key"
class=
"search-key"
placeholder=
"search"
autocomplete=
"off"
>
<span
class=
"iconfont right clear-input"
>

</span>
</form>
</div>
...
...
public/js/common/bind-polyfill.js
0 → 100644
View file @
bdc4633
/**
* Created by TaoHuang on 2016/7/29.
*/
if
(
!
Function
.
prototype
.
bind
)
{
Function
.
prototype
.
bind
=
function
(
oThis
)
{
//eslint-disable-line
if
(
typeof
this
!==
'function'
)
{
// closest thing possible to the ECMAScript 5
// internal IsCallable function
throw
new
TypeError
(
'Function.prototype.bind - what is trying to be bound is not callable'
);
}
var
aArgs
=
Array
.
prototype
.
slice
.
call
(
arguments
,
1
),
fToBind
=
this
,
fNOP
=
function
()
{
},
fBound
=
function
()
{
return
fToBind
.
apply
(
this
instanceof
fNOP
?
this
:
oThis
,
aArgs
.
concat
(
Array
.
prototype
.
slice
.
call
(
arguments
)));
};
if
(
this
.
prototype
)
{
// Function.prototype doesn't have a prototype property
fNOP
.
prototype
=
this
.
prototype
;
}
fBound
.
prototype
=
new
fNOP
();
return
fBound
;
};
}
\ No newline at end of file
...
...
public/js/me/order/countdown.js
View file @
bdc4633
// 订单剩余时间显示及倒计时
require
(
'../../common/bind-polyfill'
);
module
.
exports
=
{
count
:
null
,
intervalTimer
:
null
,
...
...
public/js/me/order/edit-order.js
View file @
bdc4633
...
...
@@ -73,15 +73,14 @@ function validateData() {
var
k
=
getValidateKey
(
input
.
id
);
if
(
k
&&
validateMap
[
k
])
{
if
(
!
validate
.
do
(
validateMap
[
k
].
sl
,
validateMap
[
k
].
v
))
{
if
(
!
validate
.
do
2
(
validateMap
[
k
].
sl
,
validateMap
[
k
].
v
))
{
pass
=
false
;
}
}
});
// 检查选填项
if
(
$phone
.
val
().
length
>
0
&&
!
validate
.
do
(
validateMap
.
phone
.
sl
,
validateMap
.
phone
.
v
))
{
if
(
$phone
.
val
().
length
>
0
&&
!
validate
.
do2
(
validateMap
.
phone
.
sl
,
validateMap
.
phone
.
v
))
{
pass
=
false
;
}
...
...
@@ -200,7 +199,7 @@ function showDiaglog(tpl, onEdit) {
var
v
=
validateMap
[
getValidateKey
(
$this
.
get
(
0
).
id
)];
if
(
$this
.
val
().
length
>
0
)
{
validate
.
do
(
v
.
sl
,
v
.
v
);
validate
.
do
2
(
v
.
sl
,
v
.
v
);
}
});
}
...
...
public/js/me/order/validation.js
View file @
bdc4633
...
...
@@ -93,7 +93,7 @@ function validateAddr(val, conditions) {
}
module
.
exports
=
{
do
:
validate
,
do
2
:
validate
,
addr
:
validateAddr
};
...
...
public/scss/me/order/_detail.css
View file @
bdc4633
...
...
@@ -303,7 +303,7 @@
}
.column
{
display
:
inline-block
;
float
:
left
;
text-align
:
left
!important
;
.text
{
...
...
Please
register
or
login
to post a comment