Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dfzx_10
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
dfzx_10
Commits
a2bcd4b3
Commit
a2bcd4b3
authored
Dec 20, 2019
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
index loading
parent
df3295f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
78 deletions
+13
-78
form.component.ts
src/app/form/form.component.ts
+6
-2
play.component.ts
src/app/play/play.component.ts
+3
-0
index.html
src/index.html
+4
-76
No files found.
src/app/form/form.component.ts
View file @
a2bcd4b3
...
...
@@ -8,7 +8,7 @@ import {
OnInit
,
Output
,
OnDestroy
,
ViewChild
ViewChild
,
ChangeDetectorRef
}
from
'
@angular/core
'
;
import
{
NzMessageDataFilled
,
NzMessageService
}
from
'
ng-zorro-antd
'
;
...
...
@@ -39,7 +39,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
constructor
(
private
nzMessageService
:
NzMessageService
,
private
appRef
:
ApplicationRef
)
{
private
appRef
:
ApplicationRef
,
public
changeDetectorRef
:
ChangeDetectorRef
)
{
}
...
...
@@ -81,6 +82,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
init
();
this
.
changeDetectorRef
.
markForCheck
();
this
.
changeDetectorRef
.
detectChanges
();
this
.
refresh
();
},
this
.
KEY
);
...
...
src/app/play/play.component.ts
View file @
a2bcd4b3
...
...
@@ -413,6 +413,9 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
loadResources
().
then
(()
=>
{
// this.setfontData();
window
[
'
air
'
].
hideAirClassLoading
(
this
.
KEY
,
this
.
data
);
this
.
init
();
this
.
update
();
});
...
...
src/index.html
100644 → 100755
View file @
a2bcd4b3
...
...
@@ -7,82 +7,10 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
<script>
window
.
courseware
=
(
function
(){
if
(
window
.
parent
.
net
){
window
.
net
=
window
.
parent
.
net
;
var
id
=
window
.
frameElement
.
getAttribute
(
"
dataid
"
);
return
{
getData
:
function
(
callback
,
key
=
''
){
net
.
getData
(
"
getCoursewareData
"
,
id
,
function
(
res
){
if
(
res
){
res
=
JSON
.
parse
(
res
);
if
(
res
.
msg
===
"
success
"
){
let
callData
=
null
;
if
(
res
.
data
&&
res
.
data
!=
'
null
'
){
callData
=
JSON
.
parse
(
res
.
data
);
}
callback
&&
callback
(
callData
);
}
else
{
alert
(
'
数据加载失败!
'
);
}
}
else
{
alert
(
'
数据加载失败!
'
);
}
});
},
setData
:
function
(
data
,
callback
,
key
=
''
){
let
str
=
JSON
.
stringify
(
data
);
net
.
getData
(
"
setCoursewareData
"
,{
id
:
id
,
data
:
str
},
function
(
res
){
if
(
res
){
res
=
JSON
.
parse
(
res
);
if
(
res
.
msg
===
"
success
"
){
callback
&&
callback
();
}
else
{
alert
(
'
数据保存失败!
'
);
}
}
else
{
alert
(
'
数据保存失败!
'
);
}
});
},
uploadUrl
:
function
(){
return
net
.
getUploadFileURL
();
},
uploadData
:
function
(){
return
net
.
getAjaxData
(
"
uploadFile
"
,
""
);
}
}
}
else
{
return
{
getData
:
function
(
callback
,
key
=
''
){
let
data
=
localStorage
.
getItem
(
"
courseware_data_
"
+
key
);
if
(
data
){
data
=
JSON
.
parse
(
data
);
}
callback
&&
callback
(
data
);
},
setData
:
function
(
data
,
callback
,
key
=
''
){
console
.
log
(
"
******local********
"
);
localStorage
.
setItem
(
"
courseware_data_
"
+
key
,
JSON
.
stringify
(
data
));
callback
&&
callback
();
},
uploadUrl
:
function
(){
return
'
http://localhost:3000/api/test
'
;
},
uploadData
:
function
(){
return
{};
}
}
}
})();
</script>
<script
type=
"text/javascript"
src=
"http://teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
</head>
<body>
<app-root></app-root>
</body>
<app-root></app-root>
</body>
</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