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
247ca615
Commit
247ca615
authored
Oct 17, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
七牛回调地址改为根据环境判断
加入我的会员页面 订单页面加入权限控制
parent
2b6e0e85
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
11 deletions
+96
-11
Qiniu.php
src/common/components/Qiniu.php
+4
-2
MyIncomeController.php
src/frontend/controllers/MyIncomeController.php
+22
-0
MyMemberController.php
src/frontend/controllers/MyMemberController.php
+3
-0
QiniuCallbackController.php
src/frontend/controllers/QiniuCallbackController.php
+3
-2
classCenter.php
src/frontend/views/layouts/classCenter.php
+1
-1
index.php
src/frontend/views/my-course/index.php
+4
-1
index.php
src/frontend/views/my-member/index.php
+59
-5
No files found.
src/common/components/Qiniu.php
View file @
247ca615
...
@@ -134,14 +134,16 @@ class Qiniu extends Object
...
@@ -134,14 +134,16 @@ class Qiniu extends Object
$config
=
$this
->
storages
[
$storage
];
$config
=
$this
->
storages
[
$storage
];
$callbackUrl
=
Url
::
to
([
'qiniu-callback/rem-upload'
],
true
);
$callbackUrl
=
YII_ENV
==
'dev'
?
'http://t.pp.cc/tmp/qiniu_callback.php'
:
Url
::
to
([
'qiniu-callback/rem-upload'
],
true
);
$policy
=
[
$policy
=
[
'returnBody'
=>
'{"key":$(key)}'
,
'returnBody'
=>
'{"key":$(key)}'
,
'saveKey'
=>
$filename
,
'saveKey'
=>
$filename
,
'fsizeLimit'
=>
$config
[
'fsizeLimit'
],
'fsizeLimit'
=>
$config
[
'fsizeLimit'
],
'mimeLimit'
=>
$config
[
'mimeLimit'
],
'mimeLimit'
=>
$config
[
'mimeLimit'
],
'callbackUrl'
=>
'http://t.pp.cc/tmp/qiniu_callback.php'
,
'callbackUrl'
=>
$callbackUrl
,
'callbackBody'
=>
'key=$(key)&storage='
.
$storage
.
'&bucket='
.
$config
[
'bucket'
]
'callbackBody'
=>
'key=$(key)&storage='
.
$storage
.
'&bucket='
.
$config
[
'bucket'
]
.
'&uuid=$(uuid)&time=$(year)-$(mon)-$(day)+$(hour)%3A$(min)%3A$(sec)&fsize=$(fsize)'
.
'&uuid=$(uuid)&time=$(year)-$(mon)-$(day)+$(hour)%3A$(min)%3A$(sec)&fsize=$(fsize)'
.
'&w=$(imageInfo.width)&h=$(imageInfo.height)'
.
'&w=$(imageInfo.width)&h=$(imageInfo.height)'
...
...
src/frontend/controllers/MyIncomeController.php
View file @
247ca615
...
@@ -3,13 +3,35 @@
...
@@ -3,13 +3,35 @@
namespace
frontend\controllers
;
namespace
frontend\controllers
;
use
common\models\Income
;
use
common\models\Income
;
use
frontend\components\ClassesFilter
;
use
Yii
;
use
Yii
;
use
yii\filters\AccessControl
;
class
MyIncomeController
extends
\yii\web\Controller
class
MyIncomeController
extends
\yii\web\Controller
{
{
public
$layout
=
'classCenter'
;
public
$layout
=
'classCenter'
;
/**
* @inheritdoc
*/
public
function
behaviors
()
{
return
[
'access'
=>
[
'class'
=>
AccessControl
::
className
(),
//'only' => ['index', 'publish', 'submit'],
'rules'
=>
[
[
'allow'
=>
true
,
'roles'
=>
[
'@'
]
]
]
],
'classes'
=>
ClassesFilter
::
className
()
];
}
/**
/**
* 售课记录
* 售课记录
* @return string
* @return string
...
...
src/frontend/controllers/MyMemberController.php
View file @
247ca615
...
@@ -4,6 +4,9 @@ namespace frontend\controllers;
...
@@ -4,6 +4,9 @@ namespace frontend\controllers;
class
MyMemberController
extends
\yii\web\Controller
class
MyMemberController
extends
\yii\web\Controller
{
{
public
$layout
=
'classCenter'
;
public
function
actionIndex
()
public
function
actionIndex
()
{
{
return
$this
->
render
(
'index'
);
return
$this
->
render
(
'index'
);
...
...
src/frontend/controllers/QiniuCallbackController.php
View file @
247ca615
...
@@ -31,9 +31,10 @@ class QiniuCallbackController extends \yii\web\Controller
...
@@ -31,9 +31,10 @@ class QiniuCallbackController extends \yii\web\Controller
//验证回调请求
//验证回调请求
$requestBody
=
file_get_contents
(
'php://input'
);
$requestBody
=
file_get_contents
(
'php://input'
);
$authorization
=
isset
(
$_SERVER
[
'HTTP_AUTHORIZATION'
])
?
$_SERVER
[
'HTTP_AUTHORIZATION'
]
:
''
;
$authorization
=
isset
(
$_SERVER
[
'HTTP_AUTHORIZATION'
])
?
$_SERVER
[
'HTTP_AUTHORIZATION'
]
:
''
;
$currentUrl
=
Yii
::
$app
->
request
->
hostInfo
.
Yii
::
$app
->
request
->
getUrl
();
$currentUrl
=
'http://t.pp.cc/tmp/qiniu_callback.php'
;
$currentUrl
=
YII_ENV
==
'dev'
?
'http://t.pp.cc/tmp/qiniu_callback.php'
:
Yii
::
$app
->
request
->
hostInfo
.
Yii
::
$app
->
request
->
getUrl
();
if
(
!
$auth
->
verifyCallback
(
$_SERVER
[
'CONTENT_TYPE'
],
$authorization
,
$currentUrl
,
$requestBody
))
{
if
(
!
$auth
->
verifyCallback
(
$_SERVER
[
'CONTENT_TYPE'
],
$authorization
,
$currentUrl
,
$requestBody
))
{
return
[
'error'
=>
'回调验证失败!'
];
return
[
'error'
=>
'回调验证失败!'
];
...
...
src/frontend/views/layouts/classCenter.php
View file @
247ca615
...
@@ -33,7 +33,7 @@ $this->beginContent('@app/views/layouts/center.php');
...
@@ -33,7 +33,7 @@ $this->beginContent('@app/views/layouts/center.php');
<li>
<li>
<div
class=
"link"
><i
class=
"icon-fingerprint"
></i>
我的会员
<i
class=
"icon-navigate_next"
></i></div>
<div
class=
"link"
><i
class=
"icon-fingerprint"
></i>
我的会员
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<ul
class=
"submenu"
>
<li><a
href=
"
#
"
>
会员列表
</a></li>
<li><a
href=
"
/my-member
"
>
会员列表
</a></li>
</ul>
</ul>
</li>
</li>
<li>
<li>
...
...
src/frontend/views/my-course/index.php
View file @
247ca615
...
@@ -36,4 +36,7 @@ $qiniu = \Yii::$app->qiniu;
...
@@ -36,4 +36,7 @@ $qiniu = \Yii::$app->qiniu;
</div>
</div>
<?php
}
?>
<?php
}
?>
</div>
</div>
<?=
LinkPager
::
widget
([
'pagination'
=>
$pagination
])
?>
\ No newline at end of file
<div
class=
"text-center"
>
<?=
LinkPager
::
widget
([
'pagination'
=>
$pagination
])
?>
</div>
src/frontend/views/my-member/index.php
View file @
247ca615
<?php
<?php
/* @var $this yii\web\View */
/* @var $this yii\web\View */
?>
?>
<h1>
my-member/index
</h1>
<div
class=
"vip-top"
>
<div
class=
"col-md-6"
>
<div
class=
"reg-vip-box"
>
<b>
47
</b>
<span>
全部会员
</span>
<i
class=
"icon-verified_user"
></i>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"money-vip-box"
>
<b>
23
</b>
<span>
付费会员
</span>
<i
class=
"icon-heart"
></i>
</div>
</div>
</div>
<p>
<div
class=
"con-md-12"
>
You may change the content of this page by modifying
<div
class=
"table-responsive table-box"
>
the file
<code>
<?=
__FILE__
;
?>
</code>
.
<table
class=
"table table-hover"
>
</p>
<thead>
<tr>
<th>
注册时间
</th>
<th>
会员信息
</th>
<th>
来自
</th>
<th>
首次购买
</th>
<th>
累计消费
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
2016-12-11
</td>
<td>
18788860327 / 百丐洪七公
</td>
<td>
推广
</td>
<td>
《中国为什么这么久还没有进入社会主义社会》
</td>
<td>
¥123.00
</td>
</tr>
<tr>
<td>
2016-12-11
</td>
<td>
18788860327 / 百丐洪七公
</td>
<td>
推广
</td>
<td>
《中国为什么这么久还没有进入社会主义社会》
</td>
<td>
¥123.00
</td>
</tr>
</tbody>
</table>
<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
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