:fix: the preference button does not render correctly in time.
This commit is contained in:
parent
5f536250ea
commit
f24bdbb1dc
@ -157,18 +157,12 @@ export default {
|
|||||||
idArticle: idArticle,
|
idArticle: idArticle,
|
||||||
articlePerfect: '1'
|
articlePerfect: '1'
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
if (res) {
|
_ts.$store.commit('admin/updateArticlePreference', {
|
||||||
if (res.success) {
|
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(_ts.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cancelPreference(index, idArticle) {
|
cancelPreference(index, idArticle) {
|
||||||
|
@ -503,18 +503,12 @@ export default {
|
|||||||
idArticle: idArticle,
|
idArticle: idArticle,
|
||||||
articlePerfect: '1'
|
articlePerfect: '1'
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
if (res) {
|
_ts.$store.commit('admin/updateArticlePreference', {
|
||||||
if (res.success) {
|
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(_ts.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cancelPreference(index, idArticle) {
|
cancelPreference(index, idArticle) {
|
||||||
|
Loading…
Reference in New Issue
Block a user