shaogen1995 vor 6 Tagen
Ursprung
Commit
c0f0b83542

+ 3 - 2
src/components/ZRichTexts/index.tsx

@@ -13,7 +13,7 @@ import 'braft-editor/dist/index.css'
 import classNames from 'classnames'
 import { MessageFu } from '@/utils/message'
 import { fileDomInitialFu } from '@/utils/domShow'
-import { baseURL } from '@/utils/http'
+import { baseUrlTemp } from '@/utils/http'
 
 import { forwardRef, useImperativeHandle } from 'react'
 import { API_upFile } from '@/store/action/layout'
@@ -130,11 +130,12 @@ function ZRichTexts(
           const res = await API_upFile(fd, myUrl)
           if (res.code === 0) {
             MessageFu.success('上传成功!')
+
             // 在光标位置插入图片
             const newTxt = ContentUtils.insertMedias(sectionArr[nowIndexRef.current].txt, [
               {
                 type: isVideoFlag ? 'VIDEO' : 'IMAGE',
-                url: baseURL + res.data.filePath
+                url: baseUrlTemp + res.data.filePath
               }
             ])
             const arr = [...sectionArr]

+ 1 - 1
src/pages/A1atlas/A1add.tsx

@@ -271,7 +271,7 @@ function A1add({ addInfo, addFu, closeFu }: Props) {
           {typeSon === '1' ? (
             <Form.Item
               label='跳转链接'
-              name='thumb'
+              name='link'
               rules={[{ required: true, message: '请输入跳转链接!' }]}
               getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
             >

+ 1 - 0
src/pages/A1atlas/data.ts

@@ -13,6 +13,7 @@ export type TypeA1dict = {
   preset: '1' | '0'
   thumb: string
   thumbPc: string
+  link: string
   // ---
   children?: TypeA1dict[]
 }

+ 2 - 2
src/pages/A1atlas/index.tsx

@@ -341,8 +341,8 @@ function A1atlas() {
                     dangerouslySetInnerHTML={{ __html: text(rightData.rtf) }}
                   ></div>
                 ) : rightData.typeSon === '1' ? (
-                  <a href={rightData.thumb} target='_blank' rel='noreferrer'>
-                    {rightData.thumb}
+                  <a href={rightData.link} target='_blank' rel='noreferrer'>
+                    {rightData.link}
                   </a>
                 ) : (
                   '(空)'

+ 1 - 1
src/utils/http.ts

@@ -7,7 +7,7 @@ import { domShowFu } from './domShow'
 
 export const envFlag = process.env.NODE_ENV === 'development'
 
-const baseUrlTemp = 'https://sit-taiyuanczb.4dage.com' // 测试环境
+export const baseUrlTemp = 'https://sit-taiyuanczb.4dage.com' // 测试环境
 // const baseUrlTemp = 'http://192.168.20.61:8110' // 线下环境
 
 const baseFlag = baseUrlTemp.includes('https://')