Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
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
uedxwg
9 years ago
Commit
e7a0366edb713eb62b51a0ce281869989250112a
1 parent
bc9ac89d
有货币消费记录
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
30 deletions
static/js/me/currency.js
static/sass/me/_yoho-coin-detail.scss
template/m.yohobuy.com/actions/index/home/ajax-currency-detail.phtml
template/m.yohobuy.com/actions/index/home/currency-detail.phtml
template/m.yohobuy.com/partials/layout/use.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
static/js/me/currency.js
View file @
e7a0366
var
$
=
require
(
'jquery'
);
var
page
=
0
;
var
page
=
1
;
$
(
window
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
+
$
(
window
).
height
()
>
$
(
'body'
).
height
()
-
1
)
{
page
++
;
$
.
ajax
({
function
ajaxCurrencyDetail
(
page
)
{
$
.
ajax
({
type
:
'POST'
,
url
:
'/home/
c
urrencyDetail'
,
url
:
'/home/
ajaxC
urrencyDetail'
,
dataType
:
'html'
,
data
:
{
page
:
page
},
success
:
function
(
data
)
{
console
.
log
(
1
);
$
(
'.coin-detail'
).
append
(
data
);
window
.
rePosFooter
();
}
});
};
$
(
window
).
scroll
(
function
()
{
if
(
$
(
window
).
scrollTop
()
+
$
(
window
).
height
()
>
$
(
'body'
).
height
()
-
1
)
{
page
++
;
ajaxCurrencyDetail
(
page
);
return
;
}
});
\ No newline at end of file
});
ajaxCurrencyDetail
(
page
)
\ No newline at end of file
...
...
static/sass/me/_yoho-coin-detail.scss
View file @
e7a0366
.yoho-coin-detail-page
{
background
:
#f0f0f0
;
padding-bottom
:
pxToRem
(
40px
);
.money
{
width
:
100%
;
height
:
pxToRem
(
70px
);
...
...
template/m.yohobuy.com/actions/index/home/ajax-currency-detail.phtml
0 → 100644
View file @
e7a0366
{
{#
currency
}
}
<li>
<div
class=
"detail-item"
>
<p
class=
"title"
>
{
{title
}
}</p>
<p
class=
"time"
>
{
{time
}
}</p>
<div
class=
"count"
>
{
{count
}
}
</div>
</div>
</li>
{
{/
currency
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/home/currency-detail.phtml
View file @
e7a0366
{
{>
layout/header
}
}
<div
class=
"yoho-coin-detail-page yoho-page"
>
{
{#
money
}
}
<div
class=
"money"
>你拥有的有货币:<span>
{
{
money
}
}</span></div>
{
{/
money
}
}
<ul
class=
"coin-detail"
>
{
{#
currency
}
}
<li>
<div
class=
"detail-item"
>
<p
class=
"title"
>
{
{title
}
}</p>
<p
class=
"time"
>
{
{time
}
}</p>
<div
class=
"count"
>
{
{count
}
}
</div>
</div>
</li>
{
{/
currency
}
}
</ul>
<ul
class=
"coin-detail"
></ul>
</div>
{
{>
layout/footer
}
}
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
e7a0366
...
...
@@ -286,7 +286,7 @@
seajs.use('js/me/logistic');
</script>
{{/if}}
{{#if currency}}
{{#if currency
Detail
}}
<script>
seajs.use('js/me/currency');
</script>
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
e7a0366
...
...
@@ -825,17 +825,38 @@ class HomeController extends AbstractAction
*/
public
function
currencyDetailAction
()
{
$this
->
setTitle
(
'YOHO币'
);
$this
->
setTitle
(
'YOHO币'
);
$this
->
setNavHeader
(
'YOHO币'
,
true
,
false
);
$page
=
$this
->
get
(
'page'
,
1
);
$size
=
$this
->
get
(
'size'
,
10
);
//$data = UserModel::getYohoCoinLists($this->_uid,$page,$size);
$data
[
'money'
]
=
'0'
;
$page
=
$this
->
post
(
'page'
,
1
);
$size
=
$this
->
post
(
'size'
,
20
);
// $data = UserModel::getYohoCoinLists($this->_uid,$page,$size);
$data
=
UserModel
::
getYohoCoinLists
(
3965746
,
$page
,
$size
);
$this
->
_view
->
display
(
'currency-detail'
,
array
(
'currency'
=>
$data
[
'list'
],
'money'
=>
$data
[
'money'
],
'pageFooter'
=>
true
,
'currencyDetail'
=>
true
,
'currencyDetailPage'
=>
true
));
}
/**
* YOHO币详情 新版
*/
public
function
ajaxCurrencyDetailAction
()
{
$data
[
'list'
]
=
array
();
$data
[
'money'
]
=
0
;
$page
=
$this
->
post
(
'page'
,
1
);
$size
=
$this
->
post
(
'size'
,
20
);
$data
=
UserModel
::
getYohoCoinLists
(
$this
->
_uid
,
$page
,
$size
);
// $data = UserModel::getYohoCoinLists(3965746,$page,$size);
$this
->
_view
->
display
(
'ajax-currency-detail'
,
array
(
'currency'
=>
$data
[
'list'
],
'pageFooter'
=>
true
,
'currencyDetailPage'
=>
true
));
}
}
...
...
Please
register
or
login
to post a comment