Update articles.vue
This commit is contained in:
parent
55de0b557a
commit
c61b7cea5d
@ -157,12 +157,16 @@ export default {
|
|||||||
idArticle: idArticle,
|
idArticle: idArticle,
|
||||||
articlePerfect: '1'
|
articlePerfect: '1'
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
_ts.$store.commit('admin/updateArticlePreference', {
|
if (res) {
|
||||||
index: index,
|
_ts.$store.commit('admin/updateArticlePreference', {
|
||||||
idArticle: idArticle,
|
index: index,
|
||||||
articlePerfect: '1'
|
idArticle: idArticle,
|
||||||
})
|
articlePerfect: '1'
|
||||||
_ts.$message.success("设置成功!");
|
})
|
||||||
|
_ts.$message.success("设置成功!");
|
||||||
|
} else {
|
||||||
|
_ts.$message.error("设置失败!");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cancelPreference(index, idArticle) {
|
cancelPreference(index, idArticle) {
|
||||||
@ -171,12 +175,16 @@ export default {
|
|||||||
idArticle: idArticle,
|
idArticle: idArticle,
|
||||||
articlePerfect: '0'
|
articlePerfect: '0'
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
_ts.$store.commit('admin/updateArticlePreference', {
|
if (res) {
|
||||||
index: index,
|
_ts.$store.commit('admin/updateArticlePreference', {
|
||||||
idArticle: idArticle,
|
index: index,
|
||||||
articlePerfect: '0'
|
idArticle: idArticle,
|
||||||
})
|
articlePerfect: '0'
|
||||||
_ts.$message.success("取消成功!");
|
})
|
||||||
|
_ts.$message.success("取消成功!");
|
||||||
|
} else {
|
||||||
|
_ts.$message.error("取消失败!");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
updateTags(index, article) {
|
updateTags(index, article) {
|
||||||
|
Loading…
Reference in New Issue
Block a user