|
@@ -14,7 +14,7 @@
|
|
|
<script>
|
|
|
import topInfo from '@/layout/public/top.vue';
|
|
|
import message from '@/layout/technical/messageDetail.vue';
|
|
|
-import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
|
const { mapActions: liveTechnicalColumn } = createNamespacedHelpers('liveTechnicalColumn');
|
|
|
const { mapActions: liveTechnicalNews } = createNamespacedHelpers('liveTechnicalNews');
|
|
|
export default {
|
|
@@ -35,6 +35,7 @@ export default {
|
|
|
this.searchColumn();
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
id() {
|
|
|
return this.$route.query.id;
|
|
|
},
|
|
@@ -51,6 +52,7 @@ export default {
|
|
|
this.loading = false;
|
|
|
if (this.$route.query.id) {
|
|
|
const res = await this.fetch(this.id);
|
|
|
+
|
|
|
this.$set(this, `form`, res.data);
|
|
|
}
|
|
|
this.loading = true;
|
|
@@ -60,6 +62,9 @@ export default {
|
|
|
console.log(data);
|
|
|
let res;
|
|
|
let msg;
|
|
|
+ console.log(this.user.uid);
|
|
|
+
|
|
|
+ data.uid = this.user.uid;
|
|
|
if (data.id) {
|
|
|
res = await this.update(data);
|
|
|
msg = `${this.keyWord}修改成功`;
|