s-material-react 0.1.0 → 0.1.1
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 +47 -0
- package/css/common/evaluateItem.scss +58 -0
- package/css/common/index.scss +2 -0
- package/css/pages/addressList.scss +29 -0
- package/css/pages/evaluateEntry.scss +57 -0
- package/css/pages/evaluateList.scss +82 -51
- package/css/pages/index.scss +5 -3
- package/css/pages.zip +0 -0
- package/dist/common/addressItem/index.d.ts +1 -0
- package/dist/common/addressItem/index.js +10 -0
- package/dist/common/evaluateItem/index.d.ts +2 -0
- package/dist/common/evaluateItem/index.js +13 -0
- package/dist/common/mock/index.d.ts +17 -0
- package/dist/common/mock/index.js +53 -0
- package/dist/components/AddressDetail/a.d.ts +2 -0
- package/dist/components/AddressDetail/a.js +40 -0
- package/dist/components/AddressDetail/index.d.ts +2 -0
- package/dist/components/AddressDetail/index.js +104 -0
- package/dist/components/AddressDetail/option.d.ts +17 -0
- package/dist/components/AddressDetail/option.js +148 -0
- package/dist/components/AddressList/index.d.ts +2 -0
- package/dist/components/AddressList/index.js +15 -0
- package/dist/components/EvaluateList/index.d.ts +2 -0
- package/dist/components/EvaluateList/index.js +40 -0
- package/dist/components/GoodsClassify/components/classifyFloor.js +2 -22
- package/dist/components/GoodsDetail/components/evaluateEntry.d.ts +2 -0
- package/dist/components/GoodsDetail/components/evaluateEntry.js +43 -0
- package/dist/components/GoodsDetail/index.js +3 -5
- package/dist/components/OrderList/components/OrderListItem.js +9 -4
- package/dist/components/Slider/index.d.ts +2 -2
- package/dist/components/Slider/item.d.ts +2 -2
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/options/index.d.ts +2 -0
- package/dist/options/index.js +30 -0
- package/package.json +2 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.addressItem {
|
|
2
|
+
width: 100%;
|
|
3
|
+
background-color: #fff;
|
|
4
|
+
margin-bottom: 10px;
|
|
5
|
+
border-radius: 5px;
|
|
6
|
+
|
|
7
|
+
.upInfo {
|
|
8
|
+
padding: 15px;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
border-bottom: 1px solid #e2e2e2;
|
|
11
|
+
|
|
12
|
+
.userInfo {
|
|
13
|
+
color: #000;
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
margin-bottom: 8px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.addressInfo {
|
|
19
|
+
display: grid;
|
|
20
|
+
grid-template-columns: 1fr 14px;
|
|
21
|
+
gap: 10px;
|
|
22
|
+
|
|
23
|
+
.address {
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
color: #a7a7a7;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.icon {
|
|
29
|
+
width: 14px;
|
|
30
|
+
height: 14px;
|
|
31
|
+
background-color: yellowgreen;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.downInfo {
|
|
37
|
+
display: flex;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
padding: 12px 14px;
|
|
41
|
+
|
|
42
|
+
.del {
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
color: #a7a7a7;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.evaluateItem {
|
|
2
|
+
color: #333333;
|
|
3
|
+
background-color: #ffffff;
|
|
4
|
+
padding: 15px 13px 20px;
|
|
5
|
+
border-bottom: 1px solid #e2e2e2;
|
|
6
|
+
|
|
7
|
+
&:last-child {
|
|
8
|
+
border-bottom: 0 none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.userInfo {
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: 48px auto;
|
|
14
|
+
margin-bottom: 12px;
|
|
15
|
+
|
|
16
|
+
.avatar {
|
|
17
|
+
width: 38px;
|
|
18
|
+
height: 38px;
|
|
19
|
+
display: inline-block;
|
|
20
|
+
margin-right: 10px;
|
|
21
|
+
border-radius: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.userNameWrap {
|
|
25
|
+
text-align: left;
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
//align-items: center;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
|
|
31
|
+
.userName {
|
|
32
|
+
//line-height: 38px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.size {
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
margin-bottom: 4px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.content {
|
|
43
|
+
font-size: 14px;
|
|
44
|
+
margin-bottom: 12px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.img-group {
|
|
48
|
+
display: grid;
|
|
49
|
+
grid-template-columns: repeat(4, 1fr);
|
|
50
|
+
gap: 7px;
|
|
51
|
+
|
|
52
|
+
.img {
|
|
53
|
+
display: block;
|
|
54
|
+
border-radius: 4px;
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
package/css/common/index.scss
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.addressList {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: scroll;
|
|
4
|
+
padding: 15px 12px 20px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
background-color: #f6f6f6;
|
|
7
|
+
|
|
8
|
+
.addBtnWrap {
|
|
9
|
+
width: 100%;
|
|
10
|
+
padding: 10px;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
position: absolute;
|
|
13
|
+
bottom: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
|
|
17
|
+
.addBtn {
|
|
18
|
+
width: 100%;
|
|
19
|
+
background-color: #000;
|
|
20
|
+
height: 34px;
|
|
21
|
+
line-height: 34px;
|
|
22
|
+
color: #fff;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
border-radius: 20px;
|
|
25
|
+
text-align: center;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.evaluateEntry {
|
|
2
|
+
.topInfo {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
margin-bottom: 20px;
|
|
6
|
+
|
|
7
|
+
.title {
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.txt {
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
color: #999;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.evaluateList-item {
|
|
18
|
+
color: #333333;
|
|
19
|
+
padding-bottom: 20px;
|
|
20
|
+
|
|
21
|
+
.userInfo {
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-template-columns: 48px auto;
|
|
24
|
+
margin-bottom: 12px;
|
|
25
|
+
|
|
26
|
+
.avatar {
|
|
27
|
+
width: 38px;
|
|
28
|
+
height: 38px;
|
|
29
|
+
display: inline-block;
|
|
30
|
+
margin-right: 10px;
|
|
31
|
+
border-radius: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.userName {
|
|
35
|
+
line-height: 38px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.size {
|
|
40
|
+
font-size: 12px;
|
|
41
|
+
margin-bottom: 4px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.content {
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.img-group {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-template-columns: repeat(4, auto);
|
|
51
|
+
.img {
|
|
52
|
+
display: block;
|
|
53
|
+
border-radius: 4px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,57 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
.topInfo {
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
margin-bottom: 20px;
|
|
1
|
+
//.evaluateList {
|
|
2
|
+
// .topInfo {
|
|
3
|
+
// display: flex;
|
|
4
|
+
// justify-content: space-between;
|
|
5
|
+
// margin-bottom: 20px;
|
|
6
|
+
//
|
|
7
|
+
// .title {
|
|
8
|
+
// font-size: 14px;
|
|
9
|
+
// }
|
|
10
|
+
//
|
|
11
|
+
// .txt {
|
|
12
|
+
// font-size: 12px;
|
|
13
|
+
// color: #999;
|
|
14
|
+
// }
|
|
15
|
+
// }
|
|
16
|
+
//
|
|
17
|
+
// .evaluateList-item {
|
|
18
|
+
// color: #333333;
|
|
19
|
+
// padding-bottom: 20px;
|
|
20
|
+
//
|
|
21
|
+
// .userInfo {
|
|
22
|
+
// display: grid;
|
|
23
|
+
// grid-template-columns: 48px auto;
|
|
24
|
+
// margin-bottom: 12px;
|
|
25
|
+
//
|
|
26
|
+
// .avatar {
|
|
27
|
+
// width: 38px;
|
|
28
|
+
// height: 38px;
|
|
29
|
+
// display: inline-block;
|
|
30
|
+
// margin-right: 10px;
|
|
31
|
+
// border-radius: 100%;
|
|
32
|
+
// }
|
|
33
|
+
//
|
|
34
|
+
// .userName {
|
|
35
|
+
// line-height: 38px;
|
|
36
|
+
// }
|
|
37
|
+
// }
|
|
38
|
+
//
|
|
39
|
+
// .size {
|
|
40
|
+
// font-size: 12px;
|
|
41
|
+
// margin-bottom: 4px;
|
|
42
|
+
// }
|
|
43
|
+
//
|
|
44
|
+
// .content {
|
|
45
|
+
// font-size: 14px;
|
|
46
|
+
// }
|
|
47
|
+
//
|
|
48
|
+
// .img-group {
|
|
49
|
+
// display: grid;
|
|
50
|
+
// grid-template-columns: repeat(4, auto);
|
|
51
|
+
// .img {
|
|
52
|
+
// display: block;
|
|
53
|
+
// border-radius: 4px;
|
|
54
|
+
// }
|
|
55
|
+
// }
|
|
56
|
+
// }
|
|
57
|
+
//}
|
|
6
58
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
color: #999;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.evaluateList-item {
|
|
18
|
-
color: #333333;
|
|
19
|
-
padding-bottom: 20px;
|
|
20
|
-
|
|
21
|
-
.userInfo {
|
|
22
|
-
display: grid;
|
|
23
|
-
grid-template-columns: 48px auto;
|
|
24
|
-
margin-bottom: 12px;
|
|
25
|
-
|
|
26
|
-
.avatar {
|
|
27
|
-
width: 38px;
|
|
28
|
-
height: 38px;
|
|
29
|
-
display: inline-block;
|
|
30
|
-
margin-right: 10px;
|
|
31
|
-
border-radius: 100%;
|
|
32
|
-
}
|
|
59
|
+
.evaluateListTab {
|
|
60
|
+
background-color: #fff;
|
|
61
|
+
padding: 20px 10px;
|
|
62
|
+
display: grid;
|
|
63
|
+
grid-template-columns: repeat(4, 1fr);
|
|
64
|
+
gap: 9px;
|
|
33
65
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
66
|
+
.evaluateListTabItem {
|
|
67
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
68
|
+
border-radius: 15px;
|
|
69
|
+
color: #0b0b0b;
|
|
70
|
+
height: 24px;
|
|
71
|
+
line-height: 24px;
|
|
72
|
+
text-align: center;
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
border: 1px solid #fff;
|
|
43
75
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.img-group {
|
|
49
|
-
display: grid;
|
|
50
|
-
grid-template-columns: repeat(4, auto);
|
|
51
|
-
.img {
|
|
52
|
-
display: block;
|
|
53
|
-
border-radius: 4px;
|
|
54
|
-
}
|
|
76
|
+
&.active {
|
|
77
|
+
border: 1px solid #000;
|
|
55
78
|
}
|
|
56
79
|
}
|
|
57
80
|
}
|
|
81
|
+
|
|
82
|
+
.evaluateListContent {
|
|
83
|
+
border-top: 10px solid #f6f6f6;
|
|
84
|
+
border-left: 10px solid #f6f6f6;
|
|
85
|
+
border-right: 10px solid #f6f6f6;
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
background-color: #f6f6f6;
|
|
88
|
+
}
|
package/css/pages/index.scss
CHANGED
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
@import './searchPage';
|
|
15
15
|
@import './goodsDetailTopInfo';
|
|
16
16
|
@import './goodsDetail';
|
|
17
|
+
@import './evaluateEntry';
|
|
17
18
|
@import './evaluateList';
|
|
19
|
+
@import './addressList';
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
display: none;
|
|
21
|
-
}
|
|
21
|
+
//.design-container .monitor .actived:after {
|
|
22
|
+
// display: none;
|
|
23
|
+
//}
|
package/css/pages.zip
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AddressItem: ({ itemData, fontSize, iconSize }: any) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useComponent } from '@brushes/qj-simulate-component';
|
|
3
|
+
import { Radio } from 'antd-mobile';
|
|
4
|
+
export const AddressItem = ({ itemData, fontSize = '12px', iconSize = '12px' }) => {
|
|
5
|
+
const { View, Text } = useComponent();
|
|
6
|
+
return (_jsxs(View, Object.assign({ className: 'addressItem' }, { children: [_jsxs(View, Object.assign({ className: 'upInfo' }, { children: [_jsxs(View, Object.assign({ className: 'userInfo' }, { children: [itemData.name, " ", itemData.phone] })), _jsxs(View, Object.assign({ className: 'addressInfo' }, { children: [_jsx(Text, Object.assign({ className: 'address' }, { children: itemData.address })), _jsx(View, { className: 'icon' })] }))] })), _jsxs(View, Object.assign({ className: 'downInfo' }, { children: [_jsx(Radio, Object.assign({ value: itemData.default, style: {
|
|
7
|
+
'--font-size': fontSize,
|
|
8
|
+
'--icon-size': iconSize
|
|
9
|
+
} }, { children: "\u8BBE\u4E3A\u9ED8\u8BA4\u5730\u5740" })), _jsx(Text, Object.assign({ className: 'del' }, { children: "\u5220\u9664" }))] }))] })));
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useComponent } from '@brushes/qj-simulate-component';
|
|
3
|
+
import { Rate } from 'antd-mobile';
|
|
4
|
+
const EvaluateItem = ({ starColor = '#FF0934', starSize = '12px', itemData }) => {
|
|
5
|
+
const { View, Text } = useComponent();
|
|
6
|
+
return (_jsxs(View, Object.assign({ className: 'evaluateItem' }, { children: [_jsxs(View, Object.assign({ className: 'userInfo' }, { children: [_jsx("img", { src: itemData.avatar, className: 'avatar' }), _jsxs(View, Object.assign({ className: 'userNameWrap' }, { children: [_jsx(Text, Object.assign({ className: 'userName' }, { children: itemData.userName })), _jsx(Rate, { readOnly: true, value: itemData.rate, style: {
|
|
7
|
+
'--star-size': starSize,
|
|
8
|
+
'--active-color': starColor
|
|
9
|
+
} })] }))] })), _jsxs(View, Object.assign({ className: 'size' }, { children: ["\u89C4\u683C\uFF1A ", itemData.size] })), _jsx(View, Object.assign({ className: 'content' }, { children: itemData.evaluate })), _jsx(View, Object.assign({ className: 'img-group' }, { children: itemData.imgUrls.map((item, index) => {
|
|
10
|
+
return _jsx("img", { src: item.imgUrl, className: 'img' }, index);
|
|
11
|
+
}) }))] })));
|
|
12
|
+
};
|
|
13
|
+
export default EvaluateItem;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const evaluateListFake: {
|
|
2
|
+
avatar: string;
|
|
3
|
+
userName: string;
|
|
4
|
+
rate: number;
|
|
5
|
+
size: string;
|
|
6
|
+
evaluate: string;
|
|
7
|
+
imgUrls: {
|
|
8
|
+
imgUrl: string;
|
|
9
|
+
}[];
|
|
10
|
+
}[];
|
|
11
|
+
export declare const addressListFake: {
|
|
12
|
+
id: number;
|
|
13
|
+
name: string;
|
|
14
|
+
phone: string;
|
|
15
|
+
address: string;
|
|
16
|
+
default: number;
|
|
17
|
+
}[];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// 评价列表
|
|
2
|
+
export const evaluateListFake = [
|
|
3
|
+
{
|
|
4
|
+
avatar: 'http://www.qianjiangcloud.com/images/centerimga/pic%EF%BC%8Flogo+@2x.png',
|
|
5
|
+
userName: '张三李四王五',
|
|
6
|
+
rate: 4.5,
|
|
7
|
+
size: '一大通',
|
|
8
|
+
evaluate: '实物与描述的一样,质量相当好,卖家态度也好,有问必答,发货速度杠杠的,值得购买哦。外观设计漂亮,尺寸大小合适,包装仔细完整,宝贝手感不错,感觉很好,发货速度快,服务态度一流,给力!5星好评!',
|
|
9
|
+
imgUrls: [
|
|
10
|
+
{
|
|
11
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
avatar: 'http://www.qianjiangcloud.com/images/centerimga/pic%EF%BC%8Flogo+@2x.png',
|
|
26
|
+
userName: '张三李四王五',
|
|
27
|
+
rate: 4.5,
|
|
28
|
+
size: '一大通',
|
|
29
|
+
evaluate: '实物与描述的一样,质量相当好,卖家态度也好,有问必答,发货速度杠杠的,值得购买哦。外观设计漂亮,尺寸大小合适,包装仔细完整,宝贝手感不错,感觉很好,发货速度快,服务态度一流,给力!5星好评!',
|
|
30
|
+
imgUrls: [
|
|
31
|
+
{
|
|
32
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
// 评价列表
|
|
38
|
+
export const addressListFake = [
|
|
39
|
+
{
|
|
40
|
+
id: 1,
|
|
41
|
+
name: '张三',
|
|
42
|
+
phone: '13679126756',
|
|
43
|
+
address: '上海 上海市 闵行区中庚环球创意中心',
|
|
44
|
+
default: 1
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 2,
|
|
48
|
+
name: '张三',
|
|
49
|
+
phone: '13679126756',
|
|
50
|
+
address: '上海 上海市 闵行区中庚环球创意中心',
|
|
51
|
+
default: 0
|
|
52
|
+
}
|
|
53
|
+
];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import provinces from 'china-division/dist/provinces.json';
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import cities from 'china-division/dist/cities.json';
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import areas from 'china-division/dist/areas.json';
|
|
7
|
+
console.log(5, areas, cities, provinces);
|
|
8
|
+
// areas.forEach((area:any) => {
|
|
9
|
+
// const matchCity = cities.filter((city:any) => city.code === area.cityCode)[0];
|
|
10
|
+
// if (matchCity) {
|
|
11
|
+
// matchCity.children = matchCity.children || [];
|
|
12
|
+
// matchCity.children.push({
|
|
13
|
+
// label: area.name,
|
|
14
|
+
// value: area.code,
|
|
15
|
+
// });
|
|
16
|
+
// }
|
|
17
|
+
// });
|
|
18
|
+
//
|
|
19
|
+
// cities.forEach((city: any) => {
|
|
20
|
+
// const matchProvince = provinces.filter((province: any) => province.code === city.provinceCode)[0];
|
|
21
|
+
// if (matchProvince) {
|
|
22
|
+
// matchProvince.children = matchProvince.children || [];
|
|
23
|
+
// matchProvince.children.push({
|
|
24
|
+
// label: city.name,
|
|
25
|
+
// value: city.code,
|
|
26
|
+
// children: city.children,
|
|
27
|
+
// });
|
|
28
|
+
// }
|
|
29
|
+
// });
|
|
30
|
+
//
|
|
31
|
+
// const options = provinces.map((province: any) => {
|
|
32
|
+
//
|
|
33
|
+
// console.log(32, province)
|
|
34
|
+
// return {
|
|
35
|
+
// label: province.name,
|
|
36
|
+
// value: province.code,
|
|
37
|
+
// children: province.children,
|
|
38
|
+
// }
|
|
39
|
+
// });
|
|
40
|
+
export default [];
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useRef, useState } from 'react';
|
|
3
|
+
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
+
import { Form, Input, Radio, Button, Cascader } from 'antd-mobile';
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
// import {options} from './option'
|
|
7
|
+
import options from './a';
|
|
8
|
+
const AddressDetailJsx = () => {
|
|
9
|
+
const { View } = useComponent();
|
|
10
|
+
const [visible, setVisible] = useState(false);
|
|
11
|
+
const checkMobile = (_, value) => {
|
|
12
|
+
console.log(_, value);
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
if (!/^1[3456789]\d{9}$/.test(value) && value) {
|
|
15
|
+
reject('请输入正确手机号');
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
resolve('');
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const config = useRef([
|
|
23
|
+
{
|
|
24
|
+
type: 'input',
|
|
25
|
+
props: {
|
|
26
|
+
onlyShowClearWhenFocus: true,
|
|
27
|
+
placeholder: '请填写收货人姓名'
|
|
28
|
+
},
|
|
29
|
+
label: '收货人',
|
|
30
|
+
name: 'name',
|
|
31
|
+
rules: [{ required: true, message: '收货人姓名不能为空' }]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'input',
|
|
35
|
+
props: {
|
|
36
|
+
type: 'number',
|
|
37
|
+
onlyShowClearWhenFocus: true,
|
|
38
|
+
placeholder: '请填写收货人手机号码'
|
|
39
|
+
},
|
|
40
|
+
label: '手机号码',
|
|
41
|
+
name: 'phone',
|
|
42
|
+
rules: [{ required: true, message: '收货人手机号码不能为空' }, { validator: checkMobile }]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'cascader',
|
|
46
|
+
props: {
|
|
47
|
+
options: options
|
|
48
|
+
},
|
|
49
|
+
label: '所在地区',
|
|
50
|
+
name: 'area'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'input',
|
|
54
|
+
props: {
|
|
55
|
+
onlyShowClearWhenFocus: true,
|
|
56
|
+
placeholder: '街道/楼牌号等'
|
|
57
|
+
},
|
|
58
|
+
label: '详细地址',
|
|
59
|
+
name: 'address',
|
|
60
|
+
rules: [{ required: true, message: '收货人详细地址不能为空' }]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'input',
|
|
64
|
+
props: {
|
|
65
|
+
type: 'number',
|
|
66
|
+
onlyShowClearWhenFocus: true,
|
|
67
|
+
placeholder: '请填写邮政编码'
|
|
68
|
+
},
|
|
69
|
+
label: '邮政编码',
|
|
70
|
+
name: 'zipCode'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: 'radio',
|
|
74
|
+
props: {
|
|
75
|
+
value: 1
|
|
76
|
+
},
|
|
77
|
+
label: '设置默认地址',
|
|
78
|
+
name: 'default'
|
|
79
|
+
}
|
|
80
|
+
]);
|
|
81
|
+
const handle = (a) => {
|
|
82
|
+
console.log(a);
|
|
83
|
+
};
|
|
84
|
+
return (_jsx(View, Object.assign({ className: 'addressDetail' }, { children: _jsx(Form, Object.assign({ layout: "horizontal", mode: "card", onFinish: handle, footer: _jsx(Button, Object.assign({ block: true, type: "submit", color: "primary", size: "large" }, { children: "\u63D0\u4EA4" })) }, { children: config.current.map((item, index) => {
|
|
85
|
+
return (_jsx(Form.Item, Object.assign({ label: item.label, name: item.name, rules: item.rules }, { children: (() => {
|
|
86
|
+
if (item.type === 'input') {
|
|
87
|
+
return _jsx(Input, Object.assign({}, item.props));
|
|
88
|
+
}
|
|
89
|
+
else if (item.type === 'radio') {
|
|
90
|
+
return _jsx(Radio, Object.assign({}, item.props));
|
|
91
|
+
}
|
|
92
|
+
else if (item.type === 'cascader') {
|
|
93
|
+
return (
|
|
94
|
+
// <Cascader {...item.props}/>
|
|
95
|
+
_jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ onClick: () => {
|
|
96
|
+
setVisible(true);
|
|
97
|
+
} }, { children: "\u9009\u62E9" })), _jsx(Cascader, { options: options, visible: visible, onClose: () => {
|
|
98
|
+
setVisible(false);
|
|
99
|
+
} })] }));
|
|
100
|
+
}
|
|
101
|
+
})() }), index));
|
|
102
|
+
}) })) })));
|
|
103
|
+
};
|
|
104
|
+
export const AddressDetail = memo(AddressDetailJsx);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const options: {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
children: {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
children: ({
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
disabled?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
})[];
|
|
16
|
+
}[];
|
|
17
|
+
}[];
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
export const options = [
|
|
2
|
+
{
|
|
3
|
+
label: '浙江',
|
|
4
|
+
value: '浙江',
|
|
5
|
+
children: [
|
|
6
|
+
{
|
|
7
|
+
label: '杭州',
|
|
8
|
+
value: '杭州',
|
|
9
|
+
children: [
|
|
10
|
+
{
|
|
11
|
+
label: '西湖区',
|
|
12
|
+
value: '西湖区'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: '上城区',
|
|
16
|
+
value: '上城区'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: '余杭区',
|
|
20
|
+
value: '余杭区',
|
|
21
|
+
disabled: true
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: '温州',
|
|
27
|
+
value: '温州',
|
|
28
|
+
children: [
|
|
29
|
+
{
|
|
30
|
+
label: '鹿城区',
|
|
31
|
+
value: '鹿城区'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: '龙湾区',
|
|
35
|
+
value: '龙湾区',
|
|
36
|
+
disabled: true
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: '瓯海区',
|
|
40
|
+
value: '瓯海区'
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: '宁波',
|
|
46
|
+
value: '宁波',
|
|
47
|
+
children: [
|
|
48
|
+
{
|
|
49
|
+
label: '海曙区',
|
|
50
|
+
value: '海曙区'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: '江北区',
|
|
54
|
+
value: '江北区'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: '镇海区',
|
|
58
|
+
value: '镇海区'
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: '安徽',
|
|
66
|
+
value: '安徽',
|
|
67
|
+
children: [
|
|
68
|
+
{
|
|
69
|
+
label: '合肥',
|
|
70
|
+
value: '合肥',
|
|
71
|
+
children: [
|
|
72
|
+
{
|
|
73
|
+
label: '包河区',
|
|
74
|
+
value: '包河区'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: '蜀山区',
|
|
78
|
+
value: '蜀山区'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: '瑶海区',
|
|
82
|
+
value: '瑶海区'
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: '芜湖',
|
|
88
|
+
value: '芜湖',
|
|
89
|
+
children: [
|
|
90
|
+
{
|
|
91
|
+
label: '镜湖区',
|
|
92
|
+
value: '镜湖区'
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: '弋江区',
|
|
96
|
+
value: '弋江区'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: '湾沚区',
|
|
100
|
+
value: '湾沚区'
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: '江苏',
|
|
108
|
+
value: '江苏',
|
|
109
|
+
children: [
|
|
110
|
+
{
|
|
111
|
+
label: '南京',
|
|
112
|
+
value: '南京',
|
|
113
|
+
children: [
|
|
114
|
+
{
|
|
115
|
+
label: '玄武区',
|
|
116
|
+
value: '玄武区'
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
label: '秦淮区',
|
|
120
|
+
value: '秦淮区'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
label: '建邺区',
|
|
124
|
+
value: '建邺区'
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
label: '苏州',
|
|
130
|
+
value: '苏州',
|
|
131
|
+
children: [
|
|
132
|
+
{
|
|
133
|
+
label: '虎丘区',
|
|
134
|
+
value: '虎丘区'
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: '吴中区',
|
|
138
|
+
value: '吴中区'
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
label: '相城区',
|
|
142
|
+
value: '相城区'
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
+
import { getEnv } from '@brushes/api';
|
|
5
|
+
import { addressListFake } from '../../common/mock';
|
|
6
|
+
import { AddressItem } from '../../common/addressItem';
|
|
7
|
+
import { Radio } from 'antd-mobile';
|
|
8
|
+
const AddressListJsx = () => {
|
|
9
|
+
const { View } = useComponent();
|
|
10
|
+
const flag = getEnv();
|
|
11
|
+
return (_jsxs(View, Object.assign({ className: 'addressList', style: {
|
|
12
|
+
height: flag ? '100vh' : '600px'
|
|
13
|
+
} }, { children: [_jsx(Radio.Group, Object.assign({ defaultValue: 1 }, { children: addressListFake.map((item) => (_jsx(AddressItem, { itemData: item }, item.id))) })), _jsx(View, Object.assign({ className: 'addBtnWrap' }, { children: _jsx(View, Object.assign({ className: 'addBtn' }, { children: "+ \u65B0\u589E\u5730\u5740" })) }))] })));
|
|
14
|
+
};
|
|
15
|
+
export const AddressList = memo(AddressListJsx);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useRef, useState } from 'react';
|
|
3
|
+
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
+
import EvaluateItem from '../../common/evaluateItem';
|
|
5
|
+
import { evaluateListFake } from '../../common/mock';
|
|
6
|
+
const EvaluateListJsx = () => {
|
|
7
|
+
const [active, setActive] = useState('1');
|
|
8
|
+
const { View } = useComponent();
|
|
9
|
+
const tabs = useRef([
|
|
10
|
+
{
|
|
11
|
+
label: '全部',
|
|
12
|
+
num: '900+',
|
|
13
|
+
index: '1'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: '好评',
|
|
17
|
+
num: '800+',
|
|
18
|
+
index: '2'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: '中评',
|
|
22
|
+
num: '99+',
|
|
23
|
+
index: '3'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: '差评',
|
|
27
|
+
num: '12',
|
|
28
|
+
index: '4'
|
|
29
|
+
}
|
|
30
|
+
]);
|
|
31
|
+
const handleTab = (coe) => {
|
|
32
|
+
setActive(coe);
|
|
33
|
+
};
|
|
34
|
+
return (_jsxs(_Fragment, { children: [_jsx(View, Object.assign({ className: 'evaluateListTab' }, { children: tabs.current.map((item) => {
|
|
35
|
+
return (_jsxs(View, Object.assign({ className: `evaluateListTabItem ${item.index === active ? 'active' : ''}`, "data-index": item.index, onClick: handleTab.bind(null, item.index) }, { children: [item.label, " ", item.num] }), item.index));
|
|
36
|
+
}) })), _jsx(View, Object.assign({ className: 'evaluateListContent' }, { children: evaluateListFake.map((item, index) => {
|
|
37
|
+
return _jsx(EvaluateItem, { itemData: item }, index);
|
|
38
|
+
}) }))] }));
|
|
39
|
+
};
|
|
40
|
+
export const EvaluateList = memo(EvaluateListJsx);
|
|
@@ -1,31 +1,11 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
12
|
-
import { getEnv, getTaro } from '@brushes/api';
|
|
2
|
+
import { useComponent, navigatorImpl } from '@brushes/qj-simulate-component';
|
|
13
3
|
export const ClassifyFloor = ({ navList, activeKey }) => {
|
|
14
4
|
const { View, Text } = useComponent();
|
|
15
5
|
console.log(4, navList);
|
|
16
|
-
const switchImpl = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
-
const isTaro = getEnv();
|
|
18
|
-
console.log(45, isTaro);
|
|
19
|
-
if (isTaro) {
|
|
20
|
-
const Taro = yield getTaro();
|
|
21
|
-
Taro.navigateTo({
|
|
22
|
-
url: '/subpackage/goods/index'
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
6
|
return navList.map((item) => (_jsx(View, Object.assign({ className: ['content', activeKey === `${item.goodsClassCode}` ? ' active' : ''].join('') }, { children: item === null || item === void 0 ? void 0 : item.childList.map((classifyItem) => {
|
|
27
7
|
return (_jsxs(View, Object.assign({ className: 'classifyFloor' }, { children: [_jsxs(View, Object.assign({ className: 'titleWrap' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: classifyItem.goodsClassName })), _jsx(Text, { className: 'line' })] })), _jsx(View, Object.assign({ className: 'container' }, { children: classifyItem.childList.map((goodsItem) => {
|
|
28
|
-
return (_jsxs(View, Object.assign({ onClick:
|
|
8
|
+
return (_jsxs(View, Object.assign({ onClick: () => navigatorImpl('/subpackage/goods/index'), className: 'classifyFloorGoodsItem' }, { children: [_jsx("img", { src: goodsItem.goodsClassLogo, className: 'logo' }), _jsx(Text, Object.assign({ className: 'title' }, { children: goodsItem.goodsClassName }))] }), goodsItem.goodsClassCode));
|
|
29
9
|
}) }))] }), classifyItem.goodsClassCode));
|
|
30
10
|
}) }), item.goodsClassCode)));
|
|
31
11
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useComponent } from '@brushes/qj-simulate-component';
|
|
3
|
+
import EvaluateItem from '../../../common/evaluateItem';
|
|
4
|
+
const fake = [
|
|
5
|
+
{
|
|
6
|
+
avatar: 'http://www.qianjiangcloud.com/images/centerimga/pic%EF%BC%8Flogo+@2x.png',
|
|
7
|
+
userName: '张三李四王五',
|
|
8
|
+
rate: 4.5,
|
|
9
|
+
size: '一大通',
|
|
10
|
+
evaluate: '实物与描述的一样,质量相当好,卖家态度也好,有问必答,发货速度杠杠的,值得购买哦。外观设计漂亮,尺寸大小合适,包装仔细完整,宝贝手感不错,感觉很好,发货速度快,服务态度一流,给力!5星好评!',
|
|
11
|
+
imgUrls: [
|
|
12
|
+
{
|
|
13
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
avatar: 'http://www.qianjiangcloud.com/images/centerimga/pic%EF%BC%8Flogo+@2x.png',
|
|
28
|
+
userName: '张三李四王五',
|
|
29
|
+
rate: 4.5,
|
|
30
|
+
size: '一大通',
|
|
31
|
+
evaluate: '实物与描述的一样,质量相当好,卖家态度也好,有问必答,发货速度杠杠的,值得购买哦。外观设计漂亮,尺寸大小合适,包装仔细完整,宝贝手感不错,感觉很好,发货速度快,服务态度一流,给力!5星好评!',
|
|
32
|
+
imgUrls: [
|
|
33
|
+
{
|
|
34
|
+
imgUrl: 'https://img12.360buyimg.com/n1/jfs/t1/137059/18/27631/76566/635fc607E0b9e9c60/762dac6802e989d3.jpg'
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
const EvaluateEntry = () => {
|
|
40
|
+
const { View, Text } = useComponent();
|
|
41
|
+
return (_jsxs(View, Object.assign({ className: 'evaluateEntry' }, { children: [_jsxs(View, Object.assign({ className: 'topInfo' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: "\u8BC4\u4EF7\uFF08109\uFF09" })), _jsx(View, { children: _jsx(Text, Object.assign({ className: 'txt' }, { children: "\u597D\u8BC4\u5EA6 99%" })) })] })), fake.map((item, index) => (_jsx(EvaluateItem, { itemData: item }, index)))] })));
|
|
42
|
+
};
|
|
43
|
+
export default EvaluateEntry;
|
|
@@ -11,13 +11,11 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
11
11
|
import { memo, useEffect, useState } from 'react';
|
|
12
12
|
import { useComponent } from '@brushes/qj-simulate-component';
|
|
13
13
|
import { SEARCH } from '../../static';
|
|
14
|
-
import {
|
|
14
|
+
import { Skeleton } from 'antd-mobile';
|
|
15
15
|
import { getResourceGoodsInfoBySkuCode } from '@brushes/api';
|
|
16
16
|
import { _ } from '@brushes/tools';
|
|
17
17
|
import GoodsDetailPromotion from './components/goodsDetailPromotion';
|
|
18
18
|
import GoodsDetailCoupon from './components/goodsDetailCoupon';
|
|
19
|
-
import GoodsDetailInfo from './components/goodsDetailInfo';
|
|
20
|
-
import EvaluateList from '../../common/evaluateList';
|
|
21
19
|
const { isEmpty } = _;
|
|
22
20
|
const GoodsDetailJsx = () => {
|
|
23
21
|
const { View, Text } = useComponent();
|
|
@@ -27,7 +25,7 @@ const GoodsDetailJsx = () => {
|
|
|
27
25
|
}, []);
|
|
28
26
|
const getData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
27
|
const result = yield getResourceGoodsInfoBySkuCode({
|
|
30
|
-
skuCode: '
|
|
28
|
+
skuCode: '574562232464371754'
|
|
31
29
|
});
|
|
32
30
|
console.log(22, result);
|
|
33
31
|
setGoods(result);
|
|
@@ -35,6 +33,6 @@ const GoodsDetailJsx = () => {
|
|
|
35
33
|
return (_jsx(View, Object.assign({ className: 'GoodsDetailWrap' }, { children: isEmpty(goods) ? (_jsxs(_Fragment, { children: [_jsx(Skeleton, { animated: true, style: {
|
|
36
34
|
'--width': '100%',
|
|
37
35
|
'--height': '300px'
|
|
38
|
-
} }), _jsx(Skeleton.Title, { animated: true }), _jsx(Skeleton.Paragraph, { lineCount: 10, animated: true })] })) : (_jsxs(_Fragment, { children: [_jsxs(View, Object.assign({ className: 'goodsDetail-topInfo' }, { children: [_jsxs(View, { children: [_jsx(Text, Object.assign({ className: 'name' }, { children: goods === null || goods === void 0 ? void 0 : goods.goodsName })), _jsxs(Text, Object.assign({ className: 'price' }, { children: ["\uFFE5", goods === null || goods === void 0 ? void 0 : goods.pricesetNprice.toFixed(2)] }))] }), _jsxs(View, Object.assign({ className: 'rPart' }, { children: [_jsx("img", { src: SEARCH, alt: "", className: 'icon' }), _jsx(Text, Object.assign({ className: 'txt' }, { children: "\u5DF2\u6536\u85CF" }))] }))] })), _jsx(GoodsDetailPromotion, {}), _jsx(GoodsDetailCoupon, {})
|
|
36
|
+
} }), _jsx(Skeleton.Title, { animated: true }), _jsx(Skeleton.Paragraph, { lineCount: 10, animated: true })] })) : (_jsxs(_Fragment, { children: [_jsxs(View, Object.assign({ className: 'goodsDetail-topInfo' }, { children: [_jsxs(View, { children: [_jsx(Text, Object.assign({ className: 'name' }, { children: goods === null || goods === void 0 ? void 0 : goods.goodsName })), _jsxs(Text, Object.assign({ className: 'price' }, { children: ["\uFFE5", goods === null || goods === void 0 ? void 0 : goods.pricesetNprice.toFixed(2)] }))] }), _jsxs(View, Object.assign({ className: 'rPart' }, { children: [_jsx("img", { src: SEARCH, alt: "", className: 'icon' }), _jsx(Text, Object.assign({ className: 'txt' }, { children: "\u5DF2\u6536\u85CF" }))] }))] })), _jsx(GoodsDetailPromotion, {}), _jsx(GoodsDetailCoupon, {})] })) })));
|
|
39
37
|
};
|
|
40
38
|
export const GoodsDetail = memo(GoodsDetailJsx);
|
|
@@ -25,10 +25,15 @@ function OrderListItemJsx({ item }) {
|
|
|
25
25
|
const onScroll = (e = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
setLoading(true);
|
|
27
27
|
// console.log(17, e.detail);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
try {
|
|
29
|
+
const data = yield queryContractPageC({ page: 1, rows: 10 });
|
|
30
|
+
console.log(19, data);
|
|
31
|
+
setData((val) => [...val, ...result.rows]);
|
|
32
|
+
setLoading(false);
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
console.log(err);
|
|
36
|
+
}
|
|
32
37
|
});
|
|
33
38
|
return (_jsx(View, Object.assign({ className: 'orderListItemWrap', style: { height: isTaro ? '100vh' : '667px' } }, { children: _jsx(ScrollView, Object.assign({ onScroll: onScroll, style: { height: '100vh' } }, { children: _jsxs(View, { children: [data.map((item, index) => (_createElement(Item, Object.assign({}, item, { key: index })))), loading ? _jsx(Loading, {}) : null] }) })) })));
|
|
34
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export interface itemType {
|
|
3
3
|
imgUrl: string;
|
|
4
4
|
link: string;
|
|
@@ -18,5 +18,5 @@ interface SwiperType {
|
|
|
18
18
|
width: number;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
export declare const Slider:
|
|
21
|
+
export declare const Slider: import("react").NamedExoticComponent<SwiperType>;
|
|
22
22
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { itemType } from './index';
|
|
3
|
-
export declare const Items:
|
|
3
|
+
export declare const Items: import("react").MemoExoticComponent<({ item, type }: {
|
|
4
4
|
item: itemType;
|
|
5
5
|
type: number;
|
|
6
6
|
}) => JSX.Element>;
|
package/dist/components/index.js
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import provinces from 'china-division/dist/provinces.json';
|
|
2
|
+
import cities from 'china-division/dist/cities.json';
|
|
3
|
+
import areas from 'china-division/dist/areas.json';
|
|
4
|
+
areas.forEach((area) => {
|
|
5
|
+
const matchCity = cities.filter((city) => city.code === area.cityCode)[0];
|
|
6
|
+
if (matchCity) {
|
|
7
|
+
matchCity.children = matchCity.children || [];
|
|
8
|
+
matchCity.children.push({
|
|
9
|
+
label: area.name,
|
|
10
|
+
value: area.code
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
cities.forEach((city) => {
|
|
15
|
+
const matchProvince = provinces.filter((province) => province.code === city.provinceCode)[0];
|
|
16
|
+
if (matchProvince) {
|
|
17
|
+
matchProvince.children = matchProvince.children || [];
|
|
18
|
+
matchProvince.children.push({
|
|
19
|
+
label: city.name,
|
|
20
|
+
value: city.code,
|
|
21
|
+
children: city.children
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const options = provinces.map((province) => ({
|
|
26
|
+
label: province.name,
|
|
27
|
+
value: province.code,
|
|
28
|
+
children: province.children
|
|
29
|
+
}));
|
|
30
|
+
export default options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "s-material-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "'组件库'",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": [
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@types/node": ">18.0.0",
|
|
36
36
|
"@types/react": "^18.0.0",
|
|
37
37
|
"antd-mobile": "^5.24.0",
|
|
38
|
+
"china-division": "^2.5.0",
|
|
38
39
|
"classnames": "^2.3.2",
|
|
39
40
|
"flyio": "^0.6.14",
|
|
40
41
|
"nodemon": "^2.0.19",
|