feat(training): 新增培训中心学习答题演示及成绩回顾
新增首页和个人页培训入口,支持课程阅读、答题卡、未交卷答案恢复、成绩记录及重考。 对齐小程序的培训首页与成绩页,答案解析默认收起并提供返回对应课程的入口。 开发版使用隔离的本机演示数据,正式培训服务尚未接入。
This commit is contained in:
@@ -21,6 +21,7 @@ enum HomeMenuCatalog {
|
||||
HomeMenuItem(uri: "schedule_management", title: "日程管理", iconName: "calendar"),
|
||||
HomeMenuItem(uri: "system_settings", title: "设置中心", iconName: "gearshape.fill"),
|
||||
HomeMenuItem(uri: "message_center", title: "消息中心", iconName: "bell.fill"),
|
||||
HomeMenuItem(uri: "/training", title: "培训中心", iconName: "graduationcap.fill"),
|
||||
HomeMenuItem(uri: "checkin_points", title: "打卡点管理", iconName: "home_menu_punch_point"),
|
||||
HomeMenuItem(uri: "sample_management", title: "样片管理", iconName: "sample_ic_home_menu_route"),
|
||||
HomeMenuItem(uri: "live_stream_management", title: "直播管理", iconName: "dot.radiowaves.left.and.right"),
|
||||
|
||||
@@ -39,6 +39,8 @@ enum HomeRouteHandler {
|
||||
viewController.navigationController?.pushViewController(SettingViewController(), animated: true)
|
||||
case "message_center":
|
||||
viewController.navigationController?.pushViewController(MessageCenterViewController(), animated: true)
|
||||
case "/training":
|
||||
viewController.navigationController?.pushViewController(TrainingCenterViewController(), animated: true)
|
||||
case "space_settings":
|
||||
viewController.navigationController?.pushViewController(ProfileSpaceSettingsViewController(), animated: true)
|
||||
case "cloud_management":
|
||||
|
||||
@@ -293,12 +293,19 @@ final class HomeViewModel {
|
||||
commonMenuStore.saveCommonURIs(defaultURIs, accountScope: accountScope, roleCode: roleCode)
|
||||
}
|
||||
|
||||
commonMenus = commonMenuStore.commonMenus(
|
||||
var resolvedMenus = commonMenuStore.commonMenus(
|
||||
from: allMenus,
|
||||
permissions: permissions,
|
||||
accountScope: accountScope,
|
||||
roleCode: roleCode
|
||||
)
|
||||
|
||||
// 所有角色均可进入个人培训;培训名单仍由服务端授权。
|
||||
if let entry = HomeMenuCatalog.item(for: "/training"),
|
||||
!resolvedMenus.contains(where: { $0.uri == entry.uri }) {
|
||||
resolvedMenus.append(entry)
|
||||
}
|
||||
commonMenus = resolvedMenus
|
||||
}
|
||||
|
||||
func hidePermissionDialog() {
|
||||
|
||||
Reference in New Issue
Block a user