diff --git a/.env.development b/.env.development index b10b50c..d4989df 100644 --- a/.env.development +++ b/.env.development @@ -9,7 +9,7 @@ VITE_APP_BASE_API = '/dev-api' VITE_APP_DOMAIN = 'file.ysaix.com' -VITE_APP_UPLOAD_API = 'http://192.168.2.52:7863' +VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api' VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/' diff --git a/package.json b/package.json index 5c5797a..1bdad80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "1.0.7", + "version": "1.1.0", "description": "An Electron application with Vue", "main": "./out/main/index.js", "author": "example.com", diff --git a/src/main/file.js b/src/main/file.js index d3eede2..348c703 100644 --- a/src/main/file.js +++ b/src/main/file.js @@ -146,7 +146,7 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) { //使用默认应用打开本地文件 ipcMain.on('open-path-app', (e, destination) => { let path = appRootFilePath + destination - shell.openExternal(path).catch((error) => { + shell.openPath(path).catch((error) => { console.log(error) }) }) diff --git a/src/main/index.js b/src/main/index.js index cd47007..c6313dd 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -28,6 +28,7 @@ function createLoginWindow() { icon: join(__dirname, '../../resources/logo2.ico'), ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { + defaultEncoding: 'utf-8', preload: join(__dirname, '../preload/index.js'), sandbox: false, nodeIntegration: true, @@ -67,6 +68,7 @@ function createMainWindow() { icon: join(__dirname, '../../resources/logo2.ico'), ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { + defaultEncoding: 'utf-8', preload: join(__dirname, '../preload/index.js'), sandbox: false, // nodeIntegration: true, @@ -115,6 +117,7 @@ async function createLinkWin(data) { autoHideMenuBar: true, ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { + defaultEncoding: 'utf-8', sandbox: false, nodeIntegration: true, worldSafeExecuteJavaScript: true, @@ -126,12 +129,8 @@ async function createLinkWin(data) { let cookieDetails = { ...data.cookieData } await linkWin[data.key].webContents.session.cookies .set(cookieDetails) - .then(() => { - console.log('Cookie is successful') - }) - .catch((error) => { - console.error('Cookie is error', error) - }) + .then(() => {}) + .catch((error) => {}) data.fullPath = data.fullPath.replaceAll('//', '/') linkWin[data.key].loadURL(data.fullPath) @@ -147,6 +146,8 @@ async function createLinkWin(data) { // 初始化完成 app.on('ready', () => { + process.env.LANG = 'en_US.UTF-8' + process.env['ELECTRON_DISABLE_SANDBOX'] = true; // 设置应用程序用户模型标识符 electronApp.setAppUserModelId('com.electron') diff --git a/src/renderer/src/api/classManage/index.js b/src/renderer/src/api/classManage/index.js index 6db5913..923c722 100644 --- a/src/renderer/src/api/classManage/index.js +++ b/src/renderer/src/api/classManage/index.js @@ -159,11 +159,11 @@ export function deleteSmartReserv(id) { method: 'delete' }) } -export function startClass(id) { +export function startClass(id, ex3) { return request({ url: '/smarttalk/classReserv/startClass', method: 'get', - params: {id} + params: {id, ex3} }) } export function endClass(id) { diff --git a/src/renderer/src/assets/iconfont/iconfont.css b/src/renderer/src/assets/iconfont/iconfont.css index fd25490..696d349 100644 --- a/src/renderer/src/assets/iconfont/iconfont.css +++ b/src/renderer/src/assets/iconfont/iconfont.css @@ -1,9 +1,9 @@ @font-face { font-family: "iconfont"; /* Project id 2794390 */ - src: url('iconfont.woff2?t=1723452423265') format('woff2'), - url('iconfont.woff?t=1723452423265') format('woff'), - url('iconfont.ttf?t=1723452423265') format('truetype'), - url('iconfont.svg?t=1723452423265#iconfont') format('svg'); + src: url('iconfont.woff2?t=1723453634574') format('woff2'), + url('iconfont.woff?t=1723453634574') format('woff'), + url('iconfont.ttf?t=1723453634574') format('truetype'), + url('iconfont.svg?t=1723453634574#iconfont') format('svg'); } .iconfont { @@ -14,6 +14,10 @@ -moz-osx-font-smoothing: grayscale; } +.icon-arrangement:before { + content: "\e656"; +} + .icon-zanwushuju:before { content: "\e655"; } diff --git a/src/renderer/src/assets/iconfont/iconfont.js b/src/renderer/src/assets/iconfont/iconfont.js index ed5d6de..a7091de 100644 --- a/src/renderer/src/assets/iconfont/iconfont.js +++ b/src/renderer/src/assets/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_2794390='',function(l){var h=(h=document.getElementsByTagName("script"))[h.length-1],c=h.getAttribute("data-injectcss"),h=h.getAttribute("data-disable-injectsvg");if(!h){var a,v,t,z,i,p=function(h,c){c.parentNode.insertBefore(h,c)};if(c&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(h){console&&console.log(h)}}a=function(){var h,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_2794390,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(h=document.body).firstChild?p(c,h.firstChild):h.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(v=function(){document.removeEventListener("DOMContentLoaded",v,!1),a()},document.addEventListener("DOMContentLoaded",v,!1)):document.attachEvent&&(t=a,z=l.document,i=!1,o(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,M())})}function M(){i||(i=!0,t())}function o(){try{z.documentElement.doScroll("left")}catch(h){return void setTimeout(o,50)}M()}}(window); \ No newline at end of file +window._iconfont_svg_string_2794390='',function(l){var h=(h=document.getElementsByTagName("script"))[h.length-1],c=h.getAttribute("data-injectcss"),h=h.getAttribute("data-disable-injectsvg");if(!h){var a,v,t,z,i,p=function(h,c){c.parentNode.insertBefore(h,c)};if(c&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(h){console&&console.log(h)}}a=function(){var h,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_2794390,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(h=document.body).firstChild?p(c,h.firstChild):h.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(v=function(){document.removeEventListener("DOMContentLoaded",v,!1),a()},document.addEventListener("DOMContentLoaded",v,!1)):document.attachEvent&&(t=a,z=l.document,i=!1,o(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,M())})}function M(){i||(i=!0,t())}function o(){try{z.documentElement.doScroll("left")}catch(h){return void setTimeout(o,50)}M()}}(window); \ No newline at end of file diff --git a/src/renderer/src/assets/iconfont/iconfont.json b/src/renderer/src/assets/iconfont/iconfont.json index fd3dafa..27f830f 100644 --- a/src/renderer/src/assets/iconfont/iconfont.json +++ b/src/renderer/src/assets/iconfont/iconfont.json @@ -5,6 +5,13 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "4978988", + "name": "作业-布置作业", + "font_class": "arrangement", + "unicode": "e656", + "unicode_decimal": 58966 + }, { "icon_id": "9689424", "name": "暂无数据", diff --git a/src/renderer/src/assets/iconfont/iconfont.svg b/src/renderer/src/assets/iconfont/iconfont.svg index 99a0abf..d9830a0 100644 --- a/src/renderer/src/assets/iconfont/iconfont.svg +++ b/src/renderer/src/assets/iconfont/iconfont.svg @@ -14,6 +14,8 @@ /> + + diff --git a/src/renderer/src/assets/iconfont/iconfont.ttf b/src/renderer/src/assets/iconfont/iconfont.ttf index 477afd5..1d65d03 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.ttf and b/src/renderer/src/assets/iconfont/iconfont.ttf differ diff --git a/src/renderer/src/assets/iconfont/iconfont.woff b/src/renderer/src/assets/iconfont/iconfont.woff index 397925d..caf53bc 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.woff and b/src/renderer/src/assets/iconfont/iconfont.woff differ diff --git a/src/renderer/src/assets/iconfont/iconfont.woff2 b/src/renderer/src/assets/iconfont/iconfont.woff2 index 7f2c06e..a1b77bc 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.woff2 and b/src/renderer/src/assets/iconfont/iconfont.woff2 differ diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index bdd14b9..9c02172 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -42,7 +42,7 @@ diff --git a/src/renderer/src/views/tool/components/homework.vue b/src/renderer/src/views/tool/components/homework.vue index 396b780..ce13160 100644 --- a/src/renderer/src/views/tool/components/homework.vue +++ b/src/renderer/src/views/tool/components/homework.vue @@ -25,6 +25,7 @@ + 推送
  • @@ -82,8 +83,9 @@ import { useToolState } from '@/store/modules/tool' import { asyncLocalFile } from '@/utils/talkFile' import Lesson from './lesson.vue'; import { parseCataByNode } from '@/utils/talkFile' +import outLink from '@/utils/linkConfig' -const { ipcRenderer } = window.electron || {} +import { ipcMsgSend2 } from '@/utils/tool' const route = useRoute(); const usertore = useUserStore().user const toolStore = useToolState() @@ -127,6 +129,19 @@ const changeChapter = async (data)=>{ getResource() } + // 文件资源打开web AIX 布置作业 +const openFileLink = (item) =>{ + // key 对应的 linkConfig.js 外部链接配置 + let key = 'filehomework' + let configObj = outLink()[key] + ipcMsgSend2('openWindow', { + key, + fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}`, + cookieData: { ...configObj.data } + }) +} + + // 获取资源数据 const getResource = () => { let querySearch = toRaw(toolStore.curSubjectNode).querySearch @@ -233,7 +248,7 @@ onMounted(() => { getHomework() setTimeout(()=>{ getResource() - },5000) + },1000) }) diff --git a/src/renderer/src/views/tool/components/side.vue b/src/renderer/src/views/tool/components/side.vue index 3eb5223..4ab64a7 100644 --- a/src/renderer/src/views/tool/components/side.vue +++ b/src/renderer/src/views/tool/components/side.vue @@ -138,4 +138,4 @@ const clickHandel = (o, e) => { transform: rotate(45deg); } } - \ No newline at end of file + diff --git a/src/renderer/src/views/tool/sphere.vue b/src/renderer/src/views/tool/sphere.vue index 410805a..525c17e 100644 --- a/src/renderer/src/views/tool/sphere.vue +++ b/src/renderer/src/views/tool/sphere.vue @@ -116,7 +116,7 @@ const sideMouse = e => { mouseChange(type == 'mouseleave') } // 侧边工具栏: 操作变化 -const sideChange = o => { +const sideChange = async o => { // console.log(o) switch(o.prop) { case 'resource': // 资源 @@ -127,7 +127,7 @@ const sideChange = o => { break case 'over': // 下课 toolStore.isToolWin = false - endClass(route.query.reservId) + await endClass(route.query.reservId) ipcMsgSend('tool-sphere:close') break }