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
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
b35f935ca266f385842b1e4f1982057421c9c9d8
2 parents
012957ce
ce5fc53e
switch to jquery as Liangzhifeng comments. code review by bikai
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
22 deletions
static/js/me/pay.js
static/js/product/newsale/hot-rank.js
static/sass/product/_hot-rank.scss
template/m.yohobuy.com/actions/product/newsale/hotlist.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
static/js/me/pay.js
View file @
b35f935
...
...
@@ -6,6 +6,7 @@
var
$
=
require
(
'jquery'
);
var
loading
=
require
(
'../plugin/loading'
),
tip
=
require
(
'../plugin/tip'
),
Hammer
=
require
(
'yoho.hammer'
);
var
theOrderCode
=
document
.
getElementById
(
'ordercode'
).
value
;
...
...
@@ -17,7 +18,7 @@ var appIconPosition = {
baidu
:
'-2.7rem'
,
weixin
:
'-1.2rem'
,
QQ
:
'-5.4rem'
,
bank
:
'-4'
bank
:
'-4
rem
'
};
//隐藏微信分享选项
...
...
@@ -77,11 +78,11 @@ function callpay(orderCode) {
jsApiParameters
=
res
.
data
.
jsApiParameters
;
jsApiCall
(
orderCode
,
jsApiParameters
);
}
else
{
alert
(
'微信支付调取失败'
);
tip
.
show
(
'微信支付调取失败'
);
}
},
error
:
function
()
{
alert
(
'请刷新本页面,完成微信支付'
);
tip
.
show
(
'请刷新本页面,完成微信支付'
);
}
});
}
...
...
@@ -99,11 +100,11 @@ function isWXOpen() {
}
function
hideWeChatPay
()
{
var
payApps
=
document
.
getElementsByClassName
(
'
app'
);
var
$payApps
=
$
(
'.
app'
);
[].
forEach
.
call
(
payApps
,
function
(
app
,
index
)
{
if
(
app
.
innerHTML
.
indexOf
(
'微信'
)
!==
-
1
)
{
app
.
parentNode
.
style
.
display
=
'none'
;
$payApps
.
each
(
function
(
idx
,
app
)
{
if
(
$
(
app
).
attr
(
'id'
)
===
'weixin'
)
{
$
(
app
).
parent
().
css
(
'display'
,
'none'
);
return
false
;
}
});
...
...
@@ -117,29 +118,29 @@ function handleForWX() {
function
setAppIcon
(
el
,
position
)
{
el
.
style
.
backgroundPositionY
=
position
;
$
(
el
).
css
(
'background-position-y'
,
position
)
;
}
function
loadIcon
()
{
var
boxs
=
document
.
getElementsByClassName
(
'box'
);
var
div
=
null
;
var
$boxs
=
$
(
'.box'
);
var
$div
=
null
;
var
appid
=
null
;
[].
forEach
.
call
(
boxs
,
function
(
box
,
index
)
{
div
=
box
.
getElementsByClassName
(
'icon'
)[
0
].
getElementsByTagName
(
'div'
)[
0
];
if
(
div
)
{
appid
=
box
.
getAttribute
(
'id'
);
$boxs
.
each
(
function
(
idx
,
box
)
{
$div
=
$
(
box
).
find
(
'.icon'
).
find
(
'div'
);
if
(
$div
.
length
>
0
)
{
appid
=
$
(
box
).
attr
(
'id'
);
if
(
appid
!==
'alipay'
)
{
setAppIcon
(
div
,
appIconPosition
[
appid
]);
setAppIcon
(
$
div
,
appIconPosition
[
appid
]);
}
}
});
}
function
showPage
()
{
var
pageList
=
document
.
getElementsByClassName
(
'payapp-list'
)[
0
]
;
var
$pageList
=
$
(
'.payapp-list'
)
;
pageList
.
style
.
visibility
=
'visible'
;
$pageList
.
css
(
'visibility'
,
'visible'
)
;
}
if
(
wxHammer
)
{
...
...
static/js/product/newsale/hot-rank.js
View file @
b35f935
...
...
@@ -38,11 +38,14 @@ function hotrank(page, sort, tabId, notab) {
}
}
else
{
$
(
'.no-result'
).
remove
();
$
(
'.rank-main'
).
remove
();
if
(
page
===
1
)
{
$
(
'.rank-main'
).
remove
();
}
$
(
'#hotRank'
).
append
(
data
);
}
lazyLoad
(
$
(
'img.lazy'
));
$
(
'.rank-main ul li:gt(
2
)'
).
find
(
'.item-content i'
).
removeClass
(
'top'
);
$
(
'.rank-main ul li:gt(
9
)'
).
find
(
'.item-content i'
).
removeClass
(
'top'
);
winH
=
$
(
window
).
height
();
if
(
$
(
'.rank-main'
).
length
!==
0
)
{
$
(
'#yoho-footer'
).
css
(
'position'
,
'static'
);
...
...
static/sass/product/_hot-rank.scss
View file @
b35f935
...
...
@@ -54,6 +54,8 @@
margin
:
(
15rem
/
$pxConvertRem
)
0
0
!
important
;
padding
:
0
!
important
;
width
:
9
.5rem
;
max-height
:
72rem
/
$pxConvertRem
;
overflow
:
hidden
;
line-height
:
36rem
/
$pxConvertRem
;
color
:
#444
;
font-size
:
28rem
/
$pxConvertRem
;
...
...
template/m.yohobuy.com/actions/product/newsale/hotlist.phtml
View file @
b35f935
...
...
@@ -21,7 +21,7 @@
</div>
<div
class=
"item-content"
>
<i
class=
"rank-icon top"
>
{
{rank
}
}</i>
<h
2
{
{#
active
}
}class=
"hasActive"
{
{/
activ
e
}
}>
{
{name
}
}</h
2
>
<h
2
{
{#
sales_phrase
}
}class=
"hasActive"
{
{/
sales_phras
e
}
}>
{
{name
}
}</h
2
>
{
{#
active
}
}
<p>
{
{.
}
}</p>
{
{/
active
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
b35f935
...
...
@@ -785,7 +785,7 @@ class HomeController extends AbstractAction
if
(
empty
(
$orderCode
))
{
$this
->
error
();
}
$this
->
_view
->
display
(
'pay'
,
array
(
'payCenterPage'
=>
true
,
'payAppInfo'
=>
array
(
...
...
@@ -807,7 +807,7 @@ class HomeController extends AbstractAction
),
),
'orderCode'
=>
$orderCode
,
'hasWxShare'
=>
strpos
(
$this
->
_request
->
server
(
'HTTP_USER_AGENT'
,
''
),
'MicroMessenger'
)
!==
false
'hasWxShare'
=>
strpos
(
$this
->
server
(
'HTTP_USER_AGENT'
,
''
),
'MicroMessenger'
)
!==
false
));
}
...
...
Please
register
or
login
to post a comment