Commit 25226f9f authored by Bill's avatar Bill
parents 8b72e510 994c737a
/** 1.WEB 2.H5 3.小程序 4.APP */ import { getIntl } from "umi";
/** 1.WEB 2.H5 3.小程序 4.APP */
const intl = getIntl();
/** WEB */ /** WEB */
export const WEB = 1; export const WEB = 1;
...@@ -15,7 +17,7 @@ export const APP = 4; ...@@ -15,7 +17,7 @@ export const APP = 4;
export const enumName = { export const enumName = {
[WEB]: 'WEB', [WEB]: 'WEB',
[H5]: 'H5', [H5]: 'H5',
[APPLETS]: '小程序', [APPLETS]: intl.formatMessage({ id: 'shop.template.environment.status_3' }),
[APP]: 'APP' [APP]: 'APP'
}; };
...@@ -29,7 +31,7 @@ export const environmentList = [ ...@@ -29,7 +31,7 @@ export const environmentList = [
value: H5, value: H5,
}, },
{ {
label: '小程序', label: intl.formatMessage({ id: 'shop.template.environment.status_3' }),
value: APPLETS, value: APPLETS,
}, },
{ {
......
...@@ -46,4 +46,4 @@ export default { ...@@ -46,4 +46,4 @@ export default {
"accountSetting.yourVerifyPhone": "Your verified phone:", "accountSetting.yourVerifyPhone": "Your verified phone:",
"accountSetting.ifLossTochange": "If it is lost or disabled, please change it immediately to avoid account theft", "accountSetting.ifLossTochange": "If it is lost or disabled, please change it immediately to avoid account theft",
"accountSetting.pswStartToUpdate": "Your payment password has been turned on. It is recommended that you change your payment password regularly to improve security" "accountSetting.pswStartToUpdate": "Your payment password has been turned on. It is recommended that you change your payment password regularly to improve security"
} }
\ No newline at end of file
...@@ -77,4 +77,4 @@ export default { ...@@ -77,4 +77,4 @@ export default {
'user.qingshuruyanzhengma':'Please enter the verification code', 'user.qingshuruyanzhengma':'Please enter the verification code',
'user.qingshezhinidexinmima':'Please set your new password', 'user.qingshezhinidexinmima':'Please set your new password',
'user.qingzaicishurumima':'Please enter the password again', 'user.qingzaicishurumima':'Please enter the password again',
} }
\ No newline at end of file
...@@ -1249,7 +1249,10 @@ export const repositOutSchema: ISchema = padRequiredMessage({ ...@@ -1249,7 +1249,10 @@ export const repositOutSchema: ISchema = padRequiredMessage({
"foldInventory": { "foldInventory": {
type: 'number', type: 'number',
"x-component": "CustomSlider", "x-component": "CustomSlider",
required: true, 'x-rules': [{
required: true,
message: getIntl().formatMessage({ id: 'common.form.input.placeholder' }),
}],
"x-component-props": { "x-component-props": {
width: '80%', width: '80%',
isNumber: true, isNumber: true,
......
...@@ -5,7 +5,7 @@ import cx from 'classnames' ...@@ -5,7 +5,7 @@ import cx from 'classnames'
import { message } from 'antd' import { message } from 'antd'
import DetailPage from '@/components/DetailPage' import DetailPage from '@/components/DetailPage'
import UseModal from '../components/useModal' import UseModal from '../components/useModal'
import { Environment_Status } from '@/constants' // import { Environment_Status } from '@/constants'
import styles from './index.less' import styles from './index.less'
import { getTemplateWebPageTemplateWebFindShopTemplateDetails, postTemplateWebPageTemplateWebUseShopTemplate } from '@/services/TemplateV2Api' import { getTemplateWebPageTemplateWebFindShopTemplateDetails, postTemplateWebPageTemplateWebUseShopTemplate } from '@/services/TemplateV2Api'
...@@ -24,7 +24,13 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -24,7 +24,13 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const [useModalVisible, setUseModalVisible] = useState<boolean>(false) const [useModalVisible, setUseModalVisible] = useState<boolean>(false)
const [confirmLoading, setConfirmLoading] = useState(false) const [confirmLoading, setConfirmLoading] = useState(false)
const intl = useIntl() const intl = useIntl()
const Environment_Status = {
0: intl.formatMessage({ id: 'shop.template.environment.status_0' }),
1: "web",
2: "H5",
3: intl.formatMessage({ id: 'shop.template.environment.status_3' }),
4: "APP"
}
useEffect(() => { useEffect(() => {
fetchDetail() fetchDetail()
}, []) }, [])
...@@ -58,10 +64,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -58,10 +64,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
} }
const handleLinkEdit = () => { const handleLinkEdit = () => {
if(detailInfo?.environment === 1) { if (detailInfo?.environment === 1) {
// web店铺装修 // web店铺装修
window.location.href = `/memberCenter/shopAbility/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}` window.location.href = `/memberCenter/shopAbility/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}`
} else if(detailInfo?.environment === 4 || detailInfo?.environment === 3) { } else if (detailInfo?.environment === 4 || detailInfo?.environment === 3) {
// app店铺装修 // app店铺装修
window.location.href = `/memberCenter/shopAbility/template/mobile/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}&environment=${detailInfo?.environment}` window.location.href = `/memberCenter/shopAbility/template/mobile/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}&environment=${detailInfo?.environment}`
} else { } else {
...@@ -70,9 +76,9 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -70,9 +76,9 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
} }
const handleLinkPreview = () => { const handleLinkPreview = () => {
if(detailInfo?.environment === 1) { if (detailInfo?.environment === 1) {
window.location.href = `/memberCenter/shopAbility/template/preview?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}` window.location.href = `/memberCenter/shopAbility/template/preview?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}`
} else if(detailInfo?.environment === 4 || detailInfo?.environment === 3) { } else if (detailInfo?.environment === 4 || detailInfo?.environment === 3) {
window.location.href = `/memberCenter/shopAbility/template/mobile/preview?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}` window.location.href = `/memberCenter/shopAbility/template/mobile/preview?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}`
} else { } else {
message.info(intl.formatMessage({ id: 'shop.template.preview.tip' })) message.info(intl.formatMessage({ id: 'shop.template.preview.tip' }))
......
...@@ -60,7 +60,10 @@ const basicInfo: ISchema = { ...@@ -60,7 +60,10 @@ const basicInfo: ISchema = {
type: 'number', type: 'number',
enum: [], enum: [],
title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.schema.shopId'}), title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.schema.shopId'}),
required: true, 'x-rules': [{
required: true,
message: getIntl().formatMessage({id: 'common.bitian'}),
}],
}, },
digest: { digest: {
type: 'string', type: 'string',
......
...@@ -157,7 +157,12 @@ export const registerStep1Schema: ISchema = { ...@@ -157,7 +157,12 @@ export const registerStep1Schema: ISchema = {
properties: { properties: {
typeId: { typeId: {
type: 'string', type: 'string',
required: true, "x-rules": [
{
required: true,
message: intl.formatMessage({id: 'common.text.pleaseSelect'})
}
],
"x-component": 'CustomRadio', "x-component": 'CustomRadio',
"x-component-props": { "x-component-props": {
layout: 'column' layout: 'column'
......
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