Commit a2437cf4 authored by GuanHua's avatar GuanHua

fix: 渠道能力添加推荐页图片添加,商城首页禁用去求购链接

parent 833bf985
......@@ -37,6 +37,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
const [workshopPics, setWorkshopPics] = useState([]) // 厂房照片
const [honorPics, setHonorPics] = useState([]) // 资质荣誉
const [logo, setLogo] = useState<string>("")
const [promotionPic, setPromotionPic] = useState<string>('')
const [shopInfo, setShopInfo] = useState<GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse>()
const [shopId, setShopId] = useState<number>()
......@@ -76,6 +77,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
setWorkshopPics(data.workshopPics || [])
setHonorPics(data.honorPics || [])
setStoreUrl("")
setPromotionPic(data.promotionPic || "")
form.setFieldsValue({
describe: data.describe,
customerUrl: data.customerUrl,
......@@ -220,6 +222,17 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
})
}
/**
* 添加推广页
* @param url
*/
const handleAddPromotionPic = (url: string) => {
setPromotionPic(url)
form.setFieldsValue({
promotionPic: url
})
}
const handleMallSelectChange = (mallId: number) => {
setShopId(mallId)
if (!shopInfo) {
......@@ -405,6 +418,31 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
</Form.Item>
<Form.Item
labelAlign="left"
name="promotionPic"
label={<RequireItem label="推广页" />}
>
<div className={styles.form_item_wrap}>
<div className={styles.img_list}>
{
promotionPic && (
<div className={cx(styles.upload_btn, styles.large, styles.upload)}>
<div className={styles.delete_btn} onClick={() => setPromotionPic("")}><DeleteOutlined /></div>
<img className={styles.upload_img} src={promotionPic} />
</div>
)
}
<UploadImage
imgUrl={""}
large={true}
fileMaxSize={1024}
size="106x107"
onChange={(url) => handleAddPromotionPic(url)}
/>
</div>
</div>
</Form.Item>
<Form.Item
labelAlign="left"
name="customerUrl"
label={<RequireItem label="客服链接" />}
rules={[{ pattern: /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])?/, message: '请输入正确的客服链接' }]}
......
......@@ -189,6 +189,11 @@
&:hover {
.quick_nav_list_item_text {
color: var(--mall_main_color);
&.disabled {
color: #999;
}
}
}
......@@ -207,6 +212,10 @@
line-height: 12px;
margin-top: 14px;
color: #303133;
&.disabled {
color: #999;
}
}
}
}
......
......@@ -70,6 +70,7 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
{
path: '/memberCenter/tranactionAbility/enquirySubmit/toAddSubmitList/add',
title: '我要求购',
disabled: true,
icon: require('@/assets/mallHomeIcon/buy_icon.png')
},
{
......@@ -98,6 +99,7 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
},
{
path: '/purchaseOnline',
disabled: true,
title: '去求购',
icon: require('@/assets/mallHomeIcon/tobuy_icon.png')
},
......@@ -230,20 +232,20 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
tabType === 1 ? sell_quick_nav_list.map((item, index) => (
<a href={goToLink(item.path)} className={cx(styles.quick_nav_list_item, styles.bb)} key={`sell_quick_nav_list_item-${index}`}>
<img className={styles.quick_nav_list_item_icon} src={item.icon} />
<span className={styles.quick_nav_list_item_text}>{item.title}</span>
<span className={cx(styles.quick_nav_list_item_text)}>{item.title}</span>
</a>
)) : buy_quick_nav_list.map((item, index) => (
<a href={goToLink(item.path)} className={cx(styles.quick_nav_list_item, styles.bb)} key={`buy_quick_nav_list_item-${index}`}>
<a href={item.disabled ? 'javascript:;' : goToLink(item.path)} className={cx(styles.quick_nav_list_item, styles.bb)} key={`buy_quick_nav_list_item-${index}`}>
<img className={styles.quick_nav_list_item_icon} src={item.icon} />
<span className={styles.quick_nav_list_item_text}>{item.title}</span>
<span className={cx(styles.quick_nav_list_item_text, item.disabled ? styles.disabled : "")}>{item.title}</span>
</a>
))
}
{
quick_nav_list.map((item, index) => (
<a href={goToLink(item.path)} className={styles.quick_nav_list_item} key={`quick_nav_list_item-${index}`}>
<a href={item.disabled ? 'javascript:;' : goToLink(item.path)} className={styles.quick_nav_list_item} key={`quick_nav_list_item-${index}`}>
<img className={styles.quick_nav_list_item_icon} src={item.icon} />
<span className={styles.quick_nav_list_item_text}>{item.title}</span>
<span className={cx(styles.quick_nav_list_item_text, item.disabled ? styles.disabled : "")}>{item.title}</span>
</a>
))
}
......
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