|
|
|
@ -43,7 +43,10 @@ export enum ProductSpecId {
|
|
|
|
GroupBatchPublish60 = 'GROUP_BATCH_PUSH_60',
|
|
|
|
GroupBatchPublish60 = 'GROUP_BATCH_PUSH_60',
|
|
|
|
GroupBatchPublish80 = 'GROUP_BATCH_PUSH_80',
|
|
|
|
GroupBatchPublish80 = 'GROUP_BATCH_PUSH_80',
|
|
|
|
GroupBatchPublish100 = 'GROUP_BATCH_PUSH_100',
|
|
|
|
GroupBatchPublish100 = 'GROUP_BATCH_PUSH_100',
|
|
|
|
|
|
|
|
GroupBatchPublish120 = 'GROUP_BATCH_PUSH_120',
|
|
|
|
GroupBatchPublish150 = 'GROUP_BATCH_PUSH_150',
|
|
|
|
GroupBatchPublish150 = 'GROUP_BATCH_PUSH_150',
|
|
|
|
|
|
|
|
GroupBatchPublish200 = 'GROUP_BATCH_PUSH_200',
|
|
|
|
|
|
|
|
GroupBatchPublish250 = 'GROUP_BATCH_PUSH_250',
|
|
|
|
GroupBatchPublish300 = 'GROUP_BATCH_PUSH_300',
|
|
|
|
GroupBatchPublish300 = 'GROUP_BATCH_PUSH_300',
|
|
|
|
GroupBatchPublish500 = 'GROUP_BATCH_PUSH_500',
|
|
|
|
GroupBatchPublish500 = 'GROUP_BATCH_PUSH_500',
|
|
|
|
GroupBatchPublish750 = 'GROUP_BATCH_PUSH_750',
|
|
|
|
GroupBatchPublish750 = 'GROUP_BATCH_PUSH_750',
|
|
|
|
@ -51,21 +54,31 @@ export enum ProductSpecId {
|
|
|
|
GroupBatchPublish1000 = 'GROUP_BATCH_PUSH_1000',
|
|
|
|
GroupBatchPublish1000 = 'GROUP_BATCH_PUSH_1000',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const GROUP_OPTIONS = [
|
|
|
|
const GROUP_OPTIONS = [
|
|
|
|
{ value: MIN_GROUP_SIZE, productSpecId: ProductSpecId.GroupBatchPublish20, label: '20', price: 18 },
|
|
|
|
{
|
|
|
|
{ value: 50, productSpecId: ProductSpecId.GroupBatchPublish50, label: '50', price: 40 },
|
|
|
|
value: MIN_GROUP_SIZE,
|
|
|
|
{ value: 60, productSpecId: ProductSpecId.GroupBatchPublish60, label: '60', price: 48 },
|
|
|
|
productSpecId: ProductSpecId.GroupBatchPublish20,
|
|
|
|
{ value: 80, productSpecId: ProductSpecId.GroupBatchPublish80, label: '80', price: 58 },
|
|
|
|
label: '20',
|
|
|
|
{ value: 100, productSpecId: ProductSpecId.GroupBatchPublish100, label: '100', price: 68 },
|
|
|
|
price: 38,
|
|
|
|
{ value: 150, productSpecId: ProductSpecId.GroupBatchPublish150, label: '150', price: 98 },
|
|
|
|
originalPrice: 40,
|
|
|
|
{ value: 300, productSpecId: ProductSpecId.GroupBatchPublish300, label: '300', price: 128 },
|
|
|
|
},
|
|
|
|
{ value: 500, productSpecId: ProductSpecId.GroupBatchPublish500, label: '500', price: 168 },
|
|
|
|
{ value: 50, productSpecId: ProductSpecId.GroupBatchPublish50, label: '50', price: 68, originalPrice: 100 },
|
|
|
|
{ value: 750, productSpecId: ProductSpecId.GroupBatchPublish750, label: '750', price: 188 },
|
|
|
|
{ value: 60, productSpecId: ProductSpecId.GroupBatchPublish60, label: '60', price: 78, originalPrice: 120 },
|
|
|
|
{ value: 800, productSpecId: ProductSpecId.GroupBatchPublish800, label: '800', price: 198 },
|
|
|
|
{ value: 80, productSpecId: ProductSpecId.GroupBatchPublish80, label: '80', price: 88, originalPrice: 160 },
|
|
|
|
{ value: 1000, productSpecId: ProductSpecId.GroupBatchPublish1000, label: '1000', price: 288 },
|
|
|
|
{ value: 100, productSpecId: ProductSpecId.GroupBatchPublish100, label: '100', price: 98, originalPrice: 200 },
|
|
|
|
|
|
|
|
{ value: 120, productSpecId: ProductSpecId.GroupBatchPublish120, label: '120', price: 108, originalPrice: 240 },
|
|
|
|
|
|
|
|
{ value: 150, productSpecId: ProductSpecId.GroupBatchPublish150, label: '150', price: 128, originalPrice: 300 },
|
|
|
|
|
|
|
|
{ value: 200, productSpecId: ProductSpecId.GroupBatchPublish200, label: '200', price: 148, originalPrice: 200 },
|
|
|
|
|
|
|
|
{ value: 250, productSpecId: ProductSpecId.GroupBatchPublish250, label: '250', price: 168, originalPrice: 250 },
|
|
|
|
|
|
|
|
{ value: 300, productSpecId: ProductSpecId.GroupBatchPublish300, label: '300', price: 168, originalPrice: 300 },
|
|
|
|
|
|
|
|
{ value: 500, productSpecId: ProductSpecId.GroupBatchPublish500, label: '500', price: 168, originalPrice: 500 },
|
|
|
|
|
|
|
|
{ value: 750, productSpecId: ProductSpecId.GroupBatchPublish750, label: '750', price: 168, originalPrice: 750 },
|
|
|
|
|
|
|
|
{ value: 800, productSpecId: ProductSpecId.GroupBatchPublish800, label: '800', price: 168, originalPrice: 800 },
|
|
|
|
|
|
|
|
{ value: 1000, productSpecId: ProductSpecId.GroupBatchPublish1000, label: '1000', price: 168, originalPrice: 1000 },
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
const calcPrice = (sendCount: number) => {
|
|
|
|
const calcPrice = (sendCount: number) => {
|
|
|
|
const originalPrice = sendCount * 1;
|
|
|
|
|
|
|
|
const price = GROUP_OPTIONS.find(o => o.value === sendCount)?.price || 18;
|
|
|
|
const price = GROUP_OPTIONS.find(o => o.value === sendCount)?.price || 18;
|
|
|
|
|
|
|
|
const originalPrice = GROUP_OPTIONS.find(o => o.value === sendCount)?.originalPrice || sendCount;
|
|
|
|
return { price, originalPrice };
|
|
|
|
return { price, originalPrice };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const TableList: React.FC = () => {
|
|
|
|
const TableList: React.FC = () => {
|
|
|
|
@ -258,7 +271,7 @@ const TableList: React.FC = () => {
|
|
|
|
cityName: formData.city.label,
|
|
|
|
cityName: formData.city.label,
|
|
|
|
groupLink: formData.groupLink,
|
|
|
|
groupLink: formData.groupLink,
|
|
|
|
sendCount: formData.sendCount,
|
|
|
|
sendCount: formData.sendCount,
|
|
|
|
groupQrCode: formData.qrCode[0].xhr.responseURL,
|
|
|
|
groupQrCode: formData.qrCode[0].xhr ? formData.qrCode[0].xhr.responseURL : formData.qrCode[0].url,
|
|
|
|
price: calcPrice(formData.sendCount).price,
|
|
|
|
price: calcPrice(formData.sendCount).price,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
console.log('update confirm', formData, params);
|
|
|
|
console.log('update confirm', formData, params);
|
|
|
|
|