diff --git a/src/views/modules/logistics-fare/logistics-template/index.vue b/src/views/modules/logistics-fare/logistics-template/index.vue index fa49791..6649973 100644 --- a/src/views/modules/logistics-fare/logistics-template/index.vue +++ b/src/views/modules/logistics-fare/logistics-template/index.vue @@ -54,7 +54,18 @@ export default { }; }, created() { - this.shopId = JSON.parse(sessionStorage.getItem("userInfo")).shopId; + if (JSON.parse(sessionStorage.getItem("userInfo")).markets.length > 0) { + this.shopId = true; + this.formInline.marketId = JSON.parse( + sessionStorage.getItem("userInfo") + ).markets[0].marketId; + this.marketList = JSON.parse(sessionStorage.getItem("userInfo")).markets; + console.log(this.marketList); + } else if (JSON.parse(sessionStorage.getItem("userInfo")).shopId) { + this.shopId = true; + } else { + this.shopId = false; + } }, methods: { queryList(pageNo, pageSize) {