Commit 25b74249 by 曾经

no message

parent 3161dcdf
...@@ -19,5 +19,6 @@ ...@@ -19,5 +19,6 @@
<script src="//web-1251519181.file.myqcloud.com/lib/axios/0.18.0/index.min.js"></script> <script src="//web-1251519181.file.myqcloud.com/lib/axios/0.18.0/index.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script> <script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script> <script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
</body> </body>
</html> </html>
...@@ -73,4 +73,5 @@ export function postRequest(url,params){ ...@@ -73,4 +73,5 @@ export function postRequest(url,params){
url, url,
data: params, data: params,
}); });
} }
\ No newline at end of file
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
ref="mySwiper" ref="mySwiper"
:options="swiperOptions" :options="swiperOptions"
:autoplay="swiperOptions.autoplay" :autoplay="swiperOptions.autoplay"
v-if="game.bulletFlag" v-if="game.bulletFlag && barrageList && barrageList.length > 3"
> >
<swiper-slide v-for="item in list" :key="item"> <swiper-slide v-for="item in barrageList" :key="item">
<div class="swiper-item"> <div class="swiper-item">
<img src="./images/tips_bg.png" /> <img src="./images/tips_bg.png" />
<span>{{ item }}</span> <span>恭喜 {{ item.memberName }} 获得 {{ item.prizeName }}</span>
</div> </div>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
...@@ -211,6 +211,7 @@ export default { ...@@ -211,6 +211,7 @@ export default {
enterpriseId: "ff8080815dacd3a2015dacd3ef5c0000", enterpriseId: "ff8080815dacd3a2015dacd3ef5c0000",
memberId: "ff808081804666e3018049dee09102af", memberId: "ff808081804666e3018049dee09102af",
currentIntegral: "--", currentIntegral: "--",
rule:{},
}; };
}, },
created() { created() {
...@@ -232,6 +233,7 @@ export default { ...@@ -232,6 +233,7 @@ export default {
this.getGameRule(); this.getGameRule();
this.getGamePlayNumber(); this.getGamePlayNumber();
this.getIntegral(); this.getIntegral();
this.getGamePlayBarrage();
}, },
methods: { methods: {
async getGame() { async getGame() {
...@@ -260,6 +262,12 @@ export default { ...@@ -260,6 +262,12 @@ export default {
enterpriseId: this.enterpriseId, enterpriseId: this.enterpriseId,
}) })
this.rule = rule; this.rule = rule;
window.wx.miniProgram.postMessage({
data:{
shareTitle: rule.shareRuleDesc,
shareImage: rule.shareImageUrl,
}
})
}, },
async getGamePlayNumber() { async getGamePlayNumber() {
let playNumberObj = await getGamePlayNumber({ let playNumberObj = await getGamePlayNumber({
...@@ -267,14 +275,14 @@ export default { ...@@ -267,14 +275,14 @@ export default {
enterpriseId: this.enterpriseId, enterpriseId: this.enterpriseId,
memberId: this.memberId, memberId: this.memberId,
}); });
console.log(playNumberObj);
this.playNumberObj = playNumberObj; this.playNumberObj = playNumberObj;
}, },
async getGamePlayBarrage() { async getGamePlayBarrage() {
await getGamePlayBarrage({ let barrageList = await getGamePlayBarrage({
gameId: this.gameId, gameId: this.gameId,
enterpriseId: this.enterpriseId, enterpriseId: this.enterpriseId,
}); });
this.barrageList = barrageList || [];
}, },
async getIntegral() { async getIntegral() {
let currentIntegral = await getIntegral({ let currentIntegral = await getIntegral({
...@@ -292,7 +300,7 @@ export default { ...@@ -292,7 +300,7 @@ export default {
}, },
toGameRule() { toGameRule() {
this.$router.push({ this.$router.push({
path: "/rule", path: "/cmh/rule",
query: { query: {
gameId: this.gameId, gameId: this.gameId,
enterpriseId: this.enterpriseId, enterpriseId: this.enterpriseId,
...@@ -301,7 +309,7 @@ export default { ...@@ -301,7 +309,7 @@ export default {
}, },
toMyReward() { toMyReward() {
this.$router.push({ this.$router.push({
path: "/my-reward", path: "/cmh/my-reward",
query: { query: {
gameId: this.gameId, gameId: this.gameId,
enterpriseId: this.enterpriseId, enterpriseId: this.enterpriseId,
......
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
return {}; return {};
}, },
created() { created() {
document.title = "游戏规则"; document.title = "游戏助力";
this.loadData(); this.loadData();
}, },
methods: { methods: {
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
}, },
playGame() { playGame() {
this.$router.replace({ this.$router.replace({
path: "/", path: "/cmh/",
query: { query: {
gameId: "1121213", gameId: "1121213",
}, },
......
<template>
<div class="box"></div>
</template>
<script>
import { gameRequestApi } from "@/api/common.js";
const { getGameInfo } = gameRequestApi;
export default {
components: {},
data() {
return {
};
},
created() {
document.title = "游戏";
this.loadData();
},
methods: {
loadData() {
let query = this.$route.query;
getGameInfo({
gameId: query.gameId,
enterpriseId: query.enterpriseId,
}).then((res) => {
let gameName = "";
switch (+res.templateType) {
case 1:
gameName = "cmh";
break;
case 2:
break;
default:
break;
}
this.$router.replace({
path: `/${ gameName }${ query.shareMemberId ? '/support' : '' }`,
query: query,
});
});
},
},
};
</script>
<style scoped></style>
...@@ -4,22 +4,26 @@ Vue.use(VueRouter); ...@@ -4,22 +4,26 @@ Vue.use(VueRouter);
const routes = [ const routes = [
{ {
path: '/', path:'/',
component: () => import('@/components/index.vue'),
},
{
path: '/cmh',
name: '猜盲盒', name: '猜盲盒',
component: () => import('@/components/cmh/index.vue'), component: () => import('@/components/cmh/index.vue'),
}, },
{ {
path: '/rule', path: '/cmh/rule',
component: () => import('@/components/cmh/rule.vue'), component: () => import('@/components/cmh/rule.vue'),
name: '游戏规则' name: '游戏规则'
}, },
{ {
path: '/my-reward', path: '/cmh/my-reward',
component: () => import('@/components/cmh/my-reward.vue'), component: () => import('@/components/cmh/my-reward.vue'),
name: '我的奖品' name: '我的奖品'
}, },
{ {
path: '/support', path: '/cmh/support',
component: () => import('@/components/cmh/support.vue'), component: () => import('@/components/cmh/support.vue'),
name: '助力拆盲盒' name: '助力拆盲盒'
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment