Compare commits

..

1 Commits

Author SHA1 Message Date
rucky
9424a5beae 稍微做了个没办法的适配 2022-08-05 17:42:07 +08:00
99 changed files with 821 additions and 2896 deletions

View File

@ -2,16 +2,16 @@
NODE_ENV = 'production' NODE_ENV = 'production'
// 入口地址 // 入口地址
VUE_APP_BASE_URL = 'https://wealthplus.cmschina.com' VUE_APP_BASE_URL = 'https://cdn.xglpa.com/tcubic/pdf/'
// 业务接口 // 业务接口
VUE_APP_API = 'https://wealthplus.cmschina.com' VUE_APP_API = 'https://cdn.xglpa.com/tcubic/pdf/'
// CDN地址 // CDN地址
VUE_APP_CDN = './' VUE_APP_CDN = 'https://cdn.xglpa.com/tcubic/pdf/'
// XGL授权接口 // XGL授权接口
VUE_APP_XGL_DOMAIN = https://wealthplus.cmschina.com VUE_APP_XGL_DOMAIN = https://wealth.newone.com.cn
// 招商证券授权接口 // 招商证券授权接口
VUE_APP_ZS_DOMAIN = https://wealthplus.cmschina.com VUE_APP_ZS_DOMAIN = https://wealth.newone.com.cn

2
package-lock.json generated
View File

