Commit fc705e60 authored by GuanHua's avatar GuanHua

fix: app自营商城装修bug修复

parent e729b4e5
...@@ -60,10 +60,10 @@ ...@@ -60,10 +60,10 @@
"@ctrl/tinycolor": "^3.4.0", "@ctrl/tinycolor": "^3.4.0",
"@formily/antd": "^1.3.3", "@formily/antd": "^1.3.3",
"@formily/antd-components": "^1.3.3", "@formily/antd-components": "^1.3.3",
"@lingxi-disign/core": "^1.0.6", "@lingxi-disign/core": "^1.7.3",
"@lingxi-disign/react": "^1.0.7", "@lingxi-disign/react": "^1.7.6",
"@lingxi-disign/react-web": "^1.0.2", "@lingxi-disign/react-web": "^1.7.2",
"@lingxi-disign/ui": "^1.0.6", "@lingxi-disign/ui": "^1.7.2",
"@turf/turf": "^6.4.0", "@turf/turf": "^6.4.0",
"@types/crypto-js": "^4.0.1", "@types/crypto-js": "^4.0.1",
"@types/js-cookie": "^2.2.6", "@types/js-cookie": "^2.2.6",
......
...@@ -34,7 +34,8 @@ const Environment_MAPS = { ...@@ -34,7 +34,8 @@ const Environment_MAPS = {
const Property_MAPS = { const Property_MAPS = {
1: 'B端商城', 1: 'B端商城',
2: 'C端商城', 2: 'C端商城',
3: '自营商城', 3: 'B端自营商城',
4: 'C端自营商城',
} }
const Title_MAPS = { const Title_MAPS = {
...@@ -71,13 +72,19 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => { ...@@ -71,13 +72,19 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
let _fetch; let _fetch;
switch (type) { switch (type) {
case 1: case 1:
_params.type = 1; if (layoutType !== 'own') {
_params.environment = 4; _params.type = 1;
_params.property = property; _params.environment = 4;
_params.property = property;
_fetch = PublicApi.getManageShopListAdorn;
} else {
_fetch = PublicApi.getManageWebShopWebFindAppSelfShopByCurrMember;
}
if (keyWord) { if (keyWord) {
_params.name = keyWord _params.name = keyWord
} }
_fetch = PublicApi.getManageShopListAdorn;
break; break;
case 3: case 3:
if (keyWord) { if (keyWord) {
...@@ -110,7 +117,11 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => { ...@@ -110,7 +117,11 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
_params.shopId = shopId _params.shopId = shopId
_params.idNotInList = selectId _params.idNotInList = selectId
} }
_fetch = PublicApi.getManageContentInformationListAdorn; if (layoutType !== 'own') {
_fetch = PublicApi.getManageContentInformationListAdorn;
} else {
_fetch = PublicApi.getManageMemberInformationListAdorn
}
break; break;
// 品牌 // 品牌
case 6: case 6:
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
&-record { &-record {
&-shop { &-shop {
width: 100%;
height: 56px; height: 56px;
border: 1px solid #EDEEEF; border: 1px solid #EDEEEF;
display: flex; display: flex;
...@@ -102,6 +103,7 @@ ...@@ -102,6 +103,7 @@
} }
&-integral { &-integral {
width: 100%;
height: 56px; height: 56px;
border: 1px solid #EDEEEF; border: 1px solid #EDEEEF;
display: flex; display: flex;
...@@ -140,6 +142,7 @@ ...@@ -140,6 +142,7 @@
} }
&-activity { &-activity {
width: 100%;
height: 56px; height: 56px;
border: 1px solid #EDEEEF; border: 1px solid #EDEEEF;
display: flex; display: flex;
...@@ -185,6 +188,7 @@ ...@@ -185,6 +188,7 @@
} }
&-commodity { &-commodity {
&-box { &-box {
margin-bottom: 16px; margin-bottom: 16px;
...@@ -196,6 +200,7 @@ ...@@ -196,6 +200,7 @@
} }
&-detail { &-detail {
width: 100%;
height: 80px; height: 80px;
border: 1px solid #F7F8FA; border: 1px solid #F7F8FA;
display: flex; display: flex;
...@@ -239,6 +244,7 @@ ...@@ -239,6 +244,7 @@
} }
&-activityList { &-activityList {
width: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
......
import { ISchema } from "@formily/antd";
export const bannerSchema: ISchema = {
type: 'Object',
properties: {
layout: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
labelAlign: "top"
},
properties: {
name: {
type: 'string',
title: '名称',
'x-rules': [
{
required: true,
message: '请输入名称',
},
],
},
img: {
type: 'string',
title: '图标',
'x-rules': [
{
required: true,
message: '请上传图标',
},
],
"x-component": 'FormilyUpload',
"x-component-props": {
renderUploadChild: '{{renderUploadChild}}',
showFiles: false,
customizeItemRender: null,
children: null,
maxCount: 1,
},
},
typeWrap: {
type: 'object',
"x-component": 'flex-layout',
"x-component-props": {
rowStyle: {
justifyContent: 'flex-start',
alignItems: 'flex-start',
},
},
properties: {
type: {
type: 'string',
title: '导航链接',
enum: [],
'x-linkages': [
{
type: 'value:visible',
target: 'recordDetail',
condition: "{{$value !== 4}}"
},
],
'x-rules': [
{
required: true,
message: '请选择导航链接',
},
],
'x-component-props': {
style: {
width: 320,
marginRight: 12
}
}
},
sumbit: {
'x-component': 'Children',
'x-component-props': {
children: '{{SelectBtn}}',
},
'x-mega-props': {
span: 1,
},
},
}
},
recordDetail: {
'x-component': 'recordDetail',
},
}
}
}
};
...@@ -135,7 +135,7 @@ const BottomNavigationClient: React.FC<BottomNavigationClientProps> = (props: Bo ...@@ -135,7 +135,7 @@ const BottomNavigationClient: React.FC<BottomNavigationClientProps> = (props: Bo
<div className={styles['bottomNavigationClient']}> <div className={styles['bottomNavigationClient']}>
<div className={styles['bottomNavigationClient-box']}> <div className={styles['bottomNavigationClient-box']}>
<div className={styles['bottomNavigationClient-box-label']}>名称</div> <div className={styles['bottomNavigationClient-box-label']}>名称</div>
<Input key={`${selectedKey}-name`} disabled={type === 1} defaultValue={name} onBlur={_onChangeName} /> <Input key={`${selectedKey}-name`} maxLength={4} disabled={type === 1} defaultValue={name} onBlur={_onChangeName} />
</div> </div>
<div className={styles['bottomNavigationClient-box']}> <div className={styles['bottomNavigationClient-box']}>
<div className={styles['bottomNavigationClient-box-label']}>链接</div> <div className={styles['bottomNavigationClient-box-label']}>链接</div>
......
...@@ -323,8 +323,10 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => { ...@@ -323,8 +323,10 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
} }
if (values.channel && values.type === 3) { if (values.channel && values.type === 3) {
newProps.id = values.channel newProps.id = values.channel
} else if (values.type === 2 || values.type === 5) { } else if (values.type === 2) {
newProps.id = record ? record?.id : undefined newProps.id = record ? record?.id : undefined
} else if (values.type === 5) {
newProps.id = record ? record?.shopId : undefined
} }
changeProps({ changeProps({
......
...@@ -39,7 +39,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props: ...@@ -39,7 +39,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
const { memberId, memberRoleId } = getAuth() || {} const { memberId, memberRoleId } = getAuth() || {}
useEffect(() => { useEffect(() => {
if (id && id != record[0]?.id) { if (id && id != record.id) {
const _params: any = { const _params: any = {
shopId, shopId,
idInList: id, idInList: id,
...@@ -56,13 +56,18 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props: ...@@ -56,13 +56,18 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
case LAYOUT_TYPE.shop: case LAYOUT_TYPE.shop:
getFn = PublicApi.getMarketingAdornGoodsListAdorn getFn = PublicApi.getMarketingAdornGoodsListAdorn
break break
case LAYOUT_TYPE.own:
_params.memberId = memberId
_params.memberRoleId = memberRoleId
getFn = PublicApi.getMarketingAdornGoodsListAdorn
break
default: default:
break; break;
} }
getFn && getFn(_params).then((res) => { getFn && getFn(_params).then((res) => {
if (res.code === 1000) { if (res.code === 1000) {
setRecord(res.data.data); setRecord(res.data.data[0]);
} }
}).catch(err => console.log(err)) }).catch(err => console.log(err))
} else if (!id) { } else if (!id) {
...@@ -145,19 +150,19 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props: ...@@ -145,19 +150,19 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
} }
} }
const _record = record[0]; // const _record = record[0];
return ( return (
<div className={styles['suggestProductCommodity']}> <div className={styles['suggestProductCommodity']}>
{id && record ? ( {id && record ? (
<> <>
<div className={styles['suggestProductCommodity-detail']}> <div className={styles['suggestProductCommodity-detail']}>
<img src={_record?.mainPic} /> <img src={record?.mainPic} />
<div className={styles['suggestProductCommodity-detail-right']}> <div className={styles['suggestProductCommodity-detail-right']}>
<Tooltip title={_record?.name}> <Tooltip title={record?.name}>
<div className={styles['suggestProductCommodity-detail-right-title']}>{_record?.name}</div> <div className={styles['suggestProductCommodity-detail-right-title']}>{record?.name}</div>
</Tooltip> </Tooltip>
<div className={styles['suggestProductCommodity-detail-right-price']}>{_record?.min ? `¥ ${priceFormat(_record?.min)}` : ''}</div> <div className={styles['suggestProductCommodity-detail-right-price']}>{record?.min ? `¥ ${priceFormat(record?.min)}` : ''}</div>
</div> </div>
<div className={styles['suggestProductCommodity-detail-cover']} onClick={() => { setCommodityVisible(true) }}> <div className={styles['suggestProductCommodity-detail-cover']} onClick={() => { setCommodityVisible(true) }}>
<div className={styles['suggestProductCommodity-detail-cover-bottom']}> <div className={styles['suggestProductCommodity-detail-cover-bottom']}>
...@@ -167,7 +172,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props: ...@@ -167,7 +172,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
</div> </div>
<div className={styles['suggestProductCommodity-box']}> <div className={styles['suggestProductCommodity-box']}>
<div className={styles['suggestProductCommodity-box-label']}>商品活动</div> <div className={styles['suggestProductCommodity-box-label']}>商品活动</div>
{_record?.activityList?.map((item, index) => { {record?.activityList?.map((item, index) => {
return ( return (
<div className={styles['suggestProductCommodity-activityList']} key={index} onClick={() => { _handleToDetailPage(item.id, item.belongType) }}> <div className={styles['suggestProductCommodity-activityList']} key={index} onClick={() => { _handleToDetailPage(item.id, item.belongType) }}>
<img src={ActivityImage} /> <img src={ActivityImage} />
...@@ -187,6 +192,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props: ...@@ -187,6 +192,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
ref={saveEditInputRef} ref={saveEditInputRef}
key={index} key={index}
size="small" size="small"
maxLength={16}
className={styles['tag-input']} className={styles['tag-input']}
defaultValue={editInputValue} defaultValue={editInputValue}
onChange={_handleEditInputChange} onChange={_handleEditInputChange}
......
...@@ -11,8 +11,8 @@ class Index extends Component<{}, {}> { ...@@ -11,8 +11,8 @@ class Index extends Component<{}, {}> {
margin: '-24px', margin: '-24px',
}} }}
> >
<img <img
src="https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/a121f49434074532837012acf75e52011601275036112.png" src="https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/a121f49434074532837012acf75e52011601275036112.png"
width="100%" width="100%"
height="auto" height="auto"
/> />
......
...@@ -102,21 +102,6 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => { ...@@ -102,21 +102,6 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
}, []); }, []);
/** /**
* 获取渠道信息
*/
const fetchChannelInfo = (): Promise<any> => {
return new Promise(resolve => {
PublicApi.getTemplateWebMemberChannelWebFindCurrMemberChannel().then(
res => {
if (res.code === 1000) {
resolve(res.data);
}
},
);
});
};
/**
* 获取app装修信息 * 获取app装修信息
*/ */
const getAppConfig = (): Promise<any> => { const getAppConfig = (): Promise<any> => {
...@@ -172,10 +157,8 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => { ...@@ -172,10 +157,8 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
const param: any = { const param: any = {
current: 1, current: 1,
pageSize: 1, pageSize: 1,
sortType: 2,
recommendLabel: [2, 3],
}; };
const res = await PublicApi.getManageContentInformationPage(param); const res = await PublicApi.getManageMemberInformationListAdorn(param);
message.destroy() message.destroy()
if (res.code === 1000 && res.data.data) { if (res.code === 1000 && res.data.data) {
return res.data.data[0].title; return res.data.data[0].title;
...@@ -986,7 +969,7 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => { ...@@ -986,7 +969,7 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
memberRoleId, memberRoleId,
}; };
const _detailsData = await PublicApi.getMarketingAdornChannelGoodsListAdorn( const _detailsData = await PublicApi.getMarketingAdornGoodsListAdorn(
param, param,
); );
_detailsData.data.data?.forEach((child, childIndex) => { _detailsData.data.data?.forEach((child, childIndex) => {
......
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