Commit 9eb7e78c by caoyanzhi

Merge branch 'feature/8月-奥莱定制' into dev

parents adbe32fc 96dc312e
......@@ -6,6 +6,7 @@ const state = {
limitCodeList: [],
isLimit: false, // 是否正在限流
all: 0,
storeCardAuth: false, // 商户是否开通商场抵金券功能
cartData: [],
total: 0,
leftMenu: [],
......@@ -29,6 +30,7 @@ const getters = {
},
allCartData: state => state.cartData,
getStoreCardAuth: state => state.storeCardAuth,
total: state => {
state.total = 0;
......@@ -97,6 +99,9 @@ const mutations = {
state.isShowSelf = Boolean(showFlag);
state.openFlag = Boolean(openFlag);
},
updateStoreCardAuth(state, auth) {
state.storeCardAuth = auth;
},
updateLimitCodeList(state, limitCodeList) {
state.limitCodeList = limitCodeList;
},
......
......@@ -12,6 +12,7 @@ export default config => {
store.commit('updateSuperAdmin', result.superAdmin);
store.commit('updateDepartAuth', result.departAuth);
store.commit('updateUserId', result.userId);
store.commit('updateStoreCardAuth', result.enterpriseDTO.brandType == 2);
});
const getCouponEnable = requests('/api-marketing/opt-coupon-enable', { requestProject: 'marketing' }).then(data => {
store.commit('updateAppletEnable', data.result || false); // result: true,能改 false不能
......
......@@ -60,8 +60,7 @@ export default {
{ value: '', label: '全部卡券类型' },
{ value: 0, label: '抵金券' },
{ value: 1, label: '折扣券' },
{ value: 2, label: '兑换券' },
{ value: 3, label: '商场抵金券' }
{ value: 2, label: '兑换券' }
],
sortFlag: false,
adjustStock: false,
......@@ -88,6 +87,9 @@ export default {
next();
},
activated() {
if (this.$store.getters.getStoreCardAuth) {
this.cardTypeOptions.push({ value: 3, label: '商场抵金券' });
}
console.log('activated');
window.scrollTo(0, 0);
if (this.$route.meta.refresh) {
......
......@@ -103,8 +103,7 @@ export default {
{ value: null, label: '全部' },
{ value: 0, label: '抵金券' },
{ value: 1, label: '折扣券' },
{ value: 2, label: '兑换券' },
{ value: 3, label: '商场抵金券' }
{ value: 2, label: '兑换券' }
],
listParams: {
searchParam: '',
......@@ -121,6 +120,9 @@ export default {
};
},
created() {
if (this.$store.getters.getStoreCardAuth) {
this.cardTypesList.push({ value: 3, label: '商场抵金券' });
}
this.getCardList();
},
methods: {
......
......@@ -101,8 +101,7 @@ export default {
{ value: null, label: '全部' },
{ value: 0, label: '抵金券' },
{ value: 1, label: '折扣券' },
{ value: 2, label: '兑换券' },
{ value: 3, label: '商场抵金券' }
{ value: 2, label: '兑换券' }
],
listParams: {
searchParam: '',
......@@ -120,6 +119,9 @@ export default {
};
},
created() {
if (this.$store.getters.getStoreCardAuth) {
this.cardTypesList.push({ value: 3, label: '商场抵金券' });
}
this.getCardList();
},
methods: {
......
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