Commit abb91a14 authored by 前端-许佳敏's avatar 前端-许佳敏
parents a4783186 19437305
......@@ -95,9 +95,9 @@ const RangeTime: React.FC<Iprops> = (props: Iprops) => {
}
if (partial === 'end') {
return {
disabledHours: () => range(0, 24).splice(0, startTime.get('hour')),
disabledMinutes: () => range(0, 60).splice(0, current && current.isSame(startTime, 'hour') ? startTime.get('minute') : 0),
disabledSeconds: () => range(0, 60).splice(0, current && current.isSame(startTime, 'hour') && current.isSame(startTime, 'minute') ? startTime.get('second') + 1 : 0),
disabledHours: () => range(0, 24).splice(0, startTime?.get('hour')),
disabledMinutes: () => range(0, 60).splice(0, current && current.isSame(startTime, 'hour') ? startTime?.get('minute') : 0),
disabledSeconds: () => range(0, 60).splice(0, current && current.isSame(startTime, 'hour') && current.isSame(startTime, 'minute') ? startTime?.get('second') + 1 : 0),
};
}
return {};
......
......@@ -60,6 +60,9 @@ import korenImg from '../../../mockStatic/koren.png'
import us from '../../../mockStatic/us.png'
import '../styles/SelectLang.less'
import { getCookie, removeCookie } from '@/utils/cookie'
import { getTopDomainByHost } from '@/utils'
import { TOP_DOMAIN_NO_PORT } from '@/constants'
interface countryItem {
name: string,
......@@ -69,9 +72,14 @@ interface countryItem {
const HeaderDropdown: React.FC = () => {
// 此处暂时无接口, 对接接口后需用枚举类型做补充
const [currentLangKey, setCurrentLangKey] = useState<string>('cn')
const [currentLangKey, setCurrentLangKey] = useState<string>('cn');
const locales = getCookie('locales');
useEffect(() => {
console.log(getLocale(), "locale")
if (locales) {
setLocale(locales as any, true);
removeCookie('locales', { path: '/', domain: getTopDomainByHost(TOP_DOMAIN_NO_PORT, true) })
}
setCurrentLangKey(getLocale())
}, [])
......
......@@ -211,6 +211,7 @@ export default {
'afterService.apply.pickupAddress-replace.required':'Please select the replacement pickup address',
'afterService.apply.purchaser.nothing':'Please select purchasing member first',
'afterService.apply.purchaser':'Purchasing member',
'afterService.apply.purchaser.placeholder': 'Please enter the name of the purchasing member',
'afterService.apply.repairCount':'Repair Quantity',
'afterService.apply.repairCount.required':'Please fill in the repair quantity',
'afterService.apply.repairCount.legal':'Please fill in a positive number and keep up to 3 decimal places',
......
......@@ -211,6 +211,7 @@ export default {
'afterService.apply.pickupAddress-replace.required': '교환 인수 주소 선택',
'afterService.apply.purchaser.nothing': '먼저 구매 회원을 선택하세요',
'afterService.apply.purchaser': '구매 회원',
'afterService.apply.purchaser.placeholder': '구매 회원 명칭을 입력하세요',
'afterService.apply.repairCount': '수리 수량',
'afterService.apply.repairCount.required': '수리 수량을 기입해 주십시오',
'afterService.apply.repairCount.legal': '정수를 기입하시고, 최대 3자리의 소수를 보존하십시오',
......
......@@ -211,6 +211,7 @@ export default {
'afterService.apply.pickupAddress-replace.required': '请选择换货自提地址',
'afterService.apply.purchaser.nothing': '请先选择采购会员',
'afterService.apply.purchaser': '采购会员',
'afterService.apply.purchaser.placeholder': '请输入采购会员名称',
'afterService.apply.repairCount': '维修数量',
'afterService.apply.repairCount.required': '请填写维修数量',
'afterService.apply.repairCount.legal': '请填写正数,最多保留3位小数',
......
......@@ -75,6 +75,7 @@ export const addSchema = (orderType: number): ISchema => {
title: intl.formatMessage({ id: 'afterService.apply.purchaser' }, { default: '采购会员' }),
enum: [],
'x-component-props': {
placeholder: intl.formatMessage({ id: 'afterService.apply.purchaser.placeholder' }, { default: '请输入采购会员名称' }),
showSearch: true,
defaultActiveFirstOption: false,
showArrow: false,
......
......@@ -16,6 +16,7 @@ export interface AuthInfo extends GetMemberLoginRegetResponse {
creditPoint: number,
memberRoleType: number,
memberRoleId: number,
locales?: string
}
const AUTH_KEY = 'AUTH'
......@@ -32,6 +33,7 @@ export const setAuth = (info: AuthInfo) => {
memberRoleType: info.memberRoleType,
memberRoleId: info.memberRoleId,
memberType: info.memberType,
locales: info.locales,
}
setCookie(AUTH_KEY, JSON.stringify(auth), { domain: TOP_DOMAIN_NO_PORT})
setCookie(AUTH_ROLES_KEY, JSON.stringify(info.roles), { domain: TOP_DOMAIN_NO_PORT })
......
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