Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
bef32aea
Commit
bef32aea
authored
Oct 17, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用私有空间存储视频
parent
471d059e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
10 deletions
+60
-10
main.php
src/common/config/main.php
+2
-2
MyCourseController.php
src/frontend/controllers/MyCourseController.php
+4
-1
MyIncomeController.php
src/frontend/controllers/MyIncomeController.php
+3
-0
classCenter.php
src/frontend/views/layouts/classCenter.php
+1
-1
index.php
src/frontend/views/my-income/index.php
+50
-5
publish.js
src/frontend/web/js/my-course/publish.js
+0
-1
No files found.
src/common/config/main.php
View file @
bef32aea
...
...
@@ -60,10 +60,10 @@ return [
'url'
=>
'http://dev.qdn.pp.cc/'
],
'video'
=>
[
'bucket'
=>
'pp-classroom-
video
'
,
'bucket'
=>
'pp-classroom-
private
'
,
'fsizeLimit'
=>
pow
(
1024
,
3
)
*
2
,
//2GB
'mimeLimit'
=>
'video/*;flv-application/octet-stream'
,
'url'
=>
'http://oe
8x9mpvz
.bkt.clouddn.com/'
'url'
=>
'http://oe
9d6dr84
.bkt.clouddn.com/'
]
]
]
...
...
src/frontend/controllers/MyCourseController.php
View file @
bef32aea
...
...
@@ -146,6 +146,9 @@ class MyCourseController extends \yii\web\Controller
$videoFile
=
UploadPools
::
getFileInfo
(
$vuid
);
if
(
$videoFile
)
{
/**
* @var $qiniu \common\components\Qiniu;
*/
$qiniu
=
Yii
::
$app
->
qiniu
;
$bucket
=
$qiniu
->
getStorageConfig
(
$videoFile
[
'storage'
],
'bucket'
);
$auth
=
$qiniu
->
getAuthInstance
();
...
...
@@ -161,7 +164,7 @@ class MyCourseController extends \yii\web\Controller
}
//读取视频信息
$avUrl
=
$
videoFile
[
'url'
]
.
'?avinfo'
;
$avUrl
=
$
auth
->
privateDownloadUrl
(
$videoFile
[
'url'
]
.
'?avinfo'
)
;
$response
=
(
new
\GuzzleHttp\Client
())
->
get
(
$avUrl
);
$avInfo
=
$response
->
getBody
();
...
...
src/frontend/controllers/MyIncomeController.php
View file @
bef32aea
...
...
@@ -4,6 +4,9 @@ namespace frontend\controllers;
class
MyIncomeController
extends
\yii\web\Controller
{
public
$layout
=
'classCenter'
;
public
function
actionIndex
()
{
return
$this
->
render
(
'index'
);
...
...
src/frontend/views/layouts/classCenter.php
View file @
bef32aea
...
...
@@ -39,7 +39,7 @@ $this->beginContent('@app/views/layouts/center.php');
<li>
<div
class=
"link"
><i
class=
"icon-bell"
></i>
知识有价
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<li><a
href=
"
#
"
>
购买记录
</a></li>
<li><a
href=
"
/my-income
"
>
购买记录
</a></li>
</ul>
</li>
</ul>
...
...
src/frontend/views/my-income/index.php
View file @
bef32aea
<?php
/* @var $this yii\web\View */
$this
->
title
=
'知识有价'
;
?>
<h1>
my-income/index
</h1>
<div
class=
"con-md-12"
>
<div
class=
"table-responsive table-box"
>
<table
class=
"table table-hover"
>
<thead>
<tr>
<th>
订单
</th>
<th>
会员信息
</th>
<th>
课程
</th>
<th>
价格
</th>
<th>
状态
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
20012313131
<br/>
2016-12-11
</td>
<td>
18788860327 / 百丐洪七公
</td>
<td>
《中国为什么这么久还没有进入社会主义社会》
</td>
<td>
¥123.00
</td>
<td>
审核中
</td>
</tr>
<tr>
<td>
20012313131
<br/>
2016-12-11
</td>
<td>
18788860327 / 百丐洪七公
</td>
<td>
《中国为什么这么久还没有进入社会主义社会》
</td>
<td>
¥123.00
</td>
<td>
审核中
</td>
</tr>
</tbody>
</table>
<p>
You may change the content of this page by modifying
the file
<code>
<?=
__FILE__
;
?>
</code>
.
</p>
<div
class=
"text-center hide"
>
<ul
class=
"pagination pagination-sm"
>
<li><a
href=
"#"
>
«
</a></li>
<li><a
href=
"#"
>
1
</a></li>
<li><a
href=
"#"
>
2
</a></li>
<li><a
href=
"#"
>
3
</a></li>
<li><a
href=
"#"
>
4
</a></li>
<li><a
href=
"#"
>
5
</a></li>
<li><a
href=
"#"
>
»
</a></li>
</ul>
</div>
</div>
</div>
\ No newline at end of file
src/frontend/web/js/my-course/publish.js
View file @
bef32aea
...
...
@@ -148,7 +148,6 @@ var vm = new Vue({
if
(
t
.
status
)
{
location
.
replace
(
"/my-course/result?id="
+
t
.
data
.
course_id
+
"&action=publish"
);
}
else
{
alert
(
t
.
message
);
layer
.
alert
(
t
.
message
,
{
icon
:
5
,
title
:
"提示"
});
}
},
"json"
);
...
...
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