diff --git a/src/components/Draw.vue b/src/components/Draw.vue index c92edbd..18b876f 100644 --- a/src/components/Draw.vue +++ b/src/components/Draw.vue @@ -40,6 +40,10 @@ import { } from "vue"; import gsap from "gsap"; import axios from "axios"; +import service from "@/api/httpServe"; +import qs from "qs"; + + import { Toast } from "vant"; import { useStore } from "vuex"; @@ -73,16 +77,16 @@ const hide = () => { }; + + // 立即领取红包 const getMoney = ()=>{ - +redpacket() gsap.to('.draw_container',{duration:0.3,scale:0,autoAlpha:0,onComplete:()=>{ drawStatus.value = false isgetMoney.value = true - - gsap.form('.add_container',{duration:0.3,scale:0,autoAlpha:0,}) - + gsap.form('.add_container',{duration:0.5,scale:0,autoAlpha:0,}) }}) @@ -90,6 +94,22 @@ const getMoney = ()=>{ } +// 领取接口 +const redpacket = (prizeId) => { + let redpacketId = 84; + service + .post( + process.env.VUE_APP_API + + "/cms-activity/cms88/redpacket/receive/" + + redpacketId, + {} + ) + .then((res) => { + console.log("领取红包结果", res); + }); +}; + + \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js index 0fa2c22..0891dc3 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -7,7 +7,7 @@ export default createStore({ // 数据源 state: { userAccount: { - xglOpenid: '', //用户openid + xglOpenId: 'o9B_fvjtyh2KELQYc2t9A3MEh7JQ', //用户openid token: h5plugin.getQueryString('token'), //用户token cardId: h5plugin.getQueryString('cardId'), //carid nkh: h5plugin.getQueryString('nkh'), //牛卡号 @@ -18,7 +18,7 @@ export default createStore({ participantNum: 0, //活动参与人数 prizeResult: 0, //中奖金额 eqcodeImg: '', //二维码 - isBirthMon: 0, //生日是否处于当月 + isBirthMon: 1, //生日是否处于当月 }, },