Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
王水玲
9 years ago
Commit
be9328c231304eabc3907679f119a574e7a82519
2 parents
0f05b416
f4feb046
Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
97 additions
and
57 deletions
apps/editorial/controllers/editorial.js
apps/editorial/models/editorial.js
apps/editorial/views/action/detail.hbs
apps/editorial/views/partial/comment.hbs
apps/editorial/views/partial/msg.hbs
apps/me/models/returns.js
apps/me/views/partial/collection/editorial.hbs
apps/me/views/partial/exchange-detail.hbs
apps/passport/controllers/login.js
config/common.js
public/js/me/return-list.page.js
public/scss/editorial/_detail.css
public/scss/editorial/_index.css
public/scss/editorial/_msg.css
public/scss/me/favorite/_product.css
public/scss/me/order/_table.css
apps/editorial/controllers/editorial.js
View file @
be9328c
...
...
@@ -171,7 +171,7 @@ const detail = (req, res, next) => {
link
=
'http://www.yohoblk.com/lifestyle'
;
}
editorialModel
.
getDetailData
(
id
,
uid
,
udid
,
appType
).
then
((
result
)
=>
{
editorialModel
.
getDetailData
(
id
,
appType
,
uid
,
udid
).
then
((
result
)
=>
{
res
.
display
(
'detail'
,
{
module
:
'editorial'
,
page
:
'detail'
,
...
...
@@ -200,11 +200,6 @@ const detail = (req, res, next) => {
userInfo
:
result
.
head
,
comment
:
result
.
comment
,
brands
:
result
.
brands
,
// article: {
// nextChapter: '来来来,让我们好好聊聊',
// lastChapter: '除了黑白灰'
// },
nextArticle
:
result
.
nextArticle
,
perArticle
:
result
.
perArticle
,
share
:
{
...
...
@@ -212,8 +207,6 @@ const detail = (req, res, next) => {
shareDesc
:
result
.
head
.
title
,
weixinUrl
:
result
.
head
.
weixinUrl
}
},
helpers
:
{
// import component, path depends on your project
...
...
apps/editorial/models/editorial.js
View file @
be9328c
...
...
@@ -344,10 +344,9 @@ const _processContentData = (list) => {
* @returns {*}
*/
const
_getHeadData
=
(
id
,
uid
,
udid
,
appType
)
=>
{
const
_getHeadData
=
(
id
,
appType
,
uid
,
udid
)
=>
{
let
par
=
{
id
:
id
,
udid
:
udid
,
app_type
:
appType
};
...
...
@@ -355,6 +354,10 @@ const _getHeadData = (id, uid, udid, appType) => {
par
.
uid
=
uid
;
}
if
(
udid
)
{
par
.
udid
=
udid
;
}
return
serviceAPI
.
get
(
'/guang/api/*/article/getArticleBaseInfo'
,
par
).
then
((
result
)
=>
{
if
(
result
&&
result
.
code
===
200
)
{
return
result
.
data
;
...
...
@@ -458,18 +461,20 @@ const _getArticlePre = (id, appType) => {
id
:
id
,
app_type
:
appType
}).
then
((
result
)
=>
{
console
.
log
(
result
);
console
.
log
(
result
.
message
);
if
(
result
&&
result
.
code
===
200
)
{
let
perArticle
=
{};
// let id = result.data.articleIdPre;
perArticle
.
href
=
`
$
{
config
.
siteUrl
}
/editorial/
$
{
result
.
data
.
articleIdPre
}.
html
`
;
_getHeadData
(
result
.
data
.
articleIdPre
,
appType
).
then
((
list
)
=>
{
console
.
log
(
list
);
perArticle
.
lastChapter
=
list
.
title
;
}).
then
(()
=>
{
console
.
log
(
perArticle
);
return
perArticle
;
});
...
...
@@ -491,7 +496,7 @@ const _getArticleNext = (id, appType) => {
id
:
id
,
app_type
:
appType
}).
then
((
result
)
=>
{
// console.log(result)
if
(
result
&&
result
.
code
===
200
)
{
let
nextArticle
=
{};
...
...
@@ -624,7 +629,7 @@ const shareData = () => {
*/
const
getDetailData
=
(
id
,
uid
,
udid
,
appType
)
=>
{
return
co
(
function
*
()
{
let
result
=
yield
Promise
.
all
([
_getHeadData
(
id
,
uid
,
udid
,
appType
),
let
result
=
yield
Promise
.
all
([
_getHeadData
(
id
,
appType
,
uid
,
udid
),
_getArticleData
(
id
),
_getContentData
(
id
),
_getCommentsData
(
id
),
...
...
apps/editorial/views/action/detail.hbs
View file @
be9328c
...
...
@@ -18,9 +18,9 @@
<a
class=
"author-name"
href=
"
{{
authorUrl
}}
"
>
{{
name
}}
</a>
</div>
<div
class=
"article-status"
>
<span
class=
"article-time"
>
{{
time
}}
</span>
<span
class=
"article-browse"
>
浏览:
{{
click
}}
</span>
<span
class=
"article-comments"
>
评论:
{{
commentNum
}}
</span>
<span
class=
"article-time font"
>
{{
time
}}
</span>
<span
class=
"article-browse font"
>
浏览:
{{
click
}}
</span>
<span
class=
"article-comments font"
>
评论:
{{
commentNum
}}
</span>
</div>
</div>
{{/
header
}}
...
...
@@ -37,7 +37,7 @@
{{#
text
}}
<div
class=
"article-text block"
>
{{#
data
}}
<p>
{{{
text
}}}
</p>
{{{
text
}}}
{{/
data
}}
</div>
{{/
text
}}
...
...
apps/editorial/views/partial/comment.hbs
View file @
be9328c
...
...
@@ -14,7 +14,7 @@
</div>
<div
class=
"comment-info"
>
<p
class=
"comment-content"
>
{{
content
}}
</p>
<p
class=
"comment-time"
>
{{
createTime
}}
</p>
<p
class=
"comment-time
font
"
>
{{
createTime
}}
</p>
</div>
</li>
{{/
list
}}
...
...
apps/editorial/views/partial/msg.hbs
View file @
be9328c
<div
class=
"content-msg clearfix"
data-id=
"
{{
id
}}
"
>
<div
class=
"msg-left"
><i
class=
"iconfont"
>

</i>
<
b
class=
"time-word"
>
{{
publishTime
}}
</b
></div>
<div
class=
"msg-left"
><i
class=
"iconfont"
>

</i>
<
span
class=
"time-word font"
>
{{
publishTime
}}
</span
></div>
<div
class=
"msg-right"
>
<a
class=
"msg-title"
href=
"/editorial/
{{
id
}}
.html"
target=
"_blank"
>
{{
title
}}
</a>
<a
href=
"/editorial/
{{
id
}}
.html"
target=
"_blank"
>
...
...
@@ -9,7 +9,7 @@
<div
class=
"msg-app"
>
<span
class=
"like-comment"
>
<i
class=
"iconfont like-icon
{{#if
isPraise
}}
liked
{{/if}}
"
>

</i>
<b
class=
"like-num"
>
{{
praiseNum
}}
</b>
<b
class=
"like-num
font
"
>
{{
praiseNum
}}
</b>
</span>
</div>
</div>
...
...
apps/me/models/returns.js
View file @
be9328c
...
...
@@ -730,6 +730,13 @@ const getExchangeDetailData = (id, uid) => {
if
(
result
[
0
]
&&
result
[
0
].
data
)
{
let
data
=
result
[
0
].
data
;
// console.log(data)
_
.
forEach
(
data
.
goods_list
,
function
(
value
)
{
_
.
forEach
(
value
.
evidence_images
,
function
(
list
,
index
)
{
value
.
evidence_images
[
index
]
=
list
.
substring
(
0
,
list
.
indexOf
(
'?'
));
});
});
data
.
expressId
=
data
.
notice
.
express_id
;
if
(
result
[
1
]
&&
result
[
1
].
data
)
{
...
...
apps/me/views/partial/collection/editorial.hbs
View file @
be9328c
...
...
@@ -59,7 +59,7 @@
</div>
{{^}}
<div
class=
"favorite-empty"
>
<p>
您还没有收藏的资讯, 去
<a
href=
"
{{
siteUrl
}}
/editorial"
>
首页
</a>
看看吧
</p>
<p>
您还没有收藏的资讯, 去
<a
href=
"
{{
siteUrl
}}
/editorial"
>
资讯频道
</a>
看看吧
</p>
</div>
{{/if}}
{{/
data
}}
...
...
apps/me/views/partial/exchange-detail.hbs
View file @
be9328c
...
...
@@ -158,7 +158,7 @@
<div
class=
"evidence"
>
{{#
evidenceImages
}}
<a
href=
"
{{
.
}}
"
target=
"_blank"
>
<img
src=
"
{{
image
.
70
90
}}
"
>
<img
src=
"
{{
.
}}
"
>
</a>
{{/
evidenceImages
}}
</div>
...
...
apps/passport/controllers/login.js
View file @
be9328c
...
...
@@ -32,7 +32,7 @@ const _doPassportCallback = (req, res, user) => {
refer
=
!
BlockRedirectFilter
.
test
(
decodeURI
(
refer
))
?
decodeURI
(
refer
)
:
config
.
siteUrl
;
if
(
user
.
openId
&&
user
.
nickname
)
{
if
(
user
.
openId
)
{
let
signinByOpenID
=
LoginService
.
signinByOpenIDAsync
(
_
.
trim
(
user
.
nickname
),
_
.
trim
(
user
.
openId
),
_
.
trim
(
user
.
sourceType
),
_
.
trim
(
shoppingKey
),
...
...
config/common.js
View file @
be9328c
...
...
@@ -30,9 +30,9 @@ module.exports = {
useOneapm
:
false
,
useCache
:
false
,
memcache
:
{
master
:
[
'192.168.102.205:12111'
],
slave
:
[
'192.168.102.205:12111'
],
session
:
[
'192.168.102.205:12111'
],
master
:
[
'127.0.0.1:11211'
],
slave
:
[
'127.0.0.1:11211'
],
session
:
[
'127.0.0.1:11211'
],
timeout
:
1000
,
retries
:
0
},
...
...
public/js/me/return-list.page.js
View file @
be9328c
var
_alert
=
require
(
'../plugins/dialog'
).
Alert
;
var
lazyLoad
=
require
(
'yoho-jquery-lazyload'
);
var
Confirm
=
require
(
'../plugins/dialog'
).
Confirm
;
lazyLoad
(
$
(
'img.banner-img'
));
...
...
@@ -7,24 +8,27 @@ lazyLoad($('img.banner-img'));
require
(
'./me'
);
$
(
'.cancel-apply'
).
on
(
'click'
,
function
()
{
var
id
=
$
(
this
).
data
(
'applyId'
);
var
type
=
$
(
this
).
data
(
'type'
);
var
$this
=
$
(
this
);
$
.
ajax
({
url
:
'/me/return/cancel'
,
method
:
'POST'
,
data
:
{
type
:
type
,
id
:
id
new
Confirm
({
content
:
'<h1 class="title">取消申请</h1><p>您确定要取消申请么?</p>'
,
cb
:
function
()
{
$
.
ajax
({
url
:
'/me/return/cancel'
,
method
:
'POST'
,
data
:
{
type
:
$this
.
data
(
'applyId'
),
id
:
$this
.
data
(
'type'
)
}
}).
done
(
function
(
result
)
{
if
(
result
.
code
===
200
)
{
location
.
reload
();
}
else
{
new
_alert
(
result
.
message
).
show
();
}
}).
fail
(
function
()
{
new
_alert
(
'出错了'
).
show
();
});
}
}).
done
(
function
(
result
)
{
if
(
result
.
code
===
200
)
{
location
.
reload
();
}
else
{
new
_alert
(
result
.
message
).
show
();
}
}).
fail
(
function
(
err
)
{
console
.
log
(
err
);
new
_alert
(
'出错了'
).
show
();
});
}).
show
();
});
...
...
public/scss/editorial/_detail.css
View file @
be9328c
...
...
@@ -3,7 +3,11 @@
.detail-body
{
width
:
990px
;
margin
:
0
auto
;
margin
:
30px
auto
;
}
.font
{
font-family
:
'黑体'
;
}
.detail-title
{
...
...
@@ -81,8 +85,10 @@
}
.article-text
{
p
{
width
:
700px
;
margin
:
25px
auto
;
p
{
text-align
:
center
;
display
:
block
;
width
:
700px
;
...
...
@@ -205,9 +211,8 @@
.brands
{
width
:
960px
;
padding
:
30px
0
30px
30px
;
padding
:
30px
0
0
30px
;
overflow
:
hidden
;
}
.brand
{
...
...
@@ -527,6 +532,12 @@
.share
{
padding-left
:
30px
;
width
:
330px
;
margin-top
:
30px
;
margin-bottom
:
15px
;
.share-title
{
margin-right
:
5px
;
}
}
.hide
{
...
...
public/scss/editorial/_index.css
View file @
be9328c
...
...
@@ -19,6 +19,15 @@
width
:
300px
;
height
:
40px
;
}
.font
{
font-family
:
'黑体'
;
}
.paging
{
margin-top
:
40px
;
margin-bottom
:
80px
;
}
}
@import
"msg"
;
...
...
public/scss/editorial/_msg.css
View file @
be9328c
...
...
@@ -7,7 +7,7 @@
float
:
left
;
width
:
200px
;
height
:
30px
;
margin-right
:
8
0px
;
margin-right
:
9
0px
;
line-height
:
30px
;
text-align
:
center
;
border-bottom
:
1px
solid
#bbb
;
...
...
@@ -56,13 +56,18 @@
font-size
:
14px
;
line-height
:
24px
;
word-wrap
:
break-word
;
margin-top
:
1
0
px
;
margin-top
:
1
5
px
;
overflow
:
hidden
;
word-wrap
:
break-word
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.msg-app
{
height
:
45px
;
line-height
:
45px
;
height
:
50px
;
line-height
:
50px
;
font-size
:
14px
;
}
...
...
public/scss/me/favorite/_product.css
View file @
be9328c
...
...
@@ -109,15 +109,18 @@
.goods-info
:hover
,
.goods-info.choose
{
.choose-icon
{
display
:
block
;
}
.tool-area
{
.btn
{
display
:
inline-block
;
}
}
}
.goods-info.choose
{
.choose-icon
{
display
:
block
;
}
}
}
}
...
...
public/scss/me/order/_table.css
View file @
be9328c
...
...
@@ -150,6 +150,7 @@
.with-bottom-space
{
margin-bottom
:
$
smallSpace
;
line-height
:
20px
;
}
span
{
...
...
@@ -180,6 +181,7 @@
&.last
{
border-bottom
:
none
;
line-height
:
20px
;
}
}
}
...
...
@@ -219,6 +221,7 @@
p
{
margin-bottom
:
$
space
;
line-height
:
20px
;
}
.pay-operation
{
...
...
Please
register
or
login
to post a comment