Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5_activity
Project
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
谭新宇
h5_activity
Commits
17745d40
Commit
17745d40
authored
Jul 10, 2019
by
txy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'提取公共文件'
parent
dfcc1b67
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
140 deletions
+47
-140
index.html
showPhotos/index.html
+1
-1
common.js
showPhotos/js/page/common.js
+44
-0
index.js
showPhotos/js/page/index.js
+0
-50
signup.js
showPhotos/js/page/signup.js
+0
-45
user.js
showPhotos/js/page/user.js
+0
-44
signup.html
showPhotos/signup.html
+1
-0
user.html
showPhotos/user.html
+1
-0
No files found.
showPhotos/index.html
View file @
17745d40
...
...
@@ -44,6 +44,6 @@
<body>
</body>
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/page/common.js"
></script>
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/page/index.js"
></script>
</html>
showPhotos/js/page/common.js
0 → 100644
View file @
17745d40
// 页面跳转
function
transPage
(
_pageNumber
,
_activityCode
,
_token
,
_urlParam
)
{
var
url
=
''
if
(
typeof
_urlParam
!==
'undefined'
&&
_urlParam
!==
''
)
{
url
=
baseUrl
+
"/ACTIVITY/view/"
+
_activityCode
+
"/"
+
_pageNumber
+
'?'
+
_urlParam
;
}
else
{
url
=
baseUrl
+
"/ACTIVITY/view/"
+
_activityCode
+
"/"
+
_pageNumber
;
}
var
_form
=
document
.
createElement
(
'form'
);
_form
.
action
=
url
;
_form
.
method
=
"post"
;
_form
.
style
.
display
=
"none"
;
var
inputToken
=
document
.
createElement
(
'input'
);
inputToken
.
value
=
_token
;
inputToken
.
name
=
'x-token'
;
_form
.
appendChild
(
inputToken
);
document
.
body
.
appendChild
(
_form
);
_form
.
submit
();
}
// 获取URL中指定参数
function
getQueryString
(
name
)
{
var
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
return
unescape
(
r
[
2
]);
}
return
null
;
}
// 加载HTML结构
function
loadHtmlJson
()
{
$
(
'body'
).
prepend
(
json2html
(
data
.
htmlJson
));
var
_relationship
=
data
.
relationship
;
for
(
var
i
=
0
;
i
<
_relationship
.
childs
.
length
;
i
++
)
{
var
_page
=
_relationship
.
childs
[
i
].
page
var
_pageNumber
=
_relationship
.
childs
[
i
].
pageNumber
$
(
'body'
).
prepend
(
json2html
(
JSON
.
parse
(
data
[
_page
].
htmlJson
)));
$
(
'#html-template-'
+
_pageNumber
).
addClass
(
'global-none'
)
}
}
\ No newline at end of file
showPhotos/js/page/index.js
View file @
17745d40
...
...
@@ -373,52 +373,3 @@ function playPageFn() {
var
urlParam
=
'?UserId='
+
id
;
transPage
(
'3'
,
activityCode
,
xtoken
,
urlParam
);
}
\ No newline at end of file
// 获取URL中指定参数
function
getQueryString
(
name
)
{
var
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
return
unescape
(
r
[
2
]);
}
return
null
;
}
// 加载HTML结构
function
loadHtmlJson
()
{
// 页面结构注入
$
(
'body'
).
prepend
(
json2html
(
JSON
.
parse
(
data
.
htmlJson
)));
var
_relationship
=
data
.
relationship
.
childs
;
var
htmlJson
=
""
;
// 依赖组件注入
for
(
var
i
=
0
;
i
<
_relationship
.
length
;
i
++
){
var
_page
=
_relationship
[
i
].
page
;
$
(
'body'
).
prepend
(
json2html
(
JSON
.
parse
(
data
[
_page
].
htmlJson
)));
// 隐藏添加元素
$
(
'#html-template-'
+
_relationship
[
i
].
pageNumber
).
addClass
(
'global-none'
);
}
}
// 页面跳转
function
transPage
(
_pageNumber
,
_activityCode
,
_token
,
_urlParam
){
var
url
=
''
if
(
typeof
_urlParam
!==
'undefined'
&&
_urlParam
!==
''
){
url
=
baseUrl
+
"/ACTIVITY/view/"
+
_activityCode
+
"/"
+
_pageNumber
+
'?'
+
_urlParam
;
}
else
{
url
=
baseUrl
+
"/ACTIVITY/view/"
+
_activityCode
+
"/"
+
_pageNumber
;
}
var
_form
=
document
.
createElement
(
'form'
);
_form
.
action
=
url
;
_form
.
method
=
"post"
;
_form
.
style
.
display
=
"none"
;
var
inputToken
=
document
.
createElement
(
'input'
);
inputToken
.
value
=
_token
;
inputToken
.
name
=
'x-token'
;
_form
.
appendChild
(
inputToken
);
document
.
body
.
appendChild
(
_form
);
_form
.
submit
();
}
\ No newline at end of file
showPhotos/js/page/signup.js
View file @
17745d40
...
...
@@ -11,18 +11,6 @@
loadHtmlJson
();
})
// 加载HTML结构
function
loadHtmlJson
()
{
$
(
'body'
).
prepend
(
json2html
(
data
.
htmlJson
));
var
_relationship
=
data
.
relationship
;
for
(
var
i
=
0
;
i
<
_relationship
.
childs
.
length
;
i
++
)
{
var
_page
=
_relationship
.
childs
[
i
].
page
var
_pageNumber
=
_relationship
.
childs
[
i
].
pageNumber
$
(
'body'
).
prepend
(
json2html
(
JSON
.
parse
(
data
[
_page
].
htmlJson
)));
$
(
'#html-template-'
+
_pageNumber
).
addClass
(
'global-none'
)
}
}
// 微信鉴权
function
wxpermission
()
{
wx
.
ready
(
function
()
{
...
...
@@ -225,16 +213,6 @@
})
}
// 获取URL中指定参数
function
getQueryString
(
name
)
{
var
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
return
unescape
(
r
[
2
]);
}
return
null
;
}
function
selectFileImage
(
fileObj
)
{
var
file
=
fileObj
.
files
[
'0'
];
//图片方向角 added by lzk
...
...
@@ -506,25 +484,3 @@
}
return
true
}
// 页面跳转
function
transPage
(
_pageNumber
,
_activityCode
,
_token
,
_urlParam
)
{
var
url
=
''
if
(
typeof
_urlParam
!==
'undefined'
&&
_urlParam
!==
''
)
{
url
=
baseUrl
+
"/ACTIVITY/view/"
+
_activityCode
+
"/"
+
_pageNumber
+
'?'
+
_urlParam
;
}
else
{
url
=
baseUrl
+
"/ACTIVITY/view/"
+
_activityCode
+
"/"
+
_pageNumber
;
}
var
_form
=
document
.
createElement
(
'form'
);
_form
.
action
=
url
;
_form
.
method
=
"post"
;
_form
.
style
.
display
=
"none"
;
var
inputToken
=
document
.
createElement
(
'input'
);
inputToken
.
value
=
_token
;
inputToken
.
name
=
'x-token'
;
_form
.
appendChild
(
inputToken
);
document
.
body
.
appendChild
(
_form
);
_form
.
submit
();
}
\ No newline at end of file
showPhotos/js/page/user.js
View file @
17745d40
...
...
@@ -13,18 +13,6 @@ $(function(){
wxpermission
();
});
// 加载HTML结构
function
loadHtmlJson
()
{
$
(
'body'
).
prepend
(
json2html
(
data
.
htmlJson
));
var
_relationship
=
JSON
.
parse
(
data
.
relationship
);
for
(
var
i
=
0
;
i
<
_relationship
.
childs
.
length
;
i
++
)
{
var
_page
=
_relationship
.
childs
[
i
].
page
var
_pageNumber
=
_relationship
.
childs
[
i
].
pageNumber
$
(
'body'
).
prepend
(
json2html
(
JSON
.
parse
(
data
[
_page
].
htmlJson
)));
$
(
'#html-template-'
+
_pageNumber
).
addClass
(
'global-none'
)
}
}
// 微信鉴权
function
wxpermission
()
{
wx
.
ready
(
function
(){
...
...
@@ -216,34 +204,3 @@ function voteClickFn(){
})
}
// 获取URL中指定参数
function
getQueryString
(
name
)
{
var
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
return
unescape
(
r
[
2
]);
}
return
null
;
}
// 页面跳转
function
transPage
(
_pageNumber
,
_activityCode
,
_token
,
_urlParam
){
var
url
=
''
if
(
typeof
_urlParam
!==
'undefined'
&&
_urlParam
!==
''
){
url
=
baseUrl
+
"/ACTIVITY/view/"
+
_activityCode
+
"/"
+
_pageNumber
+
'?'
+
_urlParam
;
}
else
{
url
=
baseUrl
+
"/ACTIVITY/view/"
+
_activityCode
+
"/"
+
_pageNumber
;
}
var
_form
=
document
.
createElement
(
'form'
);
_form
.
action
=
url
;
_form
.
method
=
"post"
;
_form
.
style
.
display
=
"none"
;
var
inputToken
=
document
.
createElement
(
'input'
);
inputToken
.
value
=
_token
;
inputToken
.
name
=
'x-token'
;
_form
.
appendChild
(
inputToken
);
document
.
body
.
appendChild
(
_form
);
_form
.
submit
();
}
\ No newline at end of file
showPhotos/signup.html
View file @
17745d40
...
...
@@ -53,5 +53,6 @@
<body>
</body>
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/page/common.js"
></script>
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/page/signup.js"
></script>
</html>
showPhotos/user.html
View file @
17745d40
...
...
@@ -38,5 +38,6 @@
<body>
</body>
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/page/common.js"
></script>
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/page/user.js"
></script>
</html>
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