feat: 更新

This commit is contained in:
dengtongyu committed 2021-08-31 00:34:29 +08:00
1 parent 72100683e2
commit 8a0c0f1327
25 files changed
+159 -17

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

+12 -1
View File
@@ -1,6 +1,9 @@
<template> <template>
<div class="ball-content" :class="modeClass"> <div class="ball-content" :class="modeClass">
<div class="ball-content-main"> <div class="ball-content-main">
<div class="ball-content-main-notice">
<notice :mode="mode" :gifts="prizeItemList"></notice>
</div>
<div class="ball-content-main-grid"> <div class="ball-content-main-grid">
<lucky-grid-view :mode="mode"></lucky-grid-view> <lucky-grid-view :mode="mode"></lucky-grid-view>
</div> </div>
@@ -9,10 +12,13 @@
</template> </template>
<script> <script>
import notice from "./notice";
import luckyGridView from "@/components/luckyGridView"; import luckyGridView from "@/components/luckyGridView";
import { mapGetters } from "vuex";
export default { export default {
name: "BallContent", name: "BallContent",
components: { components: {
notice,
luckyGridView luckyGridView
}, },
props: { props: {
@@ -22,6 +28,7 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters(["prizeItemList"]),
modeClass() { modeClass() {
if (this.mode === "blue") return "ball-xy"; if (this.mode === "blue") return "ball-xy";
return "ball-hh"; return "ball-hh";
@@ -41,8 +48,12 @@ export default {
&-main { &-main {
height: 414px; height: 414px;
padding: 8px; padding: 8px;
&-notice {
height: 64px;
padding-top: 20px;
}
&-grid { &-grid {
padding-top: 78px; // padding-top: 78px;
width: 92%; width: 92%;
margin: 0 auto; margin: 0 auto;
} }
+77
View File
@@ -0,0 +1,77 @@
<template>
<div class="notice" :class="modeClass">
<div class="notice-content" v-if="gifts.length > 0">
<label>{{ name }}</label>
<span>在{{ modeName }}获得了</span>
<label>{{ giftsText }}</label>
</div>
</div>
</template>
<script>
export default {
name: "Notice",
props: {
mode: {
type: String,
default: "blue"
},
name: {
type: String,
default: ""
},
gifts: {
type: Array,
default: () => []
}
},
computed: {
modeClass() {
if (this.mode === "blue") return "notice-xy";
return "notice-hh";
},
modeName() {
if (this.mode === "blue") return "幸运扭扭蛋";
return "豪华扭扭蛋";
},
giftsText() {
const list = [];
for (let index = 0; index < this.gifts.length; index++) {
const element = this.gifts[index];
list.push(`${element.prizeName}x${element.prizeNum}`);
}
return list.join("、");
}
}
};
</script>
<style lang="scss" scoped>
.notice {
width: 618px;
height: 64px;
background-repeat: no-repeat;
background-size: cover;
margin: 0 auto;
&-content {
margin: 0 30px;
text-align: center;
line-height: 64px;
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
& > label {
color: #ffe26c;
}
& > span {
color: #fff;
}
}
}
.notice-xy {
background-image: url(../../assets/images/tz_bg.png);
}
.notice-hh {
background-image: url(../../assets/images/tz_bg_g.png);
}
</style>
+10 -4
View File
@@ -4,7 +4,7 @@
<label>鱼券:</label> <label>鱼券:</label>
<span>{{ value }}</span> <span>{{ value }}</span>
</div> </div>
<div class="balance-view-btn"></div> <div class="balance-view-btn" @touchstart="() => {}"></div>
</div> </div>
</template> </template>
@@ -53,10 +53,16 @@ export default {
} }
} }
&-btn { &-btn {
width: 60px; width: 100px;
height: 60px; height: 100px;
border-radius: 50%; border-radius: 50%;
margin-right: 14px; cursor: pointer;
background-repeat: no-repeat;
background-size: cover;
background-image: url(../../assets/images/cz_bth.png);
&:active {
background-image: url(../../assets/images/cz_bth_a.png);
}
} }
} }
.balance-view-xy { .balance-view-xy {
+7 -1
View File
@@ -1,5 +1,5 @@
<template> <template>
<div class="lottery-btn" :class="modeClass" @click="clickLottery"></div> <div class="lottery-btn" :class="modeClass" @touchend="clickLottery"></div>
</template> </template>
<script> <script>
@@ -43,8 +43,14 @@ export default {
} }
.lottery-btn-xy { .lottery-btn-xy {
background-image: url(../../assets/images/cj_btn.png); background-image: url(../../assets/images/cj_btn.png);
&:active {
background-image: url(../../assets/images/cj_btn_a.png);
}
} }
.lottery-btn-hh { .lottery-btn-hh {
background-image: url(../../assets/images/cj_btn_g.png); background-image: url(../../assets/images/cj_btn_g.png);
&:active {
background-image: url(../../assets/images/cj_btn_g_a.png);
}
} }
</style> </style>
+18 -4
View File
@@ -62,7 +62,7 @@ export default {
}, },
defaultStyle: {}, defaultStyle: {},
activeStyle: { activeStyle: {
background: "linear-gradient(270deg, #FFDCB8, #FDC689)", background: "none",
shadow: "" shadow: ""
}, },
axis: [ axis: [
@@ -83,6 +83,8 @@ export default {
require("@/assets/images/ball_02_g.png"), require("@/assets/images/ball_02_g.png"),
require("@/assets/images/ball_01_g.png") require("@/assets/images/ball_01_g.png")
], ],
opImages: require("@/assets/images/hig_p.png"),
heightLineImages: require("@/assets/images/hig.png"),
showDialog: false, showDialog: false,
lotteryData: null, lotteryData: null,
timeout: false, timeout: false,
@@ -152,7 +154,12 @@ export default {
eventBus.$off("eventLottery", this.startLottery); eventBus.$off("eventLottery", this.startLottery);
}, },
methods: { methods: {
...mapMutations(["SetPrizeInfo", "SetRemainTicketNum", "SetCanLottery"]), ...mapMutations([
"SetPrizeInfo",
"SetRemainTicketNum",
"SetCanLottery",
"SetPrizeItemList"
]),
getQueryPrizeInfo() { getQueryPrizeInfo() {
queryPrizeInfo({ drawType: this.drawType }) queryPrizeInfo({ drawType: this.drawType })
.then(res => { .then(res => {
@@ -227,9 +234,15 @@ export default {
y: this.axis[i][1], y: this.axis[i][1],
// fonts: [{ text: item.name, top: "70%" }], // fonts: [{ text: item.name, top: "70%" }],
imgs: [ imgs: [
{ src: this.prizesImages[0], width: "86%", top: "6%" }, { src: this.prizesImages[0], width: "100%", top: "8%" },
{ src: prizeItem.prizeImgUrl, width: "70%", top: "20%" }, { src: prizeItem.prizeImgUrl, width: "70%", top: "20%" },
{ src: this.prizesImages[1], width: "86%", top: "6%" } {
src: this.opImages,
activeSrc: this.heightLineImages,
width: "100%",
top: "8%"
},
{ src: this.prizesImages[1], width: "100%", top: "8%" }
] ]
}); });
} }
@@ -255,6 +268,7 @@ export default {
endCallBack() { endCallBack() {
this.showDialog = true; this.showDialog = true;
this.SetCanLottery(true); this.SetCanLottery(true);
this.SetPrizeItemList(this.prizeItemList);
} }
} }
}; };
+7
View File
@@ -6,6 +6,7 @@ Vue.use(Vuex);
export default new Vuex.Store({ export default new Vuex.Store({
state: { state: {
prizeInfo: [], prizeInfo: [],
prizeItemList: [],
ruleType: "one", ruleType: "one",
remainTicketNum: 0, remainTicketNum: 0,
ticketRule: null, ticketRule: null,
@@ -15,6 +16,9 @@ export default new Vuex.Store({
prizeInfo: state => { prizeInfo: state => {
return state.prizeInfo; return state.prizeInfo;
}, },
prizeItemList: state => {
return state.prizeItemList;
},
prizeIdList: state => { prizeIdList: state => {
const { prizeInfo } = state; const { prizeInfo } = state;
const list = []; const list = [];
@@ -45,6 +49,9 @@ export default new Vuex.Store({
SetPrizeInfo(state, payload) { SetPrizeInfo(state, payload) {
state.prizeInfo = payload; state.prizeInfo = payload;
}, },
SetPrizeItemList(state, payload) {
state.prizeItemList = payload;
},
SetRuleType(state, payload) { SetRuleType(state, payload) {
state.ruleType = payload; state.ruleType = payload;
}, },
+28 -7
View File
@@ -1,14 +1,35 @@
html,body,#app { html,
body,
#app {
width: 100%; width: 100%;
height: 100%; height: 100%;
margin: 0; margin: 0;
} }
h1,h2,h3,h4,h5,p,dl,dt,dd,ol,ul,li { h1,
h2,
h3,
h4,
h5,
p,
dl,
dt,
dd,
ol,
ul,
li {
padding: 0; padding: 0;
margin: 0 margin: 0;
}
body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
} }
#app { #app {
font-family: "Helvetica","Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, sans-serif; font-family: "Helvetica", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
color: #2c3e50; color: #2c3e50;
@@ -18,9 +39,9 @@ h1,h2,h3,h4,h5,p,dl,dt,dd,ol,ul,li {
@svg 1px-border { @svg 1px-border {
height: 2px; height: 2px;
@rect { @rect {
fill: var(--color, black); fill: var(--color, black);
width: 100%; width: 100%;
height: 50%; height: 50%;
} }
} }
.border-1px { .border-1px {