新增活动前是否添加企微状态
This commit is contained in:
parent
f45b6731c2
commit
e391123b4e
@ -170,7 +170,6 @@ const serviceLuckyMsg = reactive({
|
||||
|
||||
const hideServiceLuckyPop = () => {
|
||||
gsap.to(".serviceLuckyPop", { duration: 0.5, autoAlpha: 0 });
|
||||
|
||||
};
|
||||
|
||||
// 点击领取企微红包
|
||||
@ -360,12 +359,17 @@ onMounted(() => {
|
||||
addPoint();
|
||||
|
||||
// 如果添加了企微,直接调抽奖结果,中奖了就弹窗,未中奖的话不弹窗
|
||||
|
||||
// 您已添加过专属服务人员,请参与其他活动
|
||||
|
||||
if (store.state.userAccount.isAddCustomerBefore == 0) {
|
||||
if (
|
||||
store.state.userAccount.isAddCustomer == 1 &&
|
||||
!isGetedServiceLucky.value
|
||||
) {
|
||||
getluckyBag2(2);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isDraw.value) {
|
||||
gsap.to(".draw_btn", {
|
||||
@ -401,9 +405,15 @@ const activityBtn = (item) => {
|
||||
console.log(item.id);
|
||||
|
||||
if (item.id == 1) {
|
||||
|
||||
if(store.state.userAccount.isAddCustomerBefore == 1){
|
||||
Toast("您已添加过专属服务人员,请参与其他活动")
|
||||
}else{
|
||||
showServicePop.value = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (item.id == 2) {
|
||||
console.log("新客专享页面");
|
||||
// let url = "/subs/financial/pages/index/index";
|
||||
@ -513,9 +523,9 @@ const getMyPrizeRecored = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 查询是否添加了企微: isInActivityDate 0否 1是
|
||||
const getIsAddService = () => {
|
||||
let isInActivityDate = 0;
|
||||
// 查询是否添加了企微: isInActivityDate 0活动前是否存在 1活动期间是否存在
|
||||
const getIsAddService = (id) => {
|
||||
let isInActivityDate = id;
|
||||
service
|
||||
.post(
|
||||
process.env.VUE_APP_API +
|
||||
@ -601,7 +611,7 @@ const getluckyBag2 = (id) => {
|
||||
duration: 0.5,
|
||||
autoAlpha: 0,
|
||||
y: 50,
|
||||
delay:0.5
|
||||
delay: 0.5,
|
||||
});
|
||||
} else {
|
||||
console.log("企微不中奖");
|
||||
@ -659,6 +669,7 @@ const addPoint = () => {
|
||||
const deleteNum = ref(0);
|
||||
// 清数据接口
|
||||
const deleteData = (type) => {
|
||||
if (process.env.NODE_ENV == "test") {
|
||||
deleteNum.value++;
|
||||
if (deleteNum.value == 3) {
|
||||
let type = 0;
|
||||
@ -674,6 +685,7 @@ const deleteData = (type) => {
|
||||
deleteNum.value = 0;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@ -75,9 +75,9 @@ const getBrithday = () => {
|
||||
// });
|
||||
};
|
||||
|
||||
// 查询是否添加了企微: isInActivityDate 0否 1是
|
||||
const getIsAddService = () => {
|
||||
let isInActivityDate = 1;
|
||||
// 查询是否添加了企微: isInActivityDate 0活动前是否存在 1活动期间是否存在
|
||||
const getIsAddService = (id) => {
|
||||
let isInActivityDate = id;
|
||||
return service
|
||||
.post(
|
||||
process.env.VUE_APP_API +
|
||||
@ -146,7 +146,8 @@ const apiAll = ()=>{
|
||||
getMyPrizeRecored(),
|
||||
getBrithday(),
|
||||
getActivityNum(),
|
||||
getIsAddService(),
|
||||
getIsAddService(0),
|
||||
getIsAddService(1),
|
||||
]).then((result) => {
|
||||
// console.log("接口都请求完成", result);
|
||||
console.log("1.获取企业微信二维码:",result[0].data);
|
||||
@ -154,7 +155,8 @@ const apiAll = ()=>{
|
||||
console.log("3.获取红包记录:",result[2].data);
|
||||
console.log("4.获取生日状态:",result[3].data);
|
||||
console.log("5.获取活动人数:",result[4].data);
|
||||
console.log("5.获取添加企业微信状态:",result[5].data);
|
||||
console.log("6.获取添加企业微信状态【活动前是否存在】:",result[5].data);
|
||||
console.log("7.获取添加企业微信状态【活动期间是否添加】:",result[6].data);
|
||||
|
||||
// 更细二维码
|
||||
store.commit({ type: "updateeEqcodeImg", eqcodeImg: result[0].data.data,});
|
||||
@ -170,8 +172,11 @@ const apiAll = ()=>{
|
||||
// 更新活动人数
|
||||
store.commit({type: "updateParticipantNum",participantNum: result[4].data.data,});
|
||||
|
||||
// 更新添加企微状态
|
||||
store.commit({type: "updateIsAddCustomer",isAddCustomer: result[5].data.data,});
|
||||
// 更新添加企微状态:活动前是否存在
|
||||
store.commit({type: "updateisAddCustomerBefore",isAddCustomerBefore: result[5].data.data,});
|
||||
|
||||
// 更新添加企微状态:活动期间
|
||||
store.commit({type: "updateIsAddCustomer",isAddCustomer: result[6].data.data,});
|
||||
|
||||
|
||||
|
||||
|
||||
@ -13,7 +13,8 @@ export default createStore({
|
||||
nkh: '', //牛卡号
|
||||
isDraw: false, //是否抽过奖
|
||||
isHasAccount: false, //是否存在牛卡号
|
||||
isAddCustomer: 0, //是否添加过服务人员
|
||||
isAddCustomer: 0, //活动期间内是否添加过服务人员
|
||||
isAddCustomerBefore:0, //活动前是否存在服务人员
|
||||
isHasPrize: [], //是否存在奖品
|
||||
participantNum: 0, //活动参与人数
|
||||
prizeResult: 0, //中奖金额
|
||||
@ -43,27 +44,37 @@ export default createStore({
|
||||
state.userAccount.nkh = val.nkh
|
||||
},
|
||||
|
||||
// 更新cardId
|
||||
updateCardId(state,val){
|
||||
state.userAccount.cardId = val.cardId
|
||||
},
|
||||
|
||||
// 更新二维码
|
||||
updateeEqcodeImg(state,val){
|
||||
state.userAccount.eqcodeImg = val.eqcodeImg
|
||||
},
|
||||
|
||||
// 更新活动参与人数
|
||||
updateParticipantNum(state,val){
|
||||
state.userAccount.participantNum = val.participantNum
|
||||
},
|
||||
|
||||
// 更新生日是否处于当月状态
|
||||
updateBirthMoon(state,val){
|
||||
state.userAccount.isBirthMon = val.isBirthMon
|
||||
},
|
||||
|
||||
// 更新活动期间内是否添加过企微状态
|
||||
updateIsAddCustomer(state,val){
|
||||
state.userAccount.isAddCustomer = val.isAddCustomer
|
||||
},
|
||||
|
||||
// 更新奖品
|
||||
// 更新活动前是否存在企微状态
|
||||
updateisAddCustomerBefore(state,val){
|
||||
state.userAccount.isAddCustomerBefore = val.isAddCustomerBefore
|
||||
},
|
||||
|
||||
// 更新奖品列表
|
||||
updatePrizeList(state,val){
|
||||
state.userAccount.prizeList = val.prizeList
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user