From 09dc3fe8d1c1292a9b1b87c1240938d4c8849c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E5=90=8C=E5=AD=A6?= <2495967527@qq.com> Date: Wed, 19 Feb 2025 10:02:39 +0800 Subject: [PATCH] unitType --- src/views/modules/marketing/level/index.vue | 5 ++++- src/views/modules/marketing/points-mall/index.vue | 10 ++++++++-- .../marketing/points-mall/popup/add-or-update.vue | 6 +++++- src/views/modules/marketing/points-setting/index.vue | 5 ++++- src/views/modules/marketing/user/index.vue | 5 ++++- 5 files changed, 25 insertions(+), 6 deletions(-) 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, };