diff --git a/src/views/modules/marketing/level/index.vue b/src/views/modules/marketing/level/index.vue index e1739d8..a10e7fd 100644 --- a/src/views/modules/marketing/level/index.vue +++ b/src/views/modules/marketing/level/index.vue @@ -133,7 +133,10 @@ export default { }, created() { this.formInline = { - unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType, + unitType: + JSON.parse(sessionStorage.getItem("userInfo")).role == "ROLE_MERCHANT" + ? 3 + : 2, marketId: this.marketId, shopId: this.shopId, }; diff --git a/src/views/modules/marketing/points-mall/index.vue b/src/views/modules/marketing/points-mall/index.vue index 20d99f3..46f61e5 100644 --- a/src/views/modules/marketing/points-mall/index.vue +++ b/src/views/modules/marketing/points-mall/index.vue @@ -103,7 +103,10 @@ export default { }, created() { this.formInline = { - unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType, + unitType: + JSON.parse(sessionStorage.getItem("userInfo")).role == "ROLE_MERCHANT" + ? 3 + : 2, marketId: this.marketId, shopId: this.shopId, }; @@ -135,7 +138,10 @@ export default { }, reset() { this.formInline = { - unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType, + unitType: + JSON.parse(sessionStorage.getItem("userInfo")).role == "ROLE_MERCHANT" + ? 3 + : 2, marketId: this.marketId, shopId: this.shopId, }; diff --git a/src/views/modules/marketing/points-mall/popup/add-or-update.vue b/src/views/modules/marketing/points-mall/popup/add-or-update.vue index ca60c3f..bcdbc87 100644 --- a/src/views/modules/marketing/points-mall/popup/add-or-update.vue +++ b/src/views/modules/marketing/points-mall/popup/add-or-update.vue @@ -344,7 +344,11 @@ export default { this.ruleForm = { marketId: this.marketId, shopId: this.shopId, - unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType, + unitType: + JSON.parse(sessionStorage.getItem("userInfo")).role == + "ROLE_MERCHANT" + ? 3 + : 2, list: [], }; this.modalConfig.title = "添加积分兑换商品"; diff --git a/src/views/modules/marketing/points-setting/index.vue b/src/views/modules/marketing/points-setting/index.vue index 0dec8ad..68d976d 100644 --- a/src/views/modules/marketing/points-setting/index.vue +++ b/src/views/modules/marketing/points-setting/index.vue @@ -105,7 +105,10 @@ export default { }, created() { this.formInline = { - unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType, + unitType: + JSON.parse(sessionStorage.getItem("userInfo")).role == "ROLE_MERCHANT" + ? 3 + : 2, marketId: this.marketId, shopId: this.shopId, }; diff --git a/src/views/modules/marketing/user/index.vue b/src/views/modules/marketing/user/index.vue index 13a91f5..9580c89 100644 --- a/src/views/modules/marketing/user/index.vue +++ b/src/views/modules/marketing/user/index.vue @@ -159,7 +159,10 @@ export default { }, created() { this.formInline = { - unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType, + unitType: + JSON.parse(sessionStorage.getItem("userInfo")).role == "ROLE_MERCHANT" + ? 3 + : 2, marketId: this.marketId, shopId: this.shopId, };