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 */
export const WEB = 1;
......@@ -15,7 +17,7 @@ export const APP = 4;
export const enumName = {
[WEB]: 'WEB',
[H5]: 'H5',
[APPLETS]: '小程序',
[APPLETS]: intl.formatMessage({ id: 'shop.template.environment.status_3' }),
[APP]: 'APP'
};
......@@ -29,7 +31,7 @@ export const environmentList = [
value: H5,
},
{
label: '小程序',
label: intl.formatMessage({ id: 'shop.template.environment.status_3' }),
value: APPLETS,
},
{
......
......@@ -46,4 +46,4 @@ export default {
"accountSetting.yourVerifyPhone": "Your verified phone:",
"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"
}
\ No newline at end of file
}
......@@ -77,4 +77,4 @@ export default {
'user.qingshuruyanzhengma':'Please enter the verification code',
'user.qingshezhinidexinmima':'Please set your new password',
'user.qingzaicishurumima':'Please enter the password again',
}
\ No newline at end of file
}
......@@ -1249,7 +1249,10 @@ export const repositOutSchema: ISchema = padRequiredMessage({
"foldInventory": {
type: 'number',
"x-component": "CustomSlider",
required: true,
'x-rules': [{
required: true,
message: getIntl().formatMessage({ id: 'common.form.input.placeholder' }),
}],
"x-component-props": {
width: '80%',
isNumber: true,
......
......@@ -5,7 +5,7 @@ import cx from 'classnames'
import { message } from 'antd'
import DetailPage from '@/components/DetailPage'
import UseModal from '../components/useModal'
import { Environment_Status } from '@/constants'
// import { Environment_Status } from '@/constants'
import styles from './index.less'
import { getTemplateWebPageTemplateWebFindShopTemplateDetails, postTemplateWebPageTemplateWebUseShopTemplate } from '@/services/TemplateV2Api'
......@@ -24,7 +24,13 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const [useModalVisible, setUseModalVisible] = useState<boolean>(false)
const [confirmLoading, setConfirmLoading] = useState(false)
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(() => {
fetchDetail()
}, [])
......@@ -58,10 +64,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
}
const handleLinkEdit = () => {
if(detailInfo?.environment === 1) {
if (detailInfo?.environment === 1) {
// web店铺装修
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店铺装修
window.location.href = `/memberCenter/shopAbility/template/mobile/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}&environment=${detailInfo?.environment}`
} else {
......@@ -70,9 +76,9 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
}
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}`
} 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}`
} else {
message.info(intl.formatMessage({ id: 'shop.template.preview.tip' }))
......
......@@ -60,7 +60,10 @@ const basicInfo: ISchema = {
type: 'number',
enum: [],
title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.schema.shopId'}),
required: true,
'x-rules': [{
required: true,
message: getIntl().formatMessage({id: 'common.bitian'}),
}],
},
digest: {
type: 'string',
......
......@@ -157,7 +157,12 @@ export const registerStep1Schema: ISchema = {
properties: {
typeId: {
type: 'string',
required: true,
"x-rules": [
{
required: true,
message: intl.formatMessage({id: 'common.text.pleaseSelect'})
}
],
"x-component": 'CustomRadio',
"x-component-props": {
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