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
xuqi
9 years ago
Commit
8b0c9ec8944b093ab2ee7c5d7abb22e512184b13
1 parent
44823044
new address block
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
4 deletions
apps/shopping/views/action/order.hbs
public/font/iconfont.eot
public/font/iconfont.svg
public/font/iconfont.ttf
public/font/iconfont.woff
public/js/shopping/order/address.js
public/scss/shopping/_order.css
apps/shopping/views/action/order.hbs
View file @
8b0c9ec
...
...
@@ -230,6 +230,12 @@
<span class="address-chosed iconfont"></span>
</li>
\{{/each}}
\{{#if hasNew}}
<li class="new-address-block">
<span class="iconfont"></span>
增加收货地址
</li>
\{{
/
if
}}
</script>
<script
id=
"invoice-dialog-tpl"
type=
"text/html"
>
...
...
public/font/iconfont.eot
View file @
8b0c9ec
No preview for this file type
public/font/iconfont.svg
View file @
8b0c9ec
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg
xmlns=
"http://www.w3.org/2000/svg"
>
<metadata>
Created by FontForge 20120731 at
Sat Jul 16 14:46:14
2016
Created by FontForge 20120731 at
Tue Jul 19 15:52:03
2016
By admin
</metadata>
<defs>
...
...
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Sat Jul 16 14:46:14 2016
bbox=
"0 -224 1303 896.303"
underline-thickness=
"50"
underline-position=
"-100"
unicode-range=
"U+0078-E64
4
"
unicode-range=
"U+0078-E64
5
"
/>
<missing-glyph
horiz-adv-x=
"374"
d=
"M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z"
/>
...
...
@@ -237,5 +237,7 @@ q30 30 30 73q0 42 -30 72t-72 30t-72 -30t-30 -72h-103q0 84 60 144t145 60t145 -60t
d=
"M707
803q-57
0
-108.5
-27.5t-87.5
-75.5q-36
48
-87.5
75.5t-108.5
27.5q-105
0
-179
-81t-74
-196q0
-42
13
-84t25.5
-64t34.5
-57q27
-42
72
-92.5t86
-89.5t88
-79.5t66
-55.5t32
-25q14
-11
32
-11t32
11q13
9
32
24.5t66
56t88
79.5t86
89.5t72
92.5
q22
35
34.5
57t25.5
64t13
84q0
115
-74
196t-179
81zM841
356q-26
-40
-70
-89t-84.5
-87t-86.5
-77t-62.5
-52.5t-26.5
-21.5q-10
8
-26.5
21t-62.5
52.5t-86
77.5t-84.5
87t-70.5
89q-20
32
-31.5
53t-21.5
53t-10
64q0
89
57.5
152t139.5
63q59
0
107.5
-35t71.5
-93v1
q4
-14
17
-14t17
14q23
57
71.5
92t107.5
35q82
0
139.5
-63t57.5
-152q0
-46
-16
-83.5t-47
-86.5z"
/>
<glyph
glyph-name=
"uniE645"
unicode=
""
d=
"M933 411h-394v394q0 11 -8 19t-19 8t-19 -8t-8 -19v-394h-394q-11 0 -19 -8t-8 -19t8 -19t19 -8h394v-394q0 -11 8 -19t19 -8t19 8t8 19v394h394q11 0 19 8t8 19t-8 19t-19 8z"
/>
</font>
</defs></svg>
...
...
public/font/iconfont.ttf
View file @
8b0c9ec
No preview for this file type
public/font/iconfont.woff
View file @
8b0c9ec
No preview for this file type
public/js/shopping/order/address.js
View file @
8b0c9ec
...
...
@@ -221,6 +221,11 @@ function addressDialogFactory(opt, $the) {
address
:
[
the
]
}));
// 若添加后有20个地址则隐藏新增的按钮
if
(
$
(
'#address-list .address'
).
length
===
20
)
{
$
(
'#address-list .new-address-block'
).
addClass
(
'hide'
);
}
// 新地址默认使用,更新收货信息
receiver
(
the
);
...
...
@@ -288,7 +293,7 @@ $('.address-all').click(function() {
});
// 新增地址
$
(
'.new-address'
).
click
(
function
()
{
$
(
'.new-address
, .new-address-block
'
).
click
(
function
()
{
// 判断是否超过20条地址
if
(
$
(
'#address-list .address'
).
length
>=
20
)
{
...
...
@@ -366,6 +371,11 @@ $('.address-list').on('click', '.address', function() {
}
$this
.
remove
();
delConfirm
.
close
();
// 若删除后少于20个地址则显示新增的按钮
if
(
$
(
'#address-list .address'
).
length
<
20
)
{
$
(
'#address-list .new-address-block'
).
removeClass
(
'hide'
);
}
}
});
}
...
...
@@ -409,7 +419,8 @@ $.ajax({
newAddress
(
true
);
}
else
{
$
(
'#address-list'
).
append
(
addressTpl
({
address
:
data
.
data
address
:
data
.
data
,
hasNew
:
data
.
data
.
length
>=
20
?
false
:
true
}));
// 填收货人信息
...
...
public/scss/shopping/_order.css
View file @
8b0c9ec
...
...
@@ -47,6 +47,27 @@
background
:
#eee
url(/shopping/address-tag.png)
;
}
.new-address-block
{
float
:
left
;
width
:
270px
;
height
:
180px
;
margin-right
:
23px
;
border
:
1px
solid
#eee
;
margin-bottom
:
15px
;
height
:
180px
;
text-align
:
center
;
color
:
#999
;
cursor
:
pointer
;
.iconfont
{
display
:
block
;
color
:
#eee
;
font-size
:
60px
;
line-height
:
80px
;
margin-top
:
30px
;
}
}
.address
{
position
:
relative
;
float
:
left
;
...
...
Please
register
or
login
to post a comment