diff --git a/src/api/httpServe.js b/src/api/httpServe.js
index 7c0f7e4..68883f2 100644
--- a/src/api/httpServe.js
+++ b/src/api/httpServe.js
@@ -29,7 +29,7 @@ const service = axios.create({
// 添加请求拦截器
service.interceptors.request.use(function (config) {
// 在发送请求之前做些什么
- console.log("开始请求");
+ // console.log("开始请求");
config
return config;
}, function (error) {
diff --git a/src/assets/img/activity_6.png b/src/assets/img/activity_6.png
new file mode 100644
index 0000000..ca8b787
Binary files /dev/null and b/src/assets/img/activity_6.png differ
diff --git a/src/assets/img/cloud_bottom.png b/src/assets/img/cloud_bottom.png
index 3836282..ba723dd 100644
Binary files a/src/assets/img/cloud_bottom.png and b/src/assets/img/cloud_bottom.png differ
diff --git a/src/assets/img/cloud_bottom3.png b/src/assets/img/cloud_bottom3.png
new file mode 100644
index 0000000..3836282
Binary files /dev/null and b/src/assets/img/cloud_bottom3.png differ
diff --git a/src/assets/img/li_btn_6.png b/src/assets/img/li_btn_6.png
new file mode 100644
index 0000000..c6ce4b6
Binary files /dev/null and b/src/assets/img/li_btn_6.png differ
diff --git a/src/assets/img/pop/no_prize_pop.png b/src/assets/img/pop/no_prize_pop.png
new file mode 100644
index 0000000..646cfd8
Binary files /dev/null and b/src/assets/img/pop/no_prize_pop.png differ
diff --git a/src/assets/img/pop/no_recored_pop.png b/src/assets/img/pop/no_recored_pop.png
new file mode 100644
index 0000000..9e5a957
Binary files /dev/null and b/src/assets/img/pop/no_recored_pop.png differ
diff --git a/src/components/Draw.vue b/src/components/Draw.vue
new file mode 100644
index 0000000..c92edbd
--- /dev/null
+++ b/src/components/Draw.vue
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Index.vue b/src/components/Index.vue
index a5d5554..6e94735 100644
--- a/src/components/Index.vue
+++ b/src/components/Index.vue
@@ -1,98 +1,97 @@
-
-
-
-
-
-
-
-
-
-
-
-
-

-
活动已有{{
- store.state.userAccount.participantNum
- }}人参与
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+

+
活动已有{{ store.state.userAccount.participantNum }}人参与
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/src/components/LuckyWheel.vue b/src/components/LuckyWheel.vue
index b4e2bca..5c5b449 100644
--- a/src/components/LuckyWheel.vue
+++ b/src/components/LuckyWheel.vue
@@ -37,6 +37,7 @@ import {
reactive,
ref,
toRefs,
+ defineExpose
} from "vue";
import gsap from "gsap";
import axios from "axios";
@@ -161,6 +162,12 @@ const btn = () => {
// 第一个参数 对应奖品对应id, 第二个参数是是否多旋转一会儿 fasle旋转一圈就停止
showDrawAni(2, true);
};
+
+// 暴露出方法给父组件调用
+defineExpose({
+ showDrawAni
+})
+
\ No newline at end of file
diff --git a/src/page/Home/Home.vue b/src/page/Home/Home.vue
index 4f4276a..0b45c11 100644
--- a/src/page/Home/Home.vue
+++ b/src/page/Home/Home.vue
@@ -57,17 +57,24 @@ const getBrithday = () => {
{}
)
.then((res) => {
- console.log(res);
+ console.log("生日是否处于当月:",res.data.data);
+ store.state.userAccount.isBirthMon = 1
+ // store.commit({
+ // type: "updateBirthMoon",
+ // // isBirthMon: res.data.data,
+ // isBirthMon: 1,
+ // });
+
});
};
// 查询是否添加了企微: isInActivityDate 0否 1是
const getIsAddService = ()=>{
- let isInActivityDate = 0
+ let isInActivityDate = 1
service
.post(process.env.VUE_APP_API + "/cms-activity/cms88/qywx/isadded/"+ isInActivityDate,{})
.then((res) => {
- console.log("是否添加了企微",res);
+ console.log("是否添加了企微",res.data);
});
}
@@ -75,12 +82,12 @@ const getMyPrizeRecored = ()=>{
service
.post(process.env.VUE_APP_API + "/cms-activity/cms88/prize/list",{})
.then((res) => {
- console.log("红包记录:",res);
+ console.log("红包记录:",res.data);
});
}
-// 查询员工企业微信二维码
+// 查询员工企业-微信二维码
const gerCardId = (carid) => {
service
.get(
@@ -100,19 +107,30 @@ const getInfo = () => {
service
.post(process.env.VUE_APP_API + "/cms-activity/cms88/nkh/info", {})
.then((res) => {
- console.log("资金账号:", res);
+ console.log("资金账号:", res.data);
});
};
// 页面未挂载
onBeforeMount(() => {
- gerCardId(store.state.userAccount.cardId);
- getInfo();
- getMyPrizeRecored();
- getBrithday();
- getActivityNum();
- getIsAddService()
+ // gerCardId(store.state.userAccount.cardId);
+ // getInfo();
+ // getMyPrizeRecored();
+ // getBrithday();
+ // getActivityNum();
+ // getIsAddService();
+ // 页面挂载前请求接口
+ let taskAll = Promise.all([
+ gerCardId(store.state.userAccount.cardId),
+ getInfo(),
+ getMyPrizeRecored(),
+ getBrithday(),
+ getActivityNum(),
+ getIsAddService(),
+ ]).then(result =>{
+ console.log("接口都请求完成");
+ })
// 预加载图片资源
pageImgsArrLoad(imgList)
@@ -165,17 +183,17 @@ const getCode = () => {
let redirect_uri = window.location.href;
// service.post(process.env.VUE_APP_API + '/cms-activity/cms88/zsApi/xfhdAuthorize?redirect_uri='+redirect_uri,
service.post(process.env.VUE_APP_API + '/cms-activity/cms88/zsApi/xfhdAuthorize',
- qs.stringify({
- redirect_uri: redirect_uri
- })
-
- // {
+ // qs.stringify({
// redirect_uri: redirect_uri
- // }
+ // })
+
+ {
+ redirect_uri: redirect_uri
+ }
).then((res) => {
let code = res.data.data
- console.log("get code2992",res);
+ console.log("get code结果",res);
// authCode.value = res.data.data
// window.location.href = res.data.data
})
@@ -184,9 +202,14 @@ const getCode = () => {
// 授权获取openid
const getOpenId = (code) => {
- service.post(process.env.VUE_APP_API + '/cms-activity/cms88/zsApi/oauthInfo', qs.stringify({
+ service.post(process.env.VUE_APP_API + '/cms-activity/cms88/zsApi/oauthInfo',
+ // qs.stringify({
+ // code: code
+ // })
+ {
code: code
- })).then((res) => {
+ }
+ ).then((res) => {
if (res.data.code == 0) {
console.log("后端返回的openid:", res.data);
diff --git a/src/store/index.js b/src/store/index.js
index cd85b92..761fc7a 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -7,7 +7,7 @@ export default createStore({
// 数据源
state: {
userAccount: {
- xglOpenid: '', //用户openid
+ xglOpenid: 'o9B_fvsbOdSIIED6fPHjj_lHL24w', //用户openid
token: h5plugin.getQueryString('token'), //用户token
cardId: h5plugin.getQueryString('cardId'), //carid
nkh: h5plugin.getQueryString('nkh'), //牛卡号
@@ -17,7 +17,8 @@ export default createStore({
isHasPrize: [], //是否存在奖品
participantNum: 0, //活动参与人数
prizeResult: 0, //中奖金额
- eqcodeImg: '' //二维码
+ eqcodeImg: '', //二维码
+ isBirthMon: 0, //生日是否处于当月
},
},
@@ -51,6 +52,10 @@ export default createStore({
updateParticipantNum(state,val){
state.userAccount.participantNum = val.participantNum
},
+
+ updateBirthMoon(state,val){
+ state.userAccount.isBirthMon = val.isBirthMon
+ },
},
// 改变方法:异步