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
d88ca1cc
Commit
d88ca1cc
authored
May 28, 2022
by
曾经
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
a1694510
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
48 deletions
+95
-48
index.vue
src/components/cmh/theme-1/index.vue
+5
-2
support.vue
src/components/cmh/theme-1/support.vue
+1
-1
index.vue
src/components/cmh/theme-2/index.vue
+3
-2
support.vue
src/components/cmh/theme-2/support.vue
+1
-1
index.vue
src/components/cmh/theme-3/index.vue
+3
-2
support.vue
src/components/cmh/theme-3/support.vue
+1
-1
manager.js
src/components/manager.js
+81
-39
No files found.
src/components/cmh/theme-1/index.vue
View file @
d88ca1cc
...
...
@@ -91,7 +91,7 @@
v-if=
"game.adsFlag"
/>
<div
class=
"share-box"
@
click
.
stop=
"clickShareBtn"
>
<div
class=
"share-box"
@
click
.
stop=
"clickShareBtn"
v-if=
"rule.shareFlag"
>
<div
class=
"icon"
>
<div
class=
"iconfont icon-yaoqing"
></div>
</div>
...
...
@@ -236,6 +236,7 @@ export default {
isAttest
:
0
,
currentIntegral
:
"--"
,
rule
:
{},
playNumberObj
:
{},
};
},
created
()
{
...
...
@@ -319,6 +320,7 @@ export default {
enterpriseId
:
this
.
enterpriseId
,
memberId
:
this
.
memberId
||
""
,
});
console
.
log
(
"playNumberObj-------->"
,
playNumberObj
);
this
.
playNumberObj
=
playNumberObj
;
},
async
getGamePlayBarrage
()
{
...
...
@@ -389,6 +391,7 @@ export default {
},
async
sharePyq
()
{
let
options
=
this
.
shareConditionObj
;
let
result
=
await
getGameShareQrCodeUrl
({
gameId
:
this
.
gameId
,
enterpriseId
:
this
.
enterpriseId
,
...
...
@@ -405,7 +408,7 @@ export default {
},
clickAdImg
()
{
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
'/'
+
this
.
rule
.
dumpPath
,
url
:
'/'
+
this
.
game
.
gameExt
.
adsLinkUrl
,
})
},
async
open
()
{
...
...
src/components/cmh/theme-1/support.vue
View file @
d88ca1cc
...
...
@@ -26,7 +26,7 @@
</div>
<div
class=
"friend-name"
>
你的好友
{{
helpDetail
.
shareMemberName
}}
</div>
<div
class=
"tip-text"
>
正在请求您的助力
</div>
<div
class=
"handle-btn red"
@
click=
"support"
v-if=
"helpDetail.helpStatus == 0"
>
为好友助力
</div>
<div
class=
"handle-btn red"
@
click=
"support"
>
为好友助力
</div>
<div
class=
"handle-btn blue"
@
click=
"toPlayGame"
>
我要参加游戏
</div>
</div>
...
...
src/components/cmh/theme-2/index.vue
View file @
d88ca1cc
...
...
@@ -91,7 +91,7 @@
v-if=
"game.adsFlag"
/>
<div
class=
"share-box"
@
click
.
stop=
"clickShareBtn"
>
<div
class=
"share-box"
@
click
.
stop=
"clickShareBtn"
v-if=
"rule.shareFlag"
>
<div
class=
"icon"
>
<div
class=
"iconfont icon-yaoqing"
></div>
</div>
...
...
@@ -236,6 +236,7 @@ export default {
isAttest
:
0
,
currentIntegral
:
"--"
,
rule
:
{},
playNumberObj
:{},
};
},
created
()
{
...
...
@@ -404,7 +405,7 @@ export default {
},
clickAdImg
()
{
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
'/'
+
this
.
rule
.
dumpPath
,
url
:
'/'
+
this
.
game
.
gameExt
.
adsLinkUrl
,
})
},
async
open
()
{
...
...
src/components/cmh/theme-2/support.vue
View file @
d88ca1cc
...
...
@@ -26,7 +26,7 @@
</div>
<div
class=
"friend-name"
>
你的好友
{{
helpDetail
.
shareMemberName
}}
</div>
<div
class=
"tip-text"
>
正在请求您的助力
</div>
<div
class=
"handle-btn red"
@
click=
"support"
v-if=
"helpDetail.helpStatus == 0"
>
为好友助力
</div>
<div
class=
"handle-btn red"
@
click=
"support"
>
为好友助力
</div>
<div
class=
"handle-btn blue"
@
click=
"toPlayGame"
>
我要参加游戏
</div>
</div>
...
...
src/components/cmh/theme-3/index.vue
View file @
d88ca1cc
...
...
@@ -91,7 +91,7 @@
v-if=
"game.adsFlag"
/>
<div
class=
"share-box"
@
click
.
stop=
"clickShareBtn"
>
<div
class=
"share-box"
@
click
.
stop=
"clickShareBtn"
v-if=
"rule.shareFlag"
>
<div
class=
"icon"
>
<div
class=
"iconfont icon-yaoqing"
></div>
</div>
...
...
@@ -236,6 +236,7 @@ export default {
isAttest
:
0
,
currentIntegral
:
"--"
,
rule
:
{},
playNumberObj
:
{},
};
},
created
()
{
...
...
@@ -404,7 +405,7 @@ export default {
},
clickAdImg
()
{
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
'/'
+
this
.
rule
.
dumpPath
,
url
:
'/'
+
this
.
game
.
gameExt
.
adsLinkUrl
,
})
},
async
open
()
{
...
...
src/components/cmh/theme-3/support.vue
View file @
d88ca1cc
...
...
@@ -26,7 +26,7 @@
</div>
<div
class=
"friend-name"
>
你的好友
{{
helpDetail
.
shareMemberName
}}
</div>
<div
class=
"tip-text"
>
正在请求您的助力
</div>
<div
class=
"handle-btn red"
@
click=
"support"
v-if=
"helpDetail.helpStatus == 0"
>
为好友助力
</div>
<div
class=
"handle-btn red"
@
click=
"support"
>
为好友助力
</div>
<div
class=
"handle-btn blue"
@
click=
"toPlayGame"
>
我要参加游戏
</div>
</div>
...
...
src/components/manager.js
View file @
d88ca1cc
import
{
gameRequestApi
}
from
"@/api/common.js"
;
const
{
getPlayCount
,
//
getPlayCount,
validGame
,
getGameRule
,
gamePlay
,
...
...
@@ -107,40 +107,40 @@ export function Manager(component) {
});
}
const
checkCount
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
query
=
_component
.
$route
.
query
;
getPlayCount
(
query
).
then
((
res
)
=>
{
let
rule
=
_component
.
rule
;
if
(
rule
.
playTimes
>
res
)
{
resolve
();
}
else
{
reject
();
showAlert
({
show
:
true
,
content
:
rule
.
giveawayType
==
'21'
?
"今日免费次数已用完,明早继续"
:
'免费游戏次数已用完,去其他地方看看吧~'
,
buttonList
:
[
{
text
:
"前往会员中心"
,
click
:
()
=>
{
hiddenAlert
();
// TODO
toMemberCenter
();
},
},
],
cancel
:
()
=>
{
hiddenAlert
();
},
});
}
}).
catch
(()
=>
{
resolve
();
})
});
}
//
const checkCount = () => {
//
return new Promise((resolve, reject) => {
//
let query = _component.$route.query;
//
getPlayCount(query).then((res) => {
//
let rule = _component.rule;
//
if (rule.playTimes > res) {
//
resolve();
//
} else {
//
reject();
//
showAlert({
//
show: true,
//
content: rule.giveawayType == '21' ? "今日免费次数已用完,明早继续" : '免费游戏次数已用完,去其他地方看看吧~',
//
buttonList: [
//
{
//
text: "前往会员中心",
//
click: () => {
//
hiddenAlert();
//
// TODO
//
toMemberCenter();
//
},
//
},
//
],
//
cancel: () => {
//
hiddenAlert();
//
},
//
});
//
}
//
}).catch(() => {
//
resolve();
//
})
//
});
//
}
const
checkLimit
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
...
...
@@ -233,7 +233,9 @@ export function Manager(component) {
text
:
"立即获取积分"
,
click
:
()
=>
{
hiddenAlert
();
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
'/'
+
_component
.
rule
.
dumpPath
,
})
},
}];
break
;
...
...
@@ -266,9 +268,9 @@ export function Manager(component) {
}
this
.
play
=
()
=>
{
// .then(checkCount)
return
checkTime
()
.
then
(
checkAttest
)
.
then
(
checkCount
)
.
then
(
checkLimit
)
.
then
(()
=>
{
return
play
();
...
...
@@ -314,6 +316,28 @@ export function Manager(component) {
this
.
support
=
async
()
=>
{
let
query
=
_component
.
$route
.
query
;
if
(
_component
.
helpDetail
.
helpStatus
==
2
){
showAlert
({
show
:
true
,
content
:
"您已助力"
,
buttonList
:
[
{
text
:
"参与游戏赢好礼"
,
click
:
()
=>
{
hiddenAlert
();
// window.wx.miniProgram
// TODO
_component
.
toPlayGame
();
},
},
],
cancel
:
()
=>
{
hiddenAlert
();
},
});
return
;
}
if
(
query
.
memberId
==
query
.
shareMemberId
){
showAlert
({
show
:
true
,
...
...
@@ -373,8 +397,26 @@ export function Manager(component) {
},
});
}
else
{
// 未认证
openCard
();
showAlert
({
show
:
true
,
content
:
"仅差一步,您当前还不是会员,无法助力,立即认证成为会员,助力赢取好礼"
,
buttonList
:
[
{
text
:
"参与游戏赢好礼"
,
click
:
()
=>
{
hiddenAlert
();
// window.wx.miniProgram
// TODO
// 未认证
openCard
();
},
},
],
cancel
:
()
=>
{
hiddenAlert
();
},
});
}
}
else
if
(
conditionObj
.
type
==
12
)
{
// 关注服务号
...
...
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