添加实时查询是否添加企微状态逻辑
This commit is contained in:
parent
cd86b96687
commit
ef0b91c95c
10
.env.prod
10
.env.prod
@ -2,16 +2,16 @@
|
||||
NODE_ENV = 'production'
|
||||
|
||||
// 入口地址
|
||||
VUE_APP_BASE_URL = 'https://cdn.xglpa.com/tcubic/pdf/'
|
||||
VUE_APP_BASE_URL = 'https://wealthplus.cmschina.com'
|
||||
|
||||
// 业务接口
|
||||
VUE_APP_API = 'https://cdn.xglpa.com/tcubic/pdf/'
|
||||
VUE_APP_API = 'https://wealthplus.cmschina.com'
|
||||
|
||||
// CDN地址
|
||||
VUE_APP_CDN = 'https://cdn.xglpa.com/tcubic/pdf/'
|
||||
VUE_APP_CDN = './'
|
||||
|
||||
// XGL授权接口
|
||||
VUE_APP_XGL_DOMAIN = https://wealth.newone.com.cn
|
||||
VUE_APP_XGL_DOMAIN = https://wealthplus.cmschina.com
|
||||
|
||||
// 招商证券授权接口
|
||||
VUE_APP_ZS_DOMAIN = https://wealth.newone.com.cn
|
||||
VUE_APP_ZS_DOMAIN = https://wealthplus.cmschina.com
|
||||
BIN
src/assets/img/update_btn.png
Normal file
BIN
src/assets/img/update_btn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@ -7,16 +7,20 @@
|
||||
<img :src="store.state.userAccount.eqcodeImg" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="update" v-if="isadd == 0" @click="updateStaus"></div>
|
||||
|
||||
<!-- 已经添加过:并且领取了红包 -->
|
||||
<div class="is_got_box" v-if="isadd == 1 && isgot"></div>
|
||||
|
||||
<!-- 已经添加过:未领取了红包 -->
|
||||
<div class="has_service_box" v-if="isadd == 1 && !isgot">
|
||||
<!-- 红包中奖 -->
|
||||
<div class="has_service_box" v-if="isadd == 1 && !isgot && !noPrize">
|
||||
<div class="money">{{ moneyNum }}</div>
|
||||
<div class="get_luckybag" @click="getLuckyBag"></div>
|
||||
</div>
|
||||
|
||||
<!-- 红包未中奖 -->
|
||||
<div class="no_prize" v-if="isadd == 1 && !isgot && noPrize"></div>
|
||||
|
||||
<div class="service_cls_btn" @click="hidePop"></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -61,6 +65,13 @@ const redpacketId = ref(0); //奖品Id
|
||||
const moneyNum = ref(""); //奖品金额
|
||||
const isBingo = ref(false); //是否中过奖
|
||||
|
||||
const noPrize = ref(false); //未中奖
|
||||
|
||||
// 刷新添加状态
|
||||
const updateStaus = () => {
|
||||
getIsAddService();
|
||||
};
|
||||
|
||||
// 页面挂载前
|
||||
onBeforeMount(() => {
|
||||
if (store.state.userAccount.isAddCustomer == 1) {
|
||||
@ -95,6 +106,13 @@ onMounted(() => {
|
||||
autoAlpha: 0,
|
||||
delay: 0.1,
|
||||
});
|
||||
|
||||
gsap.from(".update", {
|
||||
duration: 0.3,
|
||||
y: 20,
|
||||
autoAlpha: 0,
|
||||
delay: 0.3,
|
||||
});
|
||||
gsap.from(".service_cls_btn", {
|
||||
duration: 0.3,
|
||||
y: 20,
|
||||
@ -128,10 +146,20 @@ const draw = () => {
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("添加企微-抽取红包结果:", res);
|
||||
redpacketId.value = res.data.data.id;
|
||||
moneyNum.value = res.data.data.amount;
|
||||
|
||||
let data = res.data;
|
||||
getMyPrizeRecored();
|
||||
|
||||
if (data.code == 0) {
|
||||
isadd.value = true;
|
||||
redpacketId.value = data.data.id;
|
||||
moneyNum.value = data.data.amount;
|
||||
if (data.data.amount == 0) {
|
||||
noPrize.value = true;
|
||||
}
|
||||
} else {
|
||||
Toast(data.msg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@ -170,6 +198,36 @@ const getMyPrizeRecored = () => {
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 查询是否添加了企微: isInActivityDate 0否 1是
|
||||
const getIsAddService = () => {
|
||||
let isInActivityDate = 1;
|
||||
return service
|
||||
.post(
|
||||
process.env.VUE_APP_API +
|
||||
"/cms-activity/cms88/qywx/isadded/" +
|
||||
isInActivityDate,
|
||||
{}
|
||||
)
|
||||
.then((res) => {
|
||||
console.log("是否添加了企微", res.data);
|
||||
// store.state.userAccount.isBirthMon = res.data.data
|
||||
store.commit({
|
||||
type: "updateIsAddCustomer",
|
||||
isAddCustomer: res.data.data,
|
||||
});
|
||||
|
||||
let data = res.data;
|
||||
|
||||
if (data.data == 1) {
|
||||
draw();
|
||||
}
|
||||
|
||||
if (data.data == 0) {
|
||||
Toast("您还未添加企微,请扫码添加");
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -219,6 +277,12 @@ const getMyPrizeRecored = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 未中奖
|
||||
.no_prize {
|
||||
@include box(573px, 362px);
|
||||
@include bg_pos("../assets/img/pop/no_prize_pop.png");
|
||||
}
|
||||
|
||||
.service_box {
|
||||
@include box(573px, 688px);
|
||||
@include bg_pos("../assets/img/pop/service_box.png");
|
||||
@ -238,6 +302,11 @@ const getMyPrizeRecored = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
.update {
|
||||
@include box(274px, 92px);
|
||||
@include bg_pos("../assets/img/update_btn.png");
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.service_cls_btn {
|
||||
@include box(72px, 72px);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user