diff --git a/src/renderer/src/api/apiService.js b/src/renderer/src/api/apiService.js index ad79922..0b28e0d 100644 --- a/src/renderer/src/api/apiService.js +++ b/src/renderer/src/api/apiService.js @@ -13,9 +13,11 @@ export class ApiService { if (!!data) config[method=='get'?'params':'data'] = data if (!!option) Object.assign(config, option) // 特殊格式处理 - if (type == 'file') config.headers = { 'Content-Type': 'multipart/form-data' } - else if (type == 'json') config.headers = { 'Content-Type': 'application/json' } - else if (type == 'form') config.headers = { 'Content-Type': 'application/x-www-form-urlencoded' } + let headers + if (type == 'file') headers = { 'Content-Type': 'multipart/form-data' } + else if (type == 'json') headers = { 'Content-Type': 'application/json' } + else if (type == 'form') headers = { 'Content-Type': 'application/x-www-form-urlencoded' } + headers && (config.headers = { ...config.headers, ...headers }) return request(config) } } diff --git a/src/renderer/src/assets/iconfont/iconfont.css b/src/renderer/src/assets/iconfont/iconfont.css index 696d349..26de097 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=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'); + src: url('iconfont.woff2?t=1724134927539') format('woff2'), + url('iconfont.woff?t=1724134927539') format('woff'), + url('iconfont.ttf?t=1724134927539') format('truetype'), + url('iconfont.svg?t=1724134927539#iconfont') format('svg'); } .iconfont { @@ -14,6 +14,74 @@ -moz-osx-font-smoothing: grayscale; } +.icon-zan:before { + content: "\e658"; +} + +.icon-zan1:before { + content: "\e659"; +} + +.icon-zan2:before { + content: "\e65a"; +} + +.icon-zan3:before { + content: "\e65c"; +} + +.icon-zan4:before { + content: "\e67c"; +} + +.icon-yizan:before { + content: "\e67e"; +} + +.icon-zan5:before { + content: "\e67f"; +} + +.icon-zan-yizan:before { + content: "\e680"; +} + +.icon-zan6:before { + content: "\e681"; +} + +.icon-MBEfenggeduosetubiao-xihuan:before { + content: "\e682"; +} + +.icon-zan7:before { + content: "\e683"; +} + +.icon-zan11:before { + content: "\e6ff"; +} + +.icon-zan8:before { + content: "\e684"; +} + +.icon-dianzan-red:before { + content: "\e685"; +} + +.icon-zan9:before { + content: "\e69e"; +} + +.icon-zanping:before { + content: "\100ae"; +} + +.icon-zan10:before { + content: "\e686"; +} + .icon-arrangement:before { content: "\e656"; } diff --git a/src/renderer/src/assets/iconfont/iconfont.js b/src/renderer/src/assets/iconfont/iconfont.js index a7091de..03be20d 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='',(l=>{var h=(c=(c=document.getElementsByTagName("script"))[c.length-1]).getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,v,t,z,i,p=function(h,c){c.parentNode.insertBefore(h,c)};if(h&&!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,d(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,M())})}function M(){i||(i=!0,t())}function d(){try{z.documentElement.doScroll("left")}catch(h){return void setTimeout(d,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 27f830f..ef8e263 100644 --- a/src/renderer/src/assets/iconfont/iconfont.json +++ b/src/renderer/src/assets/iconfont/iconfont.json @@ -5,6 +5,125 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "1242129", + "name": "赞", + "font_class": "zan", + "unicode": "e658", + "unicode_decimal": 58968 + }, + { + "icon_id": "1741390", + "name": "赞", + "font_class": "zan1", + "unicode": "e659", + "unicode_decimal": 58969 + }, + { + "icon_id": "3159200", + "name": "赞", + "font_class": "zan2", + "unicode": "e65a", + "unicode_decimal": 58970 + }, + { + "icon_id": "3402139", + "name": "赞", + "font_class": "zan3", + "unicode": "e65c", + "unicode_decimal": 58972 + }, + { + "icon_id": "4931286", + "name": "赞 (1)", + "font_class": "zan4", + "unicode": "e67c", + "unicode_decimal": 59004 + }, + { + "icon_id": "4942300", + "name": "已赞", + "font_class": "yizan", + "unicode": "e67e", + "unicode_decimal": 59006 + }, + { + "icon_id": "5806181", + "name": "赞", + "font_class": "zan5", + "unicode": "e67f", + "unicode_decimal": 59007 + }, + { + "icon_id": "7172310", + "name": "赞-已赞", + "font_class": "zan-yizan", + "unicode": "e680", + "unicode_decimal": 59008 + }, + { + "icon_id": "7293361", + "name": "赞2", + "font_class": "zan6", + "unicode": "e681", + "unicode_decimal": 59009 + }, + { + "icon_id": "8705087", + "name": "MBE风格多色图标-喜欢", + "font_class": "MBEfenggeduosetubiao-xihuan", + "unicode": "e682", + "unicode_decimal": 59010 + }, + { + "icon_id": "10024138", + "name": "赞", + "font_class": "zan7", + "unicode": "e683", + "unicode_decimal": 59011 + }, + { + "icon_id": "11055391", + "name": "赞", + "font_class": "zan11", + "unicode": "e6ff", + "unicode_decimal": 59135 + }, + { + "icon_id": "11086734", + "name": "赞", + "font_class": "zan8", + "unicode": "e684", + "unicode_decimal": 59012 + }, + { + "icon_id": "23592614", + "name": "点赞", + "font_class": "dianzan-red", + "unicode": "e685", + "unicode_decimal": 59013 + }, + { + "icon_id": "26327261", + "name": "赞", + "font_class": "zan9", + "unicode": "e69e", + "unicode_decimal": 59038 + }, + { + "icon_id": "27804883", + "name": "赞评", + "font_class": "zanping", + "unicode": "100ae", + "unicode_decimal": 65710 + }, + { + "icon_id": "29252894", + "name": "赞", + "font_class": "zan10", + "unicode": "e686", + "unicode_decimal": 59014 + }, { "icon_id": "4978988", "name": "作业-布置作业", diff --git a/src/renderer/src/assets/iconfont/iconfont.svg b/src/renderer/src/assets/iconfont/iconfont.svg index d9830a0..e544243 100644 --- a/src/renderer/src/assets/iconfont/iconfont.svg +++ b/src/renderer/src/assets/iconfont/iconfont.svg @@ -14,6 +14,40 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/renderer/src/assets/iconfont/iconfont.ttf b/src/renderer/src/assets/iconfont/iconfont.ttf index 1d65d03..f0461d5 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 caf53bc..e5f87d9 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 a1b77bc..426cc8c 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/plugins/imChat/imLiseners.js b/src/renderer/src/plugins/imChat/imLiseners.js index d80bb7e..0342a76 100644 --- a/src/renderer/src/plugins/imChat/imLiseners.js +++ b/src/renderer/src/plugins/imChat/imLiseners.js @@ -5,7 +5,7 @@ */ // @ts-ignore const API = window?.api || {} -const timRenderInstance = API.getTimRender() +const timRenderInstance = API?.getTimRender?.() || {} // im 事件监听 export class IMListeners { diff --git a/src/renderer/src/views/tool/components/upvote.vue b/src/renderer/src/views/tool/components/upvote.vue index 7f7cfb4..7bfa0e0 100644 --- a/src/renderer/src/views/tool/components/upvote.vue +++ b/src/renderer/src/views/tool/components/upvote.vue @@ -1,23 +1,32 @@