|
@@ -600,7 +600,8 @@ export default {
|
|
|
if (formData.commend_id.length == 0) {
|
|
|
formData.commend_id = '[]';
|
|
|
}
|
|
|
- this.$store.dispatch('news/addArticle', this.form).then(res => {
|
|
|
+
|
|
|
+ this.$store.dispatch('news/addArticle', formData).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
//汇报结果
|
|
|
this.$message({
|
|
@@ -1075,15 +1076,6 @@ export default {
|
|
|
},
|
|
|
//6.问卷 刘佳伟 end ------------------------------------------------------------>
|
|
|
},
|
|
|
- watch: {
|
|
|
- '$route'(to, from) {
|
|
|
- console.log(from, '---------------------------------------');
|
|
|
- // 监听路由参数中的 id 变化,若变化则更新页面状态并获取数据
|
|
|
- if (to.query.id) {
|
|
|
- this.getMainData();
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
mounted() {
|
|
|
console.log("mounted")
|
|
|
this.getNews()
|
|
@@ -1104,7 +1096,7 @@ export default {
|
|
|
console.log("添加新闻!")
|
|
|
}
|
|
|
},
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|