Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OPENTECH
/
yoho-node-ci
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
2
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
周少峰
8 years ago
Commit
dc70999be9ed5f0e9850c365c8c9f6fce9b47872
2 parents
837eb9a9
ae9d11e2
Merge branch 'feature/keywords'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
apps/web/actions/seo.js
apps/web/views/action/seo_tdk.hbs
apps/web/actions/seo.js
View file @
dc70999
...
...
@@ -15,10 +15,6 @@ const TYPE_LIST = [
];
const
tdk
=
{
_getDeaultList
:
async
(
ctx
,
next
)
=>
{
},
// tdk 列表
index
:
async
(
ctx
,
next
)
=>
{
let
resData
=
{};
...
...
@@ -115,7 +111,12 @@ const tdk = {
return
ctx
.
response
.
body
=
result
;
}
let
hashKey
=
type
===
'url'
?
md5
(
key
)
:
key
;
let
hashKey
=
key
;
if
(
type
===
'url'
)
{
key
=
_
.
replace
(
key
,
/http
[
s
]?
:
\/\/
/
,
''
);
hashKey
=
md5
(
key
);
}
await
ctx
.
redis
.
multi
([
[
'lpushx'
,
`
tdk
:
$
{
type
}:
links
`
,
hashKey
],
...
...
@@ -150,7 +151,12 @@ const tdk = {
return
ctx
.
response
.
body
=
result
;
}
let
hashKey
=
type
===
'url'
?
md5
(
key
)
:
key
;
let
hashKey
=
key
;
if
(
type
===
'url'
)
{
key
=
_
.
replace
(
key
,
/http
[
s
]?
:
\/\/
/
,
''
);
hashKey
=
md5
(
key
);
}
await
ctx
.
redis
.
multi
([
[
'hmset'
,
`
tdk
:
$
{
type
}:
$
{
hashKey
}
`
,
'title'
,
title
,
'keywords'
,
keywords
,
...
...
apps/web/views/action/seo_tdk.hbs
View file @
dc70999
...
...
@@ -293,8 +293,6 @@
data
=
that
.
packReqData
();
data.key = data.key.replace(/http[s]?:\/\
//,'');
if
(
!
data
)
{
that
.
$errTip
.
text
(
'请填写完整tdk信息'
);
return
;
...
...
Please
register
or
login
to post a comment