Compare commits
565 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b740a6f906 | ||
|
|
7376d4d890 | ||
|
|
81297db7a8 | ||
|
|
b5ca94ab98 | ||
|
|
a220339fd6 | ||
|
|
0994b6659a | ||
|
|
c4037a346d | ||
|
|
45a6e76d4a | ||
|
|
aee67ec317 | ||
|
|
51610546c4 | ||
|
|
e8e7d27c0d | ||
|
|
166e889b6f | ||
|
|
db95647cd8 | ||
|
|
db13814156 | ||
|
|
5cf3956bc8 | ||
|
|
329e6df722 | ||
|
|
8023852b3c | ||
|
|
228935034d | ||
|
|
acff55dc65 | ||
|
|
61a9110c51 | ||
|
|
3a3e14e0a7 | ||
|
|
6ba767419e | ||
|
|
925365018b | ||
|
|
5960df31bd | ||
|
|
21f9fd92e2 | ||
|
|
9765310136 | ||
|
|
51cde2dd0d | ||
|
|
3311568e50 | ||
|
|
e5918b041a | ||
|
|
f46330ecf0 | ||
|
|
846e80f1fa | ||
|
|
631519d7c7 | ||
|
|
bbeb31e8a3 | ||
|
|
52bcf07e25 | ||
|
|
4d725221a5 | ||
|
|
c8a0619141 | ||
|
|
e1d7b1801d | ||
|
|
15456ae377 | ||
|
|
1c3d711298 | ||
|
|
1bee69cefb | ||
|
|
cf740d9605 | ||
|
|
d2aca24d06 | ||
|
|
6e042c4b78 | ||
|
|
1afd1704ab | ||
|
|
d5f81fe5d8 | ||
|
|
fada0a735f | ||
|
|
35de0c031d | ||
|
|
2e5eefc079 | ||
|
|
1fa264b0bf | ||
|
|
d2a0940858 | ||
|
|
4ff8eb6494 | ||
|
|
8ca87cdb2a | ||
|
|
f45b115355 | ||
|
|
7490211340 | ||
|
|
76d028277a | ||
|
|
0a0066fe5c | ||
|
|
4f7e38db3b | ||
|
|
54dcd2d8be | ||
|
|
6c1d7cce8d | ||
|
|
06b090cdf6 | ||
|
|
3653b4e7cb | ||
|
|
c6c890da63 | ||
|
|
75e7bc2d9c | ||
|
|
649f983990 | ||
|
|
193628913a | ||
|
|
cb304d7d53 | ||
|
|
4bb7bd4603 | ||
|
|
1e408eb8ae | ||
|
|
d762d18c7b | ||
|
|
3622c7bb53 | ||
|
|
1b9b2d9c95 | ||
|
|
0d5c60ed8c | ||
|
|
ab2bcb515f | ||
|
|
b3e6eb72eb | ||
|
|
9742aaf0bc | ||
|
|
bc1942c492 | ||
|
|
44facf549a | ||
|
|
09dd9861fd | ||
|
|
8d3b5cf91d | ||
|
|
5a90567e98 | ||
|
|
246ba9057f | ||
|
|
9eecc603db | ||
|
|
1fe4078115 | ||
|
|
ef73a6fe94 | ||
|
|
edef393535 | ||
|
|
97e6fc79ea | ||
|
|
0b82ae7569 | ||
|
|
3cb0e52ca0 | ||
|
|
fd1d32d431 | ||
|
|
8c169489eb | ||
|
|
6ecb6b8055 | ||
|
|
515cd3ebbd | ||
|
|
6c6b89f512 | ||
|
|
1ac5dcfe25 | ||
|
|
ccd5decbf7 | ||
|
|
9a12a29127 | ||
|
|
8d96a3c106 | ||
|
|
41bfd17cd0 | ||
|
|
5614414185 | ||
|
|
7ac4010910 | ||
|
|
ffc5af6d39 | ||
|
|
c64f00fe9e | ||
|
|
d3a49f3f3e | ||
|
|
06c6abe250 | ||
|
|
f54739e337 | ||
|
|
cdc673da06 | ||
|
|
0bd99df26a | ||
|
|
0dcee2f2e2 | ||
|
|
f7f836f5fd | ||
|
|
16d1576c10 | ||
|
|
0d1dbd0350 | ||
|
|
18ea8a4366 | ||
|
|
b9aa720bea | ||
|
|
28473979ec | ||
|
|
dbe5a21f4d | ||
|
|
31d9859f10 | ||
|
|
7cbd2b698c | ||
|
|
6fa3fa7822 | ||
|
|
e80316d43d | ||
|
|
9979b6fd67 | ||
|
|
a36a4cd244 | ||
|
|
f99e2673a6 | ||
|
|
47da7d3b16 | ||
|
|
4f2f6e8d20 | ||
|
|
4da164dcba | ||
|
|
1aab8aa8c8 | ||
|
|
8a2a946bc1 | ||
|
|
038de5ed53 | ||
|
|
0bac362c95 | ||
|
|
04599148fc | ||
|
|
b61faef093 | ||
|
|
642536f83e | ||
|
|
7ebb5e21d2 | ||
|
|
0c18a0f6db | ||
|
|
93768e4014 | ||
|
|
3674b63db4 | ||
|
|
9e8f369da4 | ||
|
|
04cc8b991c | ||
|
|
0342f1d17a | ||
|
|
82838a5ebb | ||
|
|
20042786aa | ||
|
|
2037b57a5d | ||
|
|
2932c7f35d | ||
|
|
53cc6f46d1 | ||
|
|
a5e2ae9a4d | ||
|
|
95beebc5c7 | ||
|
|
f7b8713be1 | ||
|
|
c33d10734f | ||
|
|
edde94af69 | ||
|
|
fbf2b6a6fa | ||
|
|
b84f1b595e | ||
|
|
e4bc52a219 | ||
|
|
dc55e0983a | ||
|
|
f3914b63b3 | ||
|
|
1ad729ca0e | ||
|
|
8c864c207a | ||
|
|
aaadc90b09 | ||
|
|
ea8c86e2e2 | ||
|
|
575e7b3297 | ||
|
|
49b1252a1f | ||
|
|
b0021a759f | ||
|
|
70506767ef | ||
|
|
48002d6143 | ||
|
|
43349a51d1 | ||
|
|
a6052bcd9d | ||
|
|
3d418fa9e1 | ||
|
|
9feff82451 | ||
|
|
647ed90eac | ||
|
|
30b968b3e5 | ||
|
|
c8edf9c1bd | ||
|
|
a2c6a1d46d | ||
|
|
6d5428317f | ||
|
|
b829d2cd05 | ||
|
|
7f46528086 | ||
|
|
71e4c49c3e | ||
|
|
84cfb26512 | ||
|
|
07445e42e3 | ||
|
|
201348202a | ||
|
|
01d2ecda39 | ||
|
|
34967921a5 | ||
|
|
692f7b6dbf | ||
|
|
8dc3923a4f | ||
|
|
b5b74e8b3b | ||
|
|
a7ee9a6444 | ||
|
|
5ac39d0e93 | ||
|
|
e6d8d87c31 | ||
|
|
bed539d16f | ||
|
|
abaefc59a6 | ||
|
|
8d60a40688 | ||
|
|
589b7fc7c5 | ||
|
|
7caa2fd40d | ||
|
|
b59da2c101 | ||
|
|
72ad898a6c | ||
|
|
db919a57f3 | ||
|
|
f33efac045 | ||
|
|
334a27a12b | ||
|
|
08fcbe9acf | ||
|
|
14a8695cc9 | ||
|
|
9e4449257e | ||
|
|
826454e164 | ||
|
|
4c11e448f1 | ||
|
|
cfc5c94f5a | ||
|
|
e6588af790 | ||
|
|
9b81a70808 | ||
|
|
fb50143ec2 | ||
|
|
736c5ecd2c | ||
|
|
e88c75d0b7 | ||
|
|
a849d8906a | ||
|
|
2d2448ebba | ||
|
|
9b0a089e29 | ||
|
|
682bd13b6e | ||
|
|
71ab63e047 | ||
|
|
2e27a2fb85 | ||
|
|
02bf570f08 | ||
|
|
e52ac06fb3 | ||
|
|
c1a741466c | ||
|
|
81ab58e009 | ||
|
|
a42a7515dc | ||
|
|
2dabff65ed | ||
|
|
71d8fbd5fe | ||
|
|
7763abd591 | ||
|
|
6bbba6bd35 | ||
|
|
c7ce4e72c6 | ||
|
|
9e365c27b5 | ||
|
|
4557b1d5c1 | ||
|
|
e9163e4247 | ||
|
|
328bceec2c | ||
|
|
82bb5577b2 | ||
|
|
3e505a8a4e | ||
|
|
cc80242896 | ||
|
|
e521e723d5 | ||
|
|
9213aed8e0 | ||
|
|
d104baf426 | ||
|
|
b89fb8b2ba | ||
|
|
bb8ea94850 | ||
|
|
783c6df0a4 | ||
|
|
06a6b77d2e | ||
|
|
924de43227 | ||
|
|
0597531c72 | ||
|
|
07e75f71cc | ||
|
|
c9d42755ef | ||
|
|
9e45c45688 | ||
|
|
75fd42e152 | ||
|
|
97bc68ad26 | ||
|
|
05a25bd80f | ||
|
|
ffde03bc21 | ||
|
|
0d42bce536 | ||
|
|
bf2eb82728 | ||
|
|
a62530d7b8 | ||
|
|
3e1fa0b937 | ||
|
|
604a918fd1 | ||
|
|
1f02b45600 | ||
|
|
ebb048f1a7 | ||
|
|
c58d70524d | ||
|
|
86fed0db41 | ||
|
|
7cbca93d3d | ||
|
|
c1f846a633 | ||
|
|
7a43087ae0 | ||
|
|
f281f8e65a | ||
|
|
4d26bf08b2 | ||
|
|
146854b098 | ||
|
|
5cfbfdf67c | ||
|
|
00a64c4d2a | ||
|
|
ba7e711a88 | ||
|
|
10dcf4473c | ||
|
|
4c217b85e9 | ||
|
|
c75bd5208b | ||
|
|
1fe7c050a4 | ||
|
|
c6874acb1b | ||
|
|
ffeef640da | ||
|
|
1f054b796d | ||
|
|
35881e30e0 | ||
|
|
a8e55d230a | ||
|
|
083576ab3f | ||
|
|
0387ac510a | ||
|
|
726ae1f856 | ||
|
|
483d8c3aef | ||
|
|
db42d19f44 | ||
|
|
d822c3c809 | ||
|
|
94719d58cd | ||
|
|
307153801d | ||
|
|
a771189939 | ||
|
|
98c65eab46 | ||
|
|
21a37db1da | ||
|
|
4008816c66 | ||
|
|
925e84528c | ||
|
|
8d6ee03d88 | ||
|
|
8cec0e6ab8 | ||
|
|
ad17d8b743 | ||
|
|
2792d24e98 | ||
|
|
ff92fd8d76 | ||
|
|
93ba1c134f | ||
|
|
dc08d545a2 | ||
|
|
ca3cf71c6d | ||
|
|
96beccad82 | ||
|
|
f63c21b17a | ||
|
|
6b27278e6e | ||
|
|
cd0cd14f77 | ||
|
|
94a9404b39 | ||
|
|
2385bbd912 | ||
|
|
327d911f80 | ||
|
|
83f0f01233 | ||
|
|
877ccc059e | ||
|
|
9313d5a886 | ||
|
|
5fb6986a18 | ||
|
|
eb4a5e4fdc | ||
|
|
59e1aedbf3 | ||
|
|
87980277bf | ||
|
|
30fbe6ca83 | ||
|
|
31d28627f1 | ||
|
|
df9ea021b3 | ||
|
|
a198fc0161 | ||
|
|
64bfe1cdc2 | ||
|
|
6a716fa531 | ||
|
|
05b4f67bd3 | ||
|
|
9130485631 | ||
|
|
ae329419a6 | ||
|
|
66462b9085 | ||
|
|
80d070bb67 | ||
|
|
916dd1a398 | ||
|
|
502c77fb6e | ||
|
|
2f8946f372 | ||
|
|
abc58298a3 | ||
|
|
4809c3839b | ||
|
|
7fbcdafa9b | ||
|
|
b2180ecaf7 | ||
|
|
6351bdb633 | ||
|
|
75bff1edc4 | ||
|
|
f512caa81d | ||
|
|
c3178eb7d0 | ||
|
|
562679b366 | ||
|
|
eee0258061 | ||
|
|
0a248d89d5 | ||
|
|
5062cad2b0 | ||
|
|
07f41f5cb6 | ||
|
|
133febe7a7 | ||
|
|
e74c6d9eda | ||
|
|
0499a9c237 | ||
|
|
fbb24fd07f | ||
|
|
0b62cba3b9 | ||
|
|
0fd4645514 | ||
|
|
0e277a8e6d | ||
|
|
d7da00582a | ||
|
|
953320526e | ||
|
|
726b11eb82 | ||
|
|
ca8d518fae | ||
|
|
3e3c101a1e | ||
|
|
c6417cf197 | ||
|
|
4c0aec2f42 | ||
|
|
7331fcbb17 | ||
|
|
f5faad982c | ||
|
|
48c0dcb69b | ||
|
|
0504592f7d | ||
|
|
9ff4197ec4 | ||
|
|
c835616ad2 | ||
|
|
e5449213c2 | ||
|
|
872a5d1982 | ||
|
|
1246810c01 | ||
|
|
fc393ecd64 | ||
|
|
9b9295ea94 | ||
|
|
c403fce786 | ||
|
|
31349634f6 | ||
|
|
cc1afed902 | ||
|
|
3a76ba2c1f | ||
|
|
da330b80c8 | ||
|
|
1028b8189e | ||
|
|
6988ad8bf0 | ||
|
|
e318fe5be0 | ||
|
|
4166a1ca58 | ||
|
|
35ea8adf7d | ||
|
|
be2280907e | ||
|
|
6100f1e39a | ||
|
|
5368f3c323 | ||
|
|
be1a05e566 | ||
|
|
0a02195ca6 | ||
|
|
6887b6c624 | ||
|
|
f7167912e7 | ||
|
|
14feac43fe | ||
|
|
c9e58f3586 | ||
|
|
e8809bbeb8 | ||
|
|
d8b9d81f70 | ||
|
|
4340b1a5b7 | ||
|
|
950b8a097c | ||
|
|
72ed363ac3 | ||
|
|
e493f26442 | ||
|
|
f973cadd80 | ||
|
|
5143f2b83f | ||
|
|
b728e340a0 | ||
|
|
18bfa0edef | ||
|
|
f87306f6de | ||
|
|
7a080124c6 | ||
|
|
9fbc61f742 | ||
|
|
0575503687 | ||
|
|
346c753670 | ||
|
|
46a93c5524 | ||
|
|
b3d9040c02 | ||
|
|
9b83d20b85 | ||
|
|
8245b0a38d | ||
|
|
59a580ccac | ||
|
|
6b0ba4e5ee | ||
|
|
a8aa73760f | ||
|
|
ebaa75ed15 | ||
|
|
fe6ada46d7 | ||
|
|
338994fb45 | ||
|
|
995b0d65fb | ||
|
|
5ea61a160e | ||
|
|
25176c36fb | ||
|
|
75e302bc12 | ||
|
|
78dc8a5e0b | ||
|
|
3e54f24ddd | ||
|
|
cb14b13c19 | ||
|
|
1e6e7c123c | ||
|
|
edcaa2421b | ||
|
|
20e4662961 | ||
|
|
2f6380da22 | ||
|
|
37b873ecce | ||
|
|
b748f467aa | ||
|
|
10fc7d4dd0 | ||
|
|
e14ecef05a | ||
|
|
c3bd727694 | ||
|
|
510cf963a2 | ||
|
|
081d251594 | ||
|
|
cfe9b07fe8 | ||
|
|
f436d17735 | ||
|
|
d7434f3e4a | ||
|
|
f0914960a4 | ||
|
|
c6e8545a03 | ||
|
|
7d5e1811ab | ||
|
|
3c83cc9f50 | ||
|
|
e1000d324e | ||
|
|
3cb3fd81e7 | ||
|
|
c673ab2b5e | ||
|
|
b61f5e47df | ||
|
|
c71da0b437 | ||
|
|
1b2f6e221e | ||
|
|
974cc504d9 | ||
|
|
31c585bcaf | ||
|
|
0adbde45b9 | ||
|
|
4160ebe004 | ||
|
|
b48acb9691 | ||
|
|
75d4fda92d | ||
|
|
7112f4cd49 | ||
|
|
b3863568d6 | ||
|
|
830cc3e83c | ||
|
|
be611871bc | ||
|
|
73246e1dc6 | ||
|
|
0a11a25ccd | ||
|
|
bb51771898 | ||
|
|
712e3cd2f2 | ||
|
|
532cbc943d | ||
|
|
854a04d7f4 | ||
|
|
d645f4ea6b | ||
|
|
9ef1761c63 | ||
|
|
3cb1edee83 | ||
|
|
e0a7bb86a6 | ||
|
|
84f3eaea10 | ||
|
|
7b2054206a | ||
|
|
dbd3bb6124 | ||
|
|
39fd76ebdc | ||
|
|
e65d84f95f | ||
|
|
a337972f7a | ||
|
|
75ca4de9e1 | ||
|
|
4133badc46 | ||
|
|
f8f205d0e8 | ||
|
|
4d7b4eb2b4 | ||
|
|
31295d7cb2 | ||
|
|
b7dd7f1c3b | ||
|
|
2391f71d9a | ||
|
|
6bc0591418 | ||
|
|
6d94b6fbdc | ||
|
|
ff3f4dd8c0 | ||
|
|
ee5759c86a | ||
|
|
752d967a50 | ||
|
|
5d78241b8e | ||
|
|
f2f2984c3e | ||
|
|
8032f3bda1 | ||
|
|
c326431407 | ||
|
|
d5c96f66ce | ||
|
|
eb5816ff80 | ||
|
|
a1fd5be5c4 | ||
|
|
6475be77bc | ||
|
|
8d76128b5a | ||
|
|
e6d2c51252 | ||
|
|
ea396405df | ||
|
|
5b3c89886e | ||
|
|
b566a2fd4f | ||
|
|
bce709a57a | ||
|
|
8e239a5bbf | ||
|
|
d3576b691c | ||
|
|
3b922839a1 | ||
|
|
9586eedb56 | ||
|
|
d89b984344 | ||
|
|
4a6fd431bc | ||
|
|
597af1a210 | ||
|
|
2b85a5aba1 | ||
|
|
35094a7ac2 | ||
|
|
d57b33cb4e | ||
|
|
c3be931218 | ||
|
|
4735dbd874 | ||
|
|
85bfb48c0c | ||
|
|
861c7f905a | ||
|
|
be42bfcf40 | ||
|
|
0b64122c41 | ||
|
|
d9368b7514 | ||
|
|
c4cc078680 | ||
|
|
b3fda14322 | ||
|
|
336643419e | ||
|
|
99ae898139 | ||
|
|
76d09c0559 | ||
|
|
d16c446070 | ||
|
|
57ff6c8d70 | ||
|
|
0106bc7b75 | ||
|
|
d72ce4109d | ||
|
|
c158874c31 | ||
|
|
0cbcb4d37a | ||
|
|
63e5808a6b | ||
|
|
44da0ec700 | ||
|
|
ab53a1ecc2 | ||
|
|
7711e5ca7b | ||
|
|
f73bdce1a1 | ||
|
|
7de01626b8 | ||
|
|
a59ae41108 | ||
|
|
0837f5d9d9 | ||
|
|
eb2b3a66a0 | ||
|
|
e71ae35b17 | ||
|
|
c9ea7ba898 | ||
|
|
b7a2a681c2 | ||
|
|
99f4634ef7 | ||
|
|
b543ff8278 | ||
|
|
8b3d19625f | ||
|
|
70f0bafd21 | ||
|
|
40bf9781b1 | ||
|
|
e32e2a92cd | ||
|
|
4ef8287802 | ||
|
|
43b4c041e4 | ||
|
|
f97282ad44 | ||
|
|
011bcae11a | ||
|
|
7f5d2b41d5 | ||
|
|
e1c14af914 | ||
|
|
33ec809e73 | ||
|
|
3eee6b35e8 | ||
|
|
837f01e8a1 | ||
|
|
d55d53528e | ||
|
|
65cb7787a6 | ||
|
|
d86b5c609b | ||
|
|
79d5700504 | ||
|
|
7e634d7eb7 | ||
|
|
3b113e2039 | ||
|
|
0f1c7f39a7 | ||
|
|
5f5e24638b | ||
|
|
b9aa8336f9 | ||
|
|
411f36150b | ||
|
|
78bd4021a6 | ||
|
|
8163cc5882 | ||
|
|
6780654aae | ||
|
|
e935d5bcd5 | ||
|
|
0df88e08e4 | ||
|
|
087ffe230d | ||
|
|
f5786e46c3 | ||
|
|
ff85c3f68f | ||
|
|
c9c6b1d690 | ||
|
|
978db4e624 | ||
|
|
7729031efa | ||
|
|
020ddf0588 | ||
|
|
e5dbd18bf3 |
3
.idea/misc.xml
generated
@@ -3,4 +3,7 @@
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="WebPackConfiguration">
|
||||
<option name="mode" value="DISABLED" />
|
||||
</component>
|
||||
</project>
|
||||
253
README.md
@@ -1,110 +1,138 @@
|
||||
## Lilishop B2B2C商城系统
|
||||
## 🔥 Lilishop B2B2C商城系统
|
||||
|
||||
##### 🌹 开源不易,如有帮助请点Star
|
||||
|
||||
|
||||
|
||||
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,进群先看文档后提问)
|
||||
|
||||
##### 交流 qq 1群 961316482(已满)
|
||||
|
||||
##### 交流 qq 2群 875294241
|
||||
|
||||
|
||||
|
||||
##### 商城 公众号/小程序体验,扫描二维码
|
||||
|
||||
##### 官方公众号 & 开源不易,如有帮助请点Star
|
||||

