Authored by wenjiekong

添加userjs

/**
* 个人中心---编辑个人资料
* @author gaohongwei <hongwei.gao@yoho.cn>
* @date: 2016/8/16
*/
'use strict';
const mRoot = '../models';
const user = require(`${mRoot}/user-service`); // user model
/**
* 个人中心
* @param {[type]} req [description]
* @param {[type]} res [description]
* @return {[type]} [description]
*/
exports.index = (req,res,next) => {
let responseData = {
module: 'home',
page: 'user',
footerTop: true
};
return responseData;
}
\ No newline at end of file
... ...
/**
* 个人中心 编辑资料api
* @author: gaohongwei<hongwei.gao@yoho.cn>
* @date: 2016/8/16
*/
const api = global.yoho.API;
const getUserInfo = uid => {
return api.get('', {
method: 'app.passport.profile',
uid: uid
});
};
\ No newline at end of file
... ...
/**
* 个人中心 编辑资料models
* @author: gaohongwei<hongwei.gao@yoho.cn>
* @date: 2016/8/16
*/
'use strict';
const Promise = require('bluebird');
const co = Promise.coroutine;
const userApi = require('./user-api');
const getUserInfo = uid => {
return co(function *() {
let result = {};
let userInfo = userApi.getUserInfo(uid);
})();
};
\ No newline at end of file
... ...
... ... @@ -23,6 +23,7 @@ const RedenvelopesController=require(`${cRoot}/Redenvelopes`);
const VipController=require(`${cRoot}/vip`);
const FavoriteController=require(`${cRoot}/Favorite`);
const CouponsController=require(`${cRoot}/coupons`);
const UserController = require(`${cRoot}/user`);
const homeNav = [
{
... ... @@ -142,6 +143,8 @@ router.get('/redenvelopes',RedenvelopesController.index);
/*我的VIP*/
router.get('/vip',VipController.index);
router.get('/user',UserController.index);
router.get('/favorite',FavoriteController.index);
router.get('/coupons',CouponsController.index);
... ...
... ... @@ -261,6 +261,7 @@
@import "my-vip";
@import "coupons";
@import "favorite";
@import "user-info";
/*
@import "user-info";
... ...
... ... @@ -27,7 +27,7 @@
display: none;
}
h2.title {
background-image:resolve(/home/edit/title-informations.png);
background-image:resolve(home/edit/title-informations.png);
}
}
... ... @@ -84,7 +84,7 @@
.title h2{
width: 66px;
height: 16px;
background: resolve(/home/edit/title-address.png) no-repeat;
background: resolve(home/edit/title-address.png) no-repeat;
text-indent: -999em;
float: left;
position: absolute;
... ... @@ -131,14 +131,14 @@
.btn-c3 {
height: 22px;
background: resolve(/home/edit/btn_hs.png) no-repeat left -66px;
background: resolve(home/edit/btn_hs.png) no-repeat left -66px;
padding-left: 8px;
display: inline-block;
span {
height: 22px;
line-height: 21px;
background: resolve(/home/edit/btn_hs.png) no-repeat right -66px;
background: resolve(home/edit/btn_hs.png) no-repeat right -66px;
padding-right: 10px;
display: inline-block;
cursor: pointer;
... ... @@ -148,7 +148,7 @@
.btn-c2 {
height: 22px;
background: resolve(/home/edit/btn_hs.png) no-repeat left -44px;
background: resolve(home/edit/btn_hs.png) no-repeat left -44px;
padding-left: 8px;
display: inline-block;
}
... ... @@ -156,7 +156,7 @@
.btn-c2 span {
height: 22px;
line-height: 21px;
background: resolve(/home/edit/btn_hs.png) no-repeat right -44px;
background: resolve(home/edit/btn_hs.png) no-repeat right -44px;
padding-right: 10px;
display: inline-block;
cursor: pointer;
... ... @@ -236,7 +236,7 @@
line-height: 20px;
color: #333;
border: 1px #c9c9c9 solid;
background: resolve(/home/edit/input_1.png) repeat-x #fff;
background: resolve(home/edit/input_1.png) repeat-x #fff;
vertical-align: top;
}
... ... @@ -244,7 +244,7 @@
width: 118px;
height: 34px;
border: 0px;
background: resolve(/home/edit/btn_b1.png) no-repeat;
background: resolve(home/edit/btn_b1.png) no-repeat;
color: #fff;
font-size: 14px;
font-weight: bold;
... ... @@ -278,7 +278,7 @@
height: 21px;
line-height: 21px;
padding-left: 23px;
background: resolve(/home/edit/ico_arrow2.png) no-repeat 5px 5px #efefef;
background: resolve(home/edit/ico_arrow2.png) no-repeat 5px 5px #efefef;
border: 1px #e6e6e6 solid;
font-size: 12px;
color: #333;
... ... @@ -294,7 +294,7 @@
.btn-edit {
width: 37px;
height: 17px;
background: resolve(/home/edit/btn_edit.png) no-repeat;
background: resolve(home/edit/btn_edit.png) no-repeat;
display: inline-block;
overflow: hidden;
border: 0px;
... ... @@ -364,7 +364,7 @@
line-height: 20px;
border: 0px;
padding-left: 18px;
background: resolve(/home/edit/ico_del.png) no-repeat 0px 2px;
background: resolve(home/edit/ico_del.png) no-repeat 0px 2px;
color: #468fa2;
display: inline-block;
overflow: hidden;
... ... @@ -381,7 +381,7 @@
line-height: 20px;
padding: 0px;
margin: 0px;
background: resolve(/home/edit/btn_s1_z2.png) repeat-x;
background: resolve(home/edit/btn_s1_z2.png) repeat-x;
text-align: center;
display: inline-block;
cursor: pointer;
... ... @@ -459,10 +459,10 @@
}
.icon-ok {
background: resolve(/home/edit/icon-32.png) no-repeat 0 0;
background: resolve(home/edit/icon-32.png) no-repeat 0 0;
}
.icon-warning {
background: resolve(/home/edit/icon-32.png) no-repeat 0 -32px;
background: resolve(home/edit/icon-32.png) no-repeat 0 -32px;
}
.account-type {
... ... @@ -475,14 +475,14 @@
.button-icon20 {
padding-left: 5px;
background: resolve(/home/edit/btn_bg_20.png) no-repeat left 0px;
background: resolve(home/edit/btn_bg_20.png) no-repeat left 0px;
display: inline-block;
cursor: pointer;
}
.button-icon20 i {
font-style: normal;
background: resolve(/home/edit/btn_bg_20.png) repeat-x left -20px;
background: resolve(home/edit/btn_bg_20.png) repeat-x left -20px;
display: inline-block;
height: 20px;
line-height: 20px;
... ... @@ -494,7 +494,7 @@
width: 52px;
}
.button-icon20 span {
background: resolve(/home/edit/btn_bg_20.png) no-repeat right -40px;
background: resolve(home/edit/btn_bg_20.png) no-repeat right -40px;
display: inline-block;
padding-right: 5px;
}
... ... @@ -528,7 +528,7 @@
line-height: 20px;
color: #333;
border: 1px #c9c9c9 solid;
background: resolve(/home/edit/input_1.png) repeat-x #fff;
background: resolve(home/edit/input_1.png) repeat-x #fff;
}
.gift-error {
... ... @@ -554,7 +554,7 @@
}
.form-error {
background: resolve(/home/onError.png) no-repeat 5px 9px #fff2e8;
background: resolve(home/onError.png) no-repeat 5px 9px #fff2e8;
padding-left: 25px;
padding-right: 5px;
font-size: 12px;
... ... @@ -566,7 +566,7 @@
}
.form-success {
background: resolve(/home/onCorrect.png) no-repeat 5px 9px #E9FFEB;
background: resolve(home/onCorrect.png) no-repeat 5px 9px #E9FFEB;
padding-left: 25px;
padding-right: 5px;
font-size: 12px;
... ... @@ -578,7 +578,7 @@
}
.form-prompt,.form-focus {
background: resolve(/home/onShow.png) no-repeat 5px 9px;
background: resolve(home/onShow.png) no-repeat 5px 9px;
padding-left: 25px;
font-size: 12px;
line-height: 30px;
... ... @@ -588,7 +588,7 @@
}
.form-focus {
background: resolve(/home/onShow.png) no-repeat 5px 9px #E9F0FF;
background: resolve(home/onShow.png) no-repeat 5px 9px #E9F0FF;
color: #666;
}
... ... @@ -602,7 +602,7 @@
line-height: 21px;
padding-left: 23px;
margin-left: 10px;
background: resolve(/home/edit/ico_arrow2.png) no-repeat 5px 5px #efefef;
background: resolve(home/edit/ico_arrow2.png) no-repeat 5px 5px #efefef;
border: 1px #e6e6e6 solid;
font-size: 12px;
color: #333;
... ... @@ -640,7 +640,7 @@
line-height: 25px;
padding-left: 25px;
color: #000;
background: resolve(/home/edit/ico_i_sf.png) no-repeat;
background: resolve(home/edit/ico_i_sf.png) no-repeat;
}
.fail {
... ... @@ -689,7 +689,7 @@
overflow: hidden;
.form-success {
background: resolve(/home/onCorrect.png) no-repeat 5px 9px;
background: resolve(home/onCorrect.png) no-repeat 5px 9px;
}
.progress-bar {
... ... @@ -711,15 +711,15 @@
}
.progress1 {
background: resolve(/home/edit/icon-bar.png) no-repeat;
background: resolve(home/edit/icon-bar.png) no-repeat;
}
.progress2 {
background: resolve(/home/edit/icon-bar.png) no-repeat 0 -24px;
background: resolve(home/edit/icon-bar.png) no-repeat 0 -24px;
}
.progress3 {
background: resolve(/home/edit/icon-bar.png) no-repeat 0 -48px;
background: resolve(home/edit/icon-bar.png) no-repeat 0 -48px;
}
input[type=text],input[type=password] {
... ... @@ -808,7 +808,7 @@
dt {
height: 20px;
line-height: 20px;
background: resolve(/home/suggest-icon.png) no-repeat 2px 3px;
background: resolve(home/suggest-icon.png) no-repeat 2px 3px;
padding: 0px 0px 0px 20px;
float: left;
font-family: arial,"Microsoft YaHei";
... ... @@ -831,7 +831,7 @@
line-height: 21px;
border: 0px;
text-align: center;
background: resolve(/home/btn_top.png) no-repeat;
background: resolve(home/btn_top.png) no-repeat;
color: #666;
font-size: 12px;
cursor: pointer;
... ... @@ -934,10 +934,10 @@
}
.res-success {
background: resolve(/home/icon-24.png) no-repeat;
background: resolve(home/icon-24.png) no-repeat;
}
.res-error {
background: resolve(/home/icon-24.png) no-repeat 0 -24px;
background: resolve(home/icon-24.png) no-repeat 0 -24px;
color: red;
}
}
... ...