Commit 4111155b authored by XieZhiXiong's avatar XieZhiXiong
parents d1689dec 578705e9
......@@ -76,10 +76,10 @@ const CityCascader: React.FC<CitySelectPropsType> = (props) => {
})
if (item.areaResponses) {
const tempCityList = []
tempCityList.push({
lable: "所有",
value: "0"
})
// tempCityList.push({
// lable: "所有",
// value: "0"
// })
for (const cityItem of item.areaResponses) {
tempCityList.push({
lable: cityItem.name,
......
.upload_image_wrap {
display: flex;
align-items: center;
height: 104px;
&.large {
height: 120px;
}
.size_require {
color: #C0C4CC;
......@@ -81,4 +86,4 @@
}
}
}
\ No newline at end of file
}
......@@ -70,7 +70,7 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => {
);
return (
<div className={styles.upload_image_wrap}>
<div className={cx(styles.upload_image_wrap, large ? styles.large : '')}>
<div className={cx(styles.upload_wrap, large ? styles.large : '')}>
<Upload {...uploadProps}>
{<div className={cx(styles.upload_btn, !imgUrl ? styles.isAdd : "", large ? styles.large : '')}>
......@@ -93,4 +93,6 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => {
)
})
UploadImage.displayName = "UploadImage"
export default UploadImage
......@@ -216,47 +216,50 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
const firstCategory: any = await fetchFirstCategory()
for (const item of firstCategory) {
const categoryDetail: any = await fetchCategoryById(item.id)
let floorLineConfigItem = {}
floorLineKeys.push(String(initIndex + 1))
if(item.id) {
const categoryDetail: any = await fetchCategoryById(item.id)
let floorLineConfigItem = {}
floorLineKeys.push(String(initIndex + 1))
const FloorLine = {
[String(initIndex + 1)]: {
"componentName": "ShopFloorLine",
"props": {
title: item.name
},
"childNodes": [String(initIndex + 2), String(initIndex + 3)]
}
}
const FloorLine = {
[String(initIndex + 1)]: {
"componentName": "ShopFloorLine",
"props": {
title: item.name
const Category = {
[String(initIndex + 2)]: {
"componentName": "ShopFloorLine.Category",
"props": {
categoryAdvertPicUrl: categoryDetail.categoryAdvertPicUrl,
categoryid: item.id,
linkdisable: true,
categoryList: categoryDetail.categoryBOList
},
},
"childNodes": [String(initIndex + 2), String(initIndex + 3)]
}
}
const Category = {
[String(initIndex + 2)]: {
"componentName": "ShopFloorLine.Category",
"props": {
categoryAdvertPicUrl: categoryDetail.categoryAdvertPicUrl,
categoryid: item.id,
linkdisable: true,
categoryList: categoryDetail.categoryBOList
const Goods = {
[String(initIndex + 3)]: {
"componentName": "ShopFloorLine.Goods",
"props": {
linkdisable: true,
categoryid: item.id,
goodsList: categoryDetail.goodsBOList
},
},
},
}
}
const Goods = {
[String(initIndex + 3)]: {
"componentName": "ShopFloorLine.Goods",
"props": {
linkdisable: true,
categoryid: item.id,
goodsList: categoryDetail.goodsBOList
},
},
floorLineConfigItem = { ...FloorLine, ...Category, ...Goods }
floorLineConfig = { ...floorLineConfig, ...floorLineConfigItem }
initIndex += 100
}
floorLineConfigItem = { ...FloorLine, ...Category, ...Goods }
floorLineConfig = { ...floorLineConfig, ...floorLineConfigItem }
initIndex += 100
}
mallLayoutConfig["0"].childNodes = [...mallLayoutConfig["0"].childNodes, ...floorLineKeys, serviceAdvertConfig.key, CommonTitle2Config.key, AboutUsConfig.key, InformationConfig.key, FooterConfig.key]
......
......@@ -166,46 +166,49 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
const firstCategory: any = await fetchFirstCategory()
for (const item of firstCategory) {
const categoryDetail: any = await fetchCategoryById(item.id)
let floorLineConfigItem = {}
floorLineKeys.push(String(initIndex + 1))
if (item.id ){
const categoryDetail: any = await fetchCategoryById(item.id)
let floorLineConfigItem = {}
floorLineKeys.push(String(initIndex + 1))
const FloorLine = {
[String(initIndex + 1)]: {
"componentName": "ShopFloorLine",
"props": {
title: item.name
},
"childNodes": [String(initIndex + 2), String(initIndex + 3)]
}
}
const FloorLine = {
[String(initIndex + 1)]: {
"componentName": "ShopFloorLine",
"props": {
title: item.name
const Category = {
[String(initIndex + 2)]: {
"componentName": "ShopFloorLine.Category",
"props": {
categoryAdvertPicUrl: categoryDetail.categoryAdvertPicUrl,
categoryid: item.id,
categoryList: categoryDetail.categoryBOList
},
},
"childNodes": [String(initIndex + 2), String(initIndex + 3)]
}
}
const Category = {
[String(initIndex + 2)]: {
"componentName": "ShopFloorLine.Category",
"props": {
categoryAdvertPicUrl: categoryDetail.categoryAdvertPicUrl,
categoryid: item.id,
categoryList: categoryDetail.categoryBOList
const Goods = {
[String(initIndex + 3)]: {
"componentName": "ShopFloorLine.Goods",
"props": {
linkdisable: true,
categoryid: item.id,
goodsList: categoryDetail.goodsBOList
},
},
},
}
}
const Goods = {
[String(initIndex + 3)]: {
"componentName": "ShopFloorLine.Goods",
"props": {
linkdisable: true,
categoryid: item.id,
goodsList: categoryDetail.goodsBOList
},
},
floorLineConfigItem = { ...FloorLine, ...Category, ...Goods }
floorLineConfig = { ...floorLineConfig, ...floorLineConfigItem }
initIndex += 100
}
floorLineConfigItem = { ...FloorLine, ...Category, ...Goods }
floorLineConfig = { ...floorLineConfig, ...floorLineConfigItem }
initIndex += 100
}
mallLayoutConfig["0"].childNodes = [...mallLayoutConfig["0"].childNodes, ...floorLineKeys, serviceAdvertConfig.key, FooterConfig.key]
......
/*
* 科技类商品描述模板
* @Author: ghua
* @Date: 2020-08-01 10:59:17
* @Author: ghua
* @Date: 2020-08-01 10:59:17
* @Last Modified by: ghua
* @Last Modified time: 2020-09-09 11:07:52
*/
......@@ -36,6 +36,7 @@ const ScienceTemplate: React.FC<ScienceTemplatePropsType> = (props) => {
</Player>
))
}
</div>
<div className="img_list">
{
......
......@@ -187,18 +187,31 @@ const CommodityDetail = (props) => {
commodityId: id
}
let headers = {}
console.log(layoutType, "layoutType")
switch (layoutType) {
case LAYOUT_TYPE.channel:
headers = {
type: 3
if(type === "3") {
headers = {
type: 5
}
} else {
headers = {
type: 3
}
}
params.channelMemberId = memberId
getDetailFn = PublicApi.getSearchShopChannelGetCommodityDetail
break
case LAYOUT_TYPE.ichannel:
headers = {
type: 4
if(type === "3") {
headers = {
type: 5
}
} else {
headers = {
type: 4
}
}
params.channelMemberId = memberId
getDetailFn = PublicApi.getSearchShopChannelGetCommodityDetail
......@@ -225,7 +238,7 @@ const CommodityDetail = (props) => {
getMemberCredit(res.data?.memberId, res.data?.memberRoleId)
}
} else {
message.info(res.message)
// message.info(res.message)
setErrorInfo(res.message)
}
setSpinLoading(false)
......
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