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
ccbikai(👎🏻🍜)
8 years ago
Commit
e36063ca5229a878628b3c44555adf721e25fd48
2 parents
9c4f959e
09954fe6
Merge branch 'master' into release/5.2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
30 deletions
apps/activity/controllers/coupon.js
apps/activity/controllers/student.js
apps/guang/models/rss.js
apps/home/models/order.js
apps/home/models/orderDetail.js
apps/passport/models/auth-helper.js
apps/product/models/intro.js
apps/product/models/list.js
config/common.js
process.json
apps/activity/controllers/coupon.js
View file @
e36063c
...
...
@@ -61,7 +61,7 @@ exports.getCoupon = (req, res, next) => {
// 获取信息成功
couponData
.
ordercode
=
ordercode
;
}
console
.
log
(
couponData
);
//
console.log(couponData);
res
.
json
({
result
:
couponData
});
...
...
@@ -94,7 +94,7 @@ exports.verify = (req, res, next) => {
// 获取信息成功
couponData
.
ordercode
=
ordercode
;
}
console
.
log
(
couponData
);
//
console.log(couponData);
res
.
json
({
result
:
couponData
});
...
...
apps/activity/controllers/student.js
View file @
e36063c
...
...
@@ -139,7 +139,7 @@ const getPlatForm = (req) => {
return
co
(
function
*
()
{
let
data
=
yield
getUser
(
yoho
.
uid
);
yoho
.
isStudent
=
data
.
data
&&
data
.
data
.
vip_info
&&
data
.
data
.
vip_info
.
is_student
?
true
:
false
;
yoho
.
isStudent
=
data
&&
data
.
data
&&
data
.
data
.
vip_info
&&
data
.
data
.
vip_info
.
is_student
?
true
:
false
;
// yoho.isStudent = false;
// console.log(yoho);
...
...
apps/guang/models/rss.js
View file @
e36063c
...
...
@@ -34,8 +34,8 @@ const getRssArticle = (gender) => {
break
;
}
return
articlePromise
.
then
((
article
)
=>
{
// 内容列表
if
(
article
.
data
.
list
.
artList
)
{
// 内容列表
if
(
article
&&
article
.
data
&&
article
.
data
.
list
&&
article
.
data
.
list
.
artList
)
{
let
build
=
{};
let
artListFunc
=
(
i
,
len
,
resolve
)
=>
{
...
...
@@ -43,22 +43,22 @@ const getRssArticle = (gender) => {
let
value
=
article
.
data
.
list
.
artList
[
i
];
if
(
typeof
value
.
id
!==
'undefined'
)
{
build
=
guangProcess
.
formatArticle
(
value
,
false
,
false
,
true
);
build
.
author
.
name
=
build
.
author
.
name
||
''
;
build
.
author
.
name
=
(
build
.
author
&&
build
.
author
.
name
)
||
''
;
return
_genIntro
(
value
.
id
).
then
((
intro
)
=>
{
build
.
intro
=
intro
;
result
.
push
(
build
);
artListFunc
(
++
i
,
len
,
resolve
);
});
}
}
else
{
});
}
}
else
{
resolve
(
result
);
}
};
}
};
return
new
Promise
((
resolve
)
=>
{
artListFunc
(
0
,
article
.
data
.
list
.
artList
.
length
,
resolve
);
});
});
}
}
});
};
...
...
@@ -75,20 +75,20 @@ const _genIntro = (id) => {
resData
.
data
.
forEach
((
value
)
=>
{
if
(
value
.
text
)
{
// 文字
result
+=
htmlProcess
.
removeHtml
(
htmlProcess
.
escapeToHtml
(
value
.
text
.
data
.
text
))
+
'<br/>'
;
}
else
if
(
value
.
singleImage
)
{
// 单张图
result
+=
`
<
img
src
=
"${helpers.image(value.singleImage.data[0].src, 640, 640)}"
/><
br
/>
`
;
}
else
if
(
value
.
smallPic
&&
value
.
smallPic
.
data
)
{
// 多张小图
value
.
smallPic
.
data
.
forEach
((
small
)
=>
{
result
+=
`
<
img
src
=
"${helpers.image(small.src, 315, 420)}"
/>
`
;
});
result
+=
'<br/>'
;
}
});
}
else
if
(
value
.
singleImage
)
{
// 单张图
result
+=
`
<
img
src
=
"${helpers.image(value.singleImage.data[0].src, 640, 640)}"
/><
br
/>
`
;
}
else
if
(
value
.
smallPic
&&
value
.
smallPic
.
data
)
{
// 多张小图
value
.
smallPic
.
data
.
forEach
((
small
)
=>
{
result
+=
`
<
img
src
=
"${helpers.image(small.src, 315, 420)}"
/>
`
;
});
result
+=
'<br/>'
;
}
});
return
result
;
}
});
}
});
};
module
.
exports
=
{
getRssArticle
};
};
\ No newline at end of file
...
...
apps/home/models/order.js
View file @
e36063c
...
...
@@ -274,7 +274,10 @@ const order = (params) => {
return
api
.
get
(
''
,
_
.
assign
({
method
:
'app.SpaceOrders.closeReasons'
},
params
),
{
code
:
200
}).
then
((
result
)
=>
{
},
params
),
{
cache
:
true
,
code
:
200
}).
then
((
result
)
=>
{
if
(
result
.
data
)
{
Object
.
assign
(
finalResult
,
{
cancelReason
:
result
.
data
});
...
...
apps/home/models/orderDetail.js
View file @
e36063c
...
...
@@ -13,6 +13,8 @@ const logger = global.yoho.logger;
const
closeReasons
=
()
=>
{
return
api
.
get
(
''
,
{
method
:
'app.SpaceOrders.closeReasons'
},
{
cache
:
true
}).
then
((
result
)
=>
{
if
(
result
&&
result
.
code
===
200
)
{
return
result
.
data
;
...
...
apps/passport/models/auth-helper.js
View file @
e36063c
...
...
@@ -72,7 +72,7 @@ class Auth {
let
encryptionUid
=
aes
.
encryptionUid
(
uid
);
if
(
data
)
{
let
uidCookie
=
`
$
{
data
.
profile_name
}::
$
{
encryptionUid
}
::
$
{
data
.
vip_info
.
title
}
::
$
{
token
}
`
;
let
uidCookie
=
`
$
{
data
.
profile_name
}::
$
{
encryptionUid
}
::
$
{
data
.
vip_info
&&
data
.
vip_info
.
title
}
::
$
{
token
}
`
;
res
.
cookie
(
'_UID'
,
uidCookie
,
{
domain
:
'yohobuy.com'
,
...
...
apps/product/models/intro.js
View file @
e36063c
...
...
@@ -346,6 +346,7 @@ let getintroIntro = (data) => {
},
{
cache
:
true
}).
then
(
result
=>
{
result
=
result
||
''
;
result
=
$
.
load
(
result
);
result
=
result
(
'#productDesc'
);
...
...
apps/product/models/list.js
View file @
e36063c
...
...
@@ -450,7 +450,7 @@ const _formShopData = (data, shopId, isApp) => {
shopCategory
.
list
.
push
({
url
:
helpers
.
urlFormat
(
''
,
{
shop_id
:
shopId
,
sort
:
item
.
relation_parameter
.
sort
sort
:
(
item
.
relation_parameter
&&
item
.
relation_parameter
.
sort
)
||
''
},
'search'
),
categoryId
:
item
.
category_id
,
name
:
item
.
category_name
...
...
config/common.js
View file @
e36063c
...
...
@@ -96,6 +96,7 @@ if (isProduction) {
master
:
[
'memcache1.yohoops.org:12111'
,
'memcache2.yohoops.org:12111'
,
'memcache3.yohoops.org:12111'
],
slave
:
[
'memcache1.yohoops.org:12112'
,
'memcache2.yohoops.org:12112'
,
'memcache3.yohoops.org:12112'
],
session
:
[
'memcache1.yohoops.org:12111'
,
'memcache2.yohoops.org:12111'
,
'memcache3.yohoops.org:12111'
],
poolSize
:
100
,
reconnect
:
5000
,
timeout
:
1000
,
retries
:
0
...
...
process.json
View file @
e36063c
...
...
@@ -3,7 +3,7 @@
{
"name"
:
"yohobuywap-node"
,
"script"
:
"app.js"
,
"instances"
:
"
max
"
,
"instances"
:
"
3
"
,
"exec_mode"
:
"cluster"
,
"merge_logs"
:
true
,
"log_date_format"
:
"YYYY-MM-DD HH:mm Z"
,
...
...
@@ -13,4 +13,4 @@
}
}
]
}
\ No newline at end of file
}
...
...
Please
register
or
login
to post a comment