Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
samsung-christmas
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0ca8a5a4
authored
Jul 16, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
03d81b04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
59 deletions
+67
-59
Application/Common/Conf/config.php
+2
-2
Application/Home/View/default/layout.tpl
+65
-57
No files found.
Application/Common/Conf/config.php
View file @
0ca8a5a4
...
...
@@ -13,7 +13,7 @@ return array(
'AUTH_CLIENT_ID'
=>
'zhida_app'
,
'AUTH_CLIENT_PASSWORD'
=>
'izhida'
,
/* CDN路径配置。配置之后可以在模版文件中使用__CDN__ */
// '__CDN__' => 'http
s
://static3.izhida.cn/cdn1/pingan-marathon/v1.0.0',
// '__CDN__' => 'http://static3.izhida.cn/cdn1/pingan-marathon/v1.0.0',
'__CDN__'
=>
'/Public/static'
,
// @readme <-- 上线时修改这里
'URL_MODEL'
=>
3
,
'STORAGE_PATH'
=>
WEB_ROOT_PATH
.
'/Data/Storage'
,
...
...
@@ -22,7 +22,7 @@ return array(
'SHOW_PAGE_TRACE'
=>
false
,
'ERROR_PAGE'
=>
'/50x.html'
,
'SITE_URL'
=>
'http
s
://'
.
(
isset
(
$_SERVER
[
'HTTP_HOST'
])
?
$_SERVER
[
'HTTP_HOST'
]
:
'moli.gnhj.izhida.cn'
),
'SITE_URL'
=>
'http://'
.
(
isset
(
$_SERVER
[
'HTTP_HOST'
])
?
$_SERVER
[
'HTTP_HOST'
]
:
'moli.gnhj.izhida.cn'
),
'PUBLISH_MODE'
=>
'development'
,
// development,test,production
...
...
Application/Home/View/default/layout.tpl
View file @
0ca8a5a4
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"imagetoolbar"
content=
"no"
>
<meta
http-equiv=
"content-type"
content=
"text/html; charset=utf-8"
>
...
...
@@ -34,12 +35,14 @@
var
version
=
parseFloat
(
RegExp
.
$1
);
if
(
version
>
2.3
)
{
var
phoneScale
=
parseInt
(
window
.
screen
.
width
)
/
640
;
document
.
write
(
'
<
meta
name
=
"viewport"
content
=
"width=640, minimum-scale = ' + phoneScale + ', maximum-scale = ' + phoneScale + ', target-densitydpi=device-dpi ,viewport-fit=cover"
>
');
document
.
write
(
'
<
meta
name
=
"viewport"
content
=
"width=640, minimum-scale = ' + phoneScale +
', maximum-scale = ' + phoneScale + ', target-densitydpi=device-dpi ,viewport-fit=cover"
>
');
} else {
document.write('
<
meta
name
=
"viewport"
content
=
"width=640, target-densitydpi=device-dpi"
>
');
}
} else {
document.write('
<
meta
name
=
"viewport"
content
=
"width=640, user-scalable=no, target-densitydpi=device-dpi"
>
'
);
document.write(
'
<
meta
name
=
"viewport"
content
=
"width=640, user-scalable=no, target-densitydpi=device-dpi"
>
'
);
}
</script>
{:/if}
...
...
@@ -47,12 +50,13 @@
//判断访问终端
var
browser
=
{
versions
:
function
()
{
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
;
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
;
return
{
trident
:
u
.
indexOf
(
'Trident'
)
>
-
1
,
//IE内核
presto
:
u
.
indexOf
(
'Presto'
)
>
-
1
,
//opera内核
webKit
:
u
.
indexOf
(
'AppleWebKit'
)
>
-
1
,
//苹果、谷歌内核
gecko
:
u
.
indexOf
(
'Gecko'
)
>
-
1
&&
u
.
indexOf
(
'KHTML'
)
==
-
1
,
//火狐内核
gecko
:
u
.
indexOf
(
'Gecko'
)
>
-
1
&&
u
.
indexOf
(
'KHTML'
)
==
-
1
,
//火狐内核
mobile
:
!!
u
.
match
(
/AppleWebKit.*Mobile.*/
),
//是否为移动终端
ios
:
!!
u
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
),
//ios终端
android
:
u
.
indexOf
(
'Android'
)
>
-
1
||
u
.
indexOf
(
'Adr'
)
>
-
1
,
//android终端
...
...
@@ -67,70 +71,73 @@
}
</script>
<title>
{:block name='title'}圣诞老人来送礼物啦!快来一起围观!{:/block}
</title>
{:if $projectId
&&
strpos( $smarty.server.HTTP_HOST , 'dev.izhida.cn') !== false}
{:if $projectId
&&
strpos( $smarty.server.HTTP_HOST , 'dev.izhida.cn') !== false}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"http://projectx.dev.izhida.cn/api/css/rem/{:$rem}/id/{:$projectId}"
media=
"all"
/>
media=
"all"
/>
{:else}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__CDN__/css/main.min.css"
media=
"all"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__CDN__/css/main.min.css"
media=
"all"
/>
{:/if}
{:block name='css'}{:/block}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__CDN__/css/notify.css"
media=
"all"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__CDN__/css/index.css?v=11"
media=
"all"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__CDN__/css/notify.css"
media=
"all"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__CDN__/css/index.css?v=11"
media=
"all"
/>
</head>
<body>
<audio
src=
"__CDN__/media/bg.mp3"
preload=
"auto"
loop=
"loop"
id=
"music"
style=
"display:none"
></audio>
<div
class=
"wrap"
>
<div
class=
"wrap-inner"
>
{:if $projectId
&&
strpos( $smarty.server.HTTP_HOST , 'dev.izhida.cn') !== false}
{:"https://projectx.dev.izhida.cn/api/html/id/`$projectId`"|file_get_contents}
{:else}
{:block name='body'}{:/block}
{:/if}
<audio
src=
"__CDN__/media/bg.mp3"
preload=
"auto"
loop=
"loop"
id=
"music"
style=
"display:none"
></audio>
<div
class=
"wrap"
>
<div
class=
"wrap-inner"
>
{:if $projectId
&&
strpos( $smarty.server.HTTP_HOST , 'dev.izhida.cn') !== false}
{:"http://projectx.dev.izhida.cn/api/html/id/`$projectId`"|file_get_contents}
{:else}
{:block name='body'}{:/block}
{:/if}
</div>
</div>
</div>
<script>
window
.
base_resource_url
=
'__CDN__'
;
window
.
type
=
'{:$type|default:0}'
;
window
.
tel
=
'{:$tel|default:null}'
;
<script>
window
.
base_resource_url
=
'__CDN__'
;
window
.
type
=
'{:$type|default:0}'
;
window
.
tel
=
'{:$tel|default:null}'
;
var
link
=
location
.
origin
;
var
friend_title
=
'圣诞老人来送礼物啦!快来一起围观!'
;
var
friend_desc
=
'快来领取你的圣诞专属礼物'
;
var
timeline_desc
=
'圣诞老人来送礼物啦!快来一起围观!'
;
window
.
wxFriendData
=
{
'link'
:
link
,
'imgUrl'
:
link
+
'/Public/static/image2/share.png'
,
'title'
:
friend_title
,
'desc'
:
friend_desc
,
success
:
function
()
{
$
(
'.share-dialog'
).
hide
();
}
};
window
.
wxTimelineData
=
{
'link'
:
link
,
'imgUrl'
:
link
+
'/Public/static/image2/share.png'
,
'title'
:
timeline_desc
,
success
:
function
()
{
$
(
'.share-dialog'
).
hide
();
}
};
</script>
<script
type=
"text/javascript"
src=
"https://api2.izhida.cn/wechat_js_config?app_id=wx4c3c856ab83a946b&v=1.2.1&api_list=all&app_stat_key="
></script>
<script
src=
"__CDN__/js/jquery-2.1.3.min.js"
></script>
<script
src=
"__CDN__/js/jquery-notify.min.js"
></script>
<script
type=
"text/javascript"
src=
"__CDN__/js/leaves.js"
></script>
{:block name='js'}{:/block}
<script>
window
.
wx
&&
wx
.
ready
(
function
()
{
$
(
'#music'
)[
0
].
play
();
wx
.
onMenuShareAppMessage
(
wxFriendData
);
wx
.
onMenuShareTimeline
(
wxTimelineData
);
});
</script>
var
link
=
location
.
origin
;
var
friend_title
=
'圣诞老人来送礼物啦!快来一起围观!'
;
var
friend_desc
=
'快来领取你的圣诞专属礼物'
;
var
timeline_desc
=
'圣诞老人来送礼物啦!快来一起围观!'
;
window
.
wxFriendData
=
{
'link'
:
link
,
'imgUrl'
:
link
+
'/Public/static/image2/share.png'
,
'title'
:
friend_title
,
'desc'
:
friend_desc
,
success
:
function
()
{
$
(
'.share-dialog'
).
hide
();
}
};
window
.
wxTimelineData
=
{
'link'
:
link
,
'imgUrl'
:
link
+
'/Public/static/image2/share.png'
,
'title'
:
timeline_desc
,
success
:
function
()
{
$
(
'.share-dialog'
).
hide
();
}
};
</script>
<script
type=
"text/javascript"
src=
"http://api2.izhida.cn/wechat_js_config?app_id=wx4c3c856ab83a946b&v=1.2.1&api_list=all&app_stat_key="
>
</script>
<script
src=
"__CDN__/js/jquery-2.1.3.min.js"
></script>
<script
src=
"__CDN__/js/jquery-notify.min.js"
></script>
<script
type=
"text/javascript"
src=
"__CDN__/js/leaves.js"
></script>
{:block name='js'}{:/block}
<script>
window
.
wx
&&
wx
.
ready
(
function
()
{
$
(
'#music'
)[
0
].
play
();
wx
.
onMenuShareAppMessage
(
wxFriendData
);
wx
.
onMenuShareTimeline
(
wxTimelineData
);
});
</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