Authored by OF1706

Merge branch 'feature/3partyBind' of http://git.yoho.cn/fe/yohobuy-node into feature/3partyBind

... ... @@ -16,10 +16,8 @@ const helpers = global.yoho.helpers;
* @return {[type]} [description]
*/
exports.index = (req, res, next) => {
// if (!req.user.uid) {
// res.redirect(helpers.urlFormat('/signin.html'));
// }
let uid = '20001048';
let uid = req.user.uid;
let responseData = {
module: 'home',
... ... @@ -42,9 +40,6 @@ exports.index = (req, res, next) => {
*/
exports.editUserInfo = (req, res, next) => {
if (!req.user.uid) {
res.redirect(helpers.urlFormat('/signin.html'));
}
let uid = req.user.uid;
// 真实数据输出
... ... @@ -62,9 +57,6 @@ exports.editUserInfo = (req, res, next) => {
*/
exports.editUserContactInfo = (req, res, next) => {
if (!req.user.uid) {
res.redirect(helpers.urlFormat('/signin.html'));
}
let uid = req.user.uid;
// 真实数据输出
... ... @@ -81,9 +73,7 @@ exports.editUserContactInfo = (req, res, next) => {
* @return {[type]} [description]
*/
exports.editUserHabitsInfo = (req, res, next) => {
if (!req.user.uid) {
res.redirect(helpers.urlFormat('/signin.html'));
}
let uid = req.user.uid;
// 真实数据输出
... ... @@ -101,9 +91,7 @@ exports.editUserHabitsInfo = (req, res, next) => {
* @return {[type]} [description]
*/
exports.editUserLikeBrand = (req, res, next) => {
if (!req.user.uid) {
res.redirect(helpers.urlFormat('/signin.html'));
}
let uid = req.user.uid;
// 真实数据输出
... ...
... ... @@ -135,6 +135,13 @@ const exchangeGift = (params, uid) => {
});
};
const get3partyBindInfo = (uid) => {
return api.get('', {
method: '',
uid: uid
});
};
module.exports = {
getUserInfo,
editUserInfo,
... ... @@ -147,5 +154,6 @@ module.exports = {
editUserLikeBrand,
getTipConfig,
getUserInfoByMobile,
exchangeGift
exchangeGift,
get3partyBindInfo
};
... ...
... ... @@ -275,7 +275,8 @@ const getUserInfo = (uid) => {
userApi.getUserContactInfo(uid),
userApi.getUserHabitsInfo(uid),
userApi.getUserLikeBrand(uid),
searchApi.get('/brand/list.json', {}, {cache: true})
searchApi.get('/brand/list.json', {}, {cache: true}),
userApi.get3partyBindInfo(uid)
]);
let finalResult = {},
... ... @@ -482,7 +483,7 @@ const getUserInfo = (uid) => {
};
}
console.log(JSON.stringify(result[3]));
if (result[3].code === 200) {
let habitsInfo = result[3].data || '',
dressHabitArr,
... ...
... ... @@ -7,6 +7,7 @@
<h2 class="title"></h2>
<div class="edit-box">
{{> home/edit/basicinfo}}
{{> home/edit/3partybind}}
{{> home/edit/contactinfo}}
{{> home/edit/habbit}}
{{> home/edit/favorite}}
... ... @@ -19,4 +20,4 @@
{{/if}}
</div>
{{/ user}}
</div>
\ No newline at end of file
</div>
... ...
<div class="user-habbit-info">
<h2 class="sub-title">
<div class="more"><a class="btn-edit" title="修改"></a></div>
{{subTitle}}
</h2>
<div class="account-list">
<div class="account-item">
<div class="account-item-title">
<p>绑定QQ账号:<b>raining</b></p>
<a>收起</a>
</div>
<div class="account-item-body">
<div class="account-body-left">
<p>解绑后,账号仍可正常使用</p>
<button>解除绑定</button>
</div>
<div class="account-body-right">
<img class="logo-yh" src="../img/new/yoho.png"/>
<img class="img-contact" src="../img/new/img-contact.png"/>
<img class="logo-contact" src="../img/new/tengxun.png"/>
</div>
</div>
</div>
<div class="account-item">
<div class="account-item-title">
<p>绑定QQ账号:<b>raining</b></p>
<a>收起</a>
</div>
<div class="account-item-body">
<div class="account-body-left">
<p>解绑后,账号仍可正常使用</p>
<button>解除绑定</button>
</div>
<div class="account-body-right">
<img class="logo-yh" src="../img/new/yoho.png"/>
<img class="img-contact" src="../img/new/img-contact.png"/>
<img class="logo-contact" src="../img/new/tengxun.png"/>
</div>
</div>
</div>
</div>
</div>
... ...
... ... @@ -969,3 +969,114 @@
color: red;
}
}
.account-list{
margin-left: 35px;
margin-right: 20px;
.account-item{
border: 2px solid #bdbdbd;
margin-bottom: 5px;
.account-item-title{
padding-left: 10px;
padding-right: 10px;
height: 38px;
line-height: 38px;
border-bottom: 1px dashed #eaeaea;
&:after{
content: '';
display: block;
clear: both;
}
p{
float:left;
font-size: 14px;
color: #000;
b{
color: #7bbd55;
margin-left: 10px;
font-weight: normal;
}
}
a{
float: right;
color: #468fa2;
font-size: 14px;
}
}
.account-item-body{
padding: 45px 35px 40px;
&:after{
content: '';
display: block;
clear: both;
}
}
.account-body-left{
float: left;
p{
color: #000;
font-size: 16px;
}
button{
margin-top: 22px;
background-color: #2e849c;
font-size: 14px;
color: #fff;
border: none;
width: 80px;
height: 25px;
border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
}
}
.account-body-right{
position: relative;
float: right;
width: 290px;
height: 55px;
.logo-yh{
position: absolute;
top: 19px;
left: 0;
width: 115px;
height: 27px;
background-size: 100%;
}
.logo-contact{
position: absolute;
top: 0;
left: initial;
right: 0;
width: 105px;
height: 55px;
background-size: 100%;
}
.img-contact{
position: absolute;
top: 18px;
left: 130px;
display: inline-block;
width: 37px;
height: 20px;
background-size: 100%;
}
}
}
}
... ...