Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
eduline
Commits
f811cfbc
Commit
f811cfbc
authored
May 19, 2020
by
陈超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A
parent
6285da92
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletions
+37
-1
apps/home/Lib/Action/HomeAction.class.php
+5
-0
apps/home/Tpl/default/Home/exams_w3g.html
+32
-1
No files found.
apps/home/Lib/Action/HomeAction.class.php
View file @
f811cfbc
...
@@ -2251,6 +2251,11 @@ class HomeAction extends UserAction
...
@@ -2251,6 +2251,11 @@ class HomeAction extends UserAction
break
;
break
;
}
}
$this
->
assign
(
'list'
,
$list
);
$this
->
assign
(
'list'
,
$list
);
if
(
isAjax
()
&&
&&
$_GET
[
'api'
])
{
echo
json_encode
([
'status'
=>
1
,
'data'
=>
$list
]);
exit
;
}
if
(
isAjax
())
{
if
(
isAjax
())
{
$html
=
$this
->
fetch
(
'exams_w3g_ajax'
);
$html
=
$this
->
fetch
(
'exams_w3g_ajax'
);
echo
json_encode
([
'status'
=>
1
,
'data'
=>
[
'html'
=>
$html
]]);
exit
;
echo
json_encode
([
'status'
=>
1
,
'data'
=>
[
'html'
=>
$html
]]);
exit
;
...
...
apps/home/Tpl/default/Home/exams_w3g.html
View file @
f811cfbc
...
@@ -221,11 +221,16 @@
...
@@ -221,11 +221,16 @@
}
else
if
(
this
.
tab
==
1
)
{
}
else
if
(
this
.
tab
==
1
)
{
this
.
loadDownload
()
this
.
loadDownload
()
}
else
{
}
else
{
this
.
onMyTab
(
this
.
myTab
)
}
}
},
},
onMyTab
:
function
(
tab
)
{
onMyTab
:
function
(
tab
)
{
this
.
myTab
=
tab
this
.
myTab
=
tab
if
(
tab
==
0
)
{
this
.
loadMy
()
}
else
{
}
},
},
onCondition
:
function
(
condition
)
{
onCondition
:
function
(
condition
)
{
this
.
condition
.
forEach
(
r
=>
{
r
.
select
=
false
})
this
.
condition
.
forEach
(
r
=>
{
r
.
select
=
false
})
...
@@ -302,6 +307,32 @@
...
@@ -302,6 +307,32 @@
}
}
}
}
})
})
},
//加载我做过的题
loadMy
:
function
()
{
let
that
=
this
$
.
ajax
({
type
:
"GET"
,
url
:
"{:U('home/Home/exams')}"
+
"&api=1"
,
dataType
:
"json"
,
success
:
function
(
res
)
{
console
.
log
(
res
)
return
if
(
res
.
status
==
1
)
{
let
array
=
res
.
data
.
data
.
length
>
0
?
res
.
data
.
data
:
[]
that
.
download
=
[].
concat
(
array
.
map
(
r
=>
{
return
{
id
:
r
.
exams_paper_id
,
title
:
r
.
exams_paper_title
,
price
:
r
.
price
,
count
:
r
.
questions_count
,
time
:
r
.
reply_time
,
person
:
r
.
exams_user
+
"已做"
}
}))
}
}
})
}
}
}
}
})
})
...
...
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