Commit ee382a51 by caoyanzhi

update: 巴拉定制-子账号不显示积分相关的操作按钮

parent 97e7c121
......@@ -39,7 +39,7 @@ export default {
this.axios.get(`${this.baseUrl}/api-auth/get-login-user-info?requestProject=member`).then((res) => {
if (res.data.errorCode == 0) {
const uId = res.data.result && res.data.result.userId;
this.$store.commit('checkAdmin', res.data.result || {});
this.setStore(res.data.result || {});
if (this.uniqueId === '') {
this.$store.commit('changeUniqueId', uId);
}
......@@ -56,6 +56,7 @@ export default {
// 两次的uId不等 表示账号有冲突
if (this.uniqueId !== uId) {
this.$store.commit('changeUniqueId', uId);
this.setStore(res.data.result || {});
this.$confirm('当前登录账号已经发生变化,如果您在其他页面已经登录另一个账号,请重新登录!', '登录账号变更提示', {
confirmButtonText: '重新登录',
cancelButtonText: '刷新页面',
......@@ -72,6 +73,12 @@ export default {
});
}
});
},
setStore(data) {
const { enterpriseId, superAdmin } = data;
this.$store.commit('checkAdmin', data);
// 如果是巴拉的子账号,不显示积分相关的操作按钮
this.$store.commit('showHandleScoreBtn', !(enterpriseId == 'ff8080816dd0385e016ddca436d01fe1' && superAdmin == 0));
}
}
}
......
......@@ -157,7 +157,7 @@ export default {
return []
}
},
...mapState(["storeImageUrl", 'showEditClique'])
...mapState(["storeImageUrl", 'showEditClique', 'showHandleScoreBtn'])
},
filters: {
formatTimeYMD(val) {
......
......@@ -83,6 +83,7 @@
key="integral"
label="调整积分"
value="integral"
v-if="showHandleScoreBtn"
></el-option>
<el-option
key="bulkIntegral"
......
......@@ -110,8 +110,8 @@
prop="importValue"
>
<el-select v-model="formByImport.importValue" placeholder="请选择导入类型" @change="handleChangeType">
<el-option label="积分增加" value="11"></el-option>
<el-option label="积分扣除" value="12"></el-option>
<el-option v-if="showHandleScoreBtn" label="积分增加" value="11"></el-option>
<el-option v-if="showHandleScoreBtn" label="积分扣除" value="12"></el-option>
<el-option label="等级调整" value="13"></el-option>
<el-option label="服务门店调整" value="14"></el-option>
<el-option label="批量冻结会员" value="15"></el-option>
......@@ -208,6 +208,7 @@ import {
checkStatus,
checkSuccess
} from "../../../static/js/checkStatus";
import { mapState } from 'vuex';
export default {
data() {
......@@ -250,6 +251,9 @@ export default {
}
}
},
computed: {
...mapState(['showHandleScoreBtn'])
},
methods: {
handleChangeType(val) {
console.log(val);
......
......@@ -59,6 +59,7 @@
</div>
<div class="ml15">
<el-button
v-if="showHandleScoreBtn"
type="primary"
@click="linkRoute('/modifyintegral')"
>调整积分</el-button>
......@@ -232,6 +233,7 @@ import {
} from "../../../static/js/checkStatus";
import searchinput from "common/searchinput";
import { formatLongTime } from "@/utils/utils";
import { mapState } from 'vuex';
export default {
name: "talkLogPage",
......@@ -274,6 +276,9 @@ export default {
integralFlag: ""
};
},
computed: {
...mapState(['showHandleScoreBtn'])
},
methods: {
linkRoute(route) {
this.$router.push({ path: route, query: { memberId: this.memberId } });
......
......@@ -162,7 +162,7 @@ export default {
return []
}
},
...mapState(["storeImageUrl", 'showEditClique'])
...mapState(["storeImageUrl", 'showEditClique', 'showHandleScoreBtn'])
},
filters: {
formatField: function(val) {
......
......@@ -83,6 +83,7 @@
key="integral"
label="调整积分"
value="integral"
v-if="showHandleScoreBtn"
></el-option>
<el-option
key="bulkIntegral"
......
......@@ -163,7 +163,7 @@ export default {
return []
}
},
...mapState(["storeImageUrl", 'showEditClique'])
...mapState(["storeImageUrl", 'showEditClique', 'showHandleScoreBtn'])
},
filters: {
formatField: function(val) {
......
......@@ -82,6 +82,7 @@
key="integral"
label="调整积分"
value="integral"
v-if="showHandleScoreBtn"
></el-option>
<el-option
key="bulkIntegral"
......
......@@ -15,7 +15,8 @@ export default new Vuex.Store({
storeImageUrl: "",
uniqueId: '',
isAdmin: false,
layoutTips: ''
layoutTips: '',
showHandleScoreBtn: true, // 是否显示积分相关的操作按钮 true:显示 false:不显示
},
mutations: {
[types.TITLE]: (state, data) => {
......@@ -45,6 +46,9 @@ export default new Vuex.Store({
},
['setEditClique'](state, val) {
state.showEditClique = val;
},
showHandleScoreBtn(state, data) {
state.showHandleScoreBtn = data;
}
},
actions: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment