| | |
| | | <meta charset="UTF-8"> |
| | | <link rel="icon" href="/favicon.ico"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>Vite App</title> |
| | | <title>协和云课堂</title> |
| | | </head> |
| | | <body> |
| | | <div id="app"></div> |
New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16.002" viewBox="0 0 16 16.002"> |
| | | <path class="a" |
| | | d="M62.384,58.423a1.166,1.166,0,0,1,1.469,0l6.818,5.5a1.22,1.22,0,0,1,.193,1.692,1.178,1.178,0,0,1-.644.423l-.063.014v6.164a1.937,1.937,0,0,1-1.748,1.941l-.081.006-.084,0H57.994A1.932,1.932,0,0,1,56.083,72.3V66.052l-.042-.008a1.2,1.2,0,0,1-.919-1.108l0-.068a1.216,1.216,0,0,1,.449-.945Zm.8.853a.1.1,0,0,0-.124,0l-6.811,5.509a.1.1,0,0,0-.038.08.1.1,0,0,0,.1.1h.321a.547.547,0,0,1,.541.552v6.75a.838.838,0,0,0,.828.8h10.28a.839.839,0,0,0,.786-.846V65.521a.547.547,0,0,1,.541-.553h.321a.1.1,0,0,0,.078-.038.106.106,0,0,0-.016-.144ZM65.535,68.9a.545.545,0,0,1-.064.769,3.18,3.18,0,0,1-4.343,0,.546.546,0,0,1,.705-.833,2.092,2.092,0,0,0,2.931,0,.545.545,0,0,1,.769.063Z" |
| | | transform="translate(-55.12 -58.163)" /> |
| | | </svg> |
New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" width="16.2" height="17.923" viewBox="0 0 16.2 17.923"><defs><style>.a{fill:#111;stroke:#111;stroke-width:0.2px;}</style></defs><path class="a" d="M122.177,70.735h-3.368a.421.421,0,0,0-.42.42v8.233a.418.418,0,0,0,.122.3l1.983,2,1.983-2a.418.418,0,0,0,.122-.3V71.157A.424.424,0,0,0,122.177,70.735Zm-.42,8.4-1.263,1.281-1.263-1.281V74.524h2.526Zm0-5.454h-2.526V71.577h2.526Zm0-9.683H107.443a.842.842,0,0,0-.843.843v16a.842.842,0,0,0,.843.843h9.683a.42.42,0,1,0,0-.841h-9.261a.421.421,0,0,1-.42-.42V65.263a.421.421,0,0,1,.42-.42h13.472a.421.421,0,0,1,.42.42v3.368a.42.42,0,0,0,.841,0V64.843A.842.842,0,0,0,121.757,64Zm-6.737,8.84a.421.421,0,0,0-.42-.42h-4.209a.42.42,0,1,0,0,.841H114.6A.419.419,0,0,0,115.02,72.84Zm1.685-3.368a.422.422,0,0,0-.42-.42h-5.894a.42.42,0,1,0,0,.841h5.894A.419.419,0,0,0,116.705,69.472Zm-6.315,6.315a.42.42,0,1,0,0,.841h2.526a.42.42,0,1,0,0-.841Z" transform="translate(-106.5 -63.9)"/></svg> |
New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" width="16.2" height="16.2" viewBox="0 0 16.2 16.2"><defs><style>.a{fill:#111;stroke:#111;stroke-width:0.2px;}</style></defs><path class="a" d="M76.4,73.6H67.6a.4.4,0,0,0,0,.8h8.8a.4.4,0,0,0,0-.8Zm3.2-6.4a.4.4,0,0,0,.4-.4v-2a.8.8,0,0,0-.8-.8H64.8a.8.8,0,0,0-.8.8V79.2a.8.8,0,0,0,.8.8H79.2a.8.8,0,0,0,.8-.8V70a.4.4,0,1,0-.8,0v8.8a.4.4,0,0,1-.4.4H65.2a.4.4,0,0,1-.4-.4V65.2a.4.4,0,0,1,.4-.4H78.8a.4.4,0,0,1,.4.4v1.6A.4.4,0,0,0,79.6,67.2ZM67.463,72.107a.4.4,0,0,0,.512-.239l.366-1h1.527l.366,1a.4.4,0,1,0,.752-.273L69.48,67.461a.063.063,0,0,0-.009-.014.442.442,0,0,0-.048-.079.347.347,0,0,0-.037-.052.31.31,0,0,0-.068-.048.428.428,0,0,0-.061-.038.084.084,0,0,1-.016-.011.336.336,0,0,0-.059-.009.573.573,0,0,0-.077-.012.363.363,0,0,0-.077.012.336.336,0,0,0-.059.009c-.007,0-.011.007-.016.011a.346.346,0,0,0-.061.038.464.464,0,0,0-.068.048.385.385,0,0,0-.037.052.442.442,0,0,0-.048.079c0,.005-.007.009-.009.014l-1.505,4.134a.4.4,0,0,0,.238.513ZM69.1,68.768l.471,1.3H68.63ZM76.4,76H67.6a.4.4,0,0,0,0,.8h8.8a.4.4,0,0,0,0-.8Zm-3.2-8.8a.4.4,0,0,0-.4.4v.8H72a.4.4,0,0,0,0,.8h.8V70a.4.4,0,0,0,.8,0v-.8h.8a.4.4,0,0,0,0-.8h-.8v-.8A.4.4,0,0,0,73.2,67.2Z" transform="translate(-63.9 -63.9)"/></svg> |
New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" width="16" height="15.97" viewBox="0 0 16 15.97"> |
| | | <g transform="translate(-58.026 -58.026)"> |
| | | <path class="a" |
| | | d="M66.026,74a8.075,8.075,0,0,1-3.049-.6,7.7,7.7,0,0,1-1.3-.694,15.665,15.665,0,0,0-2.294.513.505.505,0,0,1-.453-.121.483.483,0,0,1-.121-.453,11.77,11.77,0,0,0,.513-2.294,6.444,6.444,0,0,1-.694-1.268,8,8,0,1,1,15.4-3.049,7.988,7.988,0,0,1-8,7.97Zm-4.317-2.2a.767.767,0,0,1,.362.091,6.09,6.09,0,0,0,1.238.664A7.093,7.093,0,1,0,66.026,58.9,7.125,7.125,0,0,0,58.932,66a7.109,7.109,0,0,0,1.208,3.955c.121.181.242.332-.242,2.2a8.636,8.636,0,0,1,1.811-.362Z" /> |
| | | <path class="a" d="M332.766,395.146h-6.34a.453.453,0,0,1,0-.906h6.34a.453.453,0,0,1,0,.906Z" |
| | | transform="translate(-263.207 -330.267)" /> |
| | | <path class="a" |
| | | d="M375.27,315.381h-.091a.426.426,0,0,1-.362-.513l1.087-6.249a.444.444,0,0,1,.875.151l-1.057,6.219A.433.433,0,0,1,375.27,315.381Zm2.657,0h-.091a.426.426,0,0,1-.362-.513l1.087-6.249a.444.444,0,0,1,.875.151l-1.087,6.249A.423.423,0,0,1,377.927,315.381Z" |
| | | transform="translate(-311.176 -245.793)" /> |
| | | <path class="a" d="M290.1,569.226h-6.34a.453.453,0,1,1,0-.906h6.34a.453.453,0,0,1,0,.906Z" |
| | | transform="translate(-221.296 -501.268)" /> |
| | | </g> |
| | | </svg> |
New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" width="16.2" height="16.2" viewBox="0 0 16.2 16.2"> |
| | | <path class="a" |
| | | d="M79.6,67.2a.4.4,0,0,0,.4-.4v-2a.8.8,0,0,0-.8-.8H64.8a.8.8,0,0,0-.8.8V79.2a.8.8,0,0,0,.8.8H79.2a.8.8,0,0,0,.8-.8V70a.4.4,0,1,0-.8,0v8.8a.4.4,0,0,1-.4.4H65.2a.4.4,0,0,1-.4-.4V65.2a.4.4,0,0,1,.4-.4H78.8a.4.4,0,0,1,.4.4v1.6A.4.4,0,0,0,79.6,67.2ZM76,72.8H68a.4.4,0,1,0,0,.8h8a.4.4,0,1,0,0-.8Zm0-3.2H73.959a2,2,0,0,0-3.918,0H68a.4.4,0,1,0,0,.8h2.8V70a1.2,1.2,0,1,1,2.4,0v.4H76a.4.4,0,1,0,0-.8Zm0,6H68a.4.4,0,1,0,0,.8h8a.4.4,0,0,0,0-.8Z" |
| | | transform="translate(-63.9 -63.9)" /> |
| | | </svg> |
New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" width="16.2" height="17.885" viewBox="0 0 16.2 17.885"> |
| | | <g transform="translate(-106.5 -63.9)"> |
| | | <path class="a" |
| | | d="M414.049,453.35a2.947,2.947,0,1,0-3.4,0,5.05,5.05,0,0,0-3.329,4.291.424.424,0,0,0,.42.464.413.413,0,0,0,.416-.369,4.21,4.21,0,0,1,8.388,0,.413.413,0,0,0,.416.369.423.423,0,0,0,.42-.464A5.05,5.05,0,0,0,414.049,453.35Zm-1.7-.3a2.106,2.106,0,1,1,2.106-2.106A2.109,2.109,0,0,1,412.348,453.052Z" |
| | | transform="translate(-294.781 -376.422)" /> |
| | | <path class="a" |
| | | d="M121.759,64H107.443a.842.842,0,0,0-.843.843v16a.842.842,0,0,0,.843.843h2.947a.42.42,0,0,0,0-.841h-2.526a.421.421,0,0,1-.42-.42V65.263a.421.421,0,0,1,.42-.42h13.473a.421.421,0,0,1,.42.42v5.052a.42.42,0,0,0,.841,0V64.843a.839.839,0,0,0-.839-.843Z" /> |
| | | <path class="a" |
| | | d="M256.42,235.541h9.262a.42.42,0,1,0,0-.841H256.42a.42.42,0,1,0,0,.841Zm0,2.526h3.369a.42.42,0,1,0,0-.841H256.42a.42.42,0,1,0,0,.841Z" |
| | | transform="translate(-146.451 -167.331)" /> |
| | | </g> |
| | | </svg> |
New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" width="16.326" height="16.2" viewBox="0 0 16.326 16.2"> |
| | | <g transform="translate(-63.9 -63.9)"> |
| | | <path class="a" |
| | | d="M485.31,298.51a2,2,0,0,0-2.829,0l-4.525,4.527a2,2,0,0,0-.254,2.518l-.311.311a.4.4,0,0,0,.566.566l.311-.311a2,2,0,0,0,2.518-.254l4.525-4.525A2.007,2.007,0,0,0,485.31,298.51Zm-5.091,6.789a1.2,1.2,0,0,1-1.7-1.7l2.263-2.263,1.7,1.7Zm4.525-4.525-1.7,1.7-1.7-1.7,1.7-1.7a1.2,1.2,0,1,1,1.7,1.7Z" |
| | | transform="translate(-405.895 -229.748)" /> |
| | | <path class="a" |
| | | d="M76,78.8a.4.4,0,0,1-.4.4H65.2a.4.4,0,0,1-.4-.4V65.2a.4.4,0,0,1,.4-.4H75.6a.4.4,0,0,1,.4.4V68l.8-.8V64.8A.8.8,0,0,0,76,64H64.8a.8.8,0,0,0-.8.8V79.2a.8.8,0,0,0,.8.8H76a.8.8,0,0,0,.8-.8V76l-.8.8Z" /> |
| | | <path class="a" |
| | | d="M204.8,266a.4.4,0,0,0-.4-.4h-5.6a.4.4,0,1,0,0,.8h5.6A.4.4,0,0,0,204.8,266Zm-6,2a.4.4,0,1,0,0,.8H202a.4.4,0,0,0,0-.8Z" |
| | | transform="translate(-132 -198)" /> |
| | | </g> |
| | | </svg> |
New file |
| | |
| | | <svg xmlns="http://www.w3.org/2000/svg" width="16.2" height="16.2" viewBox="0 0 16.2 16.2"> |
| | | <path class="a" |
| | | d="M69.2,67.2a.4.4,0,0,0,.4-.4V64.4a.4.4,0,1,0-.8,0v2.4A.4.4,0,0,0,69.2,67.2Zm2.8,0a.4.4,0,0,0,.4-.4V64.4a.4.4,0,1,0-.8,0v2.4A.4.4,0,0,0,72,67.2Zm2.8,0a.4.4,0,0,0,.4-.4V64.4a.4.4,0,0,0-.8,0v2.4A.4.4,0,0,0,74.8,67.2Zm4.4-2H76.8a.4.4,0,1,0,0,.8h2a.4.4,0,0,1,.4.4v2.4H64.8V66.4a.4.4,0,0,1,.4-.4h2a.4.4,0,0,0,0-.8H64.8a.8.8,0,0,0-.8.8V79.2a.8.8,0,0,0,.8.8H79.2a.8.8,0,0,0,.8-.8V66A.8.8,0,0,0,79.2,65.2Zm0,13.6a.4.4,0,0,1-.4.4H65.2a.4.4,0,0,1-.4-.4V69.6H79.2Zm-11.466-2a.4.4,0,0,0,.282-.118l2.941-2.941,2.12,1.766a.4.4,0,0,0,.543-.029l2.934-3.034a.4.4,0,1,0-.575-.557L73.3,74.655l-2.114-1.762a.4.4,0,0,0-.539.025l-3.2,3.2a.4.4,0,0,0,0,.566A.4.4,0,0,0,67.734,76.8Z" |
| | | transform="translate(-63.9 -63.9)" /> |
| | | </svg> |
| | |
| | | /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ // 电话号正则 |
| | | export const reg_telphone = /^0\d{2}-\d{8}$|^0\d{3}-\d{7}$/ //座机号正则 |
| | | |
| | | // 自定义任务类型 |
| | | const taskType = { |
| | | teachingPlan: 'TeachingPlan', // 教学计划 |
| | | homeWork: 'HomeWork', // 作业 |
| | | } |
| | | |
| | | // refcode |
| | | const refCode = { |
| | | // 收藏资源库 |
| | |
| | | recommendAudioStore: 'jilin_audiosLibrary\\jilin_recommendedAudio', |
| | | recommendVideoStore: 'jilin_videosLibrary\\jilin_recommendedVideo', |
| | | recommendModelStore: 'jilin_modelsLibrary\\jilin_recommendedModel', |
| | | // 开课 |
| | | message: 'MessageCode', // 消息、通知 |
| | | talk: 'TalkCode', // 话题 |
| | | teachingPlan: 'teachingPlan', // 教学计划类型 |
| | | homework: 'homework', // 新建作业类型 |
| | | teachInteraction: 'TeachInteraction', //教学互动 |
| | | } |
| | | |
| | | const wxLogin = { |
| | |
| | | refCode, |
| | | wxLogin, |
| | | reg_telphone, |
| | | taskType, |
| | | } |
| | | export default config |
| | |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | |
| | | //创建课程订单 |
| | | createCourseOrder(data) { |
| | | return request({ |
| | |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 为班级新建任务 |
| | | newTask(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiNewTask', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 更新任务 |
| | | updateTask(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiUpdateTask', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 获取班级任务列表 |
| | | getTaskList(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiGetTaskList', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 删除班级任务列表 |
| | | delTask(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiDelTask', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 为任务新建资源 |
| | | newTaskCmsItem(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiNewTaskCmsItem', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 获取任务下的资源列表 |
| | | getTaskCmsItem(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiGetTaskCmsItem', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 删除任务下的资源列表 |
| | | removeTaskCmsItemList(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiRemoveTaskCmsItemList', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 为任务添加资源 |
| | | addTaskCmsItemList(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiAddTaskCmsItemList', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 获取任务提交列表 |
| | | getTaskSubmitList(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiGetTaskSubmitList', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 获取未提交任务列表 |
| | | getUnSubmitList(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiGetUnSubmitList', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 为任务新建提交 |
| | | newTaskSubmit(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiNewTaskSubmit', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 更新任务提交 |
| | | updateTaskSubmit(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiUpdateTaskSubmit', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 获取任务提交统计 |
| | | getTaskStatistics(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiGetTaskStatistics', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 获取用户提交统计列表 |
| | | getUserTaskList(data) { |
| | | return request({ |
| | | url: '/edu/api/ApiGetUserTaskList', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | } |
| | | |
| | | export default eduApi |
| | |
| | | import request from "@/plugin/axios/index.ts"; |
| | | import { tokenKey } from "@/assets/js/config.js"; |
| | | import toolClass from "@/assets/js/toolClass.js"; |
| | | import request from '@/plugin/axios/index.ts' |
| | | import { tokenKey } from '@/assets/js/config.js' |
| | | import toolClass from '@/assets/js/toolClass.js' |
| | | const ugcApi = { |
| | | // 获取商品点赞Topic |
| | | getProductLikesTopic(data) { |
| | | return request({ |
| | | url: localStorage.getItem(tokenKey) |
| | | ? "/ugc/api/ApiAppUserGetProductLikesTopic" |
| | | : "/ugc/api/ApiGetProductLikesTopic", |
| | | method: "post", |
| | | ? '/ugc/api/ApiAppUserGetProductLikesTopic' |
| | | : '/ugc/api/ApiGetProductLikesTopic', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | // 获取商品评论Topic |
| | | getProductCommentTopic(data) { |
| | | return request({ |
| | | url: localStorage.getItem(tokenKey) |
| | | ? "/ugc/api/ApiAppUserGetProductCommentTopic" |
| | | : "/ugc/api/ApiGetProductCommentTopic", |
| | | method: "post", |
| | | ? '/ugc/api/ApiAppUserGetProductCommentTopic' |
| | | : '/ugc/api/ApiGetProductCommentTopic', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | // 获取MessageList |
| | | getTopicMessageList(data) { |
| | | return request({ |
| | | url: localStorage.getItem(tokenKey) |
| | | ? "/ugc/api/ApiAppUserGetTopicMessageList" |
| | | : "/ugc/api/ApiGetTopicMessageList", |
| | | method: "post", |
| | | ? '/ugc/api/ApiAppUserGetTopicMessageList' |
| | | : '/ugc/api/ApiGetTopicMessageList', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | // 获取子MessageList |
| | | getTopicMessageSubList(data) { |
| | | return request({ |
| | | url: '/ugc/api/ApiAppUserGetSubMessageList', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | |
| | | // 获取MessageList子message |
| | | getChildTopicMessageList(data) { |
| | | return request({ |
| | | url: '/ugc/api/ApiAppUserGetSubMessageList', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | // 用户根据消息类型获取列表 |
| | | getMessageList(data) { |
| | | return request({ |
| | | url: "/ugc/api/ApiGetMessageList", |
| | | method: "post", |
| | | url: '/ugc/api/ApiGetMessageList', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | // 新建Message |
| | | newTopicMessage(data) { |
| | | return request({ |
| | | url: "/ugc/api/ApiNewTopicMessage", |
| | | method: "post", |
| | | url: '/ugc/api/ApiNewTopicMessage', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | // 删除Message |
| | | delTopicMessage(data) { |
| | | return request({ |
| | | url: "/ugc/api/ApiDelTopicMessage", |
| | | method: "post", |
| | | url: '/ugc/api/ApiDelTopicMessage', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | }) |
| | | }, |
| | | // 更新message |
| | | updateTopicMessage(data) { |
| | | return request({ |
| | | url:'/ugc/api/ApiUpdateTopicMessage', |
| | | method:'post', |
| | | data |
| | | url: '/ugc/api/ApiUpdateTopicMessage', |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | }, |
| | | // 获取cms评论 |
| | | getCmsItemCommentTopic(data) { |
| | | return request({ |
| | | url: "/ugc/api/ApiGetCmsItemCommentTopic", |
| | | method: "post", |
| | | url: '/ugc/api/ApiGetCmsItemCommentTopic', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | }) |
| | | }, |
| | | // 获取用户提交的教学资源 |
| | | getProductUserSubmitTopic(data) { |
| | | return request({ |
| | | url: "/ugc/api/ApiGetProductUserSubmitTopic", |
| | | method: "post", |
| | | url: '/ugc/api/ApiGetProductUserSubmitTopic', |
| | | method: 'post', |
| | | data, |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | //更新TOPICMESSAGE |
| | |
| | | // data, |
| | | // }); |
| | | // }, |
| | | }; |
| | | } |
| | | |
| | | export default ugcApi; |
| | | export default ugcApi |
| | |
| | | } |
| | | |
| | | /* 基础样式 */ |
| | | *{ |
| | | * { |
| | | outline: none; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .titleBox { |
| | | height: 60px; |
| | | background: #d8f7e6; |
| | | line-height: 60px; |
| | | padding: 0 40px; |
| | | padding: 8px 10px; |
| | | font-weight: 700; |
| | | color: #00873c; |
| | | font-size: 18px; |
| | | font-size: 14px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /* 富文本容器,保留富文本默认样式,所见即所得 */ |
| | |
| | | color: #00873C !important; |
| | | } */ |
| | | |
| | | .el-input-group__append, .el-input-group__prepend { |
| | | .el-input-group__append, |
| | | .el-input-group__prepend { |
| | | /* vertical-align: initial !important; */ |
| | | /* align-items: stretch !important; */ |
| | | } |
| | |
| | | } |
| | | .wait, |
| | | .main { |
| | | color: #ff6d00; |
| | | color: #019e58; |
| | | } |
| | | .grey { |
| | | color: #949494; |
| | |
| | | <RouterView /> |
| | | <Footer class="footer"></Footer> |
| | | </div> |
| | | <login ref="loginRef"></login> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import Header from './components/headerPage.vue' |
| | | import Footer from './components/footerPage.vue' |
| | | import login from './components/login.vue' |
| | | import { provide, ref } from 'vue' |
| | | |
| | | const logIn = () => { |
| | | loginRef.value.logIn() |
| | | } |
| | | const loginRef = ref() |
| | | provide('logIn', logIn) |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import login from './login.vue' |
| | | import { onMounted, ref } from 'vue' |
| | | import { onMounted, provide, ref } from 'vue' |
| | | import { Search } from '@element-plus/icons-vue' |
| | | import { useUserStore } from '@/store' |
| | | import { useRouter } from 'vue-router' |
| | |
| | | validator: (_, value, callback) => { |
| | | if ( |
| | | !/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test( |
| | | value |
| | | value, |
| | | ) |
| | | ) { |
| | | callback('请输入11位电话号码'); |
| | | callback('请输入11位电话号码') |
| | | } else { |
| | | callback(); |
| | | callback() |
| | | } |
| | | }, |
| | | }, |
| | | ]" |
| | | prop="telNumber" |
| | | > |
| | | <el-input |
| | | v-model="passFormData.telNumber" |
| | | placeholder="请输入手机号" |
| | | size="large" |
| | | > |
| | | <el-input v-model="passFormData.telNumber" placeholder="请输入手机号" size="large"> |
| | | <template #prepend> |
| | | <el-select |
| | | v-model="select" |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button class="yanzhengBtn" @click="sliderImgDialogVisable = true" |
| | | >验证</el-button |
| | | > |
| | | <el-button class="yanzhengBtn" @click="sliderImgDialogVisable = true">验证</el-button> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="signUpWay === 'authSignUp'" |
| | |
| | | ]" |
| | | prop="telCode" |
| | | > |
| | | <el-input |
| | | v-model="passFormData.telCode" |
| | | placeholder="请输入验证码" |
| | | size="large" |
| | | /> |
| | | <el-input v-model="passFormData.telCode" placeholder="请输入验证码" size="large" /> |
| | | <el-button |
| | | type="primary" |
| | | class="codeBtn" |
| | | :disabled="countDown != 0" |
| | | @click="getCode(passFormRef)" |
| | | >{{ |
| | | countDown == 0 ? "获取验证码" : "验证码(" + countDown + "s)" |
| | | }}</el-button |
| | | >{{ countDown == 0 ? '获取验证码' : '验证码(' + countDown + 's)' }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (!/\d/.test(value) || /^\d+$/.test(value)) { |
| | | callback('密码不能为纯数字或字母'); |
| | | callback('密码不能为纯数字或字母') |
| | | } else { |
| | | callback(); |
| | | callback() |
| | | } |
| | | }, |
| | | }, |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, inject, watchEffect, reactive, nextTick } from "vue"; |
| | | import dialogLeftImg from "@/assets/images/header/dialogLeftImg.png"; |
| | | import verify from "@/components/sliderImg/component/verify.vue"; |
| | | import "@/components/sliderImg/sliderImg.js"; |
| | | import "@/components/sliderImg/sliderImg.css"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { useUserStore } from "@/store"; |
| | | import { useRouter } from "vue-router"; |
| | | const router = useRouter(); |
| | | import { ref, inject, watchEffect, reactive, nextTick } from 'vue' |
| | | import dialogLeftImg from '@/assets/images/header/dialogLeftImg.png' |
| | | import verify from '@/components/sliderImg/component/verify.vue' |
| | | import '@/components/sliderImg/sliderImg.js' |
| | | import '@/components/sliderImg/sliderImg.css' |
| | | import { ElMessage } from 'element-plus' |
| | | import { useUserStore } from '@/store' |
| | | import { useRouter } from 'vue-router' |
| | | const router = useRouter() |
| | | |
| | | const userStore = useUserStore(); |
| | | const userStore = useUserStore() |
| | | |
| | | const MG = inject("MG"); |
| | | const config = inject("config"); |
| | | const dialogFormVisible = ref(false); |
| | | const sliderImgDialogVisable = ref(false); |
| | | const flag = ref("logIn"); // 登录或注册 |
| | | const MG = inject('MG') |
| | | const config = inject('config') |
| | | const dialogFormVisible = ref(false) |
| | | const sliderImgDialogVisable = ref(false) |
| | | const flag = ref('logIn') // 登录或注册 |
| | | |
| | | const signUpWay = ref("authSignUp"); // 登录方式 |
| | | const select = ref("中国+86"); |
| | | const countDown = ref(0); // 倒计时时间 |
| | | let timer = null; // 倒计时实例 |
| | | const passFormRef = ref(); |
| | | const signUpWay = ref('authSignUp') // 登录方式 |
| | | const select = ref('中国+86') |
| | | const countDown = ref(0) // 倒计时时间 |
| | | let timer = null // 倒计时实例 |
| | | const passFormRef = ref() |
| | | const passFormData = ref({ |
| | | telNumber: "", |
| | | password: "", |
| | | telCode: "", |
| | | password: "", |
| | | confirmPassword: "", |
| | | }); |
| | | telNumber: '', |
| | | password: '', |
| | | telCode: '', |
| | | password: '', |
| | | confirmPassword: '', |
| | | }) |
| | | const closeDialog = () => { |
| | | countDown.value = 0; |
| | | clearInterval(timer); |
| | | countDown.value = 0 |
| | | clearInterval(timer) |
| | | if (passFormRef.value) { |
| | | passFormRef.value.resetFields(); |
| | | passFormRef.value.resetFields() |
| | | } |
| | | dialogFormVisible.value = false; |
| | | }; |
| | | dialogFormVisible.value = false |
| | | } |
| | | // 弹窗打开事件 |
| | | const openDialog = () => {}; |
| | | const openDialog = () => {} |
| | | |
| | | const loginImgVerify = (code) => { |
| | | sliderImgDialogVisable.value = false; |
| | | sliderImgDialogVisable.value = false |
| | | MG.identity |
| | | .getPhoneCode({ |
| | | phoneNumber: passFormData.value.telNumber, |
| | |
| | | appRefCode: config.appRefCode, |
| | | }) |
| | | .then((res) => { |
| | | if (res == "验证码发送成功") { |
| | | getSecond(60); |
| | | ElMessage.success(res); |
| | | if (res == '验证码发送成功') { |
| | | getSecond(60) |
| | | ElMessage.success(res) |
| | | } else { |
| | | ElMessage.error(res); |
| | | ElMessage.error(res) |
| | | } |
| | | }); |
| | | }; |
| | | }) |
| | | } |
| | | |
| | | watchEffect(() => { |
| | | if (dialogFormVisible.value) { |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | //登录 |
| | | |
| | |
| | | phoneNumber: passFormData.value.telNumber, |
| | | phoneCaptcha: passFormData.value.telCode, |
| | | appRefCode: config.appRefCode, |
| | | platform: "string", |
| | | }; |
| | | platform: 'string', |
| | | } |
| | | MG.identity.loginByMobilePhone(query).then((res) => { |
| | | console.log("res", res); |
| | | userStore.setToken(res.data.accessToken); |
| | | console.log('res', res) |
| | | userStore.setToken(res.data.accessToken) |
| | | |
| | | getUserInfo(); |
| | | }); |
| | | }; |
| | | getUserInfo() |
| | | }) |
| | | } |
| | | |
| | | const getUserInfo = () => { |
| | | MG.identity.getCurrentAppUser().then((res) => { |
| | | console.log("res", res); |
| | | console.log('res', res) |
| | | if (res) { |
| | | let userInfo = res.infoList.find((item) => item.type == "userInfo"); |
| | | let userTypeObj = res.infoList.find((item) => item.type == "userType"); |
| | | let userInfo = res.infoList.find((item) => item.type == 'userInfo') |
| | | let userTypeObj = res.infoList.find((item) => item.type == 'userType') |
| | | const userData = { |
| | | userName: userInfo && userInfo.data ? JSON.parse(userInfo.data).name : "", |
| | | school: userInfo && userInfo.data ? JSON.parse(userInfo.data).school : "", |
| | | city: userInfo && userInfo.data ? JSON.parse(userInfo.data).city : "", |
| | | cityCode: userInfo && userInfo.data ? JSON.parse(userInfo.data).cityCode : "", |
| | | address: userInfo && userInfo.data ? JSON.parse(userInfo.data).address : "", |
| | | userType: |
| | | userTypeObj && userTypeObj.data ? JSON.parse(userTypeObj.data).userType : "", |
| | | }; |
| | | localStorage.setItem("xiehe-isUserInfo", userData?.userType == "" ? "-1" : "1"); |
| | | let teacherRole = res.roleLinks.find((item) => item.role.refCode == "teacher"); |
| | | let teacherInfos = res.infoList.find((item) => item.type == "teacherInfo"); |
| | | let wechatInfo = res.infoList.find((item) => item.type == "WeChat"); |
| | | let studentInfo = res.infoList.find((item) => item.type == "Default"); |
| | | let phoneInfo = res.secretList.find((item) => item.type == "MobilePhone"); |
| | | userName: userInfo && userInfo.data ? JSON.parse(userInfo.data).name : '', |
| | | school: userInfo && userInfo.data ? JSON.parse(userInfo.data).school : '', |
| | | city: userInfo && userInfo.data ? JSON.parse(userInfo.data).city : '', |
| | | cityCode: userInfo && userInfo.data ? JSON.parse(userInfo.data).cityCode : '', |
| | | address: userInfo && userInfo.data ? JSON.parse(userInfo.data).address : '', |
| | | userType: userTypeObj && userTypeObj.data ? JSON.parse(userTypeObj.data).userType : '', |
| | | } |
| | | localStorage.setItem('xiehe-isUserInfo', userData?.userType == '' ? '-1' : '1') |
| | | let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher') |
| | | let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo') |
| | | let wechatInfo = res.infoList.find((item) => item.type == 'WeChat') |
| | | let studentInfo = res.infoList.find((item) => item.type == 'Default') |
| | | let phoneInfo = res.secretList.find((item) => item.type == 'MobilePhone') |
| | | // let nameAndPassword = res.secretList.find((item) => item.type == 'LoginNameAndPassword') |
| | | let emailInfo = res.secretList.find((item) => item.type == "EMail"); |
| | | let emailInfo = res.secretList.find((item) => item.type == 'EMail') |
| | | if (teacherRole && teacherInfos) { |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo ? emailInfo.credential : JSON.parse(teacherInfos.data).email, |
| | | icon: wechatInfo?.icon, |
| | | role: "Teacher", |
| | | role: 'Teacher', |
| | | roleId: teacherRole.role.id, |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } else if (wechatInfo) { |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | | ...wechatInfo, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: "Student", |
| | | role: 'Student', |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } else if (studentInfo) { |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | |
| | | icon: wechatInfo?.icon, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: "Student", |
| | | role: 'Student', |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } else if (phoneInfo) { |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | |
| | | name: phoneInfo?.credential, |
| | | icon: phoneInfo?.icon, |
| | | phoneNumber: phoneInfo?.credential, |
| | | role: "Student", |
| | | role: 'Student', |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | router.go(0); |
| | | }); |
| | | }; |
| | | router.go(0) |
| | | }) |
| | | } |
| | | |
| | | // 倒计时 |
| | | const getSecond = (time) => { |
| | | if (!timer) { |
| | | countDown.value = time; |
| | | countDown.value = time |
| | | timer = setInterval(() => { |
| | | countDown.value--; |
| | | countDown.value-- |
| | | if (countDown.value == 0) { |
| | | clearInterval(timer); |
| | | timer = null; |
| | | clearInterval(timer) |
| | | timer = null |
| | | } |
| | | }, 1000); |
| | | }, 1000) |
| | | } |
| | | }; |
| | | } |
| | | |
| | | // 登录和重置密码按钮按钮 |
| | | const signInSystem = async (formEl) => { |
| | | if (!formEl) return; |
| | | if (!formEl) return |
| | | formEl.validate((valid) => { |
| | | if (valid) { |
| | | // if (signUpWay.value === 'phone') { |
| | |
| | | // changePassword() |
| | | // } |
| | | } |
| | | }); |
| | | }; |
| | | }) |
| | | } |
| | | |
| | | const logIn = () => { |
| | | dialogFormVisible.value = true; |
| | | flag.value = "logIn"; |
| | | }; |
| | | dialogFormVisible.value = true |
| | | flag.value = 'logIn' |
| | | } |
| | | |
| | | // 打开注册弹窗 |
| | | const signUp = () => { |
| | | dialogFormVisible.value = true; |
| | | flag.value = "signUp"; |
| | | }; |
| | | dialogFormVisible.value = true |
| | | flag.value = 'signUp' |
| | | } |
| | | const wechatLoginOpen = () => { |
| | | signUpWay.value = "wechat"; |
| | | }; |
| | | signUpWay.value = 'wechat' |
| | | } |
| | | |
| | | defineExpose({ |
| | | logIn, |
| | | signUp, |
| | | }); |
| | | }) |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | } |
| | | .policy { |
| | | cursor: pointer; |
| | | color: #ff6c00; |
| | | color: #019e58; |
| | | } |
| | | /** 注册表单 */ |
| | | .signUp { |
| | |
| | | |
| | | h4 { |
| | | font-size: 16px; |
| | | color: #ff6c00; |
| | | color: #019e58; |
| | | } |
| | | |
| | | .logInBox { |
| | |
| | | import MG from '@/assets/js/middleGround/WebMiddleGroundApi.js' |
| | | import toolClass from '@/assets/js/toolClass.js' |
| | | import config from '@/assets/js/config.js' |
| | | import zhCn from 'element-plus/dist/locale/zh-cn.mjs' |
| | | // import zhCn from 'element-plus/dist/locale/zh-cn.mjs' |
| | | import locale from 'element-plus/es/locale/lang/zh-cn' |
| | | |
| | | const app = createApp(App) |
| | | |
| | |
| | | app.use(ElementPlus) |
| | | app.use(createPinia()) |
| | | app.use(router) |
| | | app.use(ElementPlus, { |
| | | locale: zhCn, |
| | | }) |
| | | // app.use(ElementPlus, { |
| | | // locale: zhCn, |
| | | // }) |
| | | app.use(ElementPlus, { locale }) |
| | | app.mount('#app') |
| | |
| | | @click="collectBook" |
| | | v-if="bookInfo.isFavourite" |
| | | class="buyIcon" |
| | | src="@/assets/images/bookStore/shoucang.svg" |
| | | src="@/assets/images/xiehe/detail/Collection_fill.png" |
| | | style="margin-right: 10px" |
| | | /> |
| | | <span |
| | |
| | | <div class="collectText" @click="collectBook" v-if="bookInfo.isFavourite"> |
| | | 已收藏 |
| | | </div> |
| | | <div class="collectText" @click="collectBook" v-else>收藏</div> |
| | | |
| | | <div class="collectText" @click="collectBook" v-else> |
| | | <img |
| | | @click="collectBook" |
| | | class="buyIcon" |
| | | src="@/assets/images/xiehe/detail/Collection.png" |
| | | style="margin-right: 10px" |
| | | /> |
| | | 收藏 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="authorBox"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="联系编辑" :visible.sync="contactVisible" width="30%" :lock-scroll="false"> |
| | | <div class="contactBox" v-if="bookInfo.editor"> |
| | | <div class="contacItem"> |
| | | <i class="iconfont icon-renwu-ren contacIcon"></i> |
| | | {{ bookInfo.editor.name }} |
| | | </div> |
| | | <div class="contacItem"> |
| | | <i class="iconfont icon-QQ contacIcon"></i> |
| | | {{ bookInfo.editor.qq }} |
| | | </div> |
| | | <div class="contacItem"> |
| | | <i class="iconfont icon-tongxunlu contacIcon"></i> |
| | | {{ bookInfo.editor.phone }} |
| | | </div> |
| | | <div class="contacItem"> |
| | | <i class="iconfont icon-dianhua contacIcon"></i> |
| | | {{ bookInfo.editor.telephone }} |
| | | </div> |
| | | </div> |
| | | <el-empty v-else description="暂无数据" class="empty" :image-size="100"></el-empty> |
| | | </el-dialog> |
| | | <el-dialog title="信息反馈" :visible.sync="dialogVisible" width="50%" :lock-scroll="false"> |
| | | <div class="infoDialog"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="8" |
| | | placeholder="详细描述您所遇到的问题,有助于快速给您反馈!" |
| | | v-model="textarea" |
| | | > |
| | | </el-input> |
| | | <div class="subBtn"> |
| | | <el-button type="primary" @click="sendDiscuss">提交</el-button> |
| | | </div> |
| | | <div class="infoList"> |
| | | <div class="infoItem" v-for="(item, index) in commentList" :key="index"> |
| | | <div class="infoImg"> |
| | | <img v-if="item.icon" class="autoImg" :src="item.icon" alt="" /> |
| | | <i v-else class="el-icon-user-solid"></i> |
| | | </div> |
| | | <div class="infoContent"> |
| | | <div class="infoTitle"> |
| | | <div class="userNameBox">{{ item.content.name }}</div> |
| | | <div class="userNameBox"> |
| | | {{ moment(item.createDate).format('YYYY-MM-DD') }} |
| | | </div> |
| | | </div> |
| | | <div class="infoText"> |
| | | {{ item.content.content }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-else-if="editableTabsValue == '2'" class="catalogue">bbbb</div> |
| | | <div v-else-if="editableTabsValue == '2'" class="catalogue"> |
| | | <div v-if="bookInfo.catalogue" v-html="bookInfo.catalogue" class="catalogueContent"></div> |
| | | <el-empty description="暂无数据" v-else /> |
| | | </div> |
| | | <div v-else-if="editableTabsValue == '6'" class="supportingResources"> |
| | | <div class="resourcesBox"> |
| | | <el-empty v-if="!resourceHave" :image-size="150" description="暂无内容"></el-empty> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-else class="catalogue"><el-empty description="暂无数据" /></div> |
| | | </div> |
| | | <div class="recommendBox"> |
| | | <div class="recommendTitle">推荐教材</div> |
| | |
| | | import { ref, onBeforeMount, inject, reactive, onMounted, watchEffect } from 'vue' |
| | | const MG = inject('MG') |
| | | const config = inject('config') |
| | | const logIn = inject('logIn') |
| | | import { useRouter, useRoute } from 'vue-router' |
| | | import { applyBookStore } from '@/store' |
| | | const route = useRoute() |
| | |
| | | getBookResource() |
| | | } |
| | | }) |
| | | |
| | | //收藏书籍 |
| | | const collectBook = () => { |
| | | if (localStorage.getItem(config.tokenKey)) { |
| | | if (bookInfo.value.isFavourite) { |
| | | MG.store |
| | | .delProductLink({ |
| | | productIds: [bookInfo.value.id], |
| | | linkType: 'FavoriteBookCity', |
| | | }) |
| | | .then(() => { |
| | | bookInfo.value.isFavourite = false |
| | | }) |
| | | } else { |
| | | let params = { |
| | | productIds: [bookInfo.value.id], |
| | | linkType: 'FavoriteBookCity', |
| | | } |
| | | MG.store.addProductLink(params).then((res) => { |
| | | bookInfo.value.isFavourite = true |
| | | }) |
| | | } |
| | | } else { |
| | | logIn() |
| | | console.log(logIn) |
| | | } |
| | | } |
| | | |
| | | //申请试用 |
| | | const applyTextBook = () => { |
| | |
| | | } |
| | | } |
| | | } |
| | | .textbookContent, |
| | | .authorInfo { |
| | | margin-top: 20px; |
| | | line-height: 28px; |
| | | } |
| | | </style> |
| | |
| | | <span>班级通知</span> |
| | | <el-icon |
| | | style="cursor: pointer" |
| | | color="#FF6D00" |
| | | color="#019e58" |
| | | v-if="noticeList.length > 0 && userInfo.role == 'Teacher'" |
| | | @click="toInfo" |
| | | > |
| | |
| | | <span>班组话题</span> |
| | | <el-icon |
| | | style="cursor: pointer" |
| | | color="#FF6D00" |
| | | color="#019e58" |
| | | v-if="messageList.length > 0" |
| | | @click="toTalk" |
| | | > |
| | |
| | | <span>班级作业概览</span> |
| | | <!-- <el-icon |
| | | style="cursor: pointer" |
| | | color="#FF6D00" |
| | | color="#019e58" |
| | | v-if="tableData.length > 0" |
| | | @click="toWorkList" |
| | | > |
| | |
| | | <span>教学互动</span> |
| | | <el-icon |
| | | style="cursor: pointer" |
| | | color="#FF6D00" |
| | | color="#019e58" |
| | | v-if="tableData.length > 0" |
| | | @click="toTeaching" |
| | | > |
| | |
| | | await toClipboard(val.refCode) |
| | | ElMessage({ |
| | | message: '复制成功', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | } catch (e) { |
| | | console.error(e) |
| | |
| | | const getData = () => { |
| | | MG.edu |
| | | .getCourseClass({ |
| | | ClassIdOrRefCode: String(classInfo.id) |
| | | ClassIdOrRefCode: String(classInfo.id), |
| | | }) |
| | | .then((res: any) => { |
| | | if (res) { |
| | |
| | | const getTopicInfo = () => { |
| | | const pramas = { |
| | | classId: classInfo.id, |
| | | refCodes: [config.refCodes.message, config.refCodes.talk] |
| | | refCodes: [config.refCode.message, config.refCode.talk], |
| | | } |
| | | MG.edu.getClassTopic(pramas).then((res: any) => { |
| | | const list = res |
| | | messageTopicInfo.value = list.find((item: any) => item.refCode == config.refCodes.message) |
| | | messageTopicInfo.value = list.find((item: any) => item.refCode == config.refCode.message) |
| | | if (messageTopicInfo.value.id) { |
| | | sessionStorage.messageId = messageTopicInfo.value.id |
| | | noticeLoading.value = true |
| | | getNotice() |
| | | } |
| | | talkTopicInfo.value = list.find((item: any) => item.refCode == config.refCodes.talk) |
| | | talkTopicInfo.value = list.find((item: any) => item.refCode == config.refCode.talk) |
| | | if (talkTopicInfo.value.id) { |
| | | sessionStorage.talkId = talkTopicInfo.value.id |
| | | messageLoading.value = true |
| | |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | subSorts: [] |
| | | } |
| | | subSorts: [], |
| | | }, |
| | | } |
| | | MG.ugc.getTopicMessageList(data).then((res: any) => { |
| | | noticeLoading.value = false |
| | |
| | | noticeList.value = list.map((item: any) => { |
| | | return { |
| | | ...item, |
| | | createDate: moment(item.createDate).format('YYYY-MM-DD') |
| | | createDate: moment(item.createDate).format('YYYY-MM-DD'), |
| | | } |
| | | }) |
| | | }) |
| | |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | subSorts: [] |
| | | } |
| | | subSorts: [], |
| | | }, |
| | | } |
| | | MG.ugc.getTopicMessageList(data).then((res: any) => { |
| | | messageLoading.value = false |
| | |
| | | ...item, |
| | | index: i + 1, |
| | | createDate: moment(item.createDate).format('YYYY-MM-DD HH:mm:ss'), |
| | | updateDate: moment(item.updateDate).format('YYYY-MM-DD HH:mm:ss') |
| | | updateDate: moment(item.updateDate).format('YYYY-MM-DD HH:mm:ss'), |
| | | } |
| | | }) |
| | | }) |
| | |
| | | { |
| | | value: 'Normal', |
| | | field: 'State', |
| | | subFilters: [] |
| | | } |
| | | ] |
| | | subFilters: [], |
| | | }, |
| | | ], |
| | | } |
| | | MG.identity.getGroupUserList(data).then((res: any) => { |
| | | const { datas } = res |
| | |
| | | return { |
| | | ...item, |
| | | index: index + 1, |
| | | createDate: moment(item.createDate).format('YYYY-MM-DD') |
| | | createDate: moment(item.createDate).format('YYYY-MM-DD'), |
| | | } |
| | | }) |
| | | } |
| | |
| | | router.push({ |
| | | path: '/talkingPoint', |
| | | query: { |
| | | classInfo: JSON.stringify(classInfo) |
| | | } |
| | | classInfo: JSON.stringify(classInfo), |
| | | }, |
| | | }) |
| | | } |
| | | |
| | |
| | | router.push({ |
| | | path: '/info', |
| | | query: { |
| | | classInfo: JSON.stringify(classInfo) |
| | | } |
| | | classInfo: JSON.stringify(classInfo), |
| | | }, |
| | | }) |
| | | } |
| | | |
| | |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | subSorts: [] |
| | | subSorts: [], |
| | | }, |
| | | filterList: [ |
| | | // { |
| | |
| | | { |
| | | value: config.taskType.homeWork, |
| | | field: 'Type', |
| | | subFilters: [] |
| | | } |
| | | subFilters: [], |
| | | }, |
| | | ], |
| | | groupId: classInfo?.id |
| | | groupId: classInfo?.id, |
| | | } |
| | | MG.edu |
| | | .getTaskList(data) |
| | |
| | | return { |
| | | ...item, |
| | | beginDate: moment(item.beginDate).format('YYYY-MM-DD'), |
| | | endDate: moment(item.endDate).format('YYYY-MM-DD') |
| | | endDate: moment(item.endDate).format('YYYY-MM-DD'), |
| | | } |
| | | }) |
| | | .slice(0, 3) |
| | |
| | | } |
| | | .classManagePage-box { |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | .classManagePage-nav { |
| | | padding-bottom: 20px; |
| | | border-bottom: 1px solid #e6e8ed; |
| | |
| | | .titleBox { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 20px 0; |
| | | margin: 10px 0; |
| | | font-size: 16px; |
| | | .title { |
| | | width: 100%; |
| | |
| | | } |
| | | .copyIdBtn { |
| | | background-color: #fff; |
| | | color: #3b93fe; |
| | | padding: 0 6px; |
| | | padding: 10px; |
| | | border-radius: 50px; |
| | | overflow: hidden; |
| | | cursor: pointer; |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | .avatarList { |
| | |
| | | .list-item-title { |
| | | padding: 4px 0; |
| | | padding-left: 10px; |
| | | border-left: 4px solid #ff6c00; |
| | | border-left: 4px solid #019e58; |
| | | color: #000; |
| | | margin: 15px 0; |
| | | } |
| | |
| | | margin-top: 3px; |
| | | } |
| | | .el-checkbox__input.is-checked + .el-checkbox__label { |
| | | color: #ff6c00; |
| | | color: #019e58; |
| | | } |
| | | } |
| | | |
| | |
| | | <template> |
| | | <div class="layoutBox"> |
| | | <Header class="header"></Header> |
| | | <div class="layoutBoxClass"> |
| | | <div class="layoutContentBox clear"> |
| | | <div class="classContentBox clear"> |
| | | <div class="leftList fl"> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ref, watch, provide, onMounted, inject } from "vue"; |
| | | import { useRoute, useRouter, onBeforeRouteUpdate } from "vue-router"; |
| | | import Header from "./components/headerPage.vue"; |
| | | import { menu } from "./config"; |
| | | import { getPublicImage } from "@/assets/js/middleGround/tool.js"; |
| | | import defaultImg from "@/assets/images/default-book-img.png"; |
| | | import { ref, watch, provide, onMounted, inject } from 'vue' |
| | | import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router' |
| | | import { menu } from './config' |
| | | import { getPublicImage } from '@/assets/js/middleGround/tool.js' |
| | | import defaultImg from '@/assets/images/default-book-img.png' |
| | | |
| | | const router: any = useRouter(); |
| | | const route: any = useRoute(); |
| | | const MG: any = inject("MG"); |
| | | const config: any = inject("config"); |
| | | const routerVal = router.currentRoute.value; |
| | | const path = ref(routerVal.path); |
| | | const label = ref(""); |
| | | const classInfo: any = ref(); |
| | | const classIcon: any = ref(); |
| | | const listMenu = ref([]); |
| | | const activeIndex = ref(0); |
| | | const userData = ref(); |
| | | const router: any = useRouter() |
| | | const route: any = useRoute() |
| | | const MG: any = inject('MG') |
| | | const config: any = inject('config') |
| | | const routerVal = router.currentRoute.value |
| | | const path = ref(routerVal.path) |
| | | const label = ref('') |
| | | const classInfo: any = ref() |
| | | const classIcon: any = ref() |
| | | const listMenu = ref([]) |
| | | const activeIndex = ref(0) |
| | | const userData = ref() |
| | | |
| | | watch(router.currentRoute, (val) => { |
| | | path.value = val.path; |
| | | path.value = val.path |
| | | if (val.query.classInfo) { |
| | | const data: any = val.query.classInfo; |
| | | const routerInfo: any = JSON.parse(data); |
| | | activeIndex.value = routerInfo.index; |
| | | const data: any = val.query.classInfo |
| | | const routerInfo: any = JSON.parse(data) |
| | | activeIndex.value = routerInfo.index |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | watch(classInfo, (val) => { |
| | | if (val) { |
| | | activeIndex.value = val.index; |
| | | activeIndex.value = val.index |
| | | } |
| | | if (!val.index) { |
| | | activeIndex.value = 0; |
| | | activeIndex.value = 0 |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | onBeforeRouteUpdate(async (to, from) => { |
| | | path.value = to.path; |
| | | }); |
| | | path.value = to.path |
| | | }) |
| | | |
| | | onMounted(() => { |
| | | classInfo.value = JSON.parse(route.query.classInfo); |
| | | classIcon.value = classInfo.value.icon |
| | | ? getPublicImage(classInfo.value.icon, 200) |
| | | : defaultImg; |
| | | classInfo.value = JSON.parse(route.query.classInfo) |
| | | classIcon.value = classInfo.value.icon ? getPublicImage(classInfo.value.icon, 200) : defaultImg |
| | | menu.forEach((item) => { |
| | | if ("/" + item.path === path.value) { |
| | | label.value = item.label; |
| | | if ('/' + item.path === path.value) { |
| | | label.value = item.label |
| | | } |
| | | }); |
| | | const userCache: any = localStorage.getItem(config.userInfoKey); |
| | | const userInfo = JSON.parse(userCache); |
| | | userData.value = userInfo; |
| | | }) |
| | | const userCache: any = localStorage.getItem(config.userInfoKey) |
| | | const userInfo = JSON.parse(userCache) |
| | | userData.value = userInfo |
| | | if (!userInfo) { |
| | | router.push({ |
| | | path: "/", |
| | | }); |
| | | return false; |
| | | path: '/', |
| | | }) |
| | | return false |
| | | } |
| | | if (userInfo.role != "Teacher") { |
| | | if (userInfo.role != 'Teacher') { |
| | | const data: any = menu.filter( |
| | | (item: any) => item.path != "studentManage" && item.path != "jobAnalysis" |
| | | ); |
| | | listMenu.value = data; |
| | | (item: any) => item.path != 'studentManage' && item.path != 'jobAnalysis', |
| | | ) |
| | | listMenu.value = data |
| | | } else { |
| | | const data: any = menu; |
| | | const data: any = menu |
| | | // if (!classInfo.bookRefCode) { |
| | | // // 融媒体图书,无数字阅读,无法跳转 |
| | | // const list: any = menu.filter((item: any) => item.path != 'teachingPlan') |
| | | // listMenu.value = list; |
| | | // return false |
| | | // } |
| | | listMenu.value = data; |
| | | listMenu.value = data |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | const goRouter = (item: any, index: number) => { |
| | | activeIndex.value = index; |
| | | if ( |
| | | !localStorage.getItem(config.tokenKey) || |
| | | localStorage.getItem(config.tokenKey) == null |
| | | ) { |
| | | activeIndex.value = index |
| | | if (!localStorage.getItem(config.tokenKey) || localStorage.getItem(config.tokenKey) == null) { |
| | | router.push({ |
| | | path: "/home", |
| | | path: '/home', |
| | | query: { |
| | | showLogin: "1", |
| | | showLogin: '1', |
| | | }, |
| | | }); |
| | | }) |
| | | } else { |
| | | label.value = item.label; |
| | | classInfo.value.index = index; |
| | | label.value = item.label |
| | | classInfo.value.index = index |
| | | if (item.key == 5) { |
| | | router.push({ |
| | | path: userData.value.role != "Teacher" ? "/studentJob" : "/jobManage", |
| | | path: userData.value.role != 'Teacher' ? '/studentJob' : '/jobManage', |
| | | query: { |
| | | classInfo: JSON.stringify(classInfo.value), |
| | | }, |
| | | }); |
| | | }) |
| | | } else { |
| | | router.push({ |
| | | path: item.path, |
| | | query: { |
| | | classInfo: JSON.stringify(classInfo.value), |
| | | }, |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | const goBack = () => { |
| | | router.go(-1); |
| | | }; |
| | | router.go(-1) |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .layoutBox { |
| | | .layoutBoxClass { |
| | | width: 100%; |
| | | height: 100vh; |
| | | display: flex; |
| | | flex-direction: column; |
| | | background-color: #fff; |
| | |
| | | } |
| | | |
| | | .activeItem { |
| | | background: linear-gradient(90deg, #019e58 0%, #144941 100%); |
| | | background-size: 100% 100%; |
| | | color: #fff; |
| | | svg { |
| | | fill: #fff; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-table-column prop="id" label="序号" width="70" /> |
| | | <el-table-column prop="name" label="通知" width="500" /> |
| | | <el-table-column prop="state" label="状态" #default="scope"> |
| | | <span style="color: #ff6d00" v-if="scope.row.state == 'WaitAudit'">待审核</span> |
| | | <span style="color: #019e58" v-if="scope.row.state == 'WaitAudit'">待审核</span> |
| | | <span style="color: #67c23a" v-if="scope.row.state == 'Normal'">已通过</span> |
| | | <span style="color: red" v-if="scope.row.state == 'Reject'">已拒绝</span> |
| | | </el-table-column> |
| | |
| | | color: #333; |
| | | line-height: 30px; |
| | | text-align: left; |
| | | border-left: 6px solid #ff6c00; |
| | | border-left: 6px solid #019e58; |
| | | padding-left: 10px; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | onMounted(() => { |
| | | defaultCmsPath.value = classInfo.bookRefCode ? 'jsek_digitalTextbooks' : 'defaultGoodsStore3' |
| | | defaultCmsPath.value = classInfo.bookRefCode ? 'digitalTextbooks' : 'defaultGoodsStore3' |
| | | getMessage() |
| | | }) |
| | | |
| | |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | productId: classInfo.bookId, |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: item.path, |
| | | itemFields: { |
| | | Embedded_QuestionBank_AnalysisCon: [], |
| | |
| | | color: #333; |
| | | line-height: 30px; |
| | | text-align: left; |
| | | border-left: 6px solid #ff6c00; |
| | | border-left: 6px solid #019e58; |
| | | padding-left: 10px; |
| | | } |
| | | } |
| | |
| | | box-sizing: border-box; |
| | | min-height: 750px; |
| | | .userName { |
| | | color: #ff6d00; |
| | | color: #019e58; |
| | | } |
| | | } |
| | | } |
| | |
| | | .classManagePage-box { |
| | | width: 100%; |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | .classManagePage-nav { |
| | | padding-bottom: 20px; |
| | | border-bottom: 1px solid #e6e8ed; |
| | |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | border-left: 4px solid #ff6d00; |
| | | border-left: 4px solid #019e58; |
| | | span { |
| | | margin-right: 15px; |
| | | } |
| | |
| | | height: 3px; |
| | | } |
| | | .content-user-box::-webkit-scrollbar-thumb { |
| | | background-color: #ff6d00; |
| | | background-color: #019e58; |
| | | cursor: pointer; |
| | | } |
| | | .content-user-box::-webkit-scrollbar-track-piece { |
| | |
| | | </el-table-column> |
| | | <el-table-column label="分数" width="120"> |
| | | <template #default="scope"> |
| | | <span style="color: #ff6c00">{{ scope.row.score }}</span> |
| | | <span style="color: #019e58">{{ scope.row.score }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="设置" width="260"> |
| | |
| | | { |
| | | value: config.taskType.homeWork, |
| | | field: 'Type', |
| | | subFilters: [] |
| | | } |
| | | subFilters: [], |
| | | }, |
| | | ]) |
| | | // task |
| | | const taskData = reactive({ |
| | |
| | | state: '', |
| | | groupId: '', |
| | | beginDate: '', |
| | | endDate: '' |
| | | endDate: '', |
| | | }) |
| | | // question Key |
| | | const questionKey = [ |
| | |
| | | 'Embedded_QuestionBank_QuestionType', |
| | | 'Embedded_QuestionBank_Score', |
| | | 'Embedded_QuestionBank_Stem', |
| | | 'Embedded_QuestionBank_StemStyle' |
| | | 'Embedded_QuestionBank_StemStyle', |
| | | ] |
| | | // dialognew |
| | | const visible = ref(false) |
| | |
| | | homeworkName: '', |
| | | homeworkStartingDate: '', |
| | | homeworkSubmissionDate: '', |
| | | explain: '' |
| | | explain: '', |
| | | }) |
| | | let pages = reactive({ |
| | | currentPage: 1, |
| | | page: 1, |
| | | pageSize: 15, |
| | | count: 0, |
| | | loading: false |
| | | loading: false, |
| | | }) |
| | | // dialogedit |
| | | const visibleEdit = ref(false) |
| | |
| | | if (userCache) { |
| | | userInfo.value = JSON.parse(userCache) |
| | | } |
| | | defaultCmsPath.value = classInfo.bookRefCode ? 'jsek_digitalTextbooks' : 'defaultGoodsStore3' |
| | | defaultCmsPath.value = classInfo.bookRefCode ? '*' : 'defaultGoodsStore3' |
| | | getTaskList() |
| | | }) |
| | | |
| | |
| | | if (!taskItem.homeworkName) { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请填写作业名称 ' |
| | | message: '请填写作业名称 ', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | |
| | | if (!taskItem.homeworkStartingDate) { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请填写作业开始时间 ' |
| | | message: '请填写作业开始时间 ', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | |
| | | if (!taskItem.homeworkSubmissionDate) { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请填写作业结束时间' |
| | | message: '请填写作业结束时间', |
| | | }) |
| | | newLoading.value = false |
| | | return false |
| | |
| | | beginDate: taskItem.homeworkStartingDate, |
| | | endDate: taskItem.homeworkSubmissionDate, |
| | | duration: 0, |
| | | config: JSON.stringify({ scoreData: [] }) |
| | | config: JSON.stringify({ scoreData: [] }), |
| | | } |
| | | MG.edu |
| | | .newTask(data) |
| | |
| | | beginDate: moment(taskItem.homeworkStartingDate).format('YYYY-MM-DDTHH:mm:ss'), |
| | | endDate: moment(taskItem.homeworkSubmissionDate).format('YYYY-MM-DDTHH:mm:ss'), |
| | | duration: 0, |
| | | config: JSON.stringify({ scoreData: scoreData.value }) |
| | | config: JSON.stringify({ scoreData: scoreData.value }), |
| | | } |
| | | MG.edu |
| | | .updateTask(data) |
| | |
| | | size: pages.pageSize, |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate' |
| | | field: 'CreateDate', |
| | | }, |
| | | filterList, |
| | | searchList, |
| | | groupId: classInfo?.id |
| | | groupId: classInfo?.id, |
| | | } |
| | | MG.edu |
| | | .getTaskList(data) |
| | |
| | | return { |
| | | ...item, |
| | | beginDate: moment(item.beginDate).format('YYYY-MM-DD'), |
| | | endDate: moment(item.endDate).format('YYYY-MM-DD') |
| | | endDate: moment(item.endDate).format('YYYY-MM-DD'), |
| | | } |
| | | }) |
| | | if (taskData.id) { |
| | |
| | | { |
| | | compareType: 'Contains', |
| | | keywords: searchKey.value, |
| | | field: 'Name' |
| | | } |
| | | field: 'Name', |
| | | }, |
| | | ] |
| | | pages.page = 1 |
| | | pages.currentPage = 1 |
| | |
| | | // 删除资源 |
| | | const removeTaskItem = (item: any) => { |
| | | const data = { |
| | | ids: [item.id] |
| | | ids: [item.id], |
| | | } |
| | | MG.edu |
| | | .delTask(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | getTaskList() |
| | | } |
| | |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: '删除失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | }) |
| | | } |
| | |
| | | requests: checkData.value?.map((item: any) => { |
| | | return { |
| | | path: String(taskData.rootCmsItemId), |
| | | cmsItemId: item.id |
| | | cmsItemId: item.id, |
| | | } |
| | | }) |
| | | }), |
| | | } |
| | | MG.edu |
| | | .addTaskCmsItemList(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | message: '已加入', |
| | | type: 'success' |
| | | type: 'success', |
| | | }) |
| | | selectCache.value = [] |
| | | checkData.value = [] |
| | |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: '加入失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | }) |
| | | } |
| | |
| | | taskId: taskData?.id, // taskData?.id |
| | | path: String(taskData?.rootCmsItemId), //taskData?.rootCmsItemId |
| | | type: '*', |
| | | keys: questionKey |
| | | keys: questionKey, |
| | | } |
| | | MG.edu |
| | | .getTaskCmsItem(data) |
| | |
| | | .catch((e: any) => { |
| | | ElMessage({ |
| | | message: '列表获取失败', |
| | | type: 'error' |
| | | type: 'error', |
| | | }) |
| | | console.log(e) |
| | | }) |
| | |
| | | ElMessageBox.confirm('是否确认删除?', '提示', { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '否', |
| | | type: 'warning' |
| | | type: 'warning', |
| | | }).then(() => { |
| | | const data = { |
| | | taskId: taskData.id, |
| | | requests: [ |
| | | { |
| | | cmsItemId: item.id, |
| | | path: String(taskData.rootCmsItemId) |
| | | } |
| | | ] |
| | | path: String(taskData.rootCmsItemId), |
| | | }, |
| | | ], |
| | | } |
| | | MG.edu |
| | | .removeTaskCmsItemList(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '已删除' |
| | | message: '已删除', |
| | | }) |
| | | selectedIndex.value = 0 |
| | | getTaskCmsList() |
| | |
| | | .catch((err: any) => { |
| | | ElMessage({ |
| | | type: 'error', |
| | | message: '删除失败,请稍后再试' |
| | | message: '删除失败,请稍后再试', |
| | | }) |
| | | }) |
| | | }) |
| | |
| | | content, |
| | | type: 'Normal', |
| | | cmsTypeRefCode: '', |
| | | newDataListRequest: [] |
| | | newDataListRequest: [], |
| | | } |
| | | MG.ugc |
| | | .newTopicMessage(data) |
| | |
| | | if (res) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '已发布' |
| | | message: '已发布', |
| | | }) |
| | | } |
| | | }) |
| | |
| | | router.push({ |
| | | path: '/jobDetail', |
| | | query: { |
| | | classInfo: JSON.stringify(obj) |
| | | } |
| | | classInfo: JSON.stringify(obj), |
| | | }, |
| | | }) |
| | | } |
| | | |
| | |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | productId: String(classInfo?.bookId), |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: classInfo?.rootCmsItemId |
| | | cmsPath: classInfo?.rootCmsItemId, |
| | | } |
| | | MG.store |
| | | .getProductDetail(query) |
| | |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | productId: String(classInfo?.bookId), |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: obj.productLinkPath |
| | | cmsPath: obj.productLinkPath, |
| | | } |
| | | MG.store |
| | | .getProductDetail(query) |
| | |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | productId: String(classInfo?.bookId), |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: item.productLinkPath, |
| | | itemFields: { |
| | | Embedded_QuestionBank_AnalysisCon: [], |
| | |
| | | Embedded_QuestionBank_QuestionType: [], |
| | | Embedded_QuestionBank_Score: [], |
| | | Embedded_QuestionBank_Stem: [], |
| | | Embedded_QuestionBank_StemStyle: [] |
| | | } |
| | | Embedded_QuestionBank_StemStyle: [], |
| | | }, |
| | | }) |
| | | if (item.type == 'questionBankFolder' && item.childrenFolderCount == 0) { |
| | | return data.datas.cmsDatas |
| | |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | productId: String(classInfo?.bookId), |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath, |
| | | itemFields: { |
| | | Embedded_QuestionBank_AnalysisCon: [], |
| | |
| | | Embedded_QuestionBank_QuestionType: [], |
| | | Embedded_QuestionBank_Score: [], |
| | | Embedded_QuestionBank_Stem: [], |
| | | Embedded_QuestionBank_StemStyle: [] |
| | | } |
| | | Embedded_QuestionBank_StemStyle: [], |
| | | }, |
| | | } |
| | | MG.store |
| | | .getProductDetail(query) |
| | |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | productId: String(classInfo?.bookId), |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: item.productLinkPath |
| | | cmsPath: item.productLinkPath, |
| | | } |
| | | MG.store |
| | | .getProductDetail(query) |
| | |
| | | { name: '论述题', totalScore: 0, value: 'discuss', data: [] }, |
| | | { name: '填空题', totalScore: 0, value: 'completion', data: [] }, |
| | | { name: '连线题', totalScore: 0, value: 'matching', data: [] }, |
| | | { name: '分类题', totalScore: 0, value: 'classification', data: [] } |
| | | { name: '分类题', totalScore: 0, value: 'classification', data: [] }, |
| | | ] |
| | | try { |
| | | let list = [] |
| | |
| | | questionType: item.Embedded_QuestionBank_QuestionType, |
| | | questionAnalysisCon: item.Embedded_QuestionBank_AnalysisCon, |
| | | questionAnswer: item.Embedded_QuestionBank_Answer, |
| | | customAnswer: null |
| | | customAnswer: null, |
| | | } |
| | | } catch (error) { |
| | | console.log(item) |
| | |
| | | color: #333; |
| | | line-height: 30px; |
| | | text-align: left; |
| | | border-left: 6px solid #ff6c00; |
| | | border-left: 6px solid #019e58; |
| | | padding-left: 10px; |
| | | } |
| | | } |
| | | margin-top: 20px; |
| | | ::v-deep .el-tabs__nav-wrap::after { |
| | | background-color: #ff6d00; |
| | | background-color: #019e58; |
| | | height: 1px; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | ::v-deep .is-active { |
| | | background-color: #ff6d00; |
| | | background-color: #019e58; |
| | | color: #fff; |
| | | border-radius: 3px 3px 0 0; |
| | | } |
| | |
| | | background: #e0f2ff; |
| | | overflow: auto; |
| | | padding: 10px 18px; |
| | | box-sizing: border-box; |
| | | .searchBox { |
| | | position: sticky; |
| | | top: -10px; |
| | |
| | | .leftBg { |
| | | background-color: rgba(255, 173, 65, 0.1); |
| | | border-radius: 5px 5px 5px 5px; |
| | | color: #ff6c00 !important; |
| | | color: #019e58 !important; |
| | | } |
| | | .pageBox { |
| | | padding: 10px 0; |
| | |
| | | <el-table-column label="序号" prop="id" width="70"> </el-table-column> |
| | | <el-table-column label="名称" prop="name"> </el-table-column> |
| | | <el-table-column label="作业完成情况" #default="scope"> |
| | | <span v-if="scope.row.submitState == 'WaitCheck'" style="color: #ff6d00">待批改</span> |
| | | <span v-if="scope.row.submitState == 'WaitCheck'" style="color: #019e58">待批改</span> |
| | | <span v-if="scope.row.submitState == 'Normal'" style="color: #67c23a">已批改</span> |
| | | <span v-if="!scope.row.submitState" style="color: red">未提交</span> |
| | | </el-table-column> |
| | |
| | | color: #333; |
| | | line-height: 30px; |
| | | text-align: left; |
| | | border-left: 6px solid #ff6c00; |
| | | border-left: 6px solid #019e58; |
| | | padding-left: 10px; |
| | | } |
| | | } |
| | | margin-top: 20px; |
| | | ::v-deep .el-tabs__nav-wrap::after { |
| | | background-color: #ff6d00; |
| | | background-color: #019e58; |
| | | height: 1px; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | ::v-deep .is-active { |
| | | background-color: #ff6d00; |
| | | background-color: #019e58; |
| | | color: #fff; |
| | | border-radius: 3px 3px 0 0; |
| | | } |
| | |
| | | const getTopicInfo = () => { |
| | | const pramas = { |
| | | classId: classInfo.id, |
| | | refCodes: [config.refCodes.talk] |
| | | refCodes: [config.refCode.talk] |
| | | } |
| | | MG.edu.getClassTopic(pramas).then((res: any) => { |
| | | const list = res |
| | | talkTopicInfo.value = list.find((item: any) => item.refCode == config.refCodes.talk) |
| | | talkTopicInfo.value = list.find((item: any) => item.refCode == config.refCode.talk) |
| | | if (talkTopicInfo.value.id) { |
| | | getMessage() |
| | | } |
| | |
| | | .MessageBox { |
| | | width: 100%; |
| | | padding: 0 30px; |
| | | box-sizing: border-box; |
| | | .MessageHeader { |
| | | width: 100%; |
| | | display: flex; |
| | |
| | | <el-table-column prop="index" label="序号" width="70" /> |
| | | <el-table-column label="话题名称" width="500"> |
| | | <template #default="scope"> |
| | | <span style="color: #ff6c00" v-if="scope.row.name">{{ scope.row.name }}</span> |
| | | <span style="color: #019e58" v-if="scope.row.name">{{ scope.row.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createDate" label="发起日期" /> |
| | |
| | | const getTopicInfo = () => { |
| | | const pramas = { |
| | | classId: classInfo.id, |
| | | refCodes: [config.refCodes.talk] |
| | | refCodes: [config.refCode.talk] |
| | | } |
| | | MG.edu.getClassTopic(pramas).then((res: any) => { |
| | | const list = res |
| | | talkTopicInfo.value = list.find((item: any) => item.refCode == config.refCodes.talk) |
| | | talkTopicInfo.value = list.find((item: any) => item.refCode == config.refCode.talk) |
| | | if (talkTopicInfo.value.id) { |
| | | getMessage() |
| | | } |
| | |
| | | <el-table-column prop="name" label="标题" width="500" /> |
| | | <el-table-column prop="address" label="已互动学生数" #default="scoped"> |
| | | <div> |
| | | <span style="color: #ff6d00">{{ scoped.row.subList.length }}</span> |
| | | <span style="color: #019e58">{{ scoped.row.subList.length }}</span> |
| | | </div> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="最后提交时间" #default="scoped"> |
| | |
| | | if (userCache) { |
| | | userInfo.value = JSON.parse(userCache) |
| | | } |
| | | defaultCmsPath.value = classInfo.bookRefCode ? 'jsek_digitalTextbooks' : config.goodsStore |
| | | defaultCmsPath.value = classInfo.bookRefCode ? '*' : config.goodsStore |
| | | getData() |
| | | }) |
| | | |
| | |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | productId: classInfo.bookId, |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: classInfo.rootCmsItemId |
| | | }) |
| | | .then((res: any) => { |
| | |
| | | .getProductDetail({ |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | storeInfo: defaultCmsPath.value, |
| | | productId: classInfo.bookId, |
| | | cmsPath: data.productLinkPath |
| | | }) |
| | |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | productId: classInfo.bookId, |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: dataTeach.productLinkPath |
| | | }) |
| | | .then((res: any) => { |
| | |
| | | path: defaultCmsPath.value, |
| | | queryType: '*', |
| | | productId: classInfo.bookId, |
| | | storeInfo: defaultCmsPath.value, |
| | | cmsPath: item.productLinkPath, |
| | | cmsSort: { |
| | | ProductLinkOrder: 'Desc' |
| | |
| | | const getTopicInfo = () => { |
| | | const pramas = { |
| | | classId: classInfo.id, |
| | | refCodes: [config.refCodes.teachInteraction] |
| | | refCodes: [config.refCode.teachInteraction] |
| | | } |
| | | MG.edu.getClassTopic(pramas).then((res: any) => { |
| | | const list = res |
| | | teachInteractionInfo.value = list.find( |
| | | (item: any) => item.refCode == config.refCodes.teachInteraction |
| | | (item: any) => item.refCode == config.refCode.teachInteraction |
| | | ) |
| | | if (teachInteractionInfo.value.id) { |
| | | getMessage() |
| | |
| | | color: #333; |
| | | line-height: 30px; |
| | | text-align: left; |
| | | border-left: 6px solid #ff6c00; |
| | | border-left: 6px solid #019e58; |
| | | padding-left: 10px; |
| | | } |
| | | } |
| | |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | .userName { |
| | | color: #ff6d00; |
| | | color: #019e58; |
| | | } |
| | | } |
| | | } |
| | |
| | | const getTypeByCode = () => { |
| | | MG.resource |
| | | .getCmsTypeByRefCode({ |
| | | refCodes: [config.refCodes.teachingPlan], |
| | | refCodes: [config.refCode.teachingPlan], |
| | | }) |
| | | .then((res: any) => { |
| | | const data = res[0]?.cmsTypeLinks[0]?.children; |
| | |
| | | name: taskItem.title, |
| | | description: "", |
| | | icon: "", |
| | | type: config.refCodes.teachingPlan, |
| | | type: config.refCode.teachingPlan, |
| | | state: "Normal", |
| | | order: 0, |
| | | newDataListRequest: tool.worksDataBytool( |
| | |
| | | } |
| | | } |
| | | .linkTitle { |
| | | color: #ff6c00; |
| | | color: #019e58; |
| | | cursor: pointer; |
| | | } |
| | | .linkTitle:hover { |
| | |
| | | // coursePages.loading = true |
| | | // const searchData = [ |
| | | // { |
| | | // keywords: 'jsek_digitalTextbooks', |
| | | // keywords: 'digitalTextbooks', |
| | | // field: 'ProductType' |
| | | // } |
| | | // ] |
| | |
| | | min-height: 200px; |
| | | .classItem { |
| | | float: left; |
| | | width: 49%; |
| | | width: 48%; |
| | | margin-bottom: 16px; |
| | | margin-right: 1%; |
| | | border-radius: 8px; |
| | |
| | | .itemInfo { |
| | | height: 128px; |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | flex: 1; |
| | | display: flex; |
| | | cursor: pointer; |
| | |
| | | <img |
| | | v-if="detailData?.linkProduct?.icon != 'default'" |
| | | :src=" |
| | | detailData.linkProduct?.icon ? getPublicImage(detailData.linkProduct.icon, 80) : defaultImg |
| | | detailData.linkProduct?.icon |
| | | ? getPublicImage(detailData.linkProduct.icon, 80) |
| | | : defaultImg |
| | | " |
| | | /> |
| | | </div> |
| | |
| | | size: 999, |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate' |
| | | field: 'CreateDate', |
| | | }, |
| | | filterList: [], |
| | | searchList: [] |
| | | searchList: [], |
| | | }) |
| | | .then((res: any) => { |
| | | numClass.value = res.datas.length |
| | |
| | | const getData = () => { |
| | | MG.edu |
| | | .getCourseById({ |
| | | courseId: query.courseId |
| | | courseId: query.courseId, |
| | | }) |
| | | .then((res: any) => { |
| | | detailData.value = res |
| | |
| | | productId: String(shopId), |
| | | coverSize: { |
| | | height: 300, |
| | | width: 210 |
| | | width: 210, |
| | | }, |
| | | fields: { |
| | | seriesName: [], |
| | | author: [], |
| | | isbn: [], |
| | | publicationDate: [] |
| | | } |
| | | publicationDate: [], |
| | | }, |
| | | } |
| | | MG.store.getProductDetail(query).then(async (res: any) => { |
| | | bookDetail.value = res.datas |
| | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .autoImgBox { |
| | | width: 120px; |
| | | height: 130px; |
| | | margin-bottom: 10px; |
| | | position: relative; |
| | | img { |
| | | width: auto; |
| | | height: auto; |
| | | max-width: 100%; |
| | | max-height: 100%; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | left: 0; |
| | | margin: auto; |
| | | } |
| | | } |
| | | .courseManage { |
| | | padding: 0 20px; |
| | | .backBox { |
| | |
| | | <div class="more">更多></div> |
| | | </div> |
| | | <div class="recommendList"> |
| | | <div class="recommendItem" v-for="item in bookListData" :key="item.id"> |
| | | <div |
| | | class="recommendItem" |
| | | v-for="item in bookListData" |
| | | :key="item.id" |
| | | @click="toDetail(item)" |
| | | > |
| | | <div class="recommendItemImg"> |
| | | <img class="autoImg" :src="item.icon" /> |
| | | </div> |
| | |
| | | <div class="more">更多></div> |
| | | </div> |
| | | <div class="recommendList"> |
| | | <div class="recommendItem" v-for="item in navBookList" :key="item.id"> |
| | | <div |
| | | class="recommendItem" |
| | | v-for="item in navBookList" |
| | | :key="item.id" |
| | | @click="toDetail(item)" |
| | | > |
| | | <div class="recommendItemImg"> |
| | | <img class="autoImg" :src="item.icon" /> |
| | | </div> |
| | |
| | | import teacherCertification from '@/views/personalCenter/teacherCertification.vue' |
| | | import { ref, onBeforeMount, inject, reactive, onMounted } from 'vue' |
| | | let screenheight = ref(document.documentElement.clientHeight / 2) |
| | | import { useRouter, useRoute } from 'vue-router' |
| | | const router = useRouter() |
| | | |
| | | const MG = inject('MG') |
| | | const config = inject('config') |
| | | const tool = inject('tool') |
| | |
| | | getNavBookList() |
| | | }) |
| | | |
| | | const toDetail = (item) => { |
| | | router.push({ |
| | | path: '/bookdetail', |
| | | query: { |
| | | bookId: item.id, |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | const handleClick = (tab, event) => { |
| | | console.log(tab) |
| | | |
| | |
| | | if (parentData.storeLinks[0].storeRefCode == "jsek_digitalCourses") { |
| | | obj.type = "数字课程"; |
| | | } |
| | | if (parentData.storeLinks[0].storeRefCode == "jsek_digitalTextbooks") { |
| | | if (parentData.storeLinks[0].storeRefCode == "digitalTextbooks") { |
| | | obj.type = "数字教材"; |
| | | } |
| | | item.typeList.push(obj); |
| | |
| | | bookName: parentData.name, |
| | | }, |
| | | }); |
| | | } else if (parentData.storeLinks[0].storeRefCode == "jsek_digitalTextbooks") { |
| | | } else if (parentData.storeLinks[0].storeRefCode == "digitalTextbooks") { |
| | | router.push({ |
| | | name: "digitalTextbooksDetails", |
| | | query: { |
| | |
| | | |
| | | // 获取教材详情 |
| | | const getBookDetail = async (item: any) => { |
| | | const path = item.refCode ? "jsek_digitalTextbooks" : config.goodsStore; |
| | | const path = item.refCode ? "digitalTextbooks" : config.goodsStore; |
| | | let query = { |
| | | path, |
| | | queryType: "*", |
| | |
| | | } |
| | | } |
| | | .itemInfo { |
| | | padding: 20px; |
| | | padding: 15px; |
| | | box-sizing: border-box; |
| | | flex: 1; |
| | | display: flex; |
| | | cursor: pointer; |
| | |
| | | <div class="personalPage-title">我的课程</div> |
| | | <div class="headerBox"> |
| | | <div class="searchBox"> |
| | | <el-input |
| | | v-model="searchKey" |
| | | clearable |
| | | @clear="getData" |
| | | placeholder="请输入关键字" |
| | | > |
| | | <el-input v-model="searchKey" clearable @clear="getData" placeholder="请输入关键字"> |
| | | <template #append> |
| | | <el-button type="primary" class="searchBtn" :icon="Search" @click="getData" /> |
| | | </template> |
| | | </el-input> |
| | | </div> |
| | | <el-button type="primary" class="applyStartClasses" @click="applyCourse" |
| | | >申请开课</el-button |
| | | > |
| | | <el-button type="primary" class="applyStartClasses" @click="applyCourse">申请开课</el-button> |
| | | </div> |
| | | <div class="courseListBox" v-loading="pages.loading"> |
| | | <div |
| | |
| | | <div style="width: 300px" v-html="item.reason"></div> |
| | | </template> |
| | | <span v-if="item.applyState == 'Reject'" style="color: red"> |
| | | 拒绝原因:{{ item.reason != "" ? item.reason : "-" }} |
| | | 拒绝原因:{{ item.reason != '' ? item.reason : '-' }} |
| | | </span> |
| | | </el-tooltip> |
| | | <el-button |
| | |
| | | > |
| | | 审核中 |
| | | </div> |
| | | <div |
| | | class="stateIcon" |
| | | v-if="item.applyState == 'Reject'" |
| | | style="background-color: red" |
| | | > |
| | | <div class="stateIcon" v-if="item.applyState == 'Reject'" style="background-color: red"> |
| | | 未通过 |
| | | </div> |
| | | <img v-if="item.icon" :src="item.icon" /> |
| | |
| | | </div> |
| | | <!-- 申请开课弹框 --> |
| | | <el-dialog v-model="applyCourseDialog" width="750" align-center> |
| | | <template #title>{{ editData ? "重新申请" : "申请开课" }}</template> |
| | | <el-form |
| | | :model="formData" |
| | | label-position="left" |
| | | ref="dialogFormRef" |
| | | label-width="80px" |
| | | > |
| | | <template #title>{{ editData ? '重新申请' : '申请开课' }}</template> |
| | | <el-form :model="formData" label-position="left" ref="dialogFormRef" label-width="80px"> |
| | | <el-form-item |
| | | label="课程名称" |
| | | prop="name" |
| | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="applyCourseDialog = false">取消</el-button> |
| | | <el-button type="primary" @click="submit" :loading="submitLoading" |
| | | >提交</el-button |
| | | > |
| | | <el-button type="primary" @click="submit" :loading="submitLoading">提交</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | placeholder="请输入关键字" |
| | | > |
| | | <template #append> |
| | | <el-button |
| | | type="primary" |
| | | class="searchBtn" |
| | | :icon="Search" |
| | | @click="getTextBook" |
| | | /> |
| | | <el-button type="primary" class="searchBtn" :icon="Search" @click="getTextBook" /> |
| | | </template> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <div style="min-height: 370px" v-if="textBookListData.length > 0"> |
| | | <div |
| | | v-for="(item, index) in textBookListData" |
| | | :key="index" |
| | | class="textBookItem" |
| | | > |
| | | <el-checkbox |
| | | class="checkBox" |
| | | v-model="item.check" |
| | | @change="selectChange(item)" |
| | | /> |
| | | <div v-for="(item, index) in textBookListData" :key="index" class="textBookItem"> |
| | | <el-checkbox class="checkBox" v-model="item.check" @change="selectChange(item)" /> |
| | | <div class="imgBox autoImgBox"> |
| | | <img :src="item.img" /> |
| | | </div> |
| | | <p>{{ item.product.name }}</p> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="nullBox" |
| | | v-if="!textBookPages.loading && textBookListData.length == 0" |
| | | > |
| | | <div class="nullBox" v-if="!textBookPages.loading && textBookListData.length == 0"> |
| | | <el-empty /> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { reactive, ref, onMounted, inject, watch } from "vue"; |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { useRouter, useRoute } from "vue-router"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { reactive, ref, onMounted, inject, watch } from 'vue' |
| | | import { Search } from '@element-plus/icons-vue' |
| | | import { useRouter, useRoute } from 'vue-router' |
| | | import { ElMessage } from 'element-plus' |
| | | // eslint-disable-next-line |
| | | import { getPublicImage } from "@/assets/js/middleGround/tool.js"; |
| | | import { getPublicImage } from '@/assets/js/middleGround/tool.js' |
| | | // eslint-disable-next-line |
| | | import defaultImg from "@/assets/images/default-book-img.png"; |
| | | import defaultImg from '@/assets/images/default-book-img.png' |
| | | |
| | | const router: any = useRouter(); |
| | | const route: any = useRoute(); |
| | | const MG: any = inject("MG"); |
| | | const selectName = ref(""); |
| | | const router: any = useRouter() |
| | | const route: any = useRoute() |
| | | const MG: any = inject('MG') |
| | | const selectName = ref('') |
| | | |
| | | // 申请开课防抖loading |
| | | const submitLoading = ref(false); |
| | | const submitLoading = ref(false) |
| | | |
| | | const courseList: any = ref([]); |
| | | const courseList: any = ref([]) |
| | | |
| | | onMounted(() => { |
| | | getData(); |
| | | }); |
| | | getData() |
| | | }) |
| | | |
| | | const searchKey = ref(""); |
| | | const searchKey = ref('') |
| | | const pages = reactive({ |
| | | page: 1, |
| | | pageSize: 6, |
| | | count: 0, |
| | | loading: true, |
| | | }); |
| | | }) |
| | | |
| | | // 获取课程 |
| | | const getData = () => { |
| | | pages.loading = true; |
| | | pages.loading = true |
| | | MG.edu |
| | | .getAppCourseList({ |
| | | size: pages.pageSize, |
| | | start: pages.pageSize * pages.page - pages.pageSize, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate", |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | }, |
| | | filterList: [], |
| | | searchList: searchKey.value |
| | | ? [ |
| | | { |
| | | keywords: searchKey.value, |
| | | field: "Name", |
| | | compareType: "Contains", |
| | | field: 'Name', |
| | | compareType: 'Contains', |
| | | }, |
| | | ] |
| | | : [], |
| | | }) |
| | | .then((res: any) => { |
| | | pages.loading = false; |
| | | pages.count = res.totalSize; |
| | | pages.loading = false |
| | | pages.count = res.totalSize |
| | | courseList.value = res.datas.map((item: any) => { |
| | | return { |
| | | ...item, |
| | | name: item.name, |
| | | id: item.id, |
| | | icon: item.icon != "default" ? getPublicImage(item.icon, 80) : defaultImg, |
| | | icon: item.icon != 'default' ? getPublicImage(item.icon, 80) : defaultImg, |
| | | introduction: item.description, |
| | | reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : "", |
| | | }; |
| | | }); |
| | | }); |
| | | }; |
| | | reason: item.applyReturnMsg ? JSON.parse(item.applyReturnMsg).reason : '', |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | // 申请开课 |
| | | const applyCourse = () => { |
| | | editData.value = null; |
| | | editData.value = null |
| | | formData.value = { |
| | | name: "", |
| | | bookName: "", |
| | | bookId: "", |
| | | selectData: "", |
| | | desc: "", |
| | | }; |
| | | applyCourseDialog.value = true; |
| | | }; |
| | | name: '', |
| | | bookName: '', |
| | | bookId: '', |
| | | selectData: '', |
| | | desc: '', |
| | | } |
| | | applyCourseDialog.value = true |
| | | } |
| | | |
| | | const editData: any = ref(null); |
| | | const editData: any = ref(null) |
| | | const reapplyCourse = (data: any) => { |
| | | editData.value = data; |
| | | editData.value = data |
| | | formData.value = { |
| | | name: data.name, |
| | | bookName: data.linkProduct.name, |
| | | bookId: data.linkProduct.id, |
| | | selectData: "", |
| | | selectData: '', |
| | | desc: data.description, |
| | | }; |
| | | applyCourseDialog.value = true; |
| | | }; |
| | | } |
| | | applyCourseDialog.value = true |
| | | } |
| | | |
| | | // 申请教材弹框 |
| | | const applyCourseDialog = ref(false); |
| | | const selectTextBookDialog = ref(false); |
| | | const applyCourseDialog = ref(false) |
| | | const selectTextBookDialog = ref(false) |
| | | const formData = ref({ |
| | | name: "", |
| | | bookName: "", |
| | | bookId: "", |
| | | selectData: "", |
| | | desc: "", |
| | | }); |
| | | name: '', |
| | | bookName: '', |
| | | bookId: '', |
| | | selectData: '', |
| | | desc: '', |
| | | }) |
| | | |
| | | const selectChange = (select: any) => { |
| | | for (let i = 0; i < textBookListData.value.length; i++) { |
| | | const item: any = textBookListData.value[i]; |
| | | const item: any = textBookListData.value[i] |
| | | if (item.id == select.id) { |
| | | item.check = true; |
| | | item.check = true |
| | | } else { |
| | | item.check = false; |
| | | item.check = false |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | const selectTextBookSubmit = () => { |
| | | const selectData: any = textBookListData.value.filter((item: any) => item.check)[0]; |
| | | const selectData: any = textBookListData.value.filter((item: any) => item.check)[0] |
| | | if (!selectData?.product?.id) { |
| | | ElMessage.warning("请选择开课教材!"); |
| | | return false; |
| | | ElMessage.warning('请选择开课教材!') |
| | | return false |
| | | } |
| | | formData.value.bookId = selectData.product.id; |
| | | formData.value.bookName = selectData.product.name; |
| | | formData.value.selectData = selectData; |
| | | selectTextBookDialog.value = false; |
| | | }; |
| | | formData.value.bookId = selectData.product.id |
| | | formData.value.bookName = selectData.product.name |
| | | formData.value.selectData = selectData |
| | | selectTextBookDialog.value = false |
| | | } |
| | | |
| | | const submit = () => { |
| | | submitLoading.value = true; |
| | | submitLoading.value = true |
| | | if (editData.value) { |
| | | MG.edu |
| | | .updateCourse({ |
| | |
| | | }), |
| | | }) |
| | | .then((ares: any) => { |
| | | ElMessage.success("课程已重新申请,等待管理员审核。"); |
| | | applyCourseDialog.value = false; |
| | | getData(); |
| | | }); |
| | | }); |
| | | ElMessage.success('课程已重新申请,等待管理员审核。') |
| | | applyCourseDialog.value = false |
| | | getData() |
| | | }) |
| | | }) |
| | | } else { |
| | | if (formData.value.name == "") { |
| | | if (formData.value.name == '') { |
| | | ElMessage({ |
| | | type: "warning", |
| | | message: "请填写课程名称", |
| | | }); |
| | | submitLoading.value = false; |
| | | return false; |
| | | type: 'warning', |
| | | message: '请填写课程名称', |
| | | }) |
| | | submitLoading.value = false |
| | | return false |
| | | } |
| | | if (!formData.value.bookId) { |
| | | ElMessage({ |
| | | type: "warning", |
| | | message: "请选择关联教材", |
| | | }); |
| | | submitLoading.value = false; |
| | | return false; |
| | | type: 'warning', |
| | | message: '请选择关联教材', |
| | | }) |
| | | submitLoading.value = false |
| | | return false |
| | | } |
| | | MG.edu |
| | | .applyNewCourse({ |
| | | name: formData.value.name, |
| | | description: formData.value.desc, |
| | | content: "", |
| | | icon: formData.value.selectData.product.icon ?? "default", |
| | | type: "course", |
| | | config: "", |
| | | content: '', |
| | | icon: formData.value.selectData.product.icon ?? 'default', |
| | | type: 'course', |
| | | config: '', |
| | | applyData: JSON.stringify({ |
| | | textBookId: formData.value.bookId, |
| | | textBookName: formData.value.bookName, |
| | |
| | | }) |
| | | .then((res: any) => { |
| | | if (res) { |
| | | ElMessage.success("课程已申请,等待管理员审核。"); |
| | | applyCourseDialog.value = false; |
| | | getData(); |
| | | ElMessage.success('课程已申请,等待管理员审核。') |
| | | applyCourseDialog.value = false |
| | | getData() |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | formData.value.selectData = ""; |
| | | formData.value.selectData = '' |
| | | setTimeout(() => { |
| | | submitLoading.value = false; |
| | | }, 1000); |
| | | }; |
| | | submitLoading.value = false |
| | | }, 1000) |
| | | } |
| | | |
| | | // 获取已购买的教材列表 |
| | | const textBookPages = reactive({ |
| | |
| | | pageSize: 12, |
| | | count: 0, |
| | | loading: false, |
| | | }); |
| | | const textBookListData = ref([]); |
| | | }) |
| | | const textBookListData = ref([]) |
| | | |
| | | const getTextBook = () => { |
| | | textBookPages.loading = true; |
| | | textBookPages.loading = true |
| | | const searchData = [ |
| | | { |
| | | keywords: "digitalTextbooks", |
| | | field: "ProductType", |
| | | keywords: 'digitalTextbooks', |
| | | field: 'ProductType', |
| | | }, |
| | | { |
| | | keywords: "mediaBook", |
| | | field: "ProductType", |
| | | keywords: 'mediaBook', |
| | | field: 'ProductType', |
| | | }, |
| | | { |
| | | keywords: selectName.value, |
| | | field: "ProductName", |
| | | field: 'ProductName', |
| | | }, |
| | | ]; |
| | | ] |
| | | const data = { |
| | | Size: textBookPages.pageSize, |
| | | Start: textBookPages.pageSize * textBookPages.page - textBookPages.pageSize, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate", |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | }, |
| | | searchList: searchData, |
| | | }; |
| | | } |
| | | MG.store |
| | | .getPurchasedProductList(data) |
| | | .then((res: any) => { |
| | | textBookPages.count = res.totalSize; |
| | | textBookPages.count = res.totalSize |
| | | textBookListData.value = res.datas.map((item: any) => { |
| | | return { |
| | | ...item, |
| | | img: item.product.icon ? getPublicImage(item.product.icon, 80) : defaultImg, |
| | | }; |
| | | }); |
| | | textBookPages.loading = false; |
| | | } |
| | | }) |
| | | textBookPages.loading = false |
| | | }) |
| | | .catch(() => { |
| | | textBookPages.loading = false; |
| | | }); |
| | | }; |
| | | textBookPages.loading = false |
| | | }) |
| | | } |
| | | |
| | | // 选择教材 |
| | | const selectBook = () => { |
| | | selectTextBookDialog.value = true; |
| | | textBookListData.value = []; |
| | | getTextBook(); |
| | | }; |
| | | selectTextBookDialog.value = true |
| | | textBookListData.value = [] |
| | | getTextBook() |
| | | } |
| | | |
| | | const pageChange = (val: any) => { |
| | | pages.page = val; |
| | | getData(); |
| | | }; |
| | | pages.page = val |
| | | getData() |
| | | } |
| | | const handleCurrentChange = (val: any) => { |
| | | textBookPages.page = val; |
| | | getTextBook(); |
| | | }; |
| | | textBookPages.page = val |
| | | getTextBook() |
| | | } |
| | | |
| | | const gotoDetail = (data: any) => { |
| | | if (data.applyState == "Normal") { |
| | | if (data.applyState == 'Normal') { |
| | | router.push({ |
| | | name: "courseDetail", |
| | | name: 'courseDetail', |
| | | query: { |
| | | courseId: data.id, |
| | | }, |
| | | }); |
| | | }) |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | |
| | | .courseItem { |
| | | float: left; |
| | | width: 46%; |
| | | width: 45%; |
| | | height: 210px; |
| | | margin: 0 2% 20px; |
| | | border-radius: 8px; |
| | |
| | | |
| | | .itemInfo { |
| | | padding: 10px 20px; |
| | | box-sizing: border-box; |
| | | flex: 1; |
| | | display: flex; |
| | | .imgBox { |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ArrowRight } from "@element-plus/icons-vue"; |
| | | import { menu } from "./config.ts"; |
| | | import { useRouter, onBeforeRouteUpdate } from "vue-router"; |
| | | import { ref, onMounted, inject } from "vue"; |
| | | const router = useRouter(); |
| | | const routerVal = router.currentRoute.value; |
| | | const path = ref(routerVal.path); |
| | | const label = ref(""); |
| | | const listMenu: any = ref([]); |
| | | const MG: any = inject("MG"); |
| | | const config: any = inject("config"); |
| | | import { ArrowRight } from '@element-plus/icons-vue' |
| | | import { menu } from './config' |
| | | import { useRouter, onBeforeRouteUpdate } from 'vue-router' |
| | | import { ref, onMounted, inject } from 'vue' |
| | | const router = useRouter() |
| | | const routerVal = router.currentRoute.value |
| | | const path = ref(routerVal.path) |
| | | const label = ref('') |
| | | const listMenu: any = ref([]) |
| | | const MG: any = inject('MG') |
| | | const config: any = inject('config') |
| | | onBeforeRouteUpdate(async (to, from) => { |
| | | path.value = to.fullPath; |
| | | }); |
| | | path.value = to.fullPath |
| | | }) |
| | | onMounted(() => { |
| | | menu.forEach((item) => { |
| | | if ("/" + item.path === path.value) { |
| | | label.value = item.label; |
| | | if ('/' + item.path === path.value) { |
| | | label.value = item.label |
| | | } |
| | | }); |
| | | const userCache: any = localStorage.getItem(config.userInfoKey); |
| | | const userInfo = JSON.parse(userCache); |
| | | }) |
| | | const userCache: any = localStorage.getItem(config.userInfoKey) |
| | | const userInfo = JSON.parse(userCache) |
| | | if (!userInfo) { |
| | | router.push({ |
| | | path: "/", |
| | | }); |
| | | return false; |
| | | path: '/', |
| | | }) |
| | | return false |
| | | } |
| | | if (userInfo.role == "Teacher") { |
| | | const data: any = menu.filter((item) => item.path != "myClass"); |
| | | listMenu.value = data; |
| | | } else { |
| | | const data: any = menu.filter((item) => item.path != "myCourse"); |
| | | listMenu.value = data; |
| | | } |
| | | }); |
| | | // if (userInfo.role == 'Teacher') { |
| | | // const data: any = menu.filter((item) => item.path != 'myClass') |
| | | // listMenu.value = data |
| | | // } else { |
| | | // const data: any = menu.filter((item) => item.path != 'myCourse') |
| | | // listMenu.value = data |
| | | // } |
| | | listMenu.value = menu |
| | | }) |
| | | const goRouter = (item: any) => { |
| | | if ( |
| | | !localStorage.getItem(config.tokenKey) || |
| | | localStorage.getItem(config.tokenKey) == null |
| | | ) { |
| | | if (!localStorage.getItem(config.tokenKey) || localStorage.getItem(config.tokenKey) == null) { |
| | | router.push({ |
| | | path: "/home", |
| | | path: '/home', |
| | | query: { |
| | | showLogin: "1", |
| | | showLogin: '1', |
| | | }, |
| | | }); |
| | | }) |
| | | } else { |
| | | label.value = item.label; |
| | | router.push({ path: item.path }); |
| | | label.value = item.label |
| | | router.push({ path: item.path }) |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .breadcrumbBox { |
| | |
| | | reviewstatusWait: item.state == 'WaitAudit', |
| | | }" |
| | | >{{ |
| | | item.state == "WaitAudit" |
| | | ? "审核中" |
| | | : item.state == "Normal" |
| | | ? "通过" |
| | | : "拒绝" |
| | | item.state == 'WaitAudit' ? '审核中' : item.state == 'Normal' ? '通过' : '拒绝' |
| | | }}</span |
| | | > |
| | | </div> |
| | |
| | | 试用期限:<span>{{ item.updateDate }}</span> -- |
| | | <span>{{ item.feedBack.endDate }}</span> |
| | | </div> |
| | | <div style="color: orangered" v-if="item.isExpiry"> |
| | | 阅读期限:<span>已过期</span> |
| | | </div> |
| | | <div style="color: orangered" v-if="item.isExpiry">阅读期限:<span>已过期</span></div> |
| | | <div class="time">申请时间:{{ item.updateDate }}</div> |
| | | </div> |
| | | <div |
| | | class="reasonForFailure" |
| | | style="margin: 10px 0" |
| | | v-if="item.state == 'Reject'" |
| | | > |
| | | <div class="reasonForFailure" style="margin: 10px 0" v-if="item.state == 'Reject'"> |
| | | <div class="centerVertically">未通过原因:</div> |
| | | <div |
| | | style="flex: 1" |
| | | class="ellipsis-3" |
| | | :title="item.feedBack.reason ? item.feedBack.reason : ' - '" |
| | | > |
| | | {{ item.feedBack.reason ? item.feedBack.reason : " - " }} |
| | | {{ item.feedBack.reason ? item.feedBack.reason : ' - ' }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { reactive, ref, onMounted, inject } from "vue"; |
| | | import { getPublicImage } from "@/assets/js/middleGround/tool"; |
| | | import { useRouter } from "vue-router"; |
| | | const MG: any = inject("MG"); |
| | | const config: any = inject("config"); |
| | | const router = useRouter(); |
| | | let listData = ref([]); |
| | | let loading = ref(false); |
| | | import { reactive, ref, onMounted, inject } from 'vue' |
| | | import { getPublicImage } from '@/assets/js/middleGround/tool' |
| | | import { useRouter } from 'vue-router' |
| | | import defaultImg from '@/assets/images/default-book-img.png' |
| | | const MG: any = inject('MG') |
| | | const config: any = inject('config') |
| | | const router = useRouter() |
| | | let listData = ref([]) |
| | | let loading = ref(false) |
| | | let paginationData = reactive({ |
| | | page: 1, |
| | | limit: 10, |
| | | totalCount: 0, |
| | | totalPage: 0, |
| | | }); |
| | | let inputPage = ref(1); |
| | | }) |
| | | let inputPage = ref(1) |
| | | |
| | | const getTextBookList = () => { |
| | | loading.value = true; |
| | | let { page, limit } = paginationData; |
| | | loading.value = true |
| | | let { page, limit } = paginationData |
| | | const data = { |
| | | start: limit * page - limit, |
| | | size: limit, |
| | | topicIdOrRefCode: "applyDigitalBook", |
| | | topicIdOrRefCode: 'applyDigitalBook', |
| | | appRefCode: config.appRefCode, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate", |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | }, |
| | | }; |
| | | } |
| | | MG.ugc.getTopicMessageList(data).then((res) => { |
| | | loading.value = false; |
| | | loading.value = false |
| | | res.datas.forEach((item) => { |
| | | item.icon = item.icon ? item.icon : getPublicImage(null); |
| | | item.updateDate = item.updateDate.split("T")[0]; |
| | | item.icon = item.icon ? item.icon : getPublicImage(null) |
| | | item.updateDate = item.updateDate.split('T')[0] |
| | | if (item.feedBack) { |
| | | item.feedBack = JSON.parse(item.feedBack); |
| | | item.feedBack = JSON.parse(item.feedBack) |
| | | if (item.feedBack.endDate) { |
| | | let times = new Date(item.feedBack.endDate + " 23:59:59").getTime(); |
| | | let times = new Date(item.feedBack.endDate + ' 23:59:59').getTime() |
| | | if (times < sessionStorage.currentDate) { |
| | | item.isExpiry = true; |
| | | item.isExpiry = true |
| | | } |
| | | } |
| | | } |
| | | if (item.content) { |
| | | item.content = JSON.parse(item.content)[0] ?? {}; |
| | | item.content = JSON.parse(item.content)[0] ?? {} |
| | | if (!item.content?.icon) { |
| | | item.content.icon = require("@/assets/images/default-book-img.png"); |
| | | item.content.icon = defaultImg |
| | | } |
| | | } |
| | | }); |
| | | paginationData.totalCount = res.totalSize; |
| | | paginationData.totalPage = Math.ceil(res.totalSize / limit); |
| | | listData.value = res.datas; |
| | | }); |
| | | }; |
| | | }) |
| | | paginationData.totalCount = res.totalSize |
| | | paginationData.totalPage = Math.ceil(res.totalSize / limit) |
| | | listData.value = res.datas |
| | | }) |
| | | } |
| | | onMounted(() => { |
| | | getTextBookList(); |
| | | }); |
| | | getTextBookList() |
| | | }) |
| | | |
| | | const toDetail = (item: any) => { |
| | | router.push({ |
| | | name: "digitalTextbooks-textbooksDetail", |
| | | name: 'digitalTextbooks-textbooksDetail', |
| | | query: { |
| | | id: item.id, |
| | | rootCmsItemId: item.rootCmsItemId, |
| | | }, |
| | | }); |
| | | }; |
| | | }) |
| | | } |
| | | const read = (pItem: any) => { |
| | | let token = MG.tool.getCookie(config.tokenKey); |
| | | window.open(config.textReaderUrl + "?bookId=" + pItem.refCode + "&token=" + token); |
| | | }; |
| | | let token = MG.tool.getCookie(config.tokenKey) |
| | | window.open(config.textReaderUrl + '?bookId=' + pItem.refCode + '&token=' + token) |
| | | } |
| | | const handleSizeChange = (val: number) => { |
| | | paginationData.limit = val; |
| | | getTextBookList(); |
| | | }; |
| | | paginationData.limit = val |
| | | getTextBookList() |
| | | } |
| | | const handleCurrentChange = (val: number) => { |
| | | paginationData.page = val; |
| | | getTextBookList(); |
| | | }; |
| | | paginationData.page = val |
| | | getTextBookList() |
| | | } |
| | | const jumpFun = (event: any) => { |
| | | event.target.blur(); |
| | | event.target.blur() |
| | | if (inputPage.value <= 0) { |
| | | inputPage.value = 1; |
| | | inputPage.value = 1 |
| | | } |
| | | if (inputPage.value > paginationData.totalPage) { |
| | | inputPage.value = paginationData.totalPage; |
| | | inputPage.value = paginationData.totalPage |
| | | } |
| | | paginationData.page = inputPage.value; |
| | | getTextBookList(); |
| | | }; |
| | | paginationData.page = inputPage.value |
| | | getTextBookList() |
| | | } |
| | | </script> |
| | | <style scoped lang="less"> |
| | | .myCarTopPage { |
| | |
| | | //表单的样式 |
| | | const cellStyle = ({ row, column, rowIndex, columnIndex }) => { |
| | | if (columnIndex === 4) { |
| | | return { color: "#FF6C00" }; |
| | | return { color: "#019e58" }; |
| | | } |
| | | }; |
| | | |
| | |
| | | MG.store.getShoppingCartProductList(query).then((res) => { |
| | | const newData = res.datas.map((item) => { |
| | | console.log(item.saleMethod.type, "item.saleMethod.type"); |
| | | if (item.productMonWithLinkDto.links[0].storeRefCode == "jsek_digitalTextbooks") { |
| | | if (item.productMonWithLinkDto.links[0].storeRefCode == "digitalTextbooks") { |
| | | item.typeTxt = "数字教材"; |
| | | item.productType = "数字教材"; |
| | | } else if ( |
| | |
| | | count: 0, |
| | | loading: false, |
| | | }); |
| | | let linkType = ref("FavoriteTextBooks"); |
| | | let linkType = ref("FavoriteBookCity"); |
| | | |
| | | const tabCart = (event: Event) => { |
| | | pages.page = 1; |
| | |
| | | collectList.value = []; |
| | | currentCollect.value = event.props.name; |
| | | if (currentCollect.value == "textBooks") { |
| | | linkType.value = "FavoriteTextBooks"; |
| | | linkType.value = "FavoriteBookCity"; |
| | | } |
| | | getDataList(); |
| | | }; |
| | |
| | | </div> |
| | | <span class="state">{{ |
| | | pItem.orderSaleMethod.product.cmsTypeRefCode == |
| | | "jsek_digitalTextbooks" |
| | | "digitalTextbooks" |
| | | ? "数字教材" |
| | | : pItem.orderSaleMethod.product.cmsTypeRefCode == |
| | | "jsek_digitalCourses" |
| | |
| | | <div class="info-box flex"> |
| | | <span class="label">用户名:</span> |
| | | <span class="text">{{ userStore?.userInfo.name }}</span> |
| | | <span class="change-info hover" @click="changeUserInfo('password')" |
| | | >修改密码</span |
| | | > |
| | | <span class="change-info hover" @click="changeUserInfo('password')">修改密码</span> |
| | | </div> |
| | | <div class="info-box flex"> |
| | | <span class="label">微信认证:</span> |
| | |
| | | }}</span> |
| | | <span class="text no" v-else>未绑定</span> |
| | | <span class="change-info hover" @click="changeUserInfo('phone')">{{ |
| | | userStore?.userInfo?.phoneNumber ? "更换手机号" : "绑定" |
| | | userStore?.userInfo?.phoneNumber ? '更换手机号' : '绑定' |
| | | }}</span> |
| | | </div> |
| | | <div class="info-box flex"> |
| | | <span class="label">邮箱:</span> |
| | | <span class="text">{{ |
| | | userStore?.userInfo?.Email ? userStore.userInfo?.Email : "--" |
| | | userStore?.userInfo?.Email ? userStore.userInfo?.Email : '--' |
| | | }}</span> |
| | | <span class="change-info hover" @click="changeUserInfo('email')">{{ |
| | | userStore?.userInfo?.Email ? "更换邮箱" : "绑定邮箱" |
| | | userStore?.userInfo?.Email ? '更换邮箱' : '绑定邮箱' |
| | | }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="content-item"> |
| | | <!-- <div class="content-item"> |
| | | <div class="item-title flex jc-sb"> |
| | | <span>用户类型</span> |
| | | <!-- <span class="change-info hover" @click="userTypeDialog = true">修改</span> --> |
| | | <span class="change-info hover" @click="updateUserInfo()">修改</span> |
| | | </div> |
| | | <div class="item-box"> |
| | |
| | | <span class="text">{{ userInfo.userType }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <div class="content-item"> |
| | | <div class="item-title flex jc-sb"> |
| | | <span>教师认证</span> |
| | | <div> |
| | | <span |
| | | class="change-info hover" |
| | | v-if="teacherState == ''" |
| | | @click="showTeacherDialog()" |
| | | <span class="change-info hover" v-if="teacherState == ''" @click="showTeacherDialog()" |
| | | >认证</span |
| | | > |
| | | <span |
| | |
| | | destroy-on-close |
| | | v-model="userInfoDialog" |
| | | :title=" |
| | | changeType == 'email' |
| | | ? '更换邮箱' |
| | | : changeType == 'password' |
| | | ? '修改密码' |
| | | : '更换手机号' |
| | | changeType == 'email' ? '更换邮箱' : changeType == 'password' ? '修改密码' : '更换手机号' |
| | | " |
| | | width="500" |
| | | class="myDialogs" |
| | |
| | | > |
| | | {{ |
| | | countDown > 0 |
| | | ? "验证码(" + countDown + "s)" |
| | | : changeType == "email" |
| | | ? "获取邮箱验证码" |
| | | : "获取短信验证码" |
| | | ? '验证码(' + countDown + 's)' |
| | | : changeType == 'email' |
| | | ? '获取邮箱验证码' |
| | | : '获取短信验证码' |
| | | }} |
| | | </el-button> |
| | | </div> |
| | |
| | | placeholder="请输入8-16位新密码,且不能为纯数字" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="确认密码:" |
| | | prop="confirmPassword" |
| | | v-if="changeType == 'password'" |
| | | > |
| | | <el-form-item label="确认密码:" prop="confirmPassword" v-if="changeType == 'password'"> |
| | | <el-input |
| | | type="password" |
| | | v-model="userInfoForm.confirmPassword" |
| | |
| | | <template #footer> |
| | | <span class="myDialogs-footer"> |
| | | <el-button @click="closeUserInfoDialog(userFormRef)">取消</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="confirmInfo(userFormRef)" |
| | | :loading="subLoading" |
| | | > |
| | | <el-button type="primary" @click="confirmInfo(userFormRef)" :loading="subLoading"> |
| | | 确定 |
| | | </el-button> |
| | | </span> |
| | |
| | | <li v-for="item in integralRecord.recordList" :key="item.key" class="body"> |
| | | <span class="label">{{ item.type }}</span> |
| | | <span class="value" :class="item.value > 0 ? 'yes' : 'no'">{{ |
| | | item.value > 0 ? "+" + item.value : item.value |
| | | item.value > 0 ? '+' + item.value : item.value |
| | | }}</span> |
| | | <span>{{ item.createDate ? item.createDate : "-" }}</span> |
| | | <span>{{ item.createDate ? item.createDate : '-' }}</span> |
| | | </li> |
| | | <li class="total" v-if="integralRecord.recordList.length > 0"> |
| | | <span class="label">总计</span> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { reactive, ref, inject, onMounted, watch } from "vue"; |
| | | import type { FormInstance, FormRules } from "element-plus"; |
| | | import { reactive, ref, inject, onMounted, watch } from 'vue' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | // import verify from '@/components/sliderImg/component/verify.vue' |
| | | // import '@/components/sliderImg/sliderImg.js' |
| | | // import '@/components/sliderImg/sliderImg.css' |
| | | import { ElMessage } from "element-plus"; |
| | | import tool from "@/assets/js/toolClass.js"; |
| | | import { useUserStore } from "@/store"; |
| | | import { ElMessage } from 'element-plus' |
| | | import tool from '@/assets/js/toolClass.js' |
| | | import { useUserStore } from '@/store' |
| | | // import wxlogin from 'vue-wxlogin' |
| | | import teacherCertification from "./teacherCertification.vue"; |
| | | import teacherCertification from './teacherCertification.vue' |
| | | import login from '@/layout/components/login.vue' |
| | | const userStore = useUserStore(); |
| | | import { useRoute } from "vue-router"; |
| | | import moment from "moment"; |
| | | const route = useRoute(); |
| | | const MG: any = inject("MG"); |
| | | const config: any = inject("config"); |
| | | const userStore = useUserStore() |
| | | import { useRoute } from 'vue-router' |
| | | import moment from 'moment' |
| | | const route = useRoute() |
| | | const MG: any = inject('MG') |
| | | const config: any = inject('config') |
| | | |
| | | const validatePhone = (rule: any, value: any, callback: any) => { |
| | | if (value === "") { |
| | | callback(new Error("请输入联系电话")); |
| | | if (value === '') { |
| | | callback(new Error('请输入联系电话')) |
| | | } else { |
| | | if (!config.reg_tel.test(value)) { |
| | | callback(new Error("请输入正确格式的电话")); |
| | | callback(new Error('请输入正确格式的电话')) |
| | | } |
| | | callback(); |
| | | callback() |
| | | } |
| | | }; |
| | | } |
| | | const validateEmail = (rule: any, value: any, callback: any) => { |
| | | let myreg = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/; |
| | | if (value === "") { |
| | | callback(new Error("请输入电子邮箱")); |
| | | let myreg = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/ |
| | | if (value === '') { |
| | | callback(new Error('请输入电子邮箱')) |
| | | } else { |
| | | if (!myreg.test(value)) { |
| | | callback(new Error("请输入正确格式的电子邮箱")); |
| | | callback(new Error('请输入正确格式的电子邮箱')) |
| | | } |
| | | callback(); |
| | | callback() |
| | | } |
| | | }; |
| | | } |
| | | |
| | | const validatePassword = (rule: any, value: any, callback: any) => { |
| | | let myreg = /^(?!^\d+$)(?!^[a-zA-Z]+$)(?!^\W+$)[a-zA-Z\d\W]{8,16}$/; |
| | | if (value === "") { |
| | | callback(new Error("请输入密码")); |
| | | let myreg = /^(?!^\d+$)(?!^[a-zA-Z]+$)(?!^\W+$)[a-zA-Z\d\W]{8,16}$/ |
| | | if (value === '') { |
| | | callback(new Error('请输入密码')) |
| | | } else { |
| | | if (!myreg.test(value)) { |
| | | callback(new Error("请输入正确格式的密码,8-16位,且不能为纯数字")); |
| | | callback(new Error('请输入正确格式的密码,8-16位,且不能为纯数字')) |
| | | } |
| | | callback(); |
| | | callback() |
| | | } |
| | | }; |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getWechatAuthenticationState(); |
| | | getIntegral(); |
| | | getWechatAuthenticationState() |
| | | getIntegral() |
| | | if (localStorage.getItem(config.tokenKey)) { |
| | | getUserRole(); |
| | | getUserRole() |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | // watch(route, () => { |
| | | // bindWeChat() |
| | | // }) |
| | | let subLoading = ref(false); |
| | | let subLoading = ref(false) |
| | | //用户信息 |
| | | let weChatState = ref(false); |
| | | let weChatState = ref(false) |
| | | const userInfo = reactive({ |
| | | userType: "", |
| | | userType: '', |
| | | integral: 0, |
| | | }); |
| | | }) |
| | | //基础信息 |
| | | const userInfoDialog = ref(false); |
| | | let changeType = ref("password"); |
| | | const imgCode = ref<string>(); // 图形验证码url |
| | | let countDown = ref(0); |
| | | const userInfoDialog = ref(false) |
| | | let changeType = ref('password') |
| | | const imgCode = ref<string>() // 图形验证码url |
| | | let countDown = ref(0) |
| | | |
| | | const changeUserInfo = (type) => { |
| | | changeType.value = type; |
| | | if (type == "password") { |
| | | changeType.value = type |
| | | if (type == 'password') { |
| | | if (userStore.userInfo?.phoneNumber) { |
| | | getImgCapcha(); |
| | | userInfoDialog.value = true; |
| | | getImgCapcha() |
| | | userInfoDialog.value = true |
| | | } else { |
| | | ElMessage({ |
| | | message: "修改密码需短信验证,请绑定手机号后再修改密码!", |
| | | type: "warning", |
| | | }); |
| | | message: '修改密码需短信验证,请绑定手机号后再修改密码!', |
| | | type: 'warning', |
| | | }) |
| | | } |
| | | } else { |
| | | getImgCapcha(); |
| | | userInfoDialog.value = true; |
| | | getImgCapcha() |
| | | userInfoDialog.value = true |
| | | } |
| | | }; |
| | | } |
| | | const getImgCapcha = () => { |
| | | MG.identity.getImgCode().then((res) => { |
| | | imgCode.value = "data:image/png;base64," + res; |
| | | }); |
| | | }; |
| | | imgCode.value = 'data:image/png;base64,' + res |
| | | }) |
| | | } |
| | | |
| | | const userFormRef = ref<FormInstance>(); |
| | | const userFormRef = ref<FormInstance>() |
| | | const userInfoForm = reactive({ |
| | | phone: "", |
| | | email: "", |
| | | captcha: "", |
| | | code: "", |
| | | password: "", |
| | | confirmPassword: "", |
| | | }); |
| | | const formDisabled = ref(false); |
| | | phone: '', |
| | | email: '', |
| | | captcha: '', |
| | | code: '', |
| | | password: '', |
| | | confirmPassword: '', |
| | | }) |
| | | const formDisabled = ref(false) |
| | | const userFormRules = reactive<FormRules<userInfoForm>>({ |
| | | phone: [{ required: true, validator: validatePhone, trigger: "blur" }], |
| | | email: [{ required: true, validator: validateEmail, trigger: "blur" }], |
| | | phone: [{ required: true, validator: validatePhone, trigger: 'blur' }], |
| | | email: [{ required: true, validator: validateEmail, trigger: 'blur' }], |
| | | captcha: [ |
| | | { required: true, message: "图形验证码不能为空", trigger: "blur" }, |
| | | { min: 4, max: 4, message: "请输入 4 位验证码", trigger: "blur" }, |
| | | { required: true, message: '图形验证码不能为空', trigger: 'blur' }, |
| | | { min: 4, max: 4, message: '请输入 4 位验证码', trigger: 'blur' }, |
| | | ], |
| | | code: [{ required: true, message: "验证码不能为空", trigger: "blur" }], |
| | | password: [{ required: true, validator: validatePassword, trigger: "blur" }], |
| | | confirmPassword: [{ required: true, message: "确认密码不能为空", trigger: "blur" }], |
| | | }); |
| | | code: [{ required: true, message: '验证码不能为空', trigger: 'blur' }], |
| | | password: [{ required: true, validator: validatePassword, trigger: 'blur' }], |
| | | confirmPassword: [{ required: true, message: '确认密码不能为空', trigger: 'blur' }], |
| | | }) |
| | | |
| | | const getVerifyCode = async () => { |
| | | sliderImgDialogVisable.value = true; |
| | | }; |
| | | sliderImgDialogVisable.value = true |
| | | } |
| | | |
| | | // 验证码倒计时 |
| | | function getSecond(time: number) { |
| | | let timer: ReturnType<typeof setInterval> | null = null; |
| | | let timer: ReturnType<typeof setInterval> | null = null |
| | | if (!timer) { |
| | | countDown.value = time; |
| | | countDown.value = time |
| | | timer = setInterval(() => { |
| | | countDown.value--; |
| | | countDown.value-- |
| | | if (countDown.value == 0) { |
| | | if (timer) clearInterval(timer); |
| | | timer = null; |
| | | if (timer) clearInterval(timer) |
| | | timer = null |
| | | } |
| | | }, 1000); |
| | | }, 1000) |
| | | } |
| | | } |
| | | |
| | | const closeUserInfoDialog = (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return; |
| | | formEl.resetFields(); |
| | | countDown.value = 0; |
| | | userInfoDialog.value = false; |
| | | }; |
| | | if (!formEl) return |
| | | formEl.resetFields() |
| | | countDown.value = 0 |
| | | userInfoDialog.value = false |
| | | } |
| | | const confirmInfo = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return; |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | subLoading.value = true; |
| | | if (changeType.value == "password") { |
| | | subLoading.value = true |
| | | if (changeType.value == 'password') { |
| | | if (userInfoForm.password != userInfoForm.confirmPassword) { |
| | | ElMessage({ |
| | | message: "两次密码输入不一致", |
| | | type: "warning", |
| | | }); |
| | | return false; |
| | | message: '两次密码输入不一致', |
| | | type: 'warning', |
| | | }) |
| | | return false |
| | | } |
| | | let query = { |
| | | phoneNumber: userInfoForm.phone, |
| | | phoneCaptcha: userInfoForm.code, |
| | | password: userInfoForm.password, |
| | | }; |
| | | } |
| | | MG.identity.changePasswordByMobilePhone(query).then((res) => { |
| | | if (res) { |
| | | ElMessage({ |
| | | message: "密码重置成功!", |
| | | type: "success", |
| | | }); |
| | | userInfoDialog.value = false; |
| | | message: '密码重置成功!', |
| | | type: 'success', |
| | | }) |
| | | userInfoDialog.value = false |
| | | } else { |
| | | ElMessage({ |
| | | message: "密码重置失败,请填写正确的验证码。", |
| | | type: "error", |
| | | }); |
| | | message: '密码重置失败,请填写正确的验证码。', |
| | | type: 'error', |
| | | }) |
| | | } |
| | | subLoading.value = false; |
| | | }); |
| | | } else if (changeType.value == "phone") { |
| | | subLoading.value = false |
| | | }) |
| | | } else if (changeType.value == 'phone') { |
| | | let query = { |
| | | phoneNumber: userInfoForm.phone, |
| | | phoneCaptcha: userInfoForm.code, |
| | | }; |
| | | } |
| | | MG.identity.userSetPhoneNumber(query).then((res) => { |
| | | if (res == "验证码过期或错误") { |
| | | if (res == '验证码过期或错误') { |
| | | ElMessage({ |
| | | message: res + ",请稍后重试", |
| | | type: "error", |
| | | }); |
| | | } else if (res == "此手机号码已被其它账号绑定") { |
| | | message: res + ',请稍后重试', |
| | | type: 'error', |
| | | }) |
| | | } else if (res == '此手机号码已被其它账号绑定') { |
| | | ElMessage({ |
| | | message: res + ",请更换其他手机号。", |
| | | type: "error", |
| | | }); |
| | | message: res + ',请更换其他手机号。', |
| | | type: 'error', |
| | | }) |
| | | } else { |
| | | ElMessage({ |
| | | message: res, |
| | | type: "success", |
| | | }); |
| | | type: 'success', |
| | | }) |
| | | userStore.setUserInfo({ |
| | | ...userStore.userInfo, |
| | | phoneNumber: userInfoForm.phone, |
| | | }); |
| | | userInfoDialog.value = false; |
| | | }) |
| | | userInfoDialog.value = false |
| | | } |
| | | subLoading.value = false; |
| | | }); |
| | | } else if (changeType.value == "email") { |
| | | subLoading.value = false |
| | | }) |
| | | } else if (changeType.value == 'email') { |
| | | let query = { |
| | | eMail: userInfoForm.email, |
| | | captcha: userInfoForm.code, |
| | | }; |
| | | } |
| | | |
| | | MG.identity.bindingEmail(query).then((res) => { |
| | | if (res == "验证码过期") { |
| | | if (res == '验证码过期') { |
| | | ElMessage({ |
| | | message: res + ",请稍后重试", |
| | | type: "error", |
| | | }); |
| | | } else if (res == "此邮箱已被其它账号绑定") { |
| | | message: res + ',请稍后重试', |
| | | type: 'error', |
| | | }) |
| | | } else if (res == '此邮箱已被其它账号绑定') { |
| | | ElMessage({ |
| | | message: res + ",请更换其他邮箱。", |
| | | type: "error", |
| | | }); |
| | | } else if (res == "验证码无效") { |
| | | message: res + ',请更换其他邮箱。', |
| | | type: 'error', |
| | | }) |
| | | } else if (res == '验证码无效') { |
| | | ElMessage({ |
| | | message: res, |
| | | type: "error", |
| | | }); |
| | | type: 'error', |
| | | }) |
| | | } else { |
| | | ElMessage({ |
| | | message: res, |
| | | type: "success", |
| | | }); |
| | | type: 'success', |
| | | }) |
| | | userStore.setUserInfo({ |
| | | ...userStore.userInfo, |
| | | Email: userInfoForm.email, |
| | | }); |
| | | userInfoDialog.value = false; |
| | | }) |
| | | userInfoDialog.value = false |
| | | } |
| | | subLoading.value = false; |
| | | }); |
| | | subLoading.value = false |
| | | }) |
| | | } |
| | | } else { |
| | | subLoading.value = false; |
| | | subLoading.value = false |
| | | } |
| | | }); |
| | | }; |
| | | }) |
| | | } |
| | | // 滑动验证 |
| | | const sliderImgDialogVisable = ref<boolean>(false); |
| | | const sliderImgDialogVisable = ref<boolean>(false) |
| | | const loginImgVerify = (code: string) => { |
| | | userInfoForm.captcha = code; |
| | | sliderImgDialogVisable.value = false; |
| | | if (changeType.value == "phone" || changeType.value == "password") { |
| | | userInfoForm.captcha = code |
| | | sliderImgDialogVisable.value = false |
| | | if (changeType.value == 'phone' || changeType.value == 'password') { |
| | | MG.identity |
| | | .getPhoneCode({ |
| | | phoneNumber: userInfoForm.phone, |
| | |
| | | appRefCode: config.appRefCode, |
| | | }) |
| | | .then((res: any) => { |
| | | if (res == "验证码发送成功") { |
| | | if (res == '验证码发送成功') { |
| | | ElMessage({ |
| | | message: res, |
| | | type: "success", |
| | | }); |
| | | type: 'success', |
| | | }) |
| | | // 开启短信验证倒计时 |
| | | getSecond(60); |
| | | getSecond(60) |
| | | } else { |
| | | ElMessage({ |
| | | message: res, |
| | | type: "error", |
| | | }); |
| | | type: 'error', |
| | | }) |
| | | } |
| | | }); |
| | | } else if (changeType.value == "email") { |
| | | }) |
| | | } else if (changeType.value == 'email') { |
| | | MG.identity |
| | | .getEmailCode({ |
| | | sendEmail: userInfoForm.email, |
| | |
| | | .then((res) => { |
| | | if (res == true) { |
| | | ElMessage({ |
| | | message: "邮件已发送", |
| | | type: "success", |
| | | }); |
| | | message: '邮件已发送', |
| | | type: 'success', |
| | | }) |
| | | } else { |
| | | ElMessage({ |
| | | message: "邮件发送失败", |
| | | type: "error", |
| | | }); |
| | | message: '邮件发送失败', |
| | | type: 'error', |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }; |
| | | } |
| | | //微信认证 |
| | | let wxLogin = reactive({ |
| | | appid: "wx5cfe8b007a3c6f8c", |
| | | scope: "snsapi_login", |
| | | redirectURL: encodeURIComponent(config.requestCtx + "/home/#/personalCenter"), |
| | | }); |
| | | appid: 'wx5cfe8b007a3c6f8c', |
| | | scope: 'snsapi_login', |
| | | redirectURL: encodeURIComponent(config.requestCtx + '/home/#/personalCenter'), |
| | | }) |
| | | const getWechatAuthenticationState = () => { |
| | | MG.identity.checkBuildingWeChat({}).then((res: any) => { |
| | | if (res) { |
| | | weChatState.value = true; |
| | | weChatState.value = true |
| | | } else { |
| | | weChatState.value = false; |
| | | weChatState.value = false |
| | | } |
| | | }); |
| | | }; |
| | | const weChartDialog = ref(false); |
| | | }) |
| | | } |
| | | const weChartDialog = ref(false) |
| | | function goBindWeChat() { |
| | | window.location.href = `https://open.weixin.qq.com/connect/qrconnect?appid=${wxLogin.appid}&scope=${wxLogin.scope}&redirect_uri=${wxLogin.redirectURL}&state=WeChatScanningCodeBind`; |
| | | window.location.href = `https://open.weixin.qq.com/connect/qrconnect?appid=${wxLogin.appid}&scope=${wxLogin.scope}&redirect_uri=${wxLogin.redirectURL}&state=WeChatScanningCodeBind` |
| | | } |
| | | |
| | | //绑定微信 |
| | | const bindWeChat = () => { |
| | | var url = window.location.href; |
| | | if (url.indexOf("WeChatScanningCodeBind") > -1) { |
| | | var querys = url.substring(url.indexOf("?") + 1).split("&"); |
| | | var result = {}; |
| | | var url = window.location.href |
| | | if (url.indexOf('WeChatScanningCodeBind') > -1) { |
| | | var querys = url.substring(url.indexOf('?') + 1).split('&') |
| | | var result = {} |
| | | for (var i = 0; i < querys.length; i++) { |
| | | var temp = querys[i].split("="); |
| | | var temp = querys[i].split('=') |
| | | if (temp.length < 2) { |
| | | result[temp[0]] = ""; |
| | | result[temp[0]] = '' |
| | | } else { |
| | | result[temp[0]] = temp[1]; |
| | | result[temp[0]] = temp[1] |
| | | } |
| | | } |
| | | if (result && result.code) { |
| | |
| | | .then((res) => { |
| | | if (res) { |
| | | ElMessage({ |
| | | message: "绑定成功!", |
| | | type: "success", |
| | | }); |
| | | getWechatAuthenticationState(); |
| | | weChartDialog.value = false; |
| | | message: '绑定成功!', |
| | | type: 'success', |
| | | }) |
| | | getWechatAuthenticationState() |
| | | weChartDialog.value = false |
| | | } else { |
| | | ElMessage({ |
| | | message: "绑定失败,该微信已被绑定!", |
| | | type: "error", |
| | | }); |
| | | message: '绑定失败,该微信已被绑定!', |
| | | type: 'error', |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | //用户类型 |
| | | const loginRef = ref(); |
| | | const loginRef = ref() |
| | | // const userTypeDialog = ref(false) |
| | | const userTypeActive = ref(""); |
| | | const teacherType = ref(""); |
| | | const userTypeActive = ref('') |
| | | const teacherType = ref('') |
| | | const teacherList = ref([ |
| | | { |
| | | value: "vocSchoolTeachers", |
| | | label: "中职教师", |
| | | value: 'vocSchoolTeachers', |
| | | label: '中职教师', |
| | | }, |
| | | { |
| | | value: "vocCollegeTeachers", |
| | | label: "高职教师", |
| | | value: 'vocCollegeTeachers', |
| | | label: '高职教师', |
| | | }, |
| | | { |
| | | value: "ordUniversityTeachers", |
| | | label: "本科教师", |
| | | value: 'ordUniversityTeachers', |
| | | label: '本科教师', |
| | | }, |
| | | { |
| | | value: "primarySchoolTeachers", |
| | | label: "中小学教师", |
| | | value: 'primarySchoolTeachers', |
| | | label: '中小学教师', |
| | | }, |
| | | { |
| | | value: "kindergarteTeachers", |
| | | label: "幼儿园教师", |
| | | value: 'kindergarteTeachers', |
| | | label: '幼儿园教师', |
| | | }, |
| | | ]); |
| | | ]) |
| | | const userTypeList = ref([ |
| | | { |
| | | value: "Teacher", |
| | | label: "教师", |
| | | value: 'Teacher', |
| | | label: '教师', |
| | | checked: false, |
| | | }, |
| | | { |
| | | value: "Student", |
| | | label: "学生", |
| | | value: 'Student', |
| | | label: '学生', |
| | | checked: false, |
| | | }, |
| | | { |
| | | value: "otherReaders", |
| | | label: "其他读者", |
| | | value: 'otherReaders', |
| | | label: '其他读者', |
| | | checked: false, |
| | | }, |
| | | ]); |
| | | ]) |
| | | |
| | | // 修改用户类型调用注册时用户信息填写弹窗 |
| | | const updateUserInfo = () => { |
| | | loginRef.value.updateUserInfo(); |
| | | loginRef.value.signUp(); |
| | | }; |
| | | loginRef.value.updateUserInfo() |
| | | loginRef.value.signUp() |
| | | } |
| | | |
| | | //教师认证 |
| | | let teacherDialog = ref(false); //弹窗 |
| | | let loading = ref(false); |
| | | const teacherState = ref(null); |
| | | const reasonTxt = ref(""); |
| | | const userId = ref(); |
| | | let teacherDialog = ref(false) //弹窗 |
| | | let loading = ref(false) |
| | | const teacherState = ref(null) |
| | | const reasonTxt = ref('') |
| | | const userId = ref() |
| | | |
| | | const dialogReason = ref(false); |
| | | const dialogReason = ref(false) |
| | | //教师认证弹窗 |
| | | function showTeacherDialog() { |
| | | teacherDialog.value = true; |
| | | teacherDialog.value = true |
| | | } |
| | | |
| | | const dialogChange = (val: any) => { |
| | | getTeacherInfo(); |
| | | getTeacherInfo() |
| | | if (val == false) { |
| | | teacherDialog.value = false; |
| | | teacherDialog.value = false |
| | | } else { |
| | | teacherDialog.value = true; |
| | | teacherDialog.value = true |
| | | } |
| | | }; |
| | | } |
| | | |
| | | // 修改密码弹窗打开 |
| | | const openChangePassword = () => { |
| | | if (changeType.value == "password" && userStore.userInfo?.phoneNumber) { |
| | | userInfoForm.phone = userStore.userInfo?.phoneNumber; |
| | | if (changeType.value == 'password' && userStore.userInfo?.phoneNumber) { |
| | | userInfoForm.phone = userStore.userInfo?.phoneNumber |
| | | } |
| | | }; |
| | | } |
| | | |
| | | // 获取登录用户身份 |
| | | function getUserRole() { |
| | | loading.value = true; |
| | | loading.value = true |
| | | MG.identity.getCurrentAppUser().then((res: any) => { |
| | | if (res) { |
| | | if (res.lastLoginTime) { |
| | | localStorage.setItem("lastLoginTime", res.lastLoginTime); |
| | | localStorage.setItem('lastLoginTime', res.lastLoginTime) |
| | | } |
| | | //获取用户类型 |
| | | let userTypeData = res.infoList.find((item: any) => item.type == "userType"); |
| | | let userTypeData = res.infoList.find((item: any) => item.type == 'userType') |
| | | if (userTypeData) { |
| | | userTypeActive.value = JSON.parse(userTypeData.data).userType; |
| | | if ( |
| | | userTypeActive.value !== "Student" && |
| | | userTypeActive.value !== "otherReaders" |
| | | ) { |
| | | const index = userTypeList.value.findIndex((item) => item.value === "Teacher"); |
| | | userTypeActive.value = JSON.parse(userTypeData.data).userType |
| | | if (userTypeActive.value !== 'Student' && userTypeActive.value !== 'otherReaders') { |
| | | const index = userTypeList.value.findIndex((item) => item.value === 'Teacher') |
| | | if (index !== -1) { |
| | | userTypeList.value[index].checked = true; |
| | | teacherType.value = JSON.parse(userTypeData.data).userType; |
| | | userTypeList.value[index].checked = true |
| | | teacherType.value = JSON.parse(userTypeData.data).userType |
| | | } |
| | | userInfo.userType = |
| | | teacherList.value.find((item) => item.value === userTypeActive.value) |
| | | ?.label ?? ""; |
| | | teacherList.value.find((item) => item.value === userTypeActive.value)?.label ?? '' |
| | | } else { |
| | | const index = userTypeList.value.findIndex( |
| | | (item) => item.value === userTypeActive.value |
| | | ); |
| | | const index = userTypeList.value.findIndex((item) => item.value === userTypeActive.value) |
| | | if (index !== -1) { |
| | | userTypeList.value[index].checked = true; |
| | | userTypeList.value[index].checked = true |
| | | } |
| | | userInfo.userType = |
| | | userTypeList.value.find((item) => item.value === userTypeActive.value) |
| | | ?.label ?? ""; |
| | | userTypeList.value.find((item) => item.value === userTypeActive.value)?.label ?? '' |
| | | } |
| | | } else { |
| | | userInfo.userType = "-"; |
| | | userInfo.userType = '-' |
| | | } |
| | | getTeacherInfo(); |
| | | userId.value = res.userId; |
| | | let customUser = res.infoList.find((item: any) => item.type == "userInfo"); |
| | | let teacherRole = res.roleLinks.find((item: any) => item.role.refCode == "teacher"); |
| | | let teacherInfos = res.infoList.find((item: any) => item.type == "teacherInfo"); |
| | | let wechatInfo = res.infoList.find((item: any) => item.type == "WeChat"); |
| | | let studentInfo = res.infoList.find((item: any) => item.type == "Default"); |
| | | let phoneInfo = res.secretList.find((item: any) => item.type == "MobilePhone"); |
| | | let emailInfo = res.secretList.find((item: any) => item.type == "EMail"); |
| | | getTeacherInfo() |
| | | userId.value = res.userId |
| | | let customUser = res.infoList.find((item: any) => item.type == 'userInfo') |
| | | let teacherRole = res.roleLinks.find((item: any) => item.role.refCode == 'teacher') |
| | | let teacherInfos = res.infoList.find((item: any) => item.type == 'teacherInfo') |
| | | let wechatInfo = res.infoList.find((item: any) => item.type == 'WeChat') |
| | | let studentInfo = res.infoList.find((item: any) => item.type == 'Default') |
| | | let phoneInfo = res.secretList.find((item: any) => item.type == 'MobilePhone') |
| | | let emailInfo = res.secretList.find((item: any) => item.type == 'EMail') |
| | | const userData = { |
| | | userName: customUser && customUser.data ? JSON.parse(customUser.data).name : "", |
| | | school: customUser && customUser.data ? JSON.parse(customUser.data).school : "", |
| | | cityCode: |
| | | customUser && customUser.data ? JSON.parse(customUser.data).cityCode : "", |
| | | address: customUser && customUser.data ? JSON.parse(customUser.data).address : "", |
| | | userType: |
| | | userTypeData && userTypeData.data ? JSON.parse(userTypeData.data).userType : "", |
| | | }; |
| | | userName: customUser && customUser.data ? JSON.parse(customUser.data).name : '', |
| | | school: customUser && customUser.data ? JSON.parse(customUser.data).school : '', |
| | | cityCode: customUser && customUser.data ? JSON.parse(customUser.data).cityCode : '', |
| | | address: customUser && customUser.data ? JSON.parse(customUser.data).address : '', |
| | | userType: userTypeData && userTypeData.data ? JSON.parse(userTypeData.data).userType : '', |
| | | } |
| | | if (teacherRole && teacherInfos) { |
| | | if (JSON.parse(teacherInfos.data).email && !emailInfo) { |
| | | userInfoForm.email = JSON.parse(teacherInfos.data).email; |
| | | formDisabled.value = true; |
| | | userInfoForm.email = JSON.parse(teacherInfos.data).email |
| | | formDisabled.value = true |
| | | } |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo ? emailInfo.credential : JSON.parse(teacherInfos.data).email, |
| | | icon: wechatInfo?.icon, |
| | | role: "Teacher", |
| | | role: 'Teacher', |
| | | roleId: teacherRole.role.id, |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } else if (wechatInfo) { |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | | ...wechatInfo, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: "Student", |
| | | role: 'Student', |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } else if (studentInfo) { |
| | | userStore.setUserInfo({ |
| | | ...userData, |
| | |
| | | icon: wechatInfo?.icon, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: "Student", |
| | | role: 'Student', |
| | | userId: res.userId, |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | //教师信息 |
| | |
| | | const data = { |
| | | start: 0, |
| | | size: 10, |
| | | topicIdOrRefCode: "teacherRoleApproval", |
| | | topicIdOrRefCode: 'teacherRoleApproval', |
| | | appRefCode: config.appRefCode, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate", |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | }, |
| | | }; |
| | | } |
| | | MG.ugc.getTopicMessageList(data).then((res) => { |
| | | try { |
| | | const resData = res.datas.find((i) => i.appUserCreator.userId == userId.value); |
| | | const resData = res.datas.find((i) => i.appUserCreator.userId == userId.value) |
| | | if (resData) { |
| | | teacherState.value = resData.state; |
| | | teacherState.value = resData.state |
| | | if (resData.feedBack != null) { |
| | | reasonTxt.value = JSON.parse(resData.feedBack).reason; |
| | | reasonTxt.value = JSON.parse(resData.feedBack).reason |
| | | } |
| | | } else { |
| | | teacherState.value = ""; |
| | | teacherState.value = '' |
| | | } |
| | | loading.value = false; |
| | | loading.value = false |
| | | } catch (error) { |
| | | loading.value = false; |
| | | loading.value = false |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | //原因查看 |
| | | const lookReason = () => { |
| | | dialogReason.value = true; |
| | | }; |
| | | dialogReason.value = true |
| | | } |
| | | |
| | | //积分 |
| | | function getIntegral() { |
| | | MG.store |
| | | .getUserWallet({ |
| | | type: "integral", |
| | | type: 'integral', |
| | | }) |
| | | .then((res) => { |
| | | userInfo.integral = res.balance; |
| | | }); |
| | | userInfo.integral = res.balance |
| | | }) |
| | | } |
| | | |
| | | const integralRecord = reactive({ |
| | | recordDialog: false, |
| | | recordList: [], |
| | | }); |
| | | }) |
| | | |
| | | // 积分记录弹窗 |
| | | function recordDialog() { |
| | | integralRecord.recordDialog = true; |
| | | getRecordList(); |
| | | integralRecord.recordDialog = true |
| | | getRecordList() |
| | | } |
| | | |
| | | //获取积分记录 |
| | |
| | | Size: 999, |
| | | Start: 0, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate", |
| | | type: 'Desc', |
| | | field: 'CreateDate', |
| | | }, |
| | | type: "integral", |
| | | type: 'integral', |
| | | }) |
| | | .then((res) => { |
| | | console.log(res, "积分记录"); |
| | | console.log(res, '积分记录') |
| | | if (res.datas.length > 0) { |
| | | res.datas.forEach((element) => { |
| | | element.createDate = moment(element.createDate).format("YYYY-MM-DD HH:mm:ss"); |
| | | if (element.refType == "sign") { |
| | | element.type = "每日登录"; |
| | | element.createDate = moment(element.createDate).format('YYYY-MM-DD HH:mm:ss') |
| | | if (element.refType == 'sign') { |
| | | element.type = '每日登录' |
| | | } |
| | | if (element.refType == "Reward") { |
| | | element.type = "上传资源奖励"; |
| | | if (element.refType == 'Reward') { |
| | | element.type = '上传资源奖励' |
| | | } |
| | | if (element.refType == "OrderCoinBonus") { |
| | | element.type = "订单支付奖励"; |
| | | if (element.refType == 'OrderCoinBonus') { |
| | | element.type = '订单支付奖励' |
| | | } |
| | | if (element.refType == "Order" && element.value < 0) { |
| | | element.type = "订单支付抵扣"; |
| | | if (element.refType == 'Order' && element.value < 0) { |
| | | element.type = '订单支付抵扣' |
| | | } |
| | | if (element.refType == "Order" && element.value > 0) { |
| | | element.type = "订单取消退回"; |
| | | if (element.refType == 'Order' && element.value > 0) { |
| | | element.type = '订单取消退回' |
| | | } |
| | | if (element.refType == "AdminRecharge") { |
| | | element.type = "管理员充值"; |
| | | if (element.refType == 'AdminRecharge') { |
| | | element.type = '管理员充值' |
| | | } |
| | | }); |
| | | integralRecord.recordList = res.datas; |
| | | }) |
| | | integralRecord.recordList = res.datas |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | line-height: 20px; |
| | | padding: 0 10px; |
| | | border-left: 3px solid #019e58; |
| | | font-family: Microsoft YaHei UI, Microsoft YaHei UI; |
| | | font-family: |
| | | Microsoft YaHei UI, |
| | | Microsoft YaHei UI; |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | } |
| | |
| | | |
| | | .info-box { |
| | | padding: 10px 0; |
| | | font-family: Microsoft YaHei UI, Microsoft YaHei UI; |
| | | font-family: |
| | | Microsoft YaHei UI, |
| | | Microsoft YaHei UI; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: #333333; |