|
@@ -6,24 +6,32 @@ import store from '@/store'
|
|
export async function queryPageStatus(allowJiBieArr=[], type) { // 1 积分 2 电子卡 3 优惠券
|
|
export async function queryPageStatus(allowJiBieArr=[], type) { // 1 积分 2 电子卡 3 优惠券
|
|
//返回值 0 页面初始状态 1 此页面不对此用户不开放 2 权限不在此页面 3 发生错误 4 正常显示
|
|
//返回值 0 页面初始状态 1 此页面不对此用户不开放 2 权限不在此页面 3 发生错误 4 正常显示
|
|
const currentJiBie = store.state.user.jiBie
|
|
const currentJiBie = store.state.user.jiBie
|
|
|
|
+ // 不符合jiBie
|
|
if(!allowJiBieArr.includes(currentJiBie)){
|
|
if(!allowJiBieArr.includes(currentJiBie)){
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
+ // 符合jiBie 不要求type
|
|
if(!type){
|
|
if(!type){
|
|
return 4
|
|
return 4
|
|
}
|
|
}
|
|
|
|
+
|
|
const getGroupInfoRes = await getGroupInfo()
|
|
const getGroupInfoRes = await getGroupInfo()
|
|
|
|
+
|
|
if(getGroupInfoRes.code != 200){
|
|
if(getGroupInfoRes.code != 200){
|
|
return 3
|
|
return 3
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 存疑
|
|
if(getGroupInfoRes.data == null){
|
|
if(getGroupInfoRes.data == null){
|
|
return 1
|
|
return 1
|
|
}
|
|
}
|
|
|
|
+
|
|
const integralRuleFlag = getGroupInfoRes.data.integralRuleFlag; // 0 不共享 1 共享
|
|
const integralRuleFlag = getGroupInfoRes.data.integralRuleFlag; // 0 不共享 1 共享
|
|
const cardRuleFlag = getGroupInfoRes.data.cardRuleFlag;
|
|
const cardRuleFlag = getGroupInfoRes.data.cardRuleFlag;
|
|
- const couponFlag = getGroupInfoRes.data.couponFlag;
|
|
|
|
|
|
+ const couponFlag = getGroupInfoRes.data.couponFlag; //
|
|
|
|
+
|
|
if(type == 1){
|
|
if(type == 1){
|
|
- if(integralRuleFlag == 0){
|
|
|
|
|
|
+ if(integralRuleFlag == 0){ // 关闭共享
|
|
if(currentJiBie == 1){
|
|
if(currentJiBie == 1){
|
|
return 2
|
|
return 2
|
|
}else if(currentJiBie == 2){
|
|
}else if(currentJiBie == 2){
|
|
@@ -60,8 +68,8 @@ export async function queryPageStatus(allowJiBieArr=[], type) { // 1 积分 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else if(type == 3){
|
|
}else if(type == 3){
|
|
- if(couponFlag == 0){
|
|
|
|
- if(currentJiBie == 1){
|
|
|
|
|
|
+ if(couponFlag == 0){ // 不共享
|
|
|
|
+ if(currentJiBie == 1){
|
|
return 2
|
|
return 2
|
|
}else if(currentJiBie == 2){
|
|
}else if(currentJiBie == 2){
|
|
return 4
|
|
return 4
|