mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 04:16:51 +08:00
fix: 课程二维码接口调整逻辑
This commit is contained in:
@@ -1324,24 +1324,24 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
|
|
||||||
boolean isMobile = UserAgentUtil.parse(request.getHeader(Header.USER_AGENT.toString())).isMobile();
|
boolean isMobile = UserAgentUtil.parse(request.getHeader(Header.USER_AGENT.toString())).isMobile();
|
||||||
String baseUrl = isMobile ? h5PageUrl : pcPageUrl;
|
String baseUrl = isMobile ? h5PageUrl : pcPageUrl;
|
||||||
String loginUrl = isMobile ? h5LoginUrl : pcLoginUrl;
|
// String loginUrl = isMobile ? h5LoginUrl : pcLoginUrl;
|
||||||
|
//
|
||||||
|
// CurrentUser currentUser;
|
||||||
|
// try {
|
||||||
|
// currentUser = getCurrent();
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// log.warn("获取当前用户信息异常,跳转至登录页。课程ID: {}", courseId, e);
|
||||||
|
// response.sendRedirect(loginUrl);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (currentUser == null) {
|
||||||
|
// log.info("用户未登录,跳转至登录页。课程ID: {}", courseId);
|
||||||
|
// response.sendRedirect(loginUrl);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
CurrentUser currentUser;
|
log.info("跳转到课程详情页,课程ID: {}", courseId);
|
||||||
try {
|
|
||||||
currentUser = getCurrent();
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.warn("获取当前用户信息异常,跳转至登录页。课程ID: {}", courseId, e);
|
|
||||||
response.sendRedirect(loginUrl);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentUser == null) {
|
|
||||||
log.info("用户未登录,跳转至登录页。课程ID: {}", courseId);
|
|
||||||
response.sendRedirect(loginUrl);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
log.info("跳转到课程详情页,课程ID: {}, 用户ID: {}", courseId, currentUser.getAccountId());
|
|
||||||
response.sendRedirect(baseUrl + courseId);
|
response.sendRedirect(baseUrl + courseId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user