Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
weiqingting
9 years ago
Commit
3c061f866d1cf40729a93a7b3fe7d02661d76ff4
1 parent
c457b83e
添加 app_version 到 User-Agent
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
7 deletions
apps/activity/controllers/student.js
apps/activity/views/action/student.hbs
public/js/activity/register.page.js
public/js/activity/student.page.js
apps/activity/controllers/student.js
View file @
3c061f8
...
...
@@ -7,7 +7,7 @@ const queryString = require('querystring');
const
Promise
=
require
(
'bluebird'
);
const
co
=
Promise
.
coroutine
;
const
headerModel
=
require
(
'../../../doraemon/models/header'
);
// 头部model
const
_
=
require
(
'lodash'
);
const
_
=
require
(
'lodash'
);
const
getResource
=
code
=>
{
...
...
@@ -103,10 +103,10 @@ const getPlatForm = (req) => {
yoho
.
app_version
=
versions
&&
versions
.
length
===
2
?
versions
[
1
]
:
''
;
yoho
.
app_version
=
yoho
.
app_version
||
req
.
query
.
app_version
||
''
;
console
.
log
(
"yoho.app_version"
);
console
.
log
(
'yoho.app_version'
);
console
.
log
(
yoho
.
app_version
);
if
(
yoho
.
app_version
)
{
yoho
.
app_version
=
_
.
toString
(
yoho
.
app_version
);
yoho
.
app_version
=
_
.
toString
(
yoho
.
app_version
);
arrs
=
yoho
.
app_version
.
split
(
'.'
);
if
(
arrs
.
length
>
2
)
{
if
(
arrs
[
0
]
&&
+
arrs
[
0
]
<
4
)
{
...
...
apps/activity/views/action/student.hbs
View file @
3c061f8
...
...
@@ -47,7 +47,7 @@
</span>
</a>
{{else}}
<div
class=
"main-right-use"
>
<div
class=
"main-right-use"
href=
'
{{
..
/
image
.
url
}}
'
>
<span
class=
"on-receive on-lingqu no-bg"
>
<p>
点击
</p>
<p>
领取
</p>
...
...
public/js/activity/register.page.js
View file @
3c061f8
...
...
@@ -416,6 +416,14 @@ $(document).on('click', '.s-submit', function() {
location
.
href
=
data
.
data
;
}
else
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
window
.
_yas
.
sendCustomInfo
({
EVENT
:
'YB_STUDENT_ATTCT_SUBMIT'
,
C_ID
:
C_ID
,
SRC_ID
:
5
,
SUBMIT_RES
:
2
},
false
);
}
tip
.
show
(
data
.
message
);
}
...
...
public/js/activity/student.page.js
View file @
3c061f8
...
...
@@ -64,7 +64,9 @@ function getUrlParam(name) {
$
(
'.on-lingqu'
,
'div.main-right-use'
).
on
(
'click'
,
function
()
{
var
$curDom
=
$
(
this
),
req
=
''
;
req
=
''
,
href
=
''
,
a
=
''
;
if
(
getUrlParam
(
'app_version'
))
{
req
+=
'&app_version='
+
getUrlParam
(
'app_version'
);
...
...
@@ -73,6 +75,8 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() {
if
(
getUrlParam
(
'uid'
))
{
req
+=
'&uid='
+
getUrlParam
(
'uid'
);
}
if
(
!
$curDom
.
hasClass
(
'received'
))
{
$
.
ajax
({
url
:
'//m.yohobuy.com/coupon/receiveCoupon?code=a83b7d55324fb65f96c1f85a3387ebd8'
+
req
,
...
...
@@ -93,8 +97,11 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() {
location
.
href
=
newUrl
;
}
else
{
if
(
status
)
{
$curDom
.
html
(
''
).
removeClass
(
'on-receive'
).
removeClass
(
'no-bg'
);
$curDom
.
addClass
(
'received'
);
href
=
$curDom
.
parent
(
".main-right-use"
).
attr
(
"href"
);
$curDom
.
parent
(
".main-right-use"
).
wrap
(
"<a class='main-right-use' href="
+
href
+
"></a>"
);
a
=
$curDom
.
parent
(
".main-right-use"
).
parent
(
"a"
);
a
.
html
(
'<span class="received"></span>'
);
tip
.
show
(
'领券成功'
);
}
else
{
tip
.
show
(
msg
);
...
...
Please
register
or
login
to post a comment