diff --git a/src/assets/img/pop/rule_pop.png b/src/assets/img/pop/rule_pop.png
index d8178a2..a94ac18 100644
Binary files a/src/assets/img/pop/rule_pop.png and b/src/assets/img/pop/rule_pop.png differ
diff --git a/src/assets/img/pop/view_btn.png b/src/assets/img/pop/view_btn.png
index c9e70e7..246c162 100644
Binary files a/src/assets/img/pop/view_btn.png and b/src/assets/img/pop/view_btn.png differ
diff --git a/src/assets/img/rule_text.png b/src/assets/img/rule_text.png
new file mode 100644
index 0000000..7c885cd
Binary files /dev/null and b/src/assets/img/rule_text.png differ
diff --git a/src/components/Draw.vue b/src/components/Draw.vue
index eece9e6..9cab963 100644
--- a/src/components/Draw.vue
+++ b/src/components/Draw.vue
@@ -114,7 +114,7 @@ const redpacket = (prizeId) => {
},
});
} else {
- Toast(data.msg);
+ // Toast(data.msg);
Dialog.confirm({
title: "温馨提示",
diff --git a/src/components/Index.vue b/src/components/Index.vue
index de7c842..f5d19e8 100644
--- a/src/components/Index.vue
+++ b/src/components/Index.vue
@@ -12,7 +12,9 @@
-
{{ drawAmount }}元
+
+ {{ drawAmount }}元
+
+
+ 、
+
+
+
+
+
{{serviceLuckyMsg.money}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/MyPrize.vue b/src/components/MyPrize.vue
index 0c1a599..475d629 100644
--- a/src/components/MyPrize.vue
+++ b/src/components/MyPrize.vue
@@ -60,8 +60,9 @@ import gsap from "gsap";
import axios from "axios";
import service from "@/api/httpServe";
import qs from "qs";
-import { Toast } from "vant";
+import { Toast, Dialog } from "vant";
import { useStore } from "vuex";
+import wx from "@/utils/wx-jssdk.1.6.0.js";
// 初始化
const emit = defineEmits(["MyPrize"]); // 声明触发事件,对应父组件上面的方法
@@ -141,7 +142,21 @@ const getMoney = (val) => {
// 红包类型未参与红包: 需先绑定牛卡号
if (val.type == 1) {
if (!store.state.userAccount.nkh) {
- Toast("牛卡号为空,先绑定牛卡号");
+ // Toast("牛卡号为空,先绑定牛卡号");
+ Dialog.confirm({
+ title: "温馨提示",
+ message: "牛卡号为空,先绑定牛卡号",
+ confirmButtonText: "前往绑定",
+ })
+ .then(() => {
+ wx.miniProgram.navigateTo({
+ url: "/subs/bind/pages/login/login",
+ });
+ })
+ .catch(() => {
+ console.log(2);
+ // on cancel
+ });
} else {
getLuckyBag(val.id);
}
@@ -164,8 +179,30 @@ const getLuckyBag = (id) => {
)
.then((res) => {
console.log("领取红包结果", res);
- gsap.to(".GotedPop", { duration: 1, autoAlpha: 1, delay: 0.2 });
- gsap.to(".myPrizeCon", { duration: 1, autoAlpha: 0 });
+
+ 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,
+ });
});
};
diff --git a/src/components/Rules.vue b/src/components/Rules.vue
index 7897e92..c14d501 100644
--- a/src/components/Rules.vue
+++ b/src/components/Rules.vue
@@ -1,82 +1,118 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/ServiceList.vue b/src/components/ServiceList.vue
index 165c8a7..a7adf5f 100644
--- a/src/components/ServiceList.vue
+++ b/src/components/ServiceList.vue
@@ -13,13 +13,21 @@
-
{{moneyNum}}
+
{{ moneyNum }}
+
+
@@ -166,14 +204,13 @@ const getLuckyBag = () => {
@include bg_pos("../assets/img/pop/service_pop_1.png");
position: relative;
- .money{
+ .money {
@include pos(90px, 45px, 198px, 150px);
text-align: center;
line-height: 45px;
color: #ca2f0a;
font-weight: 700;
-
}
.get_luckybag {
@@ -209,4 +246,46 @@ const getLuckyBag = () => {
}
}
}
+
+.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");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/page/Home/Home.vue b/src/page/Home/Home.vue
index 9c37eb8..39f63b3 100644
--- a/src/page/Home/Home.vue
+++ b/src/page/Home/Home.vue
@@ -1,9 +1,11 @@
-
+
+
+
@@ -28,6 +30,7 @@ import service from "@/api/httpServe";
import qs from "qs";
import h5plugin from "@/utils/plugin";
import Index from "@/components/Index";
+import Loading from "@/components/Loading";
import imgList from "@/data/imgList";
// 初始化
@@ -182,7 +185,7 @@ const apiAll = ()=>{
// 页面未挂载
onBeforeMount(() => {
- // apiAll()
+ apiAll()
console.log("link:", window.location.href);
console.log("用户活动信息:", store.state.userAccount);