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
875c8343
Commit
875c8343
authored
Oct 17, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加设置回调系统登录Url的功能
parent
4f0ffdfe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
HomeController.php
src/frontend/controllers/HomeController.php
+1
-0
SiteController.php
src/frontend/controllers/SiteController.php
+16
-1
video-intro.vue
src/frontend/web/js/home/components/video-intro.vue
+12
-3
No files found.
src/frontend/controllers/HomeController.php
View file @
875c8343
...
@@ -158,6 +158,7 @@ class HomeController extends \yii\web\Controller
...
@@ -158,6 +158,7 @@ class HomeController extends \yii\web\Controller
}
}
}
}
/**
/**
* 点赞或者取消点赞
* 点赞或者取消点赞
* @param $coursewareId
* @param $coursewareId
...
...
src/frontend/controllers/SiteController.php
View file @
875c8343
...
@@ -317,6 +317,21 @@ class SiteController extends Controller
...
@@ -317,6 +317,21 @@ class SiteController extends Controller
}
}
}
}
/**
* 设置登录后回调url
* @param $url
* @throws \yii\web\ForbiddenHttpException
*/
public
function
actionSetReturnUrl
(
$url
)
{
if
(
Yii
::
$app
->
request
->
isAjax
)
{
Yii
::
$app
->
user
->
setReturnUrl
(
$url
);
Utils
::
ajaxResponse
(
TRUE
);
}
else
{
throw
new
\yii\web\ForbiddenHttpException
(
'非法请求'
);
}
}
/**
/**
* 发送注册短信
* 发送注册短信
* ajax
* ajax
...
@@ -324,7 +339,7 @@ class SiteController extends Controller
...
@@ -324,7 +339,7 @@ class SiteController extends Controller
*/
*/
public
function
actionSendSignupMsg
()
public
function
actionSendSignupMsg
()
{
{
if
(
TRUE
||
Yii
::
$app
->
request
->
isAjax
)
{
if
(
Yii
::
$app
->
request
->
isAjax
)
{
$telephone
=
trim
(
Yii
::
$app
->
request
->
get
(
'telephone'
));
$telephone
=
trim
(
Yii
::
$app
->
request
->
get
(
'telephone'
));
if
(
Utils
::
isTelephone
(
$telephone
))
{
if
(
Utils
::
isTelephone
(
$telephone
))
{
$key
=
self
::
REDIS_SIGNUP_MSG_PREFIX
.
'::'
.
Utils
::
getRealIP
();
$key
=
self
::
REDIS_SIGNUP_MSG_PREFIX
.
'::'
.
Utils
::
getRealIP
();
...
...
src/frontend/web/js/home/components/video-intro.vue
View file @
875c8343
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</div>
</div>
</div>
</div>
<div
v-if=
"coursewareInfo.isGuest"
class=
"comment-login"
>
<div
v-if=
"coursewareInfo.isGuest"
class=
"comment-login"
>
需要
<a
href=
"
"
>
登录
</a>
才能评论
需要
<a
@
click=
"login"
href=
"javascript:;
"
>
登录
</a>
才能评论
</div>
</div>
<div
v-else
class=
"comment-box"
>
<div
v-else
class=
"comment-box"
>
<div
class=
"comment-head"
>
<div
class=
"comment-head"
>
...
@@ -53,7 +53,16 @@
...
@@ -53,7 +53,16 @@
}
}
},
},
methods
:
{
methods
:
{
getCommentlists
(
coursewareId
,
page
,
num
){
login
(){
var
returnUrl
=
__BASE_URL__
+
'home/video?courseId=5'
;
var
url
=
__BASE_URL__
+
'site/set-return-url?url='
+
returnUrl
;
$
.
getJSON
(
url
,
function
()
{
window
.
location
.
href
=
__BASE_URL__
+
'site/login'
;
}).
error
(
function
()
{
layer
.
alert
(
'设置登录回调url错误'
,
{
'icon'
:
2
,
'title'
:
'提示'
})
});
},
getCommentlists
(
coursewareId
,
page
,
num
){
var
self
=
this
;
var
self
=
this
;
var
url
=
__BASE_URL__
+
'home/get-comment-lists?coursewareId='
+
coursewareId
+
'&page='
+
var
url
=
__BASE_URL__
+
'home/get-comment-lists?coursewareId='
+
coursewareId
+
'&page='
+
page
+
'&num='
+
num
;
page
+
'&num='
+
num
;
...
@@ -73,7 +82,7 @@
...
@@ -73,7 +82,7 @@
}
}
},
},
ready
(){
ready
(){
this
.
getCommentlists
(
this
.
coursewareInfo
.
id
,
this
.
page
,
this
.
num
);
this
.
getCommentlists
(
this
.
coursewareInfo
.
id
,
this
.
page
,
this
.
num
);
}
}
}
}
</
script
>
</
script
>
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