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
9ef15063
Commit
9ef15063
authored
May 21, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`试卷`
parent
dfbf6a8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
45 deletions
+51
-45
apps/home/Lib/Action/HomeAction.class.php
+50
-44
apps/home/Tpl/default/Home/share_w3g.html
+1
-1
No files found.
apps/home/Lib/Action/HomeAction.class.php
View file @
9ef15063
...
...
@@ -410,7 +410,7 @@ class HomeAction extends UserAction
$order_ptime
=
time
()
-
$val
[
'ptime'
];
$refund_time
=
$refundConfig
[
'refund_numday'
]
*
86400
;
$val
[
'refund_ptime_over'
]
=
$order_ptime
>
$refund_time
?
1
:
0
;
}
unset
(
$val
);
return
$data
;
...
...
@@ -442,42 +442,48 @@ class HomeAction extends UserAction
exit
;
}
$tab
=
intval
(
$_GET
[
'tab'
]);
$tpls
=
array
(
'share'
,
'share_money'
);
if
(
!
isset
(
$tpls
[
$tab
]))
{
$tab
=
0
;
}
if
(
$tpls
[
$tab
]
==
'share'
)
{
$video_share
=
M
(
'zy_video_share'
)
->
where
(
array
(
'uid'
=>
$this
->
mid
))
->
order
(
'ctime desc'
)
->
findPage
(
10
);
foreach
(
$video_share
[
'data'
]
as
$key
=>
&
$val
)
{
if
(
$val
[
'type'
]
==
0
||
$val
[
'type'
]
==
2
)
{
$val
[
'title'
]
=
M
(
'zy_video'
)
->
where
(
array
(
'id'
=>
$val
[
'video_id'
]))
->
getField
(
'video_title'
);
}
if
(
$val
[
'type'
]
==
1
)
{
$val
[
'title'
]
=
M
(
'album'
)
->
where
(
array
(
'id'
=>
$val
[
'video_id'
]))
->
getField
(
'album_title'
);
}
if
(
$val
[
'type'
]
==
3
)
{
$val
[
'title'
]
=
M
(
'zy_teacher_course'
)
->
where
(
array
(
'course_id'
=>
$val
[
'video_id'
]))
->
getField
(
'course_name'
);
}
}
unset
(
$val
);
$this
->
assign
(
'video_share'
,
$video_share
);
}
else
if
(
$tpls
[
$tab
]
==
'share_money'
)
{
$where
=
"share_id =
{
$this
->
mid
}
AND status = 1 AND is_exchange = 0"
;
$course_share_price
=
M
(
'zy_split_course'
)
->
where
(
$where
)
->
sum
(
'share_sum'
);
$live_share_price
=
M
(
'zy_split_live'
)
->
where
(
$where
)
->
sum
(
'share_sum'
);
$album_share_price
=
M
(
'zy_split_album'
)
->
where
(
$where
)
->
sum
(
'share_sum'
);
$share_price
=
$course_share_price
+
$live_share_price
+
$album_share_price
;
$this
->
assign
(
'share_price'
,
$share_price
);
}
$this
->
assign
(
'tab'
,
$tab
);
$this
->
display
(
$tpls
[
$tab
]);
// $tab = intval($_GET['tab']);
//
// $tpls = array('share', 'share_money');
// if (!isset($tpls[$tab])) {
// $tab = 0;
// }
//
// if ($tpls[$tab] == 'share') {
// $video_share = M('zy_video_share')->where(array('uid' => $this->mid))->order('ctime desc')->findPage(10);
// foreach ($video_share['data'] as $key => &$val) {
// if ($val['type'] == 0 || $val['type'] == 2) {
// $val['title'] = M('zy_video')->where(array('id' => $val['video_id']))->getField('video_title');
// }
// if ($val['type'] == 1) {
// $val['title'] = M('album')->where(array('id' => $val['video_id']))->getField('album_title');
// }
// if ($val['type'] == 3) {
// $val['title'] = M('zy_teacher_course')->where(array('course_id' => $val['video_id']))->getField('course_name');
// }
// }
// unset($val);
// $this->assign('video_share', $video_share);
// } else if ($tpls[$tab] == 'share_money') {
// $where = "share_id = {$this->mid} AND status = 1 AND is_exchange = 0";
//
// $course_share_price = M('zy_split_course')->where($where)->sum('share_sum');
// $live_share_price = M('zy_split_live')->where($where)->sum('share_sum');
// $album_share_price = M('zy_split_album')->where($where)->sum('share_sum');
//
// $share_price = $course_share_price + $live_share_price + $album_share_price;
//
// $this->assign('share_price', $share_price);
// }
// $this->assign('tab', $tab);
// $this->display($tpls[$tab]);
$balancee
=
M
(
'zy_split_balance'
)
->
where
([
'uid'
=>
$this
->
mid
])
->
sum
(
'balance'
);
$this
->
assign
(
'balance'
,
$balancee
);
$this
->
display
(
'share'
);
}
public
function
group
()
...
...
@@ -611,7 +617,7 @@ class HomeAction extends UserAction
//粉丝数
$rs
[
'follower'
]
=
getFollowCount
(
array
(
$rs
[
'fid'
]))[
$rs
[
'fid'
]][
'follower'
];
}
unset
(
$rs
);
unset
(
$rs
);
}
$this
->
assign
(
"data"
,
$data
);
...
...
@@ -709,7 +715,7 @@ class HomeAction extends UserAction
default
:
break
;
}
//自定义日期段查询
if
(
$_GET
[
'learn_time'
])
{
$map
[
'_string'
]
=
"ctime >= "
.
strtotime
(
$_GET
[
'learn_time'
])
.
" AND ctime <= "
.
(
strtotime
(
$_GET
[
'learn_time'
])
+
86400
);
...
...
@@ -732,7 +738,7 @@ class HomeAction extends UserAction
// $val['month_day_ctime'] = date('m月d日', $val['ctime']);
// $val['strtime'] = friendlyDate($val['ctime']);
// $val['learntime'] = secondsToHour($val['learntime']);
// 判断日期显示
$now
=
strtotime
(
date
(
'Y-m-d'
,
$val
[
'ctime'
]));
if
(
$key
>
0
){
...
...
@@ -1156,7 +1162,7 @@ class HomeAction extends UserAction
}
$this
->
display
();
}
/**
...
...
@@ -2241,7 +2247,7 @@ class HomeAction extends UserAction
}
}
}
break
;
default
:
// 练习记录
...
...
@@ -2251,11 +2257,11 @@ class HomeAction extends UserAction
break
;
}
$this
->
assign
(
'list'
,
$list
);
if
(
isAjax
()
&&
$_GET
[
'api'
])
{
echo
json_encode
([
'status'
=>
1
,
'data'
=>
$list
]);
exit
;
}
if
(
isAjax
())
{
$html
=
$this
->
fetch
(
'exams_w3g_ajax'
);
echo
json_encode
([
'status'
=>
1
,
'data'
=>
[
'html'
=>
$html
]]);
exit
;
...
...
apps/home/Tpl/default/Home/share_w3g.html
View file @
9ef15063
...
...
@@ -34,7 +34,7 @@
el
:
"#app"
,
data
:
function
()
{
return
{
money
:
0
money
:
{
$balance
}
}
},
methods
:
{
...
...
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