Commit 771cf383 authored by Bill's avatar Bill

Merge branch 'v2' of 10.0.0.22:lingxi/lingxi-business-system into v2

parents d9c68147 2af072e6
......@@ -71,7 +71,7 @@
"core-js": "^3.6.5",
"crypto-js": "^4.0.0",
"god": "^0.2.9",
"lingxi-design-ui": "^2.0.15",
"lingxi-design-ui": "^2.0.16",
"lint-staged": "^10.0.7",
"mobx": "^5.15.4",
"mobx-react": "^6.2.2",
......
......@@ -77,9 +77,9 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props) => {
case 'top':
return "1920*70";
case 'banner':
return "1920*460";
return "656*336";
case 'interact':
return "285*120";
return "320*160";
case 'category':
return "500*90";
case 'nav':
......
......@@ -113,6 +113,7 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
}
if (selectKeys.length > 3) {
message.error('最多推荐3个二级品类');
reject();
return;
}
const param: any = {
......@@ -124,7 +125,7 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
PublicApi.postTemplateAdornWebEnterpriseSaveCategory(param).then(res => {
if (res.code === 1000) {
resolve();
resolve(true);
} else {
reject();
}
......
......@@ -6,7 +6,7 @@ import { inject } from 'mobx-react';
import { TEMPLATE_TYPE_TEXT } from '@/constants';
import DetailPage from '@/components/DetailPage';
import { PublicApi } from '@/services/api';
import { GetTemplateWebPageTemplateWebFindTemplateDetailsResponse } from '@/services/TemplateApi';
import { GetTemplateWebPageTemplateWebFindTemplateDetailsResponse } from '@/services/Template2Api';
import styles from './index.less';
import UseModal from '../components/useModal';
......@@ -120,6 +120,31 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
}
};
const lintToDesign = () => {
switch (type) {
case TEMPLATE_TYPE_TEXT.mall:
if (detailInfo?.environment === 1) {
window.location.href = `/pageCustomized/mall/template/edit?id=${id}&template=${detailInfo?.fileName}&environment=${detailInfo?.environment}&shopId=${detailInfo?.shopId}`;
} else {
if (detailInfo?.property === 2) {
window.location.href = `/pageCustomized/mobile/template/clientEdit?id=${id}&template=${detailInfo?.fileName}&environment=${detailInfo?.environment}&shopId=${detailInfo?.shopId}`;
} else {
window.location.href = `/pageCustomized/mobile/template/edit?id=${id}&template=${detailInfo?.fileName}&environment=${detailInfo?.environment}&shopId=${detailInfo?.shopId}`;
}
}
break;
case TEMPLATE_TYPE_TEXT.platform:
if (detailInfo?.environment === 1) {
window.location.href = `/pageCustomized/platform/template/edit?id=${id}&template=${detailInfo?.fileName}&environment=${detailInfo?.environment}`;
} else {
message.info(`暂仅支持web环境模板装修`);
}
break;
default:
break;
}
}
return (
<DetailPage
title="查看模板"
......@@ -164,26 +189,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
{
(type === TEMPLATE_TYPE_TEXT.mall || type === TEMPLATE_TYPE_TEXT.platform) && (
<Fragment>
<div className={cx(styles.btn, styles.renovation)} onClick={() => {
switch (type) {
case TEMPLATE_TYPE_TEXT.mall:
if (detailInfo?.environment === 1) {
window.location.href = `/pageCustomized/mall/template/edit?id=${id}&template=${detailInfo?.fileName}&environment=${detailInfo?.environment}&shopId=${detailInfo?.shopId}`;
} else {
window.location.href = `/pageCustomized/mobile/template/edit?id=${id}&template=${detailInfo?.fileName}&environment=${detailInfo?.environment}&shopId=${detailInfo?.shopId}`;
}
break;
case TEMPLATE_TYPE_TEXT.platform:
if (detailInfo?.environment === 1) {
window.location.href = `/pageCustomized/platform/template/edit?id=${id}&template=${detailInfo?.fileName}&environment=${detailInfo?.environment}`;
} else {
message.info(`暂仅支持web环境模板装修`);
}
break;
default:
break;
}
}} >
<div className={cx(styles.btn, styles.renovation)} onClick={lintToDesign} >
<LayoutOutlined />
<label>装修</label>
</div>
......
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