s-material-react 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/common/addressItem.scss +41 -1
- package/css/common/card.scss +1 -0
- package/css/common/coupon.scss +8 -3
- package/css/common/icon.scss +79 -3
- package/css/pages/addressDetail.scss +79 -0
- package/css/pages/addressList.scss +32 -8
- package/css/pages/cart.scss +52 -5
- package/css/pages/couponList.scss +5 -0
- package/css/pages/goodsClassify.scss +32 -6
- package/css/pages/goodsDetail.scss +22 -67
- package/css/pages/index.scss +2 -0
- package/css/pages/mine.scss +2 -6
- package/css/pages/orderEntry.scss +4 -2
- package/css/pages/paymentMode.scss +75 -0
- package/css/pages/placeOrder.scss +30 -8
- package/css/pages/service.scss +1 -6
- package/css/pages/slider.scss +6 -0
- package/dist/common/addressItem/index.d.ts +1 -1
- package/dist/common/addressItem/index.js +6 -7
- package/dist/common/card/index.js +1 -1
- package/dist/common/coupon/index.d.ts +1 -1
- package/dist/common/coupon/index.js +4 -5
- package/dist/common/icon/index.d.ts +2 -1
- package/dist/common/icon/index.js +2 -2
- package/dist/common/mock/index.js +35 -0
- package/dist/components/AddressDetail/components/index.d.ts +0 -0
- package/dist/components/AddressDetail/components/index.js +1 -0
- package/dist/components/AddressDetail/components/skull.d.ts +2 -0
- package/dist/components/AddressDetail/components/skull.js +9 -0
- package/dist/components/AddressDetail/config.d.ts +51 -0
- package/dist/components/AddressDetail/config.js +65 -0
- package/dist/components/AddressDetail/hooks/index.d.ts +1 -0
- package/dist/components/AddressDetail/hooks/index.js +1 -0
- package/dist/components/AddressDetail/hooks/useAddAddress.d.ts +26 -0
- package/dist/components/AddressDetail/hooks/useAddAddress.js +80 -0
- package/dist/components/AddressDetail/index.d.ts +1 -1
- package/dist/components/AddressDetail/index.js +17 -107
- package/dist/components/AddressList/components/index.d.ts +1 -0
- package/dist/components/AddressList/components/index.js +1 -0
- package/dist/components/AddressList/components/skull.d.ts +2 -0
- package/dist/components/AddressList/components/skull.js +9 -0
- package/dist/components/AddressList/hooks/index.d.ts +1 -0
- package/dist/components/AddressList/hooks/index.js +1 -0
- package/dist/components/AddressList/hooks/useAddressList.d.ts +6 -0
- package/dist/components/AddressList/hooks/useAddressList.js +74 -0
- package/dist/components/AddressList/index.js +8 -6
- package/dist/components/Cart/components/cartItem.d.ts +3 -0
- package/dist/components/Cart/components/cartItem.js +34 -0
- package/dist/components/Cart/hooks/index.d.ts +19 -0
- package/dist/components/Cart/hooks/index.js +90 -0
- package/dist/components/Cart/index.js +14 -18
- package/dist/components/Cart/store/index.d.ts +10 -0
- package/dist/components/Cart/store/index.js +23 -0
- package/dist/components/CouponList/index.js +1 -1
- package/dist/components/Goods/index.js +3 -3
- package/dist/components/GoodsClassify/components/classifySkeleton.d.ts +1 -0
- package/dist/components/GoodsClassify/components/classifySkeleton.js +12 -0
- package/dist/components/GoodsClassify/index.js +4 -4
- package/dist/components/GoodsDetail/components/goodsDetailCollection.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailCollection.js +8 -3
- package/dist/components/GoodsDetail/components/goodsDetailCoupon.js +22 -33
- package/dist/components/GoodsDetail/components/goodsDetailHandleBar.js +23 -3
- package/dist/components/GoodsDetail/components/goodsDetailInfo.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailInfo.js +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailPopup.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailPopup.js +9 -23
- package/dist/components/GoodsDetail/components/goodsDetailPromotion.js +2 -3
- package/dist/components/GoodsDetail/components/goodsDetailSize.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailSize.js +11 -2
- package/dist/components/GoodsDetail/hooks/index.d.ts +2 -0
- package/dist/components/GoodsDetail/hooks/index.js +2 -75
- package/dist/components/GoodsDetail/hooks/useAddShopping.d.ts +10 -0
- package/dist/components/GoodsDetail/hooks/useAddShopping.js +74 -0
- package/dist/components/GoodsDetail/hooks/useGoodsDetailImpl.d.ts +13 -0
- package/dist/components/GoodsDetail/hooks/useGoodsDetailImpl.js +85 -0
- package/dist/components/GoodsDetail/index.d.ts +5 -1
- package/dist/components/GoodsDetail/index.js +15 -8
- package/dist/components/GoodsDetail/store/index.d.ts +10 -0
- package/dist/components/GoodsDetail/store/index.js +34 -0
- package/dist/components/Mine/components/menuList.js +7 -6
- package/dist/components/Mine/components/orderEntry.js +17 -10
- package/dist/components/Mine/index.js +4 -3
- package/dist/components/OrderList/components/OrderListItem.js +2 -3
- package/dist/components/OrderList/components/orderItem.js +1 -2
- package/dist/components/PaymentMode/config.d.ts +6 -0
- package/dist/components/PaymentMode/config.js +14 -0
- package/dist/components/PaymentMode/hooks/useOrderResult.d.ts +11 -0
- package/dist/components/PaymentMode/hooks/useOrderResult.js +100 -0
- package/dist/components/PaymentMode/index.d.ts +4 -0
- package/dist/components/PaymentMode/index.js +17 -0
- package/dist/components/PlaceOrder/components/address.d.ts +12 -0
- package/dist/components/PlaceOrder/components/address.js +33 -0
- package/dist/components/PlaceOrder/components/orderPrice.d.ts +12 -0
- package/dist/components/PlaceOrder/components/orderPrice.js +8 -0
- package/dist/components/PlaceOrder/components/shop.d.ts +4 -0
- package/dist/components/PlaceOrder/components/shop.js +9 -0
- package/dist/components/PlaceOrder/hooks/usePlaceOrder.d.ts +18 -0
- package/dist/components/PlaceOrder/hooks/usePlaceOrder.js +234 -0
- package/dist/components/PlaceOrder/index.d.ts +6 -1
- package/dist/components/PlaceOrder/index.js +8 -3
- package/dist/components/PlaceOrderResult/hooks/useOrderResult.d.ts +3 -0
- package/dist/components/PlaceOrderResult/hooks/useOrderResult.js +93 -0
- package/dist/components/PlaceOrderResult/index.d.ts +3 -1
- package/dist/components/PlaceOrderResult/index.js +5 -3
- package/dist/components/Search/index.js +3 -2
- package/dist/components/SearchPage/index.js +50 -9
- package/dist/components/Service/index.d.ts +11 -1
- package/dist/components/Service/index.js +4 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/options/index.d.ts +0 -2
- package/dist/options/index.js +36 -31
- package/dist/routerMap/index.d.ts +7 -0
- package/dist/routerMap/index.js +8 -1
- package/dist/utils/payment.d.ts +14 -0
- package/dist/utils/payment.js +56 -0
- package/package.json +1 -1
- package/css/font/iconfont.ttf +0 -0
- package/css/font/iconfont.woff +0 -0
- package/css/font/iconfont.woff2 +0 -0
- package/dist/components/AddressDetail/option.d.ts +0 -2
- package/dist/components/AddressDetail/option.js +0 -32
- package/dist/components/Cart/useNumStep.d.ts +0 -1
- package/dist/components/Cart/useNumStep.js +0 -7
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function useEditAddress(addressId: string | undefined, Form: any): {
|
|
3
|
+
skullShow: boolean;
|
|
4
|
+
form: any;
|
|
5
|
+
area: {
|
|
6
|
+
provinceCode: string;
|
|
7
|
+
provinceName: string;
|
|
8
|
+
cityCode: string;
|
|
9
|
+
cityName: string;
|
|
10
|
+
areaCode: string;
|
|
11
|
+
areaName: string;
|
|
12
|
+
};
|
|
13
|
+
setArea: import("react").Dispatch<import("react").SetStateAction<{
|
|
14
|
+
provinceCode: string;
|
|
15
|
+
provinceName: string;
|
|
16
|
+
cityCode: string;
|
|
17
|
+
cityName: string;
|
|
18
|
+
areaCode: string;
|
|
19
|
+
areaName: string;
|
|
20
|
+
}>>;
|
|
21
|
+
userCode: string;
|
|
22
|
+
defaultAddress: string;
|
|
23
|
+
handleArea: (val: any) => void;
|
|
24
|
+
handleDefaultAddress: (result: any) => void;
|
|
25
|
+
handleFinish: (data: any) => void;
|
|
26
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { getAddress, saveAddress } from '@brushes/api';
|
|
3
|
+
const userCode = '00000017';
|
|
4
|
+
export function useEditAddress(addressId, Form) {
|
|
5
|
+
const [form] = Form.useForm();
|
|
6
|
+
const [defaultAddress, setDefaultAddress] = useState('1');
|
|
7
|
+
const [skullShow, setSkullShow] = useState(true);
|
|
8
|
+
const [area, setArea] = useState({
|
|
9
|
+
provinceCode: '',
|
|
10
|
+
provinceName: '',
|
|
11
|
+
cityCode: '',
|
|
12
|
+
cityName: '',
|
|
13
|
+
areaCode: '',
|
|
14
|
+
areaName: ''
|
|
15
|
+
});
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (addressId) {
|
|
18
|
+
initForm();
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
form.setFieldValue('addressDefault', defaultAddress);
|
|
22
|
+
setSkullShow(false);
|
|
23
|
+
}
|
|
24
|
+
}, []);
|
|
25
|
+
const initForm = () => {
|
|
26
|
+
getAddress({ addressId }).then((res) => {
|
|
27
|
+
const resultArea = {
|
|
28
|
+
provinceCode: res.provinceCode,
|
|
29
|
+
cityCode: res.cityCode,
|
|
30
|
+
areaCode: res.areaCode,
|
|
31
|
+
provinceName: res.provinceName,
|
|
32
|
+
cityName: res.cityName,
|
|
33
|
+
areaName: res.areaName
|
|
34
|
+
};
|
|
35
|
+
setArea(resultArea);
|
|
36
|
+
setDefaultAddress(res.addressDefault);
|
|
37
|
+
form.setFieldValue('addressMember', res.addressMember);
|
|
38
|
+
form.setFieldValue('addressPhone', res.addressPhone);
|
|
39
|
+
form.setFieldValue('addressDetail', res.addressDetail);
|
|
40
|
+
form.setFieldValue('area', resultArea);
|
|
41
|
+
form.setFieldValue('addressDefault', res.addressDefault);
|
|
42
|
+
form.validateFields();
|
|
43
|
+
setSkullShow(false);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const handleArea = (val) => {
|
|
47
|
+
const codeArr = val.detail.code;
|
|
48
|
+
const nameArr = val.detail.value;
|
|
49
|
+
const result = {
|
|
50
|
+
provinceCode: codeArr[0],
|
|
51
|
+
cityCode: codeArr[1],
|
|
52
|
+
areaCode: codeArr[2],
|
|
53
|
+
provinceName: nameArr[0],
|
|
54
|
+
cityName: nameArr[1],
|
|
55
|
+
areaName: nameArr[2]
|
|
56
|
+
};
|
|
57
|
+
setArea(result);
|
|
58
|
+
form.setFieldValue('area', result);
|
|
59
|
+
form.validateFields();
|
|
60
|
+
};
|
|
61
|
+
const handleFinish = (data) => {
|
|
62
|
+
const result = Object.assign(data, data.area);
|
|
63
|
+
delete result.area;
|
|
64
|
+
saveAddress(Object.assign(Object.assign({}, result), { userCode }));
|
|
65
|
+
};
|
|
66
|
+
const handleDefaultAddress = (result) => {
|
|
67
|
+
setDefaultAddress(result.detail.value ? '1' : '0');
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
skullShow,
|
|
71
|
+
form,
|
|
72
|
+
area,
|
|
73
|
+
setArea,
|
|
74
|
+
userCode,
|
|
75
|
+
defaultAddress,
|
|
76
|
+
handleArea,
|
|
77
|
+
handleDefaultAddress,
|
|
78
|
+
handleFinish
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const AddressDetail: import("react").MemoExoticComponent<() => JSX.Element>;
|
|
2
|
+
export declare const AddressDetail: import("react").MemoExoticComponent<({ addressId }: any) => JSX.Element>;
|
|
@@ -1,119 +1,29 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { memo
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { getEnv } from '@brushes/api';
|
|
4
|
+
import { config } from './config';
|
|
5
|
+
import { useEditAddress } from './hooks';
|
|
3
6
|
import { useComponent, antdMobile } from '@brushes/qj-simulate-component';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const { Form, Input, Radio, Button, Cascader } = antdMobile;
|
|
8
|
-
const AddressDetailJsx = () => {
|
|
9
|
-
const [form] = Form.useForm();
|
|
7
|
+
import { Skull } from './components/skull';
|
|
8
|
+
const flag = getEnv();
|
|
9
|
+
const AddressDetailJsx = ({ addressId = undefined }) => {
|
|
10
10
|
const { View } = useComponent();
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (!/^1[3456789]\d{9}$/.test(value) && value) {
|
|
16
|
-
reject('请输入正确手机号');
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
resolve('');
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
const config = useRef([
|
|
24
|
-
{
|
|
25
|
-
type: 'input',
|
|
26
|
-
props: {
|
|
27
|
-
onlyShowClearWhenFocus: true,
|
|
28
|
-
placeholder: '请填写收货人姓名'
|
|
29
|
-
},
|
|
30
|
-
label: '收货人',
|
|
31
|
-
name: 'name',
|
|
32
|
-
rules: [{ required: true, message: '收货人姓名不能为空' }]
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
type: 'input',
|
|
36
|
-
props: {
|
|
37
|
-
type: 'number',
|
|
38
|
-
onlyShowClearWhenFocus: true,
|
|
39
|
-
placeholder: '请填写收货人手机号码'
|
|
40
|
-
},
|
|
41
|
-
label: '手机号码',
|
|
42
|
-
name: 'phone',
|
|
43
|
-
rules: [{ required: true, message: '收货人手机号码不能为空' }, { validator: checkMobile }]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
type: 'cascader',
|
|
47
|
-
props: {
|
|
48
|
-
options
|
|
49
|
-
},
|
|
50
|
-
label: '所在地区',
|
|
51
|
-
name: 'area'
|
|
52
|
-
// rules: [{required: true, message: '收货人所在地区不能为空'}]
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
type: 'input',
|
|
56
|
-
props: {
|
|
57
|
-
onlyShowClearWhenFocus: true,
|
|
58
|
-
placeholder: '街道/楼牌号等'
|
|
59
|
-
},
|
|
60
|
-
label: '详细地址',
|
|
61
|
-
name: 'address',
|
|
62
|
-
rules: [{ required: true, message: '收货人详细地址不能为空' }]
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
type: 'input',
|
|
66
|
-
props: {
|
|
67
|
-
type: 'number',
|
|
68
|
-
onlyShowClearWhenFocus: true,
|
|
69
|
-
placeholder: '请填写邮政编码'
|
|
70
|
-
},
|
|
71
|
-
label: '邮政编码',
|
|
72
|
-
name: 'zipCode'
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
type: 'radio',
|
|
76
|
-
props: {
|
|
77
|
-
value: 1
|
|
78
|
-
},
|
|
79
|
-
label: '设置默认地址',
|
|
80
|
-
name: 'default'
|
|
81
|
-
}
|
|
82
|
-
]);
|
|
83
|
-
const handle = (a) => {
|
|
84
|
-
console.log(88, a);
|
|
85
|
-
};
|
|
86
|
-
const onValuesChange = (a) => {
|
|
87
|
-
console.log(91, a);
|
|
88
|
-
};
|
|
89
|
-
return (_jsx(View, Object.assign({ className: 'addressDetail' }, { children: _jsx(Form, Object.assign({ form: form, layout: "horizontal", mode: "card", onValuesChange: onValuesChange, onFinish: handle, footer: _jsx(Button, Object.assign({ block: true, type: "submit", color: "primary", size: "large" }, { children: "\u63D0\u4EA4" })) }, { children: config.current.map((item, index) => {
|
|
90
|
-
return (_jsx(Form.Item, Object.assign({ label: item.label, name: item.name, rules: item.rules, trigger: item.type === 'cascader' ? 'onConfirm' : 'onChange', onClick: (a, b) => {
|
|
91
|
-
if (item.type === 'cascader') {
|
|
92
|
-
setVisible(true);
|
|
93
|
-
}
|
|
94
|
-
} }, { children: (() => {
|
|
11
|
+
const { Form, Button, Input } = antdMobile;
|
|
12
|
+
const { skullShow, form, area, defaultAddress, handleArea, handleDefaultAddress, handleFinish } = useEditAddress(addressId, Form);
|
|
13
|
+
return (_jsx(View, Object.assign({ className: 'addressDetail', style: { height: flag ? '100%' : '667px' } }, { children: skullShow ? (_jsx(Skull, {})) : (_jsx(Form, Object.assign({ form: form, layout: "horizontal", mode: "card", onFinish: handleFinish, footer: _jsx(Button, Object.assign({ block: true, type: "submit", color: "primary", size: "large" }, { children: "\u63D0\u4EA4" })) }, { children: config.map((item, index) => {
|
|
14
|
+
return (_jsx(Form.Item, Object.assign({ label: item.label, name: item.name, rules: item.rules, trigger: item.type === 'cascader' ? 'onConfirm' : 'onChange', arrow: false }, { children: (() => {
|
|
95
15
|
if (item.type === 'input') {
|
|
96
16
|
return _jsx(Input, Object.assign({}, item.props));
|
|
97
17
|
}
|
|
98
|
-
else if (item.type === '
|
|
99
|
-
return _jsx(
|
|
18
|
+
else if (item.type === 'switch') {
|
|
19
|
+
return (_jsx("switch", Object.assign({}, item.props, { color: '#000', onChange: handleDefaultAddress, checked: defaultAddress === '1' })));
|
|
100
20
|
}
|
|
101
21
|
else if (item.type === 'cascader') {
|
|
102
|
-
return (_jsx(_Fragment, { children: _jsx(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}, onClose: () => {
|
|
106
|
-
setVisible(false);
|
|
107
|
-
} }, { children: (items) => {
|
|
108
|
-
if (items.every((item) => item === null)) {
|
|
109
|
-
return '';
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
return items.map((item) => { var _a; return (_a = item === null || item === void 0 ? void 0 : item.label) !== null && _a !== void 0 ? _a : ''; }).join('-');
|
|
113
|
-
}
|
|
114
|
-
} })) }));
|
|
22
|
+
return (_jsx(_Fragment, { children: flag ? (_jsx("picker", Object.assign({ mode: 'region', onChange: handleArea, value: '123' }, { children: _jsx(View, Object.assign({ className: 'areaWrap' }, { children: !area.provinceName
|
|
23
|
+
? '请选择所在地区'
|
|
24
|
+
: `${area.provinceName}—${area.cityName}-${area.areaName}` })) }))) : ('请选择所在地区') }));
|
|
115
25
|
}
|
|
116
26
|
})() }), index));
|
|
117
|
-
}) })) })));
|
|
27
|
+
}) }))) })));
|
|
118
28
|
};
|
|
119
29
|
export const AddressDetail = memo(AddressDetailJsx);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './skull';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './skull';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useRef } from 'react';
|
|
3
|
+
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
+
const SkullJsx = () => {
|
|
5
|
+
const { View, Skeleton } = useComponent();
|
|
6
|
+
const coe = useRef(new Array(3).fill(0));
|
|
7
|
+
return (_jsx(_Fragment, { children: _jsx(View, Object.assign({ className: 'skullWrap' }, { children: _jsx(View, Object.assign({ className: 'skull' }, { children: coe.current.map((item, index) => (_jsx(Skeleton, { className: 'skullItem', animated: true }, index))) })) })) }));
|
|
8
|
+
};
|
|
9
|
+
export const Skull = memo(SkullJsx);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useAddressList';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useAddressList';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { useEffect, useState } from 'react';
|
|
11
|
+
import { deleteAddress, queryAddressBymerberCode, updateAddress } from '@brushes/api';
|
|
12
|
+
export function useAddressList() {
|
|
13
|
+
const [list, setList] = useState([]);
|
|
14
|
+
const [skullShow, setSkullShow] = useState(true);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
getAddressList();
|
|
17
|
+
}, []);
|
|
18
|
+
const getAddressList = () => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const resList = yield queryAddressBymerberCode();
|
|
20
|
+
setList(resList);
|
|
21
|
+
setSkullShow(false);
|
|
22
|
+
});
|
|
23
|
+
const delAddress = (addressInfo) => {
|
|
24
|
+
wx === null || wx === void 0 ? void 0 : wx.showModal({
|
|
25
|
+
title: '提示',
|
|
26
|
+
content: '确认删除该地址吗?',
|
|
27
|
+
success: (res) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
if (res === null || res === void 0 ? void 0 : res.confirm) {
|
|
29
|
+
yield deleteAddress({ addressId: addressInfo.addressId });
|
|
30
|
+
yield getAddressList();
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
const setDefault = (addressInfo, index) => __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (addressInfo.addressDefault !== '1') {
|
|
37
|
+
const { addressMember, addressPhone, provinceCode, provinceName, cityCode, cityName, areaCode, areaName, addressDetail, addressId, addressCode, dataState } = addressInfo;
|
|
38
|
+
const params = {
|
|
39
|
+
addressMember,
|
|
40
|
+
addressPhone,
|
|
41
|
+
provinceCode,
|
|
42
|
+
provinceName,
|
|
43
|
+
cityCode,
|
|
44
|
+
cityName,
|
|
45
|
+
areaCode,
|
|
46
|
+
areaName,
|
|
47
|
+
addressDetail,
|
|
48
|
+
addressId,
|
|
49
|
+
addressCode,
|
|
50
|
+
dataState,
|
|
51
|
+
addressDefault: '1'
|
|
52
|
+
};
|
|
53
|
+
setList(replaceArr(index, list));
|
|
54
|
+
yield updateAddress(params);
|
|
55
|
+
yield getAddressList();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const replaceArr = (coe, arr) => {
|
|
59
|
+
const chooseItem = arr[coe];
|
|
60
|
+
console.log(chooseItem);
|
|
61
|
+
arr[coe] = arr[0];
|
|
62
|
+
arr[coe].addressDefault = '0';
|
|
63
|
+
arr[0] = chooseItem;
|
|
64
|
+
arr[0].addressDefault = '1';
|
|
65
|
+
console.log(111111, arr);
|
|
66
|
+
return [...arr];
|
|
67
|
+
};
|
|
68
|
+
return {
|
|
69
|
+
list,
|
|
70
|
+
skullShow,
|
|
71
|
+
delAddress,
|
|
72
|
+
setDefault
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { memo } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { navigatorImpl, useComponent } from '@brushes/qj-simulate-component';
|
|
4
4
|
import { getEnv } from '@brushes/api';
|
|
5
|
-
import { addressListFake } from '../../common/mock';
|
|
6
5
|
import { AddressItem } from '../../common/addressItem';
|
|
7
|
-
|
|
6
|
+
import { useAddressList } from './hooks';
|
|
7
|
+
import { routerMap } from '../../routerMap';
|
|
8
|
+
import { Skull } from './components';
|
|
8
9
|
const AddressListJsx = () => {
|
|
9
10
|
const { View } = useComponent();
|
|
10
11
|
const flag = getEnv();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const { list, delAddress, setDefault, skullShow } = useAddressList();
|
|
13
|
+
return (_jsxs(View, Object.assign({ className: 'addressListWrap', style: {
|
|
14
|
+
height: flag ? 'inherit' : '667px'
|
|
15
|
+
} }, { children: [skullShow ? (_jsx(Skull, {})) : (_jsx(View, Object.assign({ className: 'addressList' }, { children: list.map((item, index) => (_jsx(AddressItem, { itemData: item, setDefault: setDefault.bind(null, item, index), delAddress: delAddress.bind(null, item) }, item === null || item === void 0 ? void 0 : item.addressId))) }))), _jsx(View, Object.assign({ className: 'addBtnWrap' }, { children: _jsx(View, Object.assign({ className: 'addBtn', onClick: () => navigatorImpl(`${routerMap.addressEditor}`) }, { children: "+ \u65B0\u589E\u5730\u5740" })) }))] })));
|
|
14
16
|
};
|
|
15
17
|
export const AddressList = memo(AddressListJsx);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { useComponent, NumStep, SmoothCheckbox } from '@brushes/qj-simulate-component';
|
|
12
|
+
import { useDispatchImpl, useStore } from '../store';
|
|
13
|
+
import { useCartList } from '../hooks';
|
|
14
|
+
export function CartItem({ list }) {
|
|
15
|
+
const { View, Text, Image, Checkbox } = useComponent();
|
|
16
|
+
const { updateImpl } = useCartList();
|
|
17
|
+
const dispatch = useDispatchImpl();
|
|
18
|
+
const { select } = useStore();
|
|
19
|
+
const handleStep = (id, amount, type) => __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const count = type === 'plus' ? ++amount : --amount;
|
|
21
|
+
updateImpl(id, count);
|
|
22
|
+
});
|
|
23
|
+
const onChange = (e) => {
|
|
24
|
+
dispatch({
|
|
25
|
+
type: 'select',
|
|
26
|
+
payload: e.detail.value
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
return (_jsx(SmoothCheckbox, Object.assign({ onChange: onChange }, { children: list.map((item, index) => (_jsxs(View, Object.assign({ className: 'cartItem' }, { children: [_jsx(View, Object.assign({ className: 'checkBoxWrap' }, { children: _jsx(Checkbox, { checked: select.includes(item.shoppingGoodsId + ''), value: item.shoppingGoodsId, style: {
|
|
30
|
+
'--icon-size': '16px',
|
|
31
|
+
'--font-size': '14px',
|
|
32
|
+
'--gap': '6px'
|
|
33
|
+
} }) })), _jsx(Image, { className: 'img', src: item.dataPic }), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'goodsName' }, { children: item.goodsName })), _jsxs(View, Object.assign({ className: 'size' }, { children: ["\u89C4\u683C\uFF1A", item.skuName, " X ", item.goodsCamount] })), _jsxs(View, Object.assign({ className: 'handleWrap' }, { children: [_jsxs(Text, Object.assign({ className: 'price' }, { children: ["\uFFE5", item.pricesetNprice] })), _jsx(NumStep, { count: item.goodsCamount, handleStep: handleStep.bind(null, item.shoppingGoodsId, item.goodsCamount) })] }))] }))] }), index))) })));
|
|
34
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function useCartList(): {
|
|
3
|
+
cartList: {
|
|
4
|
+
shoppingGoodsList: never[];
|
|
5
|
+
disMoney: number;
|
|
6
|
+
};
|
|
7
|
+
amount: {
|
|
8
|
+
num: number;
|
|
9
|
+
amount: number;
|
|
10
|
+
};
|
|
11
|
+
selectAll: (e: {
|
|
12
|
+
detail: {
|
|
13
|
+
value: string[];
|
|
14
|
+
};
|
|
15
|
+
}) => void;
|
|
16
|
+
allCart: import("react").MutableRefObject<never[]>;
|
|
17
|
+
updateImpl: (id: number, count: number) => Promise<void>;
|
|
18
|
+
toOrderImpl: () => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { useEffect, useMemo, useState, useRef } from 'react';
|
|
11
|
+
import { queryShoppingPage } from '@brushes/api';
|
|
12
|
+
import { _ } from '@brushes/tools';
|
|
13
|
+
import { useDispatchImpl, useStore } from '../store';
|
|
14
|
+
import { updateShoppingGoodsNum } from '../../../utils/payment';
|
|
15
|
+
import { navigatorImpl } from '../../../../../../../qj-mobile-core/packages/qj-simulate-component';
|
|
16
|
+
import { routerMap } from '../../../routerMap';
|
|
17
|
+
const { get } = _;
|
|
18
|
+
export function useCartList() {
|
|
19
|
+
const dispatch = useDispatchImpl();
|
|
20
|
+
const { select } = useStore();
|
|
21
|
+
const allCart = useRef([]);
|
|
22
|
+
const [cartList, setCartList] = useState({
|
|
23
|
+
shoppingGoodsList: [],
|
|
24
|
+
disMoney: 0
|
|
25
|
+
});
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
(() => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
yield initImpl('isFirst');
|
|
29
|
+
}))();
|
|
30
|
+
}, []);
|
|
31
|
+
const updateImpl = (id, count) => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
try {
|
|
33
|
+
yield updateShoppingGoodsNum({
|
|
34
|
+
shoppingGoodsId: id,
|
|
35
|
+
amount: count,
|
|
36
|
+
goodWeight: 0
|
|
37
|
+
});
|
|
38
|
+
yield initImpl();
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
console.log(err);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const initImpl = (isFirst = '') => __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const data = yield queryShoppingPage();
|
|
46
|
+
const cart = get(data, 'rows[0].shoppingpackageList[0]', {
|
|
47
|
+
shoppingGoodsList: [],
|
|
48
|
+
// sumMoney: 0,
|
|
49
|
+
disMoney: 0
|
|
50
|
+
});
|
|
51
|
+
allCart.current = cart.shoppingGoodsList.map((item) => item.shoppingGoodsId + '');
|
|
52
|
+
if (isFirst) {
|
|
53
|
+
dispatch({
|
|
54
|
+
type: 'select',
|
|
55
|
+
payload: allCart.current
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
setCartList(cart);
|
|
59
|
+
});
|
|
60
|
+
const amount = useMemo(() => {
|
|
61
|
+
let num = 0, amount = 0;
|
|
62
|
+
cartList.shoppingGoodsList.forEach((item) => {
|
|
63
|
+
if (select.includes(item.shoppingGoodsId + '')) {
|
|
64
|
+
num += item.goodsCamount;
|
|
65
|
+
amount += item.goodsCamount * item.pricesetNprice;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
return {
|
|
69
|
+
num,
|
|
70
|
+
amount
|
|
71
|
+
};
|
|
72
|
+
}, [select, cartList]);
|
|
73
|
+
const selectAll = (e) => {
|
|
74
|
+
dispatch({
|
|
75
|
+
type: 'select',
|
|
76
|
+
payload: e.detail.value.includes('true') ? allCart.current : []
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const toOrderImpl = () => {
|
|
80
|
+
navigatorImpl(`${routerMap.confirm}?shoppingGoodsId=${select.join(',')}`);
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
cartList,
|
|
84
|
+
amount,
|
|
85
|
+
selectAll,
|
|
86
|
+
allCart,
|
|
87
|
+
updateImpl,
|
|
88
|
+
toOrderImpl
|
|
89
|
+
};
|
|
90
|
+
}
|
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useState } from 'react';
|
|
3
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
-
import { Button, Checkbox, Radio } from 'antd-mobile';
|
|
5
|
-
import { StepNum } from '../../common/stepNum';
|
|
3
|
+
import { useComponent, SmoothCheckbox } from '@brushes/qj-simulate-component';
|
|
6
4
|
import { getEnv } from '@brushes/api';
|
|
7
|
-
|
|
5
|
+
import { useCartList } from './hooks';
|
|
6
|
+
import { CartItem } from './components/cartItem';
|
|
7
|
+
import { StoreProvider, useStore } from './store';
|
|
8
8
|
const flag = getEnv();
|
|
9
9
|
const CartJsx = () => {
|
|
10
10
|
const [editState, setEditState] = useState(true);
|
|
11
|
-
const { View, Text } = useComponent();
|
|
12
|
-
const
|
|
11
|
+
const { View, Text, Checkbox } = useComponent();
|
|
12
|
+
const { select } = useStore();
|
|
13
|
+
const { cartList, amount, selectAll, allCart, toOrderImpl } = useCartList();
|
|
13
14
|
return (_jsxs(View, Object.assign({ className: 'cart', style: {
|
|
14
|
-
height: flag ? '
|
|
15
|
-
} }, { children: [_jsx(View, Object.assign({ className: 'edit' }, { children: _jsx(
|
|
16
|
-
'--text-color': '#333333'
|
|
17
|
-
}, onClick: () => setEditState(!editState) }, { children: editState ? '编辑' : '完成' })) })), _jsx(View, Object.assign({ className: 'itemGroup' }, { children: _jsx(Checkbox.Group, { children: _jsxs(View, Object.assign({ className: 'cartItem' }, { children: [_jsx(Checkbox, { style: {
|
|
15
|
+
height: flag ? '100%' : '667px'
|
|
16
|
+
} }, { children: [_jsx(View, Object.assign({ className: 'edit' }, { children: _jsx(View, Object.assign({ className: 'btn', onClick: () => setEditState(!editState) }, { children: editState ? '编辑' : '完成' })) })), _jsx(View, Object.assign({ className: 'itemGroup' }, { children: _jsx(CartItem, { list: cartList.shoppingGoodsList }) })), _jsxs(View, Object.assign({ className: 'dashboard' }, { children: [_jsx(View, Object.assign({ className: 'choose' }, { children: _jsx(SmoothCheckbox, Object.assign({ onChange: selectAll }, { children: _jsx(Checkbox, Object.assign({ checked: allCart.current.length === select.length, value: 'true', style: {
|
|
18
17
|
'--icon-size': '16px',
|
|
19
18
|
'--font-size': '14px',
|
|
20
19
|
'--gap': '6px'
|
|
21
|
-
} }
|
|
22
|
-
setNum(val);
|
|
23
|
-
} })] }))] }))] })) }) })), _jsxs(View, Object.assign({ className: 'dashboard' }, { children: [_jsx(View, Object.assign({ className: 'choose' }, { children: _jsx(Radio, Object.assign({ style: {
|
|
24
|
-
'--icon-size': '18px',
|
|
25
|
-
'--font-size': '14px',
|
|
26
|
-
'--gap': '6px'
|
|
27
|
-
} }, { children: "\u5168\u9009" })) })), editState ? (_jsxs(View, Object.assign({ className: 'check' }, { children: [_jsxs(View, Object.assign({ className: 'priceGroup' }, { children: [_jsxs(View, Object.assign({ className: 'discount' }, { children: ["\u4F18\u60E0: ", _jsx(Text, Object.assign({ className: 'data' }, { children: "\uFFE5 0.00" }))] })), _jsxs(View, Object.assign({ className: 'all' }, { children: ["\u5408\u8BA1: ", _jsx(Text, Object.assign({ className: 'data' }, { children: "\uFFE5 9999.99" }))] }))] })), _jsx(View, Object.assign({ className: 'btn' }, { children: "\u7ED3\u7B97(10)" }))] }))) : (_jsx(View, Object.assign({ className: 'del' }, { children: _jsx(View, Object.assign({ className: 'btn' }, { children: "\u5220\u9664" })) })))] }))] })));
|
|
20
|
+
} }, { children: "\u5168\u9009" })) })) })), editState ? (_jsxs(View, Object.assign({ className: 'check' }, { children: [_jsxs(View, Object.assign({ className: 'priceGroup' }, { children: [_jsxs(View, Object.assign({ className: 'discount' }, { children: ["\u4F18\u60E0: ", _jsxs(Text, Object.assign({ className: 'data' }, { children: ["\uFFE5 ", cartList.disMoney || 0] }))] })), _jsxs(View, Object.assign({ className: 'all' }, { children: ["\u5408\u8BA1: ", _jsxs(Text, Object.assign({ className: 'data' }, { children: ["\uFFE5 ", amount.amount] }))] }))] })), _jsxs(View, Object.assign({ onClick: toOrderImpl, className: 'btn' }, { children: ["\u7ED3\u7B97(", amount.num, ")"] }))] }))) : (_jsx(View, Object.assign({ className: 'del' }, { children: _jsx(View, Object.assign({ className: 'btn' }, { children: "\u5220\u9664" })) })))] }))] })));
|
|
28
21
|
};
|
|
29
|
-
|
|
22
|
+
const WrapCartJsx = () => {
|
|
23
|
+
return (_jsx(StoreProvider, { children: _jsx(CartJsx, {}) }));
|
|
24
|
+
};
|
|
25
|
+
export const Cart = memo(WrapCartJsx);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* =========== StoreProvider, useStore, useDispatchImpl ============
|
|
3
|
+
* 导出三个参数
|
|
4
|
+
* 第一个是Provider
|
|
5
|
+
* 第二个是Store
|
|
6
|
+
* 第三个是Dispath
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
declare const StoreProvider: any, useStore: any, useDispatchImpl: any;
|
|
10
|
+
export { StoreProvider, useStore, useDispatchImpl };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { makeStore } from 'qj-mobile-store';
|
|
2
|
+
const defaultValues = {
|
|
3
|
+
count: 1,
|
|
4
|
+
select: []
|
|
5
|
+
};
|
|
6
|
+
function reduceImpl(state, action) {
|
|
7
|
+
switch (action.type) {
|
|
8
|
+
case 'select':
|
|
9
|
+
return Object.assign(Object.assign({}, state), { select: action.payload });
|
|
10
|
+
default:
|
|
11
|
+
return state;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* =========== StoreProvider, useStore, useDispatchImpl ============
|
|
16
|
+
* 导出三个参数
|
|
17
|
+
* 第一个是Provider
|
|
18
|
+
* 第二个是Store
|
|
19
|
+
* 第三个是Dispath
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
const [StoreProvider, useStore, useDispatchImpl] = makeStore(reduceImpl, defaultValues);
|
|
23
|
+
export { StoreProvider, useStore, useDispatchImpl };
|
|
@@ -21,7 +21,7 @@ const CouponListJsx = () => {
|
|
|
21
21
|
}
|
|
22
22
|
]);
|
|
23
23
|
return (_jsxs(View, Object.assign({ className: 'couponList', style: {
|
|
24
|
-
height: flag ? '100vh' : '
|
|
24
|
+
height: flag ? '100vh' : '667px'
|
|
25
25
|
} }, { children: [_jsx(View, Object.assign({ className: 'couponTab' }, { children: config.current.map((item) => {
|
|
26
26
|
return (_jsxs(View, Object.assign({ className: `couponTabItem ${coe === item.id ? 'active' : ''}`, onClick: () => setCoe(item.id) }, { children: [item.label, _jsx(Text, { className: 'icon' })] }), item.id));
|
|
27
27
|
}) })), _jsxs(View, Object.assign({ className: 'couponListContent' }, { children: [_jsx(View, Object.assign({ className: 'couponListItem unused' }, { children: _jsxs(View, Object.assign({ className: 'coupon-content' }, { children: [_jsxs(View, Object.assign({ className: 'price' }, { children: [_jsx(Text, Object.assign({ className: 'symbol' }, { children: "\uFFE5" })), _jsx(Text, Object.assign({ className: 'num' }, { children: "123" }))] })), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u6574\u5355\u7ACB\u51CF10\u5143 \u6EE1199\u53EF\u7528" })), _jsx(Text, Object.assign({ className: 'date' }, { children: "\u6709\u6548\u671F\u81F3\uFF1A2022-10-01" })), _jsx(View, Object.assign({ className: 'btn' }, { children: "\u5DF2\u4F7F\u7528" }))] }))] })) })), _jsx(View, Object.assign({ className: 'couponListItem used' }, { children: _jsxs(View, Object.assign({ className: 'coupon-content' }, { children: [_jsxs(View, Object.assign({ className: 'price' }, { children: [_jsx(Text, Object.assign({ className: 'symbol' }, { children: "\uFFE5" })), _jsx(Text, Object.assign({ className: 'num' }, { children: "123" }))] })), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u6574\u5355\u7ACB\u51CF10\u5143 \u6EE1199\u53EF\u7528" })), _jsx(Text, Object.assign({ className: 'date' }, { children: "\u6709\u6548\u671F\u81F3\uFF1A2022-10-01" })), _jsx(View, Object.assign({ className: 'btn' }, { children: "\u5DF2\u4F7F\u7528" }))] }))] })) })), _jsx(View, Object.assign({ className: 'couponListItem overdue' }, { children: _jsxs(View, Object.assign({ className: 'coupon-content' }, { children: [_jsxs(View, Object.assign({ className: 'price' }, { children: [_jsx(Text, Object.assign({ className: 'symbol' }, { children: "\uFFE5" })), _jsx(Text, Object.assign({ className: 'num' }, { children: "123" }))] })), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u6574\u5355\u7ACB\u51CF10\u5143 \u6EE1199\u53EF\u7528" })), _jsx(Text, Object.assign({ className: 'date' }, { children: "\u6709\u6548\u671F\u81F3\uFF1A2022-10-01" })), _jsx(View, Object.assign({ className: 'btn' }, { children: "\u5DF2\u4F7F\u7528" })), _jsx(View, Object.assign({ className: 'round' }, { children: "\u5DF2\u5931\u6548" }))] }))] })) }))] }))] })));
|