wjx 1 yıl önce
ebeveyn
işleme
f6cd6a424d

+ 2 - 2
config/proxy.ts

@@ -10,8 +10,8 @@
  export default {
   dev: {
     '/api/': {
-      // target: 'http://test.api.zanxiangwl.com/api',
-      target: 'http://api.zanxiangwl.com',
+      target: 'http://test.api.zanxiangwl.com',
+      // target: 'http://api.zanxiangwl.com',
       changeOrigin: true,
       pathRewrite: { '/api': '' },
     },

+ 8 - 8
src/pages/launchSystemNew/components/addLandingPage/content.ts

@@ -118,23 +118,23 @@ export const ghITItemContent: ITItemGhSpec = {
     btnTitle: '关注公众号',
     fontColor: '#FFFFFF',
     btnBgColorTheme: '#07C160',
-    btnBorderColorTheme: '#FFFFFF',
+    // btnBorderColorTheme: '#FFFFFF',
     btnFontType: 0,
-    useIcon: 0,
+    // useIcon: 0,
     fastFollow: 1,
-    paddingTop: 28,
-    paddingBottom: 28,
+    // paddingTop: 28,
+    // paddingBottom: 28,
 }
 
 // 添加商家微信
 export const wxAutoITItemContent: ITItemEnterpriseWxSpec = {
     btnBgColorTheme: "#07C160",
-    btnBorderColorTheme: "#FFFFFF",
+    // btnBorderColorTheme: "#FFFFFF",
     btnFontType: 0,
     btnTitle: "联系商家",
-    useIcon: 0,
-    paddingTop: 28,
-    paddingBottom: 28,
+    // useIcon: 0,
+    // paddingTop: 28,
+    // paddingBottom: 28,
     fontColor: "#FFFFFF",
 }
 

+ 6 - 6
src/pages/launchSystemNew/components/addLandingPage/index.tsx

@@ -792,12 +792,12 @@ function AddLandingPage(props: Props) {
                     btnTitle: '关注公众号',
                     fontColor: '#FFFFFF',
                     btnBgColorTheme: '#07C160',
-                    btnBorderColorTheme: '#FFFFFF',
+                    // btnBorderColorTheme: '#FFFFFF',
                     btnFontType: 0,
-                    useIcon: 0,
+                    // useIcon: 0,
                     fastFollow: 1,
-                    paddingTop: 28,
-                    paddingBottom: 28,
+                    // paddingTop: 28,
+                    // paddingBottom: 28,
                 }
             }
             let imageTextItemIndex = 1;
@@ -1349,12 +1349,12 @@ function AddLandingPage(props: Props) {
                                                                             <Space><ColorPicker onColor={(color: string) => { onSetShelfnewButtonField('fontColor', color) }} color={imgTextData?.content?.fontColor}></ColorPicker><div className="colorShow">{imgTextData?.content?.fontColor}</div></Space>
                                                                         </div>
                                                                     </div>
-                                                                    <div className="adui-form-item" style={{ alignItems: 'center' }}>
+                                                                    {/* <div className="adui-form-item" style={{ alignItems: 'center' }}>
                                                                         <div className="adui-form-label">边框色</div>
                                                                         <div className="adui-form-control">
                                                                             <Space><ColorPicker onColor={(color: string) => { onSetShelfnewButtonField('btnBorderColorTheme', color) }} color={imgTextData?.content?.btnBorderColorTheme}></ColorPicker><div className="colorShow">{imgTextData?.content?.btnBorderColorTheme}</div></Space>
                                                                         </div>
-                                                                    </div>
+                                                                    </div> */}
                                                                     <div className="adui-form-item" style={{ alignItems: 'center' }}>
                                                                         <div className="adui-form-label">背景色</div>
                                                                         <div className="adui-form-control">

+ 2 - 2
src/pages/launchSystemNew/components/addLandingPage/sortable.tsx

@@ -171,7 +171,7 @@ export const SortableItemJumpLink = SortableElement(({ item, click, del, data, h
 
 /** 图文 */
 export const SortableItemImgText = SortableElement(({ item, click, del, index, data, handleBtn }: any) => {
-    let { paddingTop, paddingBottom, imageTextItem, alignMode } = item
+    let { paddingTop = 28, paddingBottom = 28, imageTextItem, alignMode } = item
     if (imageTextItem.length === 2) {
         return <div className={`compt componentType103 ${item.comptActive && 'comptActive'}`} onClick={(e) => { click(e) }}>
             <div className={'componentWrap'}>
@@ -197,7 +197,7 @@ export const SortableItemImgText = SortableElement(({ item, click, del, index, d
                                         color: fontColor || 'rgb(255, 255, 255)',
                                         backgroundColor: btnBgColorTheme || 'rgb(7,193,96)',
                                         borderStyle: 'solid',
-                                        borderColor: btnBorderColorTheme,
+                                        borderColor: '#FFFFFF', //btnBorderColorTheme,
                                         borderRadius: 4
                                     }}>{btnTitle}</p>
                                 </div>

+ 87 - 1
src/pages/launchSystemNew/components/lookLanding/index.tsx

@@ -110,7 +110,7 @@ function LookLanding(props: Props) {
                                         <div className={'componentContent'}>
                                             {
                                                 videoUrl && <div className="videoPlay">
-                                                    <VideoNews src={videoUrl} style={{ display: 'block', width: '100%', margin: 0, height: '100%' }} maskImgStyle={{ position: 'absolute', top: '50%', left: '50%', width: 40, height: 40, transform: 'translate(-50%, -50%)', zIndex: 10 }}/>
+                                                    <VideoNews src={videoUrl} style={{ display: 'block', width: '100%', margin: 0, height: '100%' }} maskImgStyle={{ position: 'absolute', top: '50%', left: '50%', width: 40, height: 40, transform: 'translate(-50%, -50%)', zIndex: 10 }} />
                                                 </div>
                                             }
                                         </div>
@@ -271,6 +271,92 @@ function LookLanding(props: Props) {
                         } else {
                             return null
                         }
+                    } else if (value?.elementType === 'IMAGE_TEXT') {
+                        let { imageTextItem, alignMode } = value
+                        let paddingTop = 28, paddingBottom = 28
+                        if (imageTextItem.length === 2) {
+                            return <div className={`compt componentType103}`} key={id}>
+                                <div className={'componentWrap'}>
+                                    <div className={'componentContent'}>
+                                        <div className='shelf gridType' style={{ marginTop: paddingTop / 2 + 'px', marginBottom: paddingBottom / 2 + 'px', marginLeft: 20 }}>
+                                            {imageTextItem?.map((item: any, index1: number) => {
+                                                let { bgColor, borderColor, desc, descColor, imageUrl, title, titleColor, subElemType } = item
+                                                let key = 'ghSpec'
+                                                if (subElemType === 'GH') {
+                                                    key = 'ghSpec'
+                                                } else {
+                                                    key = 'enterpriseWxSpec'
+                                                }
+                                                let { btnTitle, btnBgColorTheme, btnBorderColorTheme, fontColor, btnFontType } = item[key]
+                                                return <div className='shelfItem-3q' key={index1} style={{ borderWidth: 1, borderStyle: 'solid', borderColor: borderColor, backgroundColor: bgColor || 'rgb(255,255,255)', marginLeft: index1 === 1 ? 11 : 0 }}>
+                                                    <div className='shelfItemImg' style={{ marginLeft: 5.5, marginTop: 5.5 }}>
+                                                        {imageUrl ? <img src={imageUrl} style={{ display: 'flex', width: '100%', height: '100%' }} /> : <div className="default" style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
+                                                            <div className={'defaultIcon'} style={{ width: 36, height: 36 }}>
+                                                                <Img />
+                                                            </div>
+                                                        </div>}
+                                                    </div>
+                                                    <div className='shelfItemContent' style={{ padding: '0 12px', boxSizing: 'border-box', textAlign: alignMode === 0 ? 'left' : 'center' }}>
+                                                        <p className='title' style={{ color: titleColor || 'rgb(53, 53, 53)', fontSize: 16, marginBottom: 4 }}>{title || '标题'}</p>
+                                                        <p className='desc' style={{ color: descColor || 'rgb(178, 178, 178)', marginBottom: 14 }}>{desc || '描述'}</p>
+                                                        <p className='btn' style={{
+                                                            textDecoration: 'none',
+                                                            fontWeight: btnFontType == '1' ? 'bold' : 400,
+                                                            color: fontColor || 'rgb(255, 255, 255)',
+                                                            backgroundColor: btnBgColorTheme || 'rgb(7,193,96)',
+                                                            borderStyle: 'solid',
+                                                            borderColor: '#FFFFFF', //btnBorderColorTheme,
+                                                            borderRadius: 4
+                                                        }}>{btnTitle}</p>
+                                                    </div>
+                                                </div>
+                                            })}
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        } else {
+                            let { bgColor, borderColor, desc, descColor, imageUrl, title, titleColor, subElemType } = imageTextItem[0]
+                            let key = 'ghSpec'
+                            if (subElemType === 'GH') {
+                                key = 'ghSpec'
+                            } else {
+                                key = 'enterpriseWxSpec'
+                            }
+                            let { btnTitle, btnBgColorTheme, btnBorderColorTheme, fontColor, btnFontType } = imageTextItem[0][key]
+                            return <div className={`compt componentType104`} key={id}>
+                                <div className={'componentWrap'}>
+                                    <div className={'componentContent'}>
+                                        <div className={'shelf listType'} style={{ marginTop: paddingTop / 2 + 'px', marginBottom: paddingBottom / 2 + 'px', marginLeft: 20, marginRight: 20 }}>
+                                            <div className={'shelfItem'} style={{ border: `1px solid ${borderColor || "#e5e5e5"}`, backgroundColor: bgColor || "#ffffff" }}>
+                                                <div className={'shelfItemImg'} style={{ marginLeft: 11.5, marginTop: 11.5 }}>
+                                                    {imageUrl ? <img src={imageUrl} style={{ display: 'flex', width: '100%', height: '100%' }} /> : <div className={'default'} style={{ width: '100%', height: '100%' }}>
+                                                        <div className={'defaultIcon'} style={{ marginTop: 27, width: 36, height: 36 }}>
+                                                            <Img />
+                                                        </div>
+                                                    </div>}
+                                                </div>
+                                                <div className={'shelfItemContent'} style={{ margin: '12px 20px 0 12px' }}>
+                                                    <p className={'title'} style={{ color: titleColor || "#353535", fontSize: 16 }}>{title || '标题'}</p>
+                                                    <p className={'desc'} style={{ color: descColor || "#B2B2B2" }}>{desc || '描述'}</p>
+                                                    <div
+                                                        className={'btn'}
+                                                        style={{
+                                                            color: fontColor || 'rgb(255, 255, 255)',
+                                                            textDecoration: 'none',
+                                                            fontWeight: btnFontType == '1' ? 'bold' : 'normal',
+                                                            backgroundColor: btnBgColorTheme || "#07C160",
+                                                            border: ['#FFFFFF', '#ffffff', 'rgb(255, 255, 255)'].indexOf(btnBorderColorTheme) !== -1 ? '0px solid rgb(255, 255, 255)' : `2px solid ${btnBorderColorTheme}`,
+                                                            borderRadius: 4
+                                                        }}
+                                                    >{btnTitle}</div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        }
                     } else {
                         return null
                     }

+ 6 - 6
src/pages/launchSystemNew/req.ts

@@ -88,25 +88,25 @@ export interface TopSlider extends ElementType {
 
 
 /** 图文复合组件New 相关 开始======= */
-export interface ITItemGhSpec extends Padding {
+export interface ITItemGhSpec {
     fastFollow: 0 | 1               // 是否开启一键关注,取值 0: 关闭, 1: 开启. 默认 1
     btnTitle: string,               // use_icon 为 0 时,长度限制 1-10 ;use_icon 为 1 时,长度限制 1-8 ; 默认:关注公众号
     fontColor: string,              // 按钮文案颜色 默认#FFFFFF
     btnBgColorTheme: string,        // 按钮填充色 默认#07C160
-    btnBorderColorTheme: string,    // 边框色,#000000-#FFFFFF,默认#FFFFFF
+    // btnBorderColorTheme: string,    // 边框色,#000000-#FFFFFF,默认#FFFFFF
     btnFontType: 0 | 1,             // 按钮文案配置 取值 0: 常规, 1: 加粗. 默认 0
-    useIcon: 0 | 1,                 // 是否使用图标 取值 0: 不使用图标, 1: 使用图标. 默认 0
+    // useIcon: 0 | 1,                 // 是否使用图标 取值 0: 不使用图标, 1: 使用图标. 默认 0
 }
 
-export interface ITItemEnterpriseWxSpec extends Padding {
+export interface ITItemEnterpriseWxSpec {
     cropId?: string,             // 绑定的企业 id
     groupId?: number,            // 客服组 id
     btnTitle: string,            // 按钮文案,
     fontColor: string,           // 按钮文案颜色,#000000-#FFFFFF,默认#FFFFFF
     btnBgColorTheme: string,     // 按钮填充色,#000000-#FFFFFF,默认#07C160
-    btnBorderColorTheme: string, // 边框色,#000000-#FFFFFF,默认#FFFFFF
+    // btnBorderColorTheme: string, // 边框色,#000000-#FFFFFF,默认#FFFFFF
     btnFontType: 0 | 1,          // 字体粗细 0常用 1加粗
-    useIcon: 0 | 1,              // 图标开启关闭 取值 0: 不使用图标, 1: 使用图标. 默认 0
+    // useIcon: 0 | 1,              // 图标开启关闭 取值 0: 不使用图标, 1: 使用图标. 默认 0
 }
 
 export interface ImageTextItem {