Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kaishi_test_01
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
kaishi_test_01
Commits
b09ef7fe
Commit
b09ef7fe
authored
Jun 23, 2021
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 调试页面
parent
885cdb10
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
14 deletions
+83
-14
index.js
form/index.js
+1
-1
index.css
play/index.css
+52
-3
index.html
play/index.html
+17
-1
index.js
play/index.js
+13
-9
No files found.
form/index.js
View file @
b09ef7fe
...
...
@@ -10,7 +10,7 @@ var uploadData = window.courseware.uploadData(); //上传文件必须要的参
*/
//对应模板的名称,这个可以不写,但是最好是能写上,同时开发多个模板的情况下如果不写这个,本地缓存可能会存在混乱
var
key
=
"
h5_test
"
;
var
key
=
"
kaishi_test_01
"
;
$
(
function
(){
window
.
courseware
.
getData
(
function
(
data
){
...
...
play/index.css
View file @
b09ef7fe
...
...
@@ -3,6 +3,55 @@ body {
background
:
#fff
;
}
#test
{
margin
:
80px
;
.main
{
position
:
absolute
;
top
:
0px
;
right
:
0px
;
bottom
:
0px
;
left
:
0px
;
padding
:
20px
;
}
table
{
margin-top
:
20px
;
width
:
100%
;
}
.log-container
{
margin-top
:
10px
;
height
:
60%
;
border
:
dotted
2px
#E4E7ED
;
border-radius
:
10px
;
position
:
relative
;
}
.log
{
position
:
absolute
;
top
:
10px
;
right
:
10px
;
bottom
:
10px
;
left
:
10px
;
overflow
:
auto
;
}
.option
{
background-color
:
#DCDFE6
;
border-radius
:
5px
;
width
:
90%
;
margin-left
:
5%
;
height
:
40px
;
line-height
:
40px
;
text-align
:
center
;
font-size
:
14px
;
color
:
#303133
;
cursor
:
pointer
;
}
.clear
{
position
:
absolute
;
bottom
:
5px
;
right
:
5px
;
z-index
:
10
;
cursor
:
pointer
;
color
:
#409EFF
;
}
play/index.html
View file @
b09ef7fe
...
...
@@ -10,7 +10,23 @@
<script
type=
"text/javascript"
src=
"//staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
</head>
<body>
<div
class=
"main"
>
<div>
通讯调试日志:
</div>
<div
class=
"log-container"
>
<span
class=
"clear"
>
清除日志
</span>
<div
class=
"log"
></div>
</div>
<table
border=
"0"
style=
"width: 100%;"
>
<tr>
<td><div
class=
"option"
>
选项A
</div></td>
<td><div
class=
"option"
>
选项B
</div></td>
<td><div
class=
"option"
>
选项C
</div></td>
<td><div
class=
"option"
>
选项D
</div></td>
</tr>
</table>
<h1
id=
"test"
></h1>
</div>
</body>
<script
src=
"./index.js"
></script>
</html>
\ No newline at end of file
play/index.js
View file @
b09ef7fe
...
...
@@ -9,7 +9,7 @@ window.air.hideAirClassLoading(key,data); //页面加载完成时,必须调
//对应模板的名称,这个可以不写,但是最好是能写上,同时开发多个模板的情况下如果不写这个,本地缓存可能会存在混乱
var
key
=
"
h5_test
"
;
var
key
=
"
kaishi_test_01
"
;
$
(
function
(){
...
...
@@ -25,19 +25,23 @@ $(function(){
//数据渲染完成后,添加各种交互或者动画效果
//我这里简单做一个渐入渐出效果的例子
var
flag
=
true
;
setInterval
(
function
(){
if
(
flag
){
$
(
"
#test
"
).
fadeIn
(
500
);
}
else
{
$
(
"
#test
"
).
fadeOut
(
500
);
}
flag
=
!
flag
;
$
(
"
#test
"
).
fadeToggle
(
500
);
},
1000
)
//在页面加载、事件、动画等都初始化完成后,一定要记得调用此方法,否则模板将是不可用的
window
.
air
.
hideAirClassLoading
(
key
,
data
);
},
key
);
$
(
"
.option
"
).
bind
(
"
click
"
,
function
(){
const
txt
=
$
(
this
).
text
();
$
(
"
.log
"
).
append
(
`页面点击触发了:
${
txt
}
<br>`
);
//获取滚动条高度
var
sh
=
$
(
"
.log
"
).
prop
(
"
scrollHeight
"
);
$
(
'
.log
'
).
animate
({
scrollTop
:
sh
},
10
);
});
$
(
"
.clear
"
).
bind
(
'
click
'
,
function
(){
$
(
"
.log
"
).
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