Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
1ad12424b2e4a0d84cb10b255593245fe9a34263
1 parent
90616967
删除地址
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
14 deletions
static/js/category/index.js
static/js/me/address.js
template/m.yohobuy.com/actions/index/home/address.phtml
template/m.yohobuy.com/partials/layout/footer.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
static/js/category/index.js
View file @
1ad1242
...
...
@@ -15,13 +15,7 @@ var $nav = $('.category-nav'),
var
$curContent
=
$contents
.
not
(
'.hide'
);
<<<<<<<
HEAD
// $curClickSubLevel;
var
navHammer
,
ccHammer
;
=======
var
navHammer
;
>>>>>>>
master
//初始化container高度
(
function
()
{
...
...
static/js/me/address.js
View file @
1ad1242
...
...
@@ -15,7 +15,9 @@ var $action = $('.action'),
$addressListPage
=
$
(
'.my-address-list-page'
),
$area
=
$
(
'.area'
),
$footer
=
$
(
'#yoho-footer'
),
$confim
=
$
(
'.confim-mask'
),
isSubmiting
,
deleteId
,
newArea
=
[];
function
editAddress
(
data
)
{
...
...
@@ -32,9 +34,30 @@ function editAddress(data) {
// $addressForm.find('[name="consignee"]').focus();
}
function
deleteAddress
(
data
)
{
}
$confim
.
on
(
'touchend'
,
'.cancel'
,
function
(){
deleteId
=
null
;
$confim
.
hide
();
}).
on
(
'touchend'
,
'.confim'
,
function
(){
$
.
ajax
({
method
:
'POST'
,
url
:
'/home/deladdress'
,
data
:
{
id
:
deleteId
}
}).
then
(
function
(
res
)
{
if
(
$
.
type
(
res
)
!==
'object'
)
{
res
=
{};
}
if
(
res
.
code
!==
200
)
{
tip
.
show
(
res
.
message
||
'网络出了点问题~'
);
}
else
{
window
.
location
.
reload
();
}
}).
fail
(
function
()
{
tip
.
show
(
'网络出了点问题~'
);
}).
always
(
function
()
{
deleteId
=
null
;
$confim
.
hide
();
});
});
// 添加地址
$addAddress
.
on
(
'touchend'
,
function
()
{
...
...
@@ -45,7 +68,8 @@ $addAddress.on('touchend', function() {
$action
.
on
(
'touchend'
,
'.edit'
,
function
()
{
editAddress
(
$
(
this
).
data
());
}).
on
(
'touchend'
,
'.del'
,
function
()
{
deleteAddress
();
deleteId
=
$
(
this
).
data
(
'id'
);
$confim
.
show
();
});
$submit
.
on
(
'touchend'
,
function
()
{
...
...
template/m.yohobuy.com/actions/index/home/address.phtml
View file @
1ad1242
...
...
@@ -21,7 +21,7 @@
你确定要删除地址吗?
</div>
<div
class=
"action"
>
<span
class=
"c
e
ncel"
>
<span
class=
"c
a
ncel"
>
取消
</span>
<span
class=
"confim"
>
...
...
template/m.yohobuy.com/partials/layout/footer.phtml
View file @
1ad1242
...
...
@@ -16,8 +16,8 @@
<script
src=
"http://static.buy.test.yoho.cn/dist/myohobuy/{{version}}/index-debug.js"
></script>
{
{/if
}
}
{
{#if
devEnv
}
}
<script
src=
"http://172.16.6.204:8000/static/js/sea.js?nowrap"
></script>
<script>seajs.config(
{
base:
'http://172.16.6.204:8000/'
}
);</script>
<script
src=
"http://localhost:8000/static/js/sea.js?nowrap"
></script>
<script>seajs.config(
{
base:
'http://localhost:8000/'
}
);</script>
{
{/if
}
}
<script
type=
"text/javascript"
>
(function(w,d,s,j,f)
{
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
1ad1242
...
...
@@ -266,7 +266,7 @@ class HomeController extends AbstractAction
/**
* 删除地址
*/
public
function
addressDel
Action
()
public
function
delAddress
Action
()
{
$result
=
array
();
...
...
Please
register
or
login
to post a comment