...
|
...
|
@@ -75,8 +75,6 @@ const _getTitle = (type)=> { |
|
|
const index = (req, res, next) => {
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
// let uid = req.user.uid || "20000190";
|
|
|
|
|
|
settingModel.getUserInfo(uid).then(result=> {
|
|
|
result.info.gender ? result.genders[result.info.gender - 1].checked = true :
|
|
|
result.genders[2].checked = true;
|
...
|
...
|
@@ -107,8 +105,6 @@ const index = (req, res, next) => { |
|
|
*/
|
|
|
const editUserInfo = (req, res)=> {
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
// let uid = req.user.uid || "20000190";
|
|
|
let query = req.body;
|
|
|
|
|
|
settingModel.editUserInfo(uid, query).then(result=> {
|
...
|
...
|
@@ -122,8 +118,6 @@ const editUserInfo = (req, res)=> { |
|
|
* */
|
|
|
const bindMobile = (req, res, next) => {
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
// let uid = req.user.uid || "20000190";
|
|
|
let type = req.params.type;
|
|
|
|
|
|
settingModel.getUserInfo(uid).then(result=> {
|
...
|
...
|
@@ -133,7 +127,6 @@ const bindMobile = (req, res, next) => { |
|
|
info.ellipsisMobile = info.verify_mobile.substring(0, 3) + '****' + info.verify_mobile.substring(7, 11);
|
|
|
info.checkCode = settingModel.cipheriv(info.uid + '.completeverify');
|
|
|
|
|
|
// info.checkCode = settingModel.cipheriv("20000190" + ".completeverify");
|
|
|
res.display('index', {
|
|
|
module: 'me',
|
|
|
page: 'setting',
|
...
|
...
|
@@ -159,8 +152,6 @@ const bindMobile = (req, res, next) => { |
|
|
|
|
|
const bindEmail = (req, res, next) => {
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
// let uid = req.user.uid || "20000190";
|
|
|
let type = req.params.type;
|
|
|
|
|
|
settingModel.getUserInfo(uid).then(result=> {
|
...
|
...
|
@@ -169,8 +160,6 @@ const bindEmail = (req, res, next) => { |
|
|
|
|
|
info.ellipsisEmail = info.verify_email.substring(0, 3) + '****' + info.verify_email.substring(7, 11);
|
|
|
info.checkCode = settingModel.cipheriv(info.uid + '.completeverify');
|
|
|
|
|
|
// info.checkCode = settingModel.cipheriv("20000190" + ".completeverify");
|
|
|
res.display('index', {
|
|
|
module: 'me',
|
|
|
page: 'setting',
|
...
|
...
|
@@ -194,10 +183,8 @@ const bindEmail = (req, res, next) => { |
|
|
|
|
|
const modifyPassword = (req, res) => {
|
|
|
let type = req.params.type;
|
|
|
|
|
|
let checkCode = settingModel.cipheriv(req.user.uid + '.completeverify');
|
|
|
|
|
|
// let checkCode = settingModel.cipheriv("20000190" + ".completeverify");
|
|
|
res.display('index', {
|
|
|
module: 'me',
|
|
|
page: 'setting',
|
...
|
...
|
@@ -225,7 +212,6 @@ const edit = (req, res)=> { |
|
|
let codes = code.split('.');
|
|
|
|
|
|
if (parseInt(codes[0], 10) === req.user.uid && codes[1] === 'completeverify') {
|
|
|
// if (codes[0] === "20000190" && codes[1] === "completeverify") {
|
|
|
let result = {
|
|
|
title: _getTitle(type).typeName,
|
|
|
proTitle: _getTitle(type).proName,
|
...
|
...
|
@@ -233,10 +219,8 @@ const edit = (req, res)=> { |
|
|
isShowEmail: _getTitle(type).isModifyEmail || _getTitle(type).isBindEmail,
|
|
|
isShowPassword: _getTitle(type).isShowPassword
|
|
|
};
|
|
|
|
|
|
let checkCode = settingModel.cipheriv(req.user.uid + '.completeoperate');
|
|
|
|
|
|
// let checkCode = settingModel.cipheriv("20000190"+ ".completeoperate");
|
|
|
res.display('index', {
|
|
|
module: 'me',
|
|
|
page: 'setting',
|
...
|
...
|
@@ -267,7 +251,6 @@ const success = (req, res)=> { |
|
|
let codes = code.split('.');
|
|
|
|
|
|
if (parseInt(codes[0], 10) === req.user.uid && codes[1] === 'completeoperate') {
|
|
|
// if (codes[0] === "20000190" && codes[1] === "completeoperate") {
|
|
|
let result = {
|
|
|
title: _getTitle(type).typeName,
|
|
|
proTitle: _getTitle(type).proName,
|
...
|
...
|
@@ -302,8 +285,6 @@ const success = (req, res)=> { |
|
|
const validate1 = (req, res)=> {
|
|
|
co(function *() {
|
|
|
let type = req.params.type;
|
|
|
|
|
|
// let uid = req.user.uid || "20000190";
|
|
|
let uid = req.user.uid;
|
|
|
let body = req.body;
|
|
|
|
...
|
...
|
@@ -330,8 +311,6 @@ const validate2 = (req, res)=> { |
|
|
co(function *() {
|
|
|
let type = req.params.type;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
// let uid = req.user.uid || "20000190";
|
|
|
let body = req.body;
|
|
|
|
|
|
if (type === 'password') {
|
...
|
...
|
|