Skip to content

Commit

Permalink
优化用户目录
Browse files Browse the repository at this point in the history
  • Loading branch information
wjszxli committed Jan 6, 2017
1 parent 460b3ef commit e813f0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion public/javascripts/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ var searchDatas = new Vue({
}
}
Vue.http.post('users/remove', delDatas).then(function (response) {
showTip('删除成功');
showTip(response);
console.log(response);
usersDatas.showDatas(1);
}).catch(function (response) {
showTip(response);
Expand Down
4 changes: 2 additions & 2 deletions routes/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,18 @@ router.post('/:status', function (req, res, next) {
*/
router.post('/remove', function (req, res, next) {
var delDatas = req.body;
console.log('hello');
console.log(delDatas+'wjszxli');
if (delDatas != '' && delDatas != 'null' && delDatas != 'undefined' && delDatas.length > 0) {
objWhere = {id: delDatas};
}
var objCondition = {
where: objWhere
}
console.log(delDatas);
users.deleteDatas(objCondition).then(function (result) {
res.send(result + '');
}).catch(function (e) {
res.send(error);
res.send(e);
});
});
router.get('/:id/edit', function (req, res, next) {
Expand Down

0 comments on commit e813f0e

Please sign in to comment.