Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
Project
Project
Details
Activity
Releases
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
崔立强
db-game-template
Commits
752fefdf
Commit
752fefdf
authored
Jan 20, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
32d7faf1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1774 additions
and
0 deletions
+1774
-0
index copy 2_20200120135807.html
.history/egret/index copy 2_20200120135807.html
+223
-0
index copy 2_20200120135846.html
.history/egret/index copy 2_20200120135846.html
+247
-0
index copy 3_20200120135847.html
.history/egret/index copy 3_20200120135847.html
+247
-0
index copy 3_20200120135935.html
.history/egret/index copy 3_20200120135935.html
+254
-0
index copy 3_20200120140431.html
.history/egret/index copy 3_20200120140431.html
+278
-0
index copy 2.html
egret/index copy 2.html
+247
-0
index copy 3.html
egret/index copy 3.html
+278
-0
No files found.
.history/egret/index copy 2_20200120135807.html
0 → 100644
View file @
752fefdf
<meta
charset=
"utf-8"
>
<title>
我的咖啡店
</title>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<script>
var
__startTime__
=
Date
.
now
()
</script>
<style>
html
,
body
{
-ms-touch-action
:
none
;
background-repeat
:
no-repeat
;
background-color
:
#b96e4f
;
background-size
:
100%
;
/* background-position: center; */
padding
:
0
;
border
:
0
;
margin
:
0
;
height
:
100%
;
width
:
100%
;
}
</style>
</head>
<body>
<audio
style=
"display:none;
height: 0"
id=
"bgMusic"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/bg.mp3"
loop=
"loop"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"collectCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/collectCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createEq"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createEq.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"levelUp"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/levelUp.mp3"
>
</audio>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
data-scale-mode=
"showAll"
data-frame-rate=
"60"
data-content-width=
"750"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"false"
data-show-log=
"false"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<script>
document
.
addEventListener
(
"visibilitychange"
,
()
=>
{
if
(
document
.
visibilityState
==
"visible"
)
{
if
(
window
[
"playMusic"
]){
if
(
window
[
'isPlayMusic'
]){
window
[
"playMusic"
](
"bgMusic"
,
true
);
}
}
}
if
(
document
.
visibilityState
==
"hidden"
)
{
window
[
"playMusic"
](
"bgMusic"
,
false
);
}
})
// oaId 运营配置
window
[
'oaId'
]
=
12321
;
// appId 运营配置
window
[
'appId'
]
=
123
;
// projectId 看链接
window
[
'projectxId'
]
=
"pe1c5cb75"
;
// 每日领金币
window
[
'takecoins'
]
=
50000
;
// 成功邀请奖励金币
window
[
'coinsnum'
]
=
100000
;
// 成功邀请奖励钻石
window
[
'dianum'
]
=
100
;
// 资源位 图片
window
[
"resImg"
]
=
''
;
// 资源位 跳转路径
window
[
'resUrl'
]
=
''
;
//资源路径
var
resPath
=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/1573812298/"
;
//record
var
recordUrl
=
"/crecord/record"
;
function
resolve
(
a
)
{
var
b
=
eval
(
a
);
return
b
;
}
function
openRecord
(){
mqq
.
ui
.
openUrl
({
url
:
window
[
'recordUrl'
],
target
:
1
})
}
</script>
<script
type=
"text/javascript"
src=
"https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"
></script>
<script
src=
"https://assets.geilicdn.com/v-components/jsbridge/1.0.1/index.min.js"
></script>
<script>
function
shareWX
(
shareCode
,
uid
){
var
num
=
Math
.
floor
(
Math
.
random
()
*
3
+
1
);
var
title
=
""
;
var
context
=
""
;
if
(
num
==
1
){
title
=
"送你200万金币,1分钱包邮换水果"
;
context
=
"开微店咖啡店,1分钱包邮水果天天领~"
;
}
else
if
(
num
==
2
){
title
=
"【邀请函】我开了一家咖啡馆,你不来坐坐?"
;
context
=
"送你200万金币,开店兑好礼~"
;
}
else
if
(
num
==
3
){
title
=
"上微店,200万开店基金待领取!"
;
context
=
"来微店咖啡馆,赚营业额兑一分钱包邮水果~"
;
}
var
param
=
{
"newShare"
:{
"panelList"
:[{
"panelType"
:
1
,
"desc"
:
"链接分享"
,
"content"
:{
"url"
:
"https://h5.weidian.com/m/wdbuyer-hd/coffee-share.html?shareCode="
+
encodeURIComponent
(
shareCode
)
+
"&inviteId="
+
encodeURIComponent
(
uid
),
"title"
:
title
,
"content"
:
context
,
"imageUrl"
:
"http://yun.duiba.com.cn/db_games/activity/weidian1.0/share.jpg"
,
"scene"
:
"1_2_3_4"
,
"directScene"
:
"1"
}}]}};
KDJSBridge2
.
call
(
'WDJSBridge'
,
'share'
,
param
,
function
(
data
)
{
}
)
}
function
LeaveGame
()
{
var
param
=
{}
KDJSBridge2
.
call
(
'WDJSBridge'
,
'goBack'
,
function
(
data
)
{
})
}
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/lib2_game.min.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/laochangshajiyi/svga.egret.min1.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1574307217/output.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1573812298/resource/default.thm.js"
></script>
<script>
//音乐自动播放
// $(document).ready(function () {
// autoPlayMusic();
// audioAutoPlay();
// });
function
audioAutoPlay
()
{
var
audio
=
null
;
audio
=
document
.
getElementById
(
'bgMusic'
);
audio
.
play
&&
audio
.
play
();
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
audio
.
play
();
},
false
);
}
// 音乐播放
function
autoPlayMusic
()
{
// 自动播放音乐效果,解决浏览器或者APP自动播放问题
function
musicInBrowserHandler
()
{
musicPlay
(
true
);
document
.
body
.
removeEventListener
(
'touchstart'
,
musicInBrowserHandler
);
}
document
.
body
.
addEventListener
(
'touchstart'
,
musicInBrowserHandler
);
// 自动播放音乐效果,解决微信自动播放问题
function
musicInWeixinHandler
()
{
musicPlay
(
true
);
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
musicPlay
(
true
);
},
false
);
document
.
removeEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
document
.
addEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
function
playMusic
(
id
=
"bgMusic"
,
isPlay
=
true
,
isLoop
=
true
)
{
var
media
=
document
.
getElementById
(
id
);
if
(
isPlay
)
{
media
.
load
();
if
(
media
.
paused
)
{
if
(
isLoop
)
{
media
.
play
();
}
else
{
media
.
play
(
1
)
}
}
else
{
if
(
isLoop
)
{
media
.
pause
();
media
.
play
();
}
else
{
media
.
pause
();
media
.
play
(
1
);
}
}
}
if
(
!
isPlay
&&
!
media
.
paused
)
{
media
.
pause
();
}
}
</script>
<script>
egret
.
ImageLoader
.
crossOrigin
=
"anonymous"
;
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
</script>
\ No newline at end of file
.history/egret/index copy 2_20200120135846.html
0 → 100644
View file @
752fefdf
<meta
charset=
"utf-8"
>
<title>
我的咖啡店
</title>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<script>
var
__startTime__
=
Date
.
now
()
</script>
<style>
html
,
body
{
-ms-touch-action
:
none
;
background-repeat
:
no-repeat
;
background-color
:
#b96e4f
;
background-size
:
100%
;
/* background-position: center; */
padding
:
0
;
border
:
0
;
margin
:
0
;
height
:
100%
;
width
:
100%
;
}
</style>
</head>
<body>
<audio
style=
"display:none;
height: 0"
id=
"bgMusic"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/bg.mp3"
loop=
"loop"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"collectCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/collectCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createEq"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createEq.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"levelUp"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/levelUp.mp3"
>
</audio>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
data-scale-mode=
"showAll"
data-frame-rate=
"60"
data-content-width=
"750"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"false"
data-show-log=
"false"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<script>
document
.
addEventListener
(
"visibilitychange"
,
()
=>
{
if
(
document
.
visibilityState
==
"visible"
)
{
if
(
window
[
"playMusic"
]){
if
(
window
[
'isPlayMusic'
]){
window
[
"playMusic"
](
"bgMusic"
,
true
);
}
}
}
if
(
document
.
visibilityState
==
"hidden"
)
{
window
[
"playMusic"
](
"bgMusic"
,
false
);
}
})
function
getQueryVariable
(
variable
)
{
var
query
=
window
.
location
.
search
.
substring
(
1
);
var
vars
=
query
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
variable
){
return
pair
[
1
];}
}
return
(
false
);
}
// appId 运营配置
if
(
getQueryVariable
(
"appID"
)){
window
[
'appId'
]
=
getQueryVariable
(
"appID"
);
}
else
{
window
[
'appId'
]
=
"66114"
;
}
// projectId 看链接
if
(
window
.
location
.
pathname
.
match
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
))){
window
[
'projectxId'
]
=
window
.
location
.
pathname
.
replace
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
),
"$1"
);
// oaId 运营配置
window
[
'oaId'
]
=
window
[
'projectxId'
];
}
else
{
window
[
'projectxId'
]
=
"p77f14047"
;
// oaId 运营配置
window
[
'oaId'
]
=
12321
;
}
// 每日领金币
window
[
'takecoins'
]
=
150000
;
// 成功邀请奖励金币
window
[
'coinsnum'
]
=
100000
;
// 成功邀请奖励钻石
window
[
'dianum'
]
=
100
;
// 资源位 图片
window
[
"resImg"
]
=
''
;
// 资源位 跳转路径
window
[
'resUrl'
]
=
''
;
//资源路径
var
resPath
=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/"
;
//record
var
recordUrl
=
"/crecord/record"
;
function
resolve
(
a
)
{
var
b
=
eval
(
a
);
return
b
;
}
function
openRecord
(){
mqq
.
ui
.
openUrl
({
url
:
window
[
'recordUrl'
],
target
:
1
})
}
</script>
<script
type=
"text/javascript"
src=
"https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"
></script>
<script
src=
"https://assets.geilicdn.com/v-components/jsbridge/1.0.1/index.min.js"
></script>
<script>
function
shareWX
(
shareCode
,
uid
){
var
num
=
Math
.
floor
(
Math
.
random
()
*
3
+
1
);
var
title
=
""
;
var
context
=
""
;
if
(
num
==
1
){
title
=
"送你200万金币,1分钱包邮换水果"
;
context
=
"开微店咖啡店,1分钱包邮水果天天领~"
;
}
else
if
(
num
==
2
){
title
=
"【邀请函】我开了一家咖啡馆,你不来坐坐?"
;
context
=
"送你200万金币,开店兑好礼~"
;
}
else
if
(
num
==
3
){
title
=
"上微店,200万开店基金待领取!"
;
context
=
"来微店咖啡馆,赚营业额兑一分钱包邮水果~"
;
}
var
param
=
{
"newShare"
:{
"panelList"
:[{
"panelType"
:
1
,
"desc"
:
"链接分享"
,
"content"
:{
"url"
:
"https://www.91ruyu.com/h/wdbuyer-hd/coffee-share.html?auth=4HndANsAaNQG1AneZN27nvTGLr7k&shareCode="
+
encodeURIComponent
(
shareCode
)
+
"&inviteId="
+
encodeURIComponent
(
uid
),
"title"
:
title
,
"content"
:
context
,
"imageUrl"
:
"http://yun.duiba.com.cn/db_games/activity/weidian1.0/share.jpg"
,
"scene"
:
"1_2_3_4"
,
"directScene"
:
"1"
}}]}};
KDJSBridge2
.
call
(
'WDJSBridge'
,
'share'
,
param
,
function
(
data
)
{
}
)
}
function
LeaveGame
()
{
var
param
=
{}
KDJSBridge2
.
call
(
'WDJSBridge'
,
'goBack'
,
function
(
data
)
{
})
}
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/lib2_game.min.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/laochangshajiyi/svga.egret.min1.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1579424039/output.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/resource/default.thm.js"
></script>
<script>
//音乐自动播放
// $(document).ready(function () {
// autoPlayMusic();
// audioAutoPlay();
// });
function
audioAutoPlay
()
{
var
audio
=
null
;
audio
=
document
.
getElementById
(
'bgMusic'
);
audio
.
play
&&
audio
.
play
();
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
audio
.
play
();
},
false
);
}
// 音乐播放
function
autoPlayMusic
()
{
// 自动播放音乐效果,解决浏览器或者APP自动播放问题
function
musicInBrowserHandler
()
{
musicPlay
(
true
);
document
.
body
.
removeEventListener
(
'touchstart'
,
musicInBrowserHandler
);
}
document
.
body
.
addEventListener
(
'touchstart'
,
musicInBrowserHandler
);
// 自动播放音乐效果,解决微信自动播放问题
function
musicInWeixinHandler
()
{
musicPlay
(
true
);
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
musicPlay
(
true
);
},
false
);
document
.
removeEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
document
.
addEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
function
playMusic
(
id
=
"bgMusic"
,
isPlay
=
true
,
isLoop
=
true
)
{
var
media
=
document
.
getElementById
(
id
);
if
(
isPlay
)
{
media
.
load
();
if
(
media
.
paused
)
{
if
(
isLoop
)
{
media
.
play
();
}
else
{
media
.
play
(
1
)
}
}
else
{
if
(
isLoop
)
{
media
.
pause
();
media
.
play
();
}
else
{
media
.
pause
();
media
.
play
(
1
);
}
}
}
if
(
!
isPlay
&&
!
media
.
paused
)
{
media
.
pause
();
}
}
</script>
<script>
egret
.
ImageLoader
.
crossOrigin
=
"anonymous"
;
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
</script>
\ No newline at end of file
.history/egret/index copy 3_20200120135847.html
0 → 100644
View file @
752fefdf
<meta
charset=
"utf-8"
>
<title>
我的咖啡店
</title>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<script>
var
__startTime__
=
Date
.
now
()
</script>
<style>
html
,
body
{
-ms-touch-action
:
none
;
background-repeat
:
no-repeat
;
background-color
:
#b96e4f
;
background-size
:
100%
;
/* background-position: center; */
padding
:
0
;
border
:
0
;
margin
:
0
;
height
:
100%
;
width
:
100%
;
}
</style>
</head>
<body>
<audio
style=
"display:none;
height: 0"
id=
"bgMusic"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/bg.mp3"
loop=
"loop"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"collectCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/collectCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createEq"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createEq.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"levelUp"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/levelUp.mp3"
>
</audio>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
data-scale-mode=
"showAll"
data-frame-rate=
"60"
data-content-width=
"750"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"false"
data-show-log=
"false"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<script>
document
.
addEventListener
(
"visibilitychange"
,
()
=>
{
if
(
document
.
visibilityState
==
"visible"
)
{
if
(
window
[
"playMusic"
]){
if
(
window
[
'isPlayMusic'
]){
window
[
"playMusic"
](
"bgMusic"
,
true
);
}
}
}
if
(
document
.
visibilityState
==
"hidden"
)
{
window
[
"playMusic"
](
"bgMusic"
,
false
);
}
})
function
getQueryVariable
(
variable
)
{
var
query
=
window
.
location
.
search
.
substring
(
1
);
var
vars
=
query
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
variable
){
return
pair
[
1
];}
}
return
(
false
);
}
// appId 运营配置
if
(
getQueryVariable
(
"appID"
)){
window
[
'appId'
]
=
getQueryVariable
(
"appID"
);
}
else
{
window
[
'appId'
]
=
"66114"
;
}
// projectId 看链接
if
(
window
.
location
.
pathname
.
match
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
))){
window
[
'projectxId'
]
=
window
.
location
.
pathname
.
replace
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
),
"$1"
);
// oaId 运营配置
window
[
'oaId'
]
=
window
[
'projectxId'
];
}
else
{
window
[
'projectxId'
]
=
"p77f14047"
;
// oaId 运营配置
window
[
'oaId'
]
=
12321
;
}
// 每日领金币
window
[
'takecoins'
]
=
150000
;
// 成功邀请奖励金币
window
[
'coinsnum'
]
=
100000
;
// 成功邀请奖励钻石
window
[
'dianum'
]
=
100
;
// 资源位 图片
window
[
"resImg"
]
=
''
;
// 资源位 跳转路径
window
[
'resUrl'
]
=
''
;
//资源路径
var
resPath
=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/"
;
//record
var
recordUrl
=
"/crecord/record"
;
function
resolve
(
a
)
{
var
b
=
eval
(
a
);
return
b
;
}
function
openRecord
(){
mqq
.
ui
.
openUrl
({
url
:
window
[
'recordUrl'
],
target
:
1
})
}
</script>
<script
type=
"text/javascript"
src=
"https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"
></script>
<script
src=
"https://assets.geilicdn.com/v-components/jsbridge/1.0.1/index.min.js"
></script>
<script>
function
shareWX
(
shareCode
,
uid
){
var
num
=
Math
.
floor
(
Math
.
random
()
*
3
+
1
);
var
title
=
""
;
var
context
=
""
;
if
(
num
==
1
){
title
=
"送你200万金币,1分钱包邮换水果"
;
context
=
"开微店咖啡店,1分钱包邮水果天天领~"
;
}
else
if
(
num
==
2
){
title
=
"【邀请函】我开了一家咖啡馆,你不来坐坐?"
;
context
=
"送你200万金币,开店兑好礼~"
;
}
else
if
(
num
==
3
){
title
=
"上微店,200万开店基金待领取!"
;
context
=
"来微店咖啡馆,赚营业额兑一分钱包邮水果~"
;
}
var
param
=
{
"newShare"
:{
"panelList"
:[{
"panelType"
:
1
,
"desc"
:
"链接分享"
,
"content"
:{
"url"
:
"https://www.91ruyu.com/h/wdbuyer-hd/coffee-share.html?auth=4HndANsAaNQG1AneZN27nvTGLr7k&shareCode="
+
encodeURIComponent
(
shareCode
)
+
"&inviteId="
+
encodeURIComponent
(
uid
),
"title"
:
title
,
"content"
:
context
,
"imageUrl"
:
"http://yun.duiba.com.cn/db_games/activity/weidian1.0/share.jpg"
,
"scene"
:
"1_2_3_4"
,
"directScene"
:
"1"
}}]}};
KDJSBridge2
.
call
(
'WDJSBridge'
,
'share'
,
param
,
function
(
data
)
{
}
)
}
function
LeaveGame
()
{
var
param
=
{}
KDJSBridge2
.
call
(
'WDJSBridge'
,
'goBack'
,
function
(
data
)
{
})
}
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/lib2_game.min.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/laochangshajiyi/svga.egret.min1.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1579424039/output.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/resource/default.thm.js"
></script>
<script>
//音乐自动播放
// $(document).ready(function () {
// autoPlayMusic();
// audioAutoPlay();
// });
function
audioAutoPlay
()
{
var
audio
=
null
;
audio
=
document
.
getElementById
(
'bgMusic'
);
audio
.
play
&&
audio
.
play
();
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
audio
.
play
();
},
false
);
}
// 音乐播放
function
autoPlayMusic
()
{
// 自动播放音乐效果,解决浏览器或者APP自动播放问题
function
musicInBrowserHandler
()
{
musicPlay
(
true
);
document
.
body
.
removeEventListener
(
'touchstart'
,
musicInBrowserHandler
);
}
document
.
body
.
addEventListener
(
'touchstart'
,
musicInBrowserHandler
);
// 自动播放音乐效果,解决微信自动播放问题
function
musicInWeixinHandler
()
{
musicPlay
(
true
);
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
musicPlay
(
true
);
},
false
);
document
.
removeEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
document
.
addEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
function
playMusic
(
id
=
"bgMusic"
,
isPlay
=
true
,
isLoop
=
true
)
{
var
media
=
document
.
getElementById
(
id
);
if
(
isPlay
)
{
media
.
load
();
if
(
media
.
paused
)
{
if
(
isLoop
)
{
media
.
play
();
}
else
{
media
.
play
(
1
)
}
}
else
{
if
(
isLoop
)
{
media
.
pause
();
media
.
play
();
}
else
{
media
.
pause
();
media
.
play
(
1
);
}
}
}
if
(
!
isPlay
&&
!
media
.
paused
)
{
media
.
pause
();
}
}
</script>
<script>
egret
.
ImageLoader
.
crossOrigin
=
"anonymous"
;
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
</script>
\ No newline at end of file
.history/egret/index copy 3_20200120135935.html
0 → 100644
View file @
752fefdf
<!DOCTYPE HTML>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
我的咖啡店
</title>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<script>
var
__startTime__
=
Date
.
now
()
</script>
<style>
html
,
body
{
-ms-touch-action
:
none
;
background-repeat
:
no-repeat
;
background-color
:
#b96e4f
;
background-size
:
100%
;
/* background-position: center; */
padding
:
0
;
border
:
0
;
margin
:
0
;
height
:
100%
;
width
:
100%
;
}
</style>
</head>
<body>
<audio
style=
"display:none;
height: 0"
id=
"bgMusic"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/bg.mp3"
loop=
"loop"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"collectCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/collectCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createEq"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createEq.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"levelUp"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/levelUp.mp3"
>
</audio>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
data-scale-mode=
"showAll"
data-frame-rate=
"60"
data-content-width=
"750"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"false"
data-show-log=
"false"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<script>
document
.
addEventListener
(
"visibilitychange"
,
()
=>
{
if
(
document
.
visibilityState
==
"visible"
)
{
if
(
window
[
"playMusic"
])
{
if
(
window
[
'isPlayMusic'
])
{
window
[
"playMusic"
](
"bgMusic"
,
true
);
}
}
}
if
(
document
.
visibilityState
==
"hidden"
)
{
window
[
"playMusic"
](
"bgMusic"
,
false
);
}
})
// oaId 运营配置
window
[
'oaId'
]
=
"pa19e64bc"
;
// appId 运营配置
window
[
'appId'
]
=
66114
;
// projectId 看链接
window
[
'projectxId'
]
=
"pa19e64bc"
;
// 每日领金币
window
[
'takecoins'
]
=
150000
;
// 成功邀请奖励金币
window
[
'coinsnum'
]
=
100000
;
// 成功邀请奖励钻石
window
[
'dianum'
]
=
100
;
// 资源位 图片
window
[
"resImg"
]
=
''
;
// 资源位 跳转路径
window
[
'resUrl'
]
=
''
;
//资源路径
var
resPath
=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/1575624666/"
;
//record
var
recordUrl
=
"/crecord/record"
;
function
resolve
(
a
)
{
var
b
=
eval
(
a
);
return
b
;
}
function
openRecord
()
{
mqq
.
ui
.
openUrl
({
url
:
window
[
'recordUrl'
],
target
:
1
})
}
</script>
<script
type=
"text/javascript"
src=
"https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"
></script>
<script
src=
"https://assets.geilicdn.com/v-components/jsbridge/1.0.1/index.min.js"
></script>
<script>
function
shareWX
(
shareCode
,
uid
)
{
var
num
=
Math
.
floor
(
Math
.
random
()
*
3
+
1
);
var
title
=
""
;
var
context
=
""
;
if
(
num
==
1
)
{
title
=
"送你200万金币,1分钱包邮换水果"
;
context
=
"开微店咖啡店,1分钱包邮水果天天领~"
;
}
else
if
(
num
==
2
)
{
title
=
"【邀请函】我开了一家咖啡馆,你不来坐坐?"
;
context
=
"送你200万金币,开店兑好礼~"
;
}
else
if
(
num
==
3
)
{
title
=
"上微店,200万开店基金待领取!"
;
context
=
"来微店咖啡馆,赚营业额兑一分钱包邮水果~"
;
}
var
param
=
{
"newShare"
:
{
"panelList"
:
[{
"panelType"
:
1
,
"desc"
:
"链接分享"
,
"content"
:
{
"url"
:
"https://www.91ruyu.com/h/wdbuyer-hd/coffee-share.html?shareCode="
+
encodeURIComponent
(
shareCode
)
+
"&inviteId="
+
encodeURIComponent
(
uid
),
"title"
:
title
,
"content"
:
context
,
"imageUrl"
:
"http://yun.duiba.com.cn/db_games/activity/weidian1.0/share.jpg"
,
"scene"
:
"1_2_3_4"
,
"directScene"
:
"1"
}
}]
}
};
KDJSBridge2
.
call
(
'WDJSBridge'
,
'share'
,
param
,
function
(
data
)
{})
}
function
LeaveGame
()
{
var
param
=
{}
KDJSBridge2
.
call
(
'WDJSBridge'
,
'goBack'
,
function
(
data
)
{
})
}
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/lib2_game.min.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/laochangshajiyi/svga.egret.min1.js"
>
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1575859056/output2.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1575624666/resource/default.thm.js"
></script>
<script>
//音乐自动播放
// $(document).ready(function () {
// autoPlayMusic();
// audioAutoPlay();
// });
function
audioAutoPlay
()
{
var
audio
=
null
;
audio
=
document
.
getElementById
(
'bgMusic'
);
audio
.
play
&&
audio
.
play
();
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
audio
.
play
();
},
false
);
}
// 音乐播放
function
autoPlayMusic
()
{
// 自动播放音乐效果,解决浏览器或者APP自动播放问题
function
musicInBrowserHandler
()
{
musicPlay
(
true
);
document
.
body
.
removeEventListener
(
'touchstart'
,
musicInBrowserHandler
);
}
document
.
body
.
addEventListener
(
'touchstart'
,
musicInBrowserHandler
);
// 自动播放音乐效果,解决微信自动播放问题
function
musicInWeixinHandler
()
{
musicPlay
(
true
);
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
musicPlay
(
true
);
},
false
);
document
.
removeEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
document
.
addEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
function
playMusic
(
id
=
"bgMusic"
,
isPlay
=
true
,
isLoop
=
true
)
{
var
media
=
document
.
getElementById
(
id
);
if
(
isPlay
)
{
media
.
load
();
if
(
media
.
paused
)
{
if
(
isLoop
)
{
media
.
play
();
}
else
{
media
.
play
(
1
)
}
}
else
{
if
(
isLoop
)
{
media
.
pause
();
media
.
play
();
}
else
{
media
.
pause
();
media
.
play
(
1
);
}
}
}
if
(
!
isPlay
&&
!
media
.
paused
)
{
media
.
pause
();
}
}
</script>
<script>
egret
.
ImageLoader
.
crossOrigin
=
"anonymous"
;
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
</script>
</body>
</html>
\ No newline at end of file
.history/egret/index copy 3_20200120140431.html
0 → 100644
View file @
752fefdf
<!DOCTYPE HTML>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
我的咖啡店
</title>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<script>
var
__startTime__
=
Date
.
now
()
</script>
<style>
html
,
body
{
-ms-touch-action
:
none
;
background-repeat
:
no-repeat
;
background-color
:
#b96e4f
;
background-size
:
100%
;
/* background-position: center; */
padding
:
0
;
border
:
0
;
margin
:
0
;
height
:
100%
;
width
:
100%
;
}
</style>
</head>
<body>
<audio
style=
"display:none;
height: 0"
id=
"bgMusic"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/bg.mp3"
loop=
"loop"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"collectCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/collectCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createEq"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createEq.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"levelUp"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/levelUp.mp3"
>
</audio>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
data-scale-mode=
"showAll"
data-frame-rate=
"60"
data-content-width=
"750"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"false"
data-show-log=
"false"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<script>
document
.
addEventListener
(
"visibilitychange"
,
()
=>
{
if
(
document
.
visibilityState
==
"visible"
)
{
if
(
window
[
"playMusic"
])
{
if
(
window
[
'isPlayMusic'
])
{
window
[
"playMusic"
](
"bgMusic"
,
true
);
}
}
}
if
(
document
.
visibilityState
==
"hidden"
)
{
window
[
"playMusic"
](
"bgMusic"
,
false
);
}
})
function
getQueryVariable
(
variable
)
{
var
query
=
window
.
location
.
search
.
substring
(
1
);
var
vars
=
query
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
variable
){
return
pair
[
1
];}
}
return
(
false
);
}
// appId 运营配置
if
(
getQueryVariable
(
"appID"
)){
window
[
'appId'
]
=
getQueryVariable
(
"appID"
);
}
else
{
window
[
'appId'
]
=
"66114"
;
}
// projectId 看链接
if
(
window
.
location
.
pathname
.
match
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
))){
window
[
'projectxId'
]
=
window
.
location
.
pathname
.
replace
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
),
"$1"
);
// oaId 运营配置
window
[
'oaId'
]
=
window
[
'projectxId'
];
}
else
{
window
[
'projectxId'
]
=
"p77f14047"
;
// oaId 运营配置
window
[
'oaId'
]
=
12321
;
}
// 每日领金币
window
[
'takecoins'
]
=
150000
;
// 成功邀请奖励金币
window
[
'coinsnum'
]
=
100000
;
// 成功邀请奖励钻石
window
[
'dianum'
]
=
100
;
// 资源位 图片
window
[
"resImg"
]
=
''
;
// 资源位 跳转路径
window
[
'resUrl'
]
=
''
;
//资源路径
var
resPath
=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/"
;
//record
var
recordUrl
=
"/crecord/record"
;
function
resolve
(
a
)
{
var
b
=
eval
(
a
);
return
b
;
}
function
openRecord
()
{
mqq
.
ui
.
openUrl
({
url
:
window
[
'recordUrl'
],
target
:
1
})
}
</script>
<script
type=
"text/javascript"
src=
"https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"
></script>
<script
src=
"https://assets.geilicdn.com/v-components/jsbridge/1.0.1/index.min.js"
></script>
<script>
function
shareWX
(
shareCode
,
uid
)
{
var
num
=
Math
.
floor
(
Math
.
random
()
*
3
+
1
);
var
title
=
""
;
var
context
=
""
;
if
(
num
==
1
)
{
title
=
"送你200万金币,1分钱包邮换水果"
;
context
=
"开微店咖啡店,1分钱包邮水果天天领~"
;
}
else
if
(
num
==
2
)
{
title
=
"【邀请函】我开了一家咖啡馆,你不来坐坐?"
;
context
=
"送你200万金币,开店兑好礼~"
;
}
else
if
(
num
==
3
)
{
title
=
"上微店,200万开店基金待领取!"
;
context
=
"来微店咖啡馆,赚营业额兑一分钱包邮水果~"
;
}
var
param
=
{
"newShare"
:
{
"panelList"
:
[{
"panelType"
:
1
,
"desc"
:
"链接分享"
,
"content"
:
{
"url"
:
"https://www.91ruyu.com/h/wdbuyer-hd/coffee-share.html?shareCode="
+
encodeURIComponent
(
shareCode
)
+
"&inviteId="
+
encodeURIComponent
(
uid
),
"title"
:
title
,
"content"
:
context
,
"imageUrl"
:
"http://yun.duiba.com.cn/db_games/activity/weidian1.0/share.jpg"
,
"scene"
:
"1_2_3_4"
,
"directScene"
:
"1"
}
}]
}
};
KDJSBridge2
.
call
(
'WDJSBridge'
,
'share'
,
param
,
function
(
data
)
{})
}
function
LeaveGame
()
{
var
param
=
{}
KDJSBridge2
.
call
(
'WDJSBridge'
,
'goBack'
,
function
(
data
)
{
})
}
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/lib2_game.min.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/laochangshajiyi/svga.egret.min1.js"
>
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1579424039/output.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/resource/default.thm.js"
></script>
<script>
//音乐自动播放
// $(document).ready(function () {
// autoPlayMusic();
// audioAutoPlay();
// });
function
audioAutoPlay
()
{
var
audio
=
null
;
audio
=
document
.
getElementById
(
'bgMusic'
);
audio
.
play
&&
audio
.
play
();
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
audio
.
play
();
},
false
);
}
// 音乐播放
function
autoPlayMusic
()
{
// 自动播放音乐效果,解决浏览器或者APP自动播放问题
function
musicInBrowserHandler
()
{
musicPlay
(
true
);
document
.
body
.
removeEventListener
(
'touchstart'
,
musicInBrowserHandler
);
}
document
.
body
.
addEventListener
(
'touchstart'
,
musicInBrowserHandler
);
// 自动播放音乐效果,解决微信自动播放问题
function
musicInWeixinHandler
()
{
musicPlay
(
true
);
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
musicPlay
(
true
);
},
false
);
document
.
removeEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
document
.
addEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
function
playMusic
(
id
=
"bgMusic"
,
isPlay
=
true
,
isLoop
=
true
)
{
var
media
=
document
.
getElementById
(
id
);
if
(
isPlay
)
{
media
.
load
();
if
(
media
.
paused
)
{
if
(
isLoop
)
{
media
.
play
();
}
else
{
media
.
play
(
1
)
}
}
else
{
if
(
isLoop
)
{
media
.
pause
();
media
.
play
();
}
else
{
media
.
pause
();
media
.
play
(
1
);
}
}
}
if
(
!
isPlay
&&
!
media
.
paused
)
{
media
.
pause
();
}
}
</script>
<script>
egret
.
ImageLoader
.
crossOrigin
=
"anonymous"
;
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
</script>
</body>
</html>
\ No newline at end of file
egret/index copy 2.html
0 → 100644
View file @
752fefdf
<meta
charset=
"utf-8"
>
<title>
我的咖啡店
</title>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<script>
var
__startTime__
=
Date
.
now
()
</script>
<style>
html
,
body
{
-ms-touch-action
:
none
;
background-repeat
:
no-repeat
;
background-color
:
#b96e4f
;
background-size
:
100%
;
/* background-position: center; */
padding
:
0
;
border
:
0
;
margin
:
0
;
height
:
100%
;
width
:
100%
;
}
</style>
</head>
<body>
<audio
style=
"display:none;
height: 0"
id=
"bgMusic"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/bg.mp3"
loop=
"loop"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"collectCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/collectCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createEq"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createEq.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"levelUp"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/levelUp.mp3"
>
</audio>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
data-scale-mode=
"showAll"
data-frame-rate=
"60"
data-content-width=
"750"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"false"
data-show-log=
"false"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<script>
document
.
addEventListener
(
"visibilitychange"
,
()
=>
{
if
(
document
.
visibilityState
==
"visible"
)
{
if
(
window
[
"playMusic"
]){
if
(
window
[
'isPlayMusic'
]){
window
[
"playMusic"
](
"bgMusic"
,
true
);
}
}
}
if
(
document
.
visibilityState
==
"hidden"
)
{
window
[
"playMusic"
](
"bgMusic"
,
false
);
}
})
function
getQueryVariable
(
variable
)
{
var
query
=
window
.
location
.
search
.
substring
(
1
);
var
vars
=
query
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
variable
){
return
pair
[
1
];}
}
return
(
false
);
}
// appId 运营配置
if
(
getQueryVariable
(
"appID"
)){
window
[
'appId'
]
=
getQueryVariable
(
"appID"
);
}
else
{
window
[
'appId'
]
=
"66114"
;
}
// projectId 看链接
if
(
window
.
location
.
pathname
.
match
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
))){
window
[
'projectxId'
]
=
window
.
location
.
pathname
.
replace
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
),
"$1"
);
// oaId 运营配置
window
[
'oaId'
]
=
window
[
'projectxId'
];
}
else
{
window
[
'projectxId'
]
=
"p77f14047"
;
// oaId 运营配置
window
[
'oaId'
]
=
12321
;
}
// 每日领金币
window
[
'takecoins'
]
=
150000
;
// 成功邀请奖励金币
window
[
'coinsnum'
]
=
100000
;
// 成功邀请奖励钻石
window
[
'dianum'
]
=
100
;
// 资源位 图片
window
[
"resImg"
]
=
''
;
// 资源位 跳转路径
window
[
'resUrl'
]
=
''
;
//资源路径
var
resPath
=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/"
;
//record
var
recordUrl
=
"/crecord/record"
;
function
resolve
(
a
)
{
var
b
=
eval
(
a
);
return
b
;
}
function
openRecord
(){
mqq
.
ui
.
openUrl
({
url
:
window
[
'recordUrl'
],
target
:
1
})
}
</script>
<script
type=
"text/javascript"
src=
"https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"
></script>
<script
src=
"https://assets.geilicdn.com/v-components/jsbridge/1.0.1/index.min.js"
></script>
<script>
function
shareWX
(
shareCode
,
uid
){
var
num
=
Math
.
floor
(
Math
.
random
()
*
3
+
1
);
var
title
=
""
;
var
context
=
""
;
if
(
num
==
1
){
title
=
"送你200万金币,1分钱包邮换水果"
;
context
=
"开微店咖啡店,1分钱包邮水果天天领~"
;
}
else
if
(
num
==
2
){
title
=
"【邀请函】我开了一家咖啡馆,你不来坐坐?"
;
context
=
"送你200万金币,开店兑好礼~"
;
}
else
if
(
num
==
3
){
title
=
"上微店,200万开店基金待领取!"
;
context
=
"来微店咖啡馆,赚营业额兑一分钱包邮水果~"
;
}
var
param
=
{
"newShare"
:{
"panelList"
:[{
"panelType"
:
1
,
"desc"
:
"链接分享"
,
"content"
:{
"url"
:
"https://www.91ruyu.com/h/wdbuyer-hd/coffee-share.html?auth=4HndANsAaNQG1AneZN27nvTGLr7k&shareCode="
+
encodeURIComponent
(
shareCode
)
+
"&inviteId="
+
encodeURIComponent
(
uid
),
"title"
:
title
,
"content"
:
context
,
"imageUrl"
:
"http://yun.duiba.com.cn/db_games/activity/weidian1.0/share.jpg"
,
"scene"
:
"1_2_3_4"
,
"directScene"
:
"1"
}}]}};
KDJSBridge2
.
call
(
'WDJSBridge'
,
'share'
,
param
,
function
(
data
)
{
}
)
}
function
LeaveGame
()
{
var
param
=
{}
KDJSBridge2
.
call
(
'WDJSBridge'
,
'goBack'
,
function
(
data
)
{
})
}
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/lib2_game.min.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/laochangshajiyi/svga.egret.min1.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1579424039/output.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/resource/default.thm.js"
></script>
<script>
//音乐自动播放
// $(document).ready(function () {
// autoPlayMusic();
// audioAutoPlay();
// });
function
audioAutoPlay
()
{
var
audio
=
null
;
audio
=
document
.
getElementById
(
'bgMusic'
);
audio
.
play
&&
audio
.
play
();
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
audio
.
play
();
},
false
);
}
// 音乐播放
function
autoPlayMusic
()
{
// 自动播放音乐效果,解决浏览器或者APP自动播放问题
function
musicInBrowserHandler
()
{
musicPlay
(
true
);
document
.
body
.
removeEventListener
(
'touchstart'
,
musicInBrowserHandler
);
}
document
.
body
.
addEventListener
(
'touchstart'
,
musicInBrowserHandler
);
// 自动播放音乐效果,解决微信自动播放问题
function
musicInWeixinHandler
()
{
musicPlay
(
true
);
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
musicPlay
(
true
);
},
false
);
document
.
removeEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
document
.
addEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
function
playMusic
(
id
=
"bgMusic"
,
isPlay
=
true
,
isLoop
=
true
)
{
var
media
=
document
.
getElementById
(
id
);
if
(
isPlay
)
{
media
.
load
();
if
(
media
.
paused
)
{
if
(
isLoop
)
{
media
.
play
();
}
else
{
media
.
play
(
1
)
}
}
else
{
if
(
isLoop
)
{
media
.
pause
();
media
.
play
();
}
else
{
media
.
pause
();
media
.
play
(
1
);
}
}
}
if
(
!
isPlay
&&
!
media
.
paused
)
{
media
.
pause
();
}
}
</script>
<script>
egret
.
ImageLoader
.
crossOrigin
=
"anonymous"
;
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
</script>
\ No newline at end of file
egret/index copy 3.html
0 → 100644
View file @
752fefdf
<!DOCTYPE HTML>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
我的咖啡店
</title>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<script>
var
__startTime__
=
Date
.
now
()
</script>
<style>
html
,
body
{
-ms-touch-action
:
none
;
background-repeat
:
no-repeat
;
background-color
:
#b96e4f
;
background-size
:
100%
;
/* background-position: center; */
padding
:
0
;
border
:
0
;
margin
:
0
;
height
:
100%
;
width
:
100%
;
}
</style>
</head>
<body>
<audio
style=
"display:none;
height: 0"
id=
"bgMusic"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/bg.mp3"
loop=
"loop"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"collectCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/collectCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createCoins"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createCoins.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"createEq"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/createEq.mp3"
>
</audio>
<audio
style=
"display:none;
height: 0"
id=
"levelUp"
preload=
"auto"
src=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/levelUp.mp3"
>
</audio>
<div
style=
"margin: auto;width: 100%;height: 100%;"
class=
"egret-player"
data-entry-class=
"Main"
data-orientation=
"auto"
data-scale-mode=
"showAll"
data-frame-rate=
"60"
data-content-width=
"750"
data-content-height=
"1624"
data-multi-fingered=
"2"
data-show-fps=
"false"
data-show-log=
"false"
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<script>
document
.
addEventListener
(
"visibilitychange"
,
()
=>
{
if
(
document
.
visibilityState
==
"visible"
)
{
if
(
window
[
"playMusic"
])
{
if
(
window
[
'isPlayMusic'
])
{
window
[
"playMusic"
](
"bgMusic"
,
true
);
}
}
}
if
(
document
.
visibilityState
==
"hidden"
)
{
window
[
"playMusic"
](
"bgMusic"
,
false
);
}
})
function
getQueryVariable
(
variable
)
{
var
query
=
window
.
location
.
search
.
substring
(
1
);
var
vars
=
query
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
variable
){
return
pair
[
1
];}
}
return
(
false
);
}
// appId 运营配置
if
(
getQueryVariable
(
"appID"
)){
window
[
'appId'
]
=
getQueryVariable
(
"appID"
);
}
else
{
window
[
'appId'
]
=
"66114"
;
}
// projectId 看链接
if
(
window
.
location
.
pathname
.
match
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
))){
window
[
'projectxId'
]
=
window
.
location
.
pathname
.
replace
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
),
"$1"
);
// oaId 运营配置
window
[
'oaId'
]
=
window
[
'projectxId'
];
}
else
{
window
[
'projectxId'
]
=
"p77f14047"
;
// oaId 运营配置
window
[
'oaId'
]
=
12321
;
}
// 每日领金币
window
[
'takecoins'
]
=
150000
;
// 成功邀请奖励金币
window
[
'coinsnum'
]
=
100000
;
// 成功邀请奖励钻石
window
[
'dianum'
]
=
100
;
// 资源位 图片
window
[
"resImg"
]
=
''
;
// 资源位 跳转路径
window
[
'resUrl'
]
=
''
;
//资源路径
var
resPath
=
"https://yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/"
;
//record
var
recordUrl
=
"/crecord/record"
;
function
resolve
(
a
)
{
var
b
=
eval
(
a
);
return
b
;
}
function
openRecord
()
{
mqq
.
ui
.
openUrl
({
url
:
window
[
'recordUrl'
],
target
:
1
})
}
</script>
<script
type=
"text/javascript"
src=
"https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"
></script>
<script
src=
"https://assets.geilicdn.com/v-components/jsbridge/1.0.1/index.min.js"
></script>
<script>
function
shareWX
(
shareCode
,
uid
)
{
var
num
=
Math
.
floor
(
Math
.
random
()
*
3
+
1
);
var
title
=
""
;
var
context
=
""
;
if
(
num
==
1
)
{
title
=
"送你200万金币,1分钱包邮换水果"
;
context
=
"开微店咖啡店,1分钱包邮水果天天领~"
;
}
else
if
(
num
==
2
)
{
title
=
"【邀请函】我开了一家咖啡馆,你不来坐坐?"
;
context
=
"送你200万金币,开店兑好礼~"
;
}
else
if
(
num
==
3
)
{
title
=
"上微店,200万开店基金待领取!"
;
context
=
"来微店咖啡馆,赚营业额兑一分钱包邮水果~"
;
}
var
param
=
{
"newShare"
:
{
"panelList"
:
[{
"panelType"
:
1
,
"desc"
:
"链接分享"
,
"content"
:
{
"url"
:
"https://www.91ruyu.com/h/wdbuyer-hd/coffee-share.html?shareCode="
+
encodeURIComponent
(
shareCode
)
+
"&inviteId="
+
encodeURIComponent
(
uid
),
"title"
:
title
,
"content"
:
context
,
"imageUrl"
:
"http://yun.duiba.com.cn/db_games/activity/weidian1.0/share.jpg"
,
"scene"
:
"1_2_3_4"
,
"directScene"
:
"1"
}
}]
}
};
KDJSBridge2
.
call
(
'WDJSBridge'
,
'share'
,
param
,
function
(
data
)
{})
}
function
LeaveGame
()
{
var
param
=
{}
KDJSBridge2
.
call
(
'WDJSBridge'
,
'goBack'
,
function
(
data
)
{
})
}
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/lib2_game.min.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/laochangshajiyi/svga.egret.min1.js"
>
</script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1579424039/output.js"
></script>
<script
crossorigin=
"anonymous"
src=
"//yun.duiba.com.cn/db_games/activity/weidian1.0/1578897290/resource/default.thm.js"
></script>
<script>
//音乐自动播放
// $(document).ready(function () {
// autoPlayMusic();
// audioAutoPlay();
// });
function
audioAutoPlay
()
{
var
audio
=
null
;
audio
=
document
.
getElementById
(
'bgMusic'
);
audio
.
play
&&
audio
.
play
();
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
audio
.
play
();
},
false
);
}
// 音乐播放
function
autoPlayMusic
()
{
// 自动播放音乐效果,解决浏览器或者APP自动播放问题
function
musicInBrowserHandler
()
{
musicPlay
(
true
);
document
.
body
.
removeEventListener
(
'touchstart'
,
musicInBrowserHandler
);
}
document
.
body
.
addEventListener
(
'touchstart'
,
musicInBrowserHandler
);
// 自动播放音乐效果,解决微信自动播放问题
function
musicInWeixinHandler
()
{
musicPlay
(
true
);
document
.
addEventListener
(
"WeixinJSBridgeReady"
,
function
()
{
musicPlay
(
true
);
},
false
);
document
.
removeEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
document
.
addEventListener
(
'DOMContentLoaded'
,
musicInWeixinHandler
);
}
function
playMusic
(
id
=
"bgMusic"
,
isPlay
=
true
,
isLoop
=
true
)
{
var
media
=
document
.
getElementById
(
id
);
if
(
isPlay
)
{
media
.
load
();
if
(
media
.
paused
)
{
if
(
isLoop
)
{
media
.
play
();
}
else
{
media
.
play
(
1
)
}
}
else
{
if
(
isLoop
)
{
media
.
pause
();
media
.
play
();
}
else
{
media
.
pause
();
media
.
play
(
1
);
}
}
}
if
(
!
isPlay
&&
!
media
.
paused
)
{
media
.
pause
();
}
}
</script>
<script>
egret
.
ImageLoader
.
crossOrigin
=
"anonymous"
;
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
</script>
</body>
</html>
\ No newline at end of file
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