@ -2350,7 +2350,7 @@
"dev": true "dev": true
}, },
"vue-loader-v16": { "vue-loader-v16": {
"version": "npm:vue-loader-v16@16.8.3", "version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true, "dev": true,

View File

@ -2,11 +2,7 @@ const AutoPrefixer = require("autoprefixer");
const px2rem = require("postcss-px2rem"); const px2rem = require("postcss-px2rem");
module.exports = ({ file }) => { module.exports = ({ file }) => {
let remUnit; // 判断条件 请自行调整 我使用的是 mand-mobile ui 没有对vant引入进行测试 let remUnit; // 判断条件 请自行调整 我使用的是 mand-mobile ui 没有对vant引入进行测试
if (file && file.dirname && file.dirname.indexOf("vant") > -1) { if (file && file.dirname && file.dirname.indexOf("vant") > -1) { remUnit = 37.5; } else { remUnit = 75; }
remUnit = 37.5;
} else {
remUnit = 75;
}
return { return {
plugins: [ plugins: [
px2rem({ remUnit: remUnit, }), px2rem({ remUnit: remUnit, }),

View File

@ -29,7 +29,7 @@ const service = axios.create({
// 添加请求拦截器 // 添加请求拦截器
service.interceptors.request.use(function (config) { service.interceptors.request.use(function (config) {
// 在发送请求之前做些什么 // 在发送请求之前做些什么
// console.log("开始请求"); console.log("开始请求");
config config
return config; return config;
}, function (error) { }, function (error) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1,230 +0,0 @@
<template>
<div class="drawCon" @touchmove.prevent>
<!-- 抽奖结果反馈 -->
<div class="draw_container" v-if="!isgetMoney">
<!-- 正常中奖 -->
<div class="has_prize" v-if="drawStatus">
<div class="money_num">
<span>{{ amount }}</span>
</div>
<div class="get_btn" @click="getMoney"></div>
</div>
<!-- 谢谢参与 -->
<div class="no_prize" v-if="!drawStatus"></div>
<div class="cls_btn" @click="hide"></div>
</div>
<!-- 领奖后的弹窗 -->
<div class="add_container" v-if="isgetMoney">
<!-- 已经添加过企微人员 -->
<div class="is_added">
<div class="go_index_btn" @click="hide"></div>
</div>
<div class="cls_btn" @click="hide"></div>
</div>
</div>
</template>
<script setup>
import {
onBeforeMount,
onMounted,
defineEmits,
defineProps,
reactive,
ref,
toRefs,
} from "vue";
import gsap from "gsap";
import axios from "axios";
import service from "@/api/httpServe";
import qs from "qs";
import wx from "@/utils/wx-jssdk.1.6.0.js";
import { Toast, Dialog } from "vant";
import { useStore } from "vuex";
//
const emit = defineEmits(["drawCon"]); //
const props = defineProps({ prizeMsg: Object }); // props
const store = useStore();
const drawStatus = ref(true);
const isgetMoney = ref(false);
const amount = ref(0);
const prizeId = ref(1);
//
onBeforeMount(() => {
amount.value = props.prizeMsg.amount;
prizeId.value = props.prizeMsg.id;
if (props.prizeMsg.amount == 0) {
drawStatus.value = false;
}
console.log("props:", props.prizeMsg);
});
//
onMounted(() => {
gsap.from(".drawCon", { duration: 0.3, autoAlpha: 0 });
gsap.from(".draw_container", {
duration: 0.3,
scale: 0.2,
autoAlpha: 0,
delay: 0.1,
});
// gsap.from('.rule_cls_btn', { duration: 0.3, y: 20, autoAlpha: 0, delay: 0.5 })
});
const hide = () => {
emit("drawCon");
};
//
const getMoney = () => {
redpacket(prizeId.value);
};
//
const redpacket = (prizeId) => {
let redpacketId = prizeId;
service
.post(
process.env.VUE_APP_API +
"/cms-activity/cms88/redpacket/receive/" +
redpacketId,
{}
)
.then((res) => {
console.log("领取红包结果", res);
let data = res.data;
if (data.code == 0) {
gsap.to(".draw_container", {
duration: 0.3,
scale: 0,
autoAlpha: 0,
onComplete: () => {
drawStatus.value = false;
isgetMoney.value = true;
getMyPrizeRecored()
// gsap.form('.add_container',{duration:0.5,scale:0,autoAlpha:0,})
},
});
} else {
Dialog.confirm({
title: "温馨提示",
message: '请先绑定牛卡号',
confirmButtonText: '前往绑定',
})
.then(() => {
wx.miniProgram.navigateTo({
url: "/subs/bind/pages/login/login?source=zszq",
});
})
.catch(() => {
console.log(2);
// on cancel
});
}
});
};
//
const getMyPrizeRecored = () => {
service
.post(process.env.VUE_APP_API + "/cms-activity/cms88/prize/list", {})
.then((res) => {
console.log("红包记录:", res.data);
store.commit({
type: "updatePrizeList",
prizeList: res.data.data,
});
});
};
</script>
<style lang="scss" scoped>
.drawCon {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.7);
.draw_container {
width: 750px;
height: 1180px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.has_prize {
@include box(530px, 594px);
@include bg_pos("../assets/img/pop/luckybag.png");
position: relative;
.money_num {
@include pos(530px, 92px, 0px, 134px);
color: #ff480e;
font-size: 32px;
text-align: center;
font-weight: 700;
span {
font-size: 82px;
}
}
.get_btn {
@include pos(274px, 92px, 139px, 389px);
@include bg_pos("../assets/img/pop/draw_got_btn.png");
}
}
.no_prize {
@include box(573px, 362px);
@include bg_pos("../assets/img/pop/no_prize_pop.png");
}
}
.add_container {
width: 750px;
height: 1180px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.is_added {
@include box(530px, 594px);
@include bg_pos("../assets/img/pop/got_luckyBag_pop.png");
position: relative;
.go_index_btn {
@include pos(394px, 92px, 79px, 389px);
@include bg_pos("../assets/img/pop/to_index_btn.png");
}
}
}
.cls_btn {
@include box(72px, 72px);
@include bg_pos("../assets/img/pop/cls_btn.png");
margin-top: 50px;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,204 +0,0 @@
<template>
<div class="loadCon" @touchmove.prevent>
<div class="load_container">
<div class="load_box">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
</div>
</template>
<script setup>
import {
onBeforeMount,
onMounted,
defineEmits,
defineProps,
reactive,
ref,
toRefs,
} from "vue";
import gsap from "gsap";
import axios from "axios";
import { Toast } from "vant";
import { useStore } from "vuex";
//
const emit = defineEmits(["RulesPop"]); //
const props = defineProps({ sendMessage: Object }); // props
const store = useStore();
//
onBeforeMount(() => {});
//
onMounted(() => {});
const hidePop = () => {
emit("RulesPop");
};
</script>
<style lang="scss" scoped>
.loadCon {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-image: -moz-linear-gradient( 90deg, rgb(254,186,136) 37%, rgb(253,240,227) 100%);
background-image: -webkit-linear-gradient( 90deg, rgb(254,186,136) 37%, rgb(253,240,227) 100%);
background-image: -ms-linear-gradient( 90deg, rgb(254,186,136) 37%, rgb(253,240,227) 100%);
.load_container {
width: 750px;
height: 1180px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
@keyframes load_box {
0% {
opacity: 1
}
100% {
opacity: 0
}
}
.load_box{
width: 40px !important;
height: 100px !important;
}
.load_box div {
// left: 94px;
// top: 48px;
position: absolute;
animation: load_box linear 1s infinite;
background: #df1317;
width: 12px;
height: 24px;
border-radius: 6px / 12px;
transform-origin: 6px 52px;
}
.load_box div:nth-child(1) {
transform: rotate(0deg);
animation-delay: -0.9166666666666666s;
background: #df1317;
}
.load_box div:nth-child(2) {
transform: rotate(30deg);
animation-delay: -0.8333333333333334s;
background: #df1317;
}
.load_box div:nth-child(3) {
transform: rotate(60deg);
animation-delay: -0.75s;
background: #df1317;
}
.load_box div:nth-child(4) {
transform: rotate(90deg);
animation-delay: -0.6666666666666666s;
background: #df1317;
}
.load_box div:nth-child(5) {
transform: rotate(120deg);
animation-delay: -0.5833333333333334s;
background: #df1317;
}
.load_box div:nth-child(6) {
transform: rotate(150deg);
animation-delay: -0.5s;
background: #df1317;
}
.load_box div:nth-child(7) {
transform: rotate(180deg);
animation-delay: -0.4166666666666667s;
background: #df1317;
}
.load_box div:nth-child(8) {
transform: rotate(210deg);
animation-delay: -0.3333333333333333s;
background: #df1317;
}
.load_box div:nth-child(9) {
transform: rotate(240deg);
animation-delay: -0.25s;
background: #df1317;
}
.load_box div:nth-child(10) {
transform: rotate(270deg);
animation-delay: -0.16666666666666666s;
background: #df1317;
}
.load_box div:nth-child(11) {
transform: rotate(300deg);
animation-delay: -0.08333333333333333s;
background: #df1317;
}
.load_box div:nth-child(12) {
transform: rotate(330deg);
animation-delay: 0s;
background: #df1317;
}
.loadingio-spinner-spinner-z60ni5wxaaj {
width: 200px;
height: 200px;
display: inline-block;
overflow: hidden;
background: #f1f2f3;
}
.load_box {
width: 100%;
height: 100%;
position: relative;
transform: translateZ(0) scale(1);
backface-visibility: hidden;
transform-origin: 0 0;
/* see note above */
}
.load_box div {
box-sizing: content-box;
}
}
}
</style>

View File

@ -1,280 +0,0 @@
<template>
<div class="LuckyWheelCon" @touchmove.prevent>
<div class="LuckyWheel_container">
<div class="LuckyWheel_box">
<div class="prize p-1" ref="p1"></div>
<div class="prize p-2" ref="p2"></div>
<div class="prize p-3" ref="p3"></div>
<div class="prize p-4" ref="p4"></div>
<div class="prize p-5" ref="p5"></div>
<div class="prize p-1" ref="p6"></div>
<div class="prize p-2" ref="p7"></div>
<div class="prize p-3" ref="p8"></div>
<div class="prize p-4" ref="p9"></div>
<div class="prize p-5" ref="p10"></div>
<div class="prize p-1" ref="p11"></div>
<div class="prize p-2" ref="p12"></div>
<div class="prize p-3" ref="p13"></div>
<div class="prize p-4" ref="p14"></div>
<div class="prize p-5" ref="p15"></div>
<div class="prize p-5" ref="p16"></div>
<div class="prize p-5" ref="p17"></div>
<div class="prize p-5" ref="p18"></div>
<div class="prize p-5" ref="p19"></div>
<!-- <div class="prize p-3" ref="p20"></div> -->
</div>
<!-- <div class="btn" @click="btn">开始抽奖</div> -->
</div>
</div>
</template>
<script setup>
import {
onBeforeMount,
onMounted,
defineEmits,
defineProps,
reactive,
ref,
toRefs,
defineExpose,
} from "vue";
import gsap from "gsap";
import axios from "axios";
import { Toast } from "vant";
import { useStore } from "vuex";
// import { PixiPlugin } from "gsap/PixiPlugin.js";
import { MotionPathPlugin } from "gsap/MotionPathPlugin.js";
// import { MorphSVGPlugin } from "gsap/MorphSVGPlugin";
gsap.registerPlugin(MotionPathPlugin);
//
const emit = defineEmits(["luckyWheel"]); //
const props = defineProps({ sendMessage: Object }); // props
const store = useStore();
const p1 = ref(null);
const p2 = ref(null);
const p3 = ref(null);
const p4 = ref(null);
const p5 = ref(null);
const p6 = ref(null);
const p7 = ref(null);
const p8 = ref(null);
const p9 = ref(null);
const p10 = ref(null);
const p11 = ref(null);
const p12 = ref(null);
const p13 = ref(null);
const p14 = ref(null);
const p15 = ref(null);
const p16 = ref(null);
const p17 = ref(null);
const p18 = ref(null);
const p19 = ref(null);
const aniGroup = ref([]);
const eqcode = ref(require("../assets/img/pop/eqcode.png"));
const luckyWheelStatus = ref(false);
//
const isStop = () => {
if (!luckyWheelStatus.value) {
luckyWheelStatus.value = true;
console.log("大转盘结束");
emit('luckyWheel') //
}
};
//
onBeforeMount(() => {});
onMounted(() => {
showDrawAni();
});
// bingo index pArrindex
const showDrawAni = (bingo, repeat) => {
const pArr = [
p1, // 1.08
p2, // 2.68
p3, // 6.66
p4, // 8.88
p5, //
p6, // 便
p7,
p8,
p9,
p10,
p11,
p12,
p13,
p14,
p15,
p16,
p17,
p18,
p19,
];
const singleRate = 1 / pArr.length; //
const delta = singleRate + 0.068; //
let rotateDelta = 0; // |
if (bingo) {
rotateDelta = (5 - bingo) * singleRate;
}
for (let i = 1; i < pArr.length + 1; i++) {
let ani = gsap.to(
[pArr[i - 1].value],
{
duration: 10,
paused: bingo ? false : true, //
// repeat: -1,
// delay: i * 0.5 - 1,
// stagger: 0.5,
// repeatDelay: 3,
// yoyo: true,
ease: "back.out(1.4)",
motionPath: {
path: "M115.37,73.45C177.05-25.14,462-22.69,535,70,686.45,248.93,797.17,321.7,324.48,321.7-121,321.7-20.39,248.93,115.37,73.45Z",
// align: [1, 1],
autoRotate: true,
start: i * singleRate + rotateDelta - delta, // 0-1
end: i * singleRate + 1 + rotateDelta - delta, // 0-
offsetX: -177,
offsetY: -43,
alignOrigin: [0.5, 0],
},
onUpdate: () => {
// if (i === 1) console.log(ani.progress());
},
onStart: () => {
if (i == pArr.length - 1) {
setTimeout(() => {
// console.log("2");
isStop()
}, 5000);
}
},
onComplete: () => {},
},
"same"
);
//
ani.seek(0);
if (bingo && repeat) {
setTimeout(() => {
showDrawAni(bingo, false);
}, 800);
}
}
};
const btn = () => {
console.log("抽奖");
// ID
// 1 - 1.08
// 2 - 2.68
// 3 - 6.66
// 4 - 8.88
// 5 -
// id, fasle
showDrawAni(2, true);
};
//
defineExpose({
showDrawAni,
});
</script>
<style lang="scss" scoped>
.LuckyWheelCon {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
pointer-events: none;
.LuckyWheel_container {
position: absolute;
top: 770px;
left: 0px;
width: 760px;
height: 500px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.LuckyWheel_box {
width: 760px;
height: 500px;
// // border-width: 123px;
// border-style: solid;
// border-radius: 50%;
// // box-shadow: -1.569px -17.932px 16px 0px rgba(234, 6, 16, 0.16);
// width: 831px;
// height: 305px;
// width: 100%;
// height: 100%;
// position: absolute;
// top: 0;
// left: 20px;
.li {
width: 100px;
height: 100px;
background-color: #ff6000;
}
}
.btn {
width: 200px;
height: 100px;
text-align: center;
line-height: 100px;
font-size: 30px;
color: #fff;
background: #ff6000;
}
}
.prize {
position: absolute;
width: 160px;
height: 96px;
left: 0px;
top: 10px;
//
&.p-1 {
background-image: url("~@/assets/img/p_1.png");
background-size: 160px 96px;
}
&.p-2 {
background-image: url("~@/assets/img/p_2.png");
background-size: 160px 96px;
}
&.p-3 {
background-image: url("~@/assets/img/p_3.png");
background-size: 160px 96px;
}
&.p-4 {
background-image: url("~@/assets/img/p_4.png");
background-size: 160px 96px;
}
&.p-5 {
background-image: url("~@/assets/img/p_5.png");
background-size: 160px 96px;
}
// background-color: #f00;
}
}
</style>

View File

@ -37,7 +37,7 @@
<!-- 对照div 重点 --> <!-- 对照div 重点 -->
<div class="relative-box" ref="container"></div> <div class="relative-box" ref="container"></div>
<!-- <div class="btn" @click="btn">开始抽奖</div> --> <div class="btn" @click="btn">开始抽奖</div>
</div> </div>
</div> </div>
</template> </template>
@ -60,6 +60,7 @@ import { useStore } from "vuex";
// import { PixiPlugin } from "gsap/PixiPlugin.js"; // import { PixiPlugin } from "gsap/PixiPlugin.js";
import { MotionPathPlugin } from "gsap/MotionPathPlugin.js"; import { MotionPathPlugin } from "gsap/MotionPathPlugin.js";
// import { MorphSVGPlugin } from "gsap/MorphSVGPlugin"; // import { MorphSVGPlugin } from "gsap/MorphSVGPlugin";
gsap.registerPlugin(MotionPathPlugin); gsap.registerPlugin(MotionPathPlugin);
// //
@ -89,19 +90,6 @@ const aniGroup = ref([]);
const container = ref(); const container = ref();
const eqcode = ref(require("../assets/img/pop/eqcode.png")); const eqcode = ref(require("../assets/img/pop/eqcode.png"));
const luckyWheelStatus = ref(false);
//
const isStop = () => {
if (!luckyWheelStatus.value) {
luckyWheelStatus.value = true;
console.log("大转盘结束");
emit('luckyWheel') //
}
};
// //
onBeforeMount(() => {}); onBeforeMount(() => {});
@ -181,14 +169,6 @@ const showDrawAni = (bingo, repeat) => {
offsetY: 70, offsetY: 70,
alignOrigin: [0.5, 0], alignOrigin: [0.5, 0],
}, },
onStart: ()=>{
if (i == pArr.length - 1) {
setTimeout(() => {
// console.log("2");
isStop()
}, 5000);
}
},
onUpdate: () => { onUpdate: () => {
// if (i === 1) console.log(ani.progress()); // if (i === 1) console.log(ani.progress());
}, },
@ -216,30 +196,22 @@ const btn = () => {
// id, fasle // id, fasle
showDrawAni(1, true); showDrawAni(1, true);
}; };
//
defineExpose({
showDrawAni,
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.LuckyWheelCon { .LuckyWheelCon {
width: 100%; width: 100%;
height: 800px; height: 100%;
position: absolute; position: fixed;
// z-index: 10; z-index: 10;
top: 0; top: 0;
left: 0; left: 0;
pointer-events: none;
// right: 0; // right: 0;
// bottom: 0; // bottom: 0;
// display: flex; // display: flex;
// justify-content: center; // justify-content: center;
// align-items: center; // align-items: center;
// background-color: rgba(0, 0, 0, 0.3); background-color: rgba(0, 0, 0, 0.3);
.LuckyWheel_container { .LuckyWheel_container {
position: absolute; position: absolute;

View File

@ -1,411 +1,213 @@
<template> <template>
<div class="myPrizeCon" @touchmove.prevent> <div class="myPrizeCon" @touchmove.prevent>
<div class="myPrize_container"> <div class="myPrize_container">
<!-- 有奖品 --> <div class="cake"></div>
<div class="prize_has" v-if="prizeList.length != 0"> <div class="prize_box">
<div class="cake"></div> <div class="prize_top">
<div class="prize_box"> <div class="prize_title"></div>
<div class="prize_top"> </div>
<div class="prize_title"></div> <div class="prize_middle">
</div> <div class="prize_item" v-for="item in prizeList" v-show="item.isHas">
<div class="prize_middle"> <div class="prize_li">
<div class="prize_item" v-for="(item, key) in prizeList" :key="key"> <div class="prize_num">{{ item.prizeNum }}元红包</div>
<div class="prize_li"> <div class="prize_spe">{{ item.spe }}</div>
<div class="prize_num">{{ item.prizeNum }}元红包</div> </div>
<div class="prize_spe">{{ item.spe }}</div> <div class="buttom">
</div> <img
<div class="buttom"> :src="item.isGeted ? require('../assets/img/pop/view_btn.png') : require('../assets/img/pop/got_btn.png')" />
<img </div>
:src=" </div>
item.isGeted == 1 </div>
? require('../assets/img/pop/got_btn.png') <div class="prize_bottom"></div>
: require('../assets/img/pop/view_btn.png')
"
@click="getMoney(item)"
/>
</div>
</div> </div>
</div> <div class="cls_btn" @click="hide"></div>
<div class="prize_bottom"></div>
</div> </div>
</div>
<!-- 没奖品记录 -->
<div class="prize_no" v-if="prizeList.length == 0"></div>
<div class="cls_btn" @click="hide"></div>
</div> </div>
</div>
<!-- 领取成功反馈弹窗 -->
<div class="GotedPop" @touchmove.prevent>
<div class="goted_container">
<div class="goted_box">
<div class="to_index_btn" @click="hide"></div>
</div>
<div class="cls_btn" @click="hidePop"></div>
</div>
</div>
</template> </template>
<script setup> <script setup>
import { import { onBeforeMount, onMounted, defineEmits, defineProps, reactive, ref, toRefs } from 'vue'
onBeforeMount,
onMounted,
defineEmits,
defineProps,
reactive,
ref,
toRefs,
} from "vue";
import gsap from "gsap"; import gsap from "gsap";
import axios from "axios"; import axios from 'axios'
import service from "@/api/httpServe"; import { Toast } from 'vant';
import qs from "qs";
import { Toast, Dialog } from "vant";
import { useStore } from "vuex"; import { useStore } from "vuex";
import wx from "@/utils/wx-jssdk.1.6.0.js";
// //
const emit = defineEmits(["MyPrize"]); // const emit = defineEmits(["MyPrize"]); //
const props = defineProps({ sendMessage: Object }); // props const props = defineProps({ sendMessage: Object }); // props
const store = useStore(); const store = useStore()
const prizeList = reactive([ const prizeList = reactive([
// { {
// id: 1, id: 1,
// prizeNum: 8.8, prizeNum: 8.8,
// isGeted: true, isGeted: true,
// isHas: true, isHas: true,
// spe: "88", spe: '财富88与“礼”共见证',
// }, },
// { {
// id: 2, id: 2,
// prizeNum: 8.8, prizeNum: 8.8,
// isGeted: false, isGeted: false,
// isHas: true, isHas: true,
// spe: "", spe: '添加专属服务人员企微',
// },
]); },
])
// //
onBeforeMount(() => { onBeforeMount(() => { })
let arr = store.state.userAccount.prizeList;
arr.forEach((element) => {
if (element.receiveStatus != -1) {
if (element.type == 1) {
prizeList.push({
id: element.id,
type: element.type,
prizeNum: element.amount,
isGeted: element.receiveStatus,
spe: "财富88与“礼”共见证",
});
}
if (element.type == 2) {
prizeList.push({
id: element.id,
type: element.type,
prizeNum: element.amount,
isGeted: element.receiveStatus,
spe: "添加专属服务人员企微",
});
}
}
});
});
// //
onMounted(() => { onMounted(() => {
gsap.from(".myPrizeCon", { duration: 0.3, autoAlpha: 0 }); gsap.from('.myPrizeCon', { duration: 0.3, autoAlpha: 0 })
gsap.from(".myPrize_container", { gsap.from('.myPrize_container', { duration: 0.3, scale: 0.2, autoAlpha: 0, delay: 0.1 })
duration: 0.3, // gsap.from('.rule_cls_btn', { duration: 0.3, y: 20, autoAlpha: 0, delay: 0.5 })
scale: 0.2, })
autoAlpha: 0,
delay: 0.1,
});
// gsap.from('.rule_cls_btn', { duration: 0.3, y: 20, autoAlpha: 0, delay: 0.5 })
});
const hide = () => { const hide = () => {
emit("MyPrize"); emit('MyPrize')
}; }
const hidePop = () => {
gsap.to(".GotedPop", { duration: 0.5, autoAlpha: 0 });
gsap.to(".myPrizeCon", { duration: 0.5, autoAlpha: 1, delay: 0.2 });
};
//
const getMoney = (val) => {
console.log("val:", val);
//
if (val.isGeted == -2) {
Toast("红包已过24小时不能再提现啦");
} else {
//
if (val.type == 1) {
console.log("牛卡号:", store.state.userAccount.nkh);
if (
store.state.userAccount.nkh == "" ||
store.state.userAccount.nkh == undefined
) {
// Toast("");
Dialog.confirm({
title: "温馨提示",
message: "请先绑定牛卡号",
confirmButtonText: "前往绑定",
})
.then(() => {
wx.miniProgram.navigateTo({
url: "/subs/bind/pages/login/login?source=zszq",
});
})
.catch(() => {
console.log(2);
// on cancel
});
} else {
getLuckyBag(val.id);
}
}
if (val.type == 2) {
if (val.isGeted == 0) {
if (
store.state.userAccount.nkh == "" ||
store.state.userAccount.nkh == undefined
) {
// Toast("");
Dialog.confirm({
title: "温馨提示",
message: "请先绑定牛卡号",
confirmButtonText: "前往绑定",
})
.then(() => {
wx.miniProgram.navigateTo({
url: "/subs/bind/pages/login/login?source=zszq",
});
})
.catch(() => {
console.log(2);
// on cancel
});
} else {
console.log("未领取", val);
getLuckyBag(val.id);
}
}
}
}
};
//
const getLuckyBag = (id) => {
service
.post(
process.env.VUE_APP_API + "/cms-activity/cms88/redpacket/receive/" + id,
{}
)
.then((res) => {
console.log("领取红包结果", res);
let data = res.data;
if (data.code == 0) {
gsap.to(".GotedPop", { duration: 1, autoAlpha: 1, delay: 0.2 });
gsap.to(".myPrizeCon", { duration: 1, autoAlpha: 0 });
getMyPrizeRecored();
} else {
Toast(data.msg);
}
});
};
//
const getMyPrizeRecored = () => {
service
.post(process.env.VUE_APP_API + "/cms-activity/cms88/prize/list", {})
.then((res) => {
console.log("红包记录:", res.data);
store.commit({
type: "updatePrizeList",
prizeList: res.data.data,
});
});
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.myPrizeCon { .myPrizeCon {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.7);
.myPrize_container {
width: 750px;
height: 1180px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; background-color: rgba(0, 0, 0, 0.7);
// .myPrize_container {
.prize_has { width: 750px;
display: flex; height: 1180px;
flex-direction: column; display: flex;
align-items: center; justify-content: center;
.cake { align-items: center;
width: 382px; flex-direction: column;
height: 201px;
@include bg_pos("../assets/img/pop/cake.png");
z-index: 999;
}
.prize_box { .cake {
width: 550px; width: 382px;
margin-top: -34px; height: 201px;
@include bg_pos('../assets/img/pop/cake.png');
.prize_top { z-index: 999;
width: 550px;
height: 135px;
@include bg_pos("../assets/img/pop/prize_box_top.png");
pointer-events: none;
display: flex;
justify-content: center;
align-items: center;
.prize_title {
width: 267px;
height: 58px;
@include bg_pos("../assets/img/pop/my_prize.png");
}
} }
.prize_middle { .prize_box {
width: 550px; width: 550px;
height: 190px; margin-top: -34px;
@include bg_pos("../assets/img/pop/prize_box_middle.png");
margin-top: 0px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.prize_item { .prize_top {
width: 463px; width: 550px;
height: 67px; height: 135px;
display: flex; @include bg_pos('../assets/img/pop/prize_box_top.png');
justify-content: space-between; pointer-events: none;
align-items: center; display: flex;
flex-direction: row; justify-content: center;
margin: 20px auto; align-items: center;
padding-bottom: 10px;
.prize_li { .prize_title {
display: flex; width: 267px;
// justify-content: center; height: 58px;
// align-items: center; @include bg_pos('../assets/img/pop/my_prize.png');
flex-direction: column; }
.prize_num {
color: #ca2f0a;
font-weight: 700;
font-size: 30px;
}
.prize_spe {
color: #ca2f0a;
font-weight: 700;
font-size: 24px;
margin-top: 5px;
}
} }
.buttom { .prize_middle {
width: 147px; width: 550px;
height: 62px; height: 190px;
background-size: 100%; @include bg_pos('../assets/img/pop/prize_box_middle.png');
margin-top: 0px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
img {
width: 100%; .prize_item {
height: 100%; width: 463px;
} height: 67px;
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
margin: 20px auto;
padding-bottom: 10px;
.prize_li {
display: flex;
// justify-content: center;
// align-items: center;
flex-direction: column;
.prize_num {
color: #ca2f0a;
font-weight: 700;
font-size: 30px;
}
.prize_spe {
color: #ca2f0a;
font-weight: 700;
font-size: 24px;
margin-top: 5px;
}
}
.buttom {
width: 147px;
height: 62px;
background-size: 100%;
img {
width: 100%;
height: 100%;
}
}
}
} }
}
.prize_bottom {
width: 550px;
height: 50px;
@include bg_pos('../assets/img/pop/prize_box_bottom.png');
margin-top: 0px;
}
} }
.prize_bottom { .cls_btn {
width: 550px; @include box(72px, 72px);
height: 50px; @include bg_pos('../assets/img/pop/cls_btn.png');
@include bg_pos("../assets/img/pop/prize_box_bottom.png"); margin-top: 50px;
margin-top: 0px;
} }
}
} }
//
.prize_no {
width: 573px;
height: 524px;
@include bg_pos("../assets/img/pop/no_recored_pop.png");
}
.cls_btn {
@include box(72px, 72px);
@include bg_pos("../assets/img/pop/cls_btn.png");
margin-top: 50px;
}
}
}
.GotedPop {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.7);
visibility: hidden;
.goted_container {
width: 750px;
height: 1180px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.goted_box {
@include box(530px, 594px);
@include bg_pos("../assets/img/pop/got_luckyBag_pop.png");
position: relative;
.to_index_btn {
@include pos(394px, 92px, 79px, 389px);
@include bg_pos("../assets/img/pop/to_index_btn.png");
}
}
.cls_btn {
@include box(72px, 72px);
@include bg_pos("../assets/img/pop/cls_btn.png");
margin-top: 50px;
}
}
} }
</style> </style>

View File

@ -1,118 +1,82 @@
<template> <template>
<div class="zz" @touchmove.prevent></div> <div class="rulesCon" @touchmove.prevent>
<div class="rulesCon"> <div class="rules_container">
<div class="rules_container"> <div class="rule_t"></div>
<div class="rule_t"> <div class="rule_cls_btn" @click="hidePop"></div>
<div class="rule_text">
<img src="../assets/img/rule_text.png" alt="" srcset="">
</div> </div>
</div>
<div class="rule_cls_btn" @click="hidePop"></div>
</div> </div>
</div>
</template> </template>
<script setup> <script setup>
import { import { onBeforeMount, onMounted, defineEmits, defineProps, reactive, ref, toRefs } from 'vue'
onBeforeMount,
onMounted,
defineEmits,
defineProps,
reactive,
ref,
toRefs,
} from "vue";
import gsap from "gsap"; import gsap from "gsap";
import axios from "axios"; import axios from 'axios'
import { Toast } from "vant"; import { Toast } from 'vant';
import { useStore } from "vuex"; import { useStore } from "vuex";
// //
const emit = defineEmits(["RulesPop"]); // const emit = defineEmits(["RulesPop"]); //
const props = defineProps({ sendMessage: Object }); // props const props = defineProps({ sendMessage: Object }); // props
const store = useStore(); const store = useStore()
// //
onBeforeMount(() => {}); onBeforeMount(() => { })
// //
onMounted(() => { onMounted(() => {
gsap.from(".rulesCon", { duration: 0.3, autoAlpha: 0 }); gsap.from('.rulesCon', { duration: 0.3, autoAlpha: 0 })
gsap.from(".rule_t", { duration: 0.3, scale: 0.2, autoAlpha: 0, delay: 0.1 }); gsap.from('.rule_t', { duration: 0.3, scale: 0.2, autoAlpha: 0, delay: 0.1 })
gsap.from(".rule_cls_btn", { gsap.from('.rule_cls_btn', { duration: 0.3, y: 20, autoAlpha: 0, delay: 0.5 })
duration: 0.3,
y: 20, })
autoAlpha: 0,
delay: 0.5,
});
});
const hidePop = () => { const hidePop = () => {
emit("RulesPop"); emit('RulesPop')
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.zz {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
}
.rulesCon { .rulesCon {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.7);
.rules_container {
width: 750px;
height: 1180px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; background-color: rgba(0, 0, 0, 0.7);
.rule_t { .rules_container {
@include box(629px, 762px); width: 750px;
@include bg_pos("../assets/img/pop/rule_pop.png"); height: 1180px;
// pointer-events: none; display: flex;
justify-content: center;
position: relative; align-items: center;
flex-direction: column;
.rule_text{ .rule_t {
@include pos(563px, 630px, 30px, 95px); @include box(629px, 762px);
overflow: hidden; @include bg_pos('../assets/img/pop/rule_pop.png');
overflow-y: scroll; pointer-events: none;
// @include bg_pos("../assets/img/rule_text.png");
img{
width: 100%;
height: 2874px;
} }
}
.rule_cls_btn {
@include box(72px, 72px);
@include bg_pos('../assets/img/pop/cls_btn.png');
margin-top: 50px;
}
} }
.rule_cls_btn {
@include box(72px, 72px);
@include bg_pos("../assets/img/pop/cls_btn.png");
margin-top: 50px;
}
}
} }
</style> </style>

View File

@ -1,396 +1,101 @@
<template> <template>
<div class="serviceCon" @touchmove.prevent> <div class="serviceCon" @touchmove.prevent>
<div class="service_container"> <div class="service_container">
<!-- 未添加 --> <div class="service_box">
<div class="service_box" v-if="isadd == 0"> <div class="eqcode_box">
<div class="eqcode_box"> <img :src="store.state.userAccount.eqcodeImg" alt="">
<img :src="store.state.userAccount.eqcodeImg" alt="" /> </div>
</div>
<div class="service_cls_btn" @click="hidePop"></div>
</div> </div>
</div>
<div class="update" v-if="!isgot" @click="updateStaus"></div>
<!-- 已经添加过并且领取了红包 -->
<div class="is_got_box" v-if="isadd == 1 && isgot"></div>
<!-- 红包中奖 -->
<div class="has_service_box" v-if="isadd == 1 && !isgot && !noPrize">
<div class="money">{{ moneyNum }}</div>
<div class="get_luckybag" @click="getMoneyFn"></div>
</div>
<!-- 红包未中奖 -->
<div class="no_prize" v-if="isadd == 1 && !isgot && noPrize"></div>
<div class="service_cls_btn" @click="hidePop"></div>
</div> </div>
</div>
<!-- 领奖页面 -->
<div class="getMoneyCon">
<div class="getMoney_container">
<div class="is_added">
<div class="go_index_btn" @click="hidePop"></div>
</div>
</div>
</div>
</template> </template>
<script setup> <script setup>
import { import { onBeforeMount, onMounted, defineEmits, defineProps, reactive, ref, toRefs } from 'vue'
onBeforeMount,
onMounted,
defineEmits,
defineProps,
reactive,
ref,
toRefs,
} from "vue";
import gsap from "gsap"; import gsap from "gsap";
import axios from "axios"; import axios from 'axios'
import { Toast, Dialog } from "vant"; import { Toast } from 'vant';
import { useStore } from "vuex"; import { useStore } from "vuex";
import service from "@/api/httpServe";
import qs from "qs";
// //
const emit = defineEmits(["ServicePop"]); // const emit = defineEmits(["ServicePop"]); //
const props = defineProps({ sendMessage: Object }); // props const props = defineProps({ sendMessage: Object }); // props
const store = useStore(); const store = useStore()
const eqcode = ref(require("../assets/img/pop/eqcode.png"));
const isadd = ref(0); // const eqcode = ref(require('../assets/img/pop/eqcode.png'))
const isgot = ref(false); //
const isDraw = ref(false); //
const redpacketId = ref(0); //Id
const moneyNum = ref(""); //
const isBingo = ref(false); //
const noPrize = ref(false); //
const noFirstAdd = ref(false);
//
const updateStaus = () => {
getIsAddService();
};
const isLost = ref(false);
// //
onBeforeMount(() => { onBeforeMount(() => { })
let arr = store.state.userAccount.prizeList;
arr.forEach((element) => {
if (element.type == 2) {
console.log("已经抽过》》》》》");
isgot.value = true;
isDraw.value = true;
noFirstAdd.value = true;
if (element.receiveStatus == -2) {
isLost.value = true;
}
}
// if(element.amount != 0){
// isBingo.value = true
// }
});
if (store.state.userAccount.isAddCustomer == 1) {
isadd.value = 1;
}
if (store.state.userAccount.isAddCustomer == 0 && !noFirstAdd.value) {
isadd.value = 0;
}
});
// //
onMounted(() => { onMounted(() => {
gsap.from(".serviceCon", { duration: 0.3, autoAlpha: 0 }); gsap.from('.serviceCon', { duration: 0.3, autoAlpha: 0 })
gsap.from(".service_box,.has_service_box,.is_got_box", { gsap.from('.service_box', { duration: 0.3, scale: 0.2, autoAlpha: 0, delay: 0.1 })
duration: 0.3, gsap.from('.service_cls_btn', { duration: 0.3, y: 20, autoAlpha: 0, delay: 0.5 })
scale: 0.2, })
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,
autoAlpha: 0,
delay: 0.5,
});
console.log("添加企微状态:", isadd.value);
//
if (isadd.value == 1) {
if (isgot.value == false) {
draw();
} else {
//
}
}
});
const hidePop = () => { const hidePop = () => {
emit("ServicePop"); emit('ServicePop')
}; }
//
const draw = () => {
let type = 2;
service
.post(process.env.VUE_APP_API + "/cms-activity/cms88/redpacket/draw", {
xglOpenId: store.state.userAccount.xglOpenId,
redpacketType: type,
})
.then((res) => {
console.log("添加企微-抽取红包结果:", res);
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);
}
});
};
const getMoneyFn = () => {
if (!isLost.value) {
if (
store.state.userAccount.nkh == "" ||
store.state.userAccount.nkh == undefined
) {
// Toast("");
Dialog.confirm({
title: "温馨提示",
message: "请先绑定牛卡号",
confirmButtonText: "前往绑定",
})
.then(() => {
wx.miniProgram.navigateTo({
url: "/subs/bind/pages/login/login?source=zszq",
});
})
.catch(() => {
// on cancel
});
} else {
//
getLuckyBag();
}
}
};
//
const getLuckyBag = () => {
service
.post(
process.env.VUE_APP_API +
"/cms-activity/cms88/redpacket/receive/" +
redpacketId.value,
{}
)
.then((res) => {
console.log("领取红包结果", res);
let data = res.data;
if (data.code == 0) {
gsap.to(".serviceCon", { duration: 0.5, autoAlpha: 0 });
gsap.to(".getMoneyCon", { duration: 0.5, autoAlpha: 1 });
getMyPrizeRecored();
} else {
Toast(data.msg);
}
});
};
//
const getMyPrizeRecored = () => {
service
.post(process.env.VUE_APP_API + "/cms-activity/cms88/prize/list", {})
.then((res) => {
console.log("红包记录:", res.data);
store.commit({
type: "updatePrizeList",
prizeList: res.data.data,
});
});
};
// 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.serviceCon { .serviceCon {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.7);
.service_container {
width: 750px;
height: 1180px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; background-color: rgba(0, 0, 0, 0.7);
.is_got_box {
@include box(530px, 594px);
@include bg_pos("../assets/img/pop/has_service_pop.png");
}
.has_service_box { .service_container {
@include box(530px, 594px); width: 750px;
@include bg_pos("../assets/img/pop/service_pop_1.png"); height: 1180px;
position: relative; display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.money { .service_box {
@include pos(90px, 45px, 198px, 150px); @include box(573px, 688px);
@include bg_pos('../assets/img/pop/service_box.png');
pointer-events: none;
position: relative;
text-align: center;
line-height: 45px;
color: #ca2f0a;
font-weight: 700;
}
.get_luckybag {
@include pos(274px, 92px, 139px, 389px);
@include bg_pos("../assets/img/pop/get_luckyBag_btn.png");
}
}
// .eqcode_box {
.no_prize { width: 210px;
@include box(573px, 362px); height: 210px;
@include bg_pos("../assets/img/pop/no_prize_pop.png"); position: absolute;
} top: 412px;
left: 192px;
.service_box { img {
@include box(573px, 688px); width: 100%;
@include bg_pos("../assets/img/pop/service_box.png"); height: 100%
// pointer-events: none; }
position: relative; }
}
.eqcode_box {
width: 210px; .service_cls_btn {
height: 210px; @include box(72px, 72px);
position: absolute; @include bg_pos('../assets/img/pop/cls_btn.png');
top: 412px; margin-top: 50px;
left: 192px;
img {
width: 100%;
height: 100%;
} }
}
}
.update {
@include box(274px, 92px);
@include bg_pos("../assets/img/update_btn.png");
margin-top: 20px;
} }
.service_cls_btn {
@include box(72px, 72px);
@include bg_pos("../assets/img/pop/cls_btn.png");
margin-top: 50px;
}
}
}
.getMoneyCon {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.7);
visibility: hidden;
.getMoney_container {
width: 750px;
height: 1180px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 750px;
height: 1180px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.is_added {
@include box(530px, 594px);
@include bg_pos("../assets/img/pop/got_luckyBag_pop.png");
position: relative;
.go_index_btn {
@include pos(394px, 92px, 79px, 389px);
@include bg_pos("../assets/img/pop/to_index_btn.png");
}
}
}
} }
</style> </style>

View File

@ -1,79 +1,4 @@
export default [ export default [
require('../assets/img/rule_text.png'),
require('../assets/img/zz.png'),
require('../assets/img/select_box.png'),
require('../assets/img/title_main.png'),
require('../assets/img/top_bg.jpg'),
require('../assets/img/zhuanpan.png'),
require('../assets/img/activity_1.png'),
require('../assets/img/activity_2.png'),
require('../assets/img/activity_3.png'),
require('../assets/img/activity_4.png'),
require('../assets/img/activity_5.png'),
require('../assets/img/activity_6.png'),
require('../assets/img/activity_bg.jpg'),
require('../assets/img/activity_box.png'),
require('../assets/img/activity_title.png'),
require('../assets/img/caidai.png'),
require('../assets/img/cloud_bottom.png'),
require('../assets/img/cloud_bottom3.png'),
require('../assets/img/cloud_left_1.png'),
require('../assets/img/cloud_left_2.png'),
require('../assets/img/cloud_left_3.png'),
require('../assets/img/cloud_right_1.png'),
require('../assets/img/cloud_right_2.png'),
require('../assets/img/cloud_right_3.png'),
require('../assets/img/draw_btn.png'),
require('../assets/img/icon_left_1.png'),
require('../assets/img/icon_left_2.png'),
require('../assets/img/icon_right_1.png'),
require('../assets/img/icon_right_2.png'),
require('../assets/img/laba.png'),
require('../assets/img/li_btn_1.png'),
require('../assets/img/li_btn_2.png'),
require('../assets/img/li_btn_3.png'),
require('../assets/img/li_btn_4.png'),
require('../assets/img/li_btn_5.png'),
require('../assets/img/li_btn_6.png'),
require('../assets/img/logo.png'),
require('../assets/img/luckybag.png'),
require('../assets/img/luckybag_2.png'),
require('../assets/img/luckybag_left.png'),
require('../assets/img/luckybag_right.png'),
require('../assets/img/luckybag_right_2.png'),
require('../assets/img/no_prize_text.png'),
require('../assets/img/notice_box.png'),
require('../assets/img/p_1.png'),
require('../assets/img/p_2.png'),
require('../assets/img/p_3.png'),
require('../assets/img/p_4.png'),
require('../assets/img/p_5.png'),
require('../assets/img/prize_btn.png'),
require('../assets/img/prize_btn_text.png'),
require('../assets/img/prize_text.png'),
require('../assets/img/rule_btn.png'),
require('../assets/img/rule_btn_text.png'),
require('../assets/img/pop/cake.png'),
require('../assets/img/pop/cls_btn.png'),
require('../assets/img/pop/draw_got_btn.png'),
require('../assets/img/pop/eqcode.png'),
require('../assets/img/pop/get_luckyBag_btn.png'),
require('../assets/img/pop/got_btn.png'),
require('../assets/img/pop/got_luckyBag_pop.png'),
require('../assets/img/pop/has_service_pop.png'),
require('../assets/img/pop/luckybag.png'),
require('../assets/img/pop/my_prize.png'),
require('../assets/img/pop/no_prize_pop.png'),
require('../assets/img/pop/no_recored_pop.png'),
require('../assets/img/pop/prize_box.png'),
require('../assets/img/pop/prize_box_bottom.png'),
require('../assets/img/pop/prize_box_middle.png'),
require('../assets/img/pop/prize_box_top.png'),
require('../assets/img/pop/rule_pop.png'),
require('../assets/img/pop/service_box.png'),
require('../assets/img/pop/service_pop_1.png'),
require('../assets/img/pop/service_pop_2.png'),
require('../assets/img/pop/to_index_btn.png'),
require('../assets/img/pop/view_btn.png'),
require('../assets/img/pop/ishas_service.png'),
]; ];

View File

@ -1,305 +1,112 @@
<template> <template>
<div class="homePage"> <div class="homePage">
<!-- 首页 -->
<Index @indexPage="indexPage" v-if="showIndex" />
<!-- 加载页 --> <!-- 加载页 -->
<Loading v-if="!showIndex" />
<!-- 首页 -->
<Index @indexPage="indexPage" />
</div> </div>
</template> </template>
<script setup> <script setup>
import { import { onBeforeMount, onMounted, defineEmits, defineProps, reactive, ref, toRefs, getCurrentInstance, computed } from 'vue'
onBeforeMount,
onMounted,
defineEmits,
defineProps,
reactive,
ref,
toRefs,
getCurrentInstance,
computed,
} from "vue";
import gsap from "gsap"; import gsap from "gsap";
import axios from "axios"; import axios from 'axios'
import { Toast, Dialog } from "vant"; import { Toast, Dialog } from 'vant';
import { useStore } from "vuex"; import { useStore } from "vuex";
// import { get_authorize, get_jssdk } from '@/api/authorize-api' // import { get_authorize, get_jssdk } from '@/api/authorize-api'
import service from "@/api/httpServe"; import service from "@/api/httpServe"
import qs from "qs"; import qs from 'qs'
import h5plugin from "@/utils/plugin"; import h5plugin from '@/utils/plugin'
import Index from "@/components/Index"; import Index from "@/components/Index"
import Loading from "@/components/Loading";
import imgList from "@/data/imgList";
import wx from "@/utils/wx-jssdk.1.6.0.js";
// //
const emit = defineEmits(["indexPage"]); // const emit = defineEmits(["indexPage"]); //
const props = defineProps({ sendMessage: Object }); // props const props = defineProps({ sendMessage: Object }); // props
const store = useStore(); //vuex const store = useStore() //vuex
const { proxy } = getCurrentInstance(); //plugin const { proxy } = getCurrentInstance(); //plugin
// //
const authData = ref(""); const authData = ref('')
const authCode = ref(""); const authCode = ref('')
const showIndex = ref(false);
//
const getActivityNum = () => {
return service.post(
process.env.VUE_APP_API + "/cms-activity/cms88/user/count/"
);
// .then((res) => {
// console.log(res.data.data);
// store.commit({
// type: "updateParticipantNum",
// participantNum: res.data.data,
// });
// });
};
//
const getBrithday = () => {
return service.post(
process.env.VUE_APP_API + "/cms-activity/cms88/user/isin/birthday/",{}
);
};
// isInActivityDate 0 1
const getIsAddService = (id) => {
let isInActivityDate = id;
return service.post(
process.env.VUE_APP_API +
"/cms-activity/cms88/qywx/isadded/" +
isInActivityDate,
{}
);
};
//
const getMyPrizeRecored = () => {
return service.post(
process.env.VUE_APP_API + "/cms-activity/cms88/prize/list",
{}
);
};
// -
const gerCardId = (carid) => {
return service.get(
process.env.VUE_APP_API + "/cms-activity/cms88/card/qrcode/" + carid
);
};
//
const getInfo = () => {
return service.post(
process.env.VUE_APP_API + "/cms-activity/cms88/nkh/info",
{}
);
};
//
const apiAll = () => {
//
Promise.all([
gerCardId(store.state.userAccount.cardId),
getInfo(),
getMyPrizeRecored(),
getBrithday(),
getActivityNum(),
getIsAddService(0),
getIsAddService(1),
]).then((result) => {
// console.log("", result);
console.log("1.获取企业微信二维码:", result[0].data);
console.log("2.获取资金账号:", result[1].data);
console.log("3.获取红包记录:", result[2].data);
console.log("4.获取生日状态:", result[3].data);
console.log("5.获取活动人数:", result[4].data);
console.log("6.获取添加企业微信状态【活动前是否存在】:", result[5].data);
console.log("7.获取添加企业微信状态【活动期间是否添加】:", result[6].data);
//
store.commit({ type: "updateeEqcodeImg", eqcodeImg: result[0].data.data });
//
store.commit({ type: "updateeNkh", nkh: result[1].data.data });
//
store.commit({ type: "updatePrizeList", prizeList: result[2].data.data });
//
store.commit({ type: "updateBirthMoon", isBirthMon: result[3].data.data });
//
store.commit({
type: "updateParticipantNum",
participantNum: result[4].data.data,
});
//
store.commit({
type: "updateisAddCustomerBefore",
isAddCustomerBefore: result[5].data.data,
});
//
store.commit({
type: "updateIsAddCustomer",
isAddCustomer: result[6].data.data,
});
//
pageImgsArrLoad(imgList).then(() => {
console.log("load done");
showIndex.value = true;
gsap.from(".homePage", { duration: 0.1, autoAlpha: 0, y: 100 });
});
});
};
// //
onBeforeMount(() => { onBeforeMount(() => {
goBackEvent() console.log("link",window.location.href);
if (!h5plugin.isWX()) {
apiAll();
}
console.log("link", window.location.href);
console.log("用户活动信息:", store.state.userAccount);
console.log("code:", h5plugin.getQueryString("code"));
// //
if (h5plugin.isWX()) { if (h5plugin.isWX()) {
if (h5plugin.getQueryString("code")) { console.log('code:', h5plugin.getQueryString('code'));
if (h5plugin.getQueryString('code')) {
// codeopenid // codeopenid
authCode.value = h5plugin.getQueryString("code"); authCode.value = h5plugin.getQueryString('code')
getOpenId(authCode.value); getOpenId(authCode.value)
} else { } else {
getCode(); getCode()
} }
} }
// let token = h5plugin.getQueryString('token')
// openid
store.commit({ type: "updateToken", token: h5plugin.getQueryString('token') });
store.commit({ type: "updateCardId", cardId: h5plugin.getQueryString('cardId') });
store.commit({ type: "updateNkh", cardId: h5plugin.getQueryString('nkh') });
console.log("用户活动信息:", store.state.userAccount);
}); });
// //
onMounted(() => { onMounted(() => {
fontAdpat();
// stopBack() });
});
// //
const indexPage = (actions) => { const indexPage = (actions) => {
console.log("来自index组件", actions); console.log("来自index组件", actions);
}; }
// code
const getCode = () => { const getCode = () => {
let redirect_uri = window.location.href; let redirect_uri = window.location.href;
service.post(process.env.VUE_APP_API + '/zsApi/xfhdAuthorize', qs.stringify({
redirect_uri: redirect_uri
service })).then((res) => {
.post(process.env.VUE_APP_API + "/cms-activity/cms88/zsApi/xfhdAuthorize", { let code = res.data.data
redirect_uri: redirect_uri, authCode.value = res.data.data
}) window.location.href = res.data.data
.then((res) => { })
let code = res.data.data; }
console.log("get code结果3", res);
authCode.value = res.data.data;
window.location.href = res.data.data;
// location.href = res.data.data;
// window.open(res.data.data)
});
};
// openid // openid
const getOpenId = (code) => { const getOpenId = (code) => {
service
.post(
process.env.VUE_APP_API + "/cms-activity/cms88/zsApi/oauthInfo",
// qs.stringify({
// code: code
// })
{
code: code,
}
)
.then((res) => {
if (res.data.code == 0) {
console.log("后端返回的openid", res.data);
// openid
store.commit({ type: "updateXGLOpenid", openid: res.data.data });
apiAll();
}
});
};
// service.post(process.env.VUE_APP_API + '/zsApi/oauthInfo', qs.stringify({
const imgPreloader = (url) => { code: code
return new Promise((resolve, reject) => { })).then((res) => {
let image = new Image();
image.src = url; if (res.data.code == 0) {
image.onload = () => { console.log("后端返回的openid", res.data);
resolve(); // openid
}; store.commit({ type: 'updateXGLOpenid', openid: res.data.data })
image.onerror = () => { console.log("用户活动信息2", store.state.userAccount);
reject();
};
});
};
//
const pageImgsArrLoad = (imgs) => {
let promiseArr = [];
imgs.forEach((element) => {
promiseArr.push("img", imgPreloader(element));
});
return Promise.all(promiseArr);
};
//
const fontAdpat = () => {
if (
typeof WeixinJSBridge == "object" &&
typeof WeixinJSBridge.invoke == "function"
) {
handleFontSize();
} else {
if (document.addEventListener) {
document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
} else if (document.attachEvent) {
document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
} }
}
function handleFontSize() {
//
WeixinJSBridge.invoke("setFontSizeCallback", { fontSize: 0 });
//
WeixinJSBridge.on("menu:setfont", function () {
WeixinJSBridge.invoke("setFontSizeCallback", { fontSize: 0 });
});
}
};
// })
const stopBack = () => { }
history.pushState(null, null, document.URL);
window.addEventListener("popstate", function () {
// history.pushState(null, null, document.URL);
history.back(-1);
});
};
// 退
const goBackEvent = () => {
history.pushState({ page: 1 }, null, window.location.href);
//popstate
window.addEventListener("popstate", (event) => {
console.log("退出");
wx.miniProgram.navigateBack();
});
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -312,6 +119,7 @@ const goBackEvent = () => {
user-select: none; user-select: none;
} }
div { div {
color: #fff; color: #fff;
} }
@ -325,6 +133,6 @@ div {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
background: #ffd195; background: rgb(255, 255, 255);
} }
</style> </style>

View File

@ -3,8 +3,7 @@ import { createRouter, createWebHashHistory } from 'vue-router';
const router = createRouter({ const router = createRouter({
history: createWebHashHistory(), history: createWebHashHistory(),
routes: [ routes: [
{ path: '/', component: () => import('@/views/Home/Home.vue') }, { path: '/', component: () => import('@/views/Home.vue') }
{ path: '/login', component: () => import('@/views/Home/Login.vue') }
] ]
}); });

View File

@ -1,30 +1,21 @@
import { createStore } from 'vuex'; import { createStore } from 'vuex';
import h5plugin from "@/utils/plugin.js" import h5plugin from "@/utils/plugin.js"
export default createStore({ export default createStore({
// 数据源 // 数据源
state: { state: {
userAccount: { userAccount: {
// xglOpenId: 'o9B_fvjtyh2KELQYc2t9A3MEh7JQ', //用户openid xglOpenid: 'openid12138', //用户openid
xglOpenId: '', //用户openid token: '13f88993882b4dc0832351566c11a1eb', //用户token
// xglOpenId: h5plugin.getQueryString('openid'), //用户openid cardId: '94207', //carid
token: h5plugin.getQueryString('token'), //用户token
cardId: h5plugin.getQueryString('cardId'), //carid
nkh: '', //牛卡号 nkh: '', //牛卡号
isDraw: false, //是否抽过奖 isDraw: false, //是否抽过奖
isHasAccount: false, //是否存在牛卡号 isHasAccount: false, //是否存在牛卡号
isAddCustomer: 0, //活动期间内是否添加过服务人员 isAddCustomer: false, //是否添加过服务人员
isAddCustomerBefore:0, //活动前是否存在服务人员
isHasPrize: [], //是否存在奖品 isHasPrize: [], //是否存在奖品
participantNum: 0, //活动参与人数 participantNum: 1213821, //活动参与人数
prizeResult: 0, //中奖金额 prizeResult: 73.11, //中奖金额
eqcodeImg: '', //二维码 eqcodeImg: '' //二维码
isBirthMon: 1, //生日是否处于当月
prizeList: [], //奖品列表
uuid: h5plugin.getQueryString('uuid'), //carid
}, },
}, },
@ -35,7 +26,7 @@ export default createStore({
mutations: { mutations: {
// 更新信广龙openid // 更新信广龙openid
updateXGLOpenid(state, val) { updateXGLOpenid(state, val) {
state.userAccount.xglOpenId = val.openid state.userAccount.xglOpenid = val.openid
}, },
// 更新token // 更新token
@ -43,45 +34,21 @@ export default createStore({
state.userAccount.token = val.token state.userAccount.token = val.token
}, },
// 更新牛卡号
updateeNkh(state,val){
state.userAccount.nkh = val.nkh
},
// 更新cardId
updateCardId(state,val){ updateCardId(state,val){
state.userAccount.cardId = val.cardId state.userAccount.cardId = val.cardId
}, },
// 更新二维码 updateNkh(state,val){
state.userAccount.nkh = val.nkh
},
updateeEqcodeImg(state,val){ updateeEqcodeImg(state,val){
state.userAccount.eqcodeImg = val.eqcodeImg state.userAccount.eqcodeImg = val.eqcodeImg
}, },
// 更新活动参与人数
updateParticipantNum(state,val){ updateParticipantNum(state,val){
state.userAccount.participantNum = val.participantNum 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
}
}, },
// 改变方法:异步 // 改变方法:异步

File diff suppressed because one or more lines are too long