Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
htoooth
7 years ago
Commit
4a1bbccf2b400b76e53844ee28a9a62dc29f9e64
2 parents
6460afa0
002ad659
Merge branch 'master' into feature/update-lib
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
6 deletions
doraemon/middleware/htaccess/rules/default.js
doraemon/middleware/htaccess/rules/www.js
doraemon/views/partial/analysis.hbs
package.json
public/js/common.js
utils/parameter.js
doraemon/middleware/htaccess/rules/default.js
View file @
4a1bbcc
...
...
@@ -10,7 +10,7 @@ const TYPE = require('../type');
module
.
exports
=
[
{
type
:
TYPE
.
redirect
,
origin
:
/
\/
about
\?
shopId=
([\d]
+
)
/
,
origin
:
/
^
\/
about
\?
shopId=
([\d]
+
)
/
,
target
:
(
req
,
match
,
id
)
=>
{
return
helpers
.
urlFormat
(
`
/
shop$
{
id
}
-
about
`
,
null
,
req
.
subdomains
[
0
]);
}
...
...
doraemon/middleware/htaccess/rules/www.js
View file @
4a1bbcc
...
...
@@ -102,7 +102,7 @@ module.exports = [
// 新品到着
{
type
:
TYPE
.
rewrite
,
origin
:
/
\/(
.*
)
-new/
,
origin
:
/
^
\/(
boys|girls|kids|lifestyle
)
-new/
,
target
:
(
req
,
match
,
channel
)
=>
{
return
`
/
product
/
list
/
$
{
channel
}
-
new
`
;
}
...
...
@@ -179,7 +179,7 @@ module.exports = [
},
{
type
:
TYPE
.
rewrite
,
origin
:
/
\/
shop
([\d]
+
)
-about/
,
origin
:
/
^
\/
shop
([\d]
+
)
-about/
,
target
:
(
req
,
match
,
id
)
=>
{
req
.
query
.
domain
=
req
.
subdomains
[
0
];
req
.
query
.
shopId
=
id
;
...
...
doraemon/views/partial/analysis.hbs
View file @
4a1bbcc
...
...
@@ -45,7 +45,7 @@ var _gaq = _gaq || [];
var
s
=
document
.
getElementsByTagName
(
"script"
)[
0
];
s
.
parentNode
.
insertBefore
(
hm
,
s
);
if
(
getUid
()
!==
0
)
{
if
(
window
.
getUid
&&
window
.
getUid
()
!==
0
)
{
_hmt
.
push
([
'_setCustomVar'
,
2
,
'login'
,
'PC'
,
2
]);
}
})();
...
...
package.json
View file @
4a1bbcc
{
"name"
:
"yohobuy-node"
,
"version"
:
"6.1.1
7
"
,
"version"
:
"6.1.1
8
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
public/js/common.js
View file @
4a1bbcc
...
...
@@ -18,7 +18,11 @@ function cookie(name) {
var
re
=
new
RegExp
(
name
+
'=([^;$]*)'
,
'i'
),
matchPattern
=
'$1'
;
return
re
.
test
(
decodeURIComponent
(
document
.
cookie
))
?
RegExp
[
matchPattern
]
:
''
;
try
{
return
re
.
test
(
decodeURIComponent
(
document
.
cookie
))
?
RegExp
[
matchPattern
]
:
''
;
}
catch
(
e
)
{
return
decodeURIComponent
(
re
.
test
(
document
.
cookie
)
?
RegExp
[
matchPattern
]
:
''
);
}
}
function
setCookie
(
name
,
value
,
options
)
{
...
...
utils/parameter.js
View file @
4a1bbcc
...
...
@@ -7,6 +7,7 @@
'use strict'
;
const
_
=
require
(
'lodash'
);
// const logger = global.yoho.logger;
const
queryString
=
require
(
'querystring'
);
...
...
@@ -57,6 +58,7 @@ const transformKey = (params, isFull) => {
matchParams
[
name
]
=
value
;
}
else
{
extraParams
[
key
]
=
value
;
// logger.info(`list parameter [${key}] map value not found`);
}
});
...
...
Please
register
or
login
to post a comment