Commit fc705e60 authored by GuanHua's avatar GuanHua

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

parent e729b4e5
......@@ -60,10 +60,10 @@
"@ctrl/tinycolor": "^3.4.0",
"@formily/antd": "^1.3.3",
"@formily/antd-components": "^1.3.3",
"@lingxi-disign/core": "^1.0.6",
"@lingxi-disign/react": "^1.0.7",
"@lingxi-disign/react-web": "^1.0.2",
"@lingxi-disign/ui": "^1.0.6",
"@lingxi-disign/core": "^1.7.3",
"@lingxi-disign/react": "^1.7.6",
"@lingxi-disign/react-web": "^1.7.2",
"@lingxi-disign/ui": "^1.7.2",
"@turf/turf": "^6.4.0",
"@types/crypto-js": "^4.0.1",
"@types/js-cookie": "^2.2.6",
......
......@@ -34,7 +34,8 @@ const Environment_MAPS = {
const Property_MAPS = {
1: 'B端商城',
2: 'C端商城',
3: '自营商城',
3: 'B端自营商城',
4: 'C端自营商城',
}
const Title_MAPS = {
......@@ -71,13 +72,19 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
let _fetch;
switch (type) {
case 1:
_params.type = 1;
_params.environment = 4;
_params.property = property;
if (layoutType !== 'own') {
_params.type = 1;
_params.environment = 4;
_params.property = property;
_fetch = PublicApi.getManageShopListAdorn;
} else {
_fetch = PublicApi.getManageWebShopWebFindAppSelfShopByCurrMember;
}
if (keyWord) {
_params.name = keyWord
}
_fetch = PublicApi.getManageShopListAdorn;
break;
case 3:
if (keyWord) {
......@@ -110,7 +117,11 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
_params.shopId = shopId
_params.idNotInList = selectId
}
_fetch = PublicApi.getManageContentInformationListAdorn;
if (layoutType !== 'own') {
_fetch = PublicApi.getManageContentInformationListAdorn;
} else {
_fetch = PublicApi.getManageMemberInformationListAdorn
}
break;
// 品牌
case 6:
......
......@@ -77,6 +77,7 @@
&-record {
&-shop {
width: 100%;
height: 56px;
border: 1px solid #EDEEEF;
display: flex;
......@@ -102,6 +103,7 @@
}
&-integral {
width: 100%;
height: 56px;
border: 1px solid #EDEEEF;
display: flex;
......@@ -140,6 +142,7 @@
}
&-activity {
width: 100%;
height: 56px;
border: 1px solid #EDEEEF;
display: flex;
......@@ -185,6 +188,7 @@
}
&-commodity {
&-box {
margin-bottom: 16px;
......@@ -196,6 +200,7 @@
}
&-detail {
width: 100%;
height: 80px;
border: 1px solid #F7F8FA;
display: flex;
......@@ -239,6 +244,7 @@
}
&-activityList {
width: 100%;
display: flex;
flex-direction: row;
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
<div className={styles['bottomNavigationClient']}>
<div className={styles['bottomNavigationClient-box']}>
<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 className={styles['bottomNavigationClient-box']}>
<div className={styles['bottomNavigationClient-box-label']}>链接</div>
......
......@@ -323,8 +323,10 @@ const CardNavItem: React.FC<CardNavItemProps> = (props: CardNavItemProps) => {
}
if (values.channel && values.type === 3) {
newProps.id = values.channel
} else if (values.type === 2 || values.type === 5) {
} else if (values.type === 2) {
newProps.id = record ? record?.id : undefined
} else if (values.type === 5) {
newProps.id = record ? record?.shopId : undefined
}
changeProps({
......
......@@ -39,7 +39,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
const { memberId, memberRoleId } = getAuth() || {}
useEffect(() => {
if (id && id != record[0]?.id) {
if (id && id != record.id) {
const _params: any = {
shopId,
idInList: id,
......@@ -56,13 +56,18 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
case LAYOUT_TYPE.shop:
getFn = PublicApi.getMarketingAdornGoodsListAdorn
break
case LAYOUT_TYPE.own:
_params.memberId = memberId
_params.memberRoleId = memberRoleId
getFn = PublicApi.getMarketingAdornGoodsListAdorn
break
default:
break;
}
getFn && getFn(_params).then((res) => {
if (res.code === 1000) {
setRecord(res.data.data);
setRecord(res.data.data[0]);
}
}).catch(err => console.log(err))
} else if (!id) {
......@@ -145,19 +150,19 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
}
}
const _record = record[0];
// const _record = record[0];
return (
<div className={styles['suggestProductCommodity']}>
{id && record ? (
<>
<div className={styles['suggestProductCommodity-detail']}>
<img src={_record?.mainPic} />
<img src={record?.mainPic} />
<div className={styles['suggestProductCommodity-detail-right']}>
<Tooltip title={_record?.name}>
<div className={styles['suggestProductCommodity-detail-right-title']}>{_record?.name}</div>
<Tooltip title={record?.name}>
<div className={styles['suggestProductCommodity-detail-right-title']}>{record?.name}</div>
</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 className={styles['suggestProductCommodity-detail-cover']} onClick={() => { setCommodityVisible(true) }}>
<div className={styles['suggestProductCommodity-detail-cover-bottom']}>
......@@ -167,7 +172,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
</div>
<div className={styles['suggestProductCommodity-box']}>
<div className={styles['suggestProductCommodity-box-label']}>商品活动</div>
{_record?.activityList?.map((item, index) => {
{record?.activityList?.map((item, index) => {
return (
<div className={styles['suggestProductCommodity-activityList']} key={index} onClick={() => { _handleToDetailPage(item.id, item.belongType) }}>
<img src={ActivityImage} />
......@@ -187,6 +192,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
ref={saveEditInputRef}
key={index}
size="small"
maxLength={16}
className={styles['tag-input']}
defaultValue={editInputValue}
onChange={_handleEditInputChange}
......
......@@ -11,8 +11,8 @@ class Index extends Component<{}, {}> {
margin: '-24px',
}}
>
<img
src="https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/a121f49434074532837012acf75e52011601275036112.png"
<img
src="https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/a121f49434074532837012acf75e52011601275036112.png"
width="100%"
height="auto"
/>
......
......@@ -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装修信息
*/
const getAppConfig = (): Promise<any> => {
......@@ -172,10 +157,8 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
const param: any = {
current: 1,
pageSize: 1,
sortType: 2,
recommendLabel: [2, 3],
};
const res = await PublicApi.getManageContentInformationPage(param);
const res = await PublicApi.getManageMemberInformationListAdorn(param);
message.destroy()
if (res.code === 1000 && res.data.data) {
return res.data.data[0].title;
......@@ -986,7 +969,7 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
memberRoleId,
};
const _detailsData = await PublicApi.getMarketingAdornChannelGoodsListAdorn(
const _detailsData = await PublicApi.getMarketingAdornGoodsListAdorn(
param,
);
_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