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
Email Patches
Plain Diff
Browse Files
Authored by
zhangxiaoru
9 years ago
Commit
bb484893e87b4ed1c192731e46a6b6c54ba100da
1 parent
6ad96df8
bug
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
119 additions
and
99 deletions
apps/editorial/models/editorial.js
apps/me/controllers/favorite.js
apps/me/controllers/setting.js
apps/me/models/returns.js
apps/me/views/partial/exchange-detail.hbs
apps/me/views/partial/setting/content.hbs
public/js/me/favorite.page.js
public/js/me/setting.page.js
apps/editorial/models/editorial.js
View file @
bb48489
...
...
@@ -225,11 +225,10 @@ const _getRelatedData = (idList) => {
productList
.
push
({
name
:
data
.
product_name
,
price
:
data
.
sales_price
,
i
d
:
data
.
product_id
,
productI
d
:
data
.
product_id
,
cnAlphabet
:
data
.
cn_alphabet
});
});
console
.
log
(
productList
);
return
productList
;
}
else
{
logger
.
error
(
'推荐商品 cood 不是 200'
);
...
...
@@ -246,7 +245,6 @@ const _getRelatedData = (idList) => {
const
_processContentData
=
(
list
)
=>
{
list
=
list
||
[];
list
=
camelCase
(
list
);
console
.
log
(
list
);
let
contentData
=
{
contents
:
[]
...
...
@@ -282,7 +280,6 @@ const _processContentData = (list) => {
if
(
value
.
goods
)
{
_
.
forEach
(
value
.
goods
.
data
,
function
(
data
)
{
console
.
log
(
data
);
idList
+=
data
.
id
+
','
;
related
.
relatedReco
.
push
(
data
);
...
...
@@ -305,15 +302,19 @@ const _processContentData = (list) => {
}
});
_getRelatedData
(
idList
).
then
((
result
)
=>
{
return
_getRelatedData
(
idList
).
then
((
result
)
=>
{
if
(
related
.
relatedReco
)
{
_
.
forEach
(
related
.
relatedReco
,
function
(
data
,
index
)
{
data
=
_
.
assign
(
data
,
{
// link: `${config.siteUrl}/product/list/pro_${result[index].id}_data.${data.productSkc}`
});
data
=
_
.
assign
(
data
,
result
[
index
]);
if
(
result
[
index
])
{
data
=
_
.
assign
(
data
,
{
// link: `${config.siteUrl}/product/list/pro_${result[index].productId}_${data.productSkc}/${result[index].cnAlphabet}.html`,
link
:
config
.
siteUrl
+
'/product/list/pro_'
+
result
[
index
].
productId
+
'_'
+
data
.
productSkc
+
'/'
+
result
[
index
].
cnAlphabet
+
'.html'
});
data
=
_
.
assign
(
data
,
result
[
index
]);
}
});
result
.
splice
(
0
,
recoLength
.
length
);
}
...
...
@@ -335,8 +336,6 @@ const _processContentData = (list) => {
return
contentData
;
});
return
contentData
;
};
/**
...
...
@@ -459,7 +458,7 @@ const _getArticlePre = (id, appType) => {
id
:
id
,
app_type
:
appType
}).
then
((
result
)
=>
{
console
.
log
(
result
);
if
(
result
&&
result
.
code
===
200
)
{
let
perArticle
=
{};
...
...
apps/me/controllers/favorite.js
View file @
bb48489
...
...
@@ -87,7 +87,6 @@ const favorite = {
ret
.
content
.
favorite
.
data
=
retData
;
ret
.
content
.
banner
=
thumb
;
console
.
log
(
retData
);
}
res
.
display
(
'index'
,
ret
);
...
...
apps/me/controllers/setting.js
View file @
bb48489
...
...
@@ -148,28 +148,30 @@ const bindMobile = (req, res, next) => {
settingModel
.
getUserInfo
(
uid
).
then
(
result
=>
{
if
(
result
.
info
.
verify_mobile
!==
''
)
{
let
info
=
result
.
info
;
info
.
ellipsisMobile
=
info
.
verify_mobile
.
replace
(
regMobile
,
'$1****$2'
);
info
.
checkCode
=
settingModel
.
cipheriv
(
info
.
uid
+
'.completeverify'
);
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
{
region
:
passportHelper
.
getCountry
(),
location
:
'+86'
,
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
'http://placehold.it/150x120'
,
validateStep
:
true
,
title
:
_getTitle
(
type
).
typeName
,
proTitle
:
_getTitle
(
type
).
proName
,
captchaUrl
:
captchaUrl
,
isShowMobile
:
true
,
data
:
info
}
mcHandler
.
getMeThumb
().
then
((
thumb
)
=>
{
let
info
=
result
.
info
;
info
.
ellipsisMobile
=
info
.
verify_mobile
.
replace
(
regMobile
,
'$1****$2'
);
info
.
checkCode
=
settingModel
.
cipheriv
(
info
.
uid
+
'.completeverify'
);
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
{
region
:
passportHelper
.
getCountry
(),
location
:
'+86'
,
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
thumb
,
validateStep
:
true
,
title
:
_getTitle
(
type
).
typeName
,
proTitle
:
_getTitle
(
type
).
proName
,
captchaUrl
:
captchaUrl
,
isShowMobile
:
true
,
data
:
info
}
});
});
}
next
();
...
...
@@ -189,21 +191,24 @@ const bindEmail = (req, res, next) => {
info
.
ellipsisEmail
=
info
.
verify_email
.
replace
(
regEmail
,
'$1****'
);
info
.
checkCode
=
settingModel
.
cipheriv
(
info
.
uid
+
'.completeverify'
);
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
{
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
'http://placehold.it/150x120'
,
validateStep
:
true
,
title
:
_getTitle
(
type
).
typeName
,
proTitle
:
_getTitle
(
type
).
proName
,
captchaUrl
:
captchaUrl
,
isShowEmail
:
true
,
data
:
info
}
mcHandler
.
getMeThumb
().
then
((
thumb
)
=>
{
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
{
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
thumb
,
validateStep
:
true
,
title
:
_getTitle
(
type
).
typeName
,
proTitle
:
_getTitle
(
type
).
proName
,
captchaUrl
:
captchaUrl
,
isShowEmail
:
true
,
data
:
info
}
});
});
}
next
();
...
...
@@ -217,21 +222,23 @@ const modifyPassword = (req, res) => {
let
type
=
req
.
params
.
type
;
let
checkCode
=
settingModel
.
cipheriv
(
req
.
user
.
uid
+
'.completeverify'
);
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
{
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
'http://placehold.it/150x120'
,
validateStep
:
true
,
title
:
_getTitle
(
type
).
typeName
,
proTitle
:
_getTitle
(
type
).
proName
,
captchaUrl
:
captchaUrl
,
isShowPassword
:
true
,
checkCode
:
checkCode
}
mcHandler
.
getMeThumb
().
then
((
thumb
)
=>
{
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
{
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
thumb
,
validateStep
:
true
,
title
:
_getTitle
(
type
).
typeName
,
proTitle
:
_getTitle
(
type
).
proName
,
captchaUrl
:
captchaUrl
,
isShowPassword
:
true
,
checkCode
:
checkCode
}
});
});
};
...
...
@@ -253,25 +260,26 @@ const edit = (req, res)=> {
};
let
checkCode
=
settingModel
.
cipheriv
(
req
.
user
.
uid
+
'.completeoperate'
);
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
Object
.
assign
({
region
:
passportHelper
.
getCountry
(),
location
:
'+86'
,
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
'http://placehold.it/150x120'
,
operateStep
:
true
,
stepUrl
:
'/me/setting/step3/'
+
type
,
captchaUrl
:
captchaUrl
,
checkCode
:
checkCode
},
result
)
mcHandler
.
getMeThumb
().
then
((
thumb
)
=>
{
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
Object
.
assign
({
region
:
passportHelper
.
getCountry
(),
location
:
'+86'
,
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
thumb
,
operateStep
:
true
,
stepUrl
:
'/me/setting/step3/'
+
type
,
captchaUrl
:
captchaUrl
,
checkCode
:
checkCode
},
result
)
});
});
}
}
};
/*
...
...
@@ -293,19 +301,21 @@ const success = (req, res)=> {
isShowPassword
:
_getTitle
(
type
).
isShowPassword
};
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
Object
.
assign
({
region
:
passportHelper
.
getCountry
(),
location
:
'+86'
,
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
'http://placehold.it/150x120'
,
successStep
:
true
,
captchaUrl
:
captchaUrl
},
result
)
mcHandler
.
getMeThumb
().
then
((
thumb
)
=>
{
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'setting'
,
isMe
:
true
,
content
:
Object
.
assign
({
region
:
passportHelper
.
getCountry
(),
location
:
'+86'
,
nav
:
mcHandler
.
getMeCrumb
(
'个人设置'
),
navigation
:
mcHandler
.
getSideMenu
(
'个人设置'
),
banner
:
thumb
,
successStep
:
true
,
captchaUrl
:
captchaUrl
},
result
)
});
});
}
...
...
apps/me/models/returns.js
View file @
bb48489
...
...
@@ -602,6 +602,8 @@ const _setExchangeDetailData = (data) => {
sendBack
:
true
,
cancel
:
true
,
location
:
true
// takeGoods: true
});
}
else
{
Object
.
assign
(
list
,
{
...
...
apps/me/views/partial/exchange-detail.hbs
View file @
bb48489
...
...
@@ -69,7 +69,7 @@
<div
class=
"show-content"
data-id=
"
{{
id
}}
"
>
<h4
class=
"third-title"
>
寄回物流信息
<label
class=
"reset-express btn white"
>
修改
</label></h4>
<p>
请您耐心等待,我们会在收到货物后快速为您处理
</p>
<p>
物流公司:
{{
expressCompany
}}
</p>
<p>
物流公司:
{{
expressCompany
}}
</p>
<p>
快递单号:
{{
expressNumber
}}
</p>
</div>
{{/if}}
...
...
apps/me/views/partial/setting/content.hbs
View file @
bb48489
...
...
@@ -45,10 +45,10 @@
<label
class=
"label-name"
>
邮箱:
</label>
{{#if
info
.
verify_email
}}
<input
class=
"input no-edit"
value=
"
{{
info
.
mobile
}}
"
>
<!--<a class="blue operation" href="
{{
stepUrl
}}
/modifyEmail">修改</a>-->
{{!-- <a class="blue operation" href="{{stepUrl}}/modifyEmail">修改</a> --}}
{{else}}
<input
class=
"input"
type=
"text"
placeholder=
"请绑定邮箱"
disabled
>
<!--<a class="blue operation" href="
{{
stepUrl
}}
/bindEmail">绑定</a>-->
{{!-- <a class="blue operation" href="{{stepUrl}}/bindEmail">立即绑定</a> --}}
{{/if}}
</div>
<div
class=
"form-group"
>
...
...
public/js/me/favorite.page.js
View file @
bb48489
...
...
@@ -34,6 +34,15 @@ function eventBind() {
}
});
$
(
'.goods-img'
,
$root
).
click
(
function
()
{
if
(
$
(
this
).
parent
(
'.goods-info'
,
$root
).
hasClass
(
'choose'
))
{
$
(
this
).
parent
(
'.goods-info'
,
$root
).
removeClass
(
'choose'
);
}
else
{
$
(
this
).
parent
(
'.goods-info'
,
$root
).
addClass
(
'choose'
);
}
});
$
(
'.btn.cancel'
,
$root
).
click
(
function
()
{
var
id
=
$
(
this
).
parents
(
'.goods-info'
).
data
(
'id'
);
...
...
public/js/me/setting.page.js
View file @
bb48489
...
...
@@ -112,6 +112,7 @@ window.receive_image_bytes = function(obj) {
if
(
result
.
code
===
200
)
{
tip
.
close
();
$
(
'.show-ico img'
).
attr
(
'src'
,
result
.
data
.
image_url
.
split
(
'?'
)[
0
]);
location
.
reload
();
}
else
{
tip
.
close
();
new
_alert
(
'头像修改失败!'
).
show
();
...
...
Please
register
or
login
to post a comment