Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
ym-3-29
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
ym-3-29
Commits
baec353a
Commit
baec353a
authored
Dec 18, 2019
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
迭代脚本
parent
058295b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
73 deletions
+2
-73
index.html
src/index.html
+2
-73
No files found.
src/index.html
View file @
baec353a
...
@@ -7,80 +7,9 @@
...
@@ -7,80 +7,9 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
<script
type=
"text/javascript"
src=
"http://teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
<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>
</head>
</head>
<body>
<body>
<app-root></app-root>
<app-root></app-root>
...
...
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