Commit 9b20668f authored by GuanHua's avatar GuanHua

fix:修复资讯的问题和模板装修的问题

parent 7c3576d6
......@@ -187,7 +187,11 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
serviceAdvertConfig[serviceAdvertConfig.key].props.advertList = await findSecondAdvertsByType()
//店铺信息
AboutUsConfig[AboutUsConfig.key].props.shopInfo = await fetchShopInfo()
const channelInfo: any = await fetchShopInfo()
AboutUsConfig[AboutUsConfig.key].props.shopInfo = channelInfo
headerConfig[headerConfig.key].props.logoUrl = channelInfo.logo || ""
topBarConfig[topBarConfig.key].props.shopname = channelInfo.company || ""
// 行情资讯
InformationConfig[InformationConfig.key].props.newsList = await fetchLeadNews()
......
import React, { forwardRef, useState, useCallback } from 'react'
import { Button, Input } from 'antd'
import { Button, Input, Select } from 'antd'
import UploadImage from '@/components/UploadImage'
import { filterPropsFunction, getAdvertType } from '../../../../utils'
import SettingPanel from '../../../../components/SettingPanel'
......@@ -193,9 +193,17 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
return
}
setConfirmLoading(true)
saveAdvert(newProps).then(() => {
let newParam: any = JSON.parse(JSON.stringify(newProps))
newParam.advertList = newParam.advertList.map((item) => {
if (!item.link.startsWith('http://') && !item.link.startsWith('https://')) {
item.link = `http://${item.link}`
}
return item
})
saveAdvert(newParam).then(() => {
changeProps({
props: newProps
props: newParam
})
clearSelectedStatus()
setConfirmLoading(false)
......@@ -263,6 +271,13 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
}
const selectBefore = (
<Select defaultValue="http://" className="select-before">
<Select.Option value="http://">http://</Select.Option>
<Select.Option value="https://">https://</Select.Option>
</Select>
);
return (
<SettingPanel
confirmLoading={confirmLoading}
......@@ -304,7 +319,11 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
<div className={styles.advert_setting_line_addItem_line}>
<div className={styles.advert_setting_line_addItem_line_label}>链接</div>
<div className={styles.advert_setting_line_addItem_line_brief}>
<Input className={styles.advert_setting_line_addItem_input} value={item.link} onChange={(e) => handleKeyChange(e.target.value, item.sort, 'link')} />
<Input
className={styles.advert_setting_line_addItem_input}
value={item.link}
onChange={(e) => handleKeyChange(e.target.value, item.sort, 'link')}
/>
</div>
</div>
</div>
......
......@@ -35,7 +35,7 @@
background-color: rgba(250, 250, 250, 1);
box-shadow: none;
&:focus {
&:focus, &:active, &:hover {
box-shadow: none;
}
}
......
......@@ -20,15 +20,15 @@ const BreadCrumbs: React.FC<BreadCrumbsPropsType> = (props) => {
const handlePreeEnter = (e) => {
const { value } = e.target
history.push(getLink('/infomation/search', `?keyword=${value}`))
history.push(getLink('/infomation/search', `&keyword=${value}`))
}
const getLink = (path, param?) => {
switch (layoutType) {
case LAYOUT_TYPE.channel:
return `${GlobalConfig.channelRootRoute}${path}${param ? param : ''}&channelId=${shopUrlParam}`
return `${GlobalConfig.channelRootRoute}${path}?channelId=${shopUrlParam}${param ? param : ''}`
case LAYOUT_TYPE.ichannel:
return `${GlobalConfig.ichannelRootRoute}${path}${param ? param : ''}&channelId=${shopUrlParam}`
return `${GlobalConfig.ichannelRootRoute}${path}?channelId=${shopUrlParam}${param ? param : ''}`
default:
return `${path}${param ? param : ''}`
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment