Update
This commit is contained in:
parent
9fd5ec60d7
commit
ccf4bdcb84
|
|
@ -8,13 +8,26 @@ app.controller('adviceCtr', ['$scope', '$state', '$timeout', 'bookmarkService',
|
|||
|
||||
$scope.comment = '';
|
||||
$scope.advices = [];
|
||||
$scope.category = ["功能", "BUG", "其他"]
|
||||
$scope.category = ["功能", "BUG", "其他"];
|
||||
$scope.user = {};
|
||||
|
||||
bookmarkService.userInfo({})
|
||||
.then((data) => {
|
||||
$scope.user = data;
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
});
|
||||
|
||||
$scope.ok = function() {
|
||||
if ($scope.comment == '') {
|
||||
toastr.error('留言失败内容不能为空', "错误");
|
||||
return;
|
||||
}
|
||||
if ($scope.user.username == 'test') {
|
||||
toastr.error('test用户不允许留言!', "错误");
|
||||
return;
|
||||
}
|
||||
var advice = {
|
||||
category: $('.ui.dropdown.js-categorys').dropdown('get value'),
|
||||
comment: $scope.comment,
|
||||
|
|
|
|||
Loading…
Reference in New Issue