Commit adc65952 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents ec18bcfa 9c278f8d
/*
* @Description: 省市区选择组件子项
*/
import React, { useState, useEffect } from 'react';
import { Select } from 'antd';
import { getManageAreaByPcode } from '@/services/ManageV2Api';
export type AreaSelectValueType = {
/**
* 名称
*/
name?: string,
/**
* 编码
*/
code: string,
}
export type OptionType = {
label: string,
value: string,
}
interface AreaSelectItemProps {
/**
* 父级code,null 表示第一层级,也就是省
*/
pcode: string | null,
/**
* 值,code数组
*/
value?: AreaSelectValueType,
/**
* 选择触发改变
*/
onChange?: (value: AreaSelectValueType) => void,
/**
* 自定义外部 className
*/
customClassName?: string,
/**
* placeholder
*/
placeholder?: string,
}
const AreaSelectItem: React.FC<AreaSelectItemProps> = (props) => {
const { pcode, value, onChange, customClassName, placeholder } = props;
const [innerValue, setInnerValue] = useState<string | undefined>(undefined);
const [options, setOptions] = useState<OptionType[]>([]);
const [loading, setLoading] = useState<boolean>(false);
const getAreaByPcode = (code?: string) => getManageAreaByPcode({
pcode: code,
});
const initProvinceOptions = async () => {
if (pcode === undefined) {
setOptions([]);
return;
}
setLoading(true);
const res = await getAreaByPcode(pcode);
if (res.code === 1000) {
setOptions(res.data.map((item) => ({ label: item.name, value: item.code })));
}
setLoading(false);
};
useEffect(() => {
initProvinceOptions();
}, [pcode]);
useEffect(() => {
if ('value' in props) {
setInnerValue(value?.code);
}
}, [value]);
const triggerChange = (value: AreaSelectValueType) => {
if (onChange) {
onChange(value);
}
};
const handleSelectChange = (value: string) => {
if (!('value' in props)) {
setInnerValue(value);
}
triggerChange(value ? {
name: options.find((curOptions) => curOptions.value === value)?.label || '',
code: value,
} : undefined);
};
return (
<Select
className={customClassName}
options={options}
value={innerValue}
onChange={handleSelectChange}
loading={loading}
placeholder={placeholder}
allowClear
/>
);
};
export default AreaSelectItem;
\ No newline at end of file
.area-select {
&-item {
width: 100%;
}
}
\ No newline at end of file
/*
* @Description: 省市区选择组件
*/
import React, { useState, useEffect } from 'react';
import { Row, Col } from 'antd';
import { useIntl } from 'umi';
import themeConfig from '@/../config/lingxi.theme.config';
import AreaSelectItem, { AreaSelectValueType } from './AreaSelectItem';
import styles from './index.less';
interface AreaSelectProps {
/**
* 值,code数组
*/
value?: AreaSelectValueType[],
/**
* 选择触发改变
*/
onChange?: (value: AreaSelectValueType[]) => void,
}
const MAX = 4; // 到街道
const AreaSelect: React.FC<AreaSelectProps> = (props) => {
const {
value,
onChange,
} = props;
const [innerValues, setInnerValues] = useState<AreaSelectValueType[]>([]);
const intl = useIntl();
useEffect(() => {
if ('value' in props && value.length) {
setInnerValues(value);
}
}, [value]);
const triggerChange = (value: AreaSelectValueType[]) => {
if (onChange) {
onChange(value);
}
};
const handleSelectChange = (value: AreaSelectValueType, index: number) => {
let newInnerValues = [...innerValues];
newInnerValues[index] = value;
// 如果是清空操作,则把当前层级之后的 选项 及 值 也清空
if (!value) {
let i = index + 1;
while (i < newInnerValues.length) {
newInnerValues[i] = undefined;
i++;
}
newInnerValues = newInnerValues.filter(Boolean);
triggerChange([]);
}
if (!('value' in props)) {
setInnerValues(newInnerValues);
}
// 全部选择了才触发 onChange
if (newInnerValues.length === MAX) {
triggerChange(newInnerValues);
}
};
return (
<div className={styles['area-select']}>
<Row gutter={parseInt(themeConfig['@padding-sm'])}>
<Col span={6}>
<AreaSelectItem
pcode={null}
customClassName={styles['area-select-item']}
value={innerValues[0]}
onChange={(value) => handleSelectChange(value, 0)}
placeholder={intl.formatMessage({id: 'components.shengfenzhixiashi'}, { default: '-省份/直辖市-' })}
/>
</Col>
<Col span={6}>
<AreaSelectItem
pcode={innerValues[0]?.code}
customClassName={styles['area-select-item']}
value={innerValues[1]}
onChange={(value) => handleSelectChange(value, 1)}
placeholder={intl.formatMessage({id: 'components.shi'}, { default: '-市-' })}
/>
</Col>
<Col span={6}>
<AreaSelectItem
pcode={innerValues[1]?.code}
customClassName={styles['area-select-item']}
value={innerValues[2]}
onChange={(value) => handleSelectChange(value, 2)}
placeholder={intl.formatMessage({id: 'components.qu'}, { default: '-区-' })}
/>
</Col>
<Col span={6}>
<AreaSelectItem
pcode={innerValues[2]?.code}
customClassName={styles['area-select-item']}
value={innerValues[3]}
onChange={(value) => handleSelectChange(value, 3)}
placeholder={intl.formatMessage({id: 'components.jiedao'}, { default: '-街道-' })}
/>
</Col>
</Row>
</div>
);
};
export default AreaSelect;
......@@ -7,6 +7,7 @@
*/
import React, { useState, useEffect, useMemo, useRef } from 'react';
import { Select, Button, Drawer, Divider, message } from 'antd';
import { useIntl } from 'umi';
import {
createFormActions,
FormEffectHooks,
......@@ -34,8 +35,6 @@ import { AddressSelectContextProvider } from './context';
import { AddressItemType, AddressValueType } from './components/AddressRadioGroup';
import AddressRadioGroup from './components/AddressRadioGroupFormilyItem';
import styles from './index.less';
import { getIntl } from 'umi';
const intl = getIntl();
const formActions = createFormActions();
const {
......@@ -198,6 +197,8 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
// 记录是否是新增或编辑操作
const actionFlagRef = useRef<boolean>(false);
const intl = useIntl();
const triggerChange = (value: AddressValueType) => {
if (onChange) {
onChange(value);
......@@ -295,7 +296,7 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
return fieldState.originData;
});
if (!provinceCodeOriginData) {
message.warn(intl.formatMessage({id: 'components.weizhaodaoshengjixinxi'}));
message.warn(intl.formatMessage({ id: 'components.weizhaodaoshengjixinxi' }, { default: '未找到省级信息' }));
return;
}
const currentProvince = provinceCodeOriginData.find((item) => item.code === values.provinceCode);
......@@ -304,7 +305,7 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
return fieldState.originData;
});
if (!cityCodeOriginData) {
message.warn(intl.formatMessage({id: 'components.weizhaodaoshijixinxi'}));
message.warn(intl.formatMessage({ id: 'components.weizhaodaoshijixinxi' }, { default: '未找到市级信息' }));
return;
}
const currentCity = cityCodeOriginData.find((item) => item.code === values.cityCode);
......@@ -313,7 +314,7 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
return fieldState.originData;
});
if (!districtCodeOriginData) {
message.warn(intl.formatMessage({id: 'components.weizhaodaoqujixinxi'}));
message.warn(intl.formatMessage({ id: 'components.weizhaodaoqujixinxi' }, { default: '未找到区级信息' }));
return;
}
const currentDistrict = districtCodeOriginData.find((item) => item.code === values.districtCode);
......@@ -322,7 +323,7 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
return fieldState.originData;
});
if (!streetCodeOriginData) {
message.warn(intl.formatMessage({id: 'components.weizhaodaojiedaoxinxi'}));
message.warn(intl.formatMessage({ id: 'components.weizhaodaojiedaoxinxi' }, { default: '未找到街道信息' }));
return;
}
const currentStreet = streetCodeOriginData.find((item) => item.code === values.streetCode);
......@@ -504,7 +505,7 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
});
if (areaRes.code !== 1000) {
message.warn(intl.formatMessage({id: 'components.huoqushengjixinxishibai'}));
message.warn(intl.formatMessage({ id: 'components.huoqushengjixinxishibai' }, { default: '获取省级信息失败' }));
return;
}
const { data } = areaRes;
......@@ -523,7 +524,7 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
return (
<div>
<Button onClick={handleAddAddress}>
{flag ? `${intl.formatMessage({id: 'components.xinzeng'})}${addressType === 2 ? intl.formatMessage({id: 'components.fahuo'}) : intl.formatMessage({id: 'components.shouhuo'})}${intl.formatMessage({id: 'components.dizhi'})}` : intl.formatMessage({id: 'components.quxiao'})}
{flag ? `${intl.formatMessage({ id: 'components.xinzeng' }, { default: '新增' })}${addressType === 2 ? intl.formatMessage({ id: 'components.fahuo' }, { default: '发货' }) : intl.formatMessage({ id: 'components.shouhuo' }, { default: '收货' })}${intl.formatMessage({ id: 'components.dizhi' }, { default: '地址' })}` : intl.formatMessage({ id: 'components.quxiao' }, { default: '取消' })}
</Button>
<Divider style={{ marginBottom: 4 }} />
</div>
......@@ -549,7 +550,7 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
});
if (areaRes.code !== 1000) {
message.warn(intl.formatMessage({id: 'components.huoqushengjixinxishibai'}));
message.warn(intl.formatMessage({ id: 'components.huoqushengjixinxishibai' }, { default: '获取省级信息失败' }));
return;
}
const { data } = areaRes;
......@@ -584,7 +585,7 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
editAddressId.current = id;
} else {
message.warn(intl.formatMessage({id: 'components.huoqudizhixinxishibai'}));
message.warn(intl.formatMessage({ id: 'components.huoqudizhixinxishibai' }, { default: '获取地址信息失败' }));
}
} catch (error) {
console.warn(error);
......@@ -648,12 +649,12 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
className={styles['address-select-action']}
disabled={disabled}
>
{intl.formatMessage({id: 'components.genggai'})}
{intl.formatMessage({ id: 'components.genggai' }, { default: '更改' })}
</Button>
</div>
<Drawer
title={intl.formatMessage({id: 'components.genggaishouhuodizhixinxi'})}
title={intl.formatMessage({ id: 'components.genggaishouhuodizhixinxi' }, { default: '更改收货地址信息' })}
width={800}
onClose={() => handleVisibleDrawer(false)}
visible={visibleDrawer}
......@@ -665,14 +666,14 @@ const AddressSelect: React.FC<AddressSelectProps> = (props) => {
}}
>
<Button onClick={() => handleVisibleDrawer(false)} style={{ marginRight: 16 }}>
{intl.formatMessage({id: 'components.quxiao'})}
{intl.formatMessage({ id: 'components.quxiao' }, { default: '取消' })}
</Button>
<Button
onClick={() => formActions.submit()}
type="primary"
loading={submitLoading}
>
{intl.formatMessage({id: 'components.queding'})}
{intl.formatMessage({ id: 'components.queding' }, { default: '确定' })}
</Button>
</div>
}
......
......@@ -30,8 +30,6 @@ export default {
'merchantCoupon.denomination':'voucher denomination',
'merchantCoupon.getWayName':'How to get coupons',
'merchantCoupon.couponName':'Coupon name',
'merchantCoupon.receive':'Receive',
'merchantCoupon.failureAfterDays':'Failure after days',
'merchantCoupon.enterCouponNameSearch':'Enter the coupon name to search',
'merchantCoupon.Search':'Search',
'merchantCoupon.CouponID':'Coupon ID',
......@@ -55,8 +53,6 @@ export default {
'merchantCoupon.ReceivingConditions':'Receiving Conditions',
'merchantCoupon.zhang':'张',
'merchantCoupon.daily':'Daily',
'merchantCoupon.acqiure':'Receive',
'merchantCoupon.FailureAfterDays':'Failure after days',
'merchantCoupon.Vipname':'Member Name',
'merchantCoupon.lfy':'Member Type',
'merchantCoupon.roleName':'Member Role',
......@@ -120,7 +116,6 @@ export default {
"merchantCoupon.time": "Time",
"merchantCoupon.reason": "Reason",
"merchantCoupon.DealsCoupontype": "Coupon Type",
"merchantCoupon.effectiveTimeEnd": "Coupon Valid Period Deadline",
"merchantCoupon.Quantity": "Coupon Issuance Quantity",
"merchantCoupon.Restart": "Restart",
"merchantCoupon.Pleasechoosethemallfirst": "Pleasechoosethemallfirst",
......@@ -191,5 +186,7 @@ export default {
"merchantCoupon.VipIDGiveMountDaily": "The total claimable for each member ID must be greater than the daily claimable",
"merchantCoupon.giveCouponStartTimeValid": "The deadline for receiving (issuing) coupons should be less than the deadline for coupon validity",
"merchantCoupon.giveCouponStartTimeValidUpto": "The expiration time of the coupon validity period should be greater than the coupon receipt (issuance) deadline",
"merchantCoupon.giveCouponEveryID": "The number of coupons issued should be greater than or equal to the total number of receivables per member ID"
"merchantCoupon.giveCouponEveryID": "The number of coupons issued should be greater than or equal to the total number of receivables per member ID",
"merchantCoupon.components.couponRules.effectiveTimeEnd": "It expires {days} days after receipt",
}
......@@ -30,8 +30,6 @@ export default {
'merchantCoupon.denomination': '액면가',
'merchantCoupon.getWayName': '상품권 수령 방식',
'merchantCoupon.couponName': '쿠폰 이름',
'merchantCoupon.receive': '받다',
'merchantCoupon.failureAfterDays': '일후 실효',
'merchantCoupon.enterCouponNameSearch': '쿠폰 명칭을 입력하여 검색하다',
'merchantCoupon.Search': '수색하다',
'merchantCoupon.CouponID': '쿠폰 ID',
......@@ -55,8 +53,6 @@ export default {
'merchantCoupon.ReceivingConditions': '수령 조건',
'merchantCoupon.zhang': '벌리다',
'merchantCoupon.daily': '날마다',
'merchantCoupon.acqiure': '받다',
'merchantCoupon.FailureAfterDays': '일후 실효',
'merchantCoupon.Vipname': '회원명',
'merchantCoupon.lfy': '회원 유형',
'merchantCoupon.roleName': '회원 역할',
......@@ -120,7 +116,6 @@ export default {
"merchantCoupon.time": '타임',
"merchantCoupon.reason": '까닭',
"merchantCoupon.DealsCoupontype": '쿠폰 유형',
"merchantCoupon.effectiveTimeEnd": '쿠폰 유효기간 마감 시간',
"merchantCoupon.Quantity": '발행 수량',
"merchantCoupon.Restart": '재부팅',
"merchantCoupon.Pleasechoosethemallfirst": '우선 상점을 선택하세요',
......@@ -191,5 +186,7 @@ export default {
"merchantCoupon.VipIDGiveMountDaily": '각 회원 ID 총 수령가능은 매일 수령가능보다 커야 합니다',
"merchantCoupon.giveCouponStartTimeValid": '수령권 마감 시간은 권 유효기간 마감 시간보다 작아야 한다',
"merchantCoupon.giveCouponStartTimeValidUpto": '쿠폰의 유효기간 마감 시간은 쿠폰의 수령 마감 시간보다 많을 것이다',
"merchantCoupon.giveCouponEveryID": '발권 수량은 매 회원 ID의 총 수령 수량보다 많아야 합니다'
"merchantCoupon.giveCouponEveryID": '발권 수량은 매 회원 ID의 총 수령 수량보다 많아야 합니다',
"merchantCoupon.components.couponRules.effectiveTimeEnd": "수령후 {days}일후에는 효력을 상실한다",
}
\ No newline at end of file
......@@ -30,8 +30,6 @@ export default {
'merchantCoupon.denomination': '劵面额',
'merchantCoupon.getWayName': '领劵方式',
'merchantCoupon.couponName': '优惠劵名称',
'merchantCoupon.receive': '领取',
'merchantCoupon.failureAfterDays': '天后失效',
'merchantCoupon.enterCouponNameSearch': '输入优惠劵名称进行搜索',
'merchantCoupon.Search': '搜索',
'merchantCoupon.CouponID': '优惠劵ID',
......@@ -55,8 +53,6 @@ export default {
'merchantCoupon.ReceivingConditions': '领取条件',
'merchantCoupon.zhang': '张',
'merchantCoupon.daily': '每日',
'merchantCoupon.acqiure': '领取',
'merchantCoupon.FailureAfterDays': '天后失效',
'merchantCoupon.Vipname': '会员名称',
'merchantCoupon.lfy': '会员类型',
'merchantCoupon.roleName': '会员角色',
......@@ -120,7 +116,6 @@ export default {
"merchantCoupon.time": "时间",
"merchantCoupon.reason": "原因",
"merchantCoupon.DealsCoupontype": "优惠劵类型",
"merchantCoupon.effectiveTimeEnd": "劵有效期截止时间",
"merchantCoupon.Quantity": "发劵数量",
"merchantCoupon.Restart": "重启",
"merchantCoupon.Pleasechoosethemallfirst": "请先选择商城",
......@@ -191,5 +186,7 @@ export default {
"merchantCoupon.VipIDGiveMountDaily": "每会员ID总共可领取必须大于每日可领取",
"merchantCoupon.giveCouponStartTimeValid": "领(发)券截止时间应该小于券有效期截止时间",
"merchantCoupon.giveCouponStartTimeValidUpto": "券有效期截止时间应该大于领(发)券截止时间",
"merchantCoupon.giveCouponEveryID": "发券数量应该大于等于每会员ID总共可领取数量"
"merchantCoupon.giveCouponEveryID": "发券数量应该大于等于每会员ID总共可领取数量",
"merchantCoupon.components.couponRules.effectiveTimeEnd": "领取{days}天后过期",
}
\ No newline at end of file
......@@ -88,13 +88,13 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
render: (text: any, record: any) => <StatusTag type='primary' title={text} />
}, {
title: intl.formatMessage({ id: 'balance.dingdanleixing' }),
key: 'orderType',
dataIndex: 'orderType',
key: 'orderTypeName',
dataIndex: 'orderTypeName',
render: (text: any, record: any) => <StatusTag type='primary' title={text} />
}, {
title: intl.formatMessage({ id: 'balance.danjuleixing' }),
key: 'billType',
dataIndex: 'billType',
key: 'billTypeName',
dataIndex: 'billTypeName',
render: (text: any, record: any) => <StatusTag type='primary' title={text} />
}];
......
......@@ -481,6 +481,20 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
</Form.Item>
<Form.Item
labelAlign="left"
name="phone"
label={<RequireItem label={intl.formatMessage({ id: 'shop.form.label.phone' })} />}
>
<Input allowClear autoComplete="off" className={styles.form_item} />
</Form.Item>
<Form.Item
labelAlign="left"
name="address"
label={<RequireItem label={intl.formatMessage({ id: 'shop.form.label.address' })} />}
>
<Input allowClear autoComplete="off" className={styles.form_item} />
</Form.Item>
<Form.Item
labelAlign="left"
name="shopId"
label={<RequireItem label={intl.formatMessage({ id: 'shop.form.label.inviteCode' })} brief={<Tooltip placement="top" title={intl.formatMessage({ id: 'shop.form.label.inviteCode.tip' })}><QuestionCircleOutlined /></Tooltip>} />}
>
......
......@@ -125,7 +125,13 @@ export const complaintAddSchema: ISchema = {
'x-component-props': {
placeholder: `${intl.formatMessage({ id: 'member.complaintsAndSuggests.common.columns.index.caseTime'})}`,
format: 'YYYY-MM-DD HH:mm:ss'
}
},
"x-rules": [
{
required: true,
message: `${intl.formatMessage({ id: 'member.complaintsAndSuggests.common.columns.index.caseTime'})}`
}
],
},
byUserEditName: {
type: 'string',
......
......@@ -62,7 +62,7 @@ const columns = (target = '/memberCenter/marketingAbility/merchantCoupon/unsubmi
title: intl.formatMessage({ id: 'merchantCoupon.effectiveTimeEnd' }),
dataIndex: 'effectiveTimeEnd',
align: 'center',
render: (text, record) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : `${intl.formatMessage({ id: 'merchantCoupon.receive' }) + record.invalidDay + intl.formatMessage({ id: 'merchantCoupon.failureAfterDays' })}`,
render: (text, record) => text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : `${intl.formatMessage({ id: 'merchantCoupon.components.couponRules.effectiveTimeEnd' }, { days: record.invalidDay || '' })}`,
},
{
title: intl.formatMessage({ id: 'merchantCoupon.getWayName' }),
......
......@@ -6,6 +6,7 @@
* @Description: 优惠券规则
*/
import React from 'react';
import { getIntl} from 'umi';
import moment from 'moment';
import {
MERCHANT_COUPON_RECEIVE_FRONT,
......@@ -14,7 +15,7 @@ import {
MERCHANT_COUPON_RECEIVE_OPERATE,
} from '@/constants/marketing';
import CustomizeColumn, { IProps as CustomizeColumnProps, DataItem } from '@/components/CustomizeColumn';
import { getIntl} from 'umi'
const intl = getIntl();
export type PropsType = Omit<CustomizeColumnProps, 'data' | 'column'> & {
......@@ -99,7 +100,7 @@ const CouponRules: React.FC<PropsType> = (props: PropsType) => {
),
{
title: intl.formatMessage({ id: 'merchantCoupon.ExpirationDate' }),
value: dataSource.effectiveTimeEnd ? moment(dataSource.effectiveTimeEnd).format('YYYY-MM-DD HH:mm:ss') : `${intl.formatMessage({ id: 'merchantCoupon.acqiure' }) + dataSource.invalidDay || '' + intl.formatMessage({ id: 'merchantCoupon.FailureAfterDays' })}`,
value: dataSource.effectiveTimeEnd ? moment(dataSource.effectiveTimeEnd).format('YYYY-MM-DD HH:mm:ss') : `${intl.formatMessage({ id: 'merchantCoupon.components.couponRules.effectiveTimeEnd' }, { days: dataSource.invalidDay || '' })}`,
},
{
title: intl.formatMessage({ id: 'merchantCoupon.instructions' }),
......
......@@ -264,6 +264,13 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => {
fetchTableData(turn, idx, page);
}
useEffect(() => {
if (!isEmpty(context)) {
let priceContrast = (context.priceContrast === 1 ? PRICECONTRAST_TYPE.UNDECRYPTED : PRICECONTRAST_TYPE.UNENCRYPTED);
setEncrypt(priceContrast)
}
}, [context])
return (
<BidDetailContext.Provider value={soure[idx]}>
<Card
......
import { extend, ResponseError, OnionOptions, RequestOptionsInit, ResponseInterceptor, OnionMiddleware, Context, RequestMethod } from 'umi-request';
import responseCode from '@/constants/responseCode'
import { IRequestError, IRequestSuccess } from '..';
import { getIntl } from 'umi'
import { getIntl, getLocale } from 'umi'
import { message } from 'antd'
import { getCookieAuth, removeAuth } from './auth';
import { GlobalConfig } from '@/global/config';
import qs from 'qs'
import { getCookie } from './cookie';
export type CtlType = 'none' | 'message'
// 根前缀请求路径
......@@ -60,11 +61,17 @@ const errorHandler = (error: ResponseError): IRequestError => {
}
}
const requestLanguageMaps = {
'zh-CN': 'zh',
'en-US': 'en',
'ko-KR': 'ko',
}
const defaultHeaders = {
'Content-Type': 'Application/json',
'source': '1',
'environment': '1',
'site': GlobalConfig.global.siteInfo.id.toString()
'site': GlobalConfig.global.siteInfo.id.toString(),
}
/**
......@@ -84,6 +91,7 @@ baseRequest.interceptors.request.use((url: string, options: RequestOptionsInit):
// 判断是否有权限
const { userId, memberId, token, memberRoleId } = getCookieAuth() || {}
const headers: any = {
'Accept-Language': requestLanguageMaps[getLocale() as any],
...options.headers
}
userId && (headers.userId = userId)
......
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