|
@@ -10,7 +10,6 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: selfShop } = createNamespacedHelpers('selfShop');
|
|
|
const { mapActions: shop } = createNamespacedHelpers('shop');
|
|
|
export default {
|
|
|
name: 'index',
|
|
@@ -38,11 +37,11 @@ export default {
|
|
|
this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...selfShop(['getInfo']),
|
|
|
- ...shop(['update']),
|
|
|
+ ...shop(['fetch', 'update']),
|
|
|
//执行查询
|
|
|
async search() {
|
|
|
- const res = await this.getInfo();
|
|
|
+ let id = this.user.shop.id;
|
|
|
+ const res = await this.fetch(id);
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `form`, res.data);
|
|
|
}
|