Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
game-h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gic-web
game-h5
Commits
25b74249
Commit
25b74249
authored
May 20, 2022
by
曾经
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
3161dcdf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
15 deletions
+78
-15
index.html
public/index.html
+1
-0
service.js
src/api/service.js
+2
-2
index.vue
src/components/cmh/index.vue
+15
-7
support.vue
src/components/cmh/support.vue
+2
-2
index.vue
src/components/index.vue
+50
-0
index.js
src/router/index.js
+8
-4
No files found.
public/index.html
View file @
25b74249
...
@@ -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>
src/api/service.js
View file @
25b74249
...
@@ -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
src/components/cmh/index.vue
View file @
25b74249
...
@@ -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
l
ist"
:key=
"item"
>
<swiper-slide
v-for=
"item in
barrageL
ist"
: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
,
...
...
src/components/cmh/support.vue
View file @
25b74249
...
@@ -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"
,
},
},
...
...
src/components/index.vue
0 → 100644
View file @
25b74249
<
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
>
src/router/index.js
View file @
25b74249
...
@@ -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
:
'助力拆盲盒'
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment