Browse Source

Merge branch 'wxlDev' into dev-online

lex-xin 6 months ago
parent
commit
79f13c03c4

+ 1 - 0
dist/assets/index-BPW1Oc4x.js

@@ -0,0 +1 @@
+import{u as c,a9 as l}from"./index-C9blN9-O.js";import{a5 as i,cw as m,R as t,ae as a,af as p,al as u,ag as f,bG as _}from"./index-CEVeWsXw.js";import"./vuedraggable.umd-Dj7kUH70.js";const S=i({__name:"mobileScreen",setup(d){const s=m(),e=t(!0),n=t(!1),r=c();return s.setScreenMode("mobileScreen"),r.initPPTData().then(()=>{e.value=!1}),(k,o)=>(a(),p("div",{class:"mobileScreen",onClick:o[0]||(o[0]=b=>n.value=!1)},[e.value?f("",!0):(a(),u(l,{key:0}))]))}}),B=_(S,[["__scopeId","data-v-2471f971"]]);export{B as default};

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-Bi5XHI52.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-C9blN9-O.js


+ 1 - 0
dist/assets/index-CAByilJL.js

@@ -0,0 +1 @@
+import{u as s,a9 as r}from"./index-C9blN9-O.js";import{a5 as c,cw as n,R as p,ae as t,af as _,al as u,ag as i,bG as l}from"./index-CEVeWsXw.js";const m={class:"pptScreen"},d=c({__name:"pptScreen",setup(f){const a=n(),e=p(!0),o=s();return a.setScreenMode("pptScreen"),o.initPPTData().then(()=>{e.value=!1}),(S,k)=>(t(),_("div",m,[e.value?i("",!0):(t(),u(r,{key:0}))]))}}),h=l(d,[["__scopeId","data-v-678905e9"]]);export{h as default};

File diff suppressed because it is too large
+ 5 - 0
dist/assets/index-CEVeWsXw.js


+ 1 - 0
dist/assets/index-CqM3AiIK.js

@@ -0,0 +1 @@
+import{_ as a}from"./404-R0y5dkvZ.js";import{a5 as o,ek as t,ae as r,af as c,bH as _,bI as d,ak as s,bG as p}from"./index-CEVeWsXw.js";const i=e=>(_("data-v-dda25179"),e=e(),d(),e),n={class:"errorPage"},m=i(()=>s("div",{class:"error"},[s("img",{src:a,class:"img",alt:""}),s("div",{class:"tit"},"页面找不到了~")],-1)),l=[m],f=o({__name:"errorPage",setup(e){return t(),(u,h)=>(r(),c("div",n,l))}}),I=p(f,[["__scopeId","data-v-dda25179"]]);export{I as default};

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-DQ3YOQ6U.css


+ 1 - 0
dist/assets/index-DU7ZwbBD.js

@@ -0,0 +1 @@
+import{_ as t}from"./404-R0y5dkvZ.js";import{E as c}from"./index-DX9Kxodv.js";import{a5 as n,ae as i,af as r,ak as o,aq as _,am as d,P as l,bo as p,bH as m,bI as f,bG as u}from"./index-CEVeWsXw.js";const s=a=>(m("data-v-340bbdaa"),a=a(),f(),a),b={class:"login"},h={class:"error"},g=s(()=>o("img",{src:t,class:"img",alt:""},null,-1)),k=s(()=>o("div",{class:"tit"},"登录已过期或服务器错误!",-1)),v=n({__name:"login",setup(a){function e(){window.close()}return(x,B)=>(i(),r("div",b,[o("div",h,[g,k,_(l(c),{class:"backBtn",type:"primary",plain:"",onClick:e},{default:d(()=>[p("关闭页面")]),_:1})])]))}}),E=u(v,[["__scopeId","data-v-340bbdaa"]]);export{E as default};

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-DX9Kxodv.js


File diff suppressed because it is too large
+ 4 - 0
dist/assets/vuedraggable.umd-Dj7kUH70.js


+ 1 - 1
src/components/Empty/Empty.vue

@@ -27,7 +27,7 @@ const props = withDefaults(
   .text {
   .text {
     margin-top: 6px;
     margin-top: 6px;
     font-size: 16px;
     font-size: 16px;
-    color: #777777;
+    color: #999999;
   }
   }
 }
 }
 </style>
 </style>

+ 34 - 2
src/libs/jsonTool.ts

@@ -36,9 +36,11 @@ export function jsonToPpt(jsonData: Record<string, any>) {
   const { width, theme, slides } = jsonData
   const { width, theme, slides } = jsonData
   slidesStore.updateSlideIndex(0)
   slidesStore.updateSlideIndex(0)
   slidesStore.setViewportSize(width || 1920)
   slidesStore.setViewportSize(width || 1920)
-  slidesStore.setViewportRatio(theme.viewportRatio)
+  slidesStore.setViewportRatio(theme.viewportRatio || 0.5625)
+  // 兼容妙极客 这里过滤一下这个数据
+  const newSlides = formatSlides(slides)
   slidesStore.setTheme(theme)
   slidesStore.setTheme(theme)
-  slidesStore.setSlides(slides.length ? slides : slidesData)
+  slidesStore.setSlides(newSlides.length ? newSlides : slidesData)
 }
 }
 
 
 export function getJsonToBlob() {
 export function getJsonToBlob() {
@@ -55,3 +57,33 @@ export function getJsonToBlob() {
     title
     title
   }
   }
 }
 }
+
+function formatSlides(slides: any[]): any[] {
+  return (slides || []).map(item => {
+    // 背景兼容  当为渐变并且没有渐变数据的时候,判定为妙极客数据兼容
+    if (item.background?.type === "gradient") {
+      if (item.background.gradientType === "linear" && !item.background?.gradient) {
+        item.background.gradient = {
+          colors: [
+            { pos: 0, color: (item.background.gradientColor && item.background.gradientColor[0]) || "rgba(255,255,255,1)" },
+            { pos: 100, color: (item.background.gradientColor && item.background.gradientColor[1]) || "rgba(255,255,255,1)" }
+          ],
+          rotate: item.background.gradientRotate || 0,
+          type: item.background.gradientType
+        }
+      }
+    }
+    ;(item.elements || []).map((el: any) => {
+      // 兼容块
+      if (el.type === "shape") {
+        if (el.gradient?.type == "linear" && !el.gradient?.colors) {
+          el.gradient.colors = [
+            { pos: 0, color: (el.gradient.color && el.gradient.color[0]) || "rgba(255,255,255,1)" },
+            { pos: 100, color: (el.gradient.color && el.gradient.color[1]) || "rgba(255,255,255,1)" }
+          ]
+        }
+      }
+    })
+    return item
+  })
+}

+ 6 - 0
src/views/Editor/EditorHeader/index.vue

@@ -124,6 +124,12 @@ function handleSave() {
 /* 关闭页面 */
 /* 关闭页面 */
 function handleClose() {
 function handleClose() {
   window.close()
   window.close()
+  window.parent.postMessage(
+    {
+      api: "notation_exit",
+    },
+    "*"
+  );
 }
 }
 </script>
 </script>
 
 

+ 3 - 3
src/views/components/element/cloudCoachElement/cloudCoachList/cloudCoachList.vue

@@ -111,7 +111,7 @@
                     <img v-if="item.sourceFrom === 'PLATFORM'" class="jxImg" src="./imgs/jx.png" alt="" />
                     <img v-if="item.sourceFrom === 'PLATFORM'" class="jxImg" src="./imgs/jx.png" alt="" />
                   </div>
                   </div>
                   <div class="musicInfo">
                   <div class="musicInfo">
-                    <EllipsisScroll class="musicTit" :title="item.name || ''" />
+                    <EllipsisScroll class="musicTit" :title="item.highName || ''" />
                     <div class="info">
                     <div class="info">
                       <div class="hotInfo" v-if="item.usedNum">
                       <div class="hotInfo" v-if="item.usedNum">
                         <img src="./imgs/hot.png" alt="" />
                         <img src="./imgs/hot.png" alt="" />
@@ -401,7 +401,7 @@ function handleGetQuery() {
     }
     }
     if (res.code === 200) {
     if (res.code === 200) {
       musicList.value = res.data.rows.map((item: any) => {
       musicList.value = res.data.rows.map((item: any) => {
-        item.name = highlightedText(item.name, queryData.name)
+        item.highName = highlightedText(item.name, queryData.name)
         return item
         return item
       })
       })
       queryData.total = res.data.total
       queryData.total = res.data.total
@@ -431,7 +431,7 @@ const highlightedText = (text: string, query: string) => {
   if (!query) {
   if (!query) {
     return text
     return text
   }
   }
-  const regex = new RegExp(`(${queryData.name})`, "gi")
+  const regex = new RegExp(`(${query})`, "gi")
   return text.replace(regex, '<span class="highlighted">$1</span>')
   return text.replace(regex, '<span class="highlighted">$1</span>')
 }
 }
 </script>
 </script>

+ 1 - 1
vite.config.ts

@@ -28,7 +28,7 @@ export default defineConfig({
     proxy: {
     proxy: {
       // 正则表达式写法
       // 正则表达式写法
       "^/pptApi/.*": {
       "^/pptApi/.*": {
-        target: "https://test.kt.colexiu.com",
+        target: "https://dev.kt.colexiu.com",
         changeOrigin: true,
         changeOrigin: true,
         rewrite: path => path.replace(/^\/pptApi/, "")
         rewrite: path => path.replace(/^\/pptApi/, "")
       }
       }

Some files were not shown because too many files changed in this diff