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
Plain Diff
Browse Files
Authored by
毕凯
8 years ago
Commit
5e8d85af74d97cfb72b86b41a7e63ce6435d3e3f
2 parents
366121b5
5210e662
Merge branch 'feature/newQrcode' into 'release/6.1'
删除uid加密解密 See merge request
!902
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
19 deletions
apps/home/models/newQrcode.js
apps/home/views/action/new-qrcode.hbs
apps/home/models/newQrcode.js
View file @
5e8d85a
'use strict'
;
const
_
=
require
(
'lodash'
);
const
camelCase
=
global
.
yoho
.
camelCase
;
const
api
=
global
.
yoho
.
API
;
const
crypto
=
global
.
yoho
.
crypto
;
const
PASSWORD
=
'yoho9646yoho9646'
;
class
newQrcode
extends
global
.
yoho
.
BaseModel
{
constructor
(
ctx
)
{
...
...
@@ -38,20 +35,9 @@ class newQrcode extends global.yoho.BaseModel {
}
getToken
(
params
)
{
let
uidNum
=
parseInt
(
params
.
uid
,
10
);
let
token
=
uidNum
?
crypto
.
encryption
(
PASSWORD
,
uidNum
+
''
)
:
''
;
let
uid
=
''
;
try
{
uid
=
crypto
.
decrypt
(
PASSWORD
,
decodeURIComponent
(
token
));
uid
=
parseInt
(
uid
,
10
);
}
catch
(
e
)
{
uid
=
token
;
}
return
api
.
get
(
''
,
{
method
:
'app.twoDimen.getCode'
,
uid
:
uid
,
uid
:
params
.
uid
,
}).
then
(
result
=>
{
return
(
result
&&
result
.
data
&&
result
.
data
.
code
)
||
''
;
});
...
...
@@ -66,7 +52,7 @@ class newQrcode extends global.yoho.BaseModel {
let
resu
=
{};
if
(
_
.
get
(
result
,
'[0]data'
))
{
resu
=
camelCase
(
result
[
0
].
data
)
;
resu
=
result
[
0
].
data
;
}
if
(
_
.
get
(
result
,
'[1]data'
))
{
resu
.
trendWord
=
result
[
1
].
data
.
trendWord
;
...
...
apps/home/views/action/new-qrcode.hbs
View file @
5e8d85a
...
...
@@ -2,8 +2,8 @@
<div
class=
"qrcode-body"
>
<div
class=
"toper"
>
<div
class=
"user-pic"
>
<div
class=
"avatar user-avatar"
{{#if
headIco
}}
style=
"background-image:url(
{{
image2
headIco
mode
=
2
h
=
100
w
=
100
q
=
90
}}
)"
{{/if}}
></div>
<div
class=
"level level-
{{
vipInfo
/
curLevel
}}
"
></div>
<div
class=
"avatar user-avatar"
{{#if
head_ico
}}
style=
"background-image:url(
{{
image2
head_ico
mode
=
2
h
=
100
w
=
100
q
=
90
}}
)"
{{/if}}
></div>
<div
class=
"level level-
{{
vip_info
/
cur_level
}}
"
></div>
</div>
<div
class=
"user-info"
>
<div
class=
"name eps"
>
{{
nickname
}}
</div>
...
...
@@ -23,7 +23,7 @@
</div>
</div>
<div
class=
"qrcode-pic"
data-qr=
"
{{
token
}}
"
>
<div
class=
"qrcode-avatar user-avatar"
{{#if
head
Ico
}}
style=
"background-image:url(
{{
image2
headI
co
mode
=
2
h
=
100
w
=
100
q
=
90
}}
)"
{{/if}}
></div>
<div
class=
"qrcode-avatar user-avatar"
{{#if
head
_ico
}}
style=
"background-image:url(
{{
image2
head_i
co
mode
=
2
h
=
100
w
=
100
q
=
90
}}
)"
{{/if}}
></div>
</div>
<div
class=
"invite hide"
>
<span>
邀请好友扫一扫完成注册,现金券赚不停
</span>
...
...
Please
register
or
login
to post a comment