添加书签的分类按照最新显示
This commit is contained in:
parent
6967bcee7a
commit
c4dba3cb18
|
|
@ -225,6 +225,10 @@ module.exports = class extends Base {
|
|||
}
|
||||
}
|
||||
let data = await this.model("bookmarks").add(bookmark);
|
||||
await this.model('tags').where({
|
||||
userId: this.ctx.state.user.id,
|
||||
id: bookmark.tagId
|
||||
}).update({ lastUse: think.datetime(new Date()) });
|
||||
this.json({ code: 0, data, msg: `书签 ${bookmark.title} 添加成功` });
|
||||
} catch (error) {
|
||||
this.json({ code: 1, data: '', msg: error.toString() });
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', '$document', 'ngDialo
|
|||
}
|
||||
|
||||
$scope.showAddTag = function () {
|
||||
if ($scope.tags.length < 30) {
|
||||
if ($scope.tags.length < 50) {
|
||||
console.log('showAddTag..........')
|
||||
$scope.newTag = "";
|
||||
dialog = ngDialog.open({
|
||||
|
|
@ -114,14 +114,14 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', '$document', 'ngDialo
|
|||
scope: $scope
|
||||
});
|
||||
} else {
|
||||
toastr.error('标签个数总数不能超过30个!不允许再添加新分类,如有需求,请联系管理员。', "提示");
|
||||
toastr.error('标签个数总数不能超过50个!不允许再添加新分类,如有需求,请联系管理员。', "提示");
|
||||
}
|
||||
}
|
||||
|
||||
$scope.addTag = async function (tag) {
|
||||
console.log(tag);
|
||||
if ($scope.tags.length >= 30) {
|
||||
toastr.error('标签个数总数不能超过30个!不允许再添加新分类,如有需求,请联系管理员。', "提示");
|
||||
if ($scope.tags.length >= 50) {
|
||||
toastr.error('标签个数总数不能超过50个!不允许再添加新分类,如有需求,请联系管理员。', "提示");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ app.controller('tagsCtr', ['$scope', '$filter', '$state', '$window', '$statePara
|
|||
|
||||
$scope.addTag = async function (tag) {
|
||||
console.log(tag);
|
||||
if ($scope.tags.length >= 30) {
|
||||
if ($scope.tags.length >= 50) {
|
||||
toastr.error('标签个数总数不能超过30个!不允许再添加新分类,如有需求,请联系管理员。', "提示");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue