Commit 2481bf73 authored by xiabin's avatar xiabin

修改支付后的弹窗问题

parent d00b25bc
......@@ -280,13 +280,13 @@ function actionResetPasswordSuccess()
/**
* 设置登录后回调url
* @param $url
* @throws \yii\web\ForbiddenHttpException
*/
public
function actionSetReturnUrl($url)
function actionSetReturnUrl()
{
if (Yii::$app->request->isAjax) {
$url = Yii::$app->request->post('returnUrl');
Yii::$app->user->setReturnUrl($url);
Utils::ajaxResponse(TRUE);
} else {
......
......@@ -199,10 +199,19 @@
window.location.href = url;
},
login(){
var returnUrl = __BASE_URL__ + 'home/video?courseId=' + this.coursewareInfo.course_id + '&pay=1';
var returnUrl = __BASE_URL__ + 'home/video?pay=1&courseId=' + this.coursewareInfo.course_id;
returnUrl = encodeURI(returnUrl);
var url = __BASE_URL__ + 'site/set-return-url?url=' + returnUrl;
$.getJSON(url, function () {
window.location.href = __BASE_URL__ + 'site/login';
$.ajax({
type:'POST',
url:url,
data: {
returnUrl:returnUrl
},
dataType: "json",
success:function () {
window.location.href = __BASE_URL__ + 'site/login';
}
}).error(function () {
layer.alert('设置登录回调url错误', {'icon': 2, 'title': '提示'})
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment