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
d6b0044e
Commit
d6b0044e
authored
Aug 13, 2022
by
曾经
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分享朋友圈支持
旧版本小程序打开游戏兼容
parent
88a09528
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
453 additions
and
468 deletions
+453
-468
share-img-dialog.vue
src/components/cmh/theme-1/components/share-img-dialog.vue
+1
-1
share-select-dialog.vue
...components/cmh/theme-1/components/share-select-dialog.vue
+13
-5
share-tip-mask.vue
src/components/cmh/theme-1/components/share-tip-mask.vue
+42
-0
fenxianghaibao_icon.png
src/components/cmh/theme-1/images/fenxianghaibao_icon.png
+0
-0
shareTip.png
src/components/cmh/theme-1/images/shareTip.png
+0
-0
index.vue
src/components/cmh/theme-1/index.vue
+10
-50
support.vue
src/components/cmh/theme-1/support.vue
+10
-54
share-img-dialog.vue
src/components/cmh/theme-2/components/share-img-dialog.vue
+1
-1
share-select-dialog.vue
...components/cmh/theme-2/components/share-select-dialog.vue
+20
-4
share-tip-mask.vue
src/components/cmh/theme-2/components/share-tip-mask.vue
+42
-0
fenxianghaibao_icon.png
src/components/cmh/theme-2/images/fenxianghaibao_icon.png
+0
-0
shareTip.png
src/components/cmh/theme-2/images/shareTip.png
+0
-0
index.vue
src/components/cmh/theme-2/index.vue
+10
-49
support.vue
src/components/cmh/theme-2/support.vue
+10
-58
share-img-dialog.vue
src/components/cmh/theme-3/components/share-img-dialog.vue
+1
-1
share-select-dialog.vue
...components/cmh/theme-3/components/share-select-dialog.vue
+20
-4
share-tip-mask.vue
src/components/cmh/theme-3/components/share-tip-mask.vue
+42
-0
fenxianghaibao_icon.png
src/components/cmh/theme-3/images/fenxianghaibao_icon.png
+0
-0
shareTip.png
src/components/cmh/theme-3/images/shareTip.png
+0
-0
index.vue
src/components/cmh/theme-3/index.vue
+10
-49
support.vue
src/components/cmh/theme-3/support.vue
+11
-55
share-img-dialog.vue
src/components/cmh/theme-5/components/share-img-dialog.vue
+1
-1
share-select-dialog.vue
...components/cmh/theme-5/components/share-select-dialog.vue
+20
-4
share-tip-mask.vue
src/components/cmh/theme-5/components/share-tip-mask.vue
+42
-0
fenxianghaibao_icon.png
src/components/cmh/theme-5/images/fenxianghaibao_icon.png
+0
-0
shareTip.png
src/components/cmh/theme-5/images/shareTip.png
+0
-0
index.vue
src/components/cmh/theme-5/index.vue
+10
-49
support.vue
src/components/cmh/theme-5/support.vue
+11
-55
index.vue
src/components/index.vue
+2
-0
manager.js
src/components/manager.js
+100
-27
version.js
src/components/version.js
+23
-0
vue.config.js
vue.config.js
+1
-1
No files found.
src/components/cmh/theme-1/components/share-img-dialog.vue
View file @
d6b0044e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<canvas
id=
"canvas"
class=
"img-canvas"
width=
"560"
height=
"996"
></canvas>
<canvas
id=
"canvas"
class=
"img-canvas"
width=
"560"
height=
"996"
></canvas>
<div
class=
"content"
>
<div
class=
"content"
>
<img
class=
"box-img"
mode=
"widthFix"
id=
"shareImage"
/>
<img
class=
"box-img"
mode=
"widthFix"
id=
"shareImage"
/>
<div
class=
"tips"
>
长按保存至相册,
打开朋友圈选取海报转发
</div>
<div
class=
"tips"
>
长按保存至相册,
分享好友或分享朋友圈
</div>
<div
class=
"iconfont icon-guanbi"
@
click=
"close"
></div>
<div
class=
"iconfont icon-guanbi"
@
click=
"close"
></div>
</div>
</div>
</div>
</div>
...
...
src/components/cmh/theme-1/components/share-select-dialog.vue
View file @
d6b0044e
...
@@ -17,10 +17,14 @@
...
@@ -17,10 +17,14 @@
<img
src=
"../images/wx_icon.png"
mode=
"aspectFit"
/>
<img
src=
"../images/wx_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
微信
</div>
<div
class=
"share-type-name"
>
微信
</div>
</div>
</div>
<div
class=
"share-type-item"
@
click=
"share
Pyq
"
>
<div
class=
"share-type-item"
@
click=
"share
Timeline"
v-if=
"isSupportShareTimeline
"
>
<img
src=
"../images/pyq_icon.png"
mode=
"aspectFit"
/>
<img
src=
"../images/pyq_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
朋友圈
</div>
<div
class=
"share-type-name"
>
朋友圈
</div>
</div>
</div>
<div
class=
"share-type-item"
@
click=
"sharePoster"
>
<img
src=
"../images/fenxianghaibao_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
分享海报
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -42,6 +46,7 @@
...
@@ -42,6 +46,7 @@
<
script
>
<
script
>
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
isSupportShareTimeline
}
from
'../../../version'
;
const
{
const
{
getReportRecord
,
getReportRecord
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -66,10 +71,11 @@ export default {
...
@@ -66,10 +71,11 @@ export default {
pageSize
:
20
,
pageSize
:
20
,
currentPage
:
1
,
currentPage
:
1
,
list
:
[],
list
:
[],
isSupportShareTimeline
:
false
,
};
};
},
},
created
(){
created
(){
this
.
isSupportShareTimeline
=
isSupportShareTimeline
()
},
},
methods
:
{
methods
:
{
reloadData
(){
reloadData
(){
...
@@ -113,8 +119,11 @@ export default {
...
@@ -113,8 +119,11 @@ export default {
shareWx
(){
shareWx
(){
this
.
$emit
(
"shareWx"
,
this
.
conditionObj
);
this
.
$emit
(
"shareWx"
,
this
.
conditionObj
);
},
},
sharePyq
(){
sharePoster
(){
this
.
$emit
(
"sharePyq"
,
this
.
conditionObj
);
this
.
$emit
(
"sharePoster"
,
this
.
conditionObj
);
},
shareTimeline
(){
this
.
$emit
(
"shareTimeline"
,
this
.
conditionObj
);
}
}
},
},
filters
:{
filters
:{
...
@@ -126,7 +135,6 @@ export default {
...
@@ -126,7 +135,6 @@ export default {
},
},
watch
:{
watch
:{
show
(
n
){
show
(
n
){
console
.
log
(
"show---------->"
,
n
);
if
(
n
){
if
(
n
){
this
.
reloadData
();
this
.
reloadData
();
}
}
...
...
src/components/cmh/theme-1/components/share-tip-mask.vue
0 → 100644
View file @
d6b0044e
<
template
>
<div
class=
"dialog-bg"
v-if=
"show"
@
click=
"close"
>
<img
src=
"../images/shareTip.png"
>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
show
:
Boolean
,
},
data
()
{
return
{};
},
created
()
{},
methods
:
{
close
()
{
this
.
$emit
(
"update:show"
,
false
);
},
}
};
</
script
>
<
style
scoped
>
.dialog-bg
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
z-index
:
100
;
background
:
rgba
(
0
,
0
,
0
,
0.85
);
}
.dialog-bg
img
{
width
:
100%
;
height
:
180px
;
}
</
style
>
src/components/cmh/theme-1/images/fenxianghaibao_icon.png
0 → 100644
View file @
d6b0044e
10.2 KB
src/components/cmh/theme-1/images/shareTip.png
0 → 100644
View file @
d6b0044e
24.8 KB
src/components/cmh/theme-1/index.vue
View file @
d6b0044e
...
@@ -152,15 +152,18 @@
...
@@ -152,15 +152,18 @@
:enterpriseId=
"enterpriseId"
:enterpriseId=
"enterpriseId"
:gameId=
"gameId"
:gameId=
"gameId"
:shareConditionObj=
"shareConditionObj"
:shareConditionObj=
"shareConditionObj"
@
shareWx=
"shareWx"
@
shareWx=
"manager.shareWx()"
@
sharePyq=
"sharePyq"
@
shareTimeline=
"manager.shareTimeline()"
@
sharePoster=
"manager.sharePoster()"
></share-select-dialog>
></share-select-dialog>
<share-img-dialog
<share-img-dialog
:show
.
sync=
"showShareImgDialog"
:show
.
sync=
"showShareImgDialog"
v-bind=
"p
yq
Options"
v-bind=
"p
oster
Options"
></share-img-dialog>
></share-img-dialog>
<share-tip-mask
:show
.
sync=
"showShareTipMask"
/>
<alert-dialog
v-bind
.
sync=
"alertOptions"
></alert-dialog>
<alert-dialog
v-bind
.
sync=
"alertOptions"
></alert-dialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -173,8 +176,6 @@ const {
...
@@ -173,8 +176,6 @@ const {
getGamePlayBarrage
,
getGamePlayBarrage
,
getIntegral
,
getIntegral
,
getGameRule
,
getGameRule
,
saveGameShare
,
getGameShareQrCodeUrl
,
shareEvent
,
shareEvent
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -191,7 +192,7 @@ import RewardFailDialog from "./components/reward-fail.vue";
...
@@ -191,7 +192,7 @@ import RewardFailDialog from "./components/reward-fail.vue";
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
AlertDialog
from
"./components/alert.vue"
;
import
AlertDialog
from
"./components/alert.vue"
;
import
ShareTipMask
from
'./components/share-tip-mask.vue'
;
export
default
{
export
default
{
components
:
{
components
:
{
OpenBoxDialog
,
OpenBoxDialog
,
...
@@ -202,10 +203,13 @@ export default {
...
@@ -202,10 +203,13 @@ export default {
ShareSelectDialog
,
ShareSelectDialog
,
ShareImgDialog
,
ShareImgDialog
,
AlertDialog
,
AlertDialog
,
ShareTipMask
,
},
},
data
()
{
data
()
{
return
{
return
{
clickIndex
:
-
1
,
clickIndex
:
-
1
,
posterOptions
:{},
showShareTipMask
:
false
,
animationEnd
:
false
,
animationEnd
:
false
,
isOpening
:
false
,
isOpening
:
false
,
showOpenBoxDialog
:
false
,
showOpenBoxDialog
:
false
,
...
@@ -442,50 +446,6 @@ export default {
...
@@ -442,50 +446,6 @@ export default {
await
this
.
manager
.
checkPlay
();
await
this
.
manager
.
checkPlay
();
this
.
showShareSelectDialog
=
true
;
this
.
showShareSelectDialog
=
true
;
},
},
shareWx
()
{
let
options
=
this
.
shareConditionObj
;
let
data
=
{
gameId
:
this
.
gameId
,
enterpriseId
:
this
.
enterpriseId
,
memberId
:
this
.
memberId
,
shareType
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
return
getGameShareQrCodeUrl
(
data
);
}).
then
((
result
)
=>
{
let
linkId
=
result
.
linkId
;
this
.
manager
.
shareWx
({
title
:
options
.
shareTitle
,
imageUrl
:
options
.
shareCard
,
path
:
`/pages/page-transit/page-transit-qy?scene=
${
linkId
}
`
,
});
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
})
},
sharePyq
()
{
let
options
=
this
.
shareConditionObj
;
let
data
=
{
gameId
:
this
.
gameId
,
enterpriseId
:
this
.
enterpriseId
,
memberId
:
this
.
memberId
,
shareType
:
options
.
type
==
12
?
2
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
return
getGameShareQrCodeUrl
(
data
)
}).
then
((
result
)
=>
{
this
.
pyqOptions
=
{
bgImage
:
options
.
shareReport
,
qrcodeUrl
:
result
.
qrCodeUrl
,
};
this
.
showShareSelectDialog
=
false
;
this
.
showShareImgDialog
=
true
;
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
})
},
clickAdImg
()
{
clickAdImg
()
{
window
.
wx
.
miniProgram
.
navigateTo
({
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
"/"
+
this
.
game
.
gameExt
.
adsLinkUrl
,
url
:
"/"
+
this
.
game
.
gameExt
.
adsLinkUrl
,
...
...
src/components/cmh/theme-1/support.vue
View file @
d6b0044e
...
@@ -64,14 +64,17 @@
...
@@ -64,14 +64,17 @@
:enterpriseId=
"enterpriseId"
:enterpriseId=
"enterpriseId"
:gameId=
"gameId"
:gameId=
"gameId"
:shareConditionObj=
"shareConditionObj"
:shareConditionObj=
"shareConditionObj"
@
shareWx=
"shareWx"
@
shareWx=
"manager.shareWx()"
@
sharePyq=
"sharePyq"
@
shareTimeline=
"manager.shareTimeline()"
@
sharePoster=
"manager.sharePoster()"
></share-select-dialog>
></share-select-dialog>
<share-img-dialog
<share-img-dialog
:show
.
sync=
"showShareImgDialog"
:show
.
sync=
"showShareImgDialog"
v-bind=
"p
yq
Options"
v-bind=
"p
oster
Options"
></share-img-dialog>
></share-img-dialog>
<share-tip-mask
:show
.
sync=
"showShareTipMask"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -81,7 +84,6 @@ const {
...
@@ -81,7 +84,6 @@ const {
getHelpDetail
,
getHelpDetail
,
getGameReward
,
getGameReward
,
getGameInfo
,
getGameInfo
,
saveGameShare
,
getGameShareQrCodeUrl
,
getGameShareQrCodeUrl
,
getGameRule
,
getGameRule
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -89,7 +91,7 @@ import AlertDialog from "./components/alert.vue";
...
@@ -89,7 +91,7 @@ import AlertDialog from "./components/alert.vue";
import
FwhQrcodeDialog
from
"./components/fwh-qrcode.vue"
;
import
FwhQrcodeDialog
from
"./components/fwh-qrcode.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareTipMask
from
'./components/share-tip-mask.vue'
;
import
{
Manager
}
from
"../../manager"
;
import
{
Manager
}
from
"../../manager"
;
export
default
{
export
default
{
...
@@ -98,9 +100,11 @@ export default {
...
@@ -98,9 +100,11 @@ export default {
ShareSelectDialog
,
ShareSelectDialog
,
ShareImgDialog
,
ShareImgDialog
,
FwhQrcodeDialog
,
FwhQrcodeDialog
,
ShareTipMask
,
},
},
data
()
{
data
()
{
return
{
return
{
showShareTipMask
:
false
,
alertOptions
:
{},
alertOptions
:
{},
game
:
{},
game
:
{},
helpDetail
:
{},
helpDetail
:
{},
...
@@ -111,7 +115,7 @@ export default {
...
@@ -111,7 +115,7 @@ export default {
gameReward
:
[],
gameReward
:
[],
showShareSelectDialog
:
false
,
showShareSelectDialog
:
false
,
showShareImgDialog
:
false
,
showShareImgDialog
:
false
,
p
yqOptions
:
{},
p
osterOptions
:
{},
memberId
:
""
,
memberId
:
""
,
enterpriseId
:
""
,
enterpriseId
:
""
,
gameId
:
""
,
gameId
:
""
,
...
@@ -195,54 +199,6 @@ export default {
...
@@ -195,54 +199,6 @@ export default {
support
()
{
support
()
{
this
.
manager
.
support
();
this
.
manager
.
support
();
},
},
async
shareWx
()
{
let
options
=
this
.
shareConditionObj
;
let
query
=
this
.
$route
.
query
;
let
data
=
{
gameId
:
query
.
gameId
,
enterpriseId
:
query
.
enterpriseId
,
memberId
:
query
.
shareMemberId
,
shareType
:
1
,
};
await
saveGameShare
(
data
).
catch
(()
=>
{});
getGameShareQrCodeUrl
(
data
).
then
((
result
)
=>
{
let
linkId
=
result
.
linkId
;
this
.
showShareSelectDialog
=
false
;
this
.
manager
.
shareWx
({
title
:
options
.
shareTitle
,
imageUrl
:
options
.
shareCard
,
path
:
`/pages/page-transit/page-transit-qy?scene=
${
linkId
}
`
,
});
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
});
},
async
sharePyq
()
{
let
options
=
this
.
shareConditionObj
;
let
query
=
this
.
$route
.
query
;
let
data
=
{
gameId
:
query
.
gameId
,
enterpriseId
:
query
.
enterpriseId
,
memberId
:
query
.
shareMemberId
,
shareType
:
options
.
type
==
12
?
2
:
1
,
};
await
saveGameShare
(
data
).
catch
(()
=>
{});
getGameShareQrCodeUrl
(
data
).
then
((
result
)
=>
{
this
.
pyqOptions
=
{
bgImage
:
options
.
shareReport
,
qrcodeUrl
:
result
.
qrCodeUrl
,
};
this
.
showShareSelectDialog
=
false
;
this
.
showShareImgDialog
=
true
;
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
});
},
async
clickShareBtn
()
{
await
this
.
manager
.
checkPlay
();
this
.
showShareSelectDialog
=
true
;
},
shareFwh
()
{
shareFwh
()
{
let
query
=
this
.
$route
.
query
;
let
query
=
this
.
$route
.
query
;
getGameShareQrCodeUrl
({
getGameShareQrCodeUrl
({
...
...
src/components/cmh/theme-2/components/share-img-dialog.vue
View file @
d6b0044e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<canvas
id=
"canvas"
class=
"img-canvas"
width=
"560"
height=
"996"
></canvas>
<canvas
id=
"canvas"
class=
"img-canvas"
width=
"560"
height=
"996"
></canvas>
<div
class=
"content"
>
<div
class=
"content"
>
<img
class=
"box-img"
mode=
"widthFix"
id=
"shareImage"
/>
<img
class=
"box-img"
mode=
"widthFix"
id=
"shareImage"
/>
<div
class=
"tips"
>
长按保存至相册,
打开朋友圈选取海报转发
</div>
<div
class=
"tips"
>
长按保存至相册,
分享好友或分享朋友圈
</div>
<div
class=
"iconfont icon-guanbi"
@
click=
"close"
></div>
<div
class=
"iconfont icon-guanbi"
@
click=
"close"
></div>
</div>
</div>
</div>
</div>
...
...
src/components/cmh/theme-2/components/share-select-dialog.vue
View file @
d6b0044e
...
@@ -17,10 +17,14 @@
...
@@ -17,10 +17,14 @@
<img
src=
"../images/wx_icon.png"
mode=
"aspectFit"
/>
<img
src=
"../images/wx_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
微信
</div>
<div
class=
"share-type-name"
>
微信
</div>
</div>
</div>
<div
class=
"share-type-item"
@
click=
"share
Pyq
"
>
<div
class=
"share-type-item"
@
click=
"share
Timeline"
v-if=
"isSupportShareTimeline
"
>
<img
src=
"../images/pyq_icon.png"
mode=
"aspectFit"
/>
<img
src=
"../images/pyq_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
朋友圈
</div>
<div
class=
"share-type-name"
>
朋友圈
</div>
</div>
</div>
<div
class=
"share-type-item"
@
click=
"sharePoster"
>
<img
src=
"../images/fenxianghaibao_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
分享海报
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -42,6 +46,7 @@
...
@@ -42,6 +46,7 @@
<
script
>
<
script
>
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
isSupportShareTimeline
}
from
'../../../version'
;
const
{
const
{
getReportRecord
,
getReportRecord
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -66,10 +71,11 @@ export default {
...
@@ -66,10 +71,11 @@ export default {
pageSize
:
20
,
pageSize
:
20
,
currentPage
:
1
,
currentPage
:
1
,
list
:
[],
list
:
[],
isSupportShareTimeline
:
false
,
};
};
},
},
created
(){
created
(){
this
.
loadData
();
this
.
isSupportShareTimeline
=
isSupportShareTimeline
();
},
},
methods
:
{
methods
:
{
reloadData
(){
reloadData
(){
...
@@ -114,8 +120,11 @@ export default {
...
@@ -114,8 +120,11 @@ export default {
shareWx
(){
shareWx
(){
this
.
$emit
(
"shareWx"
,
this
.
conditionObj
);
this
.
$emit
(
"shareWx"
,
this
.
conditionObj
);
},
},
sharePyq
(){
sharePoster
(){
this
.
$emit
(
"sharePyq"
,
this
.
conditionObj
);
this
.
$emit
(
"sharePoster"
,
this
.
conditionObj
);
},
shareTimeline
(){
this
.
$emit
(
"shareTimeline"
,
this
.
conditionObj
);
}
}
},
},
filters
:{
filters
:{
...
@@ -125,6 +134,13 @@ export default {
...
@@ -125,6 +134,13 @@ export default {
return
date
.
getFullYear
()
+
"-"
+
(
date
.
getMonth
()
+
1
)
+
"-"
+
date
.
getDate
()
return
date
.
getFullYear
()
+
"-"
+
(
date
.
getMonth
()
+
1
)
+
"-"
+
date
.
getDate
()
}
}
},
},
watch
:{
show
(
n
){
if
(
n
){
this
.
reloadData
();
}
},
}
};
};
</
script
>
</
script
>
...
...
src/components/cmh/theme-2/components/share-tip-mask.vue
0 → 100644
View file @
d6b0044e
<
template
>
<div
class=
"dialog-bg"
v-if=
"show"
@
click=
"close"
>
<img
src=
"../images/shareTip.png"
>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
show
:
Boolean
,
},
data
()
{
return
{};
},
created
()
{},
methods
:
{
close
()
{
this
.
$emit
(
"update:show"
,
false
);
},
}
};
</
script
>
<
style
scoped
>
.dialog-bg
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
z-index
:
100
;
background
:
rgba
(
0
,
0
,
0
,
0.85
);
}
.dialog-bg
img
{
width
:
100%
;
height
:
180px
;
}
</
style
>
src/components/cmh/theme-2/images/fenxianghaibao_icon.png
0 → 100644
View file @
d6b0044e
10.2 KB
src/components/cmh/theme-2/images/shareTip.png
0 → 100644
View file @
d6b0044e
24.8 KB
src/components/cmh/theme-2/index.vue
View file @
d6b0044e
...
@@ -139,15 +139,18 @@
...
@@ -139,15 +139,18 @@
:enterpriseId=
"enterpriseId"
:enterpriseId=
"enterpriseId"
:gameId=
"gameId"
:gameId=
"gameId"
:shareConditionObj=
"shareConditionObj"
:shareConditionObj=
"shareConditionObj"
@
shareWx=
"shareWx"
@
shareWx=
"manager.shareWx()"
@
sharePyq=
"sharePyq"
@
shareTimeline=
"manager.shareTimeline()"
@
sharePoster=
"manager.sharePoster()"
></share-select-dialog>
></share-select-dialog>
<share-img-dialog
<share-img-dialog
:show
.
sync=
"showShareImgDialog"
:show
.
sync=
"showShareImgDialog"
v-bind=
"p
yq
Options"
v-bind=
"p
oster
Options"
></share-img-dialog>
></share-img-dialog>
<share-tip-mask
:show
.
sync=
"showShareTipMask"
/>
<alert-dialog
v-bind
.
sync=
"alertOptions"
></alert-dialog>
<alert-dialog
v-bind
.
sync=
"alertOptions"
></alert-dialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -160,8 +163,6 @@ const {
...
@@ -160,8 +163,6 @@ const {
getGamePlayBarrage
,
getGamePlayBarrage
,
getIntegral
,
getIntegral
,
getGameRule
,
getGameRule
,
saveGameShare
,
getGameShareQrCodeUrl
,
shareEvent
,
shareEvent
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -178,6 +179,7 @@ import RewardFailDialog from "./components/reward-fail.vue";
...
@@ -178,6 +179,7 @@ import RewardFailDialog from "./components/reward-fail.vue";
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
AlertDialog
from
"./components/alert.vue"
;
import
AlertDialog
from
"./components/alert.vue"
;
import
ShareTipMask
from
'./components/share-tip-mask.vue'
;
export
default
{
export
default
{
components
:
{
components
:
{
OpenBoxDialog
,
OpenBoxDialog
,
...
@@ -188,10 +190,13 @@ export default {
...
@@ -188,10 +190,13 @@ export default {
ShareSelectDialog
,
ShareSelectDialog
,
ShareImgDialog
,
ShareImgDialog
,
AlertDialog
,
AlertDialog
,
ShareTipMask
,
},
},
data
()
{
data
()
{
return
{
return
{
clickIndex
:
-
1
,
clickIndex
:
-
1
,
posterOptions
:{},
showShareTipMask
:
false
,
animationEnd
:
false
,
animationEnd
:
false
,
isOpening
:
false
,
isOpening
:
false
,
showOpenBoxDialog
:
false
,
showOpenBoxDialog
:
false
,
...
@@ -427,50 +432,6 @@ export default {
...
@@ -427,50 +432,6 @@ export default {
await
this
.
manager
.
checkPlay
();
await
this
.
manager
.
checkPlay
();
this
.
showShareSelectDialog
=
true
;
this
.
showShareSelectDialog
=
true
;
},
},
shareWx
()
{
let
options
=
this
.
shareConditionObj
;
let
data
=
{
gameId
:
this
.
gameId
,
enterpriseId
:
this
.
enterpriseId
,
memberId
:
this
.
memberId
,
shareType
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
return
getGameShareQrCodeUrl
(
data
);
}).
then
((
result
)
=>
{
let
linkId
=
result
.
linkId
;
this
.
manager
.
shareWx
({
title
:
options
.
shareTitle
,
imageUrl
:
options
.
shareCard
,
path
:
`/pages/page-transit/page-transit-qy?scene=
${
linkId
}
`
,
});
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
})
},
sharePyq
()
{
let
options
=
this
.
shareConditionObj
;
let
data
=
{
gameId
:
this
.
gameId
,
enterpriseId
:
this
.
enterpriseId
,
memberId
:
this
.
memberId
,
shareType
:
options
.
type
==
12
?
2
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
return
getGameShareQrCodeUrl
(
data
)
}).
then
((
result
)
=>
{
this
.
pyqOptions
=
{
bgImage
:
options
.
shareReport
,
qrcodeUrl
:
result
.
qrCodeUrl
,
};
this
.
showShareSelectDialog
=
false
;
this
.
showShareImgDialog
=
true
;
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
})
},
clickAdImg
()
{
clickAdImg
()
{
window
.
wx
.
miniProgram
.
navigateTo
({
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
"/"
+
this
.
game
.
gameExt
.
adsLinkUrl
,
url
:
"/"
+
this
.
game
.
gameExt
.
adsLinkUrl
,
...
...
src/components/cmh/theme-2/support.vue
View file @
d6b0044e
...
@@ -64,14 +64,17 @@
...
@@ -64,14 +64,17 @@
:enterpriseId=
"enterpriseId"
:enterpriseId=
"enterpriseId"
:gameId=
"gameId"
:gameId=
"gameId"
:shareConditionObj=
"shareConditionObj"
:shareConditionObj=
"shareConditionObj"
@
shareWx=
"shareWx"
@
shareWx=
"manager.shareWx()"
@
sharePyq=
"sharePyq"
@
shareTimeline=
"manager.shareTimeline()"
@
sharePoster=
"manager.sharePoster()"
></share-select-dialog>
></share-select-dialog>
<share-img-dialog
<share-img-dialog
:show
.
sync=
"showShareImgDialog"
:show
.
sync=
"showShareImgDialog"
v-bind=
"p
yq
Options"
v-bind=
"p
oster
Options"
></share-img-dialog>
></share-img-dialog>
<share-tip-mask
:show
.
sync=
"showShareTipMask"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -81,7 +84,6 @@ const {
...
@@ -81,7 +84,6 @@ const {
getHelpDetail
,
getHelpDetail
,
getGameReward
,
getGameReward
,
getGameInfo
,
getGameInfo
,
saveGameShare
,
getGameShareQrCodeUrl
,
getGameShareQrCodeUrl
,
getGameRule
,
getGameRule
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -89,7 +91,7 @@ import AlertDialog from "./components/alert.vue";
...
@@ -89,7 +91,7 @@ import AlertDialog from "./components/alert.vue";
import
FwhQrcodeDialog
from
"./components/fwh-qrcode.vue"
;
import
FwhQrcodeDialog
from
"./components/fwh-qrcode.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareTipMask
from
'./components/share-tip-mask.vue'
;
import
{
Manager
}
from
"../../manager"
;
import
{
Manager
}
from
"../../manager"
;
export
default
{
export
default
{
...
@@ -98,9 +100,11 @@ export default {
...
@@ -98,9 +100,11 @@ export default {
ShareSelectDialog
,
ShareSelectDialog
,
ShareImgDialog
,
ShareImgDialog
,
FwhQrcodeDialog
,
FwhQrcodeDialog
,
ShareTipMask
,
},
},
data
()
{
data
()
{
return
{
return
{
showShareTipMask
:
false
,
alertOptions
:
{},
alertOptions
:
{},
game
:
{},
game
:
{},
helpDetail
:
{},
helpDetail
:
{},
...
@@ -111,7 +115,7 @@ export default {
...
@@ -111,7 +115,7 @@ export default {
gameReward
:
[],
gameReward
:
[],
showShareSelectDialog
:
false
,
showShareSelectDialog
:
false
,
showShareImgDialog
:
false
,
showShareImgDialog
:
false
,
p
yqOptions
:
{},
p
osterOptions
:
{},
memberId
:
""
,
memberId
:
""
,
enterpriseId
:
""
,
enterpriseId
:
""
,
gameId
:
""
,
gameId
:
""
,
...
@@ -195,58 +199,6 @@ export default {
...
@@ -195,58 +199,6 @@ export default {
support
()
{
support
()
{
this
.
manager
.
support
();
this
.
manager
.
support
();
},
},
async
shareWx
()
{
let
options
=
this
.
shareConditionObj
;
let
query
=
this
.
$route
.
query
;
let
data
=
{
gameId
:
query
.
gameId
,
enterpriseId
:
query
.
enterpriseId
,
memberId
:
query
.
shareMemberId
,
shareType
:
1
,
};
await
saveGameShare
(
data
).
catch
(()
=>
{});
getGameShareQrCodeUrl
(
data
)
.
then
((
result
)
=>
{
let
linkId
=
result
.
linkId
;
this
.
showShareSelectDialog
=
false
;
this
.
manager
.
shareWx
({
title
:
options
.
shareTitle
,
imageUrl
:
options
.
shareCard
,
path
:
`/pages/page-transit/page-transit-qy?scene=
${
linkId
}
`
,
});
})
.
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
});
},
async
sharePyq
()
{
let
options
=
this
.
shareConditionObj
;
let
query
=
this
.
$route
.
query
;
let
data
=
{
gameId
:
query
.
gameId
,
enterpriseId
:
query
.
enterpriseId
,
memberId
:
query
.
shareMemberId
,
shareType
:
options
.
type
==
12
?
2
:
1
,
};
await
saveGameShare
(
data
).
catch
(()
=>
{});
getGameShareQrCodeUrl
(
data
)
.
then
((
result
)
=>
{
this
.
pyqOptions
=
{
bgImage
:
options
.
shareReport
,
qrcodeUrl
:
result
.
qrCodeUrl
,
};
this
.
showShareSelectDialog
=
false
;
this
.
showShareImgDialog
=
true
;
})
.
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
});
},
async
clickShareBtn
()
{
await
this
.
manager
.
checkPlay
();
this
.
showShareSelectDialog
=
true
;
},
shareFwh
()
{
shareFwh
()
{
let
query
=
this
.
$route
.
query
;
let
query
=
this
.
$route
.
query
;
getGameShareQrCodeUrl
({
getGameShareQrCodeUrl
({
...
...
src/components/cmh/theme-3/components/share-img-dialog.vue
View file @
d6b0044e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<canvas
id=
"canvas"
class=
"img-canvas"
width=
"560"
height=
"996"
></canvas>
<canvas
id=
"canvas"
class=
"img-canvas"
width=
"560"
height=
"996"
></canvas>
<div
class=
"content"
>
<div
class=
"content"
>
<img
class=
"box-img"
mode=
"widthFix"
id=
"shareImage"
/>
<img
class=
"box-img"
mode=
"widthFix"
id=
"shareImage"
/>
<div
class=
"tips"
>
长按保存至相册,
打开朋友圈选取海报转发
</div>
<div
class=
"tips"
>
长按保存至相册,
分享好友或分享朋友圈
</div>
<div
class=
"iconfont icon-guanbi"
@
click=
"close"
></div>
<div
class=
"iconfont icon-guanbi"
@
click=
"close"
></div>
</div>
</div>
</div>
</div>
...
...
src/components/cmh/theme-3/components/share-select-dialog.vue
View file @
d6b0044e
...
@@ -17,10 +17,14 @@
...
@@ -17,10 +17,14 @@
<img
src=
"../images/wx_icon.png"
mode=
"aspectFit"
/>
<img
src=
"../images/wx_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
微信
</div>
<div
class=
"share-type-name"
>
微信
</div>
</div>
</div>
<div
class=
"share-type-item"
@
click=
"share
Pyq
"
>
<div
class=
"share-type-item"
@
click=
"share
Timeline"
v-if=
"isSupportShareTimeline
"
>
<img
src=
"../images/pyq_icon.png"
mode=
"aspectFit"
/>
<img
src=
"../images/pyq_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
朋友圈
</div>
<div
class=
"share-type-name"
>
朋友圈
</div>
</div>
</div>
<div
class=
"share-type-item"
@
click=
"sharePoster"
>
<img
src=
"../images/fenxianghaibao_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
分享海报
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -42,6 +46,7 @@
...
@@ -42,6 +46,7 @@
<
script
>
<
script
>
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
isSupportShareTimeline
}
from
'../../../version'
;
const
{
const
{
getReportRecord
,
getReportRecord
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -66,10 +71,11 @@ export default {
...
@@ -66,10 +71,11 @@ export default {
pageSize
:
20
,
pageSize
:
20
,
currentPage
:
1
,
currentPage
:
1
,
list
:
[],
list
:
[],
isSupportShareTimeline
:
false
,
};
};
},
},
created
(){
created
(){
this
.
loadData
();
this
.
isSupportShareTimeline
=
isSupportShareTimeline
()
},
},
methods
:
{
methods
:
{
reloadData
(){
reloadData
(){
...
@@ -114,8 +120,11 @@ export default {
...
@@ -114,8 +120,11 @@ export default {
shareWx
(){
shareWx
(){
this
.
$emit
(
"shareWx"
,
this
.
conditionObj
);
this
.
$emit
(
"shareWx"
,
this
.
conditionObj
);
},
},
sharePyq
(){
sharePoster
(){
this
.
$emit
(
"sharePyq"
,
this
.
conditionObj
);
this
.
$emit
(
"sharePoster"
,
this
.
conditionObj
);
},
shareTimeline
(){
this
.
$emit
(
"shareTimeline"
,
this
.
conditionObj
);
}
}
},
},
filters
:{
filters
:{
...
@@ -124,6 +133,13 @@ export default {
...
@@ -124,6 +133,13 @@ export default {
let
date
=
new
Date
(
value
);
let
date
=
new
Date
(
value
);
return
date
.
getFullYear
()
+
"-"
+
(
date
.
getMonth
()
+
1
)
+
"-"
+
date
.
getDate
()
return
date
.
getFullYear
()
+
"-"
+
(
date
.
getMonth
()
+
1
)
+
"-"
+
date
.
getDate
()
}
}
},
watch
:{
show
(
n
){
if
(
n
){
this
.
reloadData
();
}
},
}
}
};
};
</
script
>
</
script
>
...
...
src/components/cmh/theme-3/components/share-tip-mask.vue
0 → 100644
View file @
d6b0044e
<
template
>
<div
class=
"dialog-bg"
v-if=
"show"
@
click=
"close"
>
<img
src=
"../images/shareTip.png"
>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
show
:
Boolean
,
},
data
()
{
return
{};
},
created
()
{},
methods
:
{
close
()
{
this
.
$emit
(
"update:show"
,
false
);
},
}
};
</
script
>
<
style
scoped
>
.dialog-bg
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
z-index
:
100
;
background
:
rgba
(
0
,
0
,
0
,
0.85
);
}
.dialog-bg
img
{
width
:
100%
;
height
:
180px
;
}
</
style
>
src/components/cmh/theme-3/images/fenxianghaibao_icon.png
0 → 100644
View file @
d6b0044e
10.2 KB
src/components/cmh/theme-3/images/shareTip.png
0 → 100644
View file @
d6b0044e
24.8 KB
src/components/cmh/theme-3/index.vue
View file @
d6b0044e
...
@@ -139,15 +139,18 @@
...
@@ -139,15 +139,18 @@
:enterpriseId=
"enterpriseId"
:enterpriseId=
"enterpriseId"
:gameId=
"gameId"
:gameId=
"gameId"
:shareConditionObj=
"shareConditionObj"
:shareConditionObj=
"shareConditionObj"
@
shareWx=
"shareWx"
@
shareWx=
"manager.shareWx()"
@
sharePyq=
"sharePyq"
@
shareTimeline=
"manager.shareTimeline()"
@
sharePoster=
"manager.sharePoster()"
></share-select-dialog>
></share-select-dialog>
<share-img-dialog
<share-img-dialog
:show
.
sync=
"showShareImgDialog"
:show
.
sync=
"showShareImgDialog"
v-bind=
"p
yq
Options"
v-bind=
"p
oster
Options"
></share-img-dialog>
></share-img-dialog>
<share-tip-mask
:show
.
sync=
"showShareTipMask"
/>
<alert-dialog
v-bind
.
sync=
"alertOptions"
></alert-dialog>
<alert-dialog
v-bind
.
sync=
"alertOptions"
></alert-dialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -160,8 +163,6 @@ const {
...
@@ -160,8 +163,6 @@ const {
getGamePlayBarrage
,
getGamePlayBarrage
,
getIntegral
,
getIntegral
,
getGameRule
,
getGameRule
,
saveGameShare
,
getGameShareQrCodeUrl
,
shareEvent
,
shareEvent
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -178,6 +179,7 @@ import RewardFailDialog from "./components/reward-fail.vue";
...
@@ -178,6 +179,7 @@ import RewardFailDialog from "./components/reward-fail.vue";
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
AlertDialog
from
"./components/alert.vue"
;
import
AlertDialog
from
"./components/alert.vue"
;
import
ShareTipMask
from
'./components/share-tip-mask.vue'
;
export
default
{
export
default
{
components
:
{
components
:
{
OpenBoxDialog
,
OpenBoxDialog
,
...
@@ -188,10 +190,13 @@ export default {
...
@@ -188,10 +190,13 @@ export default {
ShareSelectDialog
,
ShareSelectDialog
,
ShareImgDialog
,
ShareImgDialog
,
AlertDialog
,
AlertDialog
,
ShareTipMask
,
},
},
data
()
{
data
()
{
return
{
return
{
clickIndex
:
-
1
,
clickIndex
:
-
1
,
posterOptions
:{},
showShareTipMask
:
false
,
animationEnd
:
false
,
animationEnd
:
false
,
isOpening
:
false
,
isOpening
:
false
,
showOpenBoxDialog
:
false
,
showOpenBoxDialog
:
false
,
...
@@ -414,50 +419,6 @@ export default {
...
@@ -414,50 +419,6 @@ export default {
await
this
.
manager
.
checkPlay
();
await
this
.
manager
.
checkPlay
();
this
.
showShareSelectDialog
=
true
;
this
.
showShareSelectDialog
=
true
;
},
},
shareWx
()
{
let
options
=
this
.
shareConditionObj
;
let
data
=
{
gameId
:
this
.
gameId
,
enterpriseId
:
this
.
enterpriseId
,
memberId
:
this
.
memberId
,
shareType
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
return
getGameShareQrCodeUrl
(
data
);
}).
then
((
result
)
=>
{
let
linkId
=
result
.
linkId
;
this
.
manager
.
shareWx
({
title
:
options
.
shareTitle
,
imageUrl
:
options
.
shareCard
,
path
:
`/pages/page-transit/page-transit-qy?scene=
${
linkId
}
`
,
});
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
})
},
sharePyq
()
{
let
options
=
this
.
shareConditionObj
;
let
data
=
{
gameId
:
this
.
gameId
,
enterpriseId
:
this
.
enterpriseId
,
memberId
:
this
.
memberId
,
shareType
:
options
.
type
==
12
?
2
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
return
getGameShareQrCodeUrl
(
data
)
}).
then
((
result
)
=>
{
this
.
pyqOptions
=
{
bgImage
:
options
.
shareReport
,
qrcodeUrl
:
result
.
qrCodeUrl
,
};
this
.
showShareSelectDialog
=
false
;
this
.
showShareImgDialog
=
true
;
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
})
},
clickAdImg
()
{
clickAdImg
()
{
window
.
wx
.
miniProgram
.
navigateTo
({
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
"/"
+
this
.
game
.
gameExt
.
adsLinkUrl
,
url
:
"/"
+
this
.
game
.
gameExt
.
adsLinkUrl
,
...
...
src/components/cmh/theme-3/support.vue
View file @
d6b0044e
...
@@ -66,14 +66,17 @@
...
@@ -66,14 +66,17 @@
:enterpriseId=
"enterpriseId"
:enterpriseId=
"enterpriseId"
:gameId=
"gameId"
:gameId=
"gameId"
:shareConditionObj=
"shareConditionObj"
:shareConditionObj=
"shareConditionObj"
@
shareWx=
"shareWx"
@
shareWx=
"manager.shareWx()"
@
sharePyq=
"sharePyq"
@
shareTimeline=
"manager.shareTimeline()"
@
sharePoster=
"manager.sharePoster()"
></share-select-dialog>
></share-select-dialog>
<share-img-dialog
<share-img-dialog
:show
.
sync=
"showShareImgDialog"
:show
.
sync=
"showShareImgDialog"
v-bind=
"p
yq
Options"
v-bind=
"p
oster
Options"
></share-img-dialog>
></share-img-dialog>
<share-tip-mask
:show
.
sync=
"showShareTipMask"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -83,7 +86,6 @@ const {
...
@@ -83,7 +86,6 @@ const {
getHelpDetail
,
getHelpDetail
,
getGameReward
,
getGameReward
,
getGameInfo
,
getGameInfo
,
saveGameShare
,
getGameShareQrCodeUrl
,
getGameShareQrCodeUrl
,
getGameRule
,
getGameRule
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -91,7 +93,7 @@ import AlertDialog from "./components/alert.vue";
...
@@ -91,7 +93,7 @@ import AlertDialog from "./components/alert.vue";
import
FwhQrcodeDialog
from
"./components/fwh-qrcode.vue"
;
import
FwhQrcodeDialog
from
"./components/fwh-qrcode.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareTipMask
from
'./components/share-tip-mask.vue'
;
import
{
Manager
}
from
"../../manager"
;
import
{
Manager
}
from
"../../manager"
;
export
default
{
export
default
{
...
@@ -99,10 +101,12 @@ export default {
...
@@ -99,10 +101,12 @@ export default {
AlertDialog
,
AlertDialog
,
ShareSelectDialog
,
ShareSelectDialog
,
ShareImgDialog
,
ShareImgDialog
,
FwhQrcodeDialog
FwhQrcodeDialog
,
ShareTipMask
,
},
},
data
()
{
data
()
{
return
{
return
{
showShareTipMask
:
false
,
alertOptions
:{},
alertOptions
:{},
game
:{},
game
:{},
helpDetail
:
{},
helpDetail
:
{},
...
@@ -113,7 +117,7 @@ export default {
...
@@ -113,7 +117,7 @@ export default {
gameReward
:
[],
gameReward
:
[],
showShareSelectDialog
:
false
,
showShareSelectDialog
:
false
,
showShareImgDialog
:
false
,
showShareImgDialog
:
false
,
p
yq
Options
:{},
p
oster
Options
:{},
memberId
:
""
,
memberId
:
""
,
enterpriseId
:
''
,
enterpriseId
:
''
,
gameId
:
''
,
gameId
:
''
,
...
@@ -196,54 +200,6 @@ export default {
...
@@ -196,54 +200,6 @@ export default {
support
(){
support
(){
this
.
manager
.
support
();
this
.
manager
.
support
();
},
},
async
shareWx
()
{
let
options
=
this
.
shareConditionObj
;
let
query
=
this
.
$route
.
query
;
let
data
=
{
gameId
:
query
.
gameId
,
enterpriseId
:
query
.
enterpriseId
,
memberId
:
query
.
shareMemberId
,
shareType
:
1
,
};
await
saveGameShare
(
data
).
catch
(()
=>
{});
getGameShareQrCodeUrl
(
data
).
then
((
result
)
=>
{
let
linkId
=
result
.
linkId
;
this
.
showShareSelectDialog
=
false
;
this
.
manager
.
shareWx
({
title
:
options
.
shareTitle
,
imageUrl
:
options
.
shareCard
,
path
:
`/pages/page-transit/page-transit-qy?scene=
${
linkId
}
`
,
});
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
});
},
async
sharePyq
()
{
let
options
=
this
.
shareConditionObj
;
let
query
=
this
.
$route
.
query
;
let
data
=
{
gameId
:
query
.
gameId
,
enterpriseId
:
query
.
enterpriseId
,
memberId
:
query
.
shareMemberId
,
shareType
:
options
.
type
==
12
?
2
:
1
,
};
await
saveGameShare
(
data
).
catch
(()
=>
{});
getGameShareQrCodeUrl
(
data
).
then
((
result
)
=>
{
this
.
pyqOptions
=
{
bgImage
:
options
.
shareReport
,
qrcodeUrl
:
result
.
qrCodeUrl
,
};
this
.
showShareSelectDialog
=
false
;
this
.
showShareImgDialog
=
true
;
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
});
},
async
clickShareBtn
()
{
await
this
.
manager
.
checkPlay
();
this
.
showShareSelectDialog
=
true
;
},
shareFwh
()
{
shareFwh
()
{
let
query
=
this
.
$route
.
query
;
let
query
=
this
.
$route
.
query
;
getGameShareQrCodeUrl
({
getGameShareQrCodeUrl
({
...
...
src/components/cmh/theme-5/components/share-img-dialog.vue
View file @
d6b0044e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<canvas
id=
"canvas"
class=
"img-canvas"
width=
"560"
height=
"996"
></canvas>
<canvas
id=
"canvas"
class=
"img-canvas"
width=
"560"
height=
"996"
></canvas>
<div
class=
"content"
>
<div
class=
"content"
>
<img
class=
"box-img"
mode=
"widthFix"
id=
"shareImage"
/>
<img
class=
"box-img"
mode=
"widthFix"
id=
"shareImage"
/>
<div
class=
"tips"
>
长按保存至相册,
打开朋友圈选取海报转发
</div>
<div
class=
"tips"
>
长按保存至相册,
分享好友或分享朋友圈
</div>
<div
class=
"iconfont icon-guanbi"
@
click=
"close"
></div>
<div
class=
"iconfont icon-guanbi"
@
click=
"close"
></div>
</div>
</div>
</div>
</div>
...
...
src/components/cmh/theme-5/components/share-select-dialog.vue
View file @
d6b0044e
...
@@ -17,10 +17,14 @@
...
@@ -17,10 +17,14 @@
<img
src=
"../images/wx_icon.png"
mode=
"aspectFit"
/>
<img
src=
"../images/wx_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
微信
</div>
<div
class=
"share-type-name"
>
微信
</div>
</div>
</div>
<div
class=
"share-type-item"
@
click=
"share
Pyq
"
>
<div
class=
"share-type-item"
@
click=
"share
Timeline"
v-if=
"isSupportShareTimeline
"
>
<img
src=
"../images/pyq_icon.png"
mode=
"aspectFit"
/>
<img
src=
"../images/pyq_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
朋友圈
</div>
<div
class=
"share-type-name"
>
朋友圈
</div>
</div>
</div>
<div
class=
"share-type-item"
@
click=
"sharePoster"
>
<img
src=
"../images/fenxianghaibao_icon.png"
mode=
"aspectFit"
/>
<div
class=
"share-type-name"
>
分享海报
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -42,6 +46,7 @@
...
@@ -42,6 +46,7 @@
<
script
>
<
script
>
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
isSupportShareTimeline
}
from
'../../../version'
;
const
{
const
{
getReportRecord
,
getReportRecord
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -66,10 +71,11 @@ export default {
...
@@ -66,10 +71,11 @@ export default {
pageSize
:
20
,
pageSize
:
20
,
currentPage
:
1
,
currentPage
:
1
,
list
:
[],
list
:
[],
isSupportShareTimeline
:
false
,
};
};
},
},
created
(){
created
(){
this
.
loadData
();
this
.
isSupportShareTimeline
=
isSupportShareTimeline
()
},
},
methods
:
{
methods
:
{
reloadData
(){
reloadData
(){
...
@@ -114,8 +120,11 @@ export default {
...
@@ -114,8 +120,11 @@ export default {
shareWx
(){
shareWx
(){
this
.
$emit
(
"shareWx"
,
this
.
conditionObj
);
this
.
$emit
(
"shareWx"
,
this
.
conditionObj
);
},
},
sharePyq
(){
sharePoster
(){
this
.
$emit
(
"sharePyq"
,
this
.
conditionObj
);
this
.
$emit
(
"sharePoster"
,
this
.
conditionObj
);
},
shareTimeline
(){
this
.
$emit
(
"shareTimeline"
,
this
.
conditionObj
);
}
}
},
},
filters
:{
filters
:{
...
@@ -124,6 +133,13 @@ export default {
...
@@ -124,6 +133,13 @@ export default {
let
date
=
new
Date
(
value
);
let
date
=
new
Date
(
value
);
return
date
.
getFullYear
()
+
"-"
+
(
date
.
getMonth
()
+
1
)
+
"-"
+
date
.
getDate
()
return
date
.
getFullYear
()
+
"-"
+
(
date
.
getMonth
()
+
1
)
+
"-"
+
date
.
getDate
()
}
}
},
watch
:{
show
(
n
){
if
(
n
){
this
.
reloadData
();
}
},
}
}
};
};
</
script
>
</
script
>
...
...
src/components/cmh/theme-5/components/share-tip-mask.vue
0 → 100644
View file @
d6b0044e
<
template
>
<div
class=
"dialog-bg"
v-if=
"show"
@
click=
"close"
>
<img
src=
"../images/shareTip.png"
>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
show
:
Boolean
,
},
data
()
{
return
{};
},
created
()
{},
methods
:
{
close
()
{
this
.
$emit
(
"update:show"
,
false
);
},
}
};
</
script
>
<
style
scoped
>
.dialog-bg
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
z-index
:
100
;
background
:
rgba
(
0
,
0
,
0
,
0.85
);
}
.dialog-bg
img
{
width
:
100%
;
height
:
180px
;
}
</
style
>
src/components/cmh/theme-5/images/fenxianghaibao_icon.png
0 → 100644
View file @
d6b0044e
10.2 KB
src/components/cmh/theme-5/images/shareTip.png
0 → 100644
View file @
d6b0044e
24.8 KB
src/components/cmh/theme-5/index.vue
View file @
d6b0044e
...
@@ -139,15 +139,18 @@
...
@@ -139,15 +139,18 @@
:enterpriseId=
"enterpriseId"
:enterpriseId=
"enterpriseId"
:gameId=
"gameId"
:gameId=
"gameId"
:shareConditionObj=
"shareConditionObj"
:shareConditionObj=
"shareConditionObj"
@
shareWx=
"shareWx"
@
shareWx=
"manager.shareWx()"
@
sharePyq=
"sharePyq"
@
shareTimeline=
"manager.shareTimeline()"
@
sharePoster=
"manager.sharePoster()"
></share-select-dialog>
></share-select-dialog>
<share-img-dialog
<share-img-dialog
:show
.
sync=
"showShareImgDialog"
:show
.
sync=
"showShareImgDialog"
v-bind=
"p
yq
Options"
v-bind=
"p
oster
Options"
></share-img-dialog>
></share-img-dialog>
<share-tip-mask
:show
.
sync=
"showShareTipMask"
/>
<alert-dialog
v-bind
.
sync=
"alertOptions"
></alert-dialog>
<alert-dialog
v-bind
.
sync=
"alertOptions"
></alert-dialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -160,8 +163,6 @@ const {
...
@@ -160,8 +163,6 @@ const {
getGamePlayBarrage
,
getGamePlayBarrage
,
getIntegral
,
getIntegral
,
getGameRule
,
getGameRule
,
saveGameShare
,
getGameShareQrCodeUrl
,
shareEvent
,
shareEvent
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -178,6 +179,7 @@ import RewardFailDialog from "./components/reward-fail.vue";
...
@@ -178,6 +179,7 @@ import RewardFailDialog from "./components/reward-fail.vue";
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
AlertDialog
from
"./components/alert.vue"
;
import
AlertDialog
from
"./components/alert.vue"
;
import
ShareTipMask
from
'./components/share-tip-mask.vue'
;
export
default
{
export
default
{
components
:
{
components
:
{
OpenBoxDialog
,
OpenBoxDialog
,
...
@@ -188,10 +190,13 @@ export default {
...
@@ -188,10 +190,13 @@ export default {
ShareSelectDialog
,
ShareSelectDialog
,
ShareImgDialog
,
ShareImgDialog
,
AlertDialog
,
AlertDialog
,
ShareTipMask
,
},
},
data
()
{
data
()
{
return
{
return
{
clickIndex
:
-
1
,
clickIndex
:
-
1
,
posterOptions
:{},
showShareTipMask
:
false
,
animationEnd
:
false
,
animationEnd
:
false
,
isOpening
:
false
,
isOpening
:
false
,
showOpenBoxDialog
:
false
,
showOpenBoxDialog
:
false
,
...
@@ -427,50 +432,6 @@ export default {
...
@@ -427,50 +432,6 @@ export default {
await
this
.
manager
.
checkPlay
();
await
this
.
manager
.
checkPlay
();
this
.
showShareSelectDialog
=
true
;
this
.
showShareSelectDialog
=
true
;
},
},
shareWx
()
{
let
options
=
this
.
shareConditionObj
;
let
data
=
{
gameId
:
this
.
gameId
,
enterpriseId
:
this
.
enterpriseId
,
memberId
:
this
.
memberId
,
shareType
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
return
getGameShareQrCodeUrl
(
data
);
}).
then
((
result
)
=>
{
let
linkId
=
result
.
linkId
;
this
.
manager
.
shareWx
({
title
:
options
.
shareTitle
,
imageUrl
:
options
.
shareCard
,
path
:
`/pages/page-transit/page-transit-qy?scene=
${
linkId
}
`
,
});
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
})
},
sharePyq
()
{
let
options
=
this
.
shareConditionObj
;
let
data
=
{
gameId
:
this
.
gameId
,
enterpriseId
:
this
.
enterpriseId
,
memberId
:
this
.
memberId
,
shareType
:
options
.
type
==
12
?
2
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
return
getGameShareQrCodeUrl
(
data
)
}).
then
((
result
)
=>
{
this
.
pyqOptions
=
{
bgImage
:
options
.
shareReport
,
qrcodeUrl
:
result
.
qrCodeUrl
,
};
this
.
showShareSelectDialog
=
false
;
this
.
showShareImgDialog
=
true
;
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
})
},
clickAdImg
()
{
clickAdImg
()
{
window
.
wx
.
miniProgram
.
navigateTo
({
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
"/"
+
this
.
game
.
gameExt
.
adsLinkUrl
,
url
:
"/"
+
this
.
game
.
gameExt
.
adsLinkUrl
,
...
...
src/components/cmh/theme-5/support.vue
View file @
d6b0044e
...
@@ -66,14 +66,17 @@
...
@@ -66,14 +66,17 @@
:enterpriseId=
"enterpriseId"
:enterpriseId=
"enterpriseId"
:gameId=
"gameId"
:gameId=
"gameId"
:shareConditionObj=
"shareConditionObj"
:shareConditionObj=
"shareConditionObj"
@
shareWx=
"shareWx"
@
shareWx=
"manager.shareWx()"
@
sharePyq=
"sharePyq"
@
shareTimeline=
"manager.shareTimeline()"
@
sharePoster=
"manager.sharePoster()"
></share-select-dialog>
></share-select-dialog>
<share-img-dialog
<share-img-dialog
:show
.
sync=
"showShareImgDialog"
:show
.
sync=
"showShareImgDialog"
v-bind=
"p
yq
Options"
v-bind=
"p
oster
Options"
></share-img-dialog>
></share-img-dialog>
<share-tip-mask
:show
.
sync=
"showShareTipMask"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -83,7 +86,6 @@ const {
...
@@ -83,7 +86,6 @@ const {
getHelpDetail
,
getHelpDetail
,
getGameReward
,
getGameReward
,
getGameInfo
,
getGameInfo
,
saveGameShare
,
getGameShareQrCodeUrl
,
getGameShareQrCodeUrl
,
getGameRule
,
getGameRule
,
}
=
gameRequestApi
;
}
=
gameRequestApi
;
...
@@ -91,7 +93,7 @@ import AlertDialog from "./components/alert.vue";
...
@@ -91,7 +93,7 @@ import AlertDialog from "./components/alert.vue";
import
FwhQrcodeDialog
from
"./components/fwh-qrcode.vue"
;
import
FwhQrcodeDialog
from
"./components/fwh-qrcode.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareSelectDialog
from
"./components/share-select-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareImgDialog
from
"./components/share-img-dialog.vue"
;
import
ShareTipMask
from
'./components/share-tip-mask.vue'
;
import
{
Manager
}
from
"../../manager"
;
import
{
Manager
}
from
"../../manager"
;
export
default
{
export
default
{
...
@@ -99,10 +101,12 @@ export default {
...
@@ -99,10 +101,12 @@ export default {
AlertDialog
,
AlertDialog
,
ShareSelectDialog
,
ShareSelectDialog
,
ShareImgDialog
,
ShareImgDialog
,
FwhQrcodeDialog
FwhQrcodeDialog
,
ShareTipMask
,
},
},
data
()
{
data
()
{
return
{
return
{
showShareTipMask
:
false
,
alertOptions
:{},
alertOptions
:{},
game
:{},
game
:{},
helpDetail
:
{},
helpDetail
:
{},
...
@@ -113,7 +117,7 @@ export default {
...
@@ -113,7 +117,7 @@ export default {
gameReward
:
[],
gameReward
:
[],
showShareSelectDialog
:
false
,
showShareSelectDialog
:
false
,
showShareImgDialog
:
false
,
showShareImgDialog
:
false
,
p
yq
Options
:{},
p
oster
Options
:{},
memberId
:
""
,
memberId
:
""
,
enterpriseId
:
''
,
enterpriseId
:
''
,
gameId
:
''
,
gameId
:
''
,
...
@@ -196,54 +200,6 @@ export default {
...
@@ -196,54 +200,6 @@ export default {
support
(){
support
(){
this
.
manager
.
support
();
this
.
manager
.
support
();
},
},
async
shareWx
()
{
let
options
=
this
.
shareConditionObj
;
let
query
=
this
.
$route
.
query
;
let
data
=
{
gameId
:
query
.
gameId
,
enterpriseId
:
query
.
enterpriseId
,
memberId
:
query
.
shareMemberId
,
shareType
:
1
,
};
await
saveGameShare
(
data
).
catch
(()
=>
{});
getGameShareQrCodeUrl
(
data
).
then
((
result
)
=>
{
let
linkId
=
result
.
linkId
;
this
.
showShareSelectDialog
=
false
;
this
.
manager
.
shareWx
({
title
:
options
.
shareTitle
,
imageUrl
:
options
.
shareCard
,
path
:
`/pages/page-transit/page-transit-qy?scene=
${
linkId
}
`
,
});
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
});
},
async
sharePyq
()
{
let
options
=
this
.
shareConditionObj
;
let
query
=
this
.
$route
.
query
;
let
data
=
{
gameId
:
query
.
gameId
,
enterpriseId
:
query
.
enterpriseId
,
memberId
:
query
.
shareMemberId
,
shareType
:
options
.
type
==
12
?
2
:
1
,
};
await
saveGameShare
(
data
).
catch
(()
=>
{});
getGameShareQrCodeUrl
(
data
).
then
((
result
)
=>
{
this
.
pyqOptions
=
{
bgImage
:
options
.
shareReport
,
qrcodeUrl
:
result
.
qrCodeUrl
,
};
this
.
showShareSelectDialog
=
false
;
this
.
showShareImgDialog
=
true
;
}).
catch
((
err
)
=>
{
this
.
manager
.
showTips
(
err
.
message
);
});
},
async
clickShareBtn
()
{
await
this
.
manager
.
checkPlay
();
this
.
showShareSelectDialog
=
true
;
},
shareFwh
()
{
shareFwh
()
{
let
query
=
this
.
$route
.
query
;
let
query
=
this
.
$route
.
query
;
getGameShareQrCodeUrl
({
getGameShareQrCodeUrl
({
...
...
src/components/index.vue
View file @
d6b0044e
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<
script
>
<
script
>
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
setVersion
}
from
"./version"
;
const
{
getGameInfo
}
=
gameRequestApi
;
const
{
getGameInfo
}
=
gameRequestApi
;
export
default
{
export
default
{
...
@@ -18,6 +19,7 @@ export default {
...
@@ -18,6 +19,7 @@ export default {
methods
:
{
methods
:
{
loadData
()
{
loadData
()
{
let
query
=
this
.
$route
.
query
;
let
query
=
this
.
$route
.
query
;
setVersion
(
query
.
version
);
getGameInfo
({
getGameInfo
({
gameId
:
query
.
gameId
,
gameId
:
query
.
gameId
,
enterpriseId
:
query
.
enterpriseId
,
enterpriseId
:
query
.
enterpriseId
,
...
...
src/components/manager.js
View file @
d6b0044e
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
gameRequestApi
}
from
"@/api/common.js"
;
import
{
isShareIsEqualSupport
,
isSupportShareTimeline
}
from
"./version"
;
const
{
const
{
// getPlayCount,
// getPlayCount,
validGame
,
validGame
,
getGameRule
,
getGameRule
,
gamePlay
,
gamePlay
,
getGameNumberPolling
getGameNumberPolling
,
saveGameShare
,
getGameShareQrCodeUrl
}
=
gameRequestApi
;
}
=
gameRequestApi
;
const
GameHomePath
=
"/pages/game/game-h5"
;
const
GameHomePath
=
"/pages/game/game-h5"
;
...
@@ -12,9 +15,9 @@ const OpenCardPath = "/pages/open-card/open-card/open-card";
...
@@ -12,9 +15,9 @@ const OpenCardPath = "/pages/open-card/open-card/open-card";
const
ShareWxaPath
=
"/pages/access-2-h5/h5-share/h5-share"
;
const
ShareWxaPath
=
"/pages/access-2-h5/h5-share/h5-share"
;
const
IntegralDetailPath
=
"/pages/points-mall/points-detail/points-detail"
;
const
IntegralDetailPath
=
"/pages/points-mall/points-detail/points-detail"
;
const
CouponListPath
=
"/pages/member-center/coupon/coupon-list/coupon-list"
;
const
CouponListPath
=
"/pages/member-center/coupon/coupon-list/coupon-list"
;
const
ShareTimeLinePath
=
"/pages/game/share-timeline"
;
export
function
Manager
(
component
)
{
export
function
Manager
(
component
)
{
let
_component
;
let
_component
;
if
(
component
)
{
if
(
component
)
{
_component
=
component
;
_component
=
component
;
...
@@ -169,15 +172,26 @@ export function Manager(component) {
...
@@ -169,15 +172,26 @@ export function Manager(component) {
text
:
"分享好友"
,
text
:
"分享好友"
,
click
:
()
=>
{
click
:
()
=>
{
hiddenAlert
();
hiddenAlert
();
_component
.
shareWx
();
this
.
shareWx
()
},
},
{
text
:
"分享朋友圈"
,
click
:
()
=>
{
hiddenAlert
();
_component
.
sharePyq
();
},
},
}];
}];
if
(
isSupportShareTimeline
()){
buttonList
.
push
({
text
:
"分享朋友圈"
,
click
:
()
=>
{
hiddenAlert
();
this
.
shareTimeline
()
},
})
}
else
{
buttonList
.
push
({
text
:
"分享海报"
,
click
:
()
=>
{
hiddenAlert
();
this
.
sharePoster
()
},
})
}
break
;
break
;
case
2006
:
case
2006
:
// 用户积分不足
// 用户积分不足
...
@@ -316,18 +330,7 @@ export function Manager(component) {
...
@@ -316,18 +330,7 @@ export function Manager(component) {
const
toBack
=
()
=>
{
const
toBack
=
()
=>
{
window
.
wx
.
miniProgram
.
navigateBack
();
window
.
wx
.
miniProgram
.
navigateBack
();
}
}
this
.
shareWx
=
(
shareOptions
)
=>
{
// let shareOptions = {
// title: '',
// path: '',
// imageUrl: '',
// };
let
url
=
`
${
ShareWxaPath
}
?shareOptions=
${
encodeURIComponent
(
JSON
.
stringify
(
shareOptions
))}
&content=立即分享邀请好友助力&confirmText=立即分享`
;
window
.
wx
.
miniProgram
.
navigateTo
({
url
,
});
}
this
.
getConditionObj
=
function
()
{
this
.
getConditionObj
=
function
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -354,6 +357,7 @@ export function Manager(component) {
...
@@ -354,6 +357,7 @@ export function Manager(component) {
})
})
}
}
// 点击助力
this
.
support
=
async
()
=>
{
this
.
support
=
async
()
=>
{
let
query
=
_component
.
$route
.
query
;
let
query
=
_component
.
$route
.
query
;
...
@@ -364,11 +368,10 @@ export function Manager(component) {
...
@@ -364,11 +368,10 @@ export function Manager(component) {
buttonList
:
[
buttonList
:
[
{
{
text
:
"邀请好友助力"
,
text
:
"邀请好友助力"
,
click
:
()
=>
{
click
:
async
()
=>
{
hiddenAlert
();
hiddenAlert
();
// window.wx.miniProgram
await
this
.
checkPlay
();
// TODO
_component
.
showShareSelectDialog
=
true
;
_component
.
clickShareBtn
();
},
},
},
},
],
],
...
@@ -473,8 +476,6 @@ export function Manager(component) {
...
@@ -473,8 +476,6 @@ export function Manager(component) {
clearInterval
(
pollingTimer
);
clearInterval
(
pollingTimer
);
}
}
this
.
toIntegralDetail
=
function
()
{
this
.
toIntegralDetail
=
function
()
{
window
.
wx
.
miniProgram
.
navigateTo
({
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
IntegralDetailPath
,
url
:
IntegralDetailPath
,
...
@@ -487,5 +488,77 @@ export function Manager(component) {
...
@@ -487,5 +488,77 @@ export function Manager(component) {
})
})
}
}
// 点击分享微信
this
.
shareWx
=
async
()
=>
{
let
conditionObj
=
await
this
.
getConditionObj
();
let
data
=
{
gameId
:
_component
.
gameId
,
enterpriseId
:
_component
.
enterpriseId
,
memberId
:
_component
.
memberId
,
shareType
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
if
(
isShareIsEqualSupport
()){
_component
.
showShareTipMask
=
true
;
}
else
{
getGameShareQrCodeUrl
(
data
).
then
((
result
)
=>
{
let
linkId
=
result
.
linkId
;
this
.
showShareSelectDialog
=
false
;
let
shareOptions
=
{
title
:
conditionObj
.
shareTitle
,
imageUrl
:
conditionObj
.
shareCard
,
path
:
`/pages/page-transit/page-transit-qy?scene=
${
linkId
}
`
,
};
let
url
=
`
${
ShareWxaPath
}
?shareOptions=
${
encodeURIComponent
(
JSON
.
stringify
(
shareOptions
))}
&content=立即分享邀请好友助力&confirmText=立即分享`
;
window
.
wx
.
miniProgram
.
navigateTo
({
url
,
});
}).
catch
((
err
)
=>
{
this
.
showTips
(
err
.
message
);
});
}
}).
catch
((
err
)
=>
{
this
.
showTips
(
err
.
message
);
})
}
// 点击分享朋友圈
this
.
shareTimeline
=
function
(){
let
query
=
_component
.
$route
.
query
;
let
data
=
{
gameId
:
_component
.
gameId
,
enterpriseId
:
_component
.
enterpriseId
,
memberId
:
_component
.
memberId
,
shareType
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
`
${
ShareTimeLinePath
}
?gameId=
${
query
.
gameId
}
&from=game`
,
})
})
}
// 分享海报
this
.
sharePoster
=
async
()
=>
{
let
conditionObj
=
await
this
.
getConditionObj
();
let
data
=
{
gameId
:
_component
.
gameId
,
enterpriseId
:
_component
.
enterpriseId
,
memberId
:
_component
.
memberId
,
shareType
:
conditionObj
.
type
==
12
?
2
:
1
,
};
saveGameShare
(
data
).
then
(()
=>
{
return
getGameShareQrCodeUrl
(
data
)
}).
then
((
result
)
=>
{
_component
.
posterOptions
=
{
bgImage
:
conditionObj
.
shareReport
,
qrcodeUrl
:
result
.
qrCodeUrl
,
};
_component
.
showShareSelectDialog
=
false
;
_component
.
showShareImgDialog
=
true
;
}).
catch
((
err
)
=>
{
this
.
showTips
(
err
.
message
);
})
}
return
this
;
return
this
;
}
}
src/components/version.js
0 → 100644
View file @
d6b0044e
/***
* 游戏-小程序版本
*/
let
version
=
0
;
export
function
setVersion
(
v
){
version
=
v
?
+
v
:
0
;
}
export
function
getVersion
(){
return
version
;
}
/*** 是否支持分享朋友圈 */
export
function
isSupportShareTimeline
(){
return
getVersion
()
>
0
;
}
/** 是否所有的分享都触发助力 */
export
function
isShareIsEqualSupport
(){
return
getVersion
()
>
0
;
}
\ No newline at end of file
vue.config.js
View file @
d6b0044e
...
@@ -11,7 +11,7 @@ module.exports = {
...
@@ -11,7 +11,7 @@ module.exports = {
devServer
:
{
devServer
:
{
proxy
:
{
proxy
:
{
'/'
:
{
'/'
:
{
target
:
'http://
gicdev.demogic
.com/'
,
target
:
'http://
www.gicdev
.com/'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
cookieDomainRewrite
:
{
cookieDomainRewrite
:
{
'*'
:
'localhost'
,
'*'
:
'localhost'
,
...
...
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