|
@@ -6,7 +6,7 @@
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <person :form="form" @onSubmit="onSubmit"></person>
|
|
|
+ <person></person>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -15,10 +15,10 @@
|
|
|
|
|
|
<script>
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
-import person from '@/layout/user/person.vue';
|
|
|
+import person from '../parts/person.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: market } = createNamespacedHelpers('market');
|
|
|
-const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
|
|
|
+// const { mapActions: market } = createNamespacedHelpers('market');
|
|
|
+// const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -37,43 +37,43 @@ export default {
|
|
|
form: {},
|
|
|
}),
|
|
|
created() {
|
|
|
- this.searchInfo();
|
|
|
+ // this.searchInfo();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
},
|
|
|
methods: {
|
|
|
- ...market(['fetch', 'update']),
|
|
|
- ...expertsuser({ expertsuserFetch: 'fetch', expertsuserUpdate: 'update', expertsuserUpgrade: 'upgrade' }),
|
|
|
- async searchInfo() {
|
|
|
- if (this.user.role == '4' || this.user.role == '5' || this.user.role == '7') {
|
|
|
- let res = await this.fetch(this.user.userid);
|
|
|
- if (res.errcode === 0) {
|
|
|
- this.$set(this, `form`, res.data);
|
|
|
- }
|
|
|
- } else if (this.user.role == '6') {
|
|
|
- let res = await this.expertsuserFetch(this.user.userid);
|
|
|
- if (res.errcode === 0) {
|
|
|
- this.$set(this, `form`, res.data);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- async onSubmit({ data }) {
|
|
|
- if (data.role == '4' || data.role == '5' || data.role == '7') {
|
|
|
- let res;
|
|
|
- let msg;
|
|
|
- res = await this.update(data);
|
|
|
- } else if (data.role == '6') {
|
|
|
- let res;
|
|
|
- let msg;
|
|
|
- res = await this.expertsuserUpdate(data);
|
|
|
- }
|
|
|
- this.$notify({
|
|
|
- message: '个人信息修改成功',
|
|
|
- type: 'success',
|
|
|
- });
|
|
|
- this.$router.push({ path: '/user/index' });
|
|
|
- },
|
|
|
+ // ...market(['fetch', 'update']),
|
|
|
+ // ...expertsuser({ expertsuserFetch: 'fetch', expertsuserUpdate: 'update', expertsuserUpgrade: 'upgrade' }),
|
|
|
+ // async searchInfo() {
|
|
|
+ // if (this.user.role == '4' || this.user.role == '5' || this.user.role == '7') {
|
|
|
+ // let res = await this.fetch(this.user.userid);
|
|
|
+ // if (res.errcode === 0) {
|
|
|
+ // this.$set(this, `form`, res.data);
|
|
|
+ // }
|
|
|
+ // } else if (this.user.role == '6') {
|
|
|
+ // let res = await this.expertsuserFetch(this.user.userid);
|
|
|
+ // if (res.errcode === 0) {
|
|
|
+ // this.$set(this, `form`, res.data);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // async onSubmit({ data }) {
|
|
|
+ // if (data.role == '4' || data.role == '5' || data.role == '7') {
|
|
|
+ // let res;
|
|
|
+ // let msg;
|
|
|
+ // res = await this.update(data);
|
|
|
+ // } else if (data.role == '6') {
|
|
|
+ // let res;
|
|
|
+ // let msg;
|
|
|
+ // res = await this.expertsuserUpdate(data);
|
|
|
+ // }
|
|
|
+ // this.$notify({
|
|
|
+ // message: '个人信息修改成功',
|
|
|
+ // type: 'success',
|
|
|
+ // });
|
|
|
+ // this.$router.push({ path: '/user/index' });
|
|
|
+ // },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.title = this.$route.meta.title;
|