|
@@ -24,10 +24,14 @@ import _ from 'lodash';
|
|
|
import productlist from './productlist.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
-const { mapActions: place } = createNamespacedHelpers('place');
|
|
|
export default {
|
|
|
name: 'product',
|
|
|
- props: {},
|
|
|
+ props: {
|
|
|
+ // 省
|
|
|
+ province: { type: Array, default: () => [] },
|
|
|
+ // 市
|
|
|
+ place: { type: Array, default: () => [] },
|
|
|
+ },
|
|
|
components: {
|
|
|
productlist,
|
|
|
},
|
|
@@ -43,20 +47,14 @@ export default {
|
|
|
// 往期直播
|
|
|
listPast: [],
|
|
|
pastTotal: 0,
|
|
|
- // 省
|
|
|
- province: [],
|
|
|
- // 市
|
|
|
- place: [],
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
await this.searchList({ status: '0' });
|
|
|
await this.searchList({ status: '1' });
|
|
|
await this.searchList({ status: '2' });
|
|
|
- await this.searchplace();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
|
|
|
...dock({ dockQuery: 'query' }),
|
|
|
async searchList({ skip = 0, limit = 10, status, ...info } = {}) {
|
|
|
let res = await this.dockQuery({ is_allowed: 1, skip, status, ...info });
|
|
@@ -73,14 +71,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- async searchplace() {
|
|
|
- let res = await this.palcequery({ level: 1 });
|
|
|
- let arr = await this.palcequery({ level: 2 });
|
|
|
- if (res || arr) {
|
|
|
- this.$set(this, `province`, res.data);
|
|
|
- this.$set(this, `place`, arr.data);
|
|
|
- }
|
|
|
- },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|