|
||||
|
||||
[](https://gitee.com/beijing_hongye_huicheng/lilishop/stargazers)
|
||||

|
||||
|
||||
|
||||
### 介绍
|
||||
### 🔥 商城介绍
|
||||
**官网**:https://pickmall.cn
|
||||
|
||||
Lilishop 是一款Java开发,基于SpringBoot研发的B2B2C多用户商城,前端使用 Vue、uniapp开发 **系统全端全部代码开源**
|
||||
Lilishop 商城系统 基于SpringBoot 研发,B2B2C多用户商城系统,前端使用 Vue、uniapp开发 **系统全端全部代码开源**
|
||||
|
||||
产品前后端分离、支持分布式部署。
|
||||
业务兼容O2O商城/B2B商城/B2B2C商城/F2B2C商城/S2B2C商城。支持小程序商城、H5商城、APP商城、 PC商城。
|
||||
|
||||
商城展示端包含 PC、H5、微信小程序、APP。
|
||||
|
||||
商城前后端分离、支持分布式部署。
|
||||
|
||||
商城包含 会员模块、**第三方登录模块**、**第三方支付模块**、**楼层装修模块**、订单模块、分销模块、文章模块、系统设置模块、流量分析模块
|
||||
|
||||
系统包含各种中间件、搜索引擎、多级缓存、分布式事务、分布式任务调度等,支持Docker,支持k8s。是一款高性能,支持高并发等商城系统。
|
||||
商城包含各种中间件、搜索引擎、多级缓存、分布式事务、分布式任务调度等,支持Docker,支持k8s。是一款高性能,支持高并发的商城系统。
|
||||
|
||||
开箱即用,简单配置即可部署一套属于您的系统。
|
||||
##### 商城 API/消费者 聚合版
|
||||
api不需要单独部署,只需启动一个jar包就可以正常运转 如有需要,可以点击跳转https://gitee.com/beijing_hongye_huicheng/lilishop-simplify
|
||||
|
||||
### 文档
|
||||
### ☃️ 商城 开发/使用/常见问题 帮助文档
|
||||
|
||||
**产品文档**(需求、架构、使用、部署、开发):https://docs.pickmall.cn
|
||||
https://docs.pickmall.cn
|
||||
|
||||
### 💧 开源商城项目地址(gitee)
|
||||
|
||||
**API(商城所有API)**:https://gitee.com/beijing_hongye_huicheng/lilishop.git
|
||||
|
||||
**UI(商城管理端/商家端/买家PC端)**: https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
|
||||
|
||||
**uniapp(商城移动端,支持小程序/APP/H5)**:https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
|
||||
|
||||
**docker一键部署(商城部署脚本)**:https://gitee.com/beijing_hongye_huicheng/docker.git
|
||||
|
||||
### 💧 开源商城项目地址(github)
|
||||
|
||||
**API(商城所有API)**:https://github.com/hongyehuicheng/lilishop.git
|
||||
|
||||
**UI(商城管理端/商家端/买家PC端)**: https://github.com/hongyehuicheng/lilishop-ui.git
|
||||
|
||||
**uniapp(商城移动端,支持小程序/APP/H5)**:https://github.com/hongyehuicheng/lilishop-uniapp.git
|
||||
|
||||
**docker一键部署(商城部署脚本)**:https://github.com/hongyehuicheng/docker.git
|
||||
|
||||
|
||||
### 项目链接(gitee)
|
||||
☃️ UI 项目下3个文件夹 buyer:买家PC端,seller:商家端,manager:后台管理端
|
||||
|
||||
**Java后台**:https://gitee.com/beijing_hongye_huicheng/lilishop.git
|
||||
|
||||
**Vue后台前端**: https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
|
||||
### 💧 演示地址(手机验证码为 ‘111111’)
|
||||
|
||||
**Uni-app**:https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
|
||||
**商城管理端**:https://admin-b2b2c.pickmall.cn 账号:admin/123456
|
||||
|
||||
**docker一键部署**:https://gitee.com/beijing_hongye_huicheng/docker.git
|
||||
**商城店铺后台**:https://store-b2b2c.pickmall.cn 账号:13011111111/111111
|
||||
|
||||
### 项目链接(github)
|
||||
**商城PC页面**:https://pc-b2b2c.pickmall.cn
|
||||
|
||||
**Java后台**:https://github.com/hongyehuicheng/lilishop.git
|
||||
**商城移动端(请使浏览器手机模式,或者用手机浏览器打开)**:https://m-b2b2c.pickmall.cn
|
||||
|
||||
**Vue后台前端**: https://github.com/hongyehuicheng/lilishop-ui.git
|
||||
|
||||
**Uni-app**:https://github.com/hongyehuicheng/lilishop-uniapp.git
|
||||
|
||||
**docker一键部署**:https://github.com/hongyehuicheng/docker.git
|
||||
|
||||
### 演示地址
|
||||
|
||||
**运营后台**:https://admin-b2b2c.pickmall.cn 账号:admin/123456
|
||||
|
||||
**店铺后台**:https://store-b2b2c.pickmall.cn 账号:13011111111/111111
|
||||
|
||||
**用户前台**:https://pc-b2b2c.pickmall.cn
|
||||
|
||||
**移动端**:https://m-b2b2c.pickmall.cn
|
||||
**小程序/公众号**:扫描二维码
|
||||
|
||||

|
||||
|
||||
### 3行命令搭建本地环境
|
||||
### 🚙 3行命令搭建本地商城(注:只能本机访问,如需调整,请自行操作镜像)
|
||||
|
||||
温馨提示:由于服务较多,如果笔记本环境启动内存没有32g可能无法启动成功(macbookpro 2020 16g内存启动无法成功),台式机在16g内存、AMD 3700x 的ubuntu系统成功运行。
|
||||
温馨提示:由于服务中间件较多,如果笔记本环境启动内存没有32g可能无法启动成功(macbookpro 2020 16g内存启动无法成功),台式机在16g内存、AMD 3700x 的ubuntu系统成功运行。
|
||||
|
||||
##### 下载docker脚本
|
||||
|
||||
|
||||
##### docker环境安装 [点击跳转](https://docs.pickmall.cn/deploy/%E8%BF%90%E8%A1%8C%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87.html)
|
||||
|
||||
|
||||
|
||||
##### 下载docker-compose脚本
|
||||
`git clone https://gitee.com/beijing_hongye_huicheng/docker.git `
|
||||
##### 部署基础环境
|
||||
|
||||
##### 部署商城所需中间件
|
||||
`docker-compose up -d`
|
||||
|
||||
##### 部署应用
|
||||
##### 部署商城应用
|
||||
`docker-compose -f docker-compose-application.yml up -d`
|
||||
|
||||
|
||||
|
||||
PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql
|
||||
PS:商城数据库单独部署 https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql 这里有与tag版本一致的sql,根据tag获取sql,如果使用master代码,则需要在lilishop项目根目录的DB目录中,获取对应的升级sql。
|
||||
|
||||
##### 各个地址
|
||||
##### 商城 API/UI 地址
|
||||
|
||||
| API | 地址 |
|
||||
| -------------- | --------------- |
|
||||
| 买家API | http://127.0.0.1:8888 |
|
||||
| 商家API | http://127.0.0.1:8889 |
|
||||
| 管理端API | http://127.0.0.1:8887 |
|
||||
| 通用API | http://127.0.0.1:8890 |
|
||||
| 商城买家API | http://127.0.0.1:8888 |
|
||||
| 商城商家API | http://127.0.0.1:8889 |
|
||||
| 商城管理端API | http://127.0.0.1:8887 |
|
||||
| 商城基础API | http://127.0.0.1:8890 |
|
||||
|
||||
| 前端演示 | 地址 |
|
||||
| -------------- | --------------- |
|
||||
| PC | http://127.0.0.1:10000 |
|
||||
| WAP | http://127.0.0.1:10001 |
|
||||
| 商家 | http://127.0.0.1:10002 |
|
||||
| 管理端 | http://127.0.0.1:10003 |
|
||||
| 商城PC端 | http://127.0.0.1:10000 |
|
||||
| 商城WAP端 | http://127.0.0.1:10001 |
|
||||
| 商城卖家端 | http://127.0.0.1:10002 |
|
||||
| 商城管理端 | http://127.0.0.1:10003 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### 功能列表
|
||||
### ⚾️ 功能列表
|
||||
|
||||
|
||||
|
||||
#### 平台功能
|
||||
#### 🥎 商城平台功能
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
#### 商家端功能
|
||||
#### 🥎 商城卖家功能
|
||||
|
||||

|
||||
|
||||
@@ -112,30 +140,28 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
|
||||
|
||||
|
||||
### 功能展示
|
||||
### 🧩 商城前端功能展示
|
||||
|
||||
|
||||
|
||||
#### 移动端
|
||||
|
||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="管理端功能展示" style="zoom:50%;" />
|
||||
#### ⚽️ 商城移动端
|
||||
|
||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
#### 管理端
|
||||
#### ⚽️ 商城管理端
|
||||
|
||||

|
||||
|
||||
|
||||
### 技术选型
|
||||
### 商城技术选型
|
||||
|
||||
#### 架构图
|
||||
#### 🥅 架构图
|
||||
|
||||

|
||||
|
||||
##### Java后台
|
||||
##### 🕹 后台技术选型
|
||||
|
||||
| 说明 | 框架 | 说明 | |
|
||||
| -------------- | --------------- | -------------- | ------------- |
|
||||
@@ -149,7 +175,7 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
| 短信 | 阿里云短信 | 认证 | JWT |
|
||||
| 日志处理 | Log4j | 接口规范 | RESTful |
|
||||
|
||||
##### 前端-运营后台、店铺后台
|
||||
##### 🖥 前端-运营后台、店铺后台
|
||||
|
||||
| 说明 | 框架 | 说明 | 框架 |
|
||||
| ---------- | ---------- | ---------- | ------- |
|
||||
@@ -159,119 +185,34 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
| 基础UI库 | iView | UI界面基于 | iView |
|
||||
| 网络请求 | axios | | |
|
||||
|
||||
##### 前端-移动端
|
||||
##### 📱前端-移动端
|
||||
|
||||
| 说明 | 架构 | 说明 | 架构 |
|
||||
| --------- | ------- | -------- | ------- |
|
||||
| 基础UI库 | uViewui | 基础框架 | uni-app |
|
||||
| CSS预处理 | scss | 地图引擎 | amap |
|
||||
|
||||
### 升级计划
|
||||
|
||||
#### 计划每个月发布一个版本,具体时间可能有出入
|
||||
|
||||
时间:2021年6月15日
|
||||
### 🌟 版本升级
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.微信小程序直播
|
||||
2.优惠券活动
|
||||
3.新人赠券
|
||||
4.准确发券
|
||||
5.用户等级
|
||||
6.数据导出
|
||||
7.订单批量
|
||||
8.APP版本升级检测
|
||||
9.积分商城
|
||||
|
||||
功能优化:
|
||||
1.优惠券有效期增加类型:设置领取后*内有效。
|
||||
2.秒杀活动设置为每天开启,需设置秒杀活动开启时间。
|
||||
3.店铺配送模板,配送地区如果选择省份则下方的市级地址不展示。
|
||||
4.店铺配送模板支持,店铺包邮。
|
||||
5.普通商品设置去除卖家承担运费。
|
||||
商城后续会持续版本升级,修复bug,完善功能,覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
|
||||
|
||||
后续会考虑推出微服务商城系统/商城中台等
|
||||
```
|
||||
|
||||
时间:2021年7月15日
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.会员权益
|
||||
2.支持用户升级会员
|
||||
3.供求单
|
||||
4.IM:腾讯云智服
|
||||
5.服务商品
|
||||
6.店铺支持订单核销
|
||||
7.店铺自提点
|
||||
功能优化:
|
||||
1.用户分享商城、关注店铺、邀请新用户可获取积分、经验值。
|
||||
```
|
||||
|
||||
时间:2021年8月16日
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.微淘功能
|
||||
2.店铺移动端
|
||||
3.店铺发货单
|
||||
```
|
||||
|
||||
时间:2021年9月15日
|
||||
|
||||
```
|
||||
新增功能:
|
||||
增加供应商功能
|
||||
```
|
||||
|
||||
### 版本升级
|
||||
|
||||
```
|
||||
后续会持续版本升级,修复bug,完善功能,覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
|
||||
|
||||
后续会考虑推出微服务/中台等 企业级版本
|
||||
```
|
||||
|
||||
### 技术亮点
|
||||
|
||||
|
||||
1.后端框架基于Springboot,构建基于maven,持久层使用MyBatisPlus。使用elasticsearch、redis、mongodb、rocketmq 等各种中间健。都是主流架构,轻松应对各种环境。
|
||||
|
||||
2.支持集群、分布式,支持docker 轻松部署,解决各种复杂场景!
|
||||
|
||||
3.代码模块清晰,主要分为三端api(买家、卖家、管理),各端API互相隔离,自己鉴权,自己操作业务。
|
||||
|
||||
4.使用阿里开源的RocketMQ,基于mq解决各种并发场景,解决事务一致性,解决搞并发延迟场景问题。
|
||||
|
||||
5.项目使用多级缓存,应用不同场景,redis缓存业务数据、mongodb缓存关系型多对多关系问题、nginx缓存高频访问低频修改的页面。
|
||||
|
||||
6.支持各种联合登陆,支持各种客户端的支付问题,灵活配置灵活开启。
|
||||
|
||||
7.内置完善的楼层装修机制,各种拖拉拽,维护跳转页面或外网,即便是一个什么都不懂的运营也可以轻松掌握。
|
||||
|
||||
8.内置阿里短信接口,可以在线申请短信模版。内置阿里oss系统,可以对文件执行各种操作。oss商家端资源相互隔离。
|
||||
|
||||
10.强大的统计报表,统计效果,可以实现各个场景,包含在线人数,历史在线人数,活跃人数等信息。
|
||||
|
||||
11.标准Api接口、提供swagger文档,快速二开。
|
||||
|
||||
12.分布式调度任务中心,解决分布式定时任务多次执行问题。
|
||||
|
||||
13.代码注释完善,快速上手。
|
||||
|
||||
14.非移动端采用IView框架,各种自定义插件、选择器实现。移动端采用uniapp,一次编写,全端使用
|
||||
|
||||
15.已经对接好各种第三方插件,支持各种复杂等联合登陆,联合支付等场景。
|
||||
|
||||
|
||||
### 开源须知
|
||||
### ⚠️ 开源须知
|
||||
1.仅允许用于个人学习研究使用.
|
||||
|
||||
2.禁止将本开源的代码和资源进行任何形式任何名义的出售.
|
||||
|
||||
3.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||
3.软件受国家计算机软件著作权保护(登记号:2021SR0805085)。
|
||||
|
||||
### 交流群
|
||||
4.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||
|
||||
**QQ群**:961316482
|
||||
|
||||
### 🐧 交流群
|
||||
|
||||
##### 官方qq 1群 961316482(已满)
|
||||
##### 官方qq 2群 875294241
|
||||
|
||||
|
||||
1
buyer/.gitignore
vendored
@@ -12,4 +12,3 @@ yarn-error.log*
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
package-lock.json
|
||||
|
||||
5
buyer/.npmrc
Normal file
@@ -0,0 +1,5 @@
|
||||
# 默认依赖包指定淘宝源
|
||||
registry=https://registry.npm.taobao.org/
|
||||
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
|
||||
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
|
||||
electron_mirror=https://npm.taobao.org/mirrors/electron/
|
||||
@@ -1,10 +0,0 @@
|
||||
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||
|
||||
module.exports = {
|
||||
"plugins": {
|
||||
"postcss-import": {},
|
||||
"postcss-url": {},
|
||||
// to target browsers: use "browserslist" field in package.json
|
||||
"autoprefixer": {}
|
||||
}
|
||||
}
|
||||
5
buyer/.yarnrc
Normal file
@@ -0,0 +1,5 @@
|
||||
registry "https://registry.npmmirror.com"
|
||||
sass_binary_site "https://npmmirror.com/mirrors/node-sass"
|
||||
phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
|
||||
electron_mirror "https://npmmirror.com/mirrors/electron"
|
||||
|
||||
@@ -1,25 +1,19 @@
|
||||
### 全局css src/assets/styles
|
||||
# new
|
||||
|
||||
### 工具类 src/plugins
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### 顶部广告页 src/components/advertising
|
||||
|
||||
### 全部商品分类 components/nav
|
||||
|
||||
### 底部导航栏 components/footer
|
||||
|
||||
### 发票模态框 components/invoiceModal
|
||||
|
||||
### 商品详情 pages/GoodsDetail.vue
|
||||
|
||||
#### 商品详情组件 components/goodsDetail
|
||||
|
||||
### 全部商品分类 pages/AllCategories.vue
|
||||
|
||||
### 意见反馈 pages/Feedback.vue
|
||||
|
||||
### 卡片的封装 components/card
|
||||
|
||||
### 购物车 pages/Cart.vue
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
|
||||
5
buyer/babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
'use strict'
|
||||
require('./check-versions')()
|
||||
|
||||
process.env.NODE_ENV = 'production'
|
||||
|
||||
const ora = require('ora')
|
||||
const rm = require('rimraf')
|
||||
const path = require('path')
|
||||
const chalk = require('chalk')
|
||||
const webpack = require('webpack')
|
||||
const config = require('../config')
|
||||
const webpackConfig = require('./webpack.prod.conf')
|
||||
|
||||
const spinner = ora('building for production...')
|
||||
spinner.start()
|
||||
|
||||
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
|
||||
if (err) throw err
|
||||
webpack(webpackConfig, (err, stats) => {
|
||||
spinner.stop()
|
||||
if (err) throw err
|
||||
process.stdout.write(stats.toString({
|
||||
colors: true,
|
||||
modules: false,
|
||||
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
|
||||
chunks: false,
|
||||
chunkModules: false
|
||||
}) + '\n\n')
|
||||
|
||||
if (stats.hasErrors()) {
|
||||
console.log(chalk.red(' Build failed with errors.\n'))
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
console.log(chalk.cyan(' Build complete.\n'))
|
||||
console.log(chalk.yellow(
|
||||
' Tip: built files are meant to be served over an HTTP server.\n' +
|
||||
' Opening index.html over file:// won\'t work.\n'
|
||||
))
|
||||
})
|
||||
})
|
||||
@@ -1,54 +0,0 @@
|
||||
'use strict'
|
||||
const chalk = require('chalk')
|
||||
const semver = require('semver')
|
||||
const packageConfig = require('../package.json')
|
||||
const shell = require('shelljs')
|
||||
|
||||
function exec (cmd) {
|
||||
return require('child_process').execSync(cmd).toString().trim()
|
||||
}
|
||||
|
||||
const versionRequirements = [
|
||||
{
|
||||
name: 'node',
|
||||
currentVersion: semver.clean(process.version),
|
||||
versionRequirement: packageConfig.engines.node
|
||||
}
|
||||
]
|
||||
|
||||
if (shell.which('npm')) {
|
||||
versionRequirements.push({
|
||||
name: 'npm',
|
||||
currentVersion: exec('npm --version'),
|
||||
versionRequirement: packageConfig.engines.npm
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = function () {
|
||||
const warnings = []
|
||||
|
||||
for (let i = 0; i < versionRequirements.length; i++) {
|
||||
const mod = versionRequirements[i]
|
||||
|
||||
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
|
||||
warnings.push(mod.name + ': ' +
|
||||
chalk.red(mod.currentVersion) + ' should be ' +
|
||||
chalk.green(mod.versionRequirement)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (warnings.length) {
|
||||
console.log('')
|
||||
console.log(chalk.yellow('To use this template, you must update following to modules:'))
|
||||
console.log()
|
||||
|
||||
for (let i = 0; i < warnings.length; i++) {
|
||||
const warning = warnings[i]
|
||||
console.log(' ' + warning)
|
||||
}
|
||||
|
||||
console.log()
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const config = require('../config')
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
const packageConfig = require('../package.json')
|
||||
|
||||
exports.assetsPath = function (_path) {
|
||||
const assetsSubDirectory = process.env.NODE_ENV === 'production'
|
||||
? config.build.assetsSubDirectory
|
||||
: config.dev.assetsSubDirectory
|
||||
|
||||
return path.posix.join(assetsSubDirectory, _path)
|
||||
}
|
||||
|
||||
exports.cssLoaders = function (options) {
|
||||
options = options || {}
|
||||
|
||||
const cssLoader = {
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: options.sourceMap
|
||||
}
|
||||
}
|
||||
|
||||
const postcssLoader = {
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
sourceMap: options.sourceMap
|
||||
}
|
||||
}
|
||||
|
||||
// generate loader string to be used with extract text plugin
|
||||
function generateLoaders (loader, loaderOptions) {
|
||||
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
|
||||
|
||||
if (loader) {
|
||||
loaders.push({
|
||||
loader: loader + '-loader',
|
||||
options: Object.assign({}, loaderOptions, {
|
||||
sourceMap: options.sourceMap
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Extract CSS when that option is specified
|
||||
// (which is the case during production build)
|
||||
if (options.extract) {
|
||||
return ExtractTextPlugin.extract({
|
||||
use: loaders,
|
||||
fallback: 'vue-style-loader',
|
||||
publicPath: '../../'
|
||||
})
|
||||
} else {
|
||||
return ['vue-style-loader'].concat(loaders)
|
||||
}
|
||||
}
|
||||
|
||||
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
||||
return {
|
||||
css: generateLoaders(),
|
||||
postcss: generateLoaders(),
|
||||
less: generateLoaders('less' , { javascriptEnabled : true }),
|
||||
sass: generateLoaders('sass', { indentedSyntax: true }),
|
||||
scss: generateLoaders('sass').concat(
|
||||
{
|
||||
loader: 'sass-resources-loader',
|
||||
options: {
|
||||
//你自己的scss全局文件的路径
|
||||
resources: path.resolve(__dirname, '../src/assets/styles/global.scss')
|
||||
}
|
||||
}
|
||||
),
|
||||
stylus: generateLoaders('stylus'),
|
||||
styl: generateLoaders('stylus')
|
||||
}
|
||||
}
|
||||
|
||||
// Generate loaders for standalone style files (outside of .vue)
|
||||
exports.styleLoaders = function (options) {
|
||||
const output = []
|
||||
const loaders = exports.cssLoaders(options)
|
||||
|
||||
for (const extension in loaders) {
|
||||
const loader = loaders[extension]
|
||||
output.push({
|
||||
test: new RegExp('\\.' + extension + '$'),
|
||||
use: loader
|
||||
})
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
exports.createNotifierCallback = () => {
|
||||
const notifier = require('node-notifier')
|
||||
|
||||
return (severity, errors) => {
|
||||
if (severity !== 'error') return
|
||||
|
||||
const error = errors[0]
|
||||
const filename = error.file && error.file.split('!').pop()
|
||||
|
||||
notifier.notify({
|
||||
title: packageConfig.name,
|
||||
message: severity + ': ' + error.name,
|
||||
subtitle: filename || '',
|
||||
icon: path.join(__dirname, 'logo.png')
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
'use strict'
|
||||
const utils = require('./utils')
|
||||
const config = require('../config')
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
const sourceMapEnabled = isProduction
|
||||
? config.build.productionSourceMap
|
||||
: config.dev.cssSourceMap
|
||||
|
||||
module.exports = {
|
||||
loaders: utils.cssLoaders({
|
||||
sourceMap: sourceMapEnabled,
|
||||
extract: isProduction
|
||||
}),
|
||||
cssSourceMap: sourceMapEnabled,
|
||||
cacheBusting: config.dev.cacheBusting,
|
||||
transformToRequire: {
|
||||
video: ['src', 'poster'],
|
||||
source: 'src',
|
||||
img: 'src',
|
||||
image: 'xlink:href'
|
||||
}
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const utils = require('./utils')
|
||||
const config = require('../config')
|
||||
const vueLoaderConfig = require('./vue-loader.conf')
|
||||
|
||||
function resolve (dir) {
|
||||
return path.join(__dirname, '..', dir)
|
||||
}
|
||||
|
||||
const createLintingRule = () => ({
|
||||
test: /\.(js|vue)$/,
|
||||
loader: 'eslint-loader',
|
||||
enforce: 'pre',
|
||||
include: [resolve('src'), resolve('test')],
|
||||
options: {
|
||||
formatter: require('eslint-friendly-formatter'),
|
||||
emitWarning: !config.dev.showEslintErrorsInOverlay
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
context: path.resolve(__dirname, '../'),
|
||||
entry: {
|
||||
app: './src/main.js'
|
||||
},
|
||||
output: {
|
||||
path: config.build.assetsRoot,
|
||||
filename: '[name].js',
|
||||
publicPath: process.env.NODE_ENV === 'production'
|
||||
? config.build.assetsPublicPath
|
||||
: config.dev.assetsPublicPath
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue', '.json'],
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.esm.js',
|
||||
'@': resolve('src'),
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
// ...(config.dev.useEslint ? [createLintingRule()] : []),
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader',
|
||||
options: vueLoaderConfig
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
loaders: ['style', 'css', 'sass']
|
||||
},
|
||||
// {
|
||||
|
||||
// test: /\.less$/,
|
||||
|
||||
// loader: "style-loader!css-loader!less-loader",
|
||||
|
||||
// },
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('img/[name].[hash:7].[ext]')
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('media/[name].[hash:7].[ext]')
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(cur)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('cur/[name].[hash:7].[ext]')
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
node: {
|
||||
// prevent webpack from injecting useless setImmediate polyfill because Vue
|
||||
// source contains it (although only uses it if it's native).
|
||||
setImmediate: false,
|
||||
// prevent webpack from injecting mocks to Node native modules
|
||||
// that does not make sense for the client
|
||||
dgram: 'empty',
|
||||
fs: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
child_process: 'empty'
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
'use strict'
|
||||
const utils = require('./utils')
|
||||
const webpack = require('webpack')
|
||||
const config = require('../config')
|
||||
const merge = require('webpack-merge')
|
||||
const path = require('path')
|
||||
const baseWebpackConfig = require('./webpack.base.conf')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
||||
const portfinder = require('portfinder')
|
||||
|
||||
const HOST = process.env.HOST
|
||||
const PORT = process.env.PORT && Number(process.env.PORT)
|
||||
|
||||
const devWebpackConfig = merge(baseWebpackConfig, {
|
||||
module: {
|
||||
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
|
||||
},
|
||||
// cheap-module-eval-source-map is faster for development
|
||||
devtool: config.dev.devtool,
|
||||
|
||||
// these devServer options should be customized in /config/index.js
|
||||
devServer: {
|
||||
clientLogLevel: 'warning',
|
||||
historyApiFallback: {
|
||||
rewrites: [
|
||||
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
|
||||
],
|
||||
},
|
||||
hot: true,
|
||||
contentBase: false, // since we use CopyWebpackPlugin.
|
||||
compress: true,
|
||||
host: HOST || config.dev.host,
|
||||
port: PORT || config.dev.port,
|
||||
open: config.dev.autoOpenBrowser,
|
||||
overlay: config.dev.errorOverlay
|
||||
? { warnings: false, errors: true }
|
||||
: false,
|
||||
publicPath: config.dev.assetsPublicPath,
|
||||
proxy: config.dev.proxyTable,
|
||||
quiet: true, // necessary for FriendlyErrorsPlugin
|
||||
watchOptions: {
|
||||
poll: config.dev.poll,
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': require('../config/dev.env')
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
// https://github.com/ampedandwired/html-webpack-plugin
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: 'index.html',
|
||||
inject: true
|
||||
}),
|
||||
// copy custom static assets
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.dev.assetsSubDirectory,
|
||||
ignore: ['.*']
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
||||
module.exports = new Promise((resolve, reject) => {
|
||||
portfinder.basePort = process.env.PORT || config.dev.port
|
||||
portfinder.getPort((err, port) => {
|
||||
if (err) {
|
||||
reject(err)
|
||||
} else {
|
||||
// publish the new Port, necessary for e2e tests
|
||||
process.env.PORT = port
|
||||
// add port to devServer config
|
||||
devWebpackConfig.devServer.port = port
|
||||
|
||||
// Add FriendlyErrorsPlugin
|
||||
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
|
||||
compilationSuccessInfo: {
|
||||
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
|
||||
},
|
||||
onErrors: config.dev.notifyOnErrors
|
||||
? utils.createNotifierCallback()
|
||||
: undefined
|
||||
}))
|
||||
|
||||
resolve(devWebpackConfig)
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -1,145 +0,0 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const utils = require('./utils')
|
||||
const webpack = require('webpack')
|
||||
const config = require('../config')
|
||||
const merge = require('webpack-merge')
|
||||
const baseWebpackConfig = require('./webpack.base.conf')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
|
||||
const env = require('../config/prod.env')
|
||||
|
||||
const webpackConfig = merge(baseWebpackConfig, {
|
||||
module: {
|
||||
rules: utils.styleLoaders({
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
extract: false,
|
||||
usePostCSS: true
|
||||
})
|
||||
},
|
||||
devtool: config.build.productionSourceMap ? config.build.devtool : false,
|
||||
output: {
|
||||
path: config.build.assetsRoot,
|
||||
filename: utils.assetsPath('js/[name].[chunkhash].js'),
|
||||
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
|
||||
},
|
||||
plugins: [
|
||||
// http://vuejs.github.io/vue-loader/en/workflow/production.html
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': env
|
||||
}),
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
},
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
parallel: true
|
||||
}),
|
||||
// extract css into its own file
|
||||
new ExtractTextPlugin({
|
||||
filename: utils.assetsPath('css/[name].[contenthash].css'),
|
||||
// Setting the following option to `false` will not extract CSS from codesplit chunks.
|
||||
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
|
||||
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
|
||||
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
|
||||
allChunks: true,
|
||||
}),
|
||||
// Compress extracted CSS. We are using this plugin so that possible
|
||||
// duplicated CSS from different components can be deduped.
|
||||
new OptimizeCSSPlugin({
|
||||
cssProcessorOptions: config.build.productionSourceMap
|
||||
? { safe: true, map: { inline: false } }
|
||||
: { safe: true }
|
||||
}),
|
||||
// generate dist index.html with correct asset hash for caching.
|
||||
// you can customize output by editing /index.html
|
||||
// see https://github.com/ampedandwired/html-webpack-plugin
|
||||
new HtmlWebpackPlugin({
|
||||
filename: config.build.index,
|
||||
template: 'index.html',
|
||||
inject: true,
|
||||
minify: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeAttributeQuotes: true
|
||||
// more options:
|
||||
// https://github.com/kangax/html-minifier#options-quick-reference
|
||||
},
|
||||
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
|
||||
chunksSortMode: 'dependency'
|
||||
}),
|
||||
// keep module.id stable when vendor modules does not change
|
||||
new webpack.HashedModuleIdsPlugin(),
|
||||
// enable scope hoisting
|
||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
// split vendor js into its own file
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'vendor',
|
||||
minChunks (module) {
|
||||
// any required modules inside node_modules are extracted to vendor
|
||||
return (
|
||||
module.resource &&
|
||||
/\.js$/.test(module.resource) &&
|
||||
module.resource.indexOf(
|
||||
path.join(__dirname, '../node_modules')
|
||||
) === 0
|
||||
)
|
||||
}
|
||||
}),
|
||||
// extract webpack runtime and module manifest to its own file in order to
|
||||
// prevent vendor hash from being updated whenever app bundle is updated
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'manifest',
|
||||
minChunks: Infinity
|
||||
}),
|
||||
// This instance extracts shared chunks from code splitted chunks and bundles them
|
||||
// in a separate chunk, similar to the vendor chunk
|
||||
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'app',
|
||||
async: 'vendor-async',
|
||||
children: true,
|
||||
minChunks: 3
|
||||
}),
|
||||
|
||||
// copy custom static assets
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.build.assetsSubDirectory,
|
||||
ignore: ['.*']
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
||||
if (config.build.productionGzip) {
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||
|
||||
webpackConfig.plugins.push(
|
||||
new CompressionWebpackPlugin({
|
||||
asset: '[path].gz[query]',
|
||||
algorithm: 'gzip',
|
||||
test: new RegExp(
|
||||
'\\.(' +
|
||||
config.build.productionGzipExtensions.join('|') +
|
||||
')$'
|
||||
),
|
||||
threshold: 10240,
|
||||
minRatio: 0.8
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
if (config.build.bundleAnalyzerReport) {
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
|
||||
}
|
||||
|
||||
module.exports = webpackConfig
|
||||
@@ -1,8 +0,0 @@
|
||||
'use strict'
|
||||
const merge = require('webpack-merge')
|
||||
const prodEnv = require('./prod.env')
|
||||
|
||||
module.exports = merge(prodEnv, {
|
||||
NODE_ENV: '"development"',
|
||||
BASE_URL:''
|
||||
})
|
||||
@@ -1,84 +0,0 @@
|
||||
'use strict'
|
||||
// Template version: 1.3.1
|
||||
// see http://vuejs-templates.github.io/webpack for documentation.
|
||||
|
||||
const path = require('path')
|
||||
// const api = 'http://www.baidu.com'
|
||||
module.exports = {
|
||||
dev: {
|
||||
|
||||
// Paths
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {
|
||||
// '/api': {
|
||||
// target:api,
|
||||
// changeOrigin:true,
|
||||
// pathRewrite:{
|
||||
// '^/api':''
|
||||
// }
|
||||
// }
|
||||
},
|
||||
|
||||
// Various Dev Server settings
|
||||
host: '0.0.0.0', // can be overwritten by process.env.HOST
|
||||
port: 10000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
autoOpenBrowser: false,
|
||||
errorOverlay: true,
|
||||
notifyOnErrors: true,
|
||||
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
||||
|
||||
// Use Eslint Loader?
|
||||
// If true, your code will be linted during bundling and
|
||||
// linting errors and warnings will be shown in the console.
|
||||
useEslint: false,
|
||||
// If true, eslint errors and warnings will also be shown in the error overlay
|
||||
// in the browser.
|
||||
showEslintErrorsInOverlay: false,
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
*/
|
||||
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
|
||||
// If you have problems debugging vue-files in devtools,
|
||||
// set this to false - it *may* help
|
||||
// https://vue-loader.vuejs.org/en/options.html#cachebusting
|
||||
cacheBusting: true,
|
||||
|
||||
cssSourceMap: true
|
||||
},
|
||||
|
||||
build: {
|
||||
// Template for index.html
|
||||
index: path.resolve(__dirname, '../dist/index.html'),
|
||||
|
||||
// Paths
|
||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
*/
|
||||
|
||||
productionSourceMap: true,
|
||||
// https://webpack.js.org/configuration/devtool/#production
|
||||
devtool: '#source-map',
|
||||
|
||||
// Gzip off by default as many popular static hosts such as
|
||||
// Surge or Netlify already gzip all static assets for you.
|
||||
// Before setting to `true`, make sure to:
|
||||
// npm install --save-dev compression-webpack-plugin
|
||||
productionGzip: false,
|
||||
productionGzipExtensions: ['js', 'css'],
|
||||
|
||||
// Run the build command with an extra argument to
|
||||
// View the bundle analyzer report after build finishes:
|
||||
// `npm run build --report`
|
||||
// Set to `true` or `false` to always turn it on or off
|
||||
bundleAnalyzerReport: process.env.npm_config_report
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
'use strict'
|
||||
module.exports = {
|
||||
NODE_ENV: '"production"',
|
||||
BASE_URL:'http://www.baidu.com'
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-1.0.1:0.0.4 .
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.4.1 .
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="./static/logo.ico" type="image/x-icon">
|
||||
<!-- <script src = 'https://webapi.amap.com/maps?v=2.0&key=b440952723253aa9fe483e698057bf7d'></script> -->
|
||||
<title>LILI</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
9902
buyer/package-lock.json
generated
Normal file
@@ -1,90 +1,42 @@
|
||||
{
|
||||
"name": "lilishop-vue",
|
||||
"name": "lilishop",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
||||
"start": "npm run dev",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"build": "node build/build.js"
|
||||
"dev": "vue-cli-service serve",
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "0.0.7",
|
||||
"axios": "^0.19.2",
|
||||
"js-cookie": "^2.2.1",
|
||||
"less": "^3.12.2",
|
||||
"less": "^2.7.0",
|
||||
"less-loader": "^5.0.0",
|
||||
"mv-count-down": "^0.1.15",
|
||||
"node-sass": "^4.14.1",
|
||||
"psl": "^1.8.0",
|
||||
"qs": "^6.9.4",
|
||||
"swiper": "^6.4.1",
|
||||
"sass-loader": "^7.3.1",
|
||||
"uuid": "^8.3.2",
|
||||
"v-distpicker": "^1.0.17",
|
||||
"view-design": "^4.3.2",
|
||||
"vue": "^2.5.2",
|
||||
"vue-awesome": "^4.0.2",
|
||||
"vue-awesome-swiper": "^4.1.1",
|
||||
"vue": "^2.6.11",
|
||||
"vue-awesome-swiper": "^3.1.3",
|
||||
"vue-piczoom": "^1.0.6",
|
||||
"vue-qr": "^2.3.0",
|
||||
"vue-router": "^3.0.1",
|
||||
"vuex": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^7.1.2",
|
||||
"babel-core": "^6.22.1",
|
||||
"babel-eslint": "^8.2.1",
|
||||
"babel-helper-vue-jsx-merge-props": "^2.0.3",
|
||||
"babel-loader": "^7.1.1",
|
||||
"babel-plugin-syntax-jsx": "^6.18.0",
|
||||
"babel-plugin-transform-runtime": "^6.22.0",
|
||||
"babel-plugin-transform-vue-jsx": "^3.5.0",
|
||||
"babel-preset-env": "^1.3.2",
|
||||
"babel-preset-stage-2": "^6.22.0",
|
||||
"chalk": "^2.0.1",
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
"css-loader": "^0.28.0",
|
||||
"eslint": "^4.15.0",
|
||||
"eslint-config-standard": "^10.2.1",
|
||||
"eslint-friendly-formatter": "^3.0.0",
|
||||
"eslint-loader": "^1.7.1",
|
||||
"eslint-plugin-import": "^2.7.0",
|
||||
"eslint-plugin-node": "^5.2.0",
|
||||
"eslint-plugin-promise": "^3.4.0",
|
||||
"eslint-plugin-standard": "^3.0.1",
|
||||
"eslint-plugin-vue": "^4.0.0",
|
||||
"extract-text-webpack-plugin": "^3.0.0",
|
||||
"file-loader": "^1.1.4",
|
||||
"friendly-errors-webpack-plugin": "^1.6.1",
|
||||
"html-webpack-plugin": "^2.30.1",
|
||||
"node-notifier": "^5.1.2",
|
||||
"node-sass": "^4.14.1",
|
||||
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
||||
"ora": "^1.2.0",
|
||||
"portfinder": "^1.0.13",
|
||||
"postcss-import": "^11.0.0",
|
||||
"postcss-loader": "^2.0.8",
|
||||
"postcss-url": "^7.2.1",
|
||||
"rimraf": "^2.6.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"compression-webpack-plugin": "^5.0.0",
|
||||
"sass-loader": "^7.3.1",
|
||||
"sass-resources-loader": "^2.0.3",
|
||||
"semver": "^5.3.0",
|
||||
"shelljs": "^0.7.6",
|
||||
"uglifyjs-webpack-plugin": "^1.1.1",
|
||||
"url-loader": "^0.5.8",
|
||||
"vue-loader": "^13.3.0",
|
||||
"vue-style-loader": "^3.0.1",
|
||||
"vue-template-compiler": "^2.5.2",
|
||||
"webpack": "^3.6.0",
|
||||
"webpack-bundle-analyzer": "^2.9.0",
|
||||
"webpack-dev-server": "^2.9.1",
|
||||
"webpack-merge": "^4.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0",
|
||||
"npm": ">= 3.0.0"
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 8"
|
||||
"not dead"
|
||||
]
|
||||
}
|
||||
|
||||
17
buyer/public/config.js
Normal file
@@ -0,0 +1,17 @@
|
||||
var BASE = {
|
||||
/**
|
||||
* @description api请求基础路径
|
||||
*/
|
||||
API_DEV: {
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
},
|
||||
API_PROD: {
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
},
|
||||
};
|
||||
25
buyer/public/index.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>logo.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<% for(var css of htmlWebpackPlugin.options.cdn.css) { %>
|
||||
<link rel="stylesheet" href="<%=css%>" />
|
||||
<% } %>
|
||||
</head>
|
||||
<body>
|
||||
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
||||
<script src="<%=js%>"></script>
|
||||
<% } %>
|
||||
<script src="/config.js"></script>
|
||||
<noscript>
|
||||
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
BIN
buyer/public/logo.ico
Normal file
|
After Width: | Height: | Size: 19 KiB |
@@ -5,33 +5,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
import storage from '@/plugins/storage';
|
||||
import {getLogo} from '@/api/common.js';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
mounted () {
|
||||
let uuid = storage.getItem('uuid');
|
||||
if (!uuid) {
|
||||
uuid = uuidv4();
|
||||
storage.setItem('uuid', uuid);
|
||||
}
|
||||
if (!this.Cookies.getItem('logo')) {
|
||||
setTimeout(() => {
|
||||
getLogo().then(res => {
|
||||
if (res.success) {
|
||||
let logoObj = JSON.parse(res.result.settingValue)
|
||||
this.Cookies.setItem('logo', logoObj.buyerSideLogo)
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#app{
|
||||
min-height: 100%;
|
||||
@include background_color($light_background_color);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,7 +11,7 @@ import request, {Method} from '@/plugins/request.js'
|
||||
// 获取密码状态
|
||||
export function getPwdStatus (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/check',
|
||||
url: '/buyer/passport/member/wallet/check',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -21,7 +21,7 @@ export function getPwdStatus (params) {
|
||||
// 设置密码
|
||||
export function setPwd (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/set-password',
|
||||
url: '/buyer/passport/member/wallet/set-password',
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -31,7 +31,7 @@ export function setPwd (params) {
|
||||
// 设置支付密码
|
||||
export function setUpdatePwdOrdinary (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/update-password/ordinary',
|
||||
url: '/buyer/passport/member/wallet/update-password/ordinary',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -41,7 +41,7 @@ export function setUpdatePwdOrdinary (params) {
|
||||
// 修改会员资料
|
||||
export function editMemberInfo (params) {
|
||||
return request({
|
||||
url: '/buyer/members/editOwn',
|
||||
url: '/buyer/passport/member/editOwn',
|
||||
method: Method.PUT,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -51,9 +51,18 @@ export function editMemberInfo (params) {
|
||||
// 修改密码
|
||||
export function editPwd (params) {
|
||||
return request({
|
||||
url: `/buyer/members/modifyPass`,
|
||||
url: `/buyer/passport/member/modifyPass`,
|
||||
method: Method.PUT,
|
||||
needToken: true,
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取密码状态
|
||||
export function logout () {
|
||||
return request({
|
||||
url: '/buyer/passport/member/logout',
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 会员收货地址列表
|
||||
export function memberAddress () {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
url: '/buyer/member/address',
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
@@ -14,7 +14,7 @@ export function memberAddress () {
|
||||
// 添加收货地址
|
||||
export function newMemberAddress (params) {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
url: '/buyer/member/address',
|
||||
needToken: true,
|
||||
method: Method.POST,
|
||||
data: params
|
||||
@@ -24,7 +24,7 @@ export function newMemberAddress (params) {
|
||||
// 编辑收货地址
|
||||
export function editMemberAddress (params) {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
url: '/buyer/member/address',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -34,7 +34,7 @@ export function editMemberAddress (params) {
|
||||
// 删除收货地址
|
||||
export function delMemberAddress (id) {
|
||||
return request({
|
||||
url: `/buyer/memberAddress/delById/${id}`,
|
||||
url: `/buyer/member/address/delById/${id}`,
|
||||
needToken: true,
|
||||
method: Method.DELETE
|
||||
});
|
||||
@@ -43,7 +43,7 @@ export function delMemberAddress (id) {
|
||||
// 根据id获取会员地址详情
|
||||
export function getAddrDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/memberAddress/get/${id}`,
|
||||
url: `/buyer/member/address/get/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
@@ -52,7 +52,7 @@ export function getAddrDetail (id) {
|
||||
// 传给后台citycode 获取城市街道等id
|
||||
export function handleRegion (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/region/region`,
|
||||
url: `${commonUrl}/common/common/region/region`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {Method, commonUrl} from '@/plugins/request.js';
|
||||
*/
|
||||
export function getVerifyImg (verificationEnums) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -15,7 +15,7 @@ export function getVerifyImg (verificationEnums) {
|
||||
*/
|
||||
export function postVerifyImg (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${params.verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -26,14 +26,14 @@ export function postVerifyImg (params) {
|
||||
*/
|
||||
export function sendSms (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/sms/${params.verificationEnums}/${params.mobile}`,
|
||||
url: `${commonUrl}/common/common/sms/${params.verificationEnums}/${params.mobile}`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 发送短信验证码
|
||||
* 获取logo图标
|
||||
*/
|
||||
export function getLogo () {
|
||||
return request({
|
||||
@@ -45,7 +45,7 @@ export function getLogo () {
|
||||
// 地区数据,用于三级联动
|
||||
export function getRegion (id) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/region/item/${id}`,
|
||||
url: `${commonUrl}/common/common/region/item/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
@@ -57,7 +57,7 @@ export function getRegion (id) {
|
||||
*/
|
||||
export function articleList (params) {
|
||||
return request({
|
||||
url: `/buyer/article`,
|
||||
url: `/buyer/other/article`,
|
||||
method: Method.GET,
|
||||
params
|
||||
});
|
||||
@@ -69,7 +69,7 @@ export function articleList (params) {
|
||||
*/
|
||||
export function articleCateList () {
|
||||
return request({
|
||||
url: `/buyer/article/articleCategory/list`,
|
||||
url: `/buyer/other/article/articleCategory/list`,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
@@ -77,7 +77,18 @@ export function articleCateList () {
|
||||
// 通过id获取文章
|
||||
export function articleDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/article/get/${id}`,
|
||||
url: `/buyer/other/article/get/${id}`,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取IM接口前缀
|
||||
export function getIMDetail () {
|
||||
return request({
|
||||
url: `${commonUrl}/common/IM`,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 商品列表
|
||||
export function goodsList (params) {
|
||||
return request({
|
||||
url: '/buyer/goods/es',
|
||||
url: '/buyer/goods/goods/es',
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -15,7 +15,7 @@ export function goodsList (params) {
|
||||
// 商品分类 筛选条件 品牌, 尺寸等
|
||||
export function filterList (params) {
|
||||
return request({
|
||||
url: '/buyer/goods/es/related',
|
||||
url: '/buyer/goods/goods/es/related',
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -25,7 +25,7 @@ export function filterList (params) {
|
||||
// id获取商品详情
|
||||
export function goodsDetail (goodsId) {
|
||||
return request({
|
||||
url: `/buyer/goods/get/${goodsId}`,
|
||||
url: `/buyer/goods/goods/get/${goodsId}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -34,9 +34,9 @@ export function goodsDetail (goodsId) {
|
||||
// id获取商品Sku详情
|
||||
export function goodsSkuDetail (params) {
|
||||
return request({
|
||||
url: `/buyer/goods/sku/${params.goodsId}/${params.skuId}`,
|
||||
url: `/buyer/goods/goods/sku/${params.goodsId}/${params.skuId}`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
needToken: true,
|
||||
params
|
||||
});
|
||||
}
|
||||
@@ -44,7 +44,7 @@ export function goodsSkuDetail (params) {
|
||||
// 获取所有商品分类
|
||||
export function getCategory (parentId) {
|
||||
return request({
|
||||
url: `/buyer/category/get/${parentId}`,
|
||||
url: `/buyer/goods/category/get/${parentId}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -60,12 +60,12 @@ export function pintuanMembers (pintuanId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Number} start 搜索起始下标
|
||||
* @param {Number} end 搜索结束下标
|
||||
* 获取搜索热词
|
||||
* @param {Number} count 获取搜索热词数量
|
||||
*/
|
||||
export function hotWords (params) {
|
||||
return request({
|
||||
url: `/buyer/goods/hot-words`,
|
||||
url: `/buyer/goods/goods/hot-words`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
|
||||
@@ -3,7 +3,7 @@ import request, {Method} from '@/plugins/request.js'
|
||||
// 获取首页楼层装修数据
|
||||
export function indexData (params) {
|
||||
return request({
|
||||
url: '/buyer/pageData/getIndex',
|
||||
url: '/buyer/other/pageData/getIndex',
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -17,7 +17,7 @@ export function indexData (params) {
|
||||
*/
|
||||
export function pageData (params) {
|
||||
return request({
|
||||
url: `/buyer/pageData`,
|
||||
url: `/buyer/other/pageData`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -28,7 +28,7 @@ export function pageData (params) {
|
||||
*/
|
||||
export function handleRefreshToken (token) {
|
||||
return request({
|
||||
url: `/buyer/members/refresh/${token}`,
|
||||
url: `/buyer/passport/member/refresh/${token}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
})
|
||||
|
||||
@@ -6,7 +6,7 @@ import request, {Method, buyerUrl} from '@/plugins/request.js';
|
||||
*/
|
||||
export function regist (params) {
|
||||
return request({
|
||||
url: '/buyer/members/register',
|
||||
url: '/buyer/passport/member/register',
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
data: params
|
||||
@@ -18,7 +18,7 @@ export function regist (params) {
|
||||
*/
|
||||
export function login (params) {
|
||||
return request({
|
||||
url: '/buyer/members/userLogin',
|
||||
url: '/buyer/passport/member/userLogin',
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
data: params,
|
||||
@@ -31,7 +31,7 @@ export function login (params) {
|
||||
*/
|
||||
export function smsLogin (params) {
|
||||
return request({
|
||||
url: '/buyer/members/smsLogin',
|
||||
url: '/buyer/passport/member/smsLogin',
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
data: params,
|
||||
@@ -44,7 +44,7 @@ export function smsLogin (params) {
|
||||
*/
|
||||
export function getMemberMsg (params) {
|
||||
return request({
|
||||
url: '/buyer/members',
|
||||
url: '/buyer/passport/member',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -55,7 +55,7 @@ export function getMemberMsg (params) {
|
||||
* 第三方登录 支付宝,微博,qq,微信
|
||||
*/
|
||||
export function webLogin (type) {
|
||||
window.open(`${buyerUrl}/buyer/connect/login/web/${type}`, 'blank');
|
||||
window.open(`${buyerUrl}/buyer/passport/connect/connect/login/web/${type}`, 'blank');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ export function webLogin (type) {
|
||||
*/
|
||||
export function loginCallback (uuid) {
|
||||
return request({
|
||||
url: `/buyer/connect/result?state=${uuid}`,
|
||||
url: `/buyer/passport/connect/connect/result?state=${uuid}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -74,7 +74,7 @@ export function loginCallback (uuid) {
|
||||
*/
|
||||
export function validateCode (params) {
|
||||
return request({
|
||||
url: `/buyer/members/resetByMobile`,
|
||||
url: `/buyer/passport/member/resetByMobile`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -86,7 +86,7 @@ export function validateCode (params) {
|
||||
*/
|
||||
export function resetPassword (params) {
|
||||
return request({
|
||||
url: `/buyer/members/resetPassword`,
|
||||
url: `/buyer/passport/member/resetPassword`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
|
||||
@@ -3,7 +3,7 @@ import request, {Method} from '@/plugins/request.js';
|
||||
// 查询账户余额
|
||||
export function getMembersWallet () {
|
||||
return request({
|
||||
url: '/buyer/members/wallet',
|
||||
url: '/buyer/passport/member/wallet',
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -22,7 +22,7 @@ export function getDepositLog (params) {
|
||||
// 查询充值记录
|
||||
export function getRecharge (params) {
|
||||
return request({
|
||||
url: '/buyer/member/recharge',
|
||||
url: '/buyer/wallet/recharge',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -52,7 +52,7 @@ export function recharge (params) {
|
||||
// 提现
|
||||
export function withdrawalApply (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/withdrawal',
|
||||
url: '/buyer/passport/member/wallet/withdrawal',
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -99,7 +99,7 @@ export function collectList (params) {
|
||||
// 单个商品评价
|
||||
export function goodsComment (params) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation/${params.goodsId}/goodsEvaluation`,
|
||||
url: `/buyer/member/evaluation/${params.goodsId}/goodsEvaluation`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -109,7 +109,7 @@ export function goodsComment (params) {
|
||||
// 商品各评价类别数量
|
||||
export function goodsCommentNum (goodsId) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation/${goodsId}/evaluationNumber`,
|
||||
url: `/buyer/member/evaluation/${goodsId}/evaluationNumber`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -118,7 +118,7 @@ export function goodsCommentNum (goodsId) {
|
||||
// 添加会员评价
|
||||
export function addEvaluation (params) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation`,
|
||||
url: `/buyer/member/evaluation`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -128,7 +128,7 @@ export function addEvaluation (params) {
|
||||
// 会员评价详情
|
||||
export function evaluationDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation/get/${id}`,
|
||||
url: `/buyer/member/evaluation/get/${id}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -195,7 +195,7 @@ export function receiveCoupon (couponId) {
|
||||
// 获取申请售后列表
|
||||
export function afterSaleList (params) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/page`,
|
||||
url: `/buyer/order/afterSale/page`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -205,7 +205,7 @@ export function afterSaleList (params) {
|
||||
// 获取申请售后页面信息
|
||||
export function afterSaleInfo (sn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/applyAfterSaleInfo/${sn}`,
|
||||
url: `/buyer/order/afterSale/applyAfterSaleInfo/${sn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -214,7 +214,7 @@ export function afterSaleInfo (sn) {
|
||||
// 获取申请售后、投诉原因
|
||||
export function afterSaleReason (serviceType) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/get/afterSaleReason/${serviceType}`,
|
||||
url: `/buyer/order/afterSale/get/afterSaleReason/${serviceType}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -222,7 +222,7 @@ export function afterSaleReason (serviceType) {
|
||||
// 获取申请售后详情
|
||||
export function afterSaleDetail (sn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/get/${sn}`,
|
||||
url: `/buyer/order/afterSale/get/${sn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -230,7 +230,7 @@ export function afterSaleDetail (sn) {
|
||||
// 售后日志
|
||||
export function afterSaleLog (sn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/get/getAfterSaleLog/${sn}`,
|
||||
url: `/buyer/order/afterSale/get/getAfterSaleLog/${sn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -239,7 +239,7 @@ export function afterSaleLog (sn) {
|
||||
// 申请售后
|
||||
export function applyAfterSale (params) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/save/${params.orderItemSn}`,
|
||||
url: `/buyer/order/afterSale/save/${params.orderItemSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -249,7 +249,7 @@ export function applyAfterSale (params) {
|
||||
// 取消售后申请
|
||||
export function cancelAfterSale (afterSaleSn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/cancel/${afterSaleSn}`,
|
||||
url: `/buyer/order/afterSale/cancel/${afterSaleSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
});
|
||||
@@ -258,7 +258,7 @@ export function cancelAfterSale (afterSaleSn) {
|
||||
// 投诉商品
|
||||
export function handleComplain (data) {
|
||||
return request({
|
||||
url: `/buyer/complain`,
|
||||
url: `/buyer/order/complain`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
data
|
||||
@@ -267,7 +267,7 @@ export function handleComplain (data) {
|
||||
// 分页获取我的投诉列表
|
||||
export function complainList (params) {
|
||||
return request({
|
||||
url: `/buyer/complain`,
|
||||
url: `/buyer/order/complain`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -279,7 +279,7 @@ export function complainList (params) {
|
||||
*/
|
||||
export function getComplainDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/complain/${id}`,
|
||||
url: `/buyer/order/complain/${id}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -290,7 +290,7 @@ export function getComplainDetail (id) {
|
||||
*/
|
||||
export function clearComplain (id) {
|
||||
return request({
|
||||
url: `/buyer/complain/status/${id}`,
|
||||
url: `/buyer/order/complain/status/${id}`,
|
||||
method: Method.PUT,
|
||||
needToken: true
|
||||
});
|
||||
@@ -301,7 +301,7 @@ export function clearComplain (id) {
|
||||
*/
|
||||
export function distribution () {
|
||||
return request({
|
||||
url: `/buyer/distribution`,
|
||||
url: `/buyer/distribution/distribution`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -314,7 +314,7 @@ export function distribution () {
|
||||
*/
|
||||
export function applyDistribution (params) {
|
||||
return request({
|
||||
url: `/buyer/distribution`,
|
||||
url: `/buyer/distribution/distribution`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -326,7 +326,7 @@ export function applyDistribution (params) {
|
||||
*/
|
||||
export function getDistOrderList (params) {
|
||||
return request({
|
||||
url: `/buyer/distribution/distributionOrder`,
|
||||
url: `/buyer/distribution/order`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -338,7 +338,7 @@ export function getDistOrderList (params) {
|
||||
*/
|
||||
export function getDistGoodsList (params) {
|
||||
return request({
|
||||
url: `/buyer/distributionGoods`,
|
||||
url: `/buyer/distribution/goods`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -346,14 +346,16 @@ export function getDistGoodsList (params) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择分销商品
|
||||
* 绑定、解绑分销商品
|
||||
* @param distributionGoodsId 分销商品id
|
||||
* @param checked 分销商品id,true为绑定,false为解绑
|
||||
*/
|
||||
export function selectDistGoods (distributionGoodsId) {
|
||||
export function selectDistGoods (params) {
|
||||
return request({
|
||||
url: `/buyer/distributionGoods/checked/${distributionGoodsId}`,
|
||||
url: `/buyer/distribution/goods/checked/${params.distributionGoodsId}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
needToken: true,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
@@ -388,7 +390,7 @@ export function distCash (params) {
|
||||
*/
|
||||
export function tracksList (params) {
|
||||
return request({
|
||||
url: `/buyer/footprint`,
|
||||
url: `/buyer/member/footprint`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -400,7 +402,7 @@ export function tracksList (params) {
|
||||
*/
|
||||
export function clearTracks () {
|
||||
return request({
|
||||
url: `/buyer/footprint`,
|
||||
url: `/buyer/member/footprint`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -412,7 +414,7 @@ export function clearTracks () {
|
||||
*/
|
||||
export function clearTracksById (ids) {
|
||||
return request({
|
||||
url: `/buyer/footprint/delByIds/${ids}`,
|
||||
url: `/buyer/member/footprint/delByIds/${ids}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -441,3 +443,50 @@ export function memberPointHistory (params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 分页获取会员站内信
|
||||
* @param {Object} params 请求参数,包括pageNumber、pageSize、status
|
||||
*/
|
||||
export function memberMsgList (params) {
|
||||
return request({
|
||||
url: `/buyer/message/member`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 设置消息为已读
|
||||
* @param {String} messageId 消息id
|
||||
*/
|
||||
|
||||
export function readMemberMsg (id) {
|
||||
return request({
|
||||
url: `/buyer/message/member/${id}`,
|
||||
method: Method.PUT,
|
||||
needToken: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除会员消息
|
||||
* @param {String} messageId 消息id
|
||||
*/
|
||||
export function delMemberMsg (id) {
|
||||
return request({
|
||||
url: `/buyer/message/member/${id}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定分销
|
||||
* @param distributionId 商品分销ID
|
||||
*/
|
||||
export function getGoodsDistribution (distributionId) {
|
||||
return request({
|
||||
url: `/buyer/distribution/bindingDistribution/${distributionId}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 查询会员订单列表
|
||||
export function getOrderList (params) {
|
||||
return request({
|
||||
url: `/buyer/orders`,
|
||||
url: `/buyer/order/order`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -18,7 +18,7 @@ export function getOrderList (params) {
|
||||
*/
|
||||
export function orderDetail (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/${orderSn}`,
|
||||
url: `/buyer/order/order/${orderSn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -31,7 +31,7 @@ export function orderDetail (orderSn) {
|
||||
*/
|
||||
export function cancelOrder (params) {
|
||||
return request({
|
||||
url: `/buyer/orders/${params.orderSn}/cancel`,
|
||||
url: `/buyer/order/order/${params.orderSn}/cancel`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -44,7 +44,7 @@ export function cancelOrder (params) {
|
||||
*/
|
||||
export function delOrder (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/${orderSn}`,
|
||||
url: `/buyer/order/order/${orderSn}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -56,7 +56,7 @@ export function delOrder (orderSn) {
|
||||
*/
|
||||
export function sureReceived (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/${orderSn}/receiving`,
|
||||
url: `/buyer/order/order/${orderSn}/receiving`,
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
});
|
||||
@@ -68,7 +68,7 @@ export function sureReceived (orderSn) {
|
||||
*/
|
||||
export function getTraces (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/getTraces/${orderSn}`,
|
||||
url: `/buyer/order/order/getTraces/${orderSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
});
|
||||
@@ -80,7 +80,7 @@ export function getTraces (orderSn) {
|
||||
*/
|
||||
export function evolutionList (params) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation`,
|
||||
url: `/buyer/member/evaluation`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -90,9 +90,28 @@ export function evolutionList (params) {
|
||||
// 添加交易投诉对话
|
||||
export function communication (params) {
|
||||
return request({
|
||||
url: `/buyer/complain/communication`,
|
||||
url: `/buyer/order/complain/communication`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 退换货服务 提交物流
|
||||
export function afterSaleDelivery (params) {
|
||||
return request({
|
||||
url: `/buyer/order/afterSale/delivery/${params.afterSaleSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
});
|
||||
}
|
||||
// 获取退货可选物流公司
|
||||
export function getLogisticsCompany () {
|
||||
return request({
|
||||
url: `/buyer/other/logistics`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params: { pageNumber: 1, pageSize: 200, disabled: 'OPEN' }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import request, {
|
||||
*/
|
||||
export function tradeDetail (params) {
|
||||
return request({
|
||||
url: '/buyer/cashier/tradeDetail',
|
||||
url: '/buyer/payment/cashier/tradeDetail',
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
@@ -26,7 +26,7 @@ export function tradeDetail (params) {
|
||||
*/
|
||||
export function pay (params) {
|
||||
return request({
|
||||
url: `/buyer/cashier/pay/${params.paymentMethod}/${params.paymentClient}`,
|
||||
url: `/buyer/payment/cashier/pay/${params.paymentMethod}/${params.paymentClient}`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
@@ -40,7 +40,7 @@ export function pay (params) {
|
||||
*/
|
||||
export function payCallback (params) {
|
||||
return request({
|
||||
url: `/buyer/cashier/result`,
|
||||
url: `/buyer/payment/cashier/result`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
|
||||
@@ -46,3 +46,14 @@ export function pointGoods (params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取积分商品详情
|
||||
*/
|
||||
export function pointGoodsDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/promotion/pointsGoods/${id}`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
id
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 店铺分页列表
|
||||
export function shopList (params) {
|
||||
return request({
|
||||
url: '/buyer/store',
|
||||
url: '/buyer/store/store',
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
@@ -15,7 +15,7 @@ export function shopList (params) {
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applyFirst (params) {
|
||||
return request({
|
||||
url: '/buyer/store/apply/first',
|
||||
url: '/buyer/store/store/apply/first',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -25,7 +25,7 @@ export function applyFirst (params) {
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applySecond (params) {
|
||||
return request({
|
||||
url: '/buyer/store/apply/second',
|
||||
url: '/buyer/store/store/apply/second',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -35,7 +35,7 @@ export function applySecond (params) {
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applyThird (params) {
|
||||
return request({
|
||||
url: '/buyer/store/apply/third',
|
||||
url: '/buyer/store/store/apply/third',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -45,7 +45,7 @@ export function applyThird (params) {
|
||||
// 店铺详情
|
||||
export function getDetailById (id) {
|
||||
return request({
|
||||
url: `/buyer/store/get/detail/${id}`,
|
||||
url: `/buyer/store/store/get/detail/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
@@ -53,7 +53,7 @@ export function getDetailById (id) {
|
||||
// 店铺分类
|
||||
export function getCateById (id) {
|
||||
return request({
|
||||
url: `/buyer/store/label/get/${id}`,
|
||||
url: `/buyer/store/store/label/get/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
@@ -61,7 +61,7 @@ export function getCateById (id) {
|
||||
// 店铺入驻协议
|
||||
export function agreement () {
|
||||
return request({
|
||||
url: `/buyer/article/get/1349291301250293760`,
|
||||
url: `/buyer/other/article/type/STORE_REGISTER`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
@@ -70,7 +70,7 @@ export function agreement () {
|
||||
// 获取当前登录会员的店铺信息
|
||||
export function applyStatus () {
|
||||
return request({
|
||||
url: `/buyer/store/apply`,
|
||||
url: `/buyer/store/store/apply`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
|
||||
@@ -11,4 +11,6 @@
|
||||
<glyph unicode="" glyph-name="next" horiz-adv-x="1025" d="M1024.951 448c0 2.706-1.097 5.193-1.536 7.826-0.585 3.145-0.658 6.363-1.902 9.362l-0.146 0.366c-1.682 3.95-4.389 7.314-7.022 10.606-1.024 1.317-1.463 2.926-2.706 4.096 0 0-0.146 0-0.146 0.146l-241.591 240.274c-8.15 7.642-19.145 12.336-31.236 12.336-25.247 0-45.714-20.467-45.714-45.714 0-12.218 4.793-23.317 12.602-31.518l-0.018 0.019 162.889-162.085h-821.76c-25.247 0-45.714-20.467-45.714-45.714s20.467-45.714 45.714-45.714h821.76l-162.889-162.085c-8.921-8.364-14.479-20.222-14.479-33.379 0-25.247 20.467-45.714 45.714-45.714 13.029 0 24.785 5.451 33.112 14.196l0.018 0.019 241.737 240.421c1.17 1.243 1.682 2.779 2.706 4.096 2.633 3.291 5.339 6.583 7.022 10.606l0.146 0.366c1.243 2.926 1.317 6.217 1.902 9.362 0.439 2.633 1.463 5.12 1.463 7.753v0.073c0 0.073 0 0 0 0z" />
|
||||
<glyph unicode="" glyph-name="qq" d="M512 929.009c-265.653 0-480.989-215.345-480.989-481.012 0-265.662 215.335-481.006 480.989-481.006s480.989 215.345 480.989 481.006c-0.001 265.668-215.335 481.012-480.989 481.012v0zM776.822 298.086c-12.422-11.596-33.749 1.033-54.249 29.4-8.901-24.019-20.497-46.171-33.956-66.051 28.987-10.353 47.626-26.505 47.626-44.726 0-31.473-55.699-56.942-124.443-56.942-40.79 0-76.819 8.899-99.593 22.777-22.565-13.877-58.799-22.777-99.59-22.777-68.745 0-124.443 25.469-124.443 56.942 0 18.014 18.637 34.373 47.626 44.726-13.666 19.877-25.056 42.033-33.959 66.051-20.496-28.156-41.822-40.997-54.249-29.4-16.978 15.94-10.555 72.263 14.702 125.688 5.799 12.215 12.010 23.188 18.428 32.716 3.518 155.297 105.805 279.947 231.281 279.947h0.413c125.475 0 227.762-124.443 231.281-279.947 6.417-9.527 12.634-20.501 18.427-32.716 25.055-53.425 31.684-109.748 14.701-125.688v0z" />
|
||||
<glyph unicode="" glyph-name="wechat" d="M579.6 448.4c-11.7 0-23.4-10.8-23.4-24.2 0-10.8 11.7-21.7 23.4-21.7 17.5 0 30 10.8 30 21.7 0 13.4-12.5 24.2-30 24.2zM502.8 561c18.4 0 30 11.7 30 29.2 0 18.4-11.7 29.2-30 29.2-17.5 0-34.2-10.8-34.2-29.2 0-17.5 16.7-29.2 34.2-29.2zM512 960c-282.8 0-512-229.2-512-512s229.2-512 512-512 512 229.2 512 512-229.2 512-512 512zM415.2 318.3c-30.9 0-53.4 5-82.6 13.3l-84.3-42.5 24.2 71.7c-59.2 41.7-94.3 94.3-94.3 158.5 0 113.5 106.8 200.2 236.9 200.2 115.1 0 217.7-68.4 237.7-165.2-8.3 1.7-15.9 2.5-22.5 2.5-113.5 0-201-85.1-201-187.7 0-17.5 2.5-33.4 6.7-50.1-6.6-0.7-14.1-0.7-20.8-0.7zM763.1 236.5l16.7-60.1-63.4 35.9c-24.2-5-47.5-12.5-71.7-12.5-111.8 0-200.2 76.7-200.2 171.8s88.4 171.8 200.2 171.8c105.9 0 201-76.7 201-171.8 0-53.3-35.9-100.9-82.6-135.1zM337.7 619.4c-17.5 0-35.9-10.8-35.9-29.2 0-17.5 18.4-29.2 35.9-29.2 16.7 0 30 11.7 30 29.2 0 18.4-13.4 29.2-30 29.2zM710.5 448.4c-12.5 0-23.4-10.8-23.4-24.2 0-10.8 10.8-21.7 23.4-21.7 16.7 0 29.2 10.8 29.2 21.7 0 13.4-12.5 24.2-29.2 24.2z" />
|
||||
<glyph unicode="" glyph-name="qrcode" d="M445.077 845.495h-290.715c-20.056 0-36.327-16.27-36.327-36.327v-290.715c0-20.056 16.27-36.327 36.327-36.327h290.715c20.056 0 36.327 16.27 36.327 36.327v290.613c0 20.056-16.27 36.429-36.327 36.429zM449.784 518.351c0-2.558-2.149-4.707-4.707-4.707h-290.715c-2.558 0-4.707 2.149-4.707 4.707v290.715c0 2.558 2.149 4.707 4.707 4.707h290.715c2.558 0 4.707-2.149 4.707-4.707v-290.715zM350.219 737.231h-101.1c-12.689 0-22.922-10.335-22.922-22.922v-101.1c0-12.689 10.335-22.922 22.922-22.922h101.1c12.689 0 22.922 10.335 22.922 22.922v101.1c0.102 12.586-10.233 22.922-22.922 22.922zM341.521 621.907h-83.705v83.705h83.705v-83.705zM350.219 306.122h-101.1c-12.689 0-22.922-10.335-22.922-22.922v-101.1c0-12.689 10.335-22.922 22.922-22.922h101.1c12.689 0 22.922 10.335 22.922 22.922v101.1c0.102 12.689-10.233 22.922-22.922 22.922zM341.521 190.798h-83.705v83.705h83.705v-83.705zM673.474 590.288h101.1c12.689 0 22.922 10.335 22.922 22.922v101.1c0 12.689-10.335 22.922-22.922 22.922h-101.1c-12.689 0-22.922-10.335-22.922-22.922v-101.1c0-12.689 10.233-22.922 22.922-22.922zM682.172 705.612h83.705v-83.705h-83.705v83.705zM445.077 417.148h-290.715c-20.056 0-36.327-16.27-36.327-36.327v-290.715c0-20.056 16.27-36.327 36.327-36.327h290.715c20.056 0 36.327 16.27 36.327 36.327v290.715c0 20.056-16.27 36.327-36.327 36.327zM449.784 90.107c0-2.558-2.149-4.707-4.707-4.707h-290.715c-2.558 0-4.707 2.149-4.707 4.707v290.715c0 2.558 2.149 4.707 4.707 4.707h290.715c2.558 0 4.707-2.149 4.707-4.707v-290.715zM580.458 416.022c-20.056 0-36.327-16.27-36.327-36.327v-167.205c0-8.698 7.061-15.861 15.861-15.861 8.698 0 15.861 7.061 15.861 15.861v167.102c0 2.558 2.149 4.707 4.707 4.707h176.005c8.698 0 15.861 7.061 15.861 15.861s-7.061 15.861-15.861 15.861h-176.107zM578.616 482.024h290.715c20.056 0 36.327 16.27 36.327 36.327v290.715c0 20.056-16.27 36.327-36.327 36.327h-290.715c-20.056 0-36.327-16.27-36.327-36.327v-290.715c0-19.954 16.373-36.327 36.327-36.327zM574.011 809.066c0 2.558 2.149 4.707 4.707 4.707h290.715c2.558 0 4.707-2.149 4.707-4.707v-290.715c0-2.558-2.149-4.707-4.707-4.707h-290.817c-2.558 0-4.707 2.149-4.707 4.707v290.715h0.102zM905.964 400.161c0 8.698-7.061 15.861-15.861 15.861h-58.020c-8.698 0-15.861-7.061-15.861-15.861s7.061-15.861 15.861-15.861h42.159v-60.988h-131.492c-8.698 0-15.861-7.061-15.861-15.861 0-8.698 7.061-15.861 15.861-15.861h147.353c8.698 0 15.861 7.061 15.861 15.861v92.71zM614.226 84.888h-38.475v44.104c0 8.698-7.061 15.861-15.861 15.861s-15.861-7.061-15.861-15.861v-59.862c0-8.698 7.061-15.861 15.861-15.861h54.336c8.698 0 15.861 7.061 15.861 15.861 0 8.698-7.061 15.759-15.861 15.759zM789.412 207.579c0 8.698-7.061 15.861-15.861 15.861h-99.975c-8.698 0-15.861-7.061-15.861-15.861v-140.088c0-8.698 7.061-15.861 15.861-15.861s15.861 7.061 15.861 15.861v124.227h84.114c8.8 0 15.861 7.061 15.861 15.861zM890.001 265.088c-8.698 0-15.861-7.061-15.861-15.861v-166.898h-143.26c-8.698 0-15.861-7.061-15.861-15.861 0-8.698 7.061-15.861 15.861-15.861h159.018c8.698 0 15.861 7.061 15.861 15.861v182.758c0 8.8-7.061 15.861-15.759 15.861zM636.431 350.839c-8.698 0-15.861-7.061-15.861-15.861v-51.471c0-8.698 7.061-15.861 15.861-15.861 8.698 0 15.861 7.061 15.861 15.861v51.471c0 8.8-7.163 15.861-15.861 15.861z" />
|
||||
<glyph unicode="" glyph-name="uniE905" horiz-adv-x="1055" d="M745.891 349.28c0-26.168 21.214-47.382 47.382-47.382s47.382 21.214 47.382 47.382c0 26.168-21.214 47.382-47.382 47.382v0c-26.168 0-47.382-21.214-47.382-47.382v0zM759.195 244.935c-44.978 0.149-81.399 36.571-81.548 81.534v52.143c0.149 44.978 36.571 81.399 81.534 81.548h296.231v168.518c-0.149 44.978-36.571 81.399-81.534 81.548h-892.329c-44.978-0.149-81.399-36.571-81.548-81.534v-611.144c0.149-44.978 36.571-81.399 81.534-81.548h892.329c44.978 0.149 81.399 36.571 81.548 81.534v227.4zM905.15 762.004l-86.061 155.918c-14.23 25.257-40.876 42.035-71.44 42.035-14.412 0-27.953-3.731-39.71-10.279l0.416 0.213-339.907-187.887z" />
|
||||
</font></defs></svg>
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 8.0 KiB |
@@ -1,10 +1,10 @@
|
||||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src: url('icomoon.eot?4ejtdc');
|
||||
src: url('icomoon.eot?4ejtdc#iefix') format('embedded-opentype'),
|
||||
url('icomoon.ttf?4ejtdc') format('truetype'),
|
||||
url('icomoon.woff?4ejtdc') format('woff'),
|
||||
url('icomoon.svg?4ejtdc#icomoon') format('svg');
|
||||
src: url('icomoon.eot?jvagvf');
|
||||
src: url('icomoon.eot?jvagvf#iefix') format('embedded-opentype'),
|
||||
url('icomoon.ttf?jvagvf') format('truetype'),
|
||||
url('icomoon.woff?jvagvf') format('woff'),
|
||||
url('icomoon.svg?jvagvf#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
@@ -25,6 +25,14 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-wallet:before {
|
||||
content: "\e905";
|
||||
color: #3c56c6;
|
||||
}
|
||||
.icon-qrcode:before {
|
||||
content: "\e904";
|
||||
color: #999;
|
||||
}
|
||||
.icon-customer-service:before {
|
||||
content: "\e900";
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 126 KiB |
BIN
buyer/src/assets/images/decorate.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 131 KiB |
BIN
buyer/src/assets/images/jinghui.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 302 KiB |
BIN
buyer/src/assets/images/logo2.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
buyer/src/assets/images/zhizhao.jpg
Normal file
|
After Width: | Height: | Size: 374 KiB |
@@ -1,92 +1,91 @@
|
||||
|
||||
// coupon
|
||||
.coupon-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.coupon-item {
|
||||
width: 380px;
|
||||
height: 145px;
|
||||
margin-bottom: 20px;
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
.c-left {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
>div, > p {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
>div {
|
||||
.price{
|
||||
color: $theme_color;
|
||||
font-size: 20px;
|
||||
}
|
||||
.describe{
|
||||
background-color: #fff4ec;
|
||||
color: $theme_color;
|
||||
padding: 0 5px;
|
||||
margin-left: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
p:nth-of-type(1){
|
||||
font-weight: bold;
|
||||
}
|
||||
p:nth-of-type(2){
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
b{
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 0;
|
||||
right: 50px;
|
||||
display: block;
|
||||
width: 3px;
|
||||
height: 100%;
|
||||
}
|
||||
.c-right {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 52px;
|
||||
height: 100%;
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
padding: 20px;
|
||||
&:hover{
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
i{
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
right: 42px;
|
||||
width: 380px;
|
||||
height: 145px;
|
||||
margin-bottom: 20px;
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
background-color: #fff;
|
||||
border-radius: 20px;
|
||||
&:after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 20px;
|
||||
left: -2px;
|
||||
background-color: #fff;
|
||||
|
||||
.c-left {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
> div,
|
||||
> p {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
> div {
|
||||
.price {
|
||||
color: $theme_color;
|
||||
font-size: 20px;
|
||||
}
|
||||
.describe {
|
||||
background-color: #fff4ec;
|
||||
color: $theme_color;
|
||||
padding: 0 5px;
|
||||
margin-left: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
p:nth-of-type(1) {
|
||||
font-weight: bold;
|
||||
}
|
||||
p:nth-of-type(2) {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
i.circle-top{
|
||||
top: -10px;
|
||||
&::after{
|
||||
top: -11px;
|
||||
b {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 0;
|
||||
right: 50px;
|
||||
display: block;
|
||||
width: 3px;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
i.circle-bottom{
|
||||
bottom: -10px;
|
||||
&::after{
|
||||
bottom: -11px;
|
||||
.c-right {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 52px;
|
||||
height: 100%;
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
i {
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
right: 42px;
|
||||
border: 1px solid #eee;
|
||||
background-color: #fff;
|
||||
border-radius: 20px;
|
||||
&:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 20px;
|
||||
left: -2px;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
i.circle-top {
|
||||
top: -10px;
|
||||
&::after {
|
||||
top: -11px;
|
||||
}
|
||||
}
|
||||
i.circle-bottom {
|
||||
bottom: -10px;
|
||||
&::after {
|
||||
bottom: -11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,112 @@
|
||||
/*
|
||||
* @Author: LMR
|
||||
* @Date: 2020-08-11 10:12:34
|
||||
* @Last Modified by: LMR
|
||||
* @Last Modified time: 2020-08-18 16:00:10
|
||||
*/
|
||||
|
||||
//引入主题色
|
||||
@import "./theme.scss";
|
||||
|
||||
.global_color{
|
||||
color: $theme_color;
|
||||
|
||||
// 明亮主题颜色
|
||||
$primary_color: #2d8cf0;
|
||||
$primary_light_color: #0f1011;
|
||||
$primary_dark_color: #2b85e4;
|
||||
$success_color: #19be6b;
|
||||
$warning_color: #ff9900;
|
||||
$error_color: #ed3f14;
|
||||
$handle-btn-color: #438cde;
|
||||
|
||||
$theme_color: #e4393c;
|
||||
|
||||
$border_color: #dddee1;
|
||||
$title_color: #8c8c8c;
|
||||
$light_title_color: #1c2438;
|
||||
$light_content_color: #495060;
|
||||
$light_sub_color: #80848f;
|
||||
$light_background_color: #f8f8f9;
|
||||
$light_white_background_color: #fff;
|
||||
// 暗黑主题颜色
|
||||
$dark_background_color: #141414;
|
||||
$dark_sub_background_color: #1d1d1d; //稍微浅一点的
|
||||
$dark_content_color: #d5d5d5;
|
||||
|
||||
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
|
||||
|
||||
// 背景颜色
|
||||
@mixin background_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
background-color: $color;
|
||||
transition: 0.35s;
|
||||
[data-theme="dark"] & {
|
||||
background-color: $dark_background_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
background-color: $light_background_color;
|
||||
}
|
||||
}
|
||||
.global_background_color{
|
||||
background-color: $theme_color;
|
||||
// 辅助背景颜色
|
||||
@mixin sub_background_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
background-color: $color;
|
||||
transition: 0.35s;
|
||||
[data-theme="dark"] & {
|
||||
background-color: $dark_sub_background_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
background-color: $light_background_color;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin white_background_color() {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
background-color: $light_white_background_color;
|
||||
transition: 0.35s;
|
||||
[data-theme="dark"] & {
|
||||
background-color: $dark_sub_background_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
background-color: $light_white_background_color;
|
||||
}
|
||||
}
|
||||
|
||||
// 正文颜色
|
||||
@mixin content_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
color: $color;
|
||||
[data-theme="dark"] & {
|
||||
color: $dark_content_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
color: $light_content_color;
|
||||
}
|
||||
}
|
||||
|
||||
// 辅助颜色
|
||||
@mixin sub_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
color: $color;
|
||||
[data-theme="dark"] & {
|
||||
color: $dark_content_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
color: $light_sub_color;
|
||||
}
|
||||
}
|
||||
|
||||
// 标题颜色
|
||||
@mixin title_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
color: $color;
|
||||
[data-theme="dark"] & {
|
||||
color: $dark_content_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
color: $light_title_color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 全局变量
|
||||
.global_color {
|
||||
color: $theme_color;
|
||||
}
|
||||
.global_background_color {
|
||||
background-color: $theme_color;
|
||||
}
|
||||
.global_text_left {
|
||||
text-align: left;
|
||||
@@ -26,44 +120,96 @@
|
||||
.global_float_right {
|
||||
float: right;
|
||||
}
|
||||
.clearfix::after{
|
||||
content: '';
|
||||
.clearfix::after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.width_1200{width: 1200px;}
|
||||
.width_800{width: 800px;}
|
||||
.width_400{width: 400px;}
|
||||
.width_300{width: 300px;}
|
||||
.width_200{width: 200px;}
|
||||
.width_100{width: 100px;}
|
||||
.width_1200 {
|
||||
width: 1200px;
|
||||
}
|
||||
.width_800 {
|
||||
width: 800px;
|
||||
}
|
||||
.width_400 {
|
||||
width: 400px;
|
||||
}
|
||||
.width_300 {
|
||||
width: 300px;
|
||||
}
|
||||
.width_200 {
|
||||
width: 200px;
|
||||
}
|
||||
.width_100 {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.fontsize_12{font-size: 12px;}
|
||||
.fontsize_14{font-size: 14px;}
|
||||
.fontsize_16{font-size: 16px;}
|
||||
.fontsize_18{font-size: 18px;}
|
||||
.fontsize_12 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.fontsize_14 {
|
||||
font-size: 14px;
|
||||
}
|
||||
.fontsize_16 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.fontsize_18 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.mb_20{margin-bottom: 20px;}
|
||||
.mt_20{margin-top: 20px;}
|
||||
.ml_20{margin-left: 20px;}
|
||||
.mr_20{margin-right: 20px;}
|
||||
.mb_20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.mt_20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.ml_20 {
|
||||
margin-left: 20px;
|
||||
}
|
||||
.mr_20 {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.mb_10{margin-bottom: 10px;}
|
||||
.mt_10{margin-top: 10px;}
|
||||
.ml_10{margin-left: 10px;}
|
||||
.mr_10{margin-right: 10px;}
|
||||
.mb_10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.mt_10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.ml_10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.mr_10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.pb_20{padding-bottom: 20px;}
|
||||
.pt_20{padding-top: 20px;}
|
||||
.pl_20{padding-left: 20px;}
|
||||
.pr_20{padding-right: 20px;}
|
||||
.pb_20 {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.pt_20 {
|
||||
padding-top: 20px;
|
||||
}
|
||||
.pl_20 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
.pr_20 {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.pb_10{padding-bottom: 10px;}
|
||||
.pt_10{padding-top: 10px;}
|
||||
.pl_10{padding-left: 10px;}
|
||||
.pr_10{padding-right: 10px;}
|
||||
.pb_10 {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.pt_10 {
|
||||
padding-top: 10px;
|
||||
}
|
||||
.pl_10 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.pr_10 {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.color999{
|
||||
.color999 {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
@@ -71,55 +217,123 @@ html,
|
||||
body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial,
|
||||
sans-serif;
|
||||
// overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
li{
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
.hover-color:hover{
|
||||
color: $theme_color!important;
|
||||
.hover-color:hover {
|
||||
color: $theme_color !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
.hover-pointer{
|
||||
.hover-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.center{
|
||||
.center {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.relative{
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
.ellipsis{
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.promotion-decorate{
|
||||
.promotion-decorate {
|
||||
width: 200px;
|
||||
text-align: center;
|
||||
font-size: 25px;
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
margin: 30px auto 30px;
|
||||
&::before,&::after{
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 25px;
|
||||
height: 20px;
|
||||
background-size: 50px 20px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 0;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: -3px;
|
||||
&::before,
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 25px;
|
||||
height: 20px;
|
||||
background-size: 50px 20px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 0;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: -3px;
|
||||
}
|
||||
&::after{
|
||||
background-position: -24px 0;
|
||||
right: -3px;
|
||||
left: auto;
|
||||
&::after {
|
||||
background-position: -24px 0;
|
||||
right: -3px;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// goodsList
|
||||
|
||||
.text-danger {
|
||||
color: $theme_color;
|
||||
}
|
||||
.seckill-price{
|
||||
margin-right: 5px;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.goods-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.goods-show-info {
|
||||
width: 235px;
|
||||
padding: 6px;
|
||||
margin: 10px 0px;
|
||||
margin-left: 5px;
|
||||
position: relative;
|
||||
border: 1px solid #fff;
|
||||
cursor: pointer;
|
||||
background-color: #fff;
|
||||
}
|
||||
.goods-show-info:hover {
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 0px 0px 15px #ccc;
|
||||
}
|
||||
.goods-show-price {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.goods-show-detail {
|
||||
font-size: 12px;
|
||||
margin: 6px 0px;
|
||||
}
|
||||
.goods-show-num {
|
||||
font-size: 12px;
|
||||
margin-bottom: 6px;
|
||||
color: #666;
|
||||
}
|
||||
.goods-show-num {
|
||||
font-size: 12px;
|
||||
margin-bottom: 6px;
|
||||
color: #009688;
|
||||
}
|
||||
.goods-show-num span {
|
||||
color: #005aa0;
|
||||
font-weight: bold;
|
||||
}
|
||||
.goods-show-seller {
|
||||
font-size: 12px;
|
||||
color: $theme_color;
|
||||
}
|
||||
.goods-page {
|
||||
margin:10px auto ;
|
||||
text-align: right;
|
||||
width: 1200px;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,18 @@
|
||||
margin-top: 6px;
|
||||
}
|
||||
.goods-show-detail {
|
||||
height: 36px;
|
||||
font-size: 12px;
|
||||
margin: 6px 0px;
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
display:-webkit-box;
|
||||
-webkit-line-clamp:2;
|
||||
-webkit-box-orient:vertical;
|
||||
color:#808080;
|
||||
}
|
||||
.goods-show-detail :hover{
|
||||
color:#E23A3A;
|
||||
}
|
||||
.goods-show-num {
|
||||
font-size: 12px;
|
||||
|
||||
@@ -1,84 +1,19 @@
|
||||
@import '~view-design/src/styles/index.less';
|
||||
@import "~view-design/src/styles/index.less";
|
||||
// iview 自定义样式
|
||||
|
||||
@primary-color: #ed3f14;
|
||||
@primary-color: #ff5c58;
|
||||
@info-color: #fa6419;
|
||||
@success-color: #68cabe;
|
||||
@error-color: #ff3c2a;
|
||||
@table-thead-bg: #f8f8f9;
|
||||
@table-td-stripe-bg: #f8f8f9;
|
||||
@table-td-hover-bg: #ededed;
|
||||
@table-td-highlight-bg: #ededed;
|
||||
@font-size-base: 12px;
|
||||
|
||||
.ivu-drawer,
|
||||
.drawer,
|
||||
.ivu-drawer-wrap {
|
||||
z-index: 2600 !important;
|
||||
}
|
||||
|
||||
@table-thead-bg : #f8f8f9;
|
||||
@table-td-stripe-bg : #f8f8f9;
|
||||
@table-td-hover-bg : #ededed;
|
||||
@table-td-highlight-bg : #ededed;
|
||||
|
||||
|
||||
|
||||
//
|
||||
//.colorPaletteMixin() {
|
||||
// @functions: ~`(function() {
|
||||
// var hueStep = 2;
|
||||
// var saturationStep = 0.16;
|
||||
// var saturationStep2 = 0.05;
|
||||
// var brightnessStep1 = 0.05;
|
||||
// var brightnessStep2 = 0.15;
|
||||
// var lightColorCount = 5;
|
||||
// var darkColorCount = 4;
|
||||
//
|
||||
// var getHue = function(hsv, i, isLight) {
|
||||
// var hue;
|
||||
// if (hsv.h >= 60 && hsv.h <= 240) {
|
||||
// hue = isLight ? hsv.h - hueStep * i : hsv.h + hueStep * i;
|
||||
// } else {
|
||||
// hue = isLight ? hsv.h + hueStep * i : hsv.h - hueStep * i;
|
||||
// }
|
||||
// if (hue < 0) {
|
||||
// hue += 360;
|
||||
// } else if (hue >= 360) {
|
||||
// hue -= 360;
|
||||
// }
|
||||
// return Math.round(hue);
|
||||
// };
|
||||
// var getSaturation = function(hsv, i, isLight) {
|
||||
// var saturation;
|
||||
// if (isLight) {
|
||||
// saturation = hsv.s - saturationStep * i;
|
||||
// } else if (i === darkColorCount) {
|
||||
// saturation = hsv.s + saturationStep;
|
||||
// } else {
|
||||
// saturation = hsv.s + saturationStep2 * i;
|
||||
// }
|
||||
// if (saturation > 1) {
|
||||
// saturation = 1;
|
||||
// }
|
||||
// if (isLight && i === lightColorCount && saturation > 0.1) {
|
||||
// saturation = 0.1;
|
||||
// }
|
||||
// if (saturation < 0.06) {
|
||||
// saturation = 0.06;
|
||||
// }
|
||||
// return Number(saturation.toFixed(2));
|
||||
// };
|
||||
// var getValue = function(hsv, i, isLight) {
|
||||
// var value;
|
||||
// if (isLight) {
|
||||
// value = hsv.v + brightnessStep1 * i;
|
||||
// }else{
|
||||
// value = hsv.v - brightnessStep2 * i
|
||||
// }
|
||||
// if (value > 1) {
|
||||
// value = 1;
|
||||
// }
|
||||
// return Number(value.toFixed(2))
|
||||
// };
|
||||
//
|
||||
// this.colorPalette = function(color, index) {
|
||||
// var isLight = index <= 6;
|
||||
// var hsv = tinycolor(color).toHsv();
|
||||
// var i = isLight ? lightColorCount + 1 - index : index - lightColorCount - 1;
|
||||
// return tinycolor({
|
||||
// h: getHue(hsv, i, isLight),
|
||||
// s: getSaturation(hsv, i, isLight),
|
||||
// v: getValue(hsv, i, isLight),
|
||||
// }).toHexString();
|
||||
// };
|
||||
//})()`;
|
||||
//}
|
||||
|
||||
//.colorPaletteMixin();
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
* @Author: LMR
|
||||
* @Date: 2020-08-14 11:04:12
|
||||
* @Last Modified by: LMR
|
||||
* @Last Modified time: 2020-08-18 14:21:41
|
||||
*/
|
||||
|
||||
|
||||
// 主题颜色
|
||||
|
||||
// 明亮主题颜色
|
||||
$primary_color: #2d8cf0;
|
||||
$primary_light_color: #0f1011;
|
||||
$primary_dark_color: #2b85e4;
|
||||
$success_color: #19be6b;
|
||||
$warning_color: #ff9900;
|
||||
$error_color: #ed3f14;
|
||||
$handle-btn-color: #438cde;
|
||||
|
||||
$theme_color: #ed3f14;
|
||||
|
||||
$border_color: #dddee1;
|
||||
$title_color: #8c8c8c;
|
||||
$light_title_color: #1c2438;
|
||||
$light_content_color: #495060;
|
||||
$light_sub_color: #80848f;
|
||||
$light_background_color: #f8f8f9;
|
||||
$light_white_background_color :#fff;
|
||||
// 暗黑主题颜色
|
||||
$dark_background_color: #141414;
|
||||
$dark_sub_background_color: #1d1d1d; //稍微浅一点的
|
||||
$dark_content_color: #d5d5d5;
|
||||
|
||||
|
||||
|
||||
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
|
||||
|
||||
|
||||
// 背景颜色
|
||||
@mixin background_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
background-color: $color;
|
||||
transition: 0.35s;
|
||||
[data-theme="dark"] & {
|
||||
background-color: $dark_background_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
background-color: $light_background_color;
|
||||
}
|
||||
}
|
||||
// 辅助背景颜色
|
||||
@mixin sub_background_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
background-color: $color;
|
||||
transition: 0.35s;
|
||||
[data-theme="dark"] & {
|
||||
background-color: $dark_sub_background_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
background-color: $light_background_color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@mixin white_background_color() {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
background-color: $light_white_background_color;
|
||||
transition: 0.35s;
|
||||
[data-theme="dark"] & {
|
||||
background-color: $dark_sub_background_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
background-color: $light_white_background_color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 正文颜色
|
||||
@mixin content_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
color: $color;
|
||||
[data-theme="dark"] & {
|
||||
color: $dark_content_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
color: $light_content_color;
|
||||
}
|
||||
}
|
||||
|
||||
// 辅助颜色
|
||||
@mixin sub_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
color: $color;
|
||||
[data-theme="dark"] & {
|
||||
color: $dark_content_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
color: $light_sub_color;
|
||||
}
|
||||
}
|
||||
|
||||
// 标题颜色
|
||||
@mixin title_color($color) {
|
||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
||||
color: $color;
|
||||
[data-theme="dark"] & {
|
||||
color: $dark_content_color;
|
||||
}
|
||||
[data-theme="light"] & {
|
||||
color: $light_title_color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<div class="container">
|
||||
<img
|
||||
:src="logoImg"
|
||||
:src="$store.state.logoImg"
|
||||
v-if="showLogo"
|
||||
class="logo-img"
|
||||
alt=""
|
||||
@@ -27,6 +27,7 @@
|
||||
<Tag
|
||||
v-for="(item, index) in promotionTags"
|
||||
:key="index"
|
||||
class="mr_10"
|
||||
>
|
||||
<span class="hover-color" @click="selectTags(item)">{{ item }}</span>
|
||||
</Tag>
|
||||
@@ -37,7 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getLogo} from '@/api/common.js'
|
||||
import storage from '@/plugins/storage.js'
|
||||
import {hotWords} from '@/api/goods.js'
|
||||
export default {
|
||||
name: 'search',
|
||||
@@ -53,50 +54,62 @@ export default {
|
||||
store: { // 是否为店铺页面
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
hover: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
searchData: '', // 搜索内容
|
||||
logoImg: '', // pc端展示logo
|
||||
promotionTags: [] // 热门搜索列表
|
||||
searchData: '' // 搜索内容
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectTags (item) {
|
||||
selectTags (item) { // 选择热门标签
|
||||
this.searchData = item;
|
||||
this.search();
|
||||
},
|
||||
search () {
|
||||
search () { // 全平台搜索商品
|
||||
this.$router.push({
|
||||
path: '/goodsList',
|
||||
query: { keyword: this.searchData }
|
||||
});
|
||||
},
|
||||
searchStore () {
|
||||
searchStore () { // 店铺搜索商品
|
||||
this.$emit('search', this.searchData)
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (!this.Cookies.getItem('logo')) {
|
||||
getLogo().then(res => {
|
||||
if (res.success) {
|
||||
let logoObj = JSON.parse(res.result.settingValue)
|
||||
this.Cookies.setItem('logo', logoObj.buyerSideLogo)
|
||||
this.logoImg = logoObj.buyerSideLogo
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.logoImg = this.Cookies.getItem('logo')
|
||||
computed: {
|
||||
promotionTags () {
|
||||
if (this.$store.state.hotWordsList) {
|
||||
return JSON.parse(this.$store.state.hotWordsList)
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.searchData = this.$route.query.keyword
|
||||
hotWords({start: 1, end: 5}).then(res => {
|
||||
if (res.success) this.promotionTags = res.result
|
||||
})
|
||||
if (!this.hover) { // 首页顶部固定搜索栏不调用热词接口
|
||||
// 搜索热词每5分钟请求一次
|
||||
const reloadTime = storage.getItem('hotWordsReloadTime')
|
||||
const time = new Date().getTime() - 5 * 60 * 1000
|
||||
if (!reloadTime) {
|
||||
hotWords({count: 5}).then(res => {
|
||||
if (res.success && res.result) storage.setItem('hotWordsList', res.result)
|
||||
})
|
||||
storage.setItem('hotWordsReloadTime', new Date().getTime())
|
||||
} else if (reloadTime && time > reloadTime) {
|
||||
hotWords({count: 5}).then(res => {
|
||||
if (res.success && res.result) storage.setItem('hotWordsList', res.result)
|
||||
})
|
||||
storage.setItem('hotWordsReloadTime', new Date().getTime())
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
margin: 30px auto;
|
||||
@@ -134,9 +147,11 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
.store-search{
|
||||
width:63px;
|
||||
padding: 0 9px;
|
||||
border-radius: 0;
|
||||
&:nth-child(2){
|
||||
width:62px;
|
||||
margin-left: -5px;
|
||||
}
|
||||
}
|
||||
@@ -144,6 +159,6 @@ export default {
|
||||
position: relative;
|
||||
height: 0px;
|
||||
top: -38px;
|
||||
left: 336px;
|
||||
left: 352px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -57,7 +57,7 @@ import {
|
||||
export default {
|
||||
name: 'addressManage',
|
||||
props: {
|
||||
id: {
|
||||
id: { // 传入的地址id
|
||||
defalut: '',
|
||||
type: String
|
||||
}
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
save () {
|
||||
save () { // 保存地址
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const params = JSON.parse(JSON.stringify(this.formData));
|
||||
@@ -138,15 +138,15 @@ export default {
|
||||
this.formData.lat = item.position.lat;
|
||||
this.formData.lon = item.position.lng;
|
||||
},
|
||||
show () {
|
||||
show () { // 地址模态框显示
|
||||
this.showAddr = true;
|
||||
},
|
||||
hide () {
|
||||
hide () { // 地址模态框隐藏
|
||||
this.showAddr = false;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
id: {
|
||||
id: { // 传入的地址id
|
||||
handler: function (v) {
|
||||
if (v) {
|
||||
this.getAddrById(v);
|
||||
|
||||
@@ -59,7 +59,6 @@ export default {
|
||||
isActive: 0 // 已激活tab栏下标
|
||||
};
|
||||
},
|
||||
mounted () {},
|
||||
methods: {
|
||||
// 点击右侧的回调
|
||||
callBack () {
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<empty v-if="list.length==0" />
|
||||
<ul class="coupon-list" v-else>
|
||||
<li v-for="(item, index) in list" class="coupon-item" :key="index">
|
||||
<div class="c-left">
|
||||
<div>
|
||||
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span>折</span>
|
||||
<span class="describe">满{{item.consumeThreshold}}元可用</span>
|
||||
</div>
|
||||
<p>使用范围:{{useScope(item.scopeType, item.storeName)}}</p>
|
||||
<p>有效期:{{item.endTime}}</p>
|
||||
</div>
|
||||
<b></b>
|
||||
<a class="c-right" @click="go(item)">立即使用</a>
|
||||
<i class="circle-top"></i>
|
||||
<i class="circle-bottom"></i>
|
||||
</li>
|
||||
</ul>
|
||||
<Page :total="total" @on-change="changePageNum"
|
||||
v-if="list.length && total > params.pageNumber"
|
||||
class="pageration"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size="params.pageSize"
|
||||
show-sizer>
|
||||
</Page>
|
||||
<Spin v-if="loading" fix></Spin>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { memberCouponList } from '@/api/member.js';
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
loading: false, // 列表加载状态
|
||||
params: { // 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
total: 0, // 优惠券总数
|
||||
list: [] // 优惠券列表
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getList () {
|
||||
this.loading = true
|
||||
memberCouponList(this.params).then(res => {
|
||||
this.loading = false
|
||||
if (res.success) {
|
||||
this.list = res.result.records
|
||||
this.total = res.result.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
go (item) { // 根据使用条件跳转商品列表页面
|
||||
if (item.storeId !== 'platform') {
|
||||
this.$router.push({path: '/merchant', query: {id: item.storeId}})
|
||||
} else {
|
||||
if (item.scopeType === 'PORTION_GOODS_CATEGORY') {
|
||||
this.$router.push({path: '/goodsList', query: {categoryId: item.scopeId}})
|
||||
} else {
|
||||
this.$router.push({path: '/goodsList'})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
changePageNum (val) {
|
||||
this.params.pageNumber = val;
|
||||
this.getList()
|
||||
},
|
||||
|
||||
changePageSize (val) {
|
||||
this.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getList()
|
||||
},
|
||||
|
||||
useScope (type, storeName) {
|
||||
let shop = '平台';
|
||||
let goods = '全部商品'
|
||||
if (storeName !== 'platform') shop = storeName
|
||||
switch (type) {
|
||||
case 'ALL':
|
||||
goods = '全部商品'
|
||||
break;
|
||||
case 'PORTION_GOODS':
|
||||
goods = '部分商品'
|
||||
break;
|
||||
case 'PORTION_GOODS_CATEGORY':
|
||||
goods = '部分分类商品'
|
||||
break;
|
||||
}
|
||||
return `${shop}${goods}可用`
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getList()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '../../assets/styles/coupon.scss';
|
||||
.pageration{
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
@@ -151,8 +151,6 @@ export default {
|
||||
]
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
mounted () {},
|
||||
methods: {
|
||||
getCartList () { // 获取购物车列表
|
||||
this.loading = true
|
||||
|
||||
@@ -36,20 +36,22 @@ export default {
|
||||
},
|
||||
components: {drawerPage},
|
||||
computed: {
|
||||
// 用户信息
|
||||
userInfo () {
|
||||
return Storage.getItem('userInfo');
|
||||
},
|
||||
// 购物车商品数量
|
||||
cartNum () {
|
||||
return this.$store.state.cartNum
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showCartNum (item) {
|
||||
showCartNum (item) { // 获取购物车数量
|
||||
if (this.userInfo && item.title === '购物车') {
|
||||
this.getCartList()
|
||||
}
|
||||
},
|
||||
clickBar (val) {
|
||||
clickBar (val) { // tabbar点击操作
|
||||
if (!this.userInfo) {
|
||||
this.$Modal.confirm({
|
||||
title: '请登录',
|
||||
@@ -83,7 +85,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
openBlank (path) {
|
||||
openBlank (path) { // 新页面打开地址
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: path
|
||||
})
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'Main',
|
||||
data () {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
props: {
|
||||
_Title: { // 描述内容
|
||||
type: null,
|
||||
@@ -40,6 +35,6 @@ export default {
|
||||
}
|
||||
p {
|
||||
cursor: pointer;
|
||||
@include sub_color($light_sub_color);
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -29,18 +29,38 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="friend-link">
|
||||
<div class="friend-link flex">
|
||||
<div class="friend-link-item">
|
||||
<ul>
|
||||
<li v-for="(link, index) in moreLink" :key="index" @click="goArticle">
|
||||
<span class="link-item" :class="{'link-last-item': index === 4}">{{link}}</span>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="icp">
|
||||
<li v-if="config.icpCard">
|
||||
<a :href='"https://tsm.miit.gov.cn/dxxzsp/xkz/xkzgl/resource/qiyesearch.jsp?num="+config.icpCard+"&type=xuke"' target="_blank">
|
||||
{{config.icpCard}}
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="config.icpMessage" class="footer-bottmom">
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank">
|
||||
{{config.icpMessage}}
|
||||
</a>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information footer-bottmom">
|
||||
|
||||
<a class="flex " :href="config.company.href">
|
||||
<img class="zhizhao" src="@/assets/images/zhizhao.jpg" mode="" />{{config.company.name}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="copyright">
|
||||
<p>Copyright © LILI</p>
|
||||
<p>Copyright © {{year}} {{config.title}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -48,27 +68,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'Footer',
|
||||
data () {
|
||||
name: "Footer",
|
||||
data() {
|
||||
return {
|
||||
guideArr: [ // 导航链接
|
||||
[ '购物指南', '购物流程', '会员介绍', '生活旅行', '常见问题', '大家电', '联系客服' ],
|
||||
[ '配送方式', '上门自提', '211限时达', '配送服务查询', '收取标准', '海外配送' ],
|
||||
[ '支付方式', '货到付款', '在线支付', '分期付款', '邮局汇款', '公司转账' ],
|
||||
[ '售后服务', '售后政策', '价格保护', '退款说明', '返修/退换货', '取消订单' ]
|
||||
config:require('@/config'),
|
||||
guideArr: [
|
||||
// 导航链接
|
||||
["购物指南", "购物流程", "会员介绍", "生活旅行", "常见问题"],
|
||||
["配送方式", "上门自提", "配送服务查询", "收取标准", "物流规则"],
|
||||
["支付方式", "在线支付", "公司转账", "余额支付", "积分支付"],
|
||||
["售后服务", "售后政策", "退款说明", "返修/退货", "取消订单"],
|
||||
],
|
||||
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'] // 更多链接
|
||||
moreLink: ["关于我们", "联系我们", "联系客服", "商家帮助", "隐私政策"], // 更多链接
|
||||
year: new Date().getFullYear(), // 当前年份
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goArticle () { // 跳转
|
||||
goArticle() {
|
||||
// 跳转文章页
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/article'
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
}
|
||||
}
|
||||
path: "/article",
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -76,11 +101,9 @@ export default {
|
||||
/*****************************底 部 开 始*****************************/
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 450px;
|
||||
padding-top: 30px;
|
||||
|
||||
@include background_color($light_background_color);
|
||||
|
||||
}
|
||||
.icon-row {
|
||||
margin: 15px auto;
|
||||
@@ -111,7 +134,20 @@ export default {
|
||||
.footer-icon-child-4 {
|
||||
background-position: 0 -129px;
|
||||
}
|
||||
.footer-icon-text{
|
||||
.icp {
|
||||
>*{
|
||||
margin: 0 4px;
|
||||
}
|
||||
flex-direction: column;
|
||||
}
|
||||
.flex{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
>img{
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
.footer-icon-text {
|
||||
margin-left: 45px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
@@ -123,7 +159,6 @@ export default {
|
||||
}
|
||||
.servece-type {
|
||||
margin: 15px auto;
|
||||
height: 200px;
|
||||
width: 800px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -138,22 +173,39 @@ export default {
|
||||
cursor: pointer;
|
||||
line-height: 26px;
|
||||
}
|
||||
.servece-type-info li:hover{
|
||||
color:#b8b8be;
|
||||
}
|
||||
.servece-type-info li:first-child {
|
||||
font-size: 16px;
|
||||
line-height: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.servece-type-info li:first-child:hover{
|
||||
// font-size:15px;
|
||||
// font-weight: bold;
|
||||
color:#b8b8be;
|
||||
}
|
||||
.friend-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
width: 908px;
|
||||
height: 30px;
|
||||
padding: 10px 0;
|
||||
margin: 0px auto;
|
||||
border-top: 1px solid $border_color;
|
||||
}
|
||||
.friend-link-item {
|
||||
margin: 0px auto;
|
||||
.information {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
> * {
|
||||
margin: 2px 0;
|
||||
}
|
||||
}
|
||||
.zhizhao {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.friend-link-item ul {
|
||||
list-style: none;
|
||||
@@ -162,6 +214,17 @@ export default {
|
||||
padding: 5px 0px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.friend-link-item li:hover{
|
||||
color:#b8b8be;
|
||||
margin-top:-2px;
|
||||
}
|
||||
.footer-bottmom:hover{
|
||||
margin-top:0 !important;
|
||||
}
|
||||
.footer-bottmom>a:hover{
|
||||
color:#e4393c;
|
||||
}
|
||||
.link-item {
|
||||
padding: 0px 8px;
|
||||
cursor: pointer;
|
||||
@@ -175,15 +238,17 @@ export default {
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
.copyright a{
|
||||
.copyright a {
|
||||
color: #232323;
|
||||
font-size: 20px;
|
||||
}
|
||||
.footer-icon-text{
|
||||
@include title_color($light_title_color)
|
||||
.footer-icon-text {
|
||||
@include title_color($light_title_color);
|
||||
}
|
||||
.copyright,.friend-link,.servece-type-info {
|
||||
@include sub_color($light_sub_color)
|
||||
.copyright,
|
||||
.friend-link,
|
||||
.servece-type-info {
|
||||
@include sub_color($light_sub_color);
|
||||
}
|
||||
/*****************************底 部 结 束*****************************/
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,7 @@ import FixedTopPage from '@/components/advertising/FixedTop'; // 顶部广告
|
||||
import Footer from '@/components/footer/Footer'; // 底部栏
|
||||
import Search from '@/components/Search' // 搜索框
|
||||
import card from '@/components/card' // 个人中心 卡片
|
||||
import cateNav from '@/components/nav/cateNav' // 个人中心 卡片
|
||||
import cateNav from '@/components/nav/CateNav' // 个人中心 卡片
|
||||
|
||||
empty.install = function (Vue) {
|
||||
Vue.component('empty', empty);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div v-else>{{end}}</div>
|
||||
</div>
|
||||
<span v-else class="cart-promotion">
|
||||
<span v-if="end === ''">据活动结束:<span>{{ hours }}</span> : <span>{{ minutes }}</span> : <span>{{ seconds }}</span></span>
|
||||
<span v-if="end === ''">距活动结束:<span>{{ hours }}</span> : <span>{{ minutes }}</span> : <span>{{ seconds }}</span></span>
|
||||
<span v-else>活动已结束</span>
|
||||
</span>
|
||||
</div>
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
time: { // 传入的初始时间
|
||||
default: 1718977559428
|
||||
},
|
||||
type: {
|
||||
type: { // 区分是在详情还是购物车调用
|
||||
default: 'goodsDetail', // 设置两个值,goodsDetail和cart,样式不同
|
||||
type: String
|
||||
}
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
countDown (val) {
|
||||
countDown (val) { // 倒计时方法
|
||||
function addZero (i) {
|
||||
return i < 10 ? '0' + i : i + '';
|
||||
}
|
||||
@@ -58,8 +58,8 @@ export default {
|
||||
clearInterval(this.interval)
|
||||
}
|
||||
},
|
||||
init () {
|
||||
this.interval = setInterval((item) => {
|
||||
init () { // 初始化
|
||||
this.interval = setInterval(() => {
|
||||
this.countDown(this.time);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
<div class="item-detail-big-img">
|
||||
<pic-zoom :url="imgList[imgIndex].url" :scale="2"></pic-zoom>
|
||||
</div>
|
||||
<div v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'" style="margin-top:10px;rgb(153, 149, 149);">实物商品</div>
|
||||
<div v-else-if="skuDetail.goodsType == 'VIRTUAL_GOODS'" style="margin-top:10px;rgb(153, 149, 149);">虚拟商品</div>
|
||||
<div class="item-detail-img-row">
|
||||
<div
|
||||
class="item-detail-img-small"
|
||||
@@ -19,8 +21,11 @@
|
||||
</div>
|
||||
|
||||
<div class="goodsConfig mt_10">
|
||||
<span @click="collect" ><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{isCollected?'已收藏':'收藏'}}</span>
|
||||
<!-- <span>举报</span> -->
|
||||
<span @click="collect"
|
||||
><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{
|
||||
isCollected ? "已收藏" : "收藏"
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右侧商品信息、活动信息、操作展示 -->
|
||||
@@ -30,28 +35,41 @@
|
||||
{{ skuDetail.goodsName }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="sell-point">
|
||||
{{ skuDetail.sellingPoint }}
|
||||
</div>
|
||||
<!-- 限时秒杀 -->
|
||||
<Promotion v-if="promotionMap['SECKILL']" :time="promotionMap['SECKILL'].endTime"></Promotion>
|
||||
<Promotion
|
||||
v-if="promotionMap['SECKILL']"
|
||||
:time="promotionMap['SECKILL'].endTime"
|
||||
></Promotion>
|
||||
<!-- 商品详细 价格、优惠券、促销 -->
|
||||
<div class="item-detail-price-row">
|
||||
<div class="item-price-left">
|
||||
<!-- 商品原价 -->
|
||||
<div class="item-price-row" v-if="!skuDetail.promotionPrice">
|
||||
|
||||
<!-- 秒杀价格 -->
|
||||
<div class="item-price-row" v-if="skuDetail.promotionPrice && promotionMap['SECKILL']">
|
||||
<p>
|
||||
<span class="item-price-title">价 格</span>
|
||||
<span class="item-price">{{skuDetail.price | unitPrice("¥")}}</span>
|
||||
<span class="item-price-title" v-if="promotionMap['SECKILL']"
|
||||
>秒 杀 价</span
|
||||
>
|
||||
<span class="item-price">{{
|
||||
skuDetail.promotionPrice | unitPrice("¥")
|
||||
}}</span>
|
||||
<span class="item-price-old">{{
|
||||
skuDetail.price | unitPrice("¥")
|
||||
}}</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- 秒杀价格 -->
|
||||
<div class="item-price-row" v-if="skuDetail.promotionPrice">
|
||||
<!-- 商品原价 -->
|
||||
<div class="item-price-row" v-else>
|
||||
<p>
|
||||
<span class="item-price-title" v-if="promotionMap['SECKILL']">秒 杀 价</span>
|
||||
<span class="item-price">{{skuDetail.promotionPrice | unitPrice("¥")}}</span>
|
||||
<span class="item-price-old">{{skuDetail.price | unitPrice("¥")}}</span>
|
||||
<span class="item-price-title">价 格</span>
|
||||
<span class="item-price">{{ skuDetail.price | unitPrice("¥") }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- 优惠券展示 -->
|
||||
<div class="item-price-row" v-if="promotionMap['COUPON'].length">
|
||||
<div class="item-price-row" v-if="promotionMap['COUPON'].length">
|
||||
<p>
|
||||
<span class="item-price-title">优 惠 券</span>
|
||||
<span
|
||||
@@ -59,19 +77,35 @@
|
||||
v-for="(item, index) in promotionMap['COUPON']"
|
||||
:key="index"
|
||||
@click="receiveCoupon(item.id)"
|
||||
>
|
||||
<span v-if="item.couponType == 'PRICE'"
|
||||
>满{{ item.consumeThreshold }}减{{ item.price }}</span
|
||||
>
|
||||
<span v-if="item.couponType == 'PRICE'">满{{ item.consumeThreshold }}减{{item.price | unitPrice}}</span>
|
||||
<span v-if="item.couponType == 'DISCOUNT'">满{{ item.consumeThreshold }}打{{item.couponDiscount}}折</span>
|
||||
</span>
|
||||
<span v-if="item.couponType == 'DISCOUNT'"
|
||||
>满{{ item.consumeThreshold }}打{{ item.couponDiscount }}折</span
|
||||
>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- 满减展示 -->
|
||||
<!-- 满减展示 -->
|
||||
<div class="item-price-row" v-if="promotionMap['FULL_DISCOUNT']">
|
||||
<p>
|
||||
<span class="item-price-title">促 销</span>
|
||||
<span class="item-promotion">满减</span>
|
||||
<span class="item-desc-pintuan" v-if="promotionMap['FULL_DISCOUNT'].fullMinus">满{{ promotionMap['FULL_DISCOUNT'].fullMoney }}元,立减现金{{ promotionMap['FULL_DISCOUNT'].fullMinus}}元</span>
|
||||
<span class="item-desc-pintuan" v-if="promotionMap['FULL_DISCOUNT'].fullRate">满{{ promotionMap['FULL_DISCOUNT'].fullMoney }}元,立享{{ promotionMap['FULL_DISCOUNT'].fullRate}}折</span>
|
||||
<span
|
||||
class="item-desc-pintuan"
|
||||
v-if="promotionMap['FULL_DISCOUNT'].fullMinus"
|
||||
>满{{ promotionMap["FULL_DISCOUNT"].fullMoney }}元,立减现金{{
|
||||
promotionMap["FULL_DISCOUNT"].fullMinus
|
||||
}}元</span
|
||||
>
|
||||
<span
|
||||
class="item-desc-pintuan"
|
||||
v-if="promotionMap['FULL_DISCOUNT'].fullRate"
|
||||
>满{{ promotionMap["FULL_DISCOUNT"].fullMoney }}元,立享{{
|
||||
promotionMap["FULL_DISCOUNT"].fullRate
|
||||
}}折</span
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,14 +119,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 选择颜色 -->
|
||||
<div class="item-select" v-for="(sku, index) in formatList" :key="sku.id">
|
||||
<div class="item-select" v-for="(sku, index) in formatList" :key="sku.name">
|
||||
<div class="item-select-title">
|
||||
<p>{{ sku.name }}</p>
|
||||
</div>
|
||||
<div class="item-select-column">
|
||||
<div class="item-select-row" v-for="(item) in sku.values" :key="item.id">
|
||||
<div class="item-select-box" @click="select(index, sku.id, item.id)"
|
||||
:class="{ 'item-select-box-active': item.id === currentSelceted[index] }"
|
||||
<div class="item-select-row" v-for="item in sku.values" :key="item.value">
|
||||
<div
|
||||
class="item-select-box"
|
||||
@click="select(index, item.value)"
|
||||
:class="{
|
||||
'item-select-box-active': item.value === currentSelceted[index],
|
||||
}"
|
||||
>
|
||||
<div class="item-select-intro">
|
||||
<p>{{ item.value }}</p>
|
||||
@@ -108,99 +146,114 @@
|
||||
<p>数量</p>
|
||||
</div>
|
||||
<div class="item-select-row">
|
||||
<InputNumber :min="1" :disabled="skuDetail.quantity === 0" v-model="count"></InputNumber>
|
||||
<span class="inventory"> 库存{{skuDetail.quantity}}</span>
|
||||
<InputNumber
|
||||
:min="1"
|
||||
:max="skuDetail.quantity"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
v-model="count"
|
||||
:precision="0.1"
|
||||
></InputNumber>
|
||||
<span class="inventory"> 库存{{ skuDetail.quantity }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-select">
|
||||
<div
|
||||
class="item-select"
|
||||
v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS' && skuDetail.weight !== 0"
|
||||
>
|
||||
<div class="item-select-title">
|
||||
<p>重量</p>
|
||||
</div>
|
||||
<div class="item-select-row">
|
||||
<span class="inventory"> {{skuDetail.weight}}kg</span>
|
||||
<span class="inventory"> {{ skuDetail.weight }}kg</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-buy-car">
|
||||
<Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="addShoppingCartBtn">加入购物车</Button>
|
||||
<Button type="warning" :loading="loading1" :disabled="skuDetail.quantity === 0" @click="buyNow">立即购买</Button>
|
||||
<div
|
||||
class="add-buy-car"
|
||||
v-if="$route.query.way === 'POINT' && skuDetail.authFlag === 'PASS'"
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="pointPay"
|
||||
>积分购买</Button
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
class="add-buy-car"
|
||||
v-if="$route.query.way !== 'POINT' && skuDetail.authFlag === 'PASS'"
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="addShoppingCartBtn"
|
||||
>加入购物车</Button
|
||||
>
|
||||
<Button
|
||||
type="warning"
|
||||
:loading="loading1"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="buyNow"
|
||||
>立即购买</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="item-detail-see">
|
||||
<Divider>更多推荐</Divider>
|
||||
<Row>
|
||||
<Col :span="24" class="see-Item">
|
||||
<img class="see-Img" src="https://demo.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1489099128797.jpg" alt="" />
|
||||
<p>
|
||||
名龙堂i7 6700升7700 GTX1060 6G台式电脑主机DIY游戏组装整机
|
||||
升6GB独显 送正版WIN10 一年上门
|
||||
</p>
|
||||
<p class="global_color">¥2500.00</p>
|
||||
</Col>
|
||||
<Col :span="24" class="see-Item">
|
||||
<img
|
||||
class="see-Img"
|
||||
src="https://demo.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1489099128797.jpg"
|
||||
alt=""
|
||||
/>
|
||||
<p>
|
||||
名龙堂i7 6700升7700 GTX1060 6G台式电脑主机DIY游戏组装整机
|
||||
升6GB独显 送正版WIN10 一年上门
|
||||
</p>
|
||||
<p class="global_color">¥2500.00</p>
|
||||
</Col>
|
||||
</Row>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Promotion from './Promotion.vue';
|
||||
import PicZoom from 'vue-piczoom'; // 图片放大 https://github.com/826327700/vue-piczoom
|
||||
import { collectGoods, isCollection, receiveCoupon, cancelCollect } from '@/api/member.js';
|
||||
import { addCartGoods } from '@/api/cart.js';
|
||||
import Promotion from "./Promotion.vue";
|
||||
import PicZoom from "vue-piczoom"; // 图片放大
|
||||
import {
|
||||
collectGoods,
|
||||
isCollection,
|
||||
receiveCoupon,
|
||||
cancelCollect,
|
||||
} from "@/api/member.js";
|
||||
import { addCartGoods } from "@/api/cart.js";
|
||||
export default {
|
||||
name: 'ShowGoods',
|
||||
name: "ShowGoods",
|
||||
props: {
|
||||
// 商品数据
|
||||
detail: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
count: 1, // 商品数量
|
||||
imgIndex: 0, // 展示图片下标
|
||||
currentSelceted: [], // 当前商品sku
|
||||
imgList: this.detail.data.specList[0].specImage, // 商品图片列表
|
||||
imgList: [{ url: "" }], // 商品图片列表
|
||||
skuDetail: this.detail.data, // sku详情
|
||||
goodsSpecList: this.detail.specs, // 商品spec
|
||||
promotionMap: { // 活动状态
|
||||
promotionMap: {
|
||||
// 活动状态
|
||||
SECKILL: null,
|
||||
FULL_DISCOUNT: null,
|
||||
COUPON: []
|
||||
COUPON: [],
|
||||
}, // 促销活动
|
||||
formatList: [], // 选择商品品类的数组
|
||||
loading: false, // 立即购买loading
|
||||
loading1: false, // 加入购物车loading
|
||||
isCollected: false // 是否收藏
|
||||
isCollected: false, // 是否收藏
|
||||
};
|
||||
},
|
||||
components: {
|
||||
PicZoom,
|
||||
Promotion
|
||||
},
|
||||
components: { PicZoom, Promotion },
|
||||
methods: {
|
||||
select (index, id, valueId) { // 选择规格
|
||||
this.$set(this.currentSelceted, index, valueId);
|
||||
|
||||
select(index, value) {
|
||||
// 选择规格
|
||||
this.$set(this.currentSelceted, index, value);
|
||||
let selectedSkuId = this.goodsSpecList.find((i) => {
|
||||
let matched = true;
|
||||
let specValues = i.specValues.filter((j) => j.specName !== 'images');
|
||||
let specValues = i.specValues.filter((j) => j.specName !== "images");
|
||||
for (let n = 0; n < specValues.length; n++) {
|
||||
if (specValues[n].specValueId !== this.currentSelceted[n]) {
|
||||
if (specValues[n].specValue !== this.currentSelceted[n]) {
|
||||
matched = false;
|
||||
return;
|
||||
}
|
||||
@@ -209,74 +262,87 @@ export default {
|
||||
return i;
|
||||
}
|
||||
});
|
||||
console.log(selectedSkuId);
|
||||
this.$router.push({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId: selectedSkuId.skuId, goodsId: this.skuDetail.goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId: selectedSkuId.skuId, goodsId: this.skuDetail.goodsId },
|
||||
});
|
||||
},
|
||||
|
||||
addShoppingCartBtn () { // 添加购物车
|
||||
const params = {
|
||||
num: this.count,
|
||||
skuId: this.skuDetail.id
|
||||
};
|
||||
this.loading = true;
|
||||
addCartGoods(params).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
buyNow () { // 立即购买
|
||||
addShoppingCartBtn() {
|
||||
// 添加购物车
|
||||
const params = {
|
||||
num: this.count,
|
||||
skuId: this.skuDetail.id,
|
||||
cartType: 'BUY_NOW'
|
||||
};
|
||||
this.loading1 = true;
|
||||
addCartGoods(params).then(res => {
|
||||
this.loading1 = false;
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/pay', query: {way: 'BUY_NOW'}});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
});
|
||||
this.loading = true;
|
||||
addCartGoods(params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$router.push({
|
||||
path: "/shoppingCart",
|
||||
query: { detail: this.skuDetail, count: this.count },
|
||||
});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
async collect () { // 收藏商品
|
||||
buyNow() {
|
||||
// 立即购买
|
||||
const params = {
|
||||
num: this.count,
|
||||
skuId: this.skuDetail.id,
|
||||
cartType: "BUY_NOW",
|
||||
};
|
||||
// 虚拟商品购买
|
||||
if (this.skuDetail.goodsType === "VIRTUAL_GOODS") {
|
||||
params.cartType = "VIRTUAL";
|
||||
}
|
||||
this.loading1 = true;
|
||||
addCartGoods(params)
|
||||
.then((res) => {
|
||||
this.loading1 = false;
|
||||
if (res.success) {
|
||||
this.$router.push({ path: "/pay", query: { way: params.cartType } });
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading1 = false;
|
||||
});
|
||||
},
|
||||
async collect() {
|
||||
// 收藏商品
|
||||
if (this.isCollected) {
|
||||
let cancel = await cancelCollect('GOODS', this.skuDetail.id)
|
||||
let cancel = await cancelCollect("GOODS", this.skuDetail.id);
|
||||
if (cancel.success) {
|
||||
this.$Message.success('取消收藏成功')
|
||||
this.isCollected = false
|
||||
this.$Message.success("取消收藏成功");
|
||||
this.isCollected = false;
|
||||
}
|
||||
} else {
|
||||
let collect = await collectGoods('GOODS', this.skuDetail.id);
|
||||
let collect = await collectGoods("GOODS", this.skuDetail.id);
|
||||
if (collect.code === 200) {
|
||||
this.isCollected = true;
|
||||
this.$Message.success('收藏商品成功,可以前往个人中心我的收藏查看');
|
||||
this.$Message.success("收藏商品成功,可以前往个人中心我的收藏查看");
|
||||
}
|
||||
}
|
||||
},
|
||||
formatSku (list) {
|
||||
// 格式化数据
|
||||
|
||||
// 格式化数据
|
||||
formatSku(list) {
|
||||
let arr = [{}];
|
||||
|
||||
list.forEach((item, index) => {
|
||||
item.specValues.forEach((spec, specIndex) => {
|
||||
let id = spec.specNameId;
|
||||
let name = spec.specName;
|
||||
let values = {
|
||||
id: spec.specValueId,
|
||||
value: spec.specValue,
|
||||
quantity: item.quantity
|
||||
quantity: item.quantity,
|
||||
};
|
||||
if (name === 'images') {
|
||||
if (name === "images") {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -284,7 +350,7 @@ export default {
|
||||
if (
|
||||
arrItem.name === name &&
|
||||
arrItem.values &&
|
||||
!arrItem.values.find((i) => i.id === values.id)
|
||||
!arrItem.values.find((i) => i.value === values.value)
|
||||
) {
|
||||
arrItem.values.push(values);
|
||||
}
|
||||
@@ -294,9 +360,8 @@ export default {
|
||||
});
|
||||
if (!keys.includes(name)) {
|
||||
arr.push({
|
||||
id: id,
|
||||
name: name,
|
||||
values: [values]
|
||||
values: [values],
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -307,49 +372,58 @@ export default {
|
||||
|
||||
let cur = list.filter((i) => i.skuId === this.$route.query.skuId)[0];
|
||||
if (cur) {
|
||||
cur.specValues.filter((i) => i.specName !== 'images')
|
||||
cur.specValues
|
||||
.filter((i) => i.specName !== "images")
|
||||
.forEach((value, _index) => {
|
||||
this.currentSelceted[_index] = value.specValueId;
|
||||
this.currentSelceted[_index] = value.specValue;
|
||||
});
|
||||
}
|
||||
this.skuList = list;
|
||||
},
|
||||
receiveCoupon (id) { // 领取优惠券
|
||||
receiveCoupon(id).then(res => {
|
||||
receiveCoupon(id) {
|
||||
// 领取优惠券
|
||||
receiveCoupon(id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('优惠券领取成功')
|
||||
this.$Message.success("优惠券领取成功");
|
||||
} else {
|
||||
this.$Message.warning(res.message)
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
promotion () { // 格式化促销活动,返回当前促销的对象
|
||||
promotion() {
|
||||
// 格式化促销活动,返回当前促销的对象
|
||||
if (!this.detail.promotionMap) return false;
|
||||
let keysArr = Object.keys(this.detail.promotionMap);
|
||||
if (keysArr.length === 0) return false;
|
||||
|
||||
for (let i = 0; i < keysArr.length; i++) {
|
||||
let key = keysArr[i].split('-')[0]
|
||||
if (key === 'COUPON') {
|
||||
this.promotionMap[key].push(this.detail.promotionMap[keysArr[i]])
|
||||
let key = keysArr[i].split("-")[0];
|
||||
if (key === "COUPON") {
|
||||
this.promotionMap[key].push(this.detail.promotionMap[keysArr[i]]);
|
||||
} else {
|
||||
this.promotionMap[key] = this.detail.promotionMap[keysArr[i]]
|
||||
this.promotionMap[key] = this.detail.promotionMap[keysArr[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
if (this.Cookies.getItem('userInfo')) {
|
||||
isCollection('GOODS', this.skuDetail.id).then(res => {
|
||||
mounted() {
|
||||
// 用户登录才会判断是否收藏
|
||||
if (this.Cookies.getItem("userInfo")) {
|
||||
isCollection("GOODS", this.skuDetail.id).then((res) => {
|
||||
if (res.success && res.result) {
|
||||
this.isCollected = true;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
this.detail.data.specList.forEach((e) => {
|
||||
if (e.specName === "images") {
|
||||
this.imgList = e.specImage;
|
||||
}
|
||||
});
|
||||
this.formatSku(this.goodsSpecList);
|
||||
this.promotion()
|
||||
document.title = this.skuDetail.goodsName
|
||||
}
|
||||
this.promotion();
|
||||
document.title = this.skuDetail.goodsName;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -361,7 +435,6 @@ export default {
|
||||
}
|
||||
.inventory {
|
||||
padding-left: 4px;
|
||||
@include sub_color($light_sub_color);
|
||||
}
|
||||
|
||||
.global_color {
|
||||
@@ -488,10 +561,8 @@ export default {
|
||||
.item-detail-price-row {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
// width: 555px;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
// @include background_color($light_background_color);
|
||||
background: url("../../assets/images/goodsDetail/price-bg.png");
|
||||
}
|
||||
|
||||
@@ -575,9 +646,6 @@ export default {
|
||||
}
|
||||
|
||||
.item-select-row {
|
||||
// display: flex;
|
||||
// flex-direction: row;
|
||||
// flex-wrap: wrap;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
@@ -587,10 +655,6 @@ export default {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-select-img {
|
||||
width: 36px;
|
||||
}
|
||||
|
||||
.item-select-box {
|
||||
padding: 5px;
|
||||
margin-right: 8px;
|
||||
@@ -608,31 +672,11 @@ export default {
|
||||
border: 0.5px solid $theme_color;
|
||||
}
|
||||
|
||||
.item-select-box-disabled {
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
.item-select-img img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.item-select-intro p {
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.item-select-class {
|
||||
padding: 5px;
|
||||
margin-right: 8px;
|
||||
@include sub_background_color($light_background_color);
|
||||
border: 0.5px solid #ccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.item-select-class:hover {
|
||||
border: 0.5px solid $theme_color;
|
||||
}
|
||||
|
||||
.add-buy-car-box {
|
||||
width: 100%;
|
||||
margin-top: 15px;
|
||||
@@ -641,6 +685,9 @@ export default {
|
||||
|
||||
.add-buy-car {
|
||||
margin-top: 15px;
|
||||
> * {
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.goodsConfig {
|
||||
@@ -648,11 +695,16 @@ export default {
|
||||
justify-content: space-between;
|
||||
> span {
|
||||
padding-right: 10px;
|
||||
&:hover{
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
.sell-point {
|
||||
font-size: 12px;
|
||||
color: red;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
/******************商品图片及购买详情结束******************/
|
||||
</style>
|
||||
|
||||
@@ -1,23 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="item-intro-show">
|
||||
<!-- <div class="item-intro-recommend">
|
||||
<div class="item-recommend-title">
|
||||
<p>店铺热销</p>
|
||||
</div>
|
||||
<div class="item-intro-recommend-column">
|
||||
<div class="item-recommend-column" v-for="(item, index) in hotList" :key="index">
|
||||
<div class="item-recommend-img">
|
||||
<img :src="item.img" alt="">
|
||||
</div>
|
||||
<div class="item-recommend-intro">
|
||||
<span>
|
||||
<span class="item-recommend-top-num">{{index + 1}}</span> 热销{{item.sale}}件</span>
|
||||
<span class="item-recommend-price">¥{{item.price | unitPrice}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="item-intro-detail" ref="itemIntroDetail">
|
||||
<div class="item-intro-nav item-tabs">
|
||||
<Tabs :animated="false" @on-click="tabClick">
|
||||
@@ -31,17 +14,17 @@
|
||||
<div class="remarks-container" ref="itemGoodsComment">
|
||||
<div class="remarks-analyse-box">
|
||||
<div class="remarks-analyse-goods">
|
||||
<i-circle :percent="skuDetail.grade || 100" stroke-color="#5cb85c">
|
||||
<span class="remarks-analyse-num">{{skuDetail.grade || 100}}%</span>
|
||||
<i-circle :percent="skuDetail.grade" stroke-color="#5cb85c">
|
||||
<span class="remarks-analyse-num">{{skuDetail.grade}}%</span>
|
||||
<p class="remarks-analyse-title">好评率</p>
|
||||
</i-circle>
|
||||
</div>
|
||||
</div>
|
||||
<div class="remarks-bar">
|
||||
<span @click="searchByGrade('')" :class="{selectedBar: commentParams.grade === ''}">全部({{commentTypeNum.all}})</span>
|
||||
<span @click="searchByGrade('GOOD')" :class="{selectedBar: commentParams.grade === 'GOOD'}">好评({{commentTypeNum.good}})</span>
|
||||
<span @click="searchByGrade('MODERATE')" :class="{selectedBar: commentParams.grade === 'MODERATE'}">中评({{commentTypeNum.moderate}})</span>
|
||||
<span @click="searchByGrade('WORSE')" :class="{selectedBar: commentParams.grade === 'WORSE'}">差评({{commentTypeNum.worse}})</span>
|
||||
<span @click="viewByGrade('')" :class="{selectedBar: commentParams.grade === ''}">全部({{commentTypeNum.all}})</span>
|
||||
<span @click="viewByGrade('GOOD')" :class="{selectedBar: commentParams.grade === 'GOOD'}">好评({{commentTypeNum.good}})</span>
|
||||
<span @click="viewByGrade('MODERATE')" :class="{selectedBar: commentParams.grade === 'MODERATE'}">中评({{commentTypeNum.moderate}})</span>
|
||||
<span @click="viewByGrade('WORSE')" :class="{selectedBar: commentParams.grade === 'WORSE'}">差评({{commentTypeNum.worse}})</span>
|
||||
</div>
|
||||
<div style="text-align: center;margin-top: 20px;" v-if="commentList.length === 0">
|
||||
暂无评价数据
|
||||
@@ -86,9 +69,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</TabPane>
|
||||
<!-- <TabPane label="商品问答">
|
||||
<ShowGoodsQuestion/>
|
||||
</TabPane> -->
|
||||
<TabPane label="商品参数">
|
||||
<template v-if="detail.goodsParamsDTOList && detail.goodsParamsDTOList.length">
|
||||
<div class="goods-params" v-for="item in detail.goodsParamsDTOList" :key="item.groupId">
|
||||
<span class="ml_10">{{item.groupName}}</span>
|
||||
<table class="mb_10" cellpadding='0' cellspacing="0" >
|
||||
<tr v-for="param in item.goodsParamsItemDTOList" :key="param.paramId">
|
||||
<td style="text-align: center">{{param.paramName}}</td><td>{{param.paramValue}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
<div v-else>暂无商品参数</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
@@ -97,7 +90,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ShowGoodsQuestion from '@/components/goodsDetail/ShowGoodsQuestion';
|
||||
import { goodsComment, goodsCommentNum } from '@/api/member.js';
|
||||
export default {
|
||||
name: 'ShowGoodsDetail',
|
||||
@@ -122,21 +114,22 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 商品详情
|
||||
skuDetail () {
|
||||
return this.detail.data;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeHeight (name) {
|
||||
changeHeight (name) { // 设置商品详情高度
|
||||
let heightCss = window.getComputedStyle(this.$refs[name]).height;
|
||||
heightCss = parseInt(heightCss.substr(0, heightCss.length - 2)) + 89;
|
||||
this.$refs.itemIntroDetail.style.height = heightCss + 'px';
|
||||
},
|
||||
changePageNum (val) {
|
||||
changePageNum (val) { // 修改评论页码
|
||||
this.commentParams.pageNumber = val;
|
||||
this.getList();
|
||||
},
|
||||
changePageSize (val) {
|
||||
changePageSize (val) { // 修改评论页数
|
||||
this.commentParams.pageNumber = 1;
|
||||
this.commentParams.pageSize = val;
|
||||
this.getList();
|
||||
@@ -155,12 +148,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
searchByGrade (grade) {
|
||||
viewByGrade (grade) { // 好中差评切换
|
||||
this.$set(this.commentParams, 'grade', grade);
|
||||
this.commentParams.pageNumber = 1;
|
||||
this.getList();
|
||||
},
|
||||
tabClick (name) {
|
||||
tabClick (name) { // 商品详情和评价之间的tab切换
|
||||
if (name === 0) {
|
||||
this.$nextTick(() => {
|
||||
this.changeHeight('itemIntroGoods')
|
||||
@@ -198,7 +191,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
handleScroll () {
|
||||
handleScroll () { // 监听页面滚动
|
||||
if (this.onceFlag) {
|
||||
this.$nextTick(() => {
|
||||
this.changeHeight('itemIntroGoods')
|
||||
@@ -208,14 +201,14 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.$nextTick(() => {
|
||||
this.$nextTick(() => { // 手动设置详情高度,解决无法撑开问题
|
||||
setTimeout(this.changeHeight('itemIntroGoods'), 2000);
|
||||
});
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
this.getList();
|
||||
},
|
||||
components: {
|
||||
ShowGoodsQuestion
|
||||
if (this.skuDetail.grade === null || this.skuDetail.grade === undefined) {
|
||||
this.skuDetail.grade = 100
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -283,14 +276,12 @@ export default {
|
||||
}
|
||||
.item-intro-detail{
|
||||
margin: 0 30px;
|
||||
// min-height: 1500px;
|
||||
width: 100%;
|
||||
}
|
||||
.item-intro-nav{
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
background-color: #F7F7F7;
|
||||
// border-bottom: 1px solid $theme_color;
|
||||
}
|
||||
.item-intro-nav ul{
|
||||
margin: 0px;
|
||||
@@ -329,8 +320,6 @@ export default {
|
||||
width: 240px;
|
||||
height: 36px;
|
||||
font-size: 14px;
|
||||
/* text-align: center; */
|
||||
/* background-color: #ccc; */
|
||||
}
|
||||
.item-param-title {
|
||||
color: #232323;
|
||||
@@ -404,7 +393,8 @@ export default {
|
||||
margin-right: 5px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
img{width: 100%;}
|
||||
overflow: hidden;
|
||||
img{width: 100%;height: 100%;}
|
||||
}
|
||||
}
|
||||
.preview-img{
|
||||
@@ -431,9 +421,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
img:hover{
|
||||
cursor: url(require('../../../static/small.cur')),auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,4 +473,28 @@ export default {
|
||||
.ivu-rate-star-full:before, .ivu-rate-star-half .ivu-rate-star-content:before {
|
||||
color: $theme_color;
|
||||
}
|
||||
table{
|
||||
border-color:#efefef;
|
||||
color: #999;
|
||||
min-width: 30%;
|
||||
margin-left: 30px;
|
||||
font-size: 12px;
|
||||
tr{
|
||||
td:nth-child(1){
|
||||
width: 100px;
|
||||
}
|
||||
td:nth-child(2){
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
td{
|
||||
padding: 6px;
|
||||
}
|
||||
}
|
||||
.goods-params {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #eee;
|
||||
margin-left: 30px;
|
||||
span{color:#999}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div v-if="true" class="question-list">
|
||||
<div class="-item" v-for="index in 6" :key="index">
|
||||
<!-- 提问 -->
|
||||
<div class="-item-put -item-div">
|
||||
<div class="-item-div-l blod">
|
||||
<Tag color="warning">问</Tag>
|
||||
有屏幕调节亮度吗
|
||||
</div>
|
||||
<div class="-item-div-r">2020年10月21日17:03:35</div>
|
||||
</div>
|
||||
<!-- 解答 -->
|
||||
<div class="-item-reply -item-div">
|
||||
<div class="-item-div-l">
|
||||
<Tag color="success">答</Tag>
|
||||
能调节,点屏幕上方有一条调整带,可正负2调整。
|
||||
</div>
|
||||
<div class="-item-div-r">2020年10月21日17:03:35</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="question-empty">
|
||||
<empty></empty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.-item-div {
|
||||
padding: 10px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.-item-div-l {
|
||||
display: flex;
|
||||
@include content_color($light_content_color);
|
||||
}
|
||||
.-item-div-r {
|
||||
@include sub_color($light_content_color);
|
||||
}
|
||||
.blod {
|
||||
font-weight: bold;
|
||||
}
|
||||
.-item {
|
||||
margin: 10px 0;
|
||||
border-bottom: 1px solid $border_color;
|
||||
}
|
||||
</style>
|
||||
@@ -1,85 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="remarks-title">
|
||||
<span>售后保障</span>
|
||||
</div>
|
||||
<div class="item-protect-container">
|
||||
<div class="item-protect-box">
|
||||
<p class="item-protect-title-box">
|
||||
<Avatar style="background-color: #e4393c" icon="ribbon-a" />
|
||||
<span class="item-protect-title">卖家服务</span>
|
||||
</p>
|
||||
<p class="item-protect-detail">
|
||||
高品质敢承诺:7天无理由退货,30天免费换新,质量问题商家承担来回运费换新;如需发票,请在确认收货无误后联系商家开出。(注*发票不随货品一同发出)
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-protect-box">
|
||||
<p class="item-protect-title-box">
|
||||
<Avatar style="background-color: #e4393c" icon="cash" />
|
||||
<span class="item-protect-title">平台承诺</span>
|
||||
</p>
|
||||
<p class="item-protect-detail">
|
||||
平台卖家销售并发货的商品,由平台卖家提供发票和相应的售后服务。请您放心购买!<br> 注:因厂家会在没有任何提前通知的情况下更改产品包装、产地或者一些附件,本司不能确保客户收到的货物与商城图片、产地、附件说明完全一致。只能确保为原厂正货!并且保证与当时市场上同样主流新品一致。若本商城没有及时更新,请大家谅解!
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-protect-box">
|
||||
<p class="item-protect-title-box">
|
||||
<Avatar style="background-color: #e4393c" icon="locked" />
|
||||
<span class="item-protect-title">正品行货</span>
|
||||
</p>
|
||||
<p class="item-protect-detail">
|
||||
BIT商城向您保证所售商品均为正品行货,BIT自营商品开具机打发票或电子发票。
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-protect-box">
|
||||
<p class="item-protect-title-box">
|
||||
<Avatar style="background-color: #e4393c" icon="settings" />
|
||||
<span class="item-protect-title">全国联保</span>
|
||||
</p>
|
||||
<p class="item-protect-detail">
|
||||
凭质保证书及BIT商城发票,可享受全国联保服务(奢侈品、钟表除外;奢侈品、钟表由BIT联系保修,享受法定三包售后服务),与您亲临商场选购的商品享受相同的质量保证。BIT商城还为您提供具有竞争力的商品价格和运费政策,请您放心购买!<br><br> 注:因厂家会在没有任何提前通知的情况下更改产品包装、产地或者一些附件,本司不能确保客户收到的货物与商城图片、产地、附件说明完全一致。只能确保为原厂正货!并且保证与当时市场上同样主流新品一致。若本商城没有及时更新,请大家谅解!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ShowProductWarranty'
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.remarks-title {
|
||||
padding-left: 15px;
|
||||
height: 36px;
|
||||
font-size: 16px;
|
||||
font-weight: bolder;
|
||||
line-height: 36px;
|
||||
color: #666666;
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
.item-protect-container {
|
||||
padding: 15px;
|
||||
}
|
||||
.item-protect-box {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.item-protect-title-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.item-protect-title {
|
||||
padding-left: 15px;
|
||||
font-size: 20px;
|
||||
font-weight: bolder;
|
||||
color: $theme_color;
|
||||
}
|
||||
.item-protect-detail {
|
||||
padding-top: 5px;
|
||||
padding-left: 46px;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
@@ -2,72 +2,47 @@
|
||||
<div class="box">
|
||||
<div class="nav">
|
||||
<ul class="location">
|
||||
<li><router-link to="/" v-if="$route.path !== '/'" class="home-page" ><Icon type="md-home" />首页</router-link></li>
|
||||
<li>
|
||||
<Dropdown placement="bottom-start">
|
||||
<a href="javascript:void(0)">
|
||||
<Icon type="ios-pin" class="icon"></Icon>
|
||||
{{ city }}
|
||||
</a>
|
||||
<DropdownMenu slot="list">
|
||||
<div class="city">
|
||||
<p v-for="(items, index) in cityArr" :key="index">
|
||||
<span
|
||||
v-for="(item, index) in items"
|
||||
class="city-item"
|
||||
:key="index"
|
||||
@click="changeCity(item)"
|
||||
>{{ item }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</li>
|
||||
<li v-if="$route.path.includes('home')" style="margin-left:10px"><router-link to="/">首页</router-link></li>
|
||||
</ul>
|
||||
<ul class="detail">
|
||||
<!-- <li class="first hover-pointer" @click="handleClickTheme()">切换主题</li> -->
|
||||
<li class="first" v-show="!userInfo.username">
|
||||
<router-link :to="`/signUp`">
|
||||
<span style="border:none">立即注册</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-show="!userInfo.username">
|
||||
<router-link :to="`/login?rePath=${$route.path}&query=${JSON.stringify($route.query)}`">
|
||||
<span style="border:none" class="tipsLogin">请登录</span>
|
||||
<span style="border:none">请登录</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-show="!!userInfo.username">
|
||||
<Dropdown>
|
||||
<p class="username-p">
|
||||
<div class="username-p">
|
||||
<div>
|
||||
<Avatar class="person-icon" :src="userInfo.face" icon="person" size="small" />
|
||||
<span class="username">{{ userInfo.nickName? userInfo.nickName : userInfo.username | secrecyMobile }}</span>
|
||||
</p>
|
||||
<DropdownMenu slot="list">
|
||||
<div class="my-page">
|
||||
<div class="my-info" @click="myInfo">
|
||||
<Icon type="md-home"></Icon>
|
||||
<p>我的主页</p>
|
||||
</div>
|
||||
<div class="sign-out" @click="signOutFun">
|
||||
<Icon type="md-exit"></Icon>
|
||||
<p>退出登录</p>
|
||||
</div>
|
||||
</div>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</div>
|
||||
<transition name='fade'>
|
||||
<ul class="drop-items">
|
||||
<li @click="goUserCenter('/home')">我的主页</li>
|
||||
<li @click="goUserCenter('/home/Coupons')">优惠券</li>
|
||||
<li @click="goUserCenter('/home/Favorites')">我的收藏</li>
|
||||
<li @click="signOutFun">退出登录</li>
|
||||
</ul>
|
||||
</transition>
|
||||
</div>
|
||||
</li>
|
||||
<li class="hover-color" @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li>
|
||||
<li class="hover-color" @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
|
||||
<li v-if="$route.name !== 'Cart'" style="position:relative;" >
|
||||
<li @click="goUserCenter('/home/MyOrder')"><span class="nav-item hover-color">我的订单</span></li>
|
||||
<li @click="goUserCenter('/home/MyTracks')"><span class="nav-item hover-color">我的足迹</span></li>
|
||||
<li @click="goUserCenter('/home/MsgList')"><span class="nav-item hover-color">我的消息</span></li>
|
||||
<li v-if="$route.name !== 'Cart'" style="position:relative;">
|
||||
<i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i>
|
||||
<Dropdown placement="bottom-start">
|
||||
<router-link to="cart" target="_blank" >
|
||||
<router-link to="/cart" target="_blank">
|
||||
<span @mouseenter="getCartList">
|
||||
<Icon
|
||||
size="18"
|
||||
class="cart-icon"
|
||||
type="ios-cart-outline"
|
||||
></Icon>
|
||||
<Icon size="18" type="ios-cart-outline"></Icon>
|
||||
购物车
|
||||
</span>
|
||||
|
||||
</router-link>
|
||||
|
||||
<DropdownMenu slot="list">
|
||||
<div class="shopping-cart-null" style="width:200px" v-show="shoppingCart.length <= 0">
|
||||
<Icon type="ios-cart-outline" class="cart-null-icon"></Icon>
|
||||
@@ -75,12 +50,7 @@
|
||||
<span>赶快去添加商品吧~</span>
|
||||
</div>
|
||||
<div class="shopping-cart-list" v-show="shoppingCart.length > 0">
|
||||
<div
|
||||
class="shopping-cart-box"
|
||||
v-for="(item, index) in shoppingCart"
|
||||
@click="goToPay"
|
||||
:key="index"
|
||||
>
|
||||
<div class="shopping-cart-box" v-for="(item, index) in shoppingCart" @click="goToPay" :key="index">
|
||||
<div class="shopping-cart-img">
|
||||
<img :src="item.goodsSku.thumbnail" class="hover-pointer" />
|
||||
</div>
|
||||
@@ -108,9 +78,6 @@
|
||||
<li>
|
||||
<span class="nav-item" @click="shopEntry">店铺入驻</span>
|
||||
</li>
|
||||
<!-- <li>
|
||||
<router-link to="/feedback">意见反馈</router-link>
|
||||
</li>-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -118,7 +85,8 @@
|
||||
|
||||
<script>
|
||||
import storage from '@/plugins/storage.js';
|
||||
import {cartGoodsAll} from '@/api/cart.js'
|
||||
import { cartGoodsAll } from '@/api/cart.js';
|
||||
import { logout } from '@/api/account.js';
|
||||
export default {
|
||||
name: 'M-Header',
|
||||
created () {
|
||||
@@ -129,60 +97,43 @@ export default {
|
||||
|
||||
data () {
|
||||
return {
|
||||
// 主题颜色切换
|
||||
themeType: 'light',
|
||||
city: '珠海', // 展示城市
|
||||
cityArr: [
|
||||
['北京', '上海', '天津', '重庆', '广州'],
|
||||
['深圳', '河南', '辽宁', '吉林', '江苏'],
|
||||
['江西', '四川', '海南', '贵州', '云南'],
|
||||
['西藏', '陕西', '甘肃', '青海', '珠海']
|
||||
],
|
||||
userInfo: {}, // 用户信息
|
||||
shoppingCart: [] // 购物车
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 购物车商品数量
|
||||
cartNum () {
|
||||
return this.$store.state.cartNum
|
||||
return this.$store.state.cartNum;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClickTheme () {
|
||||
this.themeType === 'light'
|
||||
? (this.themeType = 'dark')
|
||||
: (this.themeType = 'light');
|
||||
window.document.documentElement.setAttribute(
|
||||
'data-theme',
|
||||
this.themeType
|
||||
);
|
||||
},
|
||||
changeCity (city) {
|
||||
this.city = city;
|
||||
},
|
||||
goToPay () {
|
||||
goToPay () { // 跳转购物车
|
||||
let url = this.$router.resolve({
|
||||
path: '/cart'
|
||||
})
|
||||
window.open(url.href, '_blank')
|
||||
});
|
||||
window.open(url.href, '_blank');
|
||||
},
|
||||
myInfo () {
|
||||
myInfo () { // 跳转会员中心
|
||||
let url = this.$router.resolve({
|
||||
path: '/home'
|
||||
})
|
||||
window.open(url.href, '_blank')
|
||||
});
|
||||
window.open(url.href, '_blank');
|
||||
},
|
||||
signOutFun () {
|
||||
storage.removeItem('accessToken');
|
||||
storage.removeItem('refreshToken');
|
||||
storage.removeItem('userInfo');
|
||||
storage.removeItem('cartNum');
|
||||
this.$store.commit('SET_CARTNUM', 0)
|
||||
this.$router.push('/login');
|
||||
signOutFun () { // 退出登录
|
||||
logout().then(res => {
|
||||
storage.removeItem('accessToken');
|
||||
storage.removeItem('refreshToken');
|
||||
storage.removeItem('userInfo');
|
||||
storage.removeItem('cartNum');
|
||||
this.$store.commit('SET_CARTNUM', 0)
|
||||
this.$router.push('/login');
|
||||
});
|
||||
},
|
||||
goUserCenter (path) { // 跳转我的订单,我的足迹
|
||||
goUserCenter (path) {
|
||||
// 跳转我的订单,我的足迹、收藏等
|
||||
if (this.userInfo.username) {
|
||||
this.$router.push({path: path})
|
||||
this.$router.push({ path: path });
|
||||
} else {
|
||||
this.$Modal.confirm({
|
||||
title: '请登录',
|
||||
@@ -201,25 +152,26 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
shopEntry () { // 店铺入驻
|
||||
shopEntry () {
|
||||
// 店铺入驻
|
||||
if (storage.getItem('accessToken')) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/shopEntry',
|
||||
query: {id: 1}
|
||||
query: { id: 1 }
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
} else {
|
||||
this.$router.push('login');
|
||||
}
|
||||
},
|
||||
getCartList () { // 获取购物车列表
|
||||
getCartList () {
|
||||
// 获取购物车列表
|
||||
if (this.userInfo.username) {
|
||||
|
||||
cartGoodsAll().then(res => {
|
||||
this.shoppingCart = res.result.skuList
|
||||
this.$store.commit('SET_CARTNUM', this.shoppingCart.length)
|
||||
this.Cookies.setItem('cartNum', this.shoppingCart.length)
|
||||
})
|
||||
cartGoodsAll().then((res) => {
|
||||
this.shoppingCart = res.result.skuList;
|
||||
this.$store.commit('SET_CARTNUM', this.shoppingCart.length);
|
||||
this.Cookies.setItem('cartNum', this.shoppingCart.length);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -235,14 +187,12 @@ export default {
|
||||
.first,
|
||||
.username,
|
||||
.shopping-cart-null span {
|
||||
@include sub_color($light_sub_color);
|
||||
}
|
||||
.tipsLogin {
|
||||
color: $theme_color;
|
||||
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
font-size: 12px!important;
|
||||
// height: 35px;
|
||||
@include background_color($light_white_background_color);
|
||||
}
|
||||
@@ -258,14 +208,15 @@ export default {
|
||||
}
|
||||
.nav li {
|
||||
float: left;
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
line-height: 35px;
|
||||
margin-right: 15px;
|
||||
margin-right: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.nav a,.nav-item {
|
||||
.nav a,
|
||||
.nav-item {
|
||||
text-decoration: none;
|
||||
padding-left: 15px;
|
||||
padding-left: 14px;
|
||||
border-left: 1px solid #ccc;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
@@ -359,8 +310,70 @@ export default {
|
||||
line-height: 16px;
|
||||
}
|
||||
.username-p {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
div{
|
||||
cursor: pointer;
|
||||
>span{
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.drop-items {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 45px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0 auto;
|
||||
padding: 5px 10px;
|
||||
z-index: 20;
|
||||
height: 150px;
|
||||
background-color: #fff;
|
||||
width: 80px;
|
||||
border: 1px solid #eee;
|
||||
box-shadow: 2px 2px 7px #999;
|
||||
|
||||
li {
|
||||
color: rgb(107, 106, 106);
|
||||
width: 100%;
|
||||
border-bottom:1px solid rgb(207, 206, 206);
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
&:last-child{
|
||||
border: none;
|
||||
}
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
|
||||
&::before{
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
left: 30px;
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 10px solid #999;
|
||||
border-color: transparent transparent #fff transparent ;
|
||||
}
|
||||
|
||||
&::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 80px;
|
||||
height: 20px;
|
||||
top: -20px;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
.drop-items{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.my-page {
|
||||
padding: 3px 5px;
|
||||
width: 180px;
|
||||
@@ -406,9 +419,6 @@ export default {
|
||||
.sign-out p {
|
||||
font-size: 12px;
|
||||
}
|
||||
.cart-icon{
|
||||
padding: 0 6px;
|
||||
}
|
||||
.goods-title:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="shop-box">
|
||||
<div class="shop-container">
|
||||
<div class="shop-title">
|
||||
<div class="shop-title-content">
|
||||
<p><router-link :to="`/merchant?id=${skuDetail.storeId}`">{{ skuDetail.storeName }}</router-link></p>
|
||||
</div>
|
||||
<div class="shop-title-content">
|
||||
<img class="hover-pointer" @click="linkTo(`/merchant?id=${storeDetail.storeId}`)" :src="storeDetail.storeLogo" height="40" alt="">
|
||||
<p><router-link :to="`/merchant?id=${storeDetail.storeId}`">{{ storeDetail.storeName }}</router-link></p>
|
||||
<div class="ml_20" v-html="storeDetail.storeDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -20,7 +20,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
skuDetail () {
|
||||
storeDetail () { // 店铺详情
|
||||
return this.detail;
|
||||
}
|
||||
}
|
||||
@@ -46,57 +46,17 @@ export default {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.shop-title {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.shop-title-icon {
|
||||
font-size: 46px;
|
||||
}
|
||||
|
||||
.shop-title-content {
|
||||
padding-top: 8px;
|
||||
margin-left: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.shop-title-content p {
|
||||
line-height: 26px;
|
||||
font-size: 20px;
|
||||
|
||||
}
|
||||
.shop-title-content p:nth-child(2) {
|
||||
font-size: 16px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.shop-title-content a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.shop-another-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.shop-another-item-detail {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.shop-another-item-img {
|
||||
height: 80px;
|
||||
border-radius: 40px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.shop-another-item-img img {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.shop-anoter-item-intro {
|
||||
margin-left: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,93 +1,106 @@
|
||||
<template>
|
||||
<div class="scroll-show">
|
||||
<div class="content clearfix">
|
||||
<cateNav class="cate" :showNavBar="false"></cateNav>
|
||||
<Search class="search-con" :showLogo="false" :showTag="false"></Search>
|
||||
<Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" />
|
||||
<i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i>
|
||||
<cateNav class="cate" :hover="true" :showNavBar="false"></cateNav>
|
||||
<Search
|
||||
class="search-con"
|
||||
:hover="true"
|
||||
:showLogo="false"
|
||||
:showTag="false"
|
||||
></Search>
|
||||
<Icon
|
||||
type="ios-cart-outline"
|
||||
@click="goCartList"
|
||||
class="cart-icon"
|
||||
@mouseenter.native="getCartList"
|
||||
/>
|
||||
<i class="cart-badge">{{ cartNum < 100 ? cartNum : "99" }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {cartCount} from '@/api/cart.js'
|
||||
import storage from '@/plugins/storage.js';
|
||||
import { cartCount } from "@/api/cart.js";
|
||||
import storage from "@/plugins/storage.js";
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {} // 用户信息
|
||||
}
|
||||
userInfo: {}, // 用户信息
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
cartNum () { // 购物车数量
|
||||
return this.$store.state.cartNum
|
||||
}
|
||||
cartNum() {
|
||||
// 购物车商品数量
|
||||
return this.$store.state.cartNum;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
goCartList () {
|
||||
goCartList() {
|
||||
// 跳转购物车页面
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: '/cart'
|
||||
})
|
||||
window.open(routerUrl.href, '_blank')
|
||||
path: "/cart",
|
||||
});
|
||||
window.open(routerUrl.href, "_blank");
|
||||
},
|
||||
getCartList () { // 获取购物车列表
|
||||
if (storage.getItem('userInfo')) {
|
||||
cartCount().then(res => {
|
||||
this.$store.commit('SET_CARTNUM', res.result)
|
||||
this.Cookies.setItem('cartNum', res.result)
|
||||
})
|
||||
getCartList() {
|
||||
// 获取购物车列表
|
||||
if (storage.getItem("userInfo")) {
|
||||
cartCount().then((res) => {
|
||||
this.$store.commit("SET_CARTNUM", res.result);
|
||||
this.Cookies.setItem("cartNum", res.result);
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (storage.getItem("userInfo")) {
|
||||
this.userInfo = JSON.parse(storage.getItem("userInfo"));
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (storage.getItem('userInfo')) {
|
||||
this.userInfo = JSON.parse(storage.getItem('userInfo'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
width: 1200px;
|
||||
height: 40px;
|
||||
margin: 10px auto;
|
||||
position: relative;
|
||||
}
|
||||
.cate {
|
||||
float: left;
|
||||
width: 200px!important;
|
||||
}
|
||||
.search-con{
|
||||
float: left;
|
||||
width: 800px;
|
||||
overflow: hidden;
|
||||
margin-top: -27px;
|
||||
}
|
||||
.cart-icon {
|
||||
width: 30px;
|
||||
float: left;
|
||||
font-size: 25px;
|
||||
margin-top: 8px;
|
||||
color: $theme_color;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.cart-badge {
|
||||
position: absolute;
|
||||
font-style: normal;
|
||||
right: 165px;
|
||||
display: block;
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
border-radius: 10px;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
z-index: 5;
|
||||
top: 3px;
|
||||
.content {
|
||||
width: 1200px;
|
||||
height: 40px;
|
||||
margin: 10px auto;
|
||||
position: relative;
|
||||
}
|
||||
.cate {
|
||||
float: left;
|
||||
width: 200px !important;
|
||||
}
|
||||
.search-con {
|
||||
float: left;
|
||||
width: 800px;
|
||||
overflow: hidden;
|
||||
margin-top: -27px;
|
||||
}
|
||||
.cart-icon {
|
||||
width: 30px;
|
||||
float: left;
|
||||
font-size: 25px;
|
||||
margin-top: 8px;
|
||||
color: $theme_color;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.cart-badge {
|
||||
position: absolute;
|
||||
font-style: normal;
|
||||
right: 165px;
|
||||
display: block;
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
border-radius: 10px;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
z-index: 5;
|
||||
top: 3px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ModelFormItem from './modelFormItem.vue';
|
||||
import ModelFormItem from './ModelFormItem.vue';
|
||||
export default {
|
||||
name: 'modelForm',
|
||||
components: {
|
||||
@@ -25,9 +25,7 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.model-content {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
min-height: 1200px;
|
||||
}
|
||||
</style>
|
||||
206
buyer/src/components/indexDecorate/ModelFormItem.vue
Normal file
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<div class="model-item" v-if="element && element.key">
|
||||
<!-- 轮播图模块,包括个人信息,快捷导航模块 -->
|
||||
<template v-if="element.type == 'carousel'">
|
||||
<model-carousel
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></model-carousel>
|
||||
</template>
|
||||
<template v-if="element.type == 'carousel1'">
|
||||
<model-carousel1 :data="element" class="mb_20"></model-carousel1>
|
||||
</template>
|
||||
<template v-if="element.type == 'carousel2'">
|
||||
<model-carousel2
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></model-carousel2>
|
||||
</template>
|
||||
<!-- 热门广告 -->
|
||||
<template v-if="element.type == 'hotAdvert'">
|
||||
<div class="mb_20 width_1200_auto">
|
||||
<img
|
||||
style="display: block"
|
||||
class="hover-pointer"
|
||||
:src="element.options.list[0].img"
|
||||
@click="linkTo(element.options.list[0].url)"
|
||||
width="1200"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<ul class="advert-list width_1200_auto">
|
||||
<template v-for="(item, index) in element.options.list">
|
||||
<li
|
||||
v-if="index !== 0"
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
:key="index"
|
||||
>
|
||||
<img :src="item.img" width="230" height="190" alt="" />
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</template>
|
||||
<!-- 限时秒杀 待完善 -->
|
||||
<template v-if="element.type == 'seckill' && element.options.list.length">
|
||||
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
|
||||
</template>
|
||||
<!-- 折扣广告 -->
|
||||
<template v-if="element.type == 'discountAdvert'">
|
||||
<div
|
||||
class="discountAdvert"
|
||||
:style="{
|
||||
backgroundImage:
|
||||
'url(' + require('@/assets/images/decorate.png') + ')',
|
||||
}"
|
||||
>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
v-for="(item, index) in element.options.classification"
|
||||
:key="index"
|
||||
:src="item.img"
|
||||
width="190"
|
||||
height="210"
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
v-for="(item, index) in element.options.brandList"
|
||||
:key="'discount' + index"
|
||||
:src="item.img"
|
||||
width="240"
|
||||
height="105"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 好货推荐 -->
|
||||
<template v-if="element.type == 'recommend'">
|
||||
<recommend :data="element" class="mb_20 width_1200_auto"></recommend>
|
||||
</template>
|
||||
<!-- 新品排行 -->
|
||||
<template v-if="element.type == 'newGoodsSort'">
|
||||
<new-goods-sort
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></new-goods-sort>
|
||||
</template>
|
||||
<!-- 首页广告 -->
|
||||
<template v-if="element.type == 'firstAdvert'">
|
||||
<first-page-advert
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></first-page-advert>
|
||||
</template>
|
||||
<!-- 横幅广告 -->
|
||||
<template v-if="element.type == 'bannerAdvert'">
|
||||
<div style="width: 100%; text-align: center">
|
||||
<img
|
||||
width="1200"
|
||||
class="hover-pointer mb_20"
|
||||
@click="linkTo(element.options.url)"
|
||||
:src="element.options.img"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="element.type == 'notEnough'"
|
||||
>
|
||||
<not-enough
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></not-enough>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ModelCarousel from "./modelList/Carousel.vue";
|
||||
import ModelCarousel1 from "./modelList/Carousel1.vue";
|
||||
import ModelCarousel2 from "./modelList/Carousel2.vue";
|
||||
import FirstPageAdvert from "./modelList/FirstPageAdvert.vue";
|
||||
import NewGoodsSort from "./modelList/NewGoodsSort.vue";
|
||||
import Recommend from "./modelList/Recommend.vue";
|
||||
import NotEnough from "./modelList/NotEnough.vue";
|
||||
import Seckill from "./modelList/Seckill.vue";
|
||||
|
||||
export default {
|
||||
name: "modelFormItem",
|
||||
props: ["element", "select", "index", "data"],
|
||||
components: {
|
||||
ModelCarousel,
|
||||
ModelCarousel1,
|
||||
ModelCarousel2,
|
||||
Recommend,
|
||||
NewGoodsSort,
|
||||
FirstPageAdvert,
|
||||
NotEnough,
|
||||
Seckill,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showModal: false, // 控制模态框显隐
|
||||
selected: {}, // 已选数据
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.model-item {
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/** 热门广告 */
|
||||
.advert-list {
|
||||
background: $theme_color;
|
||||
height: 200px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 3px 10px;
|
||||
> li {
|
||||
img {
|
||||
cursor: pointer;
|
||||
border-radius: 10px;
|
||||
transition: all 150ms ease-in-out;
|
||||
&:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: rgba(0, 0, 0, 0.4) 0px 5px 20px 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 折扣广告 */
|
||||
.discountAdvert {
|
||||
width: 1300px;
|
||||
height: 566px;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 20px;
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
left: -47px;
|
||||
padding-left: 295px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
img {
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
transition: all 150ms ease-in-out;
|
||||
&:hover {
|
||||
box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.4);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.width_1200_auto {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -1,302 +0,0 @@
|
||||
<template>
|
||||
<div class="model-item" v-if="element && element.key">
|
||||
<!-- 轮播图模块,包括个人信息,快捷导航模块 -->
|
||||
<template v-if="element.type == 'carousel'">
|
||||
<model-carousel :data="element"></model-carousel>
|
||||
</template>
|
||||
<!-- 热门广告 -->
|
||||
<template v-if="element.type == 'hotAdvert'">
|
||||
<div>
|
||||
<img
|
||||
style="display: block"
|
||||
class="hover-pointer"
|
||||
:src="element.options.list[0].img"
|
||||
@click="linkTo(element.options.list[0].url)"
|
||||
width="1200"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<ul class="advert-list">
|
||||
<template v-for="(item, index) in element.options.list">
|
||||
<li
|
||||
v-if="index !== 0"
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
:key="index"
|
||||
>
|
||||
<img :src="item.img" width="230" height="190" alt="" />
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</template>
|
||||
<!-- 限时秒杀 待完善 -->
|
||||
<!-- <template v-if="element.type == 'seckill'">
|
||||
<seckill :data="element"></seckill>
|
||||
</template> -->
|
||||
<!-- 折扣广告 -->
|
||||
<template v-if="element.type == 'discountAdvert'">
|
||||
<div
|
||||
class="discountAdvert"
|
||||
:style="{
|
||||
'background-image': 'url(' + element.options.bgImg.img + ')',
|
||||
}"
|
||||
>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
v-for="(item, index) in element.options.classification"
|
||||
:key="index"
|
||||
:src="item.img"
|
||||
width="190"
|
||||
height="210"
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
v-for="(item, index) in element.options.brandList"
|
||||
:key="'discount' + index"
|
||||
:src="item.img"
|
||||
width="240"
|
||||
height="105"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 好货推荐 -->
|
||||
<template v-if="element.type == 'recommend'">
|
||||
<recommend :data="element"></recommend>
|
||||
</template>
|
||||
<!-- 新品排行 -->
|
||||
<template v-if="element.type == 'newGoodsSort'">
|
||||
<new-goods-sort :data="element"></new-goods-sort>
|
||||
</template>
|
||||
<!-- 首页广告 -->
|
||||
<template v-if="element.type == 'firstAdvert'">
|
||||
<first-page-advert :data="element"></first-page-advert>
|
||||
</template>
|
||||
<!-- 横幅广告 -->
|
||||
<template v-if="element.type == 'bannerAdvert'">
|
||||
<img
|
||||
width="1200"
|
||||
class="hover-pointer"
|
||||
@click="linkTo(element.options.url)"
|
||||
:src="element.options.img"
|
||||
alt=""
|
||||
/>
|
||||
</template>
|
||||
<template v-if="element.type == 'notEnough'">
|
||||
<not-enough :data="element"></not-enough>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ModelCarousel from './modelList/carousel.vue';
|
||||
import FirstPageAdvert from './modelList/firstPageAdvert.vue';
|
||||
import NewGoodsSort from './modelList/newGoodsSort.vue';
|
||||
import Recommend from './modelList/recommend.vue';
|
||||
import NotEnough from './modelList/notEnough.vue';
|
||||
import Seckill from './modelList/seckill.vue';
|
||||
|
||||
export default {
|
||||
name: 'modelFormItem',
|
||||
props: ['element', 'select', 'index', 'data'],
|
||||
components: {
|
||||
ModelCarousel,
|
||||
Recommend,
|
||||
NewGoodsSort,
|
||||
FirstPageAdvert,
|
||||
NotEnough,
|
||||
Seckill
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
showModal: false, // 控制模态框显隐
|
||||
selected: {} // 已选数据
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.model-item {
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
&:hover {
|
||||
.del-btn {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
.del-btn {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: -100px;
|
||||
top: 0;
|
||||
&:hover {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/** 热门广告 */
|
||||
.advert-list {
|
||||
background: $theme_color;
|
||||
height: 200px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 3px 10px;
|
||||
> li {
|
||||
img {
|
||||
cursor: pointer;
|
||||
border-radius: 10px;
|
||||
transition: all 150ms ease-in-out;
|
||||
&:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: rgba(0, 0, 0, 0.4) 0px 5px 20px 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 限时秒杀 */
|
||||
.limit-img {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
img {
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
/** 折扣广告 */
|
||||
.discountAdvert {
|
||||
height: 566px;
|
||||
background-repeat: no-repeat;
|
||||
margin-left: -97px;
|
||||
position: relative;
|
||||
padding-left: 295px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: start;
|
||||
img {
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
transition: all 150ms ease-in-out;
|
||||
&:hover {
|
||||
box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.4);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 首页品牌 */
|
||||
.brand {
|
||||
.brand-view {
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
.brand-view-content {
|
||||
width: 470px;
|
||||
margin-left: 10px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 316px;
|
||||
}
|
||||
.brand-view-title {
|
||||
height: 50px;
|
||||
padding: 0 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
.brand-view-content:first-child {
|
||||
width: 240px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
.brand-list {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
li {
|
||||
width: 121px;
|
||||
height: 112px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border: 1px solid #f5f5f5;
|
||||
margin: -1px -1px 0 0;
|
||||
&:hover {
|
||||
.brand-mash {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.brand-img {
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
img {
|
||||
width: 100px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.brand-mash {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
.ivu-icon {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
div:last-child {
|
||||
background-color: $theme_color;
|
||||
border-radius: 9px;
|
||||
padding: 0 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.refresh {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
.ivu-icon {
|
||||
font-size: 18px;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
&:hover {
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
.ivu-icon {
|
||||
transform: rotateZ(360deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 装修模态框 内部样式start */
|
||||
.modal-top-advert {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
> * {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
209
buyer/src/components/indexDecorate/modelList/Carousel.vue
Normal file
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<div class="model-carousel">
|
||||
<div class="nav-body clearfix">
|
||||
<!-- 侧边导航占位 -->
|
||||
<div class="nav-side"></div>
|
||||
<div class="nav-content">
|
||||
<!-- 轮播图 -->
|
||||
<Carousel autoplay>
|
||||
<CarouselItem v-for="(item, index) in data.options.list" :key="index">
|
||||
<div style="overflow: hidden">
|
||||
<img
|
||||
:src="item.img"
|
||||
width="790"
|
||||
@click="linkTo(item.url)"
|
||||
height="340"
|
||||
class="hover-pointer"
|
||||
/>
|
||||
</div>
|
||||
</CarouselItem>
|
||||
</Carousel>
|
||||
</div>
|
||||
<div class="nav-right">
|
||||
<div class="person-msg">
|
||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||
<div>
|
||||
Hi, {{
|
||||
userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile
|
||||
}}
|
||||
</div>
|
||||
<div v-if="userInfo.id">
|
||||
<Button class="btns" shape="circle" @click="$router.push('home')"
|
||||
>会员中心</Button
|
||||
>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Button class="btns" @click="$router.push('login')" shape="circle"
|
||||
>请登录</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shop-msg">
|
||||
<div>
|
||||
<span>常见问题</span>
|
||||
<ul class="article-list">
|
||||
<li
|
||||
class="ellipsis"
|
||||
:alt="article.title"
|
||||
v-for="(article, index) in articleList"
|
||||
:key="index"
|
||||
@click="goArticle(article.id)"
|
||||
>
|
||||
{{ article.title }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { articleList } from "@/api/common.js";
|
||||
import storage from "@/plugins/storage";
|
||||
export default {
|
||||
name: "modelCarousel",
|
||||
props: ["data"],
|
||||
data() {
|
||||
return {
|
||||
config: require("@/config"),
|
||||
userInfo: {}, // 用户信息
|
||||
articleList: [], // 常见问题
|
||||
params: {
|
||||
// 请求常见问题参数
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
type: "ANNOUNCEMENT",
|
||||
sort: "sort",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getArticleList() {
|
||||
// 获取常见问题列表
|
||||
articleList(this.params).then((res) => {
|
||||
if (res.success) {
|
||||
this.articleList = res.result.records;
|
||||
}
|
||||
});
|
||||
},
|
||||
goArticle(id) {
|
||||
// 跳转文章详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: "/article",
|
||||
query: { id },
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (storage.getItem("userInfo"))
|
||||
this.userInfo = JSON.parse(storage.getItem("userInfo"));
|
||||
this.getArticleList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.model-carousel {
|
||||
width: 1200px;
|
||||
height: 340px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btns {
|
||||
background-color:#363634 ;
|
||||
line-height:30px;
|
||||
color: white !important;
|
||||
}
|
||||
.btns:hover {
|
||||
background-color: #363634;
|
||||
line-height:32px !important;
|
||||
color: #e5d790 !important;
|
||||
}
|
||||
/* 导航主体 */
|
||||
.nav-body {
|
||||
width: 1200px;
|
||||
height: 340px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.nav-side {
|
||||
height: 100%;
|
||||
width: 200px;
|
||||
float: left;
|
||||
padding: 0px;
|
||||
color: #fff;
|
||||
background-color: #6e6568;
|
||||
}
|
||||
|
||||
/*导航内容*/
|
||||
.nav-content {
|
||||
width: 790px;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
position: relative;
|
||||
}
|
||||
.nav-right {
|
||||
float: left;
|
||||
width: 210px;
|
||||
.person-msg {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
margin: 20px auto;
|
||||
button {
|
||||
height: 30px !important;
|
||||
margin-top: 10px;
|
||||
line-height: 30px;
|
||||
border: none;
|
||||
}
|
||||
.ivu-btn-default {
|
||||
// color: $theme_color;
|
||||
// border-color: $theme_color;
|
||||
}
|
||||
img {
|
||||
margin-bottom: 10px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.shop-msg {
|
||||
div {
|
||||
width: 100%;
|
||||
margin: 10px 27px;
|
||||
span {
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
margin-left: 5px;
|
||||
}
|
||||
span:nth-child(1) {
|
||||
@include content_color($theme_color);
|
||||
margin-left: 0;
|
||||
}
|
||||
span:nth-child(2) {
|
||||
font-weight: normal;
|
||||
}
|
||||
span:nth-child(3):hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
ul {
|
||||
li {
|
||||
cursor: pointer;
|
||||
margin: 5px 0;
|
||||
color: #999395;
|
||||
width: 150px;
|
||||
font-size: 12px;
|
||||
&:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
76
buyer/src/components/indexDecorate/modelList/Carousel1.vue
Normal file
@@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<div class="model-carousel1" :style="{background: bgColor}">
|
||||
<div class="nav-body clearfix">
|
||||
<!-- 侧边导航 -->
|
||||
<div class="nav-side"></div>
|
||||
<div class="nav-content">
|
||||
<!-- 轮播图 -->
|
||||
<Carousel autoplay @on-change="autoChange">
|
||||
<CarouselItem v-for="(item, index) in data.options.list" :key="index" >
|
||||
<div style="overflow: hidden">
|
||||
<img :src="item.img" width="1200" height="470" />
|
||||
</div>
|
||||
</CarouselItem>
|
||||
</Carousel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'modelCarousel1',
|
||||
props: ['data'],
|
||||
data () {
|
||||
return {
|
||||
showModal: false, // modal显隐
|
||||
selected: null, // 已选数据
|
||||
picModelFlag: false, // 选择图片modal
|
||||
bgColor: '#fff' // 轮播背景色
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this.bgColor = this.data.options.list[0].bgColor
|
||||
},
|
||||
methods: {
|
||||
// 自动切换时改变背景色
|
||||
autoChange (oVal, val) {
|
||||
this.bgColor = this.data.options.list[val].bgColor
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.model-carousel1 {
|
||||
width: 100%;
|
||||
height: 470px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/*大的导航信息,包含导航,幻灯片等*/
|
||||
.nav-body {
|
||||
width: 1200px;
|
||||
height: 470px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
.nav-side {
|
||||
height: 470px;
|
||||
width: 200px;
|
||||
padding: 0px;
|
||||
color: #fff;
|
||||
line-height: 470px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/*导航内容*/
|
||||
.nav-content {
|
||||
width: 1200px;
|
||||
height: 470px;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
@@ -1,20 +1,30 @@
|
||||
<template>
|
||||
<div class="model-carousel">
|
||||
<div class="model-carousel2">
|
||||
<div class="nav-body clearfix">
|
||||
<!-- 侧边导航占位 -->
|
||||
<!-- 侧边导航 -->
|
||||
<div class="nav-side"></div>
|
||||
<div class="nav-content">
|
||||
<!-- 轮播图 -->
|
||||
<Carousel autoplay>
|
||||
<CarouselItem v-for="(item, index) in data.options.list" :key="index">
|
||||
<div style="overflow: hidden">
|
||||
<img
|
||||
:src="item.img"
|
||||
width="790"
|
||||
@click="linkTo(item.url)"
|
||||
height="340"
|
||||
class="hover-pointer"
|
||||
/>
|
||||
<img :src="item.img" width="590" height="470" />
|
||||
</div>
|
||||
</CarouselItem>
|
||||
</Carousel>
|
||||
</div>
|
||||
<div class="nav-content1">
|
||||
<!-- 轮播图 -->
|
||||
<Carousel autoplay :autoplay-speed="5000">
|
||||
<CarouselItem v-for="(item, index) in data.options.listRight" :key="index">
|
||||
<div class="mb_10">
|
||||
<img :src="item[0].img" width="190" height="150" />
|
||||
</div>
|
||||
<div class="mb_10">
|
||||
<img :src="item[1].img" width="190" height="150" />
|
||||
</div>
|
||||
<div>
|
||||
<img :src="item[2].img" width="190" height="150" />
|
||||
</div>
|
||||
</CarouselItem>
|
||||
</Carousel>
|
||||
@@ -23,14 +33,12 @@
|
||||
<div class="person-msg">
|
||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||
<div>Hi,{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
|
||||
<div>Hi,{{ userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile }}</div>
|
||||
<div v-if="userInfo.id">
|
||||
<Button type="error" shape="circle" @click="$router.push('home')">会员中心</Button>
|
||||
<Button type="error" shape="circle">会员中心</Button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Button type="error" @click="$router.push('login')" shape="circle"
|
||||
>请登录</Button
|
||||
>
|
||||
<Button type="error" shape="circle">请登录</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shop-msg">
|
||||
@@ -49,32 +57,34 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {articleList} from '@/api/common.js'
|
||||
import storage from '@/plugins/storage';
|
||||
export default {
|
||||
name: 'modelCarousel',
|
||||
name: 'modelCarousel2',
|
||||
props: ['data'],
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
userInfo: {}, // 用户信息
|
||||
articleList: [], // 常见问题
|
||||
params: { // 请求常见问题参数
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
pageSize: 10,
|
||||
type: 'ANNOUNCEMENT',
|
||||
sort: 'sort'
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getArticleList () {
|
||||
getArticleList () { // 获取常见问题列表
|
||||
articleList(this.params).then(res => {
|
||||
if (res.success) {
|
||||
this.articleList = res.result.records
|
||||
}
|
||||
})
|
||||
},
|
||||
goArticle (id) {
|
||||
goArticle (id) { // 跳转文章详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/article',
|
||||
query: {id}
|
||||
@@ -90,51 +100,74 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.model-carousel {
|
||||
.model-carousel2 {
|
||||
width: 1200px;
|
||||
height: 340px;
|
||||
height: 470px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 导航主体 */
|
||||
.nav-item li {
|
||||
float: left;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.nav-item a {
|
||||
text-decoration: none;
|
||||
color: #555555;
|
||||
}
|
||||
.nav-item a:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
/*大的导航信息,包含导航,幻灯片等*/
|
||||
.nav-body {
|
||||
width: 1200px;
|
||||
height: 340px;
|
||||
height: 470px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.nav-side {
|
||||
height: 100%;
|
||||
width: 200px;
|
||||
float: left;
|
||||
padding: 0px;
|
||||
color: #fff;
|
||||
float: left;
|
||||
background-color: #6e6568;
|
||||
line-height: 470px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/*导航内容*/
|
||||
.nav-content {
|
||||
width: 790px;
|
||||
.nav-content,.nav-content1 {
|
||||
width: 590px;
|
||||
height: 470px;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
position: relative;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.nav-content1{
|
||||
width: 190px;
|
||||
}
|
||||
.nav-right {
|
||||
float: left;
|
||||
width: 210px;
|
||||
width: 190px;
|
||||
margin-left: 10px;
|
||||
.person-msg {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
margin: 20px auto;
|
||||
|
||||
button {
|
||||
height: 25px !important;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.ivu-btn-default {
|
||||
color: $theme_color;
|
||||
border-color: $theme_color;
|
||||
}
|
||||
|
||||
img {
|
||||
margin-bottom: 10px;
|
||||
width: 80px;
|
||||
@@ -31,8 +31,7 @@ export default {
|
||||
return {
|
||||
options: this.data.options // 装修数据
|
||||
};
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -231,4 +231,4 @@ export default {
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -1,16 +1,18 @@
|
||||
<template>
|
||||
<div class="not-enough">
|
||||
<ul class="nav-bar">
|
||||
<li
|
||||
v-for="(item, index) in conData.options.navList"
|
||||
:class="currentIndex === index ? 'curr' : ''"
|
||||
@click="changeCurr(index)"
|
||||
:key="index"
|
||||
>
|
||||
<p>{{ item.title }}</p>
|
||||
<p>{{ item.desc }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="not-enough" ref="obtain" id="demo">
|
||||
<Affix :offset-top="62" @on-change="change">
|
||||
<ul class="nav-bar" v-show="topSearchShow">
|
||||
<li
|
||||
v-for="(item, index) in conData.options.navList"
|
||||
:class="currentIndex === index ? 'curr' : ''"
|
||||
@click="changeCurr(index)"
|
||||
:key="index"
|
||||
>
|
||||
<p @click="gotoDemo">{{ item.title }}</p>
|
||||
<p @click="gotoDemo">{{ item.desc }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
</Affix>
|
||||
<div class="content" v-if="showContent">
|
||||
<div
|
||||
v-for="(item, index) in conData.options.list[currentIndex]"
|
||||
@@ -29,17 +31,26 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
window.addEventListener('scroll',this.handleScrollx,true)
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
screenHeight:document.body.clientHeight,
|
||||
scrollHieght:0,
|
||||
topSearchShow: true, //展示 导航条
|
||||
topIndex: 0, // 当前滚动条位置 (取整)
|
||||
scrollTops: 0,
|
||||
open:'',
|
||||
currentIndex: 0, // 当前分类下标
|
||||
conData: this.data, // 装修数据
|
||||
showContent: true // 是否展示内容
|
||||
showContent: true, // 是否展示内容
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -47,15 +58,40 @@ export default {
|
||||
this.conData = val;
|
||||
},
|
||||
conData: function (val) {
|
||||
this.$emit('content', val);
|
||||
}
|
||||
this.$emit("content", val);
|
||||
},
|
||||
},
|
||||
mounted () {},
|
||||
methods: {
|
||||
changeCurr (index) {
|
||||
this.currentIndex = index;
|
||||
handleScrollx(){
|
||||
// console.log('滚动高度',window.pageYOffset) // 获取滚动条的高度
|
||||
// console.log(this.$refs.obtain.getBoundingClientRect().top) //获取到距离顶部的距离
|
||||
this.scrollHieght = Number(window.pageYOffset);//获取到距离顶部的距离
|
||||
this.scrollTops = Number(this.$refs.obtain.getBoundingClientRect().top); // 获取到距离顶部的距离
|
||||
this.topSearchShow = true; // 展示图钉
|
||||
if(this.scrollTops < -660){ // 超过隐藏
|
||||
this.topSearchShow = false;
|
||||
}
|
||||
},
|
||||
toguid(path,id){
|
||||
var path =path;
|
||||
var Id = id;
|
||||
localStorage.setItem('toId',Id);
|
||||
this.$router.push(path);
|
||||
},
|
||||
change(status){ //获取是否获取到图钉
|
||||
this.open = status
|
||||
},
|
||||
gotoDemo(){ // 跳转到demo的位置
|
||||
if(this.open){ // 获取到图钉之后在跳转当前位置
|
||||
document.querySelector("#demo").scrollIntoView(true);
|
||||
}
|
||||
}
|
||||
//scrollIntoView()可以在所有的HTML元素上调用,通过滚动浏览器窗口或某个容器元素
|
||||
},
|
||||
changeCurr(index) {
|
||||
// 选择分类
|
||||
this.currentIndex = index;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -64,10 +100,13 @@ export default {
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
background-color: rgb(218, 217, 217);
|
||||
background-color: #f8f8f8;
|
||||
height: 60px;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
position: sticky;
|
||||
position: -webkit-sticky;
|
||||
top: 0;
|
||||
li {
|
||||
padding: 0 30px;
|
||||
text-align: center;
|
||||
@@ -141,5 +180,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
323
buyer/src/components/indexDecorate/modelList/Seckill.vue
Normal file
@@ -0,0 +1,323 @@
|
||||
<template>
|
||||
<div class="seckill">
|
||||
<div class="aside hover-pointer" @click="goToSeckill">
|
||||
<div class="title">{{ actName }}</div>
|
||||
<div class="hour">
|
||||
<span>{{ currHour }}:00</span>点场 倒计时
|
||||
</div>
|
||||
<div class="count-down" v-if="actStatus === 1">
|
||||
<span>{{ hours }}</span>
|
||||
<span>{{ minutes }}</span>
|
||||
<span>{{ seconds }}</span>
|
||||
</div>
|
||||
<div class="act-status" v-else>未开始</div>
|
||||
</div>
|
||||
<swiper :options="swiperOption" ref="mySwiper">
|
||||
<swiper-slide v-for="(item,index) in goodsList" :key="index">
|
||||
<div class="content hover-pointer" @click="goToSeckill">
|
||||
<img :src="item.goodsImage" width="140" height="140" :alt="item.goodsName">
|
||||
<div class="ellipsis">{{item.goodsName}}</div>
|
||||
<div>
|
||||
<span>{{ item.price | unitPrice('¥') }}</span>
|
||||
<span>{{ item.originalPrice | unitPrice('¥') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
<div class="swiper-button-prev" slot="button-prev">
|
||||
<Icon type="ios-arrow-back" />
|
||||
</div>
|
||||
<div class="swiper-button-next" slot="button-next">
|
||||
<Icon type="ios-arrow-forward" />
|
||||
</div>
|
||||
</swiper>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 引入插件
|
||||
import { swiper, swiperSlide } from 'vue-awesome-swiper';
|
||||
import 'swiper/dist/css/swiper.css';
|
||||
export default {
|
||||
components: {
|
||||
swiper,
|
||||
swiperSlide
|
||||
},
|
||||
props: {
|
||||
data: Object
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
list: [], // 秒杀时段列表
|
||||
goodsList: [], // 商品列表
|
||||
actStatus: 0, // 0 未开始 1 进行中
|
||||
actName: '限时秒杀', // 活动名称
|
||||
currIndex: 0, // 当前时间段的下标
|
||||
currHour: '00', // 当前秒杀场
|
||||
diffSeconds: 0, // 倒计时秒数
|
||||
hours: 0, // 小时
|
||||
minutes: 0, // 分钟
|
||||
seconds: 0, // 秒
|
||||
interval: null, // 定时器
|
||||
swiperOption: { // 轮播图参数
|
||||
loop: true,
|
||||
slidesPerView: 5,
|
||||
// 设置点击箭头
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev'
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
currIndex (val) {
|
||||
clearInterval(this.interval)
|
||||
this.interval = null
|
||||
this.countDown(val)
|
||||
this.goodsList = this.list[val].seckillGoodsList
|
||||
},
|
||||
diffSeconds (val) {
|
||||
const hours = Math.floor(val / 3600);
|
||||
// 当前秒数 / 60,向下取整
|
||||
// 获取到所有分钟数 3600 / 60 = 60分钟
|
||||
// 对60取模,超过小时数的分钟数
|
||||
const minutes = Math.floor(val / 60) % 60;
|
||||
// 当前的秒数 % 60,获取到 超过小时数、分钟数的秒数(秒数)
|
||||
const seconds = val % 60;
|
||||
this.hours = filteTime(hours)
|
||||
this.minutes = filteTime(minutes)
|
||||
this.seconds = filteTime(seconds)
|
||||
if (val <= 0) {
|
||||
clearInterval(this.interval)
|
||||
this.interval = null
|
||||
}
|
||||
function filteTime (time) {
|
||||
if (time < 10) {
|
||||
return '0' + time
|
||||
} else {
|
||||
return time
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
swiper () { // 轮播组件
|
||||
return this.$refs.mySwiper.swiper;
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
// 销毁前清除定时器
|
||||
clearInterval(this.interval);
|
||||
},
|
||||
mounted () {
|
||||
this.getListByDay()
|
||||
},
|
||||
methods: {
|
||||
goToSeckill () { // 跳转秒杀页面
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/seckill'
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
},
|
||||
countDown (currIndex) { // 倒计时
|
||||
// 0点时间戳
|
||||
let zeroTime = new Date(new Date().toLocaleDateString()).getTime();
|
||||
let currTime = new Date().getTime()
|
||||
let actTime = 0;
|
||||
let nowHour = new Date().getHours(); // 当前小时数
|
||||
if (this.list[currIndex].timeLine > nowHour) { // 活动未开始
|
||||
this.actStatus = 0;
|
||||
actTime = zeroTime + this.list[currIndex].timeLine * 3600 * 1000
|
||||
} else if (this.list[currIndex].timeLine <= nowHour) { // 活动进行中
|
||||
this.actStatus = 1;
|
||||
if (currIndex === this.list.length - 1) { // 如果是最后一个活动,直到24点结束
|
||||
actTime = zeroTime + 24 * 3600 * 1000
|
||||
} else {
|
||||
actTime = zeroTime + this.list[currIndex + 1].timeLine * 3600 * 1000
|
||||
}
|
||||
}
|
||||
this.currHour = this.list[this.currIndex].timeLine
|
||||
this.diffSeconds = Math.floor((actTime - currTime) / 1000)
|
||||
this.interval = setInterval(() => {
|
||||
this.diffSeconds--
|
||||
}, 1000)
|
||||
},
|
||||
getListByDay () { // 当天秒杀活动
|
||||
// const list = [
|
||||
// {
|
||||
// timeLine: 18,
|
||||
// seckillGoodsList: [
|
||||
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12}
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
this.list = this.data.options.list
|
||||
this.goodsList = this.list[0].seckillGoodsList
|
||||
this.countDown(this.currIndex)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.seckill {
|
||||
width: 100%;
|
||||
height: 260px;
|
||||
display: flex;
|
||||
background-color: #eee;
|
||||
.aside {
|
||||
overflow: hidden;
|
||||
width: 190px;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
background-image: url("../../../assets/images/seckillBg.png");
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
margin-top: 31px;
|
||||
}
|
||||
|
||||
.hour {
|
||||
margin-top: 90px;
|
||||
text-align: center;
|
||||
span {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.count-down {
|
||||
margin: 10px 0 0 30px;
|
||||
> span {
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
background-color: #2f3430;
|
||||
margin-right: 20px;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
&::after {
|
||||
content: ":";
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
font-weight: bolder;
|
||||
font-size: 18px;
|
||||
width: 20px;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
> span:last-child::after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.act-status {
|
||||
margin: 10px 0 0 65px;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 200px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
&::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
width: 1px;
|
||||
height: 200px;
|
||||
transform: translateY(-50%);
|
||||
background: linear-gradient(180deg, white, #eeeeee, white);
|
||||
}
|
||||
img {
|
||||
margin-top: 30px;
|
||||
}
|
||||
> div {
|
||||
width: 160px;
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
> div:nth-of-type(1):hover {
|
||||
color: $theme_color;
|
||||
cursor: pointer;
|
||||
}
|
||||
> div:nth-of-type(2) {
|
||||
border: 1px solid $theme_color;
|
||||
line-height: 24px;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
|
||||
span:nth-child(1) {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
width: 92px;
|
||||
background-color: $theme_color;
|
||||
position: relative;
|
||||
&::before {
|
||||
content: " ";
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent white transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 24px 8px 0 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 84px;
|
||||
}
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
color: #999;
|
||||
width: 66px;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.swiper-container {
|
||||
height: 260px;
|
||||
width: 1000px;
|
||||
margin-left: 10px;
|
||||
background-color: #fff;
|
||||
}
|
||||
.swiper-button-prev, .swiper-button-next {
|
||||
background: #ccc;
|
||||
width: 25px;
|
||||
height: 35px;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.swiper-button-prev:hover, .swiper-button-next:hover {
|
||||
background: #aaa;
|
||||
}
|
||||
.swiper-button-prev {
|
||||
left: 0;
|
||||
border-bottom-right-radius: 18px;
|
||||
border-top-right-radius: 18px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.swiper-button-next {
|
||||
right: 0;
|
||||
border-top-left-radius: 18px;
|
||||
border-bottom-left-radius: 18px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,289 +0,0 @@
|
||||
<template>
|
||||
<div class="seckill">
|
||||
<div class="aside hover-pointer" @click="goPromotion">
|
||||
<div class="title">{{ actName }}</div>
|
||||
<div class="hour">
|
||||
<span>{{ currHour }}:00</span>点场 倒计时
|
||||
</div>
|
||||
<div class="count-down" v-if="actStatus === 1">
|
||||
<span>{{ hours }}</span
|
||||
><span>{{ minutes }}</span
|
||||
><span>{{ seconds }}</span>
|
||||
</div>
|
||||
<div class="act-status" v-else>
|
||||
{{ actStatus == 0 ? "未开始" : "已结束" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<swiper ref="mySwiper" :options="swiperOptions">
|
||||
<swiper-slide
|
||||
v-for="(item, index) in options.list[0].goodsList"
|
||||
:key="index"
|
||||
class="swiper-slide"
|
||||
>
|
||||
<div class="content hover-pointer" @click="goPromotion">
|
||||
<img :src="item.img" width="140" height="140" :alt="item.name" />
|
||||
<div class="ellipsis">{{ item.name }}</div>
|
||||
<div>
|
||||
<span>{{ item.price | unitPrice("¥") }}</span>
|
||||
<span>{{ item.originalPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper';
|
||||
import 'swiper/swiper-bundle.css';
|
||||
export default {
|
||||
components: {
|
||||
Swiper,
|
||||
SwiperSlide
|
||||
},
|
||||
directives: {
|
||||
swiper: directive
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
options: this.data.options, // 装修数据
|
||||
actStatus: 0, // 0 未开始 1 进行中 2 已结束
|
||||
actName: '限时秒杀', // 活动名称
|
||||
currHour: '00', // 当前秒杀场
|
||||
diffSeconds: 0, // 倒计时秒数
|
||||
days: 0, // 天
|
||||
hours: 0, // 小时
|
||||
minutes: 0, // 分钟
|
||||
seconds: 0, // 秒
|
||||
interval: undefined, // 定时器
|
||||
swiperOptions: { // 轮播图参数
|
||||
slidesPerView: 5,
|
||||
autoplay: true,
|
||||
loop: true
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
diffSeconds (val) {
|
||||
const hours = Math.floor(val / 3600);
|
||||
// 当前秒数 / 60,向下取整
|
||||
// 获取到所有分钟数 3600 / 60 = 60分钟
|
||||
// 对60取模,超过小时数的分钟数
|
||||
const minutes = Math.floor(val / 60) % 60;
|
||||
// 当前的秒数 % 60,获取到 超过小时数、分钟数的秒数(秒数)
|
||||
const seconds = val % 60;
|
||||
this.hours = hours < 10 ? '0' + hours : hours;
|
||||
this.minutes = minutes < 10 ? '0' + minutes : minutes;
|
||||
this.seconds = seconds < 10 ? '0' + seconds : seconds;
|
||||
|
||||
if (val === 0) {
|
||||
clearInterval(this.interval);
|
||||
this.hours = 0;
|
||||
this.minutes = 0;
|
||||
this.seconds = 0;
|
||||
this.countDown(this.options.list);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.countDown(this.options.list);
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.interval);
|
||||
},
|
||||
methods: {
|
||||
// 倒计时
|
||||
countDown (list) {
|
||||
/**
|
||||
* 默认倒计时两小时
|
||||
* 如果没有开始,则显示未开始
|
||||
* 进行中显示倒计时 + 时间
|
||||
* 今天的秒杀结束则显示已结束
|
||||
*/
|
||||
let nowHour = new Date().getHours();
|
||||
if (nowHour < Number(list[0].time)) {
|
||||
// 活动未开始
|
||||
this.currHour = list[0].time;
|
||||
this.actStatus = 0;
|
||||
} else if (nowHour >= Number(list[list.length - 1].time + 2)) {
|
||||
// 活动已结束
|
||||
this.actStatus = 2;
|
||||
this.currHour = list[list.length - 1].time;
|
||||
} else {
|
||||
// 活动进行中
|
||||
this.actStatus = 1;
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (nowHour === Number(list[i].time)) {
|
||||
this.currHour = list[i].time;
|
||||
}
|
||||
if (
|
||||
nowHour > Number(list[i].time) &&
|
||||
nowHour < Number(list[i].time + 2)
|
||||
) {
|
||||
this.currHour = list[i].time;
|
||||
}
|
||||
}
|
||||
// 当前0点时间戳
|
||||
let zeroTime = new Date(new Date().toLocaleDateString()).getTime();
|
||||
// 活动倒计时
|
||||
this.diffSeconds = Math.floor((zeroTime + 3600 * 1000 * (this.currHour + 2) - new Date().getTime()) / 1000);
|
||||
this.interval = setInterval(() => {
|
||||
this.diffSeconds--;
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
goPromotion () {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/seckill'
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.seckill {
|
||||
width: 100%;
|
||||
height: 260px;
|
||||
display: flex;
|
||||
.aside {
|
||||
overflow: hidden;
|
||||
width: 190px;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
background-image: url("../../../assets/images/seckillBg.png");
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
margin-top: 31px;
|
||||
}
|
||||
|
||||
.hour {
|
||||
margin-top: 90px;
|
||||
text-align: center;
|
||||
span {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.count-down {
|
||||
margin: 10px 0 0 30px;
|
||||
> span {
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
background-color: #2f3430;
|
||||
margin-right: 20px;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
&::after {
|
||||
content: ":";
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
font-weight: bolder;
|
||||
font-size: 18px;
|
||||
width: 20px;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
> span:last-child::after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.act-status {
|
||||
margin: 10px 0 0 65px;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.section {
|
||||
width: 1000px;
|
||||
// background: #efefef;
|
||||
.swiper-slide {
|
||||
height: 260px;
|
||||
.content {
|
||||
width: 200px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
&::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
width: 1px;
|
||||
height: 200px;
|
||||
transform: translateY(-50%);
|
||||
background: linear-gradient(180deg, white, #eeeeee, white);
|
||||
}
|
||||
img {
|
||||
margin-top: 30px;
|
||||
}
|
||||
> div {
|
||||
width: 160px;
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
> div:nth-of-type(1):hover {
|
||||
color: $theme_color;
|
||||
cursor: pointer;
|
||||
}
|
||||
> div:nth-of-type(2) {
|
||||
border: 1px solid $theme_color;
|
||||
line-height: 24px;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
|
||||
span:nth-child(1) {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
width: 92px;
|
||||
background-color: $theme_color;
|
||||
position: relative;
|
||||
&::before {
|
||||
content: " ";
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent white transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 24px 8px 0 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 84px;
|
||||
}
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
color: #999;
|
||||
width: 66px;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
@@ -1,3 +1 @@
|
||||
## 此组件为结算页面修改发票信息使用 后续可以复用到个人信息添加发票页面
|
||||
|
||||
### 目前没有参数,之后会设置一个参数接收历史的单位发票数据
|
||||
@@ -4,49 +4,39 @@
|
||||
<p slot="header">
|
||||
<span>发票信息</span>
|
||||
</p>
|
||||
<!-- <div>
|
||||
<div>为响应环保,自营全面启用电子普通发票,非自营发票由第三方商家实际开具。</div>
|
||||
<div>电子普通发票是税务机关认可的有效收付款凭证,与纸质普通发票具有同等法律效力,可用于报销入账、售后维权等。</div>
|
||||
<div>如商品由第三方卖家销售,发票类型及内容将由该卖家决定。</div>
|
||||
</div> -->
|
||||
<!-- 普通发票 -->
|
||||
<div class="nav-content">
|
||||
<Form
|
||||
:model="invoiceForm"
|
||||
ref="form"
|
||||
label-position="left"
|
||||
:rules="ruleInline"
|
||||
:label-width="110"
|
||||
>
|
||||
<Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
|
||||
<FormItem label="发票类型">
|
||||
<RadioGroup v-model="invoiceForm.type" type="button" button-style="solid">
|
||||
<RadioGroup v-model="invoice" type="button" button-style="solid">
|
||||
<Radio @on-change="changeInvoice" :label="1">电子普通发票</Radio>
|
||||
<Radio :label="2" :disabled="true">增值税专用发票</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="发票抬头">
|
||||
<RadioGroup v-model="type" @on-change="changeInvoice" type="button" button-style="solid">
|
||||
<Radio :label="1">个人</Radio>
|
||||
<Radio :label="2">单位</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="发票抬头"
|
||||
v-if="invoiceForm.type == 2"
|
||||
prop="receiptTitle"
|
||||
>
|
||||
<FormItem label="个人名称" v-if="type === 1" prop="receiptTitle">
|
||||
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="纳税人识别号"
|
||||
v-if="invoiceForm.type == 2"
|
||||
prop="taxpayerId"
|
||||
>
|
||||
<FormItem label="单位名称" v-if="type === 2" prop="receiptTitle">
|
||||
<i-input v-model="invoiceForm.receiptTitle"></i-input>
|
||||
</FormItem>
|
||||
<FormItem label="纳税人识别号" v-if="type === 2" prop="taxpayerId">
|
||||
<i-input v-model="invoiceForm.taxpayerId"></i-input>
|
||||
</FormItem>
|
||||
<FormItem label="发票内容">
|
||||
<RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
|
||||
<Radio label="不开发票">不开发票</Radio>
|
||||
<Radio label="商品明细">商品明细</Radio>
|
||||
<Radio label="商品类别">商品类别</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div style="text-align: center">
|
||||
<Button type="primary" :loading="loading" @click="save">保存发票信息</Button>
|
||||
<Button type="primary" :loading="loading" @click="submit">保存发票信息</Button>
|
||||
<Button type="default" @click="invoiceAvailable = false">取消</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,23 +44,23 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { saveReceipt } from '@/api/member.js';
|
||||
import { receiptSelect } from '@/api/cart.js';
|
||||
import { TINumber } from '@/plugins/RegExp.js';
|
||||
export default {
|
||||
name: 'invoiceModal',
|
||||
data () {
|
||||
return {
|
||||
invoice: 1, // 发票类型
|
||||
invoiceAvailable: false, // 模态框显隐
|
||||
loading: false, // 提交状态
|
||||
invoiceForm: { // 发票表单
|
||||
invoiceForm: {
|
||||
// 普票表单
|
||||
receiptTitle: '', // 发票抬头
|
||||
taxpayerId: '', // 纳税人识别号
|
||||
receiptContent: '不开发票', // 发票内容
|
||||
type: 1 // 1 个人 2 单位
|
||||
receiptContent: '商品明细' // 发票内容
|
||||
},
|
||||
type: 1, // 1 个人 2 单位
|
||||
ruleInline: {
|
||||
receiptTitle: [{ required: true, message: '请填写公司名称' }],
|
||||
taxpayerId: [
|
||||
{ required: true, message: '请填写纳税人识别号' },
|
||||
{ pattern: TINumber, message: '请填写正确的纳税人识别号' }
|
||||
@@ -78,73 +68,76 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
save () {
|
||||
if (this.invoiceForm.type === 1) {
|
||||
// 个人
|
||||
let flag = true;
|
||||
this.receiptItems.forEach((e) => {
|
||||
if (
|
||||
e.receiptTitle === '个人' &&
|
||||
e.receiptContent === this.invoiceForm.receiptContent
|
||||
) {
|
||||
this.$emit('change', e);
|
||||
flag = false;
|
||||
this.invoiceAvailable = false;
|
||||
}
|
||||
});
|
||||
props: ['invoiceData'],
|
||||
watch: {
|
||||
// 回显的发票信息
|
||||
invoiceData: {
|
||||
handler (val) {
|
||||
this.invoiceForm = { ...val };
|
||||
|
||||
if (flag) {
|
||||
let params = {
|
||||
receiptTitle: '个人',
|
||||
receiptContent: this.invoiceForm.receiptContent
|
||||
};
|
||||
this.loading = true;
|
||||
saveReceipt(params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$emit('change', res.result);
|
||||
this.invoiceAvailable = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
if (val.taxpayerId) {
|
||||
this.type = 2;
|
||||
} else {
|
||||
this.type = 1;
|
||||
}
|
||||
} else {
|
||||
// 单位
|
||||
},
|
||||
deep: true,
|
||||
immeadite: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 选择发票抬头
|
||||
*/
|
||||
changeInvoice (val) {
|
||||
this.$nextTick(() => {
|
||||
this.type = val;
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 保存判断
|
||||
*/
|
||||
save () {
|
||||
let flage = true;
|
||||
|
||||
// 保存分为两种类型,个人以及企业
|
||||
const { receiptTitle } = JSON.parse(
|
||||
JSON.stringify(this.invoiceForm)
|
||||
);
|
||||
// 判断是否填写发票抬头
|
||||
if (!receiptTitle) {
|
||||
this.$Message.error('请填写发票抬头!');
|
||||
flage = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.type === 2) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
let params = {
|
||||
receiptTitle: this.invoiceForm.receiptTitle,
|
||||
taxpayerId: this.invoiceForm.taxpayerId,
|
||||
receiptContent: this.invoiceForm.receiptContent
|
||||
};
|
||||
let flag = true;
|
||||
this.receiptItems.forEach((e) => {
|
||||
if (e.taxpayerId === params.taxpayerId) {
|
||||
flag = false;
|
||||
}
|
||||
});
|
||||
if (!flag) {
|
||||
this.$Message.error('已有当前税号的发票信息,请直接选择已有发票');
|
||||
} else {
|
||||
saveReceipt(params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$emit('change', res.result);
|
||||
this.invoiceAvailable = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
if (!valid) {
|
||||
flage = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
delete this.invoiceForm.taxpayerId;
|
||||
}
|
||||
|
||||
return flage;
|
||||
},
|
||||
// 保存发票信息
|
||||
async submit () {
|
||||
if (this.save()) {
|
||||
this.loading = true;
|
||||
let submit = {
|
||||
way: this.$route.query.way,
|
||||
...this.invoiceForm
|
||||
};
|
||||
let receipt = await receiptSelect(submit);
|
||||
if (receipt.success) {
|
||||
this.$emit('change', true);
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<card _Title="猜你喜欢" :_Size="16"> </card>
|
||||
|
||||
<Row :gutter="12" class="likeList">
|
||||
<Col
|
||||
:span="4"
|
||||
class="likeItem"
|
||||
v-for="(item, index) in goodsData"
|
||||
:key="index"
|
||||
>
|
||||
<img :src="item.img" alt="" />
|
||||
<div class="likeTitle">{{ item.title }}</div>
|
||||
<div class="likePrice">{{ item.price | unitPrice }}</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'like',
|
||||
data () {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.wrapper {
|
||||
@include white_background_color();
|
||||
}
|
||||
.likeList {
|
||||
padding: 0 12px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
> .likeItem {
|
||||
/*width: 210px;*/
|
||||
/*margin: 10px 5px;*/
|
||||
|
||||
> img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
> .likeTitle,
|
||||
.likePrice {
|
||||
margin: 6px 0;
|
||||
text-align: center;
|
||||
display: -webkit-box;
|
||||
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
-webkit-line-clamp: 2;
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
> .likePrice {
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -31,6 +31,7 @@
|
||||
<script>
|
||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||
import { handleRegion } from '@/api/address.js';
|
||||
|
||||
export default {
|
||||
name: 'map',
|
||||
props: {
|
||||
@@ -41,6 +42,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
showMap: false, // 展示地图
|
||||
mapSearch: '', // 地图搜索
|
||||
map: null, // 初始化地图
|
||||
@@ -53,6 +55,7 @@ export default {
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听搜索框搜索地图
|
||||
mapSearch: function (val) {
|
||||
this.searchOfMap(val);
|
||||
}
|
||||
@@ -85,9 +88,9 @@ export default {
|
||||
this.$emit('getAddress', this.addrContent);
|
||||
}
|
||||
},
|
||||
init () {
|
||||
init () { // 初始化地图
|
||||
AMapLoader.load({
|
||||
key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
key: this.config.aMapKey, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||
plugins: [
|
||||
'AMap.ToolBar',
|
||||
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
props: ['addressId'],
|
||||
mounted () {},
|
||||
methods: {
|
||||
change (val, selectedData) {
|
||||
change (val, selectedData) { // 选择地区
|
||||
/**
|
||||
* @returns [regionId,region]
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
selectedData[selectedData.length - 1].__label.split('/')
|
||||
]);
|
||||
},
|
||||
loadData (item, callback) {
|
||||
loadData (item, callback) { // 加载数据
|
||||
item.loading = true;
|
||||
getRegion(item.value).then((res) => {
|
||||
if (res.result.length <= 0) {
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
async init () {
|
||||
async init () { // 初始化地图数据
|
||||
let data = await getRegion(0);
|
||||
let arr = [];
|
||||
data.result.forEach((item) => {
|
||||
@@ -167,7 +167,6 @@ export default {
|
||||
watch: {
|
||||
addressId: {
|
||||
handler: function (v) {
|
||||
console.log(v);
|
||||
if (v) {
|
||||
this.reviewData();
|
||||
} else {
|
||||
@@ -175,9 +174,6 @@ export default {
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
addr (v) {
|
||||
console.log(v);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
361
buyer/src/components/nav/CateNav.vue
Normal file
@@ -0,0 +1,361 @@
|
||||
<template>
|
||||
<div class="cate-nav">
|
||||
<div class="nav-con">
|
||||
<div
|
||||
class="all-categories hover-pointer"
|
||||
@mouseenter="showFirstList = true"
|
||||
@mouseleave="showFirstList = false"
|
||||
>
|
||||
全部商品分类
|
||||
</div>
|
||||
<ul class="nav-item" v-if="showNavBar">
|
||||
<li
|
||||
class="nav-lis"
|
||||
v-for="(item, index) in navList.list"
|
||||
:key="index"
|
||||
@click="linkTo(item.url)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 全部商品分类 -->
|
||||
<div
|
||||
class="cate-list"
|
||||
v-show="showAlways || showFirstList"
|
||||
@mouseenter="showFirstList = true"
|
||||
@mouseleave="showFirstList = false"
|
||||
>
|
||||
<!-- 第一级分类 -->
|
||||
<div
|
||||
class="nav-side"
|
||||
:class="{ 'large-nav': large, 'opacity-nav': opacity }"
|
||||
@mouseleave="panel = false"
|
||||
>
|
||||
<ul>
|
||||
<li
|
||||
v-for="(item, index) in cateList"
|
||||
:key="index"
|
||||
@mouseenter="showDetail(index)"
|
||||
>
|
||||
<span class="nav-side-item" @click="goGoodsList(item.id)">{{
|
||||
item.name
|
||||
}}</span>
|
||||
<span v-for="(second, secIndex) in item.children" :key="secIndex">
|
||||
<span v-if="secIndex < 2"> / </span>
|
||||
<span
|
||||
@click="goGoodsList(second.id, second.parentId)"
|
||||
class="nav-side-item"
|
||||
v-if="secIndex < 2"
|
||||
>{{ second.name }}</span
|
||||
>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 展开分类 -->
|
||||
<div
|
||||
class="detail-item-panel"
|
||||
:style="{ minHeight: large ? '470px' : '340px' }"
|
||||
v-show="panel"
|
||||
@mouseenter="panel = true"
|
||||
@mouseleave="panel = false"
|
||||
>
|
||||
<div class="nav-detail-item">
|
||||
<template v-for="(item, index) in panelData">
|
||||
<span
|
||||
@click="goGoodsList(item.id, item.parentId)"
|
||||
v-if="index < 8"
|
||||
:key="index"
|
||||
>{{ item.name }}<Icon type="ios-arrow-forward"
|
||||
/></span>
|
||||
</template>
|
||||
</div>
|
||||
<ul>
|
||||
<li
|
||||
v-for="(items, index) in panelData"
|
||||
:key="index"
|
||||
class="detail-item-row"
|
||||
>
|
||||
<span
|
||||
class="detail-item-title"
|
||||
@click="goGoodsList(items.id, items.parentId)"
|
||||
>
|
||||
{{ items.name }} <Icon type="ios-arrow-forward" />
|
||||
<span class="glyphicon glyphicon-menu-right"></span>
|
||||
</span>
|
||||
<div>
|
||||
<span
|
||||
v-for="(item, subIndex) in items.children"
|
||||
@click="goGoodsList(item.id, items.id, items.parentId)"
|
||||
:key="subIndex"
|
||||
class="detail-item"
|
||||
>{{ item.name }}</span
|
||||
>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCategory } from "@/api/goods";
|
||||
import storage from "@/plugins/storage.js";
|
||||
export default {
|
||||
name: "GoodsListNav",
|
||||
props: {
|
||||
showAlways: {
|
||||
// 总是显示下拉分类
|
||||
default: false,
|
||||
type: Boolean,
|
||||
},
|
||||
showNavBar: {
|
||||
// 显示全部商品分类右侧导航条
|
||||
default: true,
|
||||
type: Boolean,
|
||||
},
|
||||
hover: {
|
||||
default: false,
|
||||
type: Boolean,
|
||||
},
|
||||
large: {
|
||||
// 是否更高的高度
|
||||
default: false,
|
||||
type: Boolean,
|
||||
},
|
||||
opacity: {
|
||||
// 是否背景透明
|
||||
default: false,
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
panel: false, // 二级分类展示
|
||||
panelData: [], // 二级分类数据
|
||||
showFirstList: false, // 始终展示一级列表
|
||||
cateList: [], // 商品分类
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
navList() {
|
||||
// 导航列表
|
||||
if (storage.getItem("navList")) {
|
||||
return JSON.parse(storage.getItem("navList"));
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getCate() {
|
||||
// 获取分类数据
|
||||
if (this.hover) return false;
|
||||
getCategory(0).then((res) => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
this.$store.commit("SET_CATEGORY", res.result);
|
||||
// 过期时间
|
||||
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||
// 存放过期时间
|
||||
localStorage.setItem("category_expiration_time", expirationTime);
|
||||
// 存放分类信息
|
||||
localStorage.setItem("category", JSON.stringify(res.result));
|
||||
}
|
||||
});
|
||||
},
|
||||
showDetail(index) {
|
||||
// 展示全部分类
|
||||
this.panel = true;
|
||||
this.panelData = this.cateList[index].children;
|
||||
},
|
||||
goGoodsList(id, secondId, firstId) {
|
||||
// 分类共有三级,传全部分类过去
|
||||
const arr = [firstId, secondId, id];
|
||||
if (!arr[1]) {
|
||||
arr.splice(0, 2);
|
||||
}
|
||||
if (!arr[0]) {
|
||||
arr.shift();
|
||||
}
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: "/goodsList",
|
||||
query: { categoryId: arr.toString() },
|
||||
});
|
||||
window.open(routerUrl.href, "_blank");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (
|
||||
localStorage.getItem("category") &&
|
||||
localStorage.getItem("category_expiration_time")
|
||||
) {
|
||||
// 如果缓存过期,则获取最新的信息
|
||||
if (new Date() > localStorage.getItem("category_expiration_time")) {
|
||||
this.getCate();
|
||||
return;
|
||||
}
|
||||
this.cateList = JSON.parse(localStorage.getItem("category"));
|
||||
} else {
|
||||
this.getCate();
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.nav-lis:hover {
|
||||
color: $theme_color !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cate-nav {
|
||||
width: 1200px;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
/** 商品分类 */
|
||||
.nav-con {
|
||||
width: 1200px;
|
||||
height: 40px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
.all-categories {
|
||||
width: 200px;
|
||||
line-height: 40px;
|
||||
color: #fff;
|
||||
background-color: $theme_color;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: none;
|
||||
}
|
||||
.nav-item {
|
||||
width: 1000px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
// background-color: #eee;
|
||||
display: flex;
|
||||
li {
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
margin-left: 20px;
|
||||
color: rgb(129, 127, 127);
|
||||
font-size: 15px;
|
||||
&:hover {
|
||||
color: #e1251b;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 分类列表
|
||||
.cate-list {
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.nav-side {
|
||||
width: 200px;
|
||||
float: left;
|
||||
padding: 0px;
|
||||
color: #fff;
|
||||
background-color: #6e6568;
|
||||
height: 335px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.large-nav {
|
||||
height: 470px;
|
||||
ul > li {
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
.opacity-nav {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.nav-side ul {
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
padding-top: 5px;
|
||||
list-style: none;
|
||||
}
|
||||
.nav-side li {
|
||||
padding: 7.5px 0;
|
||||
padding-left: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
&:hover {
|
||||
background: #999395;
|
||||
}
|
||||
}
|
||||
.nav-side-item:hover {
|
||||
cursor: pointer;
|
||||
color: #e1251b;
|
||||
}
|
||||
|
||||
/*显示商品详细信息*/
|
||||
.detail-item-panel {
|
||||
width: 1000px;
|
||||
min-height: 340px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 0px 15px #ccc;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 200px;
|
||||
z-index: 1000;
|
||||
padding: 15px;
|
||||
}
|
||||
.nav-detail-item {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 15px;
|
||||
cursor: pointer;
|
||||
color: #eee;
|
||||
}
|
||||
.nav-detail-item span {
|
||||
padding: 6px;
|
||||
padding-left: 12px;
|
||||
margin-right: 15px;
|
||||
font-size: 12px;
|
||||
background-color: #6e6568;
|
||||
}
|
||||
.nav-detail-item span:hover {
|
||||
background-color: #e1251b;
|
||||
}
|
||||
.detail-item-panel li {
|
||||
line-height: 30px;
|
||||
}
|
||||
.detail-item-title {
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
color: #555555;
|
||||
padding-right: 10px;
|
||||
width: 81px;
|
||||
text-align: right;
|
||||
}
|
||||
.detail-item-title:hover {
|
||||
color: #e1251b;
|
||||
}
|
||||
.detail-item-row {
|
||||
display: flex;
|
||||
> div {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.detail-item {
|
||||
font-size: 12px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid #ccc;
|
||||
&:first-child {
|
||||
border: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
.detail-item:hover {
|
||||
color: #e1251b;
|
||||
}
|
||||
</style>
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
<!-- 其他筛选项 -->
|
||||
<template v-for="(tag, tagIndex) in tagsContent">
|
||||
<div class="other" v-if="tag.show && tagIndex !== 0" :key="tagIndex">
|
||||
<div class="other" v-if="tag.show && tagIndex !== 0" v-show="tagIndex < showTagCount" :key="tagIndex">
|
||||
<div>
|
||||
<strong>{{ tag.key }}:</strong>
|
||||
</div>
|
||||
@@ -153,6 +153,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div @click="moreOptions" v-if="tagsContent.length>4" class="more-options">{{showTagCount===5?'更多筛选项':'收起筛选项'}}<Icon :type="showTagCount===5?'ios-arrow-down':'ios-arrow-up'" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -168,6 +169,7 @@ export default {
|
||||
first: {},
|
||||
second: {}
|
||||
},
|
||||
showTagCount: 5, // 展示的搜索项数量
|
||||
multiple: false, // 多选
|
||||
tagsContent: [
|
||||
// 标签
|
||||
@@ -181,15 +183,18 @@ export default {
|
||||
multSelected: [], // 多选分类
|
||||
selectedItem: [], // 已选分类集合 顶部展示
|
||||
brandIds: [], // 品牌id合集
|
||||
params: {}, // 请求参数
|
||||
cateList: [] // 全部商品分类
|
||||
params: {} // 请求参数
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
cateList () { // 商品分类
|
||||
return this.$store.state.category || []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selectedItem: {
|
||||
// 监听已选条件,来调用列表接口
|
||||
handler (val) {
|
||||
console.log(val);
|
||||
let classification = [];
|
||||
this.params.brandId = ''
|
||||
this.params.prop = ''
|
||||
@@ -209,7 +214,7 @@ export default {
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$route': {
|
||||
'$route': { // 监听路由
|
||||
handler (val, oVal) {
|
||||
if (this.$route.query.categoryId) {
|
||||
let cateId = this.$route.query.categoryId.split(',')
|
||||
@@ -227,8 +232,12 @@ export default {
|
||||
methods: {
|
||||
getNav () { // 获取商品分类,分类下展示
|
||||
if (!this.$route.query.categoryId) return
|
||||
|
||||
this.cateList = JSON.parse(localStorage.getItem('category'))
|
||||
if (!this.cateList.length) { // 商品分类存储在localstorage,接口未调用成功前再次刷新数据
|
||||
setTimeout(() => {
|
||||
this.getNav()
|
||||
}, 500)
|
||||
return
|
||||
}
|
||||
const arr = this.$route.query.categoryId.split(',')
|
||||
if (arr.length > 0) {
|
||||
this.tabBar = this.cateList.filter(e => {
|
||||
@@ -248,7 +257,7 @@ export default {
|
||||
this.$set(this.tabBar, 'second', second)
|
||||
}
|
||||
},
|
||||
cateClick (item, index) { // 点选分类
|
||||
cateClick (item, index) { // 点选分类
|
||||
switch (index) {
|
||||
case 1:
|
||||
this.$router.push({
|
||||
@@ -370,9 +379,14 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 展示更多搜索项
|
||||
moreOptions () {
|
||||
this.showTagCount = this.showTagCount === 5 ? 100 : 5
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// 有分类id就根据id搜索
|
||||
if (this.$route.query.categoryId) {
|
||||
let cateId = this.$route.query.categoryId.split(',')
|
||||
Object.assign(this.params, this.$route.query)
|
||||
@@ -410,7 +424,7 @@ export default {
|
||||
background: #fff;
|
||||
border: 1px solid #999;
|
||||
padding: 0 8px;
|
||||
width: 85px;
|
||||
min-width: 85px;
|
||||
text-align: center;
|
||||
margin: 0 3px;
|
||||
&:hover {
|
||||
@@ -502,8 +516,8 @@ export default {
|
||||
/** 筛选主体 */
|
||||
.content {
|
||||
background: #fff;
|
||||
border-top: 1px solid #999;
|
||||
border-bottom: 1px solid #999;
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 10px 0;
|
||||
}
|
||||
/** 品牌 start */
|
||||
@@ -531,7 +545,7 @@ export default {
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
float: left;
|
||||
line-height: 50px;
|
||||
line-height: 45px;
|
||||
border: 1px solid #ddd;
|
||||
margin: -1px -1px 0 0;
|
||||
overflow: hidden;
|
||||
@@ -544,6 +558,7 @@ export default {
|
||||
|
||||
&:hover {
|
||||
border-color: $theme_color;
|
||||
border: 2px solid $theme_color;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: relative;
|
||||
@@ -635,7 +650,8 @@ export default {
|
||||
> div:first-child {
|
||||
width: 100px;
|
||||
background: #eee;
|
||||
padding: 10px 0 0 10px;
|
||||
padding-left: 10px;
|
||||
line-height: 30px;
|
||||
}
|
||||
> div:last-child {
|
||||
width: 1100px;
|
||||
@@ -651,7 +667,7 @@ export default {
|
||||
height: 30px;
|
||||
float: left;
|
||||
line-height: 30px;
|
||||
color: $primary_color;
|
||||
color:#4d9cf1;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
font-size: 12px;
|
||||
@@ -699,6 +715,15 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.more-options{
|
||||
margin: 5px;
|
||||
color: #4d9cf1;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
text-align: right;
|
||||
}
|
||||
.more-options:hover{
|
||||
color:#0165d1;
|
||||
}
|
||||
/** 其他筛选项 end */
|
||||
</style>
|
||||
|
||||
@@ -1,285 +0,0 @@
|
||||
<template>
|
||||
<div class="cate-nav">
|
||||
<div class="nav-con">
|
||||
<div class="all-categories hover-pointer" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">全部商品分类</div>
|
||||
<ul class="nav-item" v-if="showNavBar">
|
||||
<li
|
||||
class="hover-color"
|
||||
v-for="(item, index) in navList.list"
|
||||
:key="index"
|
||||
@click="linkTo(item.url)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 侧边导航 -->
|
||||
<div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
|
||||
<div class="nav-side">
|
||||
<ul>
|
||||
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" @mouseleave="panel = false">
|
||||
<span class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span>
|
||||
<span v-for="(second, secIndex) in item.children" :key="secIndex">
|
||||
<span v-if="secIndex < 2" > / </span>
|
||||
<span @click="goGoodsList(second.id, second.parentId)" class="nav-side-item" v-if="secIndex < 2">{{second.name}}</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<transition name="fade">
|
||||
<div
|
||||
class="detail-item-panel"
|
||||
:duration="{ enter: 100, leave: 100 }"
|
||||
v-show="panel"
|
||||
@mouseenter="panel = true"
|
||||
ref="itemPanel1"
|
||||
@mouseleave="panel = false"
|
||||
>
|
||||
<div class="nav-detail-item">
|
||||
<template v-for="(item, index) in panelData">
|
||||
<span @click="goGoodsList(item.id, item.parentId)" v-if="index < 8" :key="index">{{ item.name }}<Icon type="ios-arrow-forward" /></span>
|
||||
</template>
|
||||
</div>
|
||||
<ul>
|
||||
<li
|
||||
v-for="(items, index) in panelData"
|
||||
:key="index"
|
||||
class="detail-item-row"
|
||||
>
|
||||
<span class="detail-item-title" @click="goGoodsList(items.id,items.parentId)">
|
||||
{{ items.name }} <Icon type="ios-arrow-forward" />
|
||||
<span class="glyphicon glyphicon-menu-right"></span>
|
||||
</span>
|
||||
<div>
|
||||
<span v-for="(item, subIndex) in items.children" @click="goGoodsList(item.id,items.id,items.parentId)"
|
||||
:key="subIndex" class="detail-item">{{ item.name }}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCategory } from '@/api/goods';
|
||||
import storage from '@/plugins/storage.js'
|
||||
export default {
|
||||
name: 'GoodsListNav',
|
||||
props: {
|
||||
showAlways: { // 总是显示下拉分类
|
||||
default: false,
|
||||
type: Boolean
|
||||
},
|
||||
showNavBar: { // 显示全部商品分类右侧导航条
|
||||
default: true,
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
cateList: [], // 分类数据
|
||||
panel: false, // 二级分类展示
|
||||
panelData: [], // 二级分类数据
|
||||
showFirstList: false // 始终展示一级列表
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
navList () {
|
||||
return JSON.parse(storage.getItem('navList')) || []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCate () {
|
||||
getCategory(0).then(res => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
localStorage.setItem('category', JSON.stringify(res.result))
|
||||
}
|
||||
});
|
||||
},
|
||||
showDetail (index) {
|
||||
this.panel = true
|
||||
this.panelData = this.cateList[index].children
|
||||
},
|
||||
goGoodsList (id, secondId, firstId) { // 分类共有三级,传全部分类过去
|
||||
const arr = [firstId, secondId, id]
|
||||
if (!arr[1]) {
|
||||
arr.splice(0, 2)
|
||||
}
|
||||
if (!arr[0]) {
|
||||
arr.shift()
|
||||
}
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: '/goodsList',
|
||||
query: {categoryId: arr.toString()}
|
||||
})
|
||||
window.open(routerUrl.href, '_blank')
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (localStorage.getItem('category')) {
|
||||
this.cateList = JSON.parse(localStorage.getItem('category'))
|
||||
} else {
|
||||
this.getCate()
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cate-nav{
|
||||
width: 1200px;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
/** 商品分类 */
|
||||
.nav-con {
|
||||
width: 1200px;
|
||||
height: 40px;
|
||||
// background: #eee;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
.all-categories {
|
||||
width: 200px;
|
||||
line-height: 40px;
|
||||
color: #fff;
|
||||
background-color: $theme_color;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
.nav-item {
|
||||
width: 1000px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
background-color: #eee;
|
||||
display: flex;
|
||||
li {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-left: 20px;
|
||||
color: rgb(89, 88, 88);
|
||||
font-size: 15px;
|
||||
&:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.cate-list{
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
}
|
||||
.nav-item li {
|
||||
float: left;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.nav-item a {
|
||||
text-decoration: none;
|
||||
color: #555555;
|
||||
}
|
||||
.nav-item a:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
|
||||
.nav-side {
|
||||
width: 200px;
|
||||
float: left;
|
||||
padding: 0px;
|
||||
color: #fff;
|
||||
background-color: #6e6568;
|
||||
height: 335px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.nav-side ul {
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
padding-top: 5px;
|
||||
list-style: none;
|
||||
}
|
||||
.nav-side li {
|
||||
padding: 7.5px 0;
|
||||
padding-left: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.nav-side li:hover {
|
||||
background: #999395;
|
||||
}
|
||||
.nav-side-item:hover {
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
}
|
||||
|
||||
/*显示商品详细信息*/
|
||||
.detail-item-panel {
|
||||
width: 815px;
|
||||
min-height: 340px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 0px 15px #ccc;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 200px;
|
||||
z-index: 1000;
|
||||
padding: 15px;
|
||||
}
|
||||
.nav-detail-item {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 15px;
|
||||
cursor: pointer;
|
||||
color: #eee;
|
||||
}
|
||||
.nav-detail-item span {
|
||||
padding: 6px;
|
||||
padding-left: 12px;
|
||||
margin-right: 15px;
|
||||
font-size: 12px;
|
||||
background-color: #6e6568;
|
||||
}
|
||||
.nav-detail-item span:hover {
|
||||
background-color: $theme_color;
|
||||
}
|
||||
.detail-item-panel ul {
|
||||
list-style: none;
|
||||
}
|
||||
.detail-item-panel li {
|
||||
line-height: 30px;
|
||||
// margin-left: 40px;
|
||||
}
|
||||
.detail-item-title {
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
color: #555555;
|
||||
padding-right: 10px;
|
||||
width: 81px;
|
||||
text-align: right;
|
||||
}
|
||||
.detail-item-title:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
.detail-item-row {
|
||||
display: flex;
|
||||
>div{flex: 1;}
|
||||
}
|
||||
.detail-item {
|
||||
font-size: 12px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid #ccc;
|
||||
&:first-child{
|
||||
border: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
.detail-item:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
</style>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#### 在组件上添加v-if来判断组件显隐
|
||||
|
||||
#### verifyType 验证格式[ 'LOGIN' ,'REGISTER' ]等,详情看接口文档
|
||||
#### verifyType 验证格式[ 'LOGIN' ,'REGISTER' ]
|
||||
|
||||
#### @change方法 获取回调,参数为对象 {status:false,distance:100} status 为回调状态,distance为移动距离
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp">
|
||||
<div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp" @click.stop>
|
||||
<div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
|
||||
<img :src="data.backImage" style="width:100%;height:100%" alt="">
|
||||
<img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
|
||||
<Icon type="md-refresh" class="refresh" @click="refresh" />
|
||||
<Icon type="md-refresh" class="refresh" @click="init" />
|
||||
</div>
|
||||
<div class="handle" :style="{width:data.originalWidth+'px'}">
|
||||
<span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
|
||||
@@ -18,6 +18,7 @@
|
||||
import { getVerifyImg, postVerifyImg } from './verify.js';
|
||||
export default {
|
||||
props: {
|
||||
// 传入数据,判断是登录、注册、修改密码
|
||||
verifyType: {
|
||||
defalut: 'LOGIN',
|
||||
type: String
|
||||
@@ -38,15 +39,17 @@ export default {
|
||||
distance: 0, // 拼图移动距离
|
||||
flag: false, // 判断滑块是否按下
|
||||
downX: 0, // 鼠标按下位置
|
||||
bgColor: 'aqua', // 滑动背景颜色
|
||||
bgColor: '#04ad11', // 滑动背景颜色
|
||||
verifyText: '拖动滑块解锁' // 文字提示
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 鼠标按下事件,开始拖动滑块
|
||||
mouseDown (e) {
|
||||
this.downX = e.clientX;
|
||||
this.flag = true;
|
||||
},
|
||||
// 鼠标移动事件,计算距离
|
||||
mouseMove (e) {
|
||||
if (this.flag) {
|
||||
let offset = e.clientX - this.downX;
|
||||
@@ -60,6 +63,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 鼠标抬起事件,验证是否正确
|
||||
mouseUp () {
|
||||
if (!this.flag) return false;
|
||||
this.flag = false;
|
||||
@@ -68,48 +72,50 @@ export default {
|
||||
xPos: this.distance
|
||||
};
|
||||
postVerifyImg(params).then(res => {
|
||||
if (res.result) {
|
||||
this.bgColor = 'green';
|
||||
this.verifyText = '解锁成功';
|
||||
this.$emit('change', { status: true, distance: this.distance });
|
||||
if (res.success) {
|
||||
if (res.result) {
|
||||
this.bgColor = 'green';
|
||||
this.verifyText = '解锁成功';
|
||||
this.$emit('change', { status: true, distance: this.distance });
|
||||
} else {
|
||||
this.bgColor = 'red';
|
||||
this.verifyText = '解锁失败';
|
||||
let that = this;
|
||||
setTimeout(() => {
|
||||
that.init();
|
||||
}, 1000);
|
||||
this.$emit('change', { status: false, distance: this.distance });
|
||||
}
|
||||
} else {
|
||||
this.bgColor = 'red';
|
||||
this.verifyText = '解锁失败';
|
||||
let that = this;
|
||||
setTimeout(() => {
|
||||
that.refresh();
|
||||
}, 1000);
|
||||
this.$emit('change', { status: false, distance: this.distance });
|
||||
this.init()
|
||||
}
|
||||
|
||||
}).catch(()=>{
|
||||
this.init()
|
||||
});
|
||||
},
|
||||
refresh () {
|
||||
init () { // 初始化数据
|
||||
this.flag = false;
|
||||
this.downX = 0;
|
||||
this.distance = 0;
|
||||
this.bgColor = 'aqua';
|
||||
this.bgColor = '#04ad11';
|
||||
this.verifyText = '拖动滑块解锁';
|
||||
this.getImg();
|
||||
},
|
||||
getImg () {
|
||||
getVerifyImg(this.type).then(res => {
|
||||
this.data = res.result;
|
||||
if (res.result) {
|
||||
this.data = res.result;
|
||||
this.show = true;
|
||||
} else {
|
||||
this.$Message.warning('请求失败请重试!')
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getImg();
|
||||
},
|
||||
watch: {
|
||||
verifyType: {
|
||||
immediate: true,
|
||||
handler: function (v) {
|
||||
this.type = v;
|
||||
this.refresh();
|
||||
}
|
||||
},
|
||||
show (v) {
|
||||
if (v) this.refresh();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -143,7 +149,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.handle {
|
||||
border: 1px solid rgb(134, 134, 134);
|
||||
border: 1px solid #e4dede;
|
||||
margin-top: 5px;
|
||||
height: 42px;
|
||||
background: #ddd;
|
||||
@@ -156,7 +162,7 @@ export default {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
opacity: 0.5;
|
||||
background: aqua;
|
||||
background: #04ad11;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
|
||||
@@ -7,7 +7,7 @@ import storage from '@/plugins/storage.js';
|
||||
*/
|
||||
export function getVerifyImg (verificationEnums) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
headers: {uuid: storage.getItem('uuid')}
|
||||
@@ -19,14 +19,10 @@ export function getVerifyImg (verificationEnums) {
|
||||
*/
|
||||
export function postVerifyImg (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${params.verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params,
|
||||
headers: {uuid: storage.getItem('uuid')}
|
||||
});
|
||||
}
|
||||
|
||||
export function mouseup () {
|
||||
console.log(111);
|
||||
}
|
||||
|
||||
@@ -1,49 +1,12 @@
|
||||
export default {
|
||||
/**
|
||||
* @description 配置显示在浏览器标签的title
|
||||
*/
|
||||
title: 'Lili电商',
|
||||
/**
|
||||
* @description token在Cookie中存储的天数,默认1天
|
||||
*/
|
||||
cookieExpires: 1,
|
||||
/**
|
||||
* @description 是否使用国际化,默认为false
|
||||
* 如果不使用,则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
|
||||
* 用来在菜单中显示文字
|
||||
*/
|
||||
useI18n: true,
|
||||
/**
|
||||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
// common: 'http://192.168.0.103:8890',
|
||||
// buyer: 'http://192.168.0.103:8888',
|
||||
// seller: 'http://192.168.0.103:8889',
|
||||
// manager: 'http://192.168.0.103:8887'
|
||||
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
},
|
||||
api_prod: {
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
},
|
||||
/**
|
||||
* @description api请求基础路径前缀
|
||||
*/
|
||||
baseUrlPrefix: '/buyer',
|
||||
/**
|
||||
* @description 需要加载的插件
|
||||
*/
|
||||
plugin: {
|
||||
'error-store': {
|
||||
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
|
||||
developmentOff: true // 设为true后在开发环境不会收集错误信息,方便开发中排查错误
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
title: "lili-shop", //配置显示在浏览器标签的title、底部信息、部分信息展示的值
|
||||
icpCard: "", // icp证
|
||||
company: {
|
||||
href: "https://pickmall.cn",
|
||||
name: "北京宏业汇成科技有限公司",
|
||||
}, //公司信息
|
||||
icpMessage: "京ICP备20009696号-1", //icp备案
|
||||
aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key
|
||||
enableCDN: false, //生产环境 是否启用cdn加载 vue等js
|
||||
port: 10000, //端口
|
||||
};
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
// The Vue build version to load with the `import` command
|
||||
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
||||
import Vue from 'vue';
|
||||
import App from './App';
|
||||
import router from './router';
|
||||
import ViewUI from 'view-design';
|
||||
import './assets/styles/theme.less';
|
||||
import './assets/iconfont/iconfont.css';
|
||||
// import './assets/iconfont/iconfont.css';
|
||||
import * as filters from './plugins/filters';
|
||||
import store from '@/vuex/store'
|
||||
import storage from '@/plugins/storage';
|
||||
// 全局引入封装组件
|
||||
import {InstallAll} from '@/components/global.js';
|
||||
|
||||
let title = require('@/config').title
|
||||
Vue.use(ViewUI);
|
||||
Vue.use(InstallAll);
|
||||
Vue.config.productionTip = false;
|
||||
@@ -22,7 +21,7 @@ Object.keys(filters).forEach(key => {
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
ViewUI.LoadingBar.start();
|
||||
window.document.title = to.meta.title === undefined ? 'lili shop' : to.meta.title
|
||||
window.document.title = to.meta.title === undefined ? title : to.meta.title
|
||||
next();
|
||||
});
|
||||
|
||||
@@ -32,17 +31,24 @@ router.afterEach(route => {
|
||||
|
||||
Vue.prototype.linkTo = function (url) {
|
||||
if (url.substr(0, 1) === '/') { // 非外部链接,没有origin,只有路由地址
|
||||
window.open(location.origin + url, '_blank');
|
||||
if (router.mode === 'hash') {
|
||||
window.open(location.origin + '/#' + url, '_blank');
|
||||
} else {
|
||||
window.open(location.origin + url, '_blank');
|
||||
}
|
||||
} else { // 外部链接,完整的url地址
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
}
|
||||
// 联系客服
|
||||
Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca') {
|
||||
const url = 'https://yzf.qq.com/xv/web/static/chat/index.html?sign=' + sign
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
Vue.prototype.Cookies = storage
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
components: { App },
|
||||
template: '<App/>'
|
||||
});
|
||||
render: h => h(App)
|
||||
}).$mount("#app")
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
<!-- LOGO 搜索 -->
|
||||
<div class="width_1200 logo">
|
||||
<div>
|
||||
<router-link to="/"><img :src="logoImg" alt="lili shop" title="lilishop" /></router-link>
|
||||
<router-link to="/"><img :src="$store.state.logoImg" /></router-link>
|
||||
<div>
|
||||
购物车(<span>{{ goodsTotal }}</span>)
|
||||
购物车(<span>{{ goodsTotal }}</span
|
||||
>)
|
||||
</div>
|
||||
</div>
|
||||
<Search :showTag="false" :showLogo="false"></Search>
|
||||
@@ -17,9 +18,15 @@
|
||||
<div class="available-area">
|
||||
<div class="cart-steps">
|
||||
<span :class="stepIndex == 0 ? 'active' : ''">1.我的购物车</span>
|
||||
<Icon :class="stepIndex == 0 ? 'active-arrow' : ''" custom="icomoon icon-next"></Icon>
|
||||
<Icon
|
||||
:class="stepIndex == 0 ? 'active-arrow' : ''"
|
||||
custom="icomoon icon-next"
|
||||
></Icon>
|
||||
<span :class="stepIndex == 1 ? 'active' : ''">2.填写订单信息</span>
|
||||
<Icon :class="stepIndex == 1 ? 'active-arrow' : ''" custom="icomoon icon-next"></Icon>
|
||||
<Icon
|
||||
:class="stepIndex == 1 ? 'active-arrow' : ''"
|
||||
custom="icomoon icon-next"
|
||||
></Icon>
|
||||
<span :class="stepIndex == 2 ? 'active' : ''">3.成功提交订单</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,7 +34,9 @@
|
||||
<div class="cart-goods">
|
||||
<div class="cart-goods-title">
|
||||
<div class="width_60">
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')">全选</Checkbox>
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')"
|
||||
>全选</Checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="goods-title">商品</div>
|
||||
<div class="width_150">单价(元)</div>
|
||||
@@ -39,85 +48,156 @@
|
||||
<p>购物车空空如也</p>
|
||||
<router-link to="/">去选购></router-link>
|
||||
</div>
|
||||
<div v-else class="cart-goods-items" v-for="(shop, index) in cartList" :key="index">
|
||||
<div
|
||||
v-else
|
||||
class="cart-goods-items"
|
||||
v-for="(shop, index) in cartList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="shop-name">
|
||||
<div>
|
||||
<Checkbox v-model="shop.checked" @on-change="changeChecked(shop.checked, 'shop', shop.storeId)"></Checkbox>
|
||||
<span class="go-shop-page" @click="goShopPage(shop.storeId)">{{shop.storeName}}</span>
|
||||
<Checkbox
|
||||
v-model="shop.checked"
|
||||
@on-change="changeChecked(shop.checked, 'shop', shop.storeId)"
|
||||
></Checkbox>
|
||||
<span class="go-shop-page" @click="goShopPage(shop.storeId)">{{
|
||||
shop.storeName
|
||||
}}</span>
|
||||
</div>
|
||||
<span class="shop-coupon" v-if="shop.couponList.length" :class="couponAvailable === index ? 'shop-coupon-show' : ''" @click.stop="showCoupon(shop.id, index)">
|
||||
<span
|
||||
class="shop-coupon"
|
||||
v-if="shop.couponList.length"
|
||||
:class="couponAvailable === index ? 'shop-coupon-show' : ''"
|
||||
@click.stop="showCoupon(shop.id, index)"
|
||||
>
|
||||
<!-- 优惠券模态框 -->
|
||||
<div v-if="couponAvailable === index">
|
||||
<div class="coupon-item" v-for="(item, index) in shop.couponList" :key="index">
|
||||
<div
|
||||
class="coupon-item"
|
||||
v-for="(item, index) in shop.couponList"
|
||||
:key="index"
|
||||
>
|
||||
<span v-if="item.couponType === 'PRICE'">¥{{ item.price }}</span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'">{{ item.couponDiscount }}折</span>
|
||||
<span>满{{item.consumeThreshold}}元可用</span>
|
||||
<Button class="coupon-btn" size="small" type="primary" @click="receiveShopCoupon(item)" :disabled="item.disabled">{{ item.disabled ? "已领取" : "领取" }}</Button>
|
||||
<span v-if="item.couponType === 'DISCOUNT'"
|
||||
>{{ item.couponDiscount }}折</span
|
||||
>
|
||||
<span>满{{ item.consumeThreshold }}元可用</span>
|
||||
<Button
|
||||
class="coupon-btn"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="receiveShopCoupon(item)"
|
||||
:disabled="item.disabled"
|
||||
>{{ item.disabled ? "已领取" : "领取" }}</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<div class="promotion-notice">{{shop.promotionNotice}}</div>
|
||||
<div class="promotion-notice">{{ shop.promotionNotice }}</div>
|
||||
</div>
|
||||
<template v-for="(goods, goodsIndex) in shop.skuList">
|
||||
<div class="goods-item" :key="goodsIndex">
|
||||
<div class="goods-item" :key="goodsIndex">
|
||||
<div class="width_60">
|
||||
<Checkbox v-model="goods.checked" @on-change="changeChecked(goods.checked, 'goods', goods.goodsSku.id)"></Checkbox>
|
||||
<Checkbox
|
||||
v-model="goods.checked"
|
||||
@on-change="changeChecked(goods.checked, 'goods', goods.goodsSku.id)"
|
||||
></Checkbox>
|
||||
</div>
|
||||
<div class="goods-title" @click="goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)">
|
||||
<img :src="
|
||||
goods.goodsSku.thumbnail || '../assets/images/goodsDetail/item-detail-1.jpg'
|
||||
" />
|
||||
<div
|
||||
class="goods-title"
|
||||
@click="goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)"
|
||||
>
|
||||
<img
|
||||
:src="
|
||||
goods.goodsSku.thumbnail ||
|
||||
'../assets/images/goodsDetail/item-detail-1.jpg'
|
||||
"
|
||||
/>
|
||||
<div>
|
||||
<p>{{ goods.goodsSku.goodsName }}</p>
|
||||
<template v-for="(promotion, promotionIndex) in goods.promotions">
|
||||
<div class="promotion" :key="promotionIndex" v-if="promotion.promotionType === 'SECKILL'">
|
||||
<div
|
||||
class="promotion"
|
||||
:key="promotionIndex"
|
||||
v-if="promotion.promotionType === 'SECKILL'"
|
||||
>
|
||||
<span>秒杀</span>
|
||||
<promotion :time="promotion.endTime" type="cart"></promotion>
|
||||
</div>
|
||||
</template>
|
||||
<template v-for="(promotion, promotionIndex) in goods.promotions">
|
||||
<div
|
||||
class="promotion"
|
||||
:key="promotionIndex"
|
||||
v-if="promotion.promotionType === 'FULL_DISCOUNT'"
|
||||
>
|
||||
<span>满优惠活动</span>
|
||||
<promotion :time="promotion.endTime" type="cart"></promotion>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="width_150">
|
||||
{{ goods.goodsSku.price | unitPrice("¥") }}
|
||||
{{ goods.purchasePrice | unitPrice("¥") }}
|
||||
</div>
|
||||
<div class="width_100">
|
||||
<InputNumber :min="1" size="small" v-model="goods.num" @on-change="changeNum(goods.num, goods.goodsSku.id)"></InputNumber>
|
||||
<div class="fontsize_12">{{goods.goodsSku.quantity > 0 ? '有货' : '无货'}}</div>
|
||||
<InputNumber
|
||||
:min="1"
|
||||
size="small"
|
||||
v-model="goods.num"
|
||||
@on-change="changeNum(goods.num, goods.goodsSku.id)"
|
||||
></InputNumber>
|
||||
<div class="fontsize_12">
|
||||
{{ goods.goodsSku.quantity > 0 ? "有货" : "无货" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="width_150">
|
||||
{{ goods.num * goods.goodsSku.price | unitPrice("¥") }}
|
||||
{{ goods.subTotal | unitPrice("¥") }}
|
||||
</div>
|
||||
<div class="width_100">
|
||||
<span class="handle-btn" v-if="!goods.errorMessage" @click="delGoods(goods.goodsSku.id)">删除</span>
|
||||
<span class="handle-btn" v-if="!goods.errorMessage" @click="collectGoods(goods.goodsSku.id)">收藏</span>
|
||||
<span
|
||||
class="handle-btn"
|
||||
v-if="!goods.errorMessage"
|
||||
@click="delGoods(goods.goodsSku.id)"
|
||||
>删除</span
|
||||
>
|
||||
<span
|
||||
class="handle-btn"
|
||||
v-if="!goods.errorMessage"
|
||||
@click="collectGoods(goods.goodsSku.id)"
|
||||
>收藏</span
|
||||
>
|
||||
</div>
|
||||
<div class="error-goods" v-if="goods.errorMessage">
|
||||
<div>{{goods.errorMessage}}</div>
|
||||
<Button type="primary" @click="delGoods(goods.goodsSku.id)">删除</Button>
|
||||
<div>{{ goods.errorMessage }}</div>
|
||||
<Button type="primary" @click="delGoods(goods.goodsSku.id)">删除</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
<!-- 底部支付栏 -->
|
||||
<div class="cart-goods-footer">
|
||||
<div>
|
||||
<div class="width_60">
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')">全选</Checkbox>
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')"
|
||||
>全选</Checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="width_100 handle-btn" @click="delGoods">删除选中商品</div>
|
||||
<div class="width_100 handle-btn" @click="delGoods()">删除选中商品</div>
|
||||
<!-- <div class="width_100 handle-btn" @click="collectGoods">移到我的收藏</div> -->
|
||||
<div class="width_100 handle-btn" @click="clearCart">清空购物车</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="selected-count">
|
||||
已选择<span>{{ checkedNum }}</span>件商品
|
||||
已选择<span>{{ checkedNum }}</span
|
||||
>件商品
|
||||
</div>
|
||||
<div class="ml_20 save-price">
|
||||
已节省<span>{{ priceDetailDTO.discountPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div class="ml_20 total-price">
|
||||
总价(不含运费):<span>{{ priceDetailDTO.billPrice | unitPrice("¥") }}</span>
|
||||
总价(不含运费):
|
||||
<div>{{ priceDetailDTO.flowPrice | unitPrice("¥") }}</div>
|
||||
</div>
|
||||
<div class="pay ml_20" @click="pay">去结算</div>
|
||||
</div>
|
||||
@@ -125,37 +205,27 @@
|
||||
</div>
|
||||
<Spin size="large" fix v-if="loading"></Spin>
|
||||
</div>
|
||||
<!-- 猜你喜欢 -->
|
||||
<!-- <div class="like">
|
||||
<div class="likeGoods">
|
||||
<ShowLikeGoods />
|
||||
</div>
|
||||
</div> -->
|
||||
<BaseFooter></BaseFooter>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Promotion from '@/components/goodsDetail/Promotion'
|
||||
import Search from '@/components/Search';
|
||||
import ShowLikeGoods from '@/components/like';
|
||||
import * as APICart from '@/api/cart';
|
||||
import * as APIMember from '@/api/member';
|
||||
import {getLogo} from '@/api/common.js'
|
||||
import Promotion from "@/components/goodsDetail/Promotion";
|
||||
import Search from "@/components/Search";
|
||||
import * as APICart from "@/api/cart";
|
||||
import * as APIMember from "@/api/member";
|
||||
export default {
|
||||
name: 'Cart',
|
||||
beforeRouteEnter (to, from, next) {
|
||||
name: "Cart",
|
||||
beforeRouteEnter(to, from, next) {
|
||||
window.scrollTo(0, 0);
|
||||
next();
|
||||
},
|
||||
components: {
|
||||
Search,
|
||||
ShowLikeGoods,
|
||||
Promotion
|
||||
Promotion,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
logoImg: '', // logo图
|
||||
couponAvailable: false, // 展示优惠券
|
||||
stepIndex: 0, // 当前处于哪一步,购物车==0,填写订单信息==1,成功提交订单==2
|
||||
goodsTotal: 1, // 商品数量
|
||||
@@ -165,101 +235,103 @@ export default {
|
||||
cartList: [], // 购物车列表
|
||||
couponList: [], // 优惠券列表
|
||||
priceDetailDTO: {}, // 价格明细
|
||||
skuList: [] // sku列表
|
||||
skuList: [], // sku列表
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
// 跳转商品详情
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 跳转店铺首页
|
||||
goShopPage (id) {
|
||||
goShopPage(id) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/Merchant',
|
||||
query: { id }
|
||||
path: "/Merchant",
|
||||
query: { id },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 收藏商品
|
||||
collectGoods (id) {
|
||||
collectGoods(id) {
|
||||
this.$Modal.confirm({
|
||||
title: '收藏',
|
||||
content: '<p>商品收藏后可在个人中心我的收藏查看</p>',
|
||||
title: "收藏",
|
||||
content: "<p>商品收藏后可在个人中心我的收藏查看</p>",
|
||||
onOk: () => {
|
||||
APIMember.collectGoods('GOODS', id).then((res) => {
|
||||
APIMember.collectGoods("GOODS", id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('收藏商品成功');
|
||||
this.$Message.success("收藏商品成功");
|
||||
this.getCartList();
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => { }
|
||||
onCancel: () => {},
|
||||
});
|
||||
},
|
||||
// 删除商品
|
||||
delGoods (id) {
|
||||
delGoods(id) {
|
||||
const idArr = [];
|
||||
if (!id) {
|
||||
const list = this.cartList;
|
||||
list.forEach((shop) => {
|
||||
shop.skuList.forEach((goods) => {
|
||||
idArr.push(goods.goodsSku.id);
|
||||
if(goods.checked) {
|
||||
idArr.push(goods.goodsSku.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
idArr.push(id);
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: '删除',
|
||||
content: '<p>确定要删除该商品吗?</p>',
|
||||
title: "删除",
|
||||
content: "<p>确定要删除该商品吗?</p>",
|
||||
onOk: () => {
|
||||
APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功');
|
||||
this.$Message.success("删除成功");
|
||||
this.getCartList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
clearCart () { // 清空购物车
|
||||
// 清空购物车
|
||||
clearCart() {
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
content: '<p>确定要清空购物车吗?清空后不可恢复</p>',
|
||||
title: "提示",
|
||||
content: "<p>确定要清空购物车吗?清空后不可恢复</p>",
|
||||
onOk: () => {
|
||||
APICart.clearCart().then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('清空购物车成功');
|
||||
this.$Message.success("清空购物车成功");
|
||||
this.getCartList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 跳转支付页面
|
||||
pay () {
|
||||
pay() {
|
||||
if (this.checkedNum) {
|
||||
this.$router.push({ path: '/pay', query: { way: 'CART' } });
|
||||
this.$router.push({ path: "/pay", query: { way: "CART" } });
|
||||
} else {
|
||||
this.$Message.warning('请至少选择一件商品');
|
||||
this.$Message.warning("请至少选择一件商品");
|
||||
}
|
||||
},
|
||||
// 展示优惠券
|
||||
showCoupon (storeId, index) {
|
||||
showCoupon(storeId, index) {
|
||||
this.couponAvailable = index;
|
||||
},
|
||||
changeNum (val, id) {
|
||||
// 设置购买数量
|
||||
// 设置购买数量
|
||||
changeNum(val, id) {
|
||||
console.log(val, id);
|
||||
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
|
||||
console.log(res);
|
||||
@@ -268,13 +340,13 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
async changeChecked (status, type, id) {
|
||||
// 设置商品选中状态
|
||||
// 设置商品选中状态
|
||||
async changeChecked(status, type, id) {
|
||||
const check = status ? 1 : 0;
|
||||
if (type === 'all') {
|
||||
if (type === "all") {
|
||||
// 全选
|
||||
await APICart.setCheckedAll({ checked: check });
|
||||
} else if (type === 'shop') {
|
||||
} else if (type === "shop") {
|
||||
// 选中店铺所有商品
|
||||
await APICart.setCheckedSeller({ checked: check, storeId: id });
|
||||
} else {
|
||||
@@ -284,18 +356,18 @@ export default {
|
||||
|
||||
this.getCartList();
|
||||
},
|
||||
|
||||
async receiveShopCoupon (item) { // 领取优惠券
|
||||
let res = await APIMember.receiveCoupon(item.id)
|
||||
// 领取优惠券
|
||||
async receiveShopCoupon(item) {
|
||||
let res = await APIMember.receiveCoupon(item.id);
|
||||
if (res.success) {
|
||||
this.$set(item, 'disabled', true)
|
||||
this.$Message.success('领取成功')
|
||||
this.$set(item, "disabled", true);
|
||||
this.$Message.success("领取成功");
|
||||
} else {
|
||||
this.$Message.error(res.message)
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
},
|
||||
async getCartList () {
|
||||
// 购物车列表
|
||||
// 购物车列表
|
||||
async getCartList() {
|
||||
this.loading = true;
|
||||
try {
|
||||
let res = await APICart.cartGoodsAll();
|
||||
@@ -307,9 +379,9 @@ export default {
|
||||
this.checkedNum = 0;
|
||||
let allChecked = true;
|
||||
for (let k = 0; k < this.cartList.length; k++) {
|
||||
let shop = this.cartList[k]
|
||||
let list = await APIMember.couponList({storeId: shop.storeId})
|
||||
shop.couponList.push(...list.result.records)
|
||||
let shop = this.cartList[k];
|
||||
let list = await APIMember.couponList({ storeId: shop.storeId });
|
||||
shop.couponList.push(...list.result.records);
|
||||
}
|
||||
for (let i = 0; i < this.skuList.length; i++) {
|
||||
if (this.skuList[i].checked) {
|
||||
@@ -318,30 +390,21 @@ export default {
|
||||
allChecked = false;
|
||||
}
|
||||
}
|
||||
this.$forceUpdate()
|
||||
this.$forceUpdate();
|
||||
this.allChecked = allChecked;
|
||||
}
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.getCartList();
|
||||
APICart.cartCount().then(res => { // 购物车商品数量
|
||||
APICart.cartCount().then((res) => {
|
||||
// 购物车商品数量
|
||||
if (res.success) this.goodsTotal = res.result;
|
||||
});
|
||||
if (!this.Cookies.getItem('logo')) {
|
||||
getLogo().then(res => {
|
||||
if (res.success) {
|
||||
let logoObj = JSON.parse(res.result.settingValue)
|
||||
this.Cookies.setItem('logo', logoObj.buyerSideLogo)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.logoImg = this.Cookies.getItem('logo')
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -544,7 +607,7 @@ export default {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
>div>p {
|
||||
> div > p {
|
||||
@include content_color($light_content_color);
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
@@ -567,12 +630,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.error-goods{
|
||||
.error-goods {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-left: -20px;
|
||||
background-color: rgba($color: #999, $alpha: .5);
|
||||
background-color: rgba($color: #999, $alpha: 0.5);
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -603,7 +666,7 @@ export default {
|
||||
.save-price span {
|
||||
color: #000;
|
||||
}
|
||||
.total-price span {
|
||||
.total-price div {
|
||||
color: $theme_color;
|
||||
font-size: 20px;
|
||||
}
|
||||
@@ -651,23 +714,31 @@ export default {
|
||||
display: flex;
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
>span{
|
||||
> span {
|
||||
border: 1px solid $theme_color;
|
||||
color: $theme_color;
|
||||
font-size: 12px;
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
>p{
|
||||
> p {
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.cart-goods-footer > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.total-price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.ivu-input-number-input {
|
||||
text-align: center;
|
||||
}
|
||||
.ivu-input-number-input {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||