feat:update
No files matched your search
@@ -7,6 +7,7 @@
|
|||||||
<link rel="icon" href="<%= BASE_URL %>favicon.jpg">
|
<link rel="icon" href="<%= BASE_URL %>favicon.jpg">
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
<style>
|
<style>
|
||||||
|
body {background-color: #18012d;}
|
||||||
.yf-loading {display:inline-block;width:40px;height:40px;position:fixed;margin-left:-20px;margin-top:-20px;left:50%;top:50%;border-radius: 50%; overflow: hidden;}
|
.yf-loading {display:inline-block;width:40px;height:40px;position:fixed;margin-left:-20px;margin-top:-20px;left:50%;top:50%;border-radius: 50%; overflow: hidden;}
|
||||||
.yf-loading:after {content:" ";display:block;width:40px;height:40px;box-sizing:border-box;border-radius:50%;border:3px solid #9E98FF;border-color:#9E98FF transparent #9E98FF transparent;animation:xtbg-loading 1.3s linear infinite;}
|
.yf-loading:after {content:" ";display:block;width:40px;height:40px;box-sizing:border-box;border-radius:50%;border:3px solid #9E98FF;border-color:#9E98FF transparent #9E98FF transparent;animation:xtbg-loading 1.3s linear infinite;}
|
||||||
@keyframes xtbg-loading {0% {transform:rotate(0deg);}
|
@keyframes xtbg-loading {0% {transform:rotate(0deg);}
|
||||||
@@ -20,5 +21,13 @@
|
|||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"><div class="yf-loading"></div></div>
|
<div id="app"><div class="yf-loading"></div></div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
|
<script>
|
||||||
|
;(function () {
|
||||||
|
if (!/vconsole=true/.test(window.location)) return;
|
||||||
|
var src = 'https://unpkg.com/vconsole@latest/dist/vconsole.min.js';
|
||||||
|
document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
|
||||||
|
document.write('<scr' + 'ipt>var vConsole = new window.VConsole();</scr' + 'ipt>');
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 158 KiB |
|
After Width: | Height: | Size: 153 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -22,8 +22,8 @@ export default {
|
|||||||
return "notice-hh";
|
return "notice-hh";
|
||||||
},
|
},
|
||||||
modeName() {
|
modeName() {
|
||||||
if (this.drawType === "turntable1") return "幸运扭扭蛋";
|
if (this.drawType === "turntable1") return "幸运扭蛋";
|
||||||
return "豪华扭扭蛋";
|
return "至尊扭蛋";
|
||||||
},
|
},
|
||||||
text() {
|
text() {
|
||||||
return `在${this.modeName}获得了`;
|
return `在${this.modeName}获得了`;
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ export default {
|
|||||||
this.remainTicketNum < this.curTicketRuleValue
|
this.remainTicketNum < this.curTicketRuleValue
|
||||||
) {
|
) {
|
||||||
this.$toast.fail("余额不足!");
|
this.$toast.fail("余额不足!");
|
||||||
|
this.SetCanLottery(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
todoData(res) {
|
todoData(res) {
|
||||||
const { code, data, msg } = res;
|
const { code, data, message } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
this.list = data || [];
|
this.list = data || [];
|
||||||
} else {
|
} else {
|
||||||
this.$toast.fail(msg);
|
this.$toast.fail(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ export default {
|
|||||||
this.remainTicketNum < this.curTicketRuleValue
|
this.remainTicketNum < this.curTicketRuleValue
|
||||||
) {
|
) {
|
||||||
this.$toast.fail("余额不足!");
|
this.$toast.fail("余额不足!");
|
||||||
|
this.SetCanLottery(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
todoData(res) {
|
todoData(res) {
|
||||||
const { code, data, msg } = res;
|
const { code, data, message } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
const { myRank, rankVoList, yesterdayRank } = data;
|
const { myRank, rankVoList, yesterdayRank } = data;
|
||||||
this.list = rankVoList || [];
|
this.list = rankVoList || [];
|
||||||
@@ -238,7 +238,7 @@ export default {
|
|||||||
this.yesterdayRank = yesterdayRank || [];
|
this.yesterdayRank = yesterdayRank || [];
|
||||||
this.myRank = myRank;
|
this.myRank = myRank;
|
||||||
} else {
|
} else {
|
||||||
this.$toast.fail(msg);
|
this.$toast.fail(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
const { code, data, msg } = res;
|
const { code, data, message } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
if (this.page === 1 && (!data || data.length === 0)) {
|
if (this.page === 1 && (!data || data.length === 0)) {
|
||||||
this.$toast.fail("您还没有抽奖记录哦,赶紧去参与抽奖吧!");
|
this.$toast.fail("您还没有抽奖记录哦,赶紧去参与抽奖吧!");
|
||||||
@@ -100,7 +100,7 @@ export default {
|
|||||||
// this.SetLotteryRecordRateVo(lotteryRecordRateVo);
|
// this.SetLotteryRecordRateVo(lotteryRecordRateVo);
|
||||||
if (data.length < this.pageSize) this.finished = true;
|
if (data.length < this.pageSize) this.finished = true;
|
||||||
} else {
|
} else {
|
||||||
this.$toast.fail(msg);
|
this.$toast.fail(message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -0,0 +1,154 @@
|
|||||||
|
<template>
|
||||||
|
<div class="record-list">
|
||||||
|
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||||
|
<van-list
|
||||||
|
v-model="loading"
|
||||||
|
:finished="finished"
|
||||||
|
finished-text="没有更多了"
|
||||||
|
:error.sync="error"
|
||||||
|
error-text="请求失败,点击重新加载"
|
||||||
|
@load="getDrawRecord"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="record-list-item"
|
||||||
|
v-for="(item, index) in recordList"
|
||||||
|
:key="`${item.prizeId}_${index}`"
|
||||||
|
>
|
||||||
|
<record-item
|
||||||
|
:img="item.prizeImgUrl"
|
||||||
|
:name="item.prizeName"
|
||||||
|
:dateTime="dateFormat(item.createTime)"
|
||||||
|
></record-item>
|
||||||
|
</div>
|
||||||
|
</van-list>
|
||||||
|
</van-pull-refresh>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapMutations, mapGetters } from "vuex";
|
||||||
|
import { drawRecord } from "@/api";
|
||||||
|
import recordItem from "./recordItem.vue";
|
||||||
|
export default {
|
||||||
|
name: "RecordItem",
|
||||||
|
components: {
|
||||||
|
recordItem
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
sortType: {
|
||||||
|
type: String,
|
||||||
|
default: "time"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// filters: {
|
||||||
|
// dateTimeFormat(value) {
|
||||||
|
// return this.dateFormat(value);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
finished: false,
|
||||||
|
refreshing: false,
|
||||||
|
recordList: [],
|
||||||
|
pageSize: 10,
|
||||||
|
page: 1,
|
||||||
|
error: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(["drawType"]),
|
||||||
|
actId() {
|
||||||
|
return this.$route.query.actId;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.getDrawRecord();
|
||||||
|
// console.log("created");
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.page = 1;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapMutations(["SetLotteryRecordRateVo"]),
|
||||||
|
// loadData() {},
|
||||||
|
getDrawRecord() {
|
||||||
|
this.loading = true;
|
||||||
|
drawRecord({
|
||||||
|
actId: this.actId,
|
||||||
|
drawType: this.drawType,
|
||||||
|
sortType: this.sortType,
|
||||||
|
page: this.page,
|
||||||
|
pageSize: this.pageSize
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
this.loading = false;
|
||||||
|
const { code, data, message } = res;
|
||||||
|
if (code === 200) {
|
||||||
|
if (this.page === 1 && (!data || data.length === 0)) {
|
||||||
|
this.$toast.fail("您还没有抽奖记录哦,赶紧去参与抽奖吧!");
|
||||||
|
this.finished = true;
|
||||||
|
this.refreshing = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.refreshing) {
|
||||||
|
this.recordList = [];
|
||||||
|
this.refreshing = false;
|
||||||
|
}
|
||||||
|
// const { drawPrizeItemVos, lotteryRecordRateVo } = data;
|
||||||
|
this.recordList = this.recordList.concat(data);
|
||||||
|
// this.SetLotteryRecordRateVo(lotteryRecordRateVo);
|
||||||
|
if (data.length < this.pageSize) this.finished = true;
|
||||||
|
} else {
|
||||||
|
this.$toast.fail(message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$toast.fail("获取抽奖记录失败!");
|
||||||
|
});
|
||||||
|
this.page++;
|
||||||
|
},
|
||||||
|
dateFormat(datetime, fmt = "YYYY-mm-dd HH:MM") {
|
||||||
|
let ret;
|
||||||
|
const date = new Date(datetime);
|
||||||
|
const opt = {
|
||||||
|
"Y+": date.getFullYear().toString(), // 年
|
||||||
|
"m+": (date.getMonth() + 1).toString(), // 月
|
||||||
|
"d+": date.getDate().toString(), // 日
|
||||||
|
"H+": date.getHours().toString(), // 时
|
||||||
|
"M+": date.getMinutes().toString(), // 分
|
||||||
|
"S+": date.getSeconds().toString() // 秒
|
||||||
|
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||||
|
};
|
||||||
|
for (let k in opt) {
|
||||||
|
ret = new RegExp("(" + k + ")").exec(fmt);
|
||||||
|
if (ret) {
|
||||||
|
fmt = fmt.replace(
|
||||||
|
ret[1],
|
||||||
|
ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return fmt;
|
||||||
|
},
|
||||||
|
onRefresh() {
|
||||||
|
this.finished = false;
|
||||||
|
this.page = 1;
|
||||||
|
this.getDrawRecord();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.record-list {
|
||||||
|
padding: 20px 30px;
|
||||||
|
&-item {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
&:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -72,11 +72,11 @@ export default {
|
|||||||
getQueryPrizeMsg() {
|
getQueryPrizeMsg() {
|
||||||
queryPrizeMsg({ actId: this.actId, drawType: this.drawType }).then(
|
queryPrizeMsg({ actId: this.actId, drawType: this.drawType }).then(
|
||||||
res => {
|
res => {
|
||||||
const { code, data, msg } = res;
|
const { code, data, message } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
this.recordList = data;
|
this.recordList = data;
|
||||||
} else {
|
} else {
|
||||||
this.$toast.fail(msg);
|
this.$toast.fail(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import BoboEnterBtn from "./main";
|
||||||
|
|
||||||
|
BoboEnterBtn.install = function(Vue) {
|
||||||
|
Vue.component(BoboEnterBtn.name, BoboEnterBtn);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default BoboEnterBtn;
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<template>
|
||||||
|
<button class="wheel-enter-btn" :class="positionClass">
|
||||||
|
<span>
|
||||||
|
<slot></slot>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "WheelEnterBtn",
|
||||||
|
props: {
|
||||||
|
position: {
|
||||||
|
type: String,
|
||||||
|
default: "right"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
positionClass() {
|
||||||
|
return `wheel-enter-btn-${this.position}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.wheel-enter-btn {
|
||||||
|
width: 119px;
|
||||||
|
height: 60px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
border: none;
|
||||||
|
background-color: transparent;
|
||||||
|
line-height: 46px;
|
||||||
|
&-right {
|
||||||
|
background-image: url(../../assets/images/wheel/button_bg.png);
|
||||||
|
}
|
||||||
|
& > span {
|
||||||
|
color: #ffffff;
|
||||||
|
opacity: 0.8;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import BoboEnterView from "./main";
|
||||||
|
|
||||||
|
BoboEnterView.install = function(Vue) {
|
||||||
|
Vue.component(BoboEnterView.name, BoboEnterView);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default BoboEnterView;
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<template>
|
||||||
|
<div class="wheel-enter-view">
|
||||||
|
<div class="wheel-enter-view-row">
|
||||||
|
<wheel-enter-Btn
|
||||||
|
class="wheel-enter-view-button"
|
||||||
|
position="right"
|
||||||
|
@click.native="clickEntryBtn('排行榜')"
|
||||||
|
>排行榜</wheel-enter-Btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="wheel-enter-view-row">
|
||||||
|
<wheel-enter-Btn
|
||||||
|
class="wheel-enter-view-button"
|
||||||
|
position="right"
|
||||||
|
@click.native="clickEntryBtn('记录')"
|
||||||
|
>抽奖记录</wheel-enter-Btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import wheelEnterBtn from "../wheelEnterBtn";
|
||||||
|
export default {
|
||||||
|
name: "wheelEnterView",
|
||||||
|
components: {
|
||||||
|
wheelEnterBtn
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickEntryBtn(text) {
|
||||||
|
// console.log("clickEntryBtn", text);
|
||||||
|
this.$emit("clickEntryBtn", text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.wheel-enter-view {
|
||||||
|
width: 100%;
|
||||||
|
height: 172px;
|
||||||
|
&-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: end;
|
||||||
|
margin-top: 40px;
|
||||||
|
&:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-button {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -25,8 +25,8 @@ const checkVersion = function() {
|
|||||||
webApp: u.indexOf("Safari") > -1, // 是否web应该程序,没有头部与底部
|
webApp: u.indexOf("Safari") > -1, // 是否web应该程序,没有头部与底部
|
||||||
weixin: u.indexOf("MicroMessenger") > -1, // 是否微信
|
weixin: u.indexOf("MicroMessenger") > -1, // 是否微信
|
||||||
qq: u.match(/\sQQ/i) === " qq", // 是否QQ
|
qq: u.match(/\sQQ/i) === " qq", // 是否QQ
|
||||||
tutuApp: u.match("tutuApp"),
|
tutuApp: u.match("toupaiApp"),
|
||||||
app: u.match("tutuApp") // 是否在app内
|
app: u.match("toupaiApp") // 是否在app内
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -212,11 +212,18 @@ const getMsgFromDevice = function() {
|
|||||||
info.ticket = tools.nativeUtils.getTicket();
|
info.ticket = tools.nativeUtils.getTicket();
|
||||||
info.appVersion = tools.nativeUtils.getAppVersion();
|
info.appVersion = tools.nativeUtils.getAppVersion();
|
||||||
} else {
|
} else {
|
||||||
info.roomUid = 904860;
|
const params = getQueryString();
|
||||||
info.uid = 1000002;
|
if (
|
||||||
info.deviceId = "afhksafhksajhfs1kjahsfkjsf0000aaaaaaaacaa";
|
params.debug === true ||
|
||||||
info.ticket =
|
params.debug === "true" ||
|
||||||
"eyJhbGciOiJIUzI1NiJ9.eyJ0aWNrZXRfdHlwZSI6bnVsbCwidWlkIjo5MTMzOSwidGlja2V0X2lkIjoiOGJmMTdlYmQtMTY4ZC00NTliLWI0NzUtMDU3M2Y1ZmM4MDQzIiwiZXhwIjozNjAwLCJjbGllbnRfaWQiOiJlcmJhbi1jbGllbnQifQ.MnKGEc6bSkyOkCbx26lib6J0koFDA2uiKnbwkhdk3MU";
|
location.hostname === "localhost"
|
||||||
|
) {
|
||||||
|
info.roomUid = 904860;
|
||||||
|
info.uid = 1000002;
|
||||||
|
info.deviceId = "afhksafhksajhfs1kjahsfkjsf0000aaaaaaaacaa";
|
||||||
|
info.ticket =
|
||||||
|
"eyJhbGciOiJIUzI1NiJ9.eyJ0aWNrZXRfdHlwZSI6bnVsbCwidWlkIjo5MTMzOSwidGlja2V0X2lkIjoiOGJmMTdlYmQtMTY4ZC00NTliLWI0NzUtMDU3M2Y1ZmM4MDQzIiwiZXhwIjozNjAwLCJjbGllbnRfaWQiOiJlcmJhbi1jbGllbnQifQ.MnKGEc6bSkyOkCbx26lib6J0koFDA2uiKnbwkhdk3MU";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,12 +8,18 @@ const routes = [
|
|||||||
path: "/",
|
path: "/",
|
||||||
name: "Home",
|
name: "Home",
|
||||||
component: () => import(/* webpackChunkName: "Home" */ "../views/Home.vue")
|
component: () => import(/* webpackChunkName: "Home" */ "../views/Home.vue")
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/bobo",
|
|
||||||
name: "Bobo",
|
|
||||||
component: () => import(/* webpackChunkName: "Bobo" */ "../views/bobo.vue")
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// path: "/bobo",
|
||||||
|
// name: "Bobo",
|
||||||
|
// component: () => import(/* webpackChunkName: "Bobo" */ "../views/bobo.vue")
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "/wheel",
|
||||||
|
// name: "Wheel",
|
||||||
|
// component: () =>
|
||||||
|
// import(/* webpackChunkName: "Wheel" */ "../views/wheel.vue")
|
||||||
|
// }
|
||||||
];
|
];
|
||||||
|
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
|
|||||||
@@ -205,13 +205,13 @@ export default new Vuex.Store({
|
|||||||
actId: locateObj.actId
|
actId: locateObj.actId
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const { code, data, msg } = res;
|
const { code, data, message } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
const list = data[drawTypes];
|
const list = data[drawTypes];
|
||||||
commit("SetDrawTypePrizeInfo", { drawType: drawTypes, list });
|
commit("SetDrawTypePrizeInfo", { drawType: drawTypes, list });
|
||||||
resolve(list);
|
resolve(list);
|
||||||
} else {
|
} else {
|
||||||
Toast.fail(msg);
|
Toast.fail(message);
|
||||||
reject(res);
|
reject(res);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -224,7 +224,7 @@ export default new Vuex.Store({
|
|||||||
getqueryTicketRule({ commit }, drawType) {
|
getqueryTicketRule({ commit }, drawType) {
|
||||||
queryTicketRule({ drawType: drawType, actId: locateObj.actId })
|
queryTicketRule({ drawType: drawType, actId: locateObj.actId })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const { code, data, msg } = res;
|
const { code, data, message } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
const { timesRule } = data;
|
const { timesRule } = data;
|
||||||
if (!timesRule) return;
|
if (!timesRule) return;
|
||||||
@@ -236,7 +236,7 @@ export default new Vuex.Store({
|
|||||||
}
|
}
|
||||||
commit("SetTicketRule", json || null);
|
commit("SetTicketRule", json || null);
|
||||||
} else {
|
} else {
|
||||||
Toast.fail(msg);
|
Toast.fail(message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@@ -244,6 +244,18 @@ export default new Vuex.Store({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
runLottery({ state, commit }) {
|
runLottery({ state, commit }) {
|
||||||
|
if (!locateObj.actId) {
|
||||||
|
Toast.fail("获取活动信息失败!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!info.roomUid) {
|
||||||
|
Toast.fail("获取房间信息失败!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!info.deviceId) {
|
||||||
|
Toast.fail("获取设备id失败!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
doLottery({
|
doLottery({
|
||||||
actId: locateObj.actId,
|
actId: locateObj.actId,
|
||||||
@@ -254,13 +266,13 @@ export default new Vuex.Store({
|
|||||||
deviceId: info.deviceId
|
deviceId: info.deviceId
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const { code, data, msg } = res;
|
const { code, data, message } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
commit("SetRemainTicketNum", data.remainTicketNum || 0);
|
commit("SetRemainTicketNum", data.remainTicketNum || 0);
|
||||||
commit("SetLotteryData", data);
|
commit("SetLotteryData", data);
|
||||||
// dispatch("postSaveLog", option);
|
// dispatch("postSaveLog", option);
|
||||||
} else {
|
} else {
|
||||||
Toast.fail(msg);
|
Toast.fail(message);
|
||||||
}
|
}
|
||||||
resolve(res);
|
resolve(res);
|
||||||
})
|
})
|
||||||
@@ -282,12 +294,12 @@ export default new Vuex.Store({
|
|||||||
getQueryTicketNum({ commit }) {
|
getQueryTicketNum({ commit }) {
|
||||||
queryTicketNum({ deviceId: info.deviceId, actId: locateObj.actId })
|
queryTicketNum({ deviceId: info.deviceId, actId: locateObj.actId })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const { code, data, msg } = res;
|
const { code, data, message } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
commit("SetRemainTicketNum", data.num || 0);
|
commit("SetRemainTicketNum", data.num || 0);
|
||||||
commit("SetGoldNum", data.goldNum || 0);
|
commit("SetGoldNum", data.goldNum || 0);
|
||||||
} else {
|
} else {
|
||||||
Toast.fail(msg);
|
Toast.fail(message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -5,4 +5,6 @@
|
|||||||
|
|
||||||
@empty-description-color: #AFAAFF;
|
@empty-description-color: #AFAAFF;
|
||||||
|
|
||||||
@list-text-color: #AFAAFF;
|
@list-text-color: #AFAAFF;
|
||||||
|
|
||||||
|
// @button-plain-background-color: rgba(0, 0, 0, 0);
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="prizes-view-content">
|
<div class="prizes-view-content">
|
||||||
<van-tabs v-model="active" animated>
|
<van-tabs v-model="active" animated>
|
||||||
<van-tab
|
<van-tab
|
||||||
title="幸运扭扭蛋"
|
title="幸运扭蛋"
|
||||||
name="turntable1"
|
name="turntable1"
|
||||||
title-class="prizes-view-content-tableft"
|
title-class="prizes-view-content-tableft"
|
||||||
>
|
>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab
|
<van-tab
|
||||||
title="豪华扭扭蛋"
|
title="至尊扭蛋"
|
||||||
name="turntable2"
|
name="turntable2"
|
||||||
title-class="prizes-view-content-tabright"
|
title-class="prizes-view-content-tabright"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ export default {
|
|||||||
ruleTip() {
|
ruleTip() {
|
||||||
getRulePic({ drawType: this.drawType, actId: this.actId })
|
getRulePic({ drawType: this.drawType, actId: this.actId })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const { code, data, msg } = res;
|
const { code, data, message } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
this.ruleContent = data;
|
this.ruleContent = data;
|
||||||
} else {
|
} else {
|
||||||
this.$toast.fail(msg);
|
this.$toast.fail(message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -0,0 +1,115 @@
|
|||||||
|
<template>
|
||||||
|
<div class="wheel">
|
||||||
|
<swiper-notice class="wheel-notice" :text="text"></swiper-notice>
|
||||||
|
|
||||||
|
<wheel-enter-view
|
||||||
|
class="wheel-enter"
|
||||||
|
@clickEntryBtn="clickEntryBtn"
|
||||||
|
></wheel-enter-view>
|
||||||
|
|
||||||
|
<van-button
|
||||||
|
class="wheel-gz-button"
|
||||||
|
plain
|
||||||
|
type="info"
|
||||||
|
size="small"
|
||||||
|
round
|
||||||
|
color="#fff"
|
||||||
|
@click="clickLeftTopButton"
|
||||||
|
>规 则</van-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<van-popup
|
||||||
|
v-model="show"
|
||||||
|
position="left"
|
||||||
|
:style="{ height: '100%', width: '100%' }"
|
||||||
|
:close-on-click-overlay="false"
|
||||||
|
close-icon="arrow-left"
|
||||||
|
closeable
|
||||||
|
close-icon-position="top-left"
|
||||||
|
get-container="#app"
|
||||||
|
>
|
||||||
|
<!-- <prizes-view></prizes-view> -->
|
||||||
|
<component :is="curComponentsName"></component>
|
||||||
|
</van-popup>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import wheelEnterView from "@/components/wheelEnterView";
|
||||||
|
import swiperNotice from "@/components/swiperNotice";
|
||||||
|
export default {
|
||||||
|
name: "Wheel",
|
||||||
|
components: {
|
||||||
|
wheelEnterView,
|
||||||
|
swiperNotice,
|
||||||
|
prizesView: resolve => require(["./prizesView.vue"], resolve),
|
||||||
|
ruleView: resolve => require(["./ruleView.vue"], resolve),
|
||||||
|
recordView: resolve => require(["./recordView.vue"], resolve),
|
||||||
|
rankView: resolve => require(["./rankView.vue"], resolve),
|
||||||
|
dataView: resolve => require(["./dataView.vue"], resolve)
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
text: "戳中了",
|
||||||
|
show: false,
|
||||||
|
curBtnText: "",
|
||||||
|
componentsName: {
|
||||||
|
规则: "rule-view",
|
||||||
|
奖品: "prizes-view",
|
||||||
|
排行榜: "rank-view",
|
||||||
|
记录: "record-view",
|
||||||
|
数据: "data-view"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
curComponentsName() {
|
||||||
|
return this.componentsName[this.curBtnText];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickEntryBtn(val) {
|
||||||
|
this.curBtnText = val;
|
||||||
|
this.show = true;
|
||||||
|
},
|
||||||
|
clickLeftTopButton() {
|
||||||
|
this.curBtnText = "规则";
|
||||||
|
this.show = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.wheel {
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
background-color: #50127e;
|
||||||
|
background-image: url(../assets/images/wheel/wheel_bg.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
&-notice {
|
||||||
|
margin-top: 130px;
|
||||||
|
}
|
||||||
|
&-enter {
|
||||||
|
// padding-top: 20px;
|
||||||
|
}
|
||||||
|
&-gz-button {
|
||||||
|
// width: 78px;
|
||||||
|
height: 50px;
|
||||||
|
// background-repeat: no-repeat;
|
||||||
|
// background-size: cover;
|
||||||
|
// border: none;
|
||||||
|
// background-color: transparent;
|
||||||
|
// background-image: url(../assets/images/bobo/but_rk_gz.png);
|
||||||
|
position: absolute;
|
||||||
|
top: 26px;
|
||||||
|
left: 25px;
|
||||||
|
opacity: 0.8;
|
||||||
|
color: #fff;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||