Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f835afd8b | ||
|
|
8ef14b73c2 | ||
|
|
25c2290564 | ||
|
|
94efec7281 | ||
|
|
d49b46c950 | ||
|
|
d09b0c23e2 | ||
|
|
c8157c144e | ||
|
|
ec0c003ff7 | ||
|
|
e35ea1d5c2 | ||
|
|
1ddc425606 | ||
|
|
54a274a70f | ||
|
|
b1fc1e248d | ||
|
|
51b5a77d07 | ||
|
|
d5293f1038 | ||
|
|
4b1e5331ef | ||
|
|
8dc8bcdd59 | ||
|
|
e76d1a2b81 | ||
|
|
6f139778a7 | ||
|
|
6ad2aeef2e | ||
|
|
fdaad4df7e | ||
|
|
dcd8413e22 | ||
|
|
c50fa44fd8 | ||
|
|
7b28b94390 | ||
|
|
f6ee332060 | ||
|
|
8b8a467431 | ||
|
|
069ef49839 | ||
|
|
05cdb3ac34 | ||
|
|
491323fc17 | ||
|
|
3c56f3cfb5 | ||
|
|
5efd4c7ed2 | ||
|
|
ce58a1577a | ||
|
|
c1f5b7260e | ||
|
|
0885a908ea | ||
|
|
1636c77cfd | ||
|
|
74b02ed292 | ||
|
|
58b716c0ec | ||
|
|
23eaec9688 | ||
|
|
f1d6ac62c1 | ||
|
|
0d0b816fad | ||
|
|
39a54efc27 | ||
|
|
30bb94130d | ||
|
|
33f9d611b4 | ||
|
|
3c86c4561a | ||
|
|
19632a69ad | ||
|
|
e4428f3366 | ||
|
|
590c33d4d3 | ||
|
|
c285c32a4e | ||
|
|
ed3e1f3dfc | ||
|
|
ef10e8ad97 | ||
|
|
3ec0c8c29c | ||
|
|
2f55b0bfb8 | ||
|
|
3d53cc51a9 | ||
|
|
4fa9c6a594 | ||
|
|
0bf354f8aa | ||
|
|
aa58754f1c | ||
|
|
fdcdfc505f | ||
|
|
59fee9df18 | ||
|
|
6f244967a5 | ||
|
|
6a3a2e74a0 | ||
|
|
c323a28518 | ||
|
|
d68d4c8773 | ||
|
|
4810aa7e33 | ||
|
|
fd4adbf383 | ||
|
|
3829e896da | ||
|
|
a5d0ce8657 | ||
|
|
ed81a95cd9 | ||
|
|
0ff82a3590 | ||
|
|
ff471b6017 | ||
|
|
52f2c2b003 | ||
|
|
16abf0fdb6 | ||
|
|
f6851bfa77 | ||
|
|
794e405ed2 | ||
|
|
689d949315 | ||
|
|
e446b9e847 | ||
|
|
67c94d814c | ||
|
|
230e163c53 | ||
|
|
de473eba57 | ||
|
|
16742b3c23 | ||
|
|
b73e9ee36b | ||
|
|
bc609f0038 | ||
|
|
eb6865299c | ||
|
|
2e838088db | ||
|
|
37cd468d44 | ||
|
|
850f5922e2 | ||
|
|
50ff88e7df | ||
|
|
30f550ca92 | ||
|
|
72725d051e | ||
|
|
8c85c4465e | ||
|
|
2a274766a1 | ||
|
|
eb9533fb7d | ||
|
|
6f2957f514 | ||
|
|
610ea7ece1 | ||
|
|
35b57bbccc | ||
|
|
d7ccd248b6 | ||
|
|
84562cf6f1 | ||
|
|
1510d5e9d9 | ||
|
|
f16793a06a | ||
|
|
5d6ca1f03d | ||
|
|
26b0ce03cd | ||
|
|
01028a85b0 | ||
|
|
b18b593afa | ||
|
|
26145a1259 | ||
|
|
23dc945f43 | ||
|
|
b8ca3b66fb | ||
|
|
6af66ec5e0 | ||
|
|
e21c4aa669 | ||
|
|
a27c35ba2d | ||
|
|
68cfae2893 | ||
|
|
3bbd796a85 | ||
|
|
f2fba444a0 | ||
|
|
632886c81c | ||
|
|
cf0c180efd | ||
|
|
4333e8e76a | ||
|
|
da929cfe3b | ||
|
|
4dcfa23a10 | ||
|
|
426348932f | ||
|
|
8728c6e738 | ||
|
|
f2b6bc18e2 | ||
|
|
17810ee741 | ||
|
|
d1bc3cc351 | ||
|
|
aaf2e74cbb | ||
|
|
d400c2c948 | ||
|
|
615b89c8a5 | ||
|
|
01c1a44a32 | ||
|
|
c93d44a9ba | ||
|
|
3c187447c4 | ||
|
|
6f881377b0 | ||
|
|
f079db8fc0 | ||
|
|
a3693e6c9a | ||
|
|
a43180b132 | ||
|
|
ef4ce36eb2 | ||
|
|
7c42efeb6b | ||
|
|
455b230931 | ||
|
|
a267868890 | ||
|
|
36914c10b0 | ||
|
|
a74f94a061 | ||
|
|
85b1a8f0f1 | ||
|
|
a1182276a9 | ||
|
|
a8f3e99d38 | ||
|
|
b148b7b869 | ||
|
|
89b94a71dc | ||
|
|
4c76fedeb8 | ||
|
|
8b3156630a | ||
|
|
36fcb30879 | ||
|
|
d297245140 | ||
|
|
eee5c0ae6f | ||
|
|
abe6d9af98 | ||
|
|
426410ffd1 | ||
|
|
26b6c14141 | ||
|
|
6b1dd27294 | ||
|
|
77bb949921 | ||
|
|
cbc313e8c5 | ||
|
|
b6a7c02e60 | ||
|
|
f7a8ba44a8 | ||
|
|
deb0be8eea | ||
|
|
7ce0c62131 | ||
|
|
f631166047 | ||
|
|
c6cc2758c9 | ||
|
|
45b8d065ae | ||
|
|
ed9ae77ead | ||
|
|
0fdee74098 | ||
|
|
c7ec45b7e2 | ||
|
|
5dc01c9a3e | ||
|
|
38fde39aa7 | ||
|
|
754713282b | ||
|
|
f36bf5ca73 | ||
|
|
a02d6cc198 | ||
|
|
cb3ad8180d | ||
|
|
d07fc96efc | ||
|
|
f8e83800bb | ||
|
|
2df4d6f286 | ||
|
|
e5e63f3e2f | ||
|
|
e71826919c | ||
|
|
eefe6404e5 | ||
|
|
c3d6b25a5e | ||
|
|
1baf5de741 | ||
|
|
aec2cfc207 | ||
|
|
4d453fbd41 | ||
|
|
9a7456bdeb | ||
|
|
b85a619027 | ||
|
|
44798a564f | ||
|
|
83a698185c | ||
|
|
e257419351 | ||
|
|
e56dca5b92 | ||
|
|
84acc97e53 | ||
|
|
c964cf3376 | ||
|
|
d3622f4cff | ||
|
|
d6bc12d23a | ||
|
|
cc1ceb2b4f | ||
|
|
8148f629de | ||
|
|
e092fe4d4c | ||
|
|
6ac1b9d415 | ||
|
|
12fa155630 | ||
|
|
744e6d98f9 | ||
|
|
910991ad69 | ||
|
|
60e473db8a | ||
|
|
281249830a | ||
|
|
1319517a41 | ||
|
|
6af05e705a | ||
|
|
f9a89a7129 | ||
|
|
37be03f3ee | ||
|
|
20c50b8a26 | ||
|
|
b0613f3760 | ||
|
|
89dcf74f17 | ||
|
|
7c7ca84cd0 | ||
|
|
7b543719e6 | ||
|
|
f127123a62 | ||
|
|
cd1a12ac6a | ||
|
|
221de41cf3 | ||
|
|
e20775c198 | ||
|
|
3c0a91adb9 | ||
|
|
a95b30deaf | ||
|
|
61e1e2939f | ||
|
|
cca0f24cbc | ||
|
|
09ef536a37 | ||
|
|
0f5f19d9a0 | ||
|
|
aedc2fd768 | ||
|
|
f0a4a0edf9 | ||
|
|
425821ecf7 | ||
|
|
e1328a7825 | ||
|
|
40207f11a1 | ||
|
|
1fbbbed4f0 | ||
|
|
dbc31c72fb | ||
|
|
5dc1f5ad92 | ||
|
|
044c1a0863 | ||
|
|
fcab618a7e | ||
|
|
9d1a8916fc | ||
|
|
f0abc1e87a | ||
|
|
5ba5aff309 | ||
|
|
6a66405a2f | ||
|
|
2c325ad5b1 | ||
|
|
2bc586d8b1 | ||
|
|
b2388cf6c6 | ||
|
|
e45d9e1afc | ||
|
|
ff205ec37f | ||
|
|
7f5b1ad45c | ||
|
|
3d8bcb56d5 | ||
|
|
0802e6349e | ||
|
|
0372209000 | ||
|
|
b0c019f50c | ||
|
|
8e0caaca24 | ||
|
|
6f3fa44385 | ||
|
|
12c6b177bc | ||
|
|
b532a8a675 | ||
|
|
dbb95c9c10 | ||
|
|
a8334b552c | ||
|
|
887206f1a9 | ||
|
|
0ace784593 | ||
|
|
37266a4e97 | ||
|
|
cd0a91fda5 | ||
|
|
b27d2c97fb | ||
|
|
3a66811a52 | ||
|
|
3f22aa26b7 | ||
|
|
c71586fc1d | ||
|
|
d1544978c5 | ||
|
|
ba0312001b | ||
|
|
f0aa415852 | ||
|
|
3d3f8309d1 | ||
|
|
b1a1e5aae0 | ||
|
|
0691844ee9 | ||
|
|
edc79a2b42 | ||
|
|
3dd6d53f90 | ||
|
|
81c89f5076 | ||
|
|
15619b00ff | ||
|
|
63526f4f06 | ||
|
|
cab0577e03 | ||
|
|
b19ba34db2 | ||
|
|
a96c3759b9 | ||
|
|
2a3ca96fa0 | ||
|
|
626e747049 | ||
|
|
94536b0876 | ||
|
|
3d6a2785d5 | ||
|
|
5177f5881a | ||
|
|
e53d0e4f4d | ||
|
|
32881769ed | ||
|
|
8020afc339 | ||
|
|
4e28ef3d37 | ||
|
|
a6816e1469 | ||
|
|
1dd7b1e3b1 | ||
|
|
a3a0d0c833 | ||
|
|
b07e967e23 | ||
|
|
e18a5e5c70 | ||
|
|
f74f6e3b49 | ||
|
|
f80d58ef3d | ||
|
|
4dea0cd681 | ||
|
|
6685638c54 | ||
|
|
bd2338f16a | ||
|
|
85854ea2f6 | ||
|
|
ec33f6f4c0 | ||
|
|
f3be581278 | ||
|
|
50dab652e9 | ||
|
|
30c2d18412 | ||
|
|
c6ff84ca5d | ||
|
|
f19ac9ad42 | ||
|
|
46b858b700 | ||
|
|
f8b6d72a59 | ||
|
|
4bc50aac9c | ||
|
|
432177604f | ||
|
|
daf0ed691e | ||
|
|
a24bfb2ff2 | ||
|
|
dc8069bca1 | ||
|
|
02627db525 | ||
|
|
4a929f4b32 | ||
|
|
ed006c46c5 | ||
|
|
77953ad6fe | ||
|
|
09b677d593 | ||
|
|
3ea76f4081 | ||
|
|
b265382c2e | ||
|
|
0bb76095fb | ||
|
|
cd4bef91c2 | ||
|
|
cc2664f116 | ||
|
|
71aa5e5a3c | ||
|
|
febca80a9b | ||
|
|
851bcb16d7 | ||
|
|
20a46f10dc | ||
|
|
4a449485f7 | ||
|
|
8aa2454a1a | ||
|
|
0ceb016e20 | ||
|
|
8b93ab3c18 | ||
|
|
3c897506d2 | ||
|
|
c7fc52d5c3 | ||
|
|
403e8d1e3f | ||
|
|
7672f8a309 | ||
|
|
5994f5dba4 | ||
|
|
3639c2d04f | ||
|
|
7f459e2b99 | ||
|
|
69d866e6ce | ||
|
|
37117598ea | ||
|
|
34ff7c403a | ||
|
|
420a14f6d9 | ||
|
|
a9b63ca251 | ||
|
|
2b12a03703 | ||
|
|
81c82aca50 | ||
|
|
78c83ecaa3 | ||
|
|
b133d0132c | ||
|
|
555d2babde | ||
|
|
0b4cb9696e | ||
|
|
104d0ef4e1 | ||
|
|
020bdadcae | ||
|
|
ffa827c137 | ||
|
|
6a3445a0cc | ||
|
|
97c7fda9bb | ||
|
|
78e0937fca | ||
|
|
27c95042d4 | ||
|
|
40431f03fc | ||
|
|
f64f87546e | ||
|
|
f174a83ac0 | ||
|
|
01dc1711ca | ||
|
|
e0dac0207b | ||
|
|
c2901522ac | ||
|
|
426ca24f51 | ||
|
|
b687d3737a | ||
|
|
0b0abdfad8 | ||
|
|
99676adb48 | ||
|
|
f2f2528316 | ||
|
|
9d2c99507c | ||
|
|
9092d0d73d | ||
|
|
8e8ca5a261 | ||
|
|
eddb02d2cf | ||
|
|
b535e21e2f | ||
|
|
50cbe66332 | ||
|
|
07bccb8b68 | ||
|
|
89f33882b5 | ||
|
|
c5c9c9146b | ||
|
|
c0a09ad449 | ||
|
|
5112f3314b | ||
|
|
b225e107e5 | ||
|
|
21a80c6434 | ||
|
|
1a0957f4bb | ||
|
|
de6cca5bac | ||
|
|
10cbf5ef03 | ||
|
|
5f0f961220 | ||
|
|
1f1c114eda | ||
|
|
f65c033bd7 | ||
|
|
fc47a981f9 | ||
|
|
088f3ea370 | ||
|
|
e48762c783 | ||
|
|
5813924548 | ||
|
|
8a9862126b | ||
|
|
6c44e3eb53 | ||
|
|
ea71e61451 | ||
|
|
9353aad39f | ||
|
|
952a332ba1 | ||
|
|
b9b1a4aa30 | ||
|
|
52946a4afe | ||
|
|
e0588d2ecb | ||
|
|
d676a9e496 | ||
|
|
2d6d6cf90c | ||
|
|
329adbd287 | ||
|
|
370e347b93 | ||
|
|
9fc2579247 | ||
|
|
972f5ba027 | ||
|
|
ac10ea7a4f | ||
|
|
3d2924fbd3 | ||
|
|
4dbd30aad5 | ||
|
|
11eca54e21 | ||
|
|
8c1fdba140 | ||
|
|
feb314d279 | ||
|
|
a104473e86 | ||
|
|
d0fd7cb653 | ||
|
|
5a7a5831b0 | ||
|
|
7379cbd052 | ||
|
|
3cc41c3c34 | ||
|
|
80ba906630 | ||
|
|
53b52d71d3 | ||
|
|
99ac5f04ed | ||
|
|
8d29cb777f | ||
|
|
a302f11b95 | ||
|
|
b536f2ad68 | ||
|
|
3944c961d9 | ||
|
|
338c63d634 | ||
|
|
6a58bf6e45 | ||
|
|
b7b23ddab4 | ||
|
|
afd678135d | ||
|
|
8c392f1d57 | ||
|
|
f4cfeb37e8 | ||
|
|
0ac3babdd2 | ||
|
|
faf51f7c6f | ||
|
|
78c13fe05c | ||
|
|
dcf15eeb54 | ||
|
|
6aced33e45 | ||
|
|
f1460485d3 | ||
|
|
141fbaa330 | ||
|
|
33d8e42c6f | ||
|
|
7512d21e75 | ||
|
|
74dbbd0a90 | ||
|
|
1a773023c1 | ||
|
|
33425987f7 | ||
|
|
862e624913 | ||
|
|
a8bdcd5495 | ||
|
|
82b8e53aee | ||
|
|
c484d20cb2 | ||
|
|
909f462aa1 | ||
|
|
989c0be025 | ||
|
|
2166597ac8 | ||
|
|
0398404f4b | ||
|
|
9b90323f27 | ||
|
|
453bb23186 | ||
|
|
398a8a40a0 | ||
|
|
a900bc4c1b | ||
|
|
2c27ec6f8f | ||
|
|
87027d9d4e | ||
|
|
265507014e | ||
|
|
3625a45e2c | ||
|
|
0bdcae5d00 | ||
|
|
7f4cefda3b | ||
|
|
de308dfa68 | ||
|
|
3288c71b8a | ||
|
|
257445263d | ||
|
|
23a02352d7 | ||
|
|
f5898444ab | ||
|
|
a14931a64e | ||
|
|
5c92359a09 | ||
|
|
9519401d75 | ||
|
|
3f1f2689be | ||
|
|
d502a276be | ||
|
|
04c0f4a720 | ||
|
|
2d1a1cc242 | ||
|
|
7bb0c67b83 | ||
|
|
18f9021c83 | ||
|
|
2ef47a52c2 | ||
|
|
1a8d44f1a4 | ||
|
|
33070fe21b | ||
|
|
a18d191ebe | ||
|
|
0ef40fa345 | ||
|
|
0b0c87245d | ||
|
|
18190e76e4 | ||
|
|
8f403fa204 | ||
|
|
af0efae84b | ||
|
|
fb881355d9 | ||
|
|
bf7035cd2e | ||
|
|
0edbbfcdf5 | ||
|
|
655bb7e7e3 | ||
|
|
43b81b5430 | ||
|
|
5f9a6b358d | ||
|
|
b5c87c1edb | ||
|
|
6983ebeb21 | ||
|
|
0b9c3aa01f | ||
|
|
de55d5fc2e | ||
|
|
5ff8f5f76f | ||
|
|
c8a7ea63e3 | ||
|
|
440b058d33 | ||
|
|
3c7af4fc42 | ||
|
|
f3f47d236f | ||
|
|
1b93ef7909 | ||
|
|
52dfba61de | ||
|
|
a7aedcc873 | ||
|
|
1eac768b76 | ||
|
|
246c66193b | ||
|
|
831a6d64c0 | ||
|
|
00f495a099 | ||
|
|
918028aa93 | ||
|
|
0c8e9fcd54 | ||
|
|
5262b93c3f | ||
|
|
84470b4ec8 | ||
|
|
ff5dbae3a4 | ||
|
|
0d0ac8d883 | ||
|
|
cb6545ecd7 | ||
|
|
b0ac014816 | ||
|
|
e726a51922 | ||
|
|
ca11455148 | ||
|
|
af2699765d | ||
|
|
15c427edf7 | ||
|
|
f5b3174acc | ||
|
|
820cf2dc3f | ||
|
|
ebe18f0240 | ||
|
|
447f94ed8d | ||
|
|
10ef53ecb1 | ||
|
|
08c9193475 | ||
|
|
93d7735aa9 | ||
|
|
db13fa3ffa | ||
|
|
cf868ccebe | ||
|
|
f3e036b9be | ||
|
|
194a51ee19 | ||
|
|
2c6c7e82a9 | ||
|
|
58e29a98c8 | ||
|
|
fb23c8fccf | ||
|
|
848307944c | ||
|
|
d9c696af23 | ||
|
|
abd13edb81 | ||
|
|
8536ad2aca | ||
|
|
226a17f420 | ||
|
|
09941be7b6 | ||
|
|
387fe8d2b8 | ||
|
|
37349183f2 | ||
|
|
da940c7668 | ||
|
|
28ce362a39 | ||
|
|
e493acec59 | ||
|
|
b3b5f3f6e4 | ||
|
|
857891c00b | ||
|
|
35641a8956 | ||
|
|
f55cb074c8 | ||
|
|
150d351152 | ||
|
|
d5cdbc4670 | ||
|
|
ade5719c00 | ||
|
|
c8db02282c | ||
|
|
179a5f005c | ||
|
|
f0e25c2a0d | ||
|
|
021e94084f | ||
|
|
dce372aca3 | ||
|
|
12f2e42a16 | ||
|
|
1aab9ee691 | ||
|
|
eff9db385a | ||
|
|
b3d8fefaba | ||
|
|
8c2e785ea0 | ||
|
|
b397ba232f | ||
|
|
3d3efa89bf | ||
|
|
d8cb8ae6cb | ||
|
|
566ef9de61 | ||
|
|
c51f177c7c | ||
|
|
1439e1206d | ||
|
|
714f5c3340 | ||
|
|
27d4727f89 | ||
|
|
e81aa3a490 | ||
|
|
ab5e5659fe | ||
|
|
d9e5fefdfa | ||
|
|
14a0477ee8 | ||
|
|
69540415ec | ||
|
|
dcff3181b3 | ||
|
|
1016b4d7cb | ||
|
|
0c9f3a5081 | ||
|
|
b7c7177f71 | ||
|
|
8b7e35c182 | ||
|
|
f30d06ea11 | ||
|
|
050938b8aa | ||
|
|
6ecc996e8b | ||
|
|
ff93f79a18 | ||
|
|
4c60c7ba52 | ||
|
|
b84534b654 | ||
|
|
1915394b27 | ||
|
|
6ce59471f3 | ||
|
|
787b2eada4 | ||
|
|
aa68c01ace | ||
|
|
8bf30f6989 | ||
|
|
15e9ca1687 | ||
|
|
4f867cb191 | ||
|
|
f658302d71 | ||
|
|
4104052d1a | ||
|
|
83be020182 | ||
|
|
1b56642743 | ||
|
|
413b464e18 | ||
|
|
35d9d34689 | ||
|
|
088c1be6f9 | ||
|
|
fafd862f99 | ||
|
|
43a26d4943 | ||
|
|
12252eec5a | ||
|
|
506cc6053d | ||
|
|
2ba35be830 | ||
|
|
83c1060b0c | ||
|
|
2896442f2f | ||
|
|
072a05257e | ||
|
|
2f2497270a | ||
|
|
cb3b92a2b2 | ||
|
|
7c1f57bb0c | ||
|
|
daed2c3ec5 | ||
|
|
b899039b89 | ||
|
|
51ecf9b3b2 | ||
|
|
0f582d6005 | ||
|
|
011117d318 | ||
|
|
780a3754c0 | ||
|
|
af6da8649c | ||
|
|
68765f4474 | ||
|
|
6b84821a0b | ||
|
|
6f059dfed1 | ||
|
|
4f01467d5c | ||
|
|
6d0d87e6cb | ||
|
|
f3427dfa9a | ||
|
|
bf5b30ae93 | ||
|
|
427d33b550 | ||
|
|
f3c1ad8d32 | ||
|
|
3baeace156 | ||
|
|
af273b2eb8 | ||
|
|
30261f183a | ||
|
|
6b408c41d3 | ||
|
|
305c965cc1 | ||
|
|
e19ebec8ef | ||
|
|
6e6cc36570 | ||
|
|
69e8a48283 | ||
|
|
edcb64fbf6 | ||
|
|
d3d22a3c87 | ||
|
|
313adf37b0 | ||
|
|
1feb90c602 | ||
|
|
4b8ba61ee5 | ||
|
|
eda9664c6d | ||
|
|
b3f85d807d | ||
|
|
9b0216c857 | ||
|
|
b5e23dda59 | ||
|
|
cfd333cffa | ||
|
|
24d2b6f96a | ||
|
|
ce428b7ff8 | ||
|
|
9eb5f0acf3 | ||
|
|
fb31d538b6 | ||
|
|
8064cd13fa | ||
|
|
e0de70ee35 | ||
|
|
5de4ab8758 | ||
|
|
ba91746cde | ||
|
|
8ebf12dcc6 | ||
|
|
9e0bc48135 | ||
|
|
a4201225fa | ||
|
|
5ab60fda4c | ||
|
|
93770e4c3d | ||
|
|
82a54220d4 | ||
|
|
7b79d6e965 | ||
|
|
fac60f9df9 | ||
|
|
a21870c578 | ||
|
|
6a2a2755e5 | ||
|
|
27be3935fa | ||
|
|
9c67d724fd | ||
|
|
e33c59ae64 | ||
|
|
a273948165 | ||
|
|
0053ddd3e4 | ||
|
|
22abd6caaf | ||
|
|
94aa156f50 | ||
|
|
c1c0cb2373 | ||
|
|
58d0faa855 | ||
|
|
8f5eca5c62 | ||
|
|
94405b6de9 | ||
|
|
d06666ec9d | ||
|
|
21dccd8d61 | ||
|
|
b228155cc0 | ||
|
|
7b88c8d3fc | ||
|
|
5ab1254676 | ||
|
|
0d72a1d580 | ||
|
|
3efc3232b0 | ||
|
|
f15d842419 | ||
|
|
db4dc959d4 | ||
|
|
024eedaabb | ||
|
|
6790c14aaf | ||
|
|
b37d3a139e | ||
|
|
3407ef7aff | ||
|
|
06658209eb | ||
|
|
384d7ccae1 | ||
|
|
0641013a5c | ||
|
|
af075a9c28 | ||
|
|
cb75cbae9c | ||
|
|
6f8b940be5 | ||
|
|
1a6d0da0fd | ||
|
|
6f24c71d96 | ||
|
|
b0fffe8101 | ||
|
|
c015eb9dff | ||
|
|
2033fb7ed7 | ||
|
|
11878e7e8b | ||
|
|
4434360f8a | ||
|
|
01199eeebd | ||
|
|
973ce36778 | ||
|
|
41753688cb | ||
|
|
d6f6356ee0 | ||
|
|
43841c0491 | ||
|
|
c9e2e6005c | ||
|
|
11d40e719c | ||
|
|
43aca09ca6 | ||
|
|
bde972a5ad | ||
|
|
b27d9b12fe | ||
|
|
aaa6a2299f | ||
|
|
1e0772713f | ||
|
|
3eb077eb3c | ||
|
|
e391b2fe9b | ||
|
|
22f2e9779a | ||
|
|
b9b47ef816 | ||
|
|
cd940e9394 | ||
|
|
922a1614a6 | ||
|
|
5dd83fdd92 | ||
|
|
4951a8ad19 | ||
|
|
5640e3e24c | ||
|
|
d7e290911d | ||
|
|
55b0dd95b1 | ||
|
|
75290bf1b4 | ||
|
|
a9e3ac2eda | ||
|
|
06abd34261 | ||
|
|
1a231d6715 | ||
|
|
8242632cb0 | ||
|
|
b8a60be507 | ||
|
|
ee04a02cb6 | ||
|
|
992c4a7ba5 | ||
|
|
ae81590c9e | ||
|
|
719bbebbf6 | ||
|
|
c50474c156 | ||
|
|
fda09a5cb0 | ||
|
|
223bcf6ac8 | ||
|
|
3527e4c8c7 | ||
|
|
19bb5c1084 | ||
|
|
4a354a7dcf | ||
|
|
bcee082202 | ||
|
|
e7afa28bc2 | ||
|
|
dce2377383 | ||
|
|
3fac704828 | ||
|
|
33526c2df0 | ||
|
|
0cb7d5f5e8 | ||
|
|
2aceabf991 | ||
|
|
6ad3ba0fd6 | ||
|
|
b092e8c9c5 | ||
|
|
2bf5ba295e | ||
|
|
a97835ed27 | ||
|
|
5e4f3aced6 | ||
|
|
9803c53c3b | ||
|
|
32a7e311fc | ||
|
|
77453380fa | ||
|
|
5fc4159e08 | ||
|
|
7740e8f6a8 | ||
|
|
a18e478c26 | ||
|
|
99dd695553 | ||
|
|
0528865e7b | ||
|
|
e08f597f58 | ||
|
|
74c5c2b768 | ||
|
|
05b6075df3 | ||
|
|
688d0ee264 | ||
|
|
0f85b2fc58 | ||
|
|
8b5d8d6dc7 | ||
|
|
734887d6d4 | ||
|
|
4878005209 | ||
|
|
ae554044d3 | ||
|
|
75a821eb6c | ||
|
|
741ce177cd | ||
|
|
017f34bbf4 | ||
|
|
efaf6feb1a | ||
|
|
39ae37b484 | ||
|
|
52b75d0bd3 | ||
|
|
1033e0ee04 | ||
|
|
46b4f05a6b | ||
|
|
b9c3ff756c | ||
|
|
37fa7fab05 | ||
|
|
7f4bc948df | ||
|
|
b264e04e8f | ||
|
|
8056e74d43 | ||
|
|
01eaea0cdc | ||
|
|
7a8a1b66f1 | ||
|
|
f9be8af78f | ||
|
|
5b1b1f1c69 | ||
|
|
0ce7c578c9 | ||
|
|
57a8c5a59d | ||
|
|
22c171cbb4 | ||
|
|
712d210d81 | ||
|
|
186b78d426 | ||
|
|
54d19d813e | ||
|
|
3659280b5b | ||
|
|
89190e216f | ||
|
|
208980ddba | ||
|
|
90a58aecd5 | ||
|
|
a72acdca54 | ||
|
|
4c8e79ebba | ||
|
|
44d4a21eba | ||
|
|
b3e67abbec | ||
|
|
fc392a5e01 | ||
|
|
fcf8a16cfc | ||
|
|
d1813f3dca | ||
|
|
7edbe49a43 | ||
|
|
e5ce19539d | ||
|
|
609b8a8b60 | ||
|
|
14ceb895d3 | ||
|
|
f02a7c5514 | ||
|
|
6f3e25ab64 | ||
|
|
28ffaee0ce | ||
|
|
d4f61842fb | ||
|
|
2bac749ca4 | ||
|
|
86422f0f14 | ||
|
|
2b15e320f4 | ||
|
|
f9b8ca6bf2 | ||
|
|
ef2443dc58 | ||
|
|
d1304ff4c5 | ||
|
|
7e9eb39a32 | ||
|
|
b7cb860c5e | ||
|
|
138abd46a2 | ||
|
|
302a6c2b40 | ||
|
|
d95b57d523 | ||
|
|
3e25bf9759 | ||
|
|
9ab00a372e | ||
|
|
2226d665ad | ||
|
|
44849db20d | ||
|
|
eed49847c4 | ||
|
|
f956c5a74c | ||
|
|
57341a6bb5 | ||
|
|
fedef62a44 | ||
|
|
659cce3abe | ||
|
|
db21546dc9 | ||
|
|
560a2f49ed | ||
|
|
be61dfbc30 | ||
|
|
cef0177716 | ||
|
|
19914b5b0d | ||
|
|
4e6d5598b7 | ||
|
|
2f217e8dc1 | ||
|
|
344e0aa888 | ||
|
|
51bc828dc9 | ||
|
|
2c514164da | ||
|
|
9458e9347c | ||
|
|
86b927b487 | ||
|
|
f7dcdc22f1 | ||
|
|
dbdb902e6b | ||
|
|
c2968d5da0 | ||
|
|
870ad9d5b3 | ||
|
|
0022ff1bef | ||
|
|
a4992cc2d2 | ||
|
|
8a387de58d | ||
|
|
e8434cf3d3 | ||
|
|
ac49206b91 | ||
|
|
e6960b8c2a | ||
|
|
de82fafe9c | ||
|
|
4a4f8ffdd2 | ||
|
|
3dc35f8464 | ||
|
|
4cfb053573 | ||
|
|
84c5ede725 | ||
|
|
2b3c0e4355 | ||
|
|
148ac41089 | ||
|
|
82a90630e9 | ||
|
|
9b412eebdb | ||
|
|
801132262f | ||
|
|
8269a7a07c | ||
|
|
f57b85193b | ||
|
|
2fdc712d57 | ||
|
|
70853005d9 | ||
|
|
4064e214af | ||
|
|
6a72159035 | ||
|
|
5f93140796 | ||
|
|
8b295633b9 | ||
|
|
62a53ad6d1 | ||
|
|
9c68817612 | ||
|
|
19662f97be | ||
|
|
160fc7a65d | ||
|
|
2f33383251 | ||
|
|
ae93b92dae | ||
|
|
46314b4260 | ||
|
|
dc50adf98d | ||
|
|
b367938b7a | ||
|
|
5ca669de01 | ||
|
|
4c41c9813d | ||
|
|
40af0a58e6 | ||
|
|
3fb32211b2 | ||
|
|
dee76a7407 | ||
|
|
320ba71ca3 | ||
|
|
f7302a3eeb | ||
|
|
a3dd70151d | ||
|
|
5f7073ca4e | ||
|
|
c91409150f | ||
|
|
6aa3fbdd54 | ||
|
|
ec6575c09e | ||
|
|
887c350a93 | ||
|
|
8bc9558828 | ||
|
|
5fffc98955 | ||
|
|
8b813d1682 | ||
|
|
c65bb0e312 | ||
|
|
93f82ea55b | ||
|
|
79ddcd69ce | ||
|
|
a0c540d474 | ||
|
|
c0bf4ed2c9 | ||
|
|
82bff005c4 | ||
|
|
07a63eb9d2 | ||
|
|
171bf1d416 | ||
|
|
255a1b47a0 | ||
|
|
bec8625b69 | ||
|
|
1393a85a67 | ||
|
|
95389ecffb | ||
|
|
edf5f64b88 | ||
|
|
94c6219d54 | ||
|
|
6a270836d9 | ||
|
|
8f9eece29d | ||
|
|
b50f201637 | ||
|
|
01ff3035fe | ||
|
|
2394057f8d | ||
|
|
3c3904345a | ||
|
|
cfc84ab3db | ||
|
|
3a7feb1c39 | ||
|
|
1284affc10 | ||
|
|
3f7b1b8f79 | ||
|
|
016fef50aa | ||
|
|
2fde80fc1d | ||
|
|
0c19894fce | ||
|
|
22cd5160bf | ||
|
|
b02bba911d | ||
|
|
01bed46bce | ||
|
|
6b2da9e91d | ||
|
|
ec0752a267 | ||
|
|
4c14687217 | ||
|
|
67ba00b882 | ||
|
|
2a98da3ce8 | ||
|
|
a8f701b614 | ||
|
|
fbe7b0b419 | ||
|
|
624c7f17a2 | ||
|
|
195035f7ba | ||
|
|
f897ed8ae7 | ||
|
|
96a439a8df | ||
|
|
bc64e2a737 | ||
|
|
c49d686719 | ||
|
|
78f1c7b3b6 | ||
|
|
6eedbfd240 | ||
|
|
209295c581 | ||
|
|
ce68fd6870 | ||
|
|
cfd09436f1 | ||
|
|
eb87337e70 | ||
|
|
b96f503652 | ||
|
|
e2b5b8b2c5 | ||
|
|
f6a319714a | ||
|
|
78baa1ea47 | ||
|
|
5bb9a2a757 | ||
|
|
0288c777f8 | ||
|
|
d27c8898eb | ||
|
|
49717bf52f | ||
|
|
1764faeed2 | ||
|
|
ed55ef1341 | ||
|
|
75bec54a76 | ||
|
|
459f6b31e6 |
@@ -1,7 +1,9 @@
|
||||
<script>
|
||||
import { clearAllInterval } from '@/utils/util'
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
console.log('App Launch')
|
||||
clearAllInterval()
|
||||
},
|
||||
onShow: function () {
|
||||
console.log('App Show')
|
||||
@@ -23,4 +25,6 @@ export default {
|
||||
@import "./assets/css/base.less";
|
||||
@import "./assets/css/reset.less";
|
||||
@import "./assets/css/style.less";
|
||||
@import "./assets/css/v12-style.less";
|
||||
@import "./assets/css/aiChat.less";
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,335 @@
|
||||
<template>
|
||||
<view
|
||||
:class="{
|
||||
'focus': inputOnFocus
|
||||
}"
|
||||
class="fix-page-bottom"
|
||||
>
|
||||
<view v-if="inputModel === 'input'" class="bottom-body flex-center-between">
|
||||
<view class="history-wrap" @click="historyViewHandle">
|
||||
历史
|
||||
</view>
|
||||
<view class="input-container">
|
||||
<!-- 输入模式切换 -->
|
||||
<view
|
||||
class="input-model"
|
||||
@click="toggleInputModel"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/microphone.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
<!-- 输入框 -->
|
||||
<view class="input-wrap flex-center-between">
|
||||
<input
|
||||
v-model.trim="prompt"
|
||||
:show-confirm-bar="false"
|
||||
:adjust-position="true"
|
||||
:disabled="loading"
|
||||
:maxlength="-1"
|
||||
class="inp"
|
||||
@confirm="sendHandle"
|
||||
@focus="promptInputFocusHandle"
|
||||
@blur="promptInputBlurHandle"
|
||||
/>
|
||||
<view v-if="!prompt && !inputOnFocus" class="placeholder-txt">发消息...</view>
|
||||
</view>
|
||||
<view
|
||||
class="send-btn"
|
||||
@click="sendHandle"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/send.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 语音输入 -->
|
||||
<view
|
||||
v-if="inputModel === 'sound'"
|
||||
class="sound-input-wrap"
|
||||
>
|
||||
<view class="toggle-btn">
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-06.png'"
|
||||
class="input-icon"
|
||||
mode="widthFix"
|
||||
@click="toggleInputModel"
|
||||
/>
|
||||
</view>
|
||||
<view
|
||||
class="sound-wrap"
|
||||
@touchstart="startRecord"
|
||||
@touchend="stopRecord"
|
||||
>
|
||||
<view v-if="startTaskFlag" class="music-wrap">
|
||||
<view class="item one" />
|
||||
<view class="item two" />
|
||||
<view class="item three" />
|
||||
<view class="item four" />
|
||||
<view class="item five" />
|
||||
<view class="item six" />
|
||||
<view class="item seven" />
|
||||
</view>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/microphone-big.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view v-if="startTaskFlag" class="music-wrap music-wrap2">
|
||||
<view class="item one" />
|
||||
<view class="item two" />
|
||||
<view class="item three" />
|
||||
<view class="item four" />
|
||||
<view class="item five" />
|
||||
<view class="item six" />
|
||||
<view class="item seven" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
makeFileTransTask,
|
||||
getFileTransResult
|
||||
} from '@/api/voiceToText/index'
|
||||
import { VUE_APP_API_URL } from '@/config'
|
||||
import cookie from '@/utils/store/cookie'
|
||||
export default {
|
||||
name: 'BottomSend',
|
||||
props: {
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
keyboardHeight: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
token: cookie.get('login_status'),
|
||||
userInfo: cookie.get('userInfo'),
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
// 输入模式:input-键盘,sound-语音
|
||||
inputModel: 'input',
|
||||
/**
|
||||
* 端午节送礼攻略
|
||||
* 丽江逛吃攻略
|
||||
* 云南非遗有哪些?
|
||||
* 怎么申请地理标志保护产品?
|
||||
* 想找个像《去有风的地方》那样的治愈县城
|
||||
* 云南有哪些小众县城适合旅居?
|
||||
*/
|
||||
prompt: '',
|
||||
recordManager: null,
|
||||
// 录音权限是否开通
|
||||
recordPermission: false,
|
||||
taskId: '',
|
||||
taskTimer: null,
|
||||
startTaskFlag: false,
|
||||
// 输入框是否聚焦
|
||||
inputOnFocus: false
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearIntervalFn()
|
||||
},
|
||||
created() {
|
||||
uni.getSetting({
|
||||
success: res => {
|
||||
if (res.authSetting['scope.record']) {
|
||||
this.recordPermission = true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
promptInputFocusHandle() {
|
||||
this.$emit('focus', 1)
|
||||
setTimeout(() => {
|
||||
this.inputOnFocus = true
|
||||
}, 100)
|
||||
},
|
||||
promptInputBlurHandle() {
|
||||
this.$emit('focus', 0)
|
||||
this.inputOnFocus = false
|
||||
},
|
||||
toggleInputModel() {
|
||||
if (!this.token) {
|
||||
uni.reLaunch({ url: '/pages/auth/login' })
|
||||
return
|
||||
}
|
||||
if (this.loading) return
|
||||
if (this.inputModel === 'input') {
|
||||
uni.getSetting({
|
||||
success: res => {
|
||||
if (!res.authSetting['scope.record']) {
|
||||
uni.authorize({
|
||||
scope: 'scope.record',
|
||||
success: () => {
|
||||
console.log('获取录音权限成功')
|
||||
this.recordPermission = true
|
||||
this.inputModel = 'sound'
|
||||
},
|
||||
fail: () => {
|
||||
console.log('获取录音权限失败')
|
||||
this.recordPermission = false
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '需要获取麦克风权限',
|
||||
confirmText: '前往设置',
|
||||
confirmColor: '#3D4CF1',
|
||||
success(res2) {
|
||||
if (res2.confirm) {
|
||||
wx.openSetting()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.recordPermission = true
|
||||
this.inputModel = 'sound'
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.inputModel === 'sound') {
|
||||
this.clearIntervalFn()
|
||||
this.inputModel = 'input'
|
||||
return
|
||||
}
|
||||
},
|
||||
startRecord() {
|
||||
if (this.loading) {
|
||||
this.$toast('正在检索')
|
||||
return
|
||||
}
|
||||
// 正在识别,不触发相关动作
|
||||
if (this.startTaskFlag || this.taskTimer) {
|
||||
return
|
||||
}
|
||||
this.recordManager = uni.getRecorderManager()
|
||||
console.log('启动录音')
|
||||
this.startTaskFlag = true
|
||||
this.recordManager.start({
|
||||
duration: 60 * 1000,
|
||||
frameSize: 1,
|
||||
sampleRate: 16000,
|
||||
format: 'wav'
|
||||
})
|
||||
},
|
||||
stopRecord() {
|
||||
const _this = this
|
||||
// 正在识别,不触发相关动作
|
||||
if (this.taskTimer) {
|
||||
return
|
||||
}
|
||||
if (_this.recordManager) {
|
||||
_this.recordManager.stop()
|
||||
console.log('停止录音')
|
||||
_this.startTaskFlag = false
|
||||
_this.recordManager.onStop((res) => {
|
||||
console.log('录音结束------------')
|
||||
console.log(res)
|
||||
const { tempFilePath, fileSize, duration } = res
|
||||
if (tempFilePath && fileSize && duration) {
|
||||
_this.taskId = ''
|
||||
_this.clearIntervalFn()
|
||||
uni.showLoading({ title: '识别中...' })
|
||||
uni.uploadFile({
|
||||
url: `${VUE_APP_API_URL}/api/upload`,
|
||||
filePath: tempFilePath,
|
||||
header: {
|
||||
Authorization: 'Bearer ' + (_this.token || '')
|
||||
},
|
||||
name: 'file',
|
||||
success: uploadRes => {
|
||||
console.log(JSON.parse(uploadRes.data))
|
||||
_this.renderTransTask(uploadRes)
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
uni.hideLoading()
|
||||
_this.$toast('没有听清您说了什么,请再说一遍')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
_this.$toast('没有听清您说了什么,请再说一遍')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
renderTransTask(uploadRes) {
|
||||
const _this = this
|
||||
const file = JSON.parse(uploadRes.data).link || ''
|
||||
if (!file) return
|
||||
makeFileTransTask({
|
||||
file
|
||||
}).then(taskRes => {
|
||||
_this.taskId = taskRes.data
|
||||
_this.getTransResultReq()
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
_this.$toast('没有听清您说了什么,请再说一遍')
|
||||
})
|
||||
},
|
||||
getTransResultReq() {
|
||||
const _this = this
|
||||
_this.taskTimer = setInterval(() => {
|
||||
getFileTransResult({
|
||||
taskId: _this.taskId
|
||||
}).then(res => {
|
||||
const { success, data = [] } = res
|
||||
if (success && data) {
|
||||
uni.hideLoading()
|
||||
_this.clearIntervalFn()
|
||||
if (data === '__NULL__') {
|
||||
_this.$toast('没有听清您说了什么,请再说一遍')
|
||||
} else {
|
||||
if (data.length > 0) {
|
||||
const prompt = data[0].Text
|
||||
if (prompt) {
|
||||
_this.$emit('send', { prompt: prompt.replace('。', '') })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
_this.$toast('没有听清您说了什么,请再说一遍')
|
||||
})
|
||||
}, 1000)
|
||||
},
|
||||
clearIntervalFn() {
|
||||
this.taskTimer && clearInterval(this.taskTimer)
|
||||
this.taskTimer = null
|
||||
setTimeout(() => {
|
||||
this.startTaskFlag = false
|
||||
}, 300)
|
||||
},
|
||||
sendHandle() {
|
||||
if (this.loading) return
|
||||
if (!this.prompt) {
|
||||
this.$toast('请输入您想问的内容')
|
||||
return
|
||||
}
|
||||
this.$emit('send', { prompt: this.prompt })
|
||||
this.prompt = ''
|
||||
this.inputOnFocus = false
|
||||
},
|
||||
historyViewHandle() {
|
||||
this.$emit('history')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,268 @@
|
||||
<template>
|
||||
<view
|
||||
:class="{
|
||||
'show': showLayer
|
||||
}"
|
||||
class="history-wrap"
|
||||
>
|
||||
<view class="layer" @click="closeLayer" />
|
||||
<view
|
||||
:style="{
|
||||
'padding-top': statusBarHeight + 'px'
|
||||
}"
|
||||
class="history-container"
|
||||
>
|
||||
<view class="history-type">
|
||||
<view class="title">
|
||||
<view class="txt">今日</view>
|
||||
<image
|
||||
v-if="todayList.length > 0"
|
||||
:src="webUrl + '/aiChat/delete.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
@click="deleteRecords(1)"
|
||||
/>
|
||||
</view>
|
||||
<view v-if="todayList.length > 0" class="list-cont">
|
||||
<view
|
||||
v-for="(item, index) in todayList"
|
||||
:key="index"
|
||||
class="item"
|
||||
@click="historyItemClick(item)"
|
||||
>
|
||||
<view class="item-txt one-t">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="no-data">
|
||||
<image
|
||||
:src="webUrl + '/orderIcon/nodata1.png'"
|
||||
class="img"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="history-type">
|
||||
<view class="title">
|
||||
<view class="txt">30天内</view>
|
||||
<image
|
||||
v-if="list.length > 0"
|
||||
:src="webUrl + '/aiChat/delete.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
@click="deleteRecords(2)"
|
||||
/>
|
||||
</view>
|
||||
<view v-if="list.length > 0" class="list-cont">
|
||||
<view
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
class="item"
|
||||
@click="historyItemClick(item)"
|
||||
>
|
||||
<view class="item-txt one-t">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="no-data">
|
||||
<image
|
||||
:src="webUrl + '/orderIcon/nodata1.png'"
|
||||
class="img"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="history-type">
|
||||
<view class="title">
|
||||
<view class="txt">超过30天</view>
|
||||
<image
|
||||
v-if="moreList.length > 0"
|
||||
:src="webUrl + '/aiChat/delete.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
@click="deleteRecords(3)"
|
||||
/>
|
||||
</view>
|
||||
<view v-if="moreList.length > 0" class="list-cont">
|
||||
<view
|
||||
v-for="(item, index) in moreList"
|
||||
:key="index"
|
||||
class="item"
|
||||
@click="historyItemClick(item)"
|
||||
>
|
||||
<view class="item-txt one-t">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="no-data">
|
||||
<image
|
||||
:src="webUrl + '/orderIcon/nodata1.png'"
|
||||
class="img"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getChatList,
|
||||
deleteChatListByType
|
||||
} from '@/api/chat/index'
|
||||
export default {
|
||||
name: 'AiHistoryList',
|
||||
props: {
|
||||
statusBarHeight: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// 来源模块:''-首页,'history'-历史记录
|
||||
formModule: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
showLayer: false,
|
||||
todayList: [],
|
||||
list: [],
|
||||
moreList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showView() {
|
||||
this.showLayer = true
|
||||
this.getChatListReq()
|
||||
},
|
||||
getChatListReq() {
|
||||
getChatList().then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.todayList = data['今天'] || []
|
||||
this.list = data['30天内'] || []
|
||||
this.moreList = data['超过30天'] || []
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteRecords(type) {
|
||||
deleteChatListByType(type).then(res => {
|
||||
const { success } = res
|
||||
if (success) {
|
||||
this.getChatListReq()
|
||||
}
|
||||
})
|
||||
},
|
||||
historyItemClick(item) {
|
||||
const paramsStr = `?chatNumber=${item.chatNumber}&title=${item.title}&click=1`
|
||||
if (!this.formModule) {
|
||||
uni.navigateTo({
|
||||
url: '/aiChat/views/history' + paramsStr
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/aiChat/views/history' + paramsStr
|
||||
})
|
||||
}
|
||||
this.closeLayer()
|
||||
},
|
||||
closeLayer() {
|
||||
this.showLayer = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.history-wrap {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1001;
|
||||
transform: translateX(-100%);
|
||||
opacity: 0;
|
||||
transition: all 0.3s;
|
||||
.layer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.history-container {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 5;
|
||||
width: 75%;
|
||||
padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
border-top-right-radius: 60rpx;
|
||||
border-bottom-right-radius: 60rpx;
|
||||
overflow-y: auto;
|
||||
background-color: #fff;
|
||||
.history-type + .history-type {
|
||||
padding: 40rpx 0 0 0;
|
||||
}
|
||||
.history-type {
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.txt {
|
||||
font-size: 34rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.icon {
|
||||
display: block;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
.list-cont {
|
||||
padding: 24rpx 0 0 0;
|
||||
.item + .item {
|
||||
margin: 12rpx 0 0 0;
|
||||
}
|
||||
.item {
|
||||
.item-txt {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
height: 60rpx;
|
||||
padding: 0 24rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 30rpx;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
line-height: 60rpx;
|
||||
background-color: #F1F2FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
.no-data {
|
||||
.img {
|
||||
display: block;
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
margin: 40rpx auto 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.show {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,404 @@
|
||||
import {
|
||||
getSseConfigV1,
|
||||
getCompletionsV2,
|
||||
deleteChatItemByConversationId,
|
||||
getAnalyzeKeywordsV1,
|
||||
getAnalyzeKeywordsChangeV1
|
||||
} from '@/api/chat/index'
|
||||
import { VUE_APP_API_URL } from '@/config'
|
||||
import settings from '@/config/baseSetting.js'
|
||||
import { formatAiMsgContent } from '../utils/aiChat'
|
||||
import cookie from '@/utils/store/cookie'
|
||||
import { handleLoginFailure } from '@/utils'
|
||||
export const chatMixins = {
|
||||
data() {
|
||||
return {
|
||||
token: cookie.get('login_status'),
|
||||
userInfo: cookie.get('userInfo'),
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
scrollData: {},
|
||||
scrollTop: 0,
|
||||
isScrollToBottom: false,
|
||||
// 状态栏高度
|
||||
statusBarHeight: 20,
|
||||
fileHttpStr: Object.freeze(VUE_APP_API_URL + settings.sysPrefix),
|
||||
keyboardHeight: 0,
|
||||
optionsFrom: '',
|
||||
onFocus: false,
|
||||
loading: false,
|
||||
chatNumber: '',
|
||||
infoResData: {},
|
||||
chatMessageList: [
|
||||
/*
|
||||
{
|
||||
type: -2,
|
||||
isError: false,
|
||||
showCursor: false,
|
||||
conversationId: '',
|
||||
prompt: '',
|
||||
nodes: '-------------监听 WebSocket 接受到服务器的消息事件',
|
||||
content: '-------------监听 WebSocket 接受到服务器的消息事件',
|
||||
listQuestion: [
|
||||
'监听 WebSocket 接受到服务器的消息事件',
|
||||
'监听 WebSocket 接受到服务器的消息事件',
|
||||
'监听 WebSocket 接受到服务器的消息事件'
|
||||
]
|
||||
}
|
||||
*/
|
||||
],
|
||||
errorMsg: Object.freeze('您提的问题未能理解,云灵思想跑偏啦,重新整理一下问题或者重新提问,让云灵再试试!')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
chatMessageListLength() {
|
||||
return this.chatMessageList.length
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
this.scrollData = e
|
||||
const scrollTop = e.scrollTop
|
||||
this.scrollTop = scrollTop
|
||||
const query = wx.createSelectorQuery().in(this)
|
||||
query.select('#fixTbabarBody').boundingClientRect(function(rect) {
|
||||
const contentHeight = rect.height
|
||||
const windowInfo = wx.getWindowInfo()
|
||||
const windowHeight = windowInfo.windowHeight
|
||||
if (scrollTop + windowHeight + 30 >= contentHeight) {
|
||||
this.isScrollToBottom = true
|
||||
} else {
|
||||
this.isScrollToBottom = false
|
||||
}
|
||||
}.bind(this)).exec()
|
||||
},
|
||||
onUnload() {
|
||||
this.closeWsFn()
|
||||
// console.log('在页面卸载时取消监听')
|
||||
// wx.offKeyboardHeightChange()
|
||||
},
|
||||
created() {
|
||||
const _this = this
|
||||
uni.getSystemInfo({
|
||||
success: (e) => {
|
||||
let statusBar = 0
|
||||
// #ifdef MP-WEIXIN
|
||||
statusBar = e.statusBarHeight
|
||||
const custom = uni.getMenuButtonBoundingClientRect()
|
||||
_this.rightDistance = e.windowWidth - custom.left + 10
|
||||
// #endif
|
||||
// 状态栏高度
|
||||
_this.statusBarHeight = statusBar
|
||||
}
|
||||
})
|
||||
_this.createdCallbak()
|
||||
},
|
||||
methods: {
|
||||
createdCallbak() {
|
||||
console.log('页面初始话回调')
|
||||
},
|
||||
inputFocusHandle(value) {
|
||||
this.onFocus = value === 1
|
||||
this.scrollToBottomHandle()
|
||||
},
|
||||
historyViewHandle() {
|
||||
console.log(this.$refs.historyView)
|
||||
this.$refs.historyView.showView()
|
||||
},
|
||||
copyContentHandle(data) {
|
||||
uni.setClipboardData({
|
||||
data,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '已复制'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
copyMoreInfoHandle(item) {
|
||||
uni.setClipboardData({
|
||||
data: JSON.stringify(item.showMoreInfo),
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '已复制'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
shareHandle() {
|
||||
wx.showShareMenu({
|
||||
withShareTicket: true,
|
||||
menus: ['shareAppMessage', 'shareTimeline'],
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
scrollToBottomHandle() {
|
||||
uni.pageScrollTo({
|
||||
duration: 100,
|
||||
selector: '#bottom_postion'
|
||||
})
|
||||
this.isScrollToBottom = true
|
||||
},
|
||||
// 重新生成
|
||||
regenerateHandle(item) {
|
||||
deleteChatItemByConversationId(item.conversationId).then(res => {
|
||||
const { success } = res
|
||||
if (success) {
|
||||
this.chatMessageList.splice(this.chatMessageListLength - 1, 1)
|
||||
this.streamReq({
|
||||
prompt: item.prompt,
|
||||
init: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 建议提问
|
||||
suggestionItemClickHandle(question) {
|
||||
this.streamReq({
|
||||
prompt: question,
|
||||
init: 0
|
||||
})
|
||||
},
|
||||
// 大家都在问
|
||||
topicItemClickHandle(question) {
|
||||
this.streamReq({
|
||||
prompt: question,
|
||||
init: 0
|
||||
})
|
||||
},
|
||||
streamReq(params) {
|
||||
const _this = this
|
||||
// 需要校验登录状态
|
||||
if (!_this.token) {
|
||||
handleLoginFailure()
|
||||
return
|
||||
}
|
||||
const prompt = params.prompt
|
||||
if (params.init !== 1) {
|
||||
_this.chatMessageList.push({
|
||||
prompt,
|
||||
type: -1
|
||||
})
|
||||
}
|
||||
_this.$nextTick(() => {
|
||||
_this.scrollToBottomHandle()
|
||||
})
|
||||
_this.chatMessageList.push({
|
||||
content: '',
|
||||
nodes: '',
|
||||
isError: false,
|
||||
showCursor: false,
|
||||
conversationId: '',
|
||||
prompt,
|
||||
listQuestion: [],
|
||||
type: -2,
|
||||
showMoreInfo: {}
|
||||
})
|
||||
_this.loading = true
|
||||
_this.showCursor = false
|
||||
getSseConfigV1({
|
||||
'chatNumber': _this.chatNumber,
|
||||
prompt
|
||||
}).then(resConfig => {
|
||||
const conversationId = resConfig.data.conversationId
|
||||
_this.chatNumber = resConfig.data.chatNumber || ''
|
||||
_this.chatMessageList[_this.chatMessageListLength - 1].showCursor = true
|
||||
_this.chatMessageList[_this.chatMessageListLength - 1].conversationId = conversationId
|
||||
if (conversationId) {
|
||||
_this.initWebSocket(conversationId, () => {
|
||||
getCompletionsV2({
|
||||
conversationId,
|
||||
ws: true,
|
||||
isNoNeedPublicErrorNotification: 1
|
||||
}).then(sseRes => {
|
||||
console.log(sseRes)
|
||||
// _this.closeWsFn()
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
_this.chatErrorSetContent()
|
||||
})
|
||||
})
|
||||
getAnalyzeKeywordsV1({
|
||||
'chatNumber': _this.chatNumber,
|
||||
conversationId,
|
||||
prompt
|
||||
}).then(keywordRes => {
|
||||
if (keywordRes.success) {
|
||||
const keywordResData = keywordRes.data
|
||||
const show = (keywordResData.searchArtworks ||
|
||||
keywordResData.searchDiscount ||
|
||||
keywordResData.searchGoods ||
|
||||
keywordResData.searchLandmark ||
|
||||
keywordResData.searchTowns ||
|
||||
keywordResData.searchTravelGuide
|
||||
) && (keywordResData.resultItems && keywordResData.resultItems.length > 0)
|
||||
_this.chatMessageList[_this.chatMessageListLength - 1].showMoreInfo = keywordResData
|
||||
_this.chatMessageList[_this.chatMessageListLength - 1].showMoreInfo.show = show
|
||||
// 展示类型
|
||||
_this.chatMessageList[_this.chatMessageListLength - 1].showMoreInfo.showType = ''
|
||||
if (show && keywordResData.resultItems) {
|
||||
keywordResData.resultItems.map(resItem => {
|
||||
_this.chatMessageList[_this.chatMessageListLength - 1].showMoreInfo.showType = resItem.type
|
||||
})
|
||||
}
|
||||
console.log(_this.chatMessageList[_this.chatMessageListLength - 1])
|
||||
}
|
||||
})
|
||||
} else {
|
||||
_this.chatErrorSetContent()
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
_this.chatErrorSetContent()
|
||||
})
|
||||
},
|
||||
analyzeKeywordsChangeHandle(conversationId, showMoreInfo) {
|
||||
getAnalyzeKeywordsChangeV1({
|
||||
conversationId,
|
||||
...showMoreInfo
|
||||
}).then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
let resultItems = []
|
||||
let idx = -1
|
||||
this.chatMessageList.map((item, index) => {
|
||||
if (item.conversationId === conversationId) {
|
||||
resultItems = data.resultItems || []
|
||||
idx = index
|
||||
}
|
||||
})
|
||||
if (idx > -1) {
|
||||
this.$set(this.chatMessageList[idx].showMoreInfo, 'resultItems', resultItems)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
productItemClickHandle(item) {
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
hotelItemClickHandle(item) {
|
||||
this.$yrouter.push({
|
||||
path: '/pagesInn/inn/innHome',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
ichItemClickHandle(item) {
|
||||
this.$yrouter.push({
|
||||
path: '/pkg_product/views/heritage/details',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
qianxianItemClickHandle(item) {
|
||||
this.$yrouter.push({
|
||||
path: '/pkg_product/views/famousQianxianShop',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
chatErrorSetContent() {
|
||||
this.chatMessageList[this.chatMessageListLength - 1].isError = true
|
||||
this.chatMessageList[this.chatMessageListLength - 1].content = this.errorMsg
|
||||
this.chatMessageList[this.chatMessageListLength - 1].nodes = this.errorMsg
|
||||
this.closeWsFn()
|
||||
},
|
||||
closeWsFn() {
|
||||
this.loading = false
|
||||
if (this.chatMessageListLength) {
|
||||
this.chatMessageList[this.chatMessageListLength - 1].showCursor = false
|
||||
}
|
||||
uni.closeSocket({
|
||||
success: () => {
|
||||
console.log('-----关闭连接')
|
||||
}
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.scrollToBottomHandle()
|
||||
})
|
||||
},
|
||||
initWebSocket(conversationId, cb) {
|
||||
const _this = this
|
||||
console.log('------------------创建连接')
|
||||
uni.connectSocket({
|
||||
url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.unionId}-${conversationId}`,
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
timeout: 10 * 1000,
|
||||
success: () => {
|
||||
console.log('------------WebSocket初始化成功')
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showModal({
|
||||
showCancel: false,
|
||||
content: err
|
||||
})
|
||||
}
|
||||
})
|
||||
uni.onSocketMessage(res => {
|
||||
_this.websocketOnmessage(res)
|
||||
})
|
||||
uni.onSocketOpen(() => {
|
||||
cb && cb()
|
||||
_this.websocketOnopen()
|
||||
})
|
||||
uni.onSocketError(err => {
|
||||
_this.websocketOnerror(err)
|
||||
})
|
||||
},
|
||||
websocketOnmessage(res) {
|
||||
console.log('-------------监听 WebSocket 接受到服务器的消息事件')
|
||||
const resData = JSON.parse(res.data)
|
||||
if (resData) {
|
||||
const message = resData.message
|
||||
if (message && this.chatMessageListLength > 1) {
|
||||
const mesContent = message.content
|
||||
this.chatMessageList[this.chatMessageListLength - 1].nodes = formatAiMsgContent(mesContent)
|
||||
this.chatMessageList[this.chatMessageListLength - 1].content = mesContent
|
||||
this.chatMessageList[this.chatMessageListLength - 1].listQuestion = message.listQuestion || []
|
||||
this.$forceUpdate()
|
||||
this.$nextTick(() => {
|
||||
this.scrollToBottomHandle()
|
||||
if (message.finish) {
|
||||
this.closeWsFn()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
websocketOnopen() {
|
||||
console.log('------------------监听 WebSocket 连接打开事件')
|
||||
// this.websocketSend(JSON.stringify({ msg: '1' }))
|
||||
},
|
||||
websocketOnerror(e) {
|
||||
console.log('-----------------监听 WebSocket 错误事件')
|
||||
console.log(e)
|
||||
},
|
||||
websocketSend(msg) {
|
||||
// 数据发送
|
||||
try {
|
||||
uni.sendSocketMessage({
|
||||
data: msg,
|
||||
success: () => {
|
||||
console.log('-----------发送消息成功了')
|
||||
}
|
||||
})
|
||||
} catch (err) {
|
||||
console.log('send failed (' + err.code + ')')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
// 引入markdown-it库
|
||||
import MarkdownIt from './/markdown-it.min.js'
|
||||
// hljs是由 Highlight.js 经兼容性修改后的文件,请勿直接升级。否则会造成uni-app-vue3-Android下有兼容问题
|
||||
import hljs from './highlight/highlight-uni.min.js'
|
||||
|
||||
// 初始化 MarkdownIt库
|
||||
const markdownIt = MarkdownIt({
|
||||
// 在源码中启用 HTML 标签
|
||||
html: true,
|
||||
// 如果结果以 <pre ... 开头,内部包装器则会跳过。
|
||||
highlight: function(str, lang) {
|
||||
// if (lang && hljs.getLanguage(lang)) {
|
||||
// console.error('lang', lang)
|
||||
// try {
|
||||
// return '<pre class="hljs" style="padding: 5px 8px;margin: 5px 0;overflow: auto;display: block;"><code>' +
|
||||
// hljs.highlight('lang', str, true).value +
|
||||
// '</code></pre>';
|
||||
// } catch (__) {}
|
||||
// }
|
||||
// 经过highlight.js处理后的html
|
||||
let preCode = ''
|
||||
try {
|
||||
preCode = hljs.highlightAuto(str).value
|
||||
} catch (err) {
|
||||
preCode = markdownIt.utils.escapeHtml(str)
|
||||
}
|
||||
|
||||
// 以换行进行分割
|
||||
const lines = preCode.split(/\n/).slice(0, -1)
|
||||
// 添加自定义行号
|
||||
let html = lines.map((item, index) => {
|
||||
// 去掉空行
|
||||
if (item === '') {
|
||||
return ''
|
||||
}
|
||||
return '<li><span class="line-num" data-line="' + (index + 1) + '"></span>' + item + '</li>'
|
||||
}).join('')
|
||||
html = '<ol style="padding: 0px 30px;">' + html + '</ol>'
|
||||
let htmlCode = `<div style="background:#0d1117;margin-top: 5px;color: #888;padding:5px 0;border-radius: 5px;">`
|
||||
htmlCode += `<pre class="hljs" style="padding:0 8px;margin-bottom:5px;overflow: auto;display: block;border-radius: 5px;"><code>${html}</code></pre>`
|
||||
htmlCode += '</div>'
|
||||
return htmlCode
|
||||
}
|
||||
})
|
||||
|
||||
export function formatAiMsgContent(val) {
|
||||
if (!val) {
|
||||
return ''
|
||||
}
|
||||
let htmlString = ''
|
||||
// 修改转换结果的htmlString值 用于正确给界面增加鼠标闪烁的效果
|
||||
// 判断markdown中代码块标识符的数量是否为偶数
|
||||
if (val.split('```').length % 2) {
|
||||
let msgContent = val
|
||||
if (msgContent[msgContent.length - 1] !== '\n') {
|
||||
msgContent += '\n'
|
||||
}
|
||||
msgContent += ' <span class="cursor">|</span>'
|
||||
htmlString = markdownIt.render(msgContent)
|
||||
} else {
|
||||
htmlString = markdownIt.render(val)
|
||||
htmlString = markdownIt.render(val) + ' \n <span class="cursor">|</span>'
|
||||
}
|
||||
// console.log(htmlString)
|
||||
return htmlString
|
||||
}
|
||||
|
||||
/**
|
||||
* 简单实现防抖方法
|
||||
*
|
||||
* 防抖(debounce)函数在第一次触发给定的函数时,不立即执行函数,而是给出一个期限值(delay),比如100ms。
|
||||
* 如果100ms内再次执行函数,就重新开始计时,直到计时结束后再真正执行函数。
|
||||
* 这样做的好处是如果短时间内大量触发同一事件,只会执行一次函数。
|
||||
*
|
||||
* @param fn 要防抖的函数
|
||||
* @param delay 防抖的毫秒数
|
||||
* @returns {Function}
|
||||
*/
|
||||
export function simpleDebounce(fn, delay = 100) {
|
||||
let timer = null
|
||||
return function() {
|
||||
const args = arguments
|
||||
if (timer) {
|
||||
clearTimeout(timer)
|
||||
}
|
||||
timer = setTimeout(() => {
|
||||
fn.apply(null, args)
|
||||
}, delay)
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
||||
Theme: GitHub Dark
|
||||
Description: Dark theme as seen on github.com
|
||||
Author: github.com
|
||||
Maintainer: @Hirse
|
||||
Updated: 2021-05-15
|
||||
|
||||
Outdated base version: https://github.com/primer/github-syntax-dark
|
||||
Current colors taken from GitHub's CSS
|
||||
*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}
|
||||
+5256
File diff suppressed because one or more lines are too long
Vendored
+2
File diff suppressed because one or more lines are too long
@@ -0,0 +1,473 @@
|
||||
<template>
|
||||
<view
|
||||
:class="scrollTop > 0 ? 'page-scroll' : ''"
|
||||
class="fix-tabbar-page"
|
||||
>
|
||||
<hx-navbar
|
||||
:back="true"
|
||||
:fixed="true"
|
||||
:statusBar="true"
|
||||
:pageScroll.sync="scrollData"
|
||||
:title="pageTitle"
|
||||
color="#333"
|
||||
transparent="auto"
|
||||
barPlaceholder="hidden"
|
||||
/>
|
||||
<view
|
||||
id="fixTbabarBody"
|
||||
:style="{
|
||||
'padding-top': (44 + statusBarHeight) + 'px'
|
||||
}"
|
||||
class="fix-tabbar-body"
|
||||
>
|
||||
<view class="chat-wrap">
|
||||
<view v-if="chatMessageListLength > 0" class="chat-list-wrap">
|
||||
<view
|
||||
v-for="(item, index) in chatMessageList"
|
||||
:key="index"
|
||||
class="chat-message-item"
|
||||
>
|
||||
<view v-if="item.type === -1" class="chat-message-body">
|
||||
<view class="item-right">
|
||||
<view class="txt">
|
||||
{{ item.prompt }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.type === -2" class="chat-message-body">
|
||||
<view class="avatar">
|
||||
<image
|
||||
:src="webUrl + '/aiChat/avatar.png'"
|
||||
class="chat-avatar"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
<view class="item-left">
|
||||
<view class="txt">
|
||||
<view
|
||||
ref="rich-text-box"
|
||||
:class="{
|
||||
'show-cursor': item.showCursor
|
||||
}"
|
||||
class="rich-text-box"
|
||||
>
|
||||
<rich-text
|
||||
v-if="item.nodes && item.nodes.length"
|
||||
:nodes="item.nodes"
|
||||
space="nbsp"
|
||||
/>
|
||||
<view v-if="!(item.nodes && item.nodes.length) && loading" class="loader-wrap">
|
||||
<div class="loader" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="!item.showCursor && item.nodes && item.nodes.length && !item.isError"
|
||||
class="bottom-btns"
|
||||
>
|
||||
<!-- <button
|
||||
open-type="share"
|
||||
plain="true"
|
||||
class="item"
|
||||
@click="shareHandle"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/icon-25.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
分享
|
||||
</button> -->
|
||||
<view class="item" @click="copyContentHandle(item.content)">
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-02.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
复制
|
||||
</view>
|
||||
<view
|
||||
v-if="index === (chatMessageListLength - 1)"
|
||||
class="item"
|
||||
@click="regenerateHandle(item)"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-04.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
重新生成
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 换一换 -->
|
||||
<view
|
||||
v-if="item.showMoreInfo.show"
|
||||
class="change-list-wrap"
|
||||
>
|
||||
<view v-if="item.showMoreInfo.showType === '特产商品'" class="list-wrap">
|
||||
<view
|
||||
v-for="(productItem, productIndex) in item.showMoreInfo.resultItems"
|
||||
:key="productIndex"
|
||||
class="product-item"
|
||||
@click="productItemClickHandle(productItem)"
|
||||
>
|
||||
<image
|
||||
:src="productItem.img"
|
||||
class="img"
|
||||
/>
|
||||
<view class="product-info">
|
||||
<view class="name one-t">
|
||||
{{ productItem.name }}
|
||||
</view>
|
||||
<view class="price-wrap">
|
||||
<view class="price">
|
||||
<text class="txt">¥</text>{{ productItem.price }}
|
||||
</view>
|
||||
<view class="btn">立即查看</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.showMoreInfo.showType === '店铺'" class="list-wrap">
|
||||
<view
|
||||
v-for="(hotel, hotelIndex) in item.showMoreInfo.resultItems"
|
||||
:key="hotelIndex"
|
||||
class="product-item"
|
||||
@click="hotelItemClickHandle(hotel)"
|
||||
>
|
||||
<view class="hotel-type">
|
||||
手工体验
|
||||
</view>
|
||||
<image
|
||||
:src="hotel.img"
|
||||
class="img"
|
||||
/>
|
||||
<view class="product-info">
|
||||
<view class="name one-t">
|
||||
{{ hotel.name }}
|
||||
</view>
|
||||
<view class="desc-wrap one-t">
|
||||
{{ hotel.description || '' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.showMoreInfo.showType === '非遗文化'" class="list-wrap">
|
||||
<view
|
||||
v-for="(ich, ichIndex) in item.showMoreInfo.resultItems"
|
||||
:key="ichIndex"
|
||||
class="product-item"
|
||||
@click="ichItemClickHandle(ich)"
|
||||
>
|
||||
<image
|
||||
:src="ich.img"
|
||||
class="img"
|
||||
/>
|
||||
<view class="product-info">
|
||||
<view class="name one-t">
|
||||
{{ ich.name }}
|
||||
</view>
|
||||
<view class="desc-wrap one-t">
|
||||
{{ ich.description || '' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.showMoreInfo.showType === '千县名品'" class="list-wrap">
|
||||
<view
|
||||
v-for="(qianxian, qianxianIndex) in item.showMoreInfo.resultItems"
|
||||
:key="qianxianIndex"
|
||||
class="product-item"
|
||||
@click="qianxianItemClickHandle(qianxian)"
|
||||
>
|
||||
<image
|
||||
:src="qianxian.img"
|
||||
class="img"
|
||||
/>
|
||||
<view class="product-info">
|
||||
<view class="name name2 one-t">
|
||||
{{ qianxian.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="change-btn">
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-change.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
@click="analyzeKeywordsChangeHandle(item.conversationId, item.showMoreInfo)"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="index === (chatMessageListLength - 1) && item.listQuestion.length > 0"
|
||||
class="suggestion-wrap"
|
||||
>
|
||||
<view class="suggestion-list">
|
||||
<view
|
||||
v-for="(question, questionIndex) in item.listQuestion"
|
||||
:key="questionIndex"
|
||||
class="item"
|
||||
@click="suggestionItemClickHandle(question)"
|
||||
>
|
||||
<view class="item-cont">
|
||||
<view class="txt">
|
||||
{{ question }}
|
||||
</view>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-03.png'"
|
||||
class="pic"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view id="bottom_postion" class="bottom-postion" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
:class="{
|
||||
'focus': onFocus
|
||||
}"
|
||||
class="page-to-bottom"
|
||||
>
|
||||
<view
|
||||
class="new-chat"
|
||||
@click="createNewHandle"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-05.png'"
|
||||
class="btn-icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
开启新对话
|
||||
</view>
|
||||
<image
|
||||
v-if="chatMessageListLength > 0 && !isScrollToBottom && !loading"
|
||||
:src="webUrl + '/aiChat/down.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
@click="scrollToBottomHandle"
|
||||
/>
|
||||
</view>
|
||||
<bottom-send
|
||||
ref="bottomSend"
|
||||
:loading="loading"
|
||||
:keyboard-height="keyboardHeight"
|
||||
@send="streamReq"
|
||||
@history="historyViewHandle"
|
||||
@focus="inputFocusHandle"
|
||||
/>
|
||||
<AiHistoryList
|
||||
ref="historyView"
|
||||
:status-bar-height="statusBarHeight"
|
||||
form-module="history"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { chatMixins } from '../mixins/chatMixins.js'
|
||||
import AiHistoryList from '../components/historyList'
|
||||
import BottomSend from '../components/bottomSend.vue'
|
||||
import {
|
||||
historyChatMessage
|
||||
} from '@/api/chat/index'
|
||||
import { formatAiMsgContent } from '../utils/aiChat'
|
||||
export default {
|
||||
name: 'AiChatHistoryPage',
|
||||
components: {
|
||||
AiHistoryList,
|
||||
BottomSend
|
||||
},
|
||||
mixins: [chatMixins],
|
||||
data() {
|
||||
return {
|
||||
pageTitle: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.chatNumber = options.chatNumber
|
||||
this.pageTitle = options.title
|
||||
this.pageTitle = this.pageTitle.length > 8 ? (this.pageTitle.substring(0, 8) + '...') : this.pageTitle
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.loading = true
|
||||
historyChatMessage({
|
||||
chatNumber: this.chatNumber
|
||||
}).then(res => {
|
||||
const { success, data = [] } = res
|
||||
if (success) {
|
||||
this.loading = false
|
||||
try {
|
||||
data.map(item => {
|
||||
if (item.role === 'user') {
|
||||
this.chatMessageList.push({
|
||||
type: -1,
|
||||
prompt: item.content
|
||||
})
|
||||
} else {
|
||||
if (item.contentType === 'text') {
|
||||
this.chatMessageList.push({
|
||||
...item,
|
||||
nodes: formatAiMsgContent(item.content),
|
||||
prompt: this.getParentPrompt(data, item.parentMessageId),
|
||||
conversationId: item.messageId,
|
||||
showCursor: false,
|
||||
listQuestion: item.listQuestion || [],
|
||||
type: -2
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (err) {
|
||||
uni.showModal({
|
||||
title: '错误提示',
|
||||
content: JSON.stringify(err)
|
||||
})
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
getParentPrompt(list = '', parentMessageId) {
|
||||
let prompt = ''
|
||||
list.map(item => {
|
||||
if (item.messageId === parentMessageId) {
|
||||
prompt = item.content
|
||||
}
|
||||
})
|
||||
return prompt
|
||||
},
|
||||
// 创建新会话
|
||||
createNewHandle() {
|
||||
uni.setStorageSync('addNewChat', '1')
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.chat-wrap {
|
||||
padding: 0 0 180rpx 0;
|
||||
.chat-info-wrap {
|
||||
padding: 24rpx;
|
||||
.chat-list-wrap2 {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.loading-wrap {
|
||||
text-align: center;
|
||||
color: #666;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.rich-text-box {
|
||||
max-width: 100%;
|
||||
}
|
||||
.show-cursor .cursor {
|
||||
display: inline-block;
|
||||
color: #3D4CF1;
|
||||
font-weight: bold;
|
||||
animation: blinking 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes blinking {
|
||||
from {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0.0;
|
||||
}
|
||||
}
|
||||
.focus-guide-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 60rpx 40rpx;
|
||||
.guide-left {
|
||||
.avatar {
|
||||
display: block;
|
||||
width: 267rpx;
|
||||
height: 530rpx;
|
||||
}
|
||||
}
|
||||
.guide-right {
|
||||
padding: 30rpx;
|
||||
margin: 0 0 0 40rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx 12rpx 30rpx rgba(0,0,0,0.1);
|
||||
.title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.content {
|
||||
padding: 30rpx 0 0 0;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.topic-wrap {
|
||||
width: 100%;
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.txt {
|
||||
width: 186rpx;
|
||||
height: 46rpx;
|
||||
margin: 0 20rpx;
|
||||
border-radius: 24rpx;
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
background-color: #3D4CF1;
|
||||
}
|
||||
.icon {
|
||||
display: flex;
|
||||
width: 40rpx;
|
||||
}
|
||||
}
|
||||
.list-wrap {
|
||||
width: 100%;
|
||||
margin: 60rpx 0 0 0;
|
||||
overflow-x: auto;
|
||||
.list-cont {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 150%;
|
||||
.list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 40rpx;
|
||||
padding: 0 12rpx;
|
||||
margin: 0 30rpx 30rpx 0;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
background: rgba(255,255,255,0.39);
|
||||
box-shadow: 0rpx 6rpx 12rpx rgba(0,0,0,0.1);
|
||||
.icon {
|
||||
display: block;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 8rpx 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,577 @@
|
||||
<template>
|
||||
<view
|
||||
:class="scrollTop > 0 ? 'page-scroll' : ''"
|
||||
class="fix-tabbar-page"
|
||||
>
|
||||
<hx-navbar
|
||||
:back="false"
|
||||
:fixed="true"
|
||||
:statusBar="true"
|
||||
:pageScroll.sync="scrollData"
|
||||
left-icon="arrowleft"
|
||||
color="#333"
|
||||
transparent="auto"
|
||||
barPlaceholder="hidden"
|
||||
title="云灵AI智能助手"
|
||||
@click-left="clickBackHandle"
|
||||
/>
|
||||
<page-container
|
||||
:show="true"
|
||||
:overlay="false"
|
||||
:z-index="1"
|
||||
@beforeleave="pageContainerBeforeleave"
|
||||
>
|
||||
<view style="opacity: 0;">
|
||||
遮罩层,用于监听实体键返回
|
||||
</view>
|
||||
</page-container>
|
||||
<view
|
||||
id="fixTbabarBody"
|
||||
:style="{
|
||||
'padding-top': (44 + statusBarHeight) + 'px'
|
||||
}"
|
||||
class="fix-tabbar-body"
|
||||
>
|
||||
<block v-if="chatMessageListLength < 1">
|
||||
<view class="home-focus-wrap">
|
||||
<view class="focus-guide-wrap">
|
||||
<view class="guide-left">
|
||||
<image
|
||||
:src="webUrl + '/aiChat/logo-01.gif'"
|
||||
class="avatar"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
<view class="guide-right">
|
||||
<view class="trangle" />
|
||||
<view class="title">{{ settingInfo.helloMessageTitle }}</view>
|
||||
<view class="content">{{ settingInfo.helloMessageContent }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="topic-wrap">
|
||||
<view class="title">
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-01.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="txt">#大家都在问</view>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-01.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
<view class="list-wrap">
|
||||
<view
|
||||
:style="{
|
||||
'width': animationWidth,
|
||||
'animation': animationStr
|
||||
}"
|
||||
class="list-cont"
|
||||
>
|
||||
<view
|
||||
v-for="(item, index) in topicList"
|
||||
:key="index"
|
||||
class="list-item"
|
||||
@click="topicItemClickHandle(item.title)"
|
||||
>
|
||||
<image
|
||||
v-if="item.isHot"
|
||||
:src="webUrl + '/aiChat/hot.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
{{ item.title }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="chat-wrap">
|
||||
<view v-if="chatMessageListLength > 0" class="chat-list-wrap">
|
||||
<view
|
||||
v-for="(item, index) in chatMessageList"
|
||||
:key="index"
|
||||
class="chat-message-item"
|
||||
>
|
||||
<view v-if="item.type === -1" class="chat-message-body">
|
||||
<view class="item-right">
|
||||
<view class="txt">
|
||||
{{ item.prompt }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.type === -2" class="chat-message-body">
|
||||
<view class="avatar">
|
||||
<image
|
||||
:src="webUrl + '/aiChat/avatar.png'"
|
||||
class="chat-avatar"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
<view class="item-left">
|
||||
<view class="txt">
|
||||
<view
|
||||
ref="rich-text-box"
|
||||
:class="{
|
||||
'show-cursor': item.showCursor
|
||||
}"
|
||||
class="rich-text-box"
|
||||
>
|
||||
<rich-text
|
||||
v-if="item.nodes && item.nodes.length"
|
||||
:nodes="item.nodes"
|
||||
space="nbsp"
|
||||
/>
|
||||
<view v-if="!(item.nodes && item.nodes.length) && loading" class="loader-wrap">
|
||||
<div class="loading2" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="!item.showCursor && item.nodes && item.nodes.length && !item.isError"
|
||||
class="bottom-btns"
|
||||
>
|
||||
<!-- <button
|
||||
open-type="share"
|
||||
plain="true"
|
||||
class="item"
|
||||
@click="shareHandle"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/icon-25.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
分享
|
||||
</button> -->
|
||||
<view class="item" @click="copyContentHandle(item.content)">
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-02.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
复制
|
||||
</view>
|
||||
<view
|
||||
v-if="index === (chatMessageListLength - 1)"
|
||||
class="item"
|
||||
@click="regenerateHandle(item)"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-04.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
重新生成
|
||||
</view>
|
||||
<view class="item item2" @click="copyMoreInfoHandle(item)">拷贝</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 换一换 -->
|
||||
<view
|
||||
v-if="item.showMoreInfo.show"
|
||||
class="change-list-wrap"
|
||||
>
|
||||
<view v-if="item.showMoreInfo.showType === '特产商品'" class="list-wrap">
|
||||
<view
|
||||
v-for="(productItem, productIndex) in item.showMoreInfo.resultItems"
|
||||
:key="productIndex"
|
||||
class="product-item"
|
||||
@click="productItemClickHandle(productItem)"
|
||||
>
|
||||
<image
|
||||
:src="productItem.img"
|
||||
class="img"
|
||||
/>
|
||||
<view class="product-info">
|
||||
<view class="name one-t">
|
||||
{{ productItem.name }}
|
||||
</view>
|
||||
<view class="price-wrap">
|
||||
<view class="price">
|
||||
<text class="txt">¥</text>{{ productItem.price }}
|
||||
</view>
|
||||
<view class="btn">立即查看</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.showMoreInfo.showType === '店铺'" class="list-wrap">
|
||||
<view
|
||||
v-for="(hotel, hotelIndex) in item.showMoreInfo.resultItems"
|
||||
:key="hotelIndex"
|
||||
class="product-item"
|
||||
@click="hotelItemClickHandle(hotel)"
|
||||
>
|
||||
<view class="hotel-type">
|
||||
手工体验
|
||||
</view>
|
||||
<image
|
||||
:src="hotel.img"
|
||||
class="img"
|
||||
/>
|
||||
<view class="product-info">
|
||||
<view class="name one-t">
|
||||
{{ hotel.name }}
|
||||
</view>
|
||||
<view class="desc-wrap one-t">
|
||||
{{ hotel.description || '' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.showMoreInfo.showType === '非遗文化'" class="list-wrap">
|
||||
<view
|
||||
v-for="(ich, ichIndex) in item.showMoreInfo.resultItems"
|
||||
:key="ichIndex"
|
||||
class="product-item"
|
||||
@click="ichItemClickHandle(ich)"
|
||||
>
|
||||
<image
|
||||
:src="ich.img"
|
||||
class="img"
|
||||
/>
|
||||
<view class="product-info">
|
||||
<view class="name one-t">
|
||||
{{ ich.name }}
|
||||
</view>
|
||||
<view class="desc-wrap one-t">
|
||||
{{ ich.description || '' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.showMoreInfo.showType === '千县名品'" class="list-wrap">
|
||||
<view
|
||||
v-for="(qianxian, qianxianIndex) in item.showMoreInfo.resultItems"
|
||||
:key="qianxianIndex"
|
||||
class="product-item"
|
||||
@click="qianxianItemClickHandle(qianxian)"
|
||||
>
|
||||
<image
|
||||
:src="qianxian.img"
|
||||
class="img"
|
||||
/>
|
||||
<view class="product-info">
|
||||
<view class="name name2 one-t">
|
||||
{{ qianxian.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="change-btn">
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-change.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
@click="analyzeKeywordsChangeHandle(item.conversationId, item.showMoreInfo)"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="index === (chatMessageListLength - 1) && item.listQuestion.length > 0"
|
||||
class="suggestion-wrap"
|
||||
>
|
||||
<view class="suggestion-list">
|
||||
<view
|
||||
v-for="(question, questionIndex) in item.listQuestion"
|
||||
:key="questionIndex"
|
||||
class="item"
|
||||
@click="suggestionItemClickHandle(question)"
|
||||
>
|
||||
<view class="item-cont">
|
||||
<view class="txt">
|
||||
{{ question }}
|
||||
</view>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-03.png'"
|
||||
class="pic"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view id="bottom_postion" class="bottom-postion" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
:class="{
|
||||
'focus': onFocus
|
||||
}"
|
||||
class="page-to-bottom"
|
||||
>
|
||||
<view
|
||||
v-if="chatNumber"
|
||||
class="new-chat"
|
||||
@click="createNewHandle"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/icon-05.png'"
|
||||
class="btn-icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
开启新对话
|
||||
</view>
|
||||
<image
|
||||
v-if="chatMessageListLength > 0 && !isScrollToBottom && !loading"
|
||||
:src="webUrl + '/aiChat/down.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
@click="scrollToBottomHandle"
|
||||
/>
|
||||
</view>
|
||||
<bottom-send
|
||||
ref="bottomSend"
|
||||
:loading="loading"
|
||||
:keyboard-height="keyboardHeight"
|
||||
@send="streamReq"
|
||||
@add="createNewHandle"
|
||||
@history="historyViewHandle"
|
||||
@focus="inputFocusHandle"
|
||||
/>
|
||||
<AiHistoryList
|
||||
ref="historyView"
|
||||
:status-bar-height="statusBarHeight"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { chatMixins } from '../mixins/chatMixins.js'
|
||||
import {
|
||||
getAiSystemInfoSetting,
|
||||
getAiSystemInfoTopic
|
||||
} from '@/api/public'
|
||||
import AiHistoryList from '../components/historyList'
|
||||
import BottomSend from '../components/bottomSend.vue'
|
||||
export default {
|
||||
name: 'AiChatIndexPage',
|
||||
components: {
|
||||
AiHistoryList,
|
||||
BottomSend
|
||||
},
|
||||
mixins: [chatMixins],
|
||||
data() {
|
||||
return {
|
||||
animationWidth: '150%',
|
||||
animationStr: '',
|
||||
settingInfo: {},
|
||||
topicList: []
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
const addNewChat = uni.getStorageSync('addNewChat') === '1'
|
||||
// 从历史界面点击新增对话
|
||||
if (addNewChat && this.chatNumber) {
|
||||
console.log(addNewChat)
|
||||
uni.removeStorageSync('addNewChat')
|
||||
this.createNewHandle()
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.closeWsFn()
|
||||
},
|
||||
methods: {
|
||||
createdCallbak() {
|
||||
this.$nextTick(() => {
|
||||
this.scrollToBottomHandle()
|
||||
getAiSystemInfoSetting().then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.settingInfo = data
|
||||
this.animationWidth = `${data.systemTopicDivMaxWidth * 750}rpx`
|
||||
this.animationStr = `TranslateXSwiper-${data.systemTopicDivMaxWidth * 10} ${data.systemTopicDivScrollDuration}s infinite linear alternate`
|
||||
}
|
||||
})
|
||||
getAiSystemInfoTopic().then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.topicList = data || []
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 创建新会话
|
||||
createNewHandle() {
|
||||
if (!this.chatNumber) return
|
||||
this.closeWsFn()
|
||||
this.chatNumber = ''
|
||||
this.showCursor = false
|
||||
this.loading = false
|
||||
this.getConfigLoading = false
|
||||
this.chatMessageList = []
|
||||
},
|
||||
clickBackHandle() {
|
||||
if (!this.chatNumber) {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/index'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.createNewHandle()
|
||||
}
|
||||
},
|
||||
pageContainerBeforeleave() {
|
||||
if (!this.chatNumber) {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/index'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.createNewHandle()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.chat-wrap {
|
||||
padding: 0 0 180rpx 0;
|
||||
.chat-info-wrap {
|
||||
padding: 24rpx;
|
||||
.chat-list-wrap2 {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.loading-wrap {
|
||||
text-align: center;
|
||||
color: #666;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.rich-text-box {
|
||||
max-width: 100%;
|
||||
}
|
||||
.show-cursor .cursor {
|
||||
display: inline-block;
|
||||
color: #3D4CF1;
|
||||
font-weight: bold;
|
||||
animation: blinking 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes blinking {
|
||||
from {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0.0;
|
||||
}
|
||||
}
|
||||
.focus-guide-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 60rpx 40rpx;
|
||||
.guide-left {
|
||||
.avatar {
|
||||
display: block;
|
||||
width: 267rpx;
|
||||
height: 530rpx;
|
||||
}
|
||||
}
|
||||
.guide-right {
|
||||
position: relative;
|
||||
padding: 30rpx;
|
||||
margin: 0 0 0 40rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx 12rpx 30rpx rgba(0,0,0,0.1);
|
||||
.trangle {
|
||||
position: absolute;
|
||||
bottom: 120rpx;
|
||||
left: -15rpx;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: -30rpx 12rpx 30rpx rgba(0,0,0,0.1);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.title {
|
||||
width: 110%;
|
||||
font-weight: bold;
|
||||
}
|
||||
.content {
|
||||
padding: 30rpx 0 0 0;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.topic-wrap {
|
||||
width: 100%;
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.txt {
|
||||
width: 186rpx;
|
||||
height: 46rpx;
|
||||
margin: 0 20rpx;
|
||||
border-radius: 24rpx;
|
||||
text-align: center;
|
||||
line-height: 46rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
background-color: #3D4CF1;
|
||||
}
|
||||
.icon {
|
||||
display: flex;
|
||||
width: 40rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
}
|
||||
.list-wrap {
|
||||
width: 100%;
|
||||
margin: 60rpx 0 0 0;
|
||||
overflow-x: hidden;
|
||||
.list-cont {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 750 * 1.5rpx;
|
||||
padding: 0 0 0 24rpx;
|
||||
box-sizing: border-box;
|
||||
// animation: translateXSwiper 10s infinite linear alternate;
|
||||
.list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 48rpx;
|
||||
padding: 0 18rpx;
|
||||
margin: 0 30rpx 30rpx 0;
|
||||
border-radius: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
background: rgba(255,255,255,0.39);
|
||||
box-shadow: 0rpx 6rpx 12rpx rgba(0,0,0,0.1);
|
||||
.icon {
|
||||
display: block;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin: 0 8rpx 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@keyframes translateXSwiper {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -151,3 +151,13 @@ export function getBargainUserList(data) {
|
||||
export function getBargainUserCancel(data) {
|
||||
return request.post("/bargain/user/cancel", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新品专区
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
|
||||
export function queryNewZone() {
|
||||
return request.get("/newGoods");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getSseConfigV1(data) {
|
||||
return request.post('/v1/chat/sse/message', data, { login: true })
|
||||
}
|
||||
|
||||
export function getCompletions(params) {
|
||||
return request.get('/v1/chat/sse/completions', params, { login: true })
|
||||
}
|
||||
|
||||
export function getCompletionsV2(params) {
|
||||
return request.get('/v1/chat/sse/completions2', params, { login: true })
|
||||
}
|
||||
|
||||
// 通过关键字-搜索列表
|
||||
export function getAnalyzeKeywordsV1(data) {
|
||||
return request.post('/v1/chat/analyzeKeywords', data, { login: true })
|
||||
}
|
||||
|
||||
// 通过关键字-搜索列表-换一换
|
||||
export function getAnalyzeKeywordsChangeV1(data) {
|
||||
return request.post('/v1/chat/aiSearch', data, { login: true })
|
||||
}
|
||||
|
||||
export function deleteChatItemByConversationId(id) {
|
||||
return request.delete('/v1/chat/message/' + id, {}, { login: true })
|
||||
}
|
||||
|
||||
export function getChatList(params) {
|
||||
return request.get('/v1/chat', params, { login: true })
|
||||
}
|
||||
|
||||
export function historyChatMessage(params) {
|
||||
return request.get('/v1/chat/message', params, { login: true })
|
||||
}
|
||||
|
||||
export function deleteChatListByType(type) {
|
||||
return request.delete('/v1/chat/type/' + type, {}, { login: true })
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function getFarmerShop(id) {
|
||||
return request.get("/countyFamous/farmerShop/" + id)
|
||||
}
|
||||
|
||||
export function setFarmerShopZan(data) {
|
||||
return request.post("/countyFamous/farmerShop/zan", data)
|
||||
}
|
||||
|
||||
export function getFarmerShopNews(data) {
|
||||
return request.get("/countyFamous/farmerShop/news", data)
|
||||
}
|
||||
|
||||
|
||||
export function getFarmerShopQualification(data) {
|
||||
return request.get("/countyFamous/farmerShop/qualification", data)
|
||||
}
|
||||
|
||||
export function setFarmerShopCollection(data) {
|
||||
return request.post("/collection/farmerShop/add", data)
|
||||
}
|
||||
|
||||
export function removeFarmerShopCollection(data) {
|
||||
return request.post("/collection/farmerShop/remove", data)
|
||||
}
|
||||
|
||||
@@ -68,4 +68,11 @@ export function getVideoList(page = 1, limit = 10) {
|
||||
* */
|
||||
export function removeFavorite(ids) {
|
||||
return request.post('/collection/delete', ids)
|
||||
}
|
||||
|
||||
/**
|
||||
* 收藏千县名品县城列表
|
||||
* */
|
||||
export function getCountyFamousList(page = 1, limit = 10) {
|
||||
return request.get('/collection/countyFamous/list', {page, limit})
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
/**
|
||||
* 礼品卡送礼订单确认
|
||||
* @param {*} data
|
||||
*/
|
||||
export function getGiftCardSendOrderConfirm(data) {
|
||||
return request.post("/giftCard/confirm", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 礼品卡送礼订单创建
|
||||
* @param {*} data
|
||||
*/
|
||||
export function getGiftCardSendOrder(key, data) {
|
||||
return request.post("/giftCard/create/" + key, data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 礼品详情
|
||||
* @param {*} data
|
||||
*/
|
||||
export function getGiftCardDetail(data) {
|
||||
return request.get("/giftCard/info", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 领取礼品卡
|
||||
* @param {*} data
|
||||
*/
|
||||
export function getGiftCardReceive(data) {
|
||||
return request.post("/giftCard/receive", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 礼品卡赠礼须知
|
||||
* @param {*} data
|
||||
*/
|
||||
export function getGiftCardSendNotice(data) {
|
||||
return request.get("/giftCard/giftNotice", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算订单金额
|
||||
* @param {*} data
|
||||
*/
|
||||
export function getGiftCardSendOrderAmount(key, data) {
|
||||
return request.post("giftCard/computed/" + key, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 再送一份
|
||||
* @param {*} data
|
||||
*/
|
||||
export function getGiftCardResend(data) {
|
||||
return request.post("/giftCard/makeAgain", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取背景图
|
||||
* @param {*} data
|
||||
*/
|
||||
export function getGiftCardSendBackground(data) {
|
||||
return request.get("giftCard/giftCardBackgroundImage", data);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 收到的礼品卡列表
|
||||
* */
|
||||
export function giftCardReceiveList(param) {
|
||||
return request.get('/giftCard/receiveList', param)
|
||||
}
|
||||
|
||||
/**
|
||||
* 送出的礼品卡列表
|
||||
* */
|
||||
export function giftCardSendList(param) {
|
||||
return request.get('/giftCard/sendList', param)
|
||||
}
|
||||
|
||||
/**
|
||||
* 赠礼须知
|
||||
* */
|
||||
export function giftNotice(param) {
|
||||
return request.get('/giftCard/giftNotice', param)
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款
|
||||
*/
|
||||
export function refund(param) {
|
||||
return request.post('/giftCard/refund', param)
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
|
||||
/**
|
||||
* 康养生活-养生圣地分类列表
|
||||
* @returns
|
||||
*/
|
||||
export function getCategory() {
|
||||
return request.get("/wellness/place/category")
|
||||
}
|
||||
|
||||
/**
|
||||
* 康养生活-养生圣地列表
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function getWellnessPlace(params) {
|
||||
return request.get("/wellness/place", params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 康养生活-展会列表
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function getWellnessExhibition(params) {
|
||||
return request.get("/wellness/exhibition", params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 康养生活-展会详情
|
||||
* @param {*} id
|
||||
* @returns
|
||||
*/
|
||||
export function getWellnessExhibitionDetails(id) {
|
||||
return request.get("/wellness/exhibition/" + id)
|
||||
}
|
||||
|
||||
/**
|
||||
* 康养生活-养生榜单
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function getRank(params) {
|
||||
return request.get("/wellness/place/ranking", params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 康养生活-养生食材列表
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function getFoods(params) {
|
||||
return request.get("/wellness/place/food", params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 康养生活-配方详情
|
||||
* @param {*} id
|
||||
* @returns
|
||||
*/
|
||||
export function getFoodDetails(id) {
|
||||
return request.get("/wellness/recipe/" + id)
|
||||
}
|
||||
|
||||
/**
|
||||
* 康养生活-配方列表
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function getRecipe(params) {
|
||||
return request.get("/wellness/recipe", params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 康养生活-展会轮播图
|
||||
* @returns
|
||||
*/
|
||||
export function getBanner() {
|
||||
return request.get("/wellness/exhibition/banner")
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
|
||||
/**
|
||||
* 省份非遗数据
|
||||
* @param {*} id
|
||||
* @returns
|
||||
*/
|
||||
export function getIch(id) {
|
||||
return request.get("/ich/v2/" + id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 省份非遗专题数据
|
||||
* @param {*} id
|
||||
* @returns
|
||||
*/
|
||||
export function getIchContent(id) {
|
||||
return request.get("/ich/v2/content/" + id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取省份非遗推荐数据
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function getIchRecommend(params) {
|
||||
return request.get("/ich/v2/recommend", params);
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getAction(url, params) {
|
||||
return request.get(url, params)
|
||||
}
|
||||
|
||||
export function postAction(url, data) {
|
||||
return request.post(url, data)
|
||||
}
|
||||
|
||||
export function putAction(url, data) {
|
||||
return request.put(url, data)
|
||||
}
|
||||
|
||||
export function deleteAction(url, data) {
|
||||
return request.delete(url, data)
|
||||
}
|
||||
+55
-1
@@ -219,4 +219,58 @@ export function setTopHotelNew(data) {
|
||||
return request.post("/api/hotelNews/setIsTop", data, {
|
||||
login: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺转发分享背景图片
|
||||
* @param id 店铺ID int
|
||||
* */
|
||||
export function getHotelShareBackgroundImage(id) {
|
||||
return request.get("/api/hotelMain/shareImage/" + id, {}, {login: true})
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺资讯
|
||||
* @param id 店铺资讯ID int
|
||||
* */
|
||||
export function hotelNewsView(data) {
|
||||
return request.post("/api/hotelNews/view", data, {login: true})
|
||||
}
|
||||
|
||||
|
||||
export function getFarmerShop(id) {
|
||||
return request.get("/api/countyFamous/farmerShop/" + id)
|
||||
}
|
||||
|
||||
export function getAncientTownIcon() {
|
||||
return request.get("/ancientTown/icon")
|
||||
}
|
||||
|
||||
export function getAncientTownList(params) {
|
||||
return request.get("/ancientTown", params)
|
||||
}
|
||||
|
||||
export function getAncientTownInfo(id) {
|
||||
return request.get("/ancientTown/" + id)
|
||||
}
|
||||
|
||||
export function getAncientTownActive(params) {
|
||||
return request.get("/ancientTown/activity", params)
|
||||
}
|
||||
|
||||
export function watchTownActive(data) {
|
||||
return request.post("/ancientTown/activity/view", data, {login: true})
|
||||
}
|
||||
|
||||
export function shareTown(id) {
|
||||
return request.get("/ancientTown/poster/" + id, {login: true})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户店铺列表
|
||||
*/
|
||||
export function getMerchantApply() {
|
||||
return request.get("/merchantApply/userHotels", {}, {login: true})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,4 +28,11 @@ export function takePrize(lotteryRecordId){
|
||||
* */
|
||||
export function getLogs(page = 1, limit = 10) {
|
||||
return request.get('/lottery/dice/records',{page,limit})
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖活动分享
|
||||
* */
|
||||
export function getLotteryShareInfo() {
|
||||
return request.get('/lottery/shareImage')
|
||||
}
|
||||
@@ -160,4 +160,22 @@ export function orderVerific(verifyCode, isConfirm) {
|
||||
// 延迟收货
|
||||
export function orderDelay(uni) {
|
||||
return request.post("/order/extendedDelivery", {uni})
|
||||
}
|
||||
|
||||
/**
|
||||
* 再买一单
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function aginConfirm(params) {
|
||||
return request.post('/order/buyAgainConfirm', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改地址
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function editAddress(params) {
|
||||
return request.post('/order/editAddress', params)
|
||||
}
|
||||
@@ -78,6 +78,10 @@ export function getHomestay(id) {
|
||||
return request.get(`/contentHomestay/${id}`, {}, {login: false})
|
||||
}
|
||||
|
||||
export function getHomestayV2(id) {
|
||||
return request.get(`/contentHomestay/v2/${id}`, {}, {login: false})
|
||||
}
|
||||
|
||||
/**
|
||||
* 节日专题
|
||||
* */
|
||||
@@ -85,6 +89,17 @@ export function getFestival() {
|
||||
return request.get('/contentFestival', {}, {login: false})
|
||||
}
|
||||
|
||||
export function getFestivalV2() {
|
||||
return request.get('/contentFestival/v2', {}, {login: false})
|
||||
}
|
||||
|
||||
/**
|
||||
* 尖货专题
|
||||
* */
|
||||
export function getContentBest(id) {
|
||||
return request.get(`/contentBest/${id}`, {}, {login: false})
|
||||
}
|
||||
|
||||
/*
|
||||
* 非遗文化
|
||||
* */
|
||||
@@ -116,4 +131,32 @@ export function getProvince(id) {
|
||||
export function getProvinceGoods(parentId, keyword, page) {
|
||||
const params = `?parentId=${parentId}&keyword=${keyword}&page=${page}&limit=10`;
|
||||
return request.get('/landmarkGoods/productList' + params, {}, {login: false})
|
||||
}
|
||||
|
||||
export function getPorjectRecommend(params) {
|
||||
return request.get('/landmarkGoods/hotelList', params, {login: false})
|
||||
}
|
||||
|
||||
export function getPorjectPolicyFiles(params) {
|
||||
return request.get('/landmarkGoods/policyFiles', params, {login: false})
|
||||
}
|
||||
|
||||
export function getCulture(params) {
|
||||
return request.get('/landmarkGoods/culture', params, {login: false})
|
||||
}
|
||||
|
||||
export function getNews(params) {
|
||||
return request.get('/landmarkGoods/news', params, {login: false})
|
||||
}
|
||||
|
||||
export function hadLike(data) {
|
||||
return request.post('/landmarkGoods/news/zan', data, {login: false})
|
||||
}
|
||||
|
||||
export function hadView(data) {
|
||||
return request.post('/landmarkGoods/news/view', data, {login: false})
|
||||
}
|
||||
|
||||
export function getShareImg(id) {
|
||||
return request.get('/landmarkGoods/poster/' + id, {}, {login: false})
|
||||
}
|
||||
+17
-3
@@ -8,8 +8,8 @@ export function getSplashScreen() {
|
||||
* 首页
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getHomeData() {
|
||||
return request.get("index", {}, {
|
||||
export function getHomeData(params) {
|
||||
return request.get("/index", params, {
|
||||
login: false
|
||||
});
|
||||
}
|
||||
@@ -207,4 +207,18 @@ export function getShareImage() {
|
||||
|
||||
export function getXiaoZhi() {
|
||||
return request.get("/appAdvertising", {}, {login: false})
|
||||
}
|
||||
}
|
||||
|
||||
export function pushSystemStatic(data) {
|
||||
return request.post("/systemStats/push", data, { login: false })
|
||||
}
|
||||
|
||||
// 获取AI系统设置
|
||||
export function getAiSystemInfoSetting() {
|
||||
return request.get('/ai/systemInfo', {}, { login: false })
|
||||
}
|
||||
|
||||
// 获取AI系统预设话题列表
|
||||
export function getAiSystemInfoTopic() {
|
||||
return request.get('/ai/systemTopic', {}, { login: false })
|
||||
}
|
||||
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 千县名品首页
|
||||
export function getCountyFamousIndex() {
|
||||
return request.get('/countyFamous/index', {}, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品省-县树形列表
|
||||
export function getCountyFamousCityTree(param) {
|
||||
return request.get('/countyFamous/cityTree', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城数据
|
||||
export function getCountyFamousCityDetail(id) {
|
||||
return request.get('/countyFamous/' + id, {}, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城店铺数据
|
||||
export function getCountyFamousCityShop(param) {
|
||||
return request.get('/countyFamous/shop', param, { login: true })
|
||||
}
|
||||
|
||||
// 千县名品店铺点赞/取消赞
|
||||
export function postCountyFamousShopZan(data) {
|
||||
return request.post('/countyFamous/shop/zan', data, { login: true })
|
||||
}
|
||||
|
||||
// 千县名品店铺点赞/取消赞
|
||||
export function postCountyFamousShopAddFavorite(data) {
|
||||
return request.post('/collection/countyFamous/add', data, { login: true })
|
||||
}
|
||||
|
||||
// 千县名品店铺点赞/取消赞
|
||||
export function postCountyFamousShopRemoveFavorite(data) {
|
||||
return request.post('/collection/countyFamous/remove', data, { login: true })
|
||||
}
|
||||
|
||||
// 千县名品资讯点赞/取消赞
|
||||
export function postCountyFamousNewsZan(data) {
|
||||
return request.post('/countyFamous/news/zan', data, { login: true })
|
||||
}
|
||||
|
||||
// 千县名品资讯被浏览
|
||||
export function postCountyFamousNewsView(data) {
|
||||
return request.post('/countyFamous/news/view', data, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城资讯数据
|
||||
export function getCountyFamousCityNews(param) {
|
||||
return request.get('/countyFamous/news', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城攻略数据
|
||||
export function getCountyFamousCityGuide(param) {
|
||||
return request.get('/countyFamous/guide', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城攻略专题页
|
||||
export function getCountyFamousCityGuideContent(param) {
|
||||
return request.get('/countyFamous/guide/content', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城重点产业列表
|
||||
export function getCountyFamousIndustry(param) {
|
||||
return request.get('/countyFamous/industry', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城产业项目列表
|
||||
export function getCountyFamousIndustryProject(param) {
|
||||
return request.get('/countyFamous/industryProject', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城产业项目文件列表
|
||||
export function getCountyFamousIndustryProjectFile(param) {
|
||||
return request.get('/countyFamous/industryProject/file', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城招商政策文件列表
|
||||
export function getCountyFamousInvestmentFile(param) {
|
||||
return request.get('/countyFamous/investmentFile', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城村屋列表
|
||||
export function getCountyFamousVillage(param) {
|
||||
return request.get('/countyFamous/village', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城村屋详情
|
||||
export function getCountyFamousVillageDetail(id) {
|
||||
return request.get('/countyFamous/village/' + id, {}, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城村屋资讯
|
||||
export function getCountyFamousVillageNews(param) {
|
||||
return request.get('/countyFamous/village/news', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县分享图
|
||||
export function getShareImg(id) {
|
||||
return request.get('/countyFamous/poster/' + id, {login: true})
|
||||
}
|
||||
|
||||
export function getSaleList(params) {
|
||||
return request.get('/countyFamous/village/category', params, {login: true})
|
||||
}
|
||||
|
||||
// 旅居列表
|
||||
export function getJiaLouList(params) {
|
||||
return request.get('/countyFamous/sojourn', params, {login: true})
|
||||
}
|
||||
|
||||
// 旅居详情
|
||||
export function getJiaLouDetail(id) {
|
||||
return request.get('/countyFamous/sojourn/' + id, {}, {login: true})
|
||||
}
|
||||
|
||||
// 旅居资讯数据
|
||||
export function getJiaLouNews(params) {
|
||||
return request.get('/countyFamous/sojourn/news', params, {login: true})
|
||||
}
|
||||
|
||||
// 收藏旅居
|
||||
export function postJiaLouCollect(data) {
|
||||
return request.post('/collection/sojourn/add', data, {login: true})
|
||||
}
|
||||
|
||||
// 取消收藏旅居
|
||||
export function postJiaLouRemoveCollect(data) {
|
||||
return request.post('/collection/sojourn/remove', data, {login: true})
|
||||
}
|
||||
|
||||
// 收藏旅居列表
|
||||
export function getJiaLouCollectList(params) {
|
||||
return request.get('/collection/sojourn/list', params, {login: true})
|
||||
}
|
||||
|
||||
// 旅居点赞
|
||||
export function postJiaLouZan(data) {
|
||||
return request.post('/countyFamous/sojourn/zan', data, {login: true})
|
||||
}
|
||||
|
||||
// 旅居资讯查看
|
||||
export function postJiaLouNewsView(data) {
|
||||
return request.post('/countyFamous/news/view', data, {login: true})
|
||||
}
|
||||
|
||||
// 旅居资讯点赞
|
||||
export function postJiaLouNewsZan(data) {
|
||||
return request.post('/countyFamous/news/zan', data, {login: true})
|
||||
}
|
||||
|
||||
// 分享旅居
|
||||
export function postJiaLouShare(id) {
|
||||
return request.get('/countyFamous/sojourn/poster/' + id, {login: true})
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 文玩店铺列表
|
||||
export function getSearchPageConfig() {
|
||||
return request.get('/searchPage', {}, { login: false })
|
||||
}
|
||||
@@ -25,6 +25,15 @@ export function getProductDetail(id, data) {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 商品规格选中
|
||||
* */
|
||||
export function getProductSkuBySelected(data) {
|
||||
return request.post("/product/getSkuBySelected", data, {
|
||||
login: true
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 商品分销二维码
|
||||
* */
|
||||
@@ -144,6 +153,20 @@ export function changeCartNum(id, number) {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 购物车 获取商品规格
|
||||
* */
|
||||
export function getCartGoodAttr(id, uniqueId) {
|
||||
return request.get(`/product/attr/${id}?uniqueId=${uniqueId}`)
|
||||
}
|
||||
|
||||
/*
|
||||
* 购物车 商品规格修改
|
||||
* */
|
||||
export function cartGoodChangeAttr(data) {
|
||||
return request.post('/cart/changeAttr', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索推荐关键字
|
||||
*/
|
||||
@@ -196,3 +219,8 @@ export function storeListApi(data) {
|
||||
login: false
|
||||
});
|
||||
}
|
||||
|
||||
// 商品列表
|
||||
export function getHotels(param) {
|
||||
return request.get('/api/hotelMain/search', param, { login: false })
|
||||
}
|
||||
|
||||
+60
@@ -273,6 +273,13 @@ export function postAddress(data) {
|
||||
return request.post("/address/edit", data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 自动识别收货地址
|
||||
* */
|
||||
export function analysisAddress(data) {
|
||||
return request.post("/address/analysis", data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 获取收藏产品
|
||||
* */
|
||||
@@ -539,3 +546,56 @@ export function getRechargeApi() {
|
||||
export function getUserCenterBanner() {
|
||||
return request.get("userCenterBanner");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 用户积分信息
|
||||
*/
|
||||
export function getUserPointInfo(param) {
|
||||
return request.get('/user/points/info', param, { login: true })
|
||||
}
|
||||
|
||||
/*
|
||||
* 用户积分记录
|
||||
*/
|
||||
export function getUserPointBill(param) {
|
||||
return request.get('/user/points/bill', param, { login: true })
|
||||
}
|
||||
|
||||
/*
|
||||
* 用户分销说明
|
||||
*/
|
||||
export function getUserSpreadRule(param) {
|
||||
return request.get('/userSpreadRule', param, { login: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的足迹
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function getHistory(params) {
|
||||
return request.get('/history/list', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 购物车猜你喜欢
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function getUserLike(params) {
|
||||
return request.get('/cart/guessYouLike',params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户功能指引状态
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function queryUserGuide(params) {
|
||||
return request.get('/user/guide/status', params)
|
||||
}
|
||||
|
||||
export function setUserGuide(params) {
|
||||
return request.post('/user/guide/status', params)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function makeFileTransTask(data) {
|
||||
return request.post('/app/voiceToText/makeFileTransTask', data, { login: true })
|
||||
}
|
||||
|
||||
export function getFileTransResult(data) {
|
||||
return request.post('/app/voiceToText/getFileTransResult', data, { login: true })
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
+19
-2
@@ -54,8 +54,13 @@
|
||||
}
|
||||
|
||||
.value {
|
||||
width: 200rpx;
|
||||
color: #9D9D9D;
|
||||
font-size: 24rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.value2 {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.red {
|
||||
@@ -180,9 +185,10 @@
|
||||
|
||||
.title {
|
||||
width: 160rpx;
|
||||
padding: 16rpx;
|
||||
border-right: 2rpx solid #D2D2D2;
|
||||
color: #ADADAD;
|
||||
.title-cont {
|
||||
padding: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,6 +197,17 @@
|
||||
}
|
||||
|
||||
.value {
|
||||
width: calc(100% - 160rpx);
|
||||
border-left: 2rpx solid #D2D2D2;
|
||||
.value-cont {
|
||||
padding: 16rpx;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
word-break: normal;
|
||||
white-space: initial;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 100%;
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
@@ -17,16 +17,15 @@
|
||||
}
|
||||
|
||||
.search-box {
|
||||
width: 686rpx;
|
||||
width: 90%;
|
||||
height: 60rpx;
|
||||
margin: 0 auto;
|
||||
padding: 0 24rpx 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
background: #F7F7F7;
|
||||
border-radius: 30rpx;
|
||||
|
||||
input {
|
||||
width: 560rpx;
|
||||
width: 540rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
@@ -66,8 +65,8 @@
|
||||
}
|
||||
|
||||
.active {
|
||||
border-left: 6rpx solid #FD574B;
|
||||
color: #FD574B;
|
||||
border-left: 6rpx solid #C52733;
|
||||
color: #C52733;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
}
|
||||
|
||||
.box-share {
|
||||
width: 600rpx;
|
||||
.box-img {
|
||||
position: relative;
|
||||
width: 500rpx;
|
||||
height: 632rpx;
|
||||
border-radius: 40rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -26,14 +25,12 @@
|
||||
}
|
||||
|
||||
.main-img {
|
||||
width: 500rpx;
|
||||
height: 632rpx;
|
||||
width: 100%;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 500rpx;
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
@@ -843,6 +843,8 @@ page {
|
||||
}
|
||||
|
||||
.goodWrapper .item .text {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
width: 5.37*100rpx;
|
||||
position: relative;
|
||||
}
|
||||
@@ -866,7 +868,6 @@ page {
|
||||
|
||||
.goodWrapper .item .text .money {
|
||||
font-size: 0.26*100rpx;
|
||||
margin-top: 0.17*100rpx;
|
||||
}
|
||||
|
||||
.goodWrapper .item .text .evaluate {
|
||||
@@ -3254,6 +3255,7 @@ page {
|
||||
|
||||
.my-order .list .item .item-info .text .money {
|
||||
text-align: right;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.my-order .list .item .totalPrice {
|
||||
@@ -3422,7 +3424,7 @@ page {
|
||||
|
||||
.order-details .wrapper .item .conter {
|
||||
color: #868686;
|
||||
width: 5*100rpx;
|
||||
width: 4.5*100rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -3459,10 +3461,10 @@ page {
|
||||
}
|
||||
|
||||
.order-details .footer .bnt {
|
||||
width: 1.76*100rpx;
|
||||
height: 0.6*100rpx;
|
||||
width: 1.36*100rpx;
|
||||
height: 0.5*100rpx;
|
||||
text-align: center;
|
||||
line-height: 0.6*100rpx;
|
||||
line-height: 0.5*100rpx;
|
||||
border-radius: 0.5*100rpx;
|
||||
color: #fff;
|
||||
font-size: 0.27*100rpx;
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/*================变量==================*/
|
||||
@primary-color: #C52733;
|
||||
@dark-color: #333333;
|
||||
@white-color: #fff;
|
||||
|
||||
@colors: #C52733, #333333, #fff, #666, #F0F0F0, #999999, #E92727, #FFC543, #69C573;
|
||||
@classnames: primary, dark, white, secondary-dark, grey, dark1, red, yellow, success;
|
||||
/*=====================================*/
|
||||
|
||||
each(@colors, {
|
||||
@color: extract(@colors, @index);
|
||||
@classname: extract(@classnames, @index);
|
||||
.v12-@{classname} {
|
||||
background-color: @color !important;
|
||||
background: @color !important;
|
||||
}
|
||||
.v12-@{classname}-text{
|
||||
color: @color !important;
|
||||
}
|
||||
.v12-@{classname}-border{
|
||||
border: 1px solid @color !important;
|
||||
}
|
||||
});
|
||||
|
||||
/*===================字体大小======================*/
|
||||
.generateFontSize(@i) when (@i <= 80) {
|
||||
.v12-font-@{i} {
|
||||
font-size: @i * 1rpx !important;
|
||||
}
|
||||
.generateFontSize(@i + 2);
|
||||
}
|
||||
|
||||
.generateFontSize(0);
|
||||
|
||||
.v12-font-bold{
|
||||
font-weight: bold !important;
|
||||
}
|
||||
.generateFontWeight(@n, @i: 100) when (@i <= @n) {
|
||||
.v12-font-weight-@{i} {
|
||||
font-weight: @i !important;
|
||||
}
|
||||
.generateFontWeight(@n, (@i + 100))
|
||||
}
|
||||
.generateFontWeight(900);
|
||||
|
||||
/*==================内外边距====================*/
|
||||
.generateMarginAndPadding(@n, @i:0) when (@i<= @n) {
|
||||
@baseNum: @i * 8rpx;
|
||||
.v12-mt-@{i} {
|
||||
margin-top: @baseNum;
|
||||
}
|
||||
.v12-ml-@{i} {
|
||||
margin-left: @baseNum;
|
||||
}
|
||||
.v12-mr-@{i} {
|
||||
margin-right: @baseNum;
|
||||
}
|
||||
.v12-mb-@{i} {
|
||||
margin-bottom: @baseNum;
|
||||
}
|
||||
.v12-ma-@{i} {
|
||||
margin-left: @baseNum;
|
||||
margin-right: @baseNum;
|
||||
margin-bottom: @baseNum;
|
||||
margin-top: @baseNum;
|
||||
}
|
||||
.v12-mx-@{i} {
|
||||
margin-left: @baseNum;
|
||||
margin-right: @baseNum;
|
||||
}
|
||||
.v12-my-@{i} {
|
||||
margin-bottom: @baseNum;
|
||||
margin-top: @baseNum;
|
||||
}
|
||||
.v12-pt-@{i} {
|
||||
padding-top: @baseNum;
|
||||
}
|
||||
.v12-pl-@{i} {
|
||||
padding-left: @baseNum;
|
||||
}
|
||||
.v12-pr-@{i} {
|
||||
padding-right: @baseNum;
|
||||
}
|
||||
.v12-pb-@{i} {
|
||||
padding-bottom: @baseNum;
|
||||
}
|
||||
.v12-pa-@{i} {
|
||||
padding-top: @baseNum;
|
||||
padding-bottom: @baseNum;
|
||||
padding-right: @baseNum;
|
||||
padding-left: @baseNum;
|
||||
}
|
||||
.v12-px-@{i} {
|
||||
padding-right: @baseNum;
|
||||
padding-left: @baseNum;
|
||||
}
|
||||
.v12-py-@{i} {
|
||||
padding-top: @baseNum;
|
||||
padding-bottom: @baseNum;
|
||||
}
|
||||
.generateMarginAndPadding(@n, (@i + 1))
|
||||
}
|
||||
.generateMarginAndPadding(40);
|
||||
|
||||
/*==================圆角====================*/
|
||||
.generateRadius(@n, @i: 0) when (@i <= @n) {
|
||||
@baseRadius: @i * 1rpx;
|
||||
.v12-radius-@{i} {
|
||||
border-radius: @baseRadius !important;
|
||||
}
|
||||
.generateRadius(@n, (@i + 1))
|
||||
}
|
||||
.generateRadius(100);
|
||||
/*=========================================*/
|
||||
|
||||
.generateSpacing(@n, @i: 0) when(@i <= @n) {
|
||||
@baseSpacing:@i * 1rpx;
|
||||
.v12-spacing-@{i} {
|
||||
letter-spacing: @baseSpacing !important;
|
||||
}
|
||||
.generateSpacing(@n, (@i + 1))
|
||||
}
|
||||
.generateSpacing(100);
|
||||
/*====================flex 函数表达式=====================*/
|
||||
|
||||
.v12-d-flex{
|
||||
display: flex !important;
|
||||
}
|
||||
.v12-flex-column {
|
||||
flex-direction: column;
|
||||
}
|
||||
.v12-align-center{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.v12-align-start{
|
||||
display: flex;
|
||||
align-items: start;
|
||||
}
|
||||
.v12-align-end{
|
||||
display: flex;
|
||||
align-items: end;
|
||||
}
|
||||
.v12-align-baseline{
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
.v12-justify-center{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.v12-justify-around{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.v12-justify-between{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.v12-justify-start{
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.v12-justify-end{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.v12-d-grid-columns-2 {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
.v12-gap-10{
|
||||
grid-gap: 20rpx 20rpx;
|
||||
}
|
||||
|
||||
.v12-text-right{
|
||||
text-align: right;
|
||||
}
|
||||
.v12-text-left{
|
||||
text-align: left;
|
||||
}
|
||||
.v12-text-center{
|
||||
text-align: center;
|
||||
}
|
||||
.v12-btn{
|
||||
width: 136rpx;
|
||||
height: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 50rpx;
|
||||
border-radius: 50rpx;
|
||||
color: #fff;
|
||||
font-size: 27rpx;
|
||||
}
|
||||
.v12-full-width{
|
||||
width: 100%;
|
||||
}
|
||||
.v12-nowrap{
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ export default {
|
||||
date = date.replace(/-/g, '/');
|
||||
let timestamp = new Date(date).getTime();
|
||||
let now = new Date().getTime();
|
||||
|
||||
return timestamp - now;
|
||||
},
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view class="components-checkbox-icon jc-center ai-center" :class="{'isSelected':isSelected}" @click="change">
|
||||
<image class="icon-hook" :src="$VUE_APP_RESOURCES_URL+'/20240109175325131970.png'" mode="scaleToFill" v-if="isSelected"/>
|
||||
<!-- <image class="icon-hook" :src="webUrl + '/20240109175325131970.png'" mode="scaleToFill" v-if="isSelected"/> -->
|
||||
<u-icon name="checkmark-circle-fill" color="#C52733" v-if="isSelected"></u-icon>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -19,6 +20,11 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: Object.freeze(this.$VUE_APP_RESOURCES_URL)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isSelected: function() {
|
||||
return this.defaultState
|
||||
@@ -38,7 +44,7 @@ export default {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #D5D7D8;
|
||||
border: 2px solid #D5D7D8;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@@ -48,7 +54,6 @@ export default {
|
||||
}
|
||||
|
||||
.isSelected {
|
||||
border: 3px solid #FD5749;
|
||||
background: #FD5749;
|
||||
border: 3px solid #C52733;
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view @tap.stop="open">
|
||||
<text class="uni-input">{{ value }}</text>
|
||||
<view class="address-text-wrapper" @tap.stop="open">
|
||||
<view class="uni-input one-t address-text">{{ value }}</view>
|
||||
<uni-popup ref="popup" type="bottom" safe-area>
|
||||
<view class="cityselect">
|
||||
<view class="cityselect-header">
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
components: {
|
||||
uniPopup
|
||||
},
|
||||
props: ["callback", "items", "defaultValue"],
|
||||
props: ["callback", "items", "defaultValue", 'disabled'],
|
||||
data() {
|
||||
return {
|
||||
value: "请选择",
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
},
|
||||
defaultValue(newValue) {
|
||||
this.value = newValue;
|
||||
// this.adjustDefaultValue();
|
||||
this.adjustDefaultValue();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -147,6 +147,7 @@ export default {
|
||||
return idx;
|
||||
},
|
||||
open() {
|
||||
if(this.disabled) return;
|
||||
if (this.$refs.popup.showPopup) {
|
||||
this.$refs.popup.close();
|
||||
return;
|
||||
@@ -220,6 +221,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.address-text-wrapper {
|
||||
width: 100%;
|
||||
.address-text {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.cityselect {
|
||||
width: 100%;
|
||||
height: 75%;
|
||||
|
||||
+76
-29
@@ -1,27 +1,46 @@
|
||||
<template>
|
||||
<view class="components-coupons">
|
||||
<image class="coupons__cover" :src="data.image" mode="widthFix"/>
|
||||
|
||||
<view class="coupons__section flex jc-between ai-center">
|
||||
<view>有效期至:
|
||||
<text>{{ data.endTime }}</text>
|
||||
</view>
|
||||
<view class="coupons__tag coupons__tag-expire" v-if="data.status===2">已到期</view>
|
||||
<view class="coupons__tag" @click="goGoods()" v-if="data.status===0 && !radioModel">去使用</view>
|
||||
<view @click="selectCoupon">
|
||||
<radio :value="data.id" :checked="data.checked" color="#FF564A" v-if="radioModel && data.status===0"/>
|
||||
<view class="image-wrap">
|
||||
<image
|
||||
:src="data.image"
|
||||
class="coupons__cover"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view @click="selectCoupon" class="check-radio" :class="{'v12-primary': data.checked}">
|
||||
<radio
|
||||
v-if="radioModel && data.status === 0"
|
||||
:value="data.id"
|
||||
:checked="data.checked"
|
||||
color="#C52733"
|
||||
borderColor="#C52733"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coupons__section flex jc-between ai-center">
|
||||
<view>
|
||||
<text class="v12-dark-text v12-font-weight-500 v12-font-28">有效期至:</text>
|
||||
<text class='v12-primary-text v12-font-weight-500 v12-font-28'>{{ data.endTime }}</text>
|
||||
</view>
|
||||
<!-- status: 0-未使用,1-已使用,2-已过期 -->
|
||||
<view
|
||||
v-if="data.status === 2"
|
||||
class="coupons__tag coupons__tag-expire v12-font-24"
|
||||
>已到期</view>
|
||||
<view
|
||||
v-if="data.status === 0 && !radioModel"
|
||||
class="coupons__tag coupons__tag-expire v12-font-24"
|
||||
>不可用</view>
|
||||
|
||||
</view>
|
||||
<view class="coupons__rules">
|
||||
<view class="coupons__rules-title" @click="changeRules()">使用规则
|
||||
<image :class="{'open':isOpen}" :src="webUrl+'/20231125220409665027.png'" mode="scaleToFill"/>
|
||||
<view class="coupons__rules-title v12-font-22" @click="changeRules()">使用规则
|
||||
<image :class="{'open':isOpen}" :src="webUrl + '/20231125220409665027.png'" mode="scaleToFill"/>
|
||||
</view>
|
||||
<view
|
||||
:class="isOpen ? 'auto-height' : ''"
|
||||
class="coupon-html"
|
||||
>
|
||||
<rich-text :nodes="data.description" />
|
||||
<rich-text class='v12-font-22 v12-dark1-text' :nodes="data.description" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -31,7 +50,13 @@
|
||||
export default {
|
||||
name: "Coupons",
|
||||
props: {
|
||||
data: Object,
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 是否显示选择框
|
||||
radioModel: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@@ -51,39 +76,61 @@ export default {
|
||||
changeRules() {
|
||||
this.isOpen = !this.isOpen
|
||||
},
|
||||
goGoods() {
|
||||
uni.switchTab({url: '/pages/home/landMark'})
|
||||
// this.$global.navToGoods(this.data.productId)
|
||||
},
|
||||
selectCoupon() {
|
||||
if (!this.radioModel) return
|
||||
this.$emit('change', this.data.id)
|
||||
// 已选中则可以取消选中
|
||||
this.$emit('change', this.data.checked ? '' : this.data.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.check-radio{
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 16px;
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #C52733;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
radio {
|
||||
margin-right: -6px;
|
||||
}
|
||||
}
|
||||
.image-wrap{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 30rpx 0;
|
||||
border-radius: 20rpx;
|
||||
position: relative
|
||||
}
|
||||
.components-coupons {
|
||||
width: 686rpx;
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #FF564A;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
background: #fff;
|
||||
image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.coupons__cover {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
width: 600rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.coupons__section {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 18rpx 20rpx 16rpx 16rpx;
|
||||
padding: 18rpx 20rpx 16rpx 50rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
|
||||
@@ -113,7 +160,7 @@ export default {
|
||||
}
|
||||
|
||||
.coupons__rules {
|
||||
padding: 0 20rpx 20rpx 16rpx;
|
||||
padding: 0 20rpx 20rpx 50rpx;
|
||||
|
||||
.coupons__rules-title {
|
||||
color: #999999;
|
||||
@@ -130,11 +177,11 @@ export default {
|
||||
}
|
||||
}
|
||||
.coupon-html {
|
||||
height: 80rpx;
|
||||
overflow: hidden;
|
||||
transition: all .3s;
|
||||
transition: all .3s ease-in-out;
|
||||
height: 60rpx;
|
||||
&.auto-height {
|
||||
height: auto;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+176
-39
@@ -1,21 +1,104 @@
|
||||
<template>
|
||||
<view class="popup-coupons">
|
||||
<view class="popup-box">
|
||||
<view class="popup-title bold tc">选择优惠券</view>
|
||||
<SubSection :current="current" :can-use="canUse" :not-use="notUse" radioModel @change="changeNav"/>
|
||||
|
||||
<view class="list-box">
|
||||
<view style="margin-bottom: 20rpx" v-for="(item,index) in list" :key="index">
|
||||
<Coupons :data="item" radioModel @change="selectCoupon"/>
|
||||
<view class="popup-title bold tc v12-justify-between">
|
||||
<text></text>
|
||||
<text>优惠详情</text>
|
||||
<u-icon name="close" color="#666" size="14" @click.stop="close"></u-icon>
|
||||
</view>
|
||||
<SubSection
|
||||
:current="current"
|
||||
:can-use="canUse"
|
||||
:not-use="notUse"
|
||||
radio-model
|
||||
@change="changeNav"
|
||||
v-if="showTab"
|
||||
/>
|
||||
<view class="v12-radius-20 v12-white v12-align-center v12-justify-around v12-pa-3" v-else>
|
||||
<view class="">
|
||||
<view class="v12-text-center v12-font-28">
|
||||
券后价
|
||||
</view>
|
||||
<view class="v12-mt-3 v12-text-center v12-red-text">
|
||||
<text class="v12-font-28">
|
||||
¥
|
||||
</text>
|
||||
<text class="v12-font-44">
|
||||
{{ computePrice }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tc" v-if="list.length===0">
|
||||
<view class="v12-text-center v12-font-44">
|
||||
=
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="v12-text-center v12-font-28">
|
||||
当前售价
|
||||
</view>
|
||||
<view class="v12-mt-3 v12-text-center">
|
||||
<text class="v12-font-28">
|
||||
¥
|
||||
</text>
|
||||
<text class="v12-font-44">
|
||||
{{ currentPrice }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-text-center v12-font-44">
|
||||
-
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="v12-text-center">
|
||||
满减
|
||||
</view>
|
||||
<view class="v12-mt-3 v12-text-center v12-font-44">
|
||||
{{ selectItem.couponPrice || 0 }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list-box">
|
||||
<view class="larg-one v12-mb-3">
|
||||
<Coupons
|
||||
:data="largOne"
|
||||
:radio-model="current === 0"
|
||||
@change="selectCoupon"
|
||||
/>
|
||||
</view>
|
||||
<view class="v12-font-32 v12-dark-text v12-spacing-2 v12-font-bold v12-mb-3">
|
||||
更多可使用券
|
||||
</view>
|
||||
<view
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
style="margin-bottom: 20rpx"
|
||||
>
|
||||
<Coupons
|
||||
:data="item"
|
||||
:radio-model="current === 0"
|
||||
@change="selectCoupon"
|
||||
v-if="index !== maxIndex"
|
||||
/>
|
||||
<view v-if="list.length === 1" class="no-quan v12-font-28 v12-dark1-text text-center">
|
||||
暂无更多可使用优惠券,快去抽奖去吧~
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="list.length === 0"
|
||||
class="tc"
|
||||
>
|
||||
<image class="zero-coupons" :src="webUrl+'/20231201201733142658.png'" mode="scaleToFill"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button disabled></button>
|
||||
<view class="btn-done bold flex jc-center ai-center" :class="{'btn-disabled':current===1}" @click="setCoupon" v-if="current===0">确定
|
||||
<view
|
||||
v-if="current === 0"
|
||||
:class="{ 'btn-disabled': current === 1 }"
|
||||
class="btn-done bold flex jc-center ai-center v12-primary"
|
||||
@click="setCoupon"
|
||||
>
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -26,16 +109,58 @@ import Coupons from '@/components/Coupons.vue'
|
||||
|
||||
export default {
|
||||
name: 'CouponsPopup',
|
||||
components: {SubSection, Coupons},
|
||||
components: { SubSection, Coupons },
|
||||
props: {
|
||||
twoList: {
|
||||
type: Object,
|
||||
default: {}
|
||||
default: {
|
||||
usable: [],
|
||||
unusable: []
|
||||
}
|
||||
},
|
||||
showTab: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
currentPrice: {
|
||||
default: 0,
|
||||
type: Number
|
||||
},
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
current: 0,
|
||||
couponId: uni.getStorageSync('couponId') || 0,
|
||||
selectItem: {
|
||||
couponPrice: 0
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
id: {
|
||||
immediate: true,
|
||||
handler(value) {
|
||||
console.log('couponId', value);
|
||||
if(value) {
|
||||
this.selectCoupon(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
list() {
|
||||
let temp = this.current === 0 ? this.twoList['usable'] : this.twoList['unusable']
|
||||
const temp = this.current === 0 ? this.twoList['usable'] : this.twoList['unusable']
|
||||
if (this.current === 0) {
|
||||
const localCouponId = uni.getStorageSync('couponId') || 0
|
||||
temp.map(item => {
|
||||
item.checked = localCouponId === item.id
|
||||
})
|
||||
}
|
||||
return this.$global.deepClone(temp)
|
||||
},
|
||||
canUse() {
|
||||
@@ -43,53 +168,64 @@ export default {
|
||||
},
|
||||
notUse() {
|
||||
return this.twoList['unusable'].length
|
||||
},
|
||||
computePrice() {
|
||||
return this.force2Decimal(this.currentPrice - this.selectItem.couponPrice) || this.currentPrice
|
||||
},
|
||||
maxIndex() {
|
||||
const maxIndex = this.list.reduce((a, b, c) => {
|
||||
return (this.list[a].couponPrice < b.couponPrice) ? c : a
|
||||
}, 0)
|
||||
return maxIndex
|
||||
},
|
||||
largOne() {
|
||||
if(this.list[this.maxIndex]) {
|
||||
this.selectCoupon(this.list[this.maxIndex].id)
|
||||
uni.setStorageSync('couponId', this.list[this.maxIndex].id)
|
||||
}
|
||||
// this.$emit('max', this.list[this.maxIndex] || {})
|
||||
return this.list[this.maxIndex] || {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
current() {
|
||||
this.selectCoupon(this.couponId)
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
current: 0,
|
||||
couponId: 0
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.couponId = uni.getStorageSync('couponId') || 0
|
||||
this.selectCoupon(this.couponId)
|
||||
this.$emit('max', this.largOne)
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('close')
|
||||
},
|
||||
force2Decimal(value) {
|
||||
return this.$force2Decimal(value);
|
||||
},
|
||||
changeNav(index) {
|
||||
this.current = index
|
||||
},
|
||||
selectCoupon(id) {
|
||||
const isCancel = this.couponId === id
|
||||
this.couponId = isCancel ? 0 : id
|
||||
|
||||
this.list?.forEach(item => {
|
||||
if (!isCancel) {
|
||||
item.checked = id === item.id
|
||||
} else {
|
||||
item.checked = false
|
||||
}
|
||||
this.couponId = id
|
||||
this.selectItem = this.list.find(e => e.id === id) || {}
|
||||
// this.$emit('select', this.selectItem)
|
||||
this.list.map(item => {
|
||||
item.checked = id === item.id
|
||||
})
|
||||
},
|
||||
setCoupon() {
|
||||
if (this.current === 1) return
|
||||
// if (this.couponId !== 0) {
|
||||
uni.setStorageSync('couponId', this.couponId)
|
||||
// }
|
||||
this.$emit('close')
|
||||
console.log(this.current, '====1=======');
|
||||
uni.setStorageSync('couponId', this.couponId)
|
||||
this.$emit('change', this.selectItem || {})
|
||||
this.$emit('ok', this.couponId)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.text-center{
|
||||
text-align: center;
|
||||
}
|
||||
.popup-coupons {
|
||||
background: #F0F0F0;
|
||||
.popup-box {
|
||||
padding: 34rpx 32rpx;
|
||||
}
|
||||
@@ -103,6 +239,7 @@ export default {
|
||||
|
||||
.list-box {
|
||||
max-height: 640rpx;
|
||||
height: 640rpx;
|
||||
margin-top: 32rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<view v-if="show" class="guide-remark white" @touchmove.stop.prevent="" @click="next">
|
||||
<view class="guid-wrap">
|
||||
<image
|
||||
v-for="(img, index) in functionGuideData.imgs"
|
||||
:key="index"
|
||||
:style="[img.style]"
|
||||
:src="img.url"
|
||||
@click.stop="handleImg(img)"
|
||||
mode="aspectFit|aspectFill|widthFix"
|
||||
lazy-load="true" >
|
||||
</image>
|
||||
<view class="box" :style="[functionGuideData.position]">
|
||||
<!-- <view class="tips flex" :style="{top: functionGuideData.tipsPosition || '-110rpx'}">
|
||||
{{ functionGuideData.tips }}
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
<!-- <view class="btn-wrap flex_center" :style="[functionGuideData.btnGroupPosition]">
|
||||
<view class="btn flex_center" @click="jump">跳过</view>
|
||||
<view class="next-btn v12-primary flex_center" @click="next">{{ functionGuideData.step==maxStep ? '知道了' : '下一步' }}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let timer = null
|
||||
let flag = false
|
||||
export default {
|
||||
props: {
|
||||
maxStep: {
|
||||
type: Number,
|
||||
default: 3
|
||||
},
|
||||
guideData: {
|
||||
type: Object,
|
||||
default: ()=> {
|
||||
return {
|
||||
step: 1,
|
||||
tips: '', // 介绍
|
||||
tipsPosition: '', // 介绍 显示位置
|
||||
btnGroupPosition: '', // 按钮组显示位置
|
||||
position: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
functionGuideData: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
guideData: {
|
||||
deep: true,
|
||||
immediate: false,
|
||||
handler(data) {
|
||||
this.functionGuideData = data
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleImg(img) {
|
||||
if(!img.isBtn) return
|
||||
if(img.isBtn === 'next') {
|
||||
this.next()
|
||||
return
|
||||
}
|
||||
if(img.isBtn === 'jump') {
|
||||
this.jump()
|
||||
return
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.show) return
|
||||
setTimeout(() => {
|
||||
// const show = uni.getStorageSync('showGuide')
|
||||
const show = false
|
||||
if (!show) {
|
||||
this.show = true
|
||||
this.$parent.setFunctionGuideData({ step: 1 })
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
jump() {
|
||||
this.$parent.setFunctionGuideData({ step: 'jump' })
|
||||
this.setFunctionGuideState()
|
||||
// 标记状态,只有首次访问小程序时显示指引
|
||||
uni.setStorageSync('showGuide', 1)
|
||||
},
|
||||
next() {
|
||||
this.throttle(() => {
|
||||
if (this.functionGuideData.step == this.maxStep) {
|
||||
this.jump()
|
||||
return
|
||||
}
|
||||
let step = this.functionGuideData.step
|
||||
this.$parent.setFunctionGuideData({ step: step + 1 })
|
||||
}, 800)
|
||||
},
|
||||
setFunctionGuideState() {
|
||||
this.show = false
|
||||
this.$emit('hide')
|
||||
},
|
||||
|
||||
/* 节流 */
|
||||
throttle(fn) {
|
||||
if (!flag) {
|
||||
flag = true
|
||||
typeof fn === 'function' && fn()
|
||||
timer = setTimeout(() => {
|
||||
flag = false
|
||||
}, 800)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btn-wrap{
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
}
|
||||
.guid-wrap{
|
||||
position: relative;
|
||||
height: inherit;
|
||||
width: inherit;
|
||||
}
|
||||
.next-btn {
|
||||
color: #fff;
|
||||
padding: 2rpx 10rpx;
|
||||
}
|
||||
.plus {
|
||||
width: 140rpx;
|
||||
height: 2rpx;
|
||||
position: relative;
|
||||
|
||||
.in-border {
|
||||
border: 2rpx dashed #fff;
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
left: 10rpx;
|
||||
top: -55rpx;
|
||||
}
|
||||
|
||||
.plus-icon {
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
width: 92rpx;
|
||||
height: 92rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.guide-remark {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 20230828;
|
||||
|
||||
.box {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
width: 686rpx;
|
||||
border-radius: 24rpx;
|
||||
left: 32rpx;
|
||||
box-shadow: 0 0 0 120vh rgba(0, 0, 0, .6);
|
||||
transition: all 0.3s ease;
|
||||
|
||||
.tips {
|
||||
width: 100%;
|
||||
background: #bee9ff;
|
||||
border-radius: 24rpx;
|
||||
padding: 20rpx 50rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -110rpx;
|
||||
z-index: 2;
|
||||
font-size: 28rpx;
|
||||
transition: top 0.3s ease;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 32rpx;
|
||||
z-index: 2;
|
||||
transition: bottom 0.3s ease;
|
||||
|
||||
.btn {
|
||||
width: 240rpx;
|
||||
height: 84rpx;
|
||||
border-radius: 52rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
background: #fff;
|
||||
margin: 0 30rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex_center {
|
||||
@extend .flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+88
-39
@@ -1,39 +1,61 @@
|
||||
<template>
|
||||
<view class="orderGoods">
|
||||
<view v-if="title.length>0" class="total acea-row row-middle" >
|
||||
<view class="acea-row row-left row-middle" style="position: relative;">
|
||||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" src="http://admin-api.xdd618.com/file/pic/20210807230759738342.png" mode=""></image>
|
||||
<text class="title">{{title}}</text>
|
||||
<!-- <text class="pink-dot"></text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="total">共{{ cartInfo.length }}件商品</view>
|
||||
<view
|
||||
v-if="title.length > 0"
|
||||
class="v12-pa-3 acea-row row-middle"
|
||||
>
|
||||
<view
|
||||
style="position: relative;"
|
||||
class="acea-row row-left row-middle"
|
||||
>
|
||||
<!-- <image
|
||||
style="width: 32rpx;height: 32rpx;margin-right: 12rpx;"
|
||||
src="http://admin-api.xdd618.com/file/pic/20210807230759738342.png" mode=""
|
||||
/> -->
|
||||
<text class="title v12-font-32">
|
||||
{{ title }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-else
|
||||
class=""
|
||||
>共{{ cartInfo.length }}件商品</view>
|
||||
<view class="goodWrapper">
|
||||
<view class="item acea-row row-between-wrapper" style="flex-wrap: nowrap;" v-for="cart in cartInfo" :key="cart.id">
|
||||
<view
|
||||
v-for="cart in cartInfo"
|
||||
:key="cart.id"
|
||||
class="item acea-row row-between-wrapper v12-mt-3"
|
||||
style="flex-wrap: nowrap; border:none"
|
||||
>
|
||||
<view class="pictrue" style="margin-right: 20rpx;">
|
||||
<image :src="cart.productInfo.image" class="image" />
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="text" style="height: 100%;justify-content: space-between;">
|
||||
<view class="acea-row row-between-wrapper">
|
||||
<view class="name line1">{{ cart.productInfo.storeName }}</view>
|
||||
<!-- <view class="num">x {{ cart.cartNum }}</view> -->
|
||||
<view class="name line1 one-t v12-font-bold">{{ cart.productInfo.storeName }}</view>
|
||||
</view>
|
||||
<!-- <view
|
||||
class="attr line1"
|
||||
v-if="cart.productInfo.attrInfo"
|
||||
>{{ cart.productInfo.attrInfo.sku }}</view> -->
|
||||
<view class="acea-row row-middle row-between">
|
||||
<view
|
||||
class="attr"
|
||||
style="height: 38rpx;line-height:38rpx;background-color: #FFF3F2;border-radius: 19rpx;padding: 4rpx 20rpx;"
|
||||
v-if="cart.productInfo.attrInfo"
|
||||
>属性:{{ cart.productInfo.attrInfo.sku }}</view>
|
||||
<view v-if="evaluate == 3" class="evaluate" style="bottom: 0 !important;position: relative;height: 36rpx !important;width: 90rpx !important;line-height: 36rpx !important;font-size: 32rpx;border-radius: 18rpx;" @click="routerGo(cart)">评价</view>
|
||||
</view>
|
||||
<view class="acea-row row-middle row-between attr-wrap">
|
||||
<view
|
||||
v-if="cart.productInfo.attrInfo"
|
||||
class="more-t v12-font-24 v12-secondary-dark-text"
|
||||
>
|
||||
规格:{{ cart.productInfo.attrInfo.sku }}
|
||||
</view>
|
||||
<view
|
||||
v-if="evaluate == 3"
|
||||
class="evaluate"
|
||||
@click="routerGo(cart)"
|
||||
>评价</view>
|
||||
</view>
|
||||
<view class="money font-color-lightred acea-row row-between">
|
||||
<text>¥{{ cart.truePrice }}</text>
|
||||
<text class="num" style="margin-left: 10rpx;">x{{ cart.cartNum }}</text>
|
||||
</view>
|
||||
<view class="v12-font-bold">
|
||||
<text class="v12-font-28 v12-dark-text">应付:</text>
|
||||
<text class="v12-font-22">¥</text>
|
||||
<text class="v12-primary-text v12-font-28">{{ cart.truePrice }}</text>
|
||||
</view>
|
||||
<text class="num v12-dark-text">x{{ cart.cartNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -68,21 +90,48 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.pink-dot{
|
||||
width:24rpx;
|
||||
height:24rpx;
|
||||
background:rgba(255,86,74,0.4);
|
||||
border-radius:50%;
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
bottom: 24rpx;
|
||||
right: -12rpx;
|
||||
}
|
||||
|
||||
.orderGoods{
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.item{
|
||||
height: 160rpx !important;
|
||||
}
|
||||
.title{
|
||||
font-size:26rpx;
|
||||
color:#080F1A;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.goodWrapper .item .pictrue {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
.goodWrapper .item .pictrue .image {
|
||||
display: block;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.attr-wrap {
|
||||
position: relative;
|
||||
margin-top: 8rpx;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.text .attr {
|
||||
max-width: calc(100% - 130rpx);
|
||||
margin: 0 !important;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
line-height: 28rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #FFF3F2;
|
||||
}
|
||||
.evaluate {
|
||||
position: relative;
|
||||
top: 0;
|
||||
height: 36rpx;
|
||||
width: 90rpx;
|
||||
border-radius: 36rpx !important;
|
||||
line-height: 36rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="slider-banner product-bg">
|
||||
<swiper class="swiper-wrapper" @change="handleChange" v-if="imgUrls.length > 0" :indicator-dots='true' indicator-color="rgba(255, 255, 255, .3)" indicator-active-color="#ffffff">
|
||||
<swiper autoplay circular interval="2000" class="swiper-wrapper" @change="handleChange" v-if="imgUrls.length > 0" :indicator-dots='true' indicator-color="rgba(255, 255, 255, .3)" indicator-active-color="#ffffff">
|
||||
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
|
||||
<swiper-item>
|
||||
<image v-if="!checkIfVideo(item)" :src="item" class="slide-image" />
|
||||
<video v-else class="slide-image" @play="storePlayObj" :show-fullscreen-btn="false" :src="item" :id="buildId(imgUrlsIndex)" autoplay controls></video>
|
||||
<video v-else class="slide-image" @play="storePlayObj" :show-fullscreen-btn="false" :src="item" :id="buildId(imgUrlsIndex)" autoplay controls></video>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
@@ -38,7 +38,7 @@ export default {
|
||||
currentVideo:null,
|
||||
ProductConSwiper: {
|
||||
autoplay: {
|
||||
disableOnInteraction: false,
|
||||
disableOnInteraction: true,
|
||||
delay: 2000
|
||||
},
|
||||
loop: true,
|
||||
|
||||
+187
-68
@@ -1,52 +1,65 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="product-window" :class="attr.cartAttr === true ? 'on' : ''">
|
||||
<view class="product-window" :class="attr.cartAttr === true ? 'on' : ''" :style="{paddingBottom: paddingBottom}">
|
||||
<view class="textpic acea-row row-between-wrapper">
|
||||
<view class="pictrue" @click="previewImg(attr.productSelect.image)">
|
||||
<image :src="attr.productSelect.image" class="image" />
|
||||
<view class="pictrue" @click="previewImg(attrObj.productSelect.image)">
|
||||
<image :src="attrObj.productSelect.image" class="image" />
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="line1">{{ attr.productSelect.store_name }}</view>
|
||||
<view class="money font-color-lightred">
|
||||
<view v-if="!isNegotiable" class="money font-color-lightred v12-font-">
|
||||
¥
|
||||
<text class="num">{{ attr.productSelect.price }}</text>
|
||||
<text class="stock">库存: {{ attr.productSelect.stock }}</text>
|
||||
<text class="num v12-font-40">{{ attrObj.productSelect.price }}</text>
|
||||
<text class="v12-ml-2 v12-font-weight-300 v12-font-22" style="color: #BBBBBB; text-decoration: line-through;">¥</text>
|
||||
<text class="v12-mr-2 v12-font-weight-300 v12-font-22" style="color: #BBBBBB; text-decoration: line-through;">{{ attrObj.productSelect.otPrice }}</text>
|
||||
<text class="v12-white-text v12-red v12-font-22 v12-radius-40 v12-px-1 v12-font-weight-400">会员价</text>
|
||||
<!-- <text class="stock">库存: {{ attrObj.productSelect.stock }}</text> -->
|
||||
</view>
|
||||
<view class="v12-primary-text" v-else>价格面议</view>
|
||||
<view class="more-t">{{ attrObj.productSelect.store_name }}</view>
|
||||
</view>
|
||||
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
|
||||
</view>
|
||||
<view class="productWinList">
|
||||
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
|
||||
<view
|
||||
v-for="(item, index) in attrObj.productAttr"
|
||||
:key="index"
|
||||
class="item"
|
||||
>
|
||||
<view class="title">{{ item.attrName }}</view>
|
||||
<view class="listn acea-row row-middle">
|
||||
<view class="listn acea-row v12-justify-start">
|
||||
<view
|
||||
v-for="(itemn, indexn) in item.attrValue"
|
||||
:key="indexn"
|
||||
v-for="(subItem, subIndex) in item.attrValue"
|
||||
:key="subIndex"
|
||||
:class="{
|
||||
'on': item.index == indexn,
|
||||
'disabled': productValue[itemn.attr].stock === 0
|
||||
'actived': subItem.check,
|
||||
'disabled': !subItem.canUsed
|
||||
}"
|
||||
class="itemn"
|
||||
@click="tapAttr(indexw, indexn, itemn)"
|
||||
class="itemn v12-radius-40"
|
||||
@click="tapAttr(index, subIndex, subItem)"
|
||||
>
|
||||
{{ itemn.attr }}
|
||||
<text
|
||||
v-if="productValue[itemn.attr].stock === 0"
|
||||
class="tag"
|
||||
>缺货</text>
|
||||
{{ subItem.attr }}
|
||||
<text v-if="!subItem.canUsed" class="less-tag" style="color: #fff !important;">缺货</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cart">
|
||||
<view class="title">数量</view>
|
||||
<view class="cart v12-justify-between v12-align-center">
|
||||
<view class="titlev12-dark-text f12-font-32">购买数量</view>
|
||||
<view class="carnum acea-row row-left">
|
||||
<view class="item reduce" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
|
||||
<view class="item num">{{ cartNum }}</view>
|
||||
<view style="border-radius: 40rpx 0rpx 0rpx 40rpx" class="cart-btn item reduce v12-font-36 v12-font-bold v12-white-text v12-dark1 v12-dark1-border" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
|
||||
<input
|
||||
type="number"
|
||||
:min="1"
|
||||
:max="attrObj.productSelect.stock"
|
||||
@blur="inputNumer(cartNumber)"
|
||||
v-model="cartNumber"
|
||||
style="height: 55rpx !important; width:80rpx !important"
|
||||
class="item v12-font-36 v12-font-bold v12-dark-text cart-btn" />
|
||||
<view
|
||||
class="item plus"
|
||||
style="border-radius:0 40rpx 40rpx 0"
|
||||
class="item plus v12-font-bold v12-white-text v12-primary v12-primary-border v12-font-36 cart-btn"
|
||||
:class="
|
||||
cartNum >= attr.productSelect.stock
|
||||
cartNum >= attrObj.productSelect.stock
|
||||
? 'on'
|
||||
: ''
|
||||
"
|
||||
@@ -54,6 +67,22 @@
|
||||
>+</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-px-2 v12-mt-3" v-if="showOk">
|
||||
<u-button
|
||||
shape="circle"
|
||||
color="#C52733"
|
||||
@click="$emit('ok')"
|
||||
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
|
||||
>加入购物车</u-button>
|
||||
</view>
|
||||
<view class="v12-px-2 v12-mt-3" v-if="isGift">
|
||||
<u-button
|
||||
shape="circle"
|
||||
color="#C52733"
|
||||
@click="$emit('gift')"
|
||||
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
|
||||
>送给朋友</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
|
||||
</view>
|
||||
@@ -62,73 +91,163 @@
|
||||
export default {
|
||||
name: "ProductWindow",
|
||||
props: {
|
||||
isNegotiable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isGift: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
paddingBottom: {
|
||||
type: String,
|
||||
default: '160rpx'
|
||||
},
|
||||
showOk: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
attr: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
productValue: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
default: () => {
|
||||
return {
|
||||
productAttr: []
|
||||
}
|
||||
}
|
||||
},
|
||||
cartNum: {
|
||||
type: Number,
|
||||
default: () => 1
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
return {};
|
||||
data() {
|
||||
return {
|
||||
cartNumber: this.cartNum,
|
||||
attrObj: {
|
||||
productSelect: {},
|
||||
productAttr: []
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cartNum: {
|
||||
handler(val) {
|
||||
console.log(val, 'cardNum');
|
||||
this.cartNumber = val || 1
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
cartNumber(val) {
|
||||
if (val > this.attrObj.productSelect.stock) {
|
||||
val = this.attrObj.productSelect.stock
|
||||
}
|
||||
this.$emit('input', +val)
|
||||
this.$emit("changeFun", { action: "ChangeCartNum", value: +val })
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$set(this, 'attrObj', JSON.parse(JSON.stringify(this.attr)))
|
||||
},
|
||||
methods: {
|
||||
previewImg:function(imgUrl){
|
||||
inputNumer(e) {
|
||||
if(e === '') {
|
||||
this.cartNumber = 1
|
||||
this.$forceUpdate()
|
||||
}
|
||||
if(+e > this.attrObj.productSelect.stock) {
|
||||
this.cartNumber = this.attrObj.productSelect.stock
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
reRender(data) {
|
||||
this.$set(this, 'attrObj', JSON.parse(JSON.stringify(data)))
|
||||
// console.log(this.attrObj.productAttr)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
previewImg(imgUrl) {
|
||||
uni.previewImage({
|
||||
urls:[imgUrl]
|
||||
})
|
||||
},
|
||||
closeAttr: function() {
|
||||
this.$emit("changeFun", { action: "changeattr", value: false });
|
||||
closeAttr() {
|
||||
this.$emit("changeFun", { action: "changeattr", value: false })
|
||||
},
|
||||
CartNumDes: function() {
|
||||
this.$emit("changeFun", { action: "ChangeCartNum", value: false });
|
||||
CartNumDes() {
|
||||
if(this.cartNumber === 1) return
|
||||
console.log(this.cartNumber, 'cartNumber');
|
||||
this.cartNumber--
|
||||
this.$emit("changeFun", { action: "ChangeCartNum", value: this.cartNumber })
|
||||
},
|
||||
CartNumAdd: function() {
|
||||
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 });
|
||||
CartNumAdd() {
|
||||
if(this.cartNumber >= this.attrObj.productSelect.stock) return
|
||||
this.cartNumber++
|
||||
this.$emit("changeFun", { action: "ChangeCartNum", value: this.cartNumber })
|
||||
},
|
||||
tapAttr: function(indexw, indexn, itemn) {
|
||||
if (this.productValue[itemn.attr].stock === 0) {
|
||||
tapAttr(index, subIndex, subItem) {
|
||||
// 缺货的点击了没效果
|
||||
if (!subItem.canUsed || subItem.check) {
|
||||
return
|
||||
}
|
||||
// 修改商品规格不生效的原因:
|
||||
// H5端下面写法,attr更新,但是除H5外其他端不支持,
|
||||
// 尽量避免下面的骚写法,不要在子组件内更新props
|
||||
// 这里修改是为了能获取到被选中的属性
|
||||
this.attr.productAttr[indexw].index = indexn;
|
||||
let that = this;
|
||||
let value = that
|
||||
.getCheckedValue()
|
||||
.sort()
|
||||
.join(",");
|
||||
that.$emit("changeFun", {
|
||||
this.attrObj.productAttr[index].attrValue.map((subItem, subIdx) => {
|
||||
subItem.check= false
|
||||
if (subIndex === subIdx) {
|
||||
subItem.check = true
|
||||
}
|
||||
})
|
||||
const value = this.getCheckedValue().sort().join(",")
|
||||
this.cartNumber = 1
|
||||
this.$emit("changeFun", {
|
||||
action: "ChangeAttr",
|
||||
value: {
|
||||
value,
|
||||
indexw,
|
||||
indexn
|
||||
index,
|
||||
subIndex
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
//获取被选中属性;
|
||||
getCheckedValue: function() {
|
||||
let productAttr = this.attr.productAttr;
|
||||
let value = [];
|
||||
for (let i = 0; i < productAttr.length; i++) {
|
||||
for (let j = 0; j < productAttr[i].attrValueArr.length; j++) {
|
||||
if (productAttr[i].index === j) {
|
||||
value.push(productAttr[i].attrValueArr[j]);
|
||||
// 获取被选中属性
|
||||
getCheckedValue() {
|
||||
const productAttr = this.attrObj.productAttr
|
||||
const value = []
|
||||
productAttr.map(item => {
|
||||
item.attrValue.map(subItem => {
|
||||
if (subItem.check) {
|
||||
value.push(subItem.attr)
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
})
|
||||
})
|
||||
return value
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style scope>
|
||||
.itemn{
|
||||
margin: 28rpx 0 0 34rpx !important;
|
||||
width: auto;
|
||||
}
|
||||
.money{
|
||||
margin-top: 0 !important
|
||||
}
|
||||
.actived{
|
||||
border-color: #C52733 !important;
|
||||
color: #fff !important;
|
||||
background: #C52733
|
||||
}
|
||||
.cart-btn{
|
||||
height:52rpx !important;
|
||||
width:52rpx !important
|
||||
}
|
||||
.less-tag{
|
||||
position: absolute;
|
||||
background: #FF5562;
|
||||
border-radius: 8rpx;
|
||||
height: 38rpx;
|
||||
line-height: 38rpx;
|
||||
right: -15px;
|
||||
top: -10px;
|
||||
padding: 0 3px;
|
||||
font-size: 24rpx;
|
||||
font-weight:400
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<u-popup :show="show" @close="close" @open="open" closeable>
|
||||
<view class="v12-px-3">
|
||||
<view class="v12-text-center v12-font-32 v12-py-3 v12-secondary-dark-text">
|
||||
服务说明
|
||||
</view>
|
||||
<view class="wrap v12-dark-text">
|
||||
<view class="service-title">
|
||||
<text class="v12-dark-text v12-font-32">
|
||||
售后服务
|
||||
</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<text class="v12-font-28 v12-font-bold">
|
||||
{{ info }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
info: ''
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.show = false
|
||||
this.$emit('close')
|
||||
},
|
||||
open() {
|
||||
this.show = true
|
||||
this.$emit('open')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.wrap{
|
||||
background: rgba(197,39,51,0.1);
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
.poster-pop {
|
||||
width: 4.5 * 100rpx;
|
||||
width: 6 * 100rpx;
|
||||
height: 8 * 100rpx;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
|
||||
@@ -38,14 +38,15 @@ export default {
|
||||
|
||||
<template>
|
||||
<view class="sub-section flex">
|
||||
<view class="sub-section__item flex jc-center ai-center" :class="{'sub-section__active':index===0}"
|
||||
<view class="sub-section__item flex jc-center ai-center"
|
||||
@click="change(0)">
|
||||
可使用 ({{ canUse }})
|
||||
</view>
|
||||
<view class="sub-section__item flex jc-center ai-center" :class="{'sub-section__active':index===1}"
|
||||
<view class="sub-section__item flex jc-center ai-center"
|
||||
@click="change(1)">
|
||||
{{radioModel?'不可用':'已到期'}} ({{ notUse }})
|
||||
</view>
|
||||
<view class="sub-section__active" :style="{left: (80 + index * 360) + 'rpx'}"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -54,20 +55,27 @@ export default {
|
||||
width: 686rpx;
|
||||
height: 80rpx;
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #FF564A;
|
||||
border-radius: 4rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 32rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.sub-section__item {
|
||||
width: 50%;
|
||||
background: #FFFFFF;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sub-section__active {
|
||||
background: #FF564A;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
width: 140rpx;
|
||||
height: 8rpx;
|
||||
background: linear-gradient(to right, #C52733 0%, rgba(211,92,101,0.91) 54%, rgba(255,255,255,0.62) 100%);
|
||||
border-radius: 0rpx 0rpx 26rpx 26rpx;
|
||||
bottom: (80 - 34) / 2 * 1rpx;
|
||||
transition: left ease-in-out 0.3s;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class="evaluateWtapper">
|
||||
<view
|
||||
class="evaluateItem"
|
||||
v-for="(item, evaluateWtapperIndex) in reply"
|
||||
:key="evaluateWtapperIndex"
|
||||
class="evaluateItem"
|
||||
>
|
||||
<view class="pic-text acea-row row-middle">
|
||||
<view class="pictrue">
|
||||
@@ -11,14 +11,49 @@
|
||||
</view>
|
||||
<view class="acea-row row-middle">
|
||||
<view class="name line1">{{ item.nickname }}</view>
|
||||
<view class="start" :class="'star' + item.star"></view>
|
||||
<view class="time">{{ item.createTime }} </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time">{{ item.createTime }} {{ item.sku||'' }}</view>
|
||||
<view class="evaluate-infor">{{ item.comment }}</view>
|
||||
<view class="v12-px-4">
|
||||
<view class="v12-secondary-dark-text v12-font-24 attr-bg"> {{ item.sku }}</view>
|
||||
<view class="start" :class="'star' + item.star"></view>
|
||||
</view>
|
||||
<view class="evaluate-infor v12-font-24">{{ item.comment }}</view>
|
||||
<view class="imgList acea-row">
|
||||
<view class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq">
|
||||
<image :src="itemn" class="image" @click="previewImage(item.picturesArr,eq)" />
|
||||
<view v-if="item.video" class="pictrue">
|
||||
<view
|
||||
@click="pauseOtherVideo('video' + evaluateWtapperIndex)"
|
||||
v-if="activeVideo !== 'video' + evaluateWtapperIndex"
|
||||
class="play-icon"
|
||||
>
|
||||
<u-icon name="play-right-fill" color="#fff" size="48"></u-icon>
|
||||
</view>
|
||||
<image
|
||||
v-if="activeVideo !== 'video' + evaluateWtapperIndex"
|
||||
:src="item.video + '?vframe/jpg/offset/1'"
|
||||
class="image"
|
||||
@click="pauseOtherVideo('video' + evaluateWtapperIndex)"
|
||||
>
|
||||
|
||||
</image>
|
||||
<video
|
||||
v-else
|
||||
:src="item.video"
|
||||
:poster="item.video + '?vframe/jpg/offset/1'"
|
||||
controls
|
||||
autoplay
|
||||
play-btn-position="center"
|
||||
:id="'video' + evaluateWtapperIndex"
|
||||
class="image"
|
||||
@play="pauseOtherVideo('video' + evaluateWtapperIndex)"
|
||||
/>
|
||||
</view>
|
||||
<view
|
||||
v-for="(itemn, eq) in item.picturesArr"
|
||||
:key="eq"
|
||||
class="pictrue"
|
||||
>
|
||||
<image :src="itemn" class="image" @click="previewImage(item.picturesArr, eq)" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply" v-if="item.merchantReplyContent">
|
||||
@@ -40,17 +75,58 @@ export default {
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
return {};
|
||||
return {
|
||||
videoPlayers: [],
|
||||
activeVideo: null,
|
||||
};
|
||||
},
|
||||
mounted: function() {},
|
||||
methods: {
|
||||
dataFormat,
|
||||
previewImage(imgs,index){
|
||||
uni.previewImage({
|
||||
current:imgs[index],
|
||||
urls:imgs
|
||||
})
|
||||
}
|
||||
previewImage(imgs,index){
|
||||
uni.previewImage({
|
||||
current:imgs[index],
|
||||
urls:imgs
|
||||
})
|
||||
},
|
||||
// 播放视频时暂停其他视频
|
||||
pauseOtherVideo(video) {
|
||||
this.activeVideo = video;
|
||||
if(this.videoPlayers.includes(video)) {
|
||||
this.videoPlayers.forEach((item) => {
|
||||
if(item !== video) {
|
||||
uni.createVideoContext(item, this).pause();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.videoPlayers.push(video);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.attr-bg{
|
||||
background: rgba(197,39,51,0.1);
|
||||
padding: 7rpx 5px;
|
||||
width: fit-content;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.time{
|
||||
padding: 0 !important;
|
||||
}
|
||||
.evaluateWtapper .evaluateItem .imgList .pictrue{
|
||||
position: relative;
|
||||
width: 300rpx;
|
||||
.play-icon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<view v-if="showImg" class="ai-entrance">
|
||||
<image
|
||||
:src="settingInfo.mainImage"
|
||||
mode="widthFix"
|
||||
class="img"
|
||||
@click="enterAiChat()"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getAiSystemInfoSetting
|
||||
} from '@/api/public'
|
||||
export default {
|
||||
name: 'AiEntrance',
|
||||
data() {
|
||||
return {
|
||||
showImg: false,
|
||||
settingInfo: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
getAiSystemInfoSetting().then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.settingInfo = data
|
||||
this.showImg = data.showOnAppIndex === 1
|
||||
}
|
||||
})
|
||||
},
|
||||
enterAiChat() {
|
||||
uni.navigateTo({
|
||||
url: '/aiChat/views/index?click=1'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.ai-entrance {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
z-index: 5;
|
||||
transform: translateY(-50%);
|
||||
.img {
|
||||
width: 88rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,13 +1,28 @@
|
||||
<template>
|
||||
<view class="noCommodity">
|
||||
<view class="noPictrue">
|
||||
<image :src="webUrl+'/20210203153900181449.png'" class="image"/>
|
||||
<image
|
||||
v-if="type === 'good'"
|
||||
:src=" webUrl + '/20210203153900181449.png'"
|
||||
class="image"
|
||||
/>
|
||||
<image
|
||||
v-if="type === 'hotel'"
|
||||
:src=" webUrl + '/no-hotel.png'"
|
||||
class="image"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "NoGoodData",
|
||||
name: 'NoGoodData',
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'good'
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
current: cind,
|
||||
indicator: 'default'
|
||||
});
|
||||
this.$emit('click')
|
||||
},
|
||||
getheight() {
|
||||
let that = this;
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
### 使用组件
|
||||
|
||||
```html
|
||||
<time-picker-popup ref="TimePickerPopupRef" :value="value" @confirm="confirm"></time-picker-popup>
|
||||
```
|
||||
|
||||
### 引入组件
|
||||
|
||||
```javascript
|
||||
import TimePickerPopup from '@/components/time-picker-popup/time-picker-popup.vue';
|
||||
```
|
||||
|
||||
### 注册组件
|
||||
|
||||
```javascript
|
||||
export default {
|
||||
components: { TimePickerPopup },
|
||||
data() {
|
||||
return {
|
||||
value: ['00', '00', '00', '00']
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.open();
|
||||
},
|
||||
methods: {
|
||||
confirm(data) {
|
||||
uni.showToast({
|
||||
title: `${data[0]}:${data[1]}-${data[2]}:${data[3]}`
|
||||
})
|
||||
},
|
||||
open() {
|
||||
this.$refs.TimePickerPopupRef.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 参数
|
||||
|
||||
```javascript
|
||||
// 当前选中的值
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => (['00', '00', '00', '00'])
|
||||
},
|
||||
// 标题
|
||||
title: {
|
||||
type: String,
|
||||
default: '时间'
|
||||
},
|
||||
// 取消按钮文字
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: '取消'
|
||||
},
|
||||
// 取消按钮颜色
|
||||
canceColor: {
|
||||
type: String,
|
||||
default: '#666666'
|
||||
},
|
||||
// 确定按钮文字
|
||||
confirmText: {
|
||||
type: String,
|
||||
default: '确定'
|
||||
},
|
||||
// 确定按钮颜色
|
||||
confirmColor: {
|
||||
type: String,
|
||||
default: '#2bb781'
|
||||
},
|
||||
// 分割符
|
||||
segmentation: {
|
||||
type: String,
|
||||
default: '-'
|
||||
},
|
||||
// 设置选择器中间选中框的类名 注意页面或组件的style中写了scoped时,需要在类名前写/deep/
|
||||
indicatorClass: {
|
||||
type: String,
|
||||
default: 'picker-view__indicator'
|
||||
},
|
||||
// 设置选择器中间选中框的样式
|
||||
indicatorStyle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
```
|
||||
@@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<!-- 时间选择器弹窗 -->
|
||||
<uni-popup ref="popup" type="bottom" :safe-area="false">
|
||||
<view class="custom-picker">
|
||||
<view class="custom-picker__header">
|
||||
<view class="cancel" :style="{ color: canceColor }" @tap="onCancel">{{ cancelText }}</view>
|
||||
<view class="title">{{ title }}</view>
|
||||
<view class="confirm" :style="{ color: confirmColor }" @tap="onConfirm">{{ confirmText }}</view>
|
||||
</view>
|
||||
<picker-view :indicator-class="indicatorClass" :indicator-style="indicatorStyle" class="picker-view"
|
||||
:value="value" @change="bindChange" @pickstart="pickstart" @pickend="pickend">
|
||||
<picker-view-column>
|
||||
<view class="picker-view__item" v-for="(item,index) in rangeList[0]" :key="index">{{item}}</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="picker-view__item" v-for="(item,index) in rangeList[1]" :key="index">{{item}}</view>
|
||||
</picker-view-column>
|
||||
<view class="picker-view__segmentation">{{ segmentation }}</view>
|
||||
<picker-view-column>
|
||||
<view class="picker-view__item" v-for="(item,index) in rangeList[2]" :key="index">{{item}}</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="picker-view__item" v-for="(item,index) in rangeList[3]" :key="index">{{item}}</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import utils, {
|
||||
props,
|
||||
range
|
||||
} from './utils.js';
|
||||
export default {
|
||||
name: 'TimePickerPopup',
|
||||
props: props,
|
||||
data() {
|
||||
return {
|
||||
rangeList: utils.range,
|
||||
pickerValue: [0, 0, 0, 0],
|
||||
isScoll: false, // 是否正在滚动
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 开启弹窗
|
||||
*/
|
||||
open() {
|
||||
// 判断是否传入props -> value
|
||||
if (Array.isArray(this.value) && this.value.length) {
|
||||
this.pickerValue = this.value.map((item, index) => this.rangeList[index].findIndex(child =>
|
||||
child == this.value[index]));
|
||||
} else {
|
||||
this.pickerValue = [0, 0, 0, 0];
|
||||
}
|
||||
this.$refs.popup.open();
|
||||
},
|
||||
/**
|
||||
* 关闭弹窗
|
||||
*/
|
||||
close() {
|
||||
this.$refs.popup.close();
|
||||
// 重置选中数据
|
||||
this.pickerValue = [0, 0, 0, 0];
|
||||
},
|
||||
/**
|
||||
* 点击确定
|
||||
*/
|
||||
onConfirm() {
|
||||
if (!this.isScoll) {
|
||||
let data = this.value || ['00', '00', '00', '00'];
|
||||
if (this.pickerValue && this.pickerValue.length) {
|
||||
data = this.pickerValue.map((item, index) => String(this.rangeList[index][item]));
|
||||
}
|
||||
this.$emit('confirm', data);
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击取消
|
||||
*/
|
||||
onCancel() {
|
||||
this.close();
|
||||
},
|
||||
/**
|
||||
* 滚动开始
|
||||
*/
|
||||
pickstart() {
|
||||
this.isScoll = true;
|
||||
},
|
||||
/**
|
||||
* 滚动结束
|
||||
*/
|
||||
pickend() {
|
||||
this.isScoll = false;
|
||||
},
|
||||
/**
|
||||
* 选择器改变
|
||||
* @param {Object} e
|
||||
*/
|
||||
bindChange(e) {
|
||||
this.pickerValue = e.detail.value;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.custom-picker {
|
||||
width: 100%;
|
||||
height: 620rpx;
|
||||
background-color: #fff;
|
||||
padding-bottom: 0;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
|
||||
&__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx 40rpx;
|
||||
|
||||
.cancel {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.confirm {
|
||||
color: #2bb781;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.picker-view {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-top: 20rpx;
|
||||
|
||||
&__item {
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/deep/ &__indicator {
|
||||
height: 100rpx;
|
||||
color: #2bb781;
|
||||
}
|
||||
|
||||
&__segmentation {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,69 @@
|
||||
// 组件props
|
||||
const props = {
|
||||
// 当前选中的值
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => (['00', '00', '00', '00'])
|
||||
},
|
||||
// 标题
|
||||
title: {
|
||||
type: String,
|
||||
default: '时间'
|
||||
},
|
||||
// 取消按钮文字
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: '取消'
|
||||
},
|
||||
// 取消按钮颜色
|
||||
canceColor: {
|
||||
type: String,
|
||||
default: '#666666'
|
||||
},
|
||||
// 确定按钮文字
|
||||
confirmText: {
|
||||
type: String,
|
||||
default: '确定'
|
||||
},
|
||||
// 确定按钮颜色
|
||||
confirmColor: {
|
||||
type: String,
|
||||
default: '#2bb781'
|
||||
},
|
||||
// 分割符
|
||||
segmentation: {
|
||||
type: String,
|
||||
default: '-'
|
||||
},
|
||||
// 设置选择器中间选中框的类名 注意页面或组件的style中写了scoped时,需要在类名前写/deep/
|
||||
indicatorClass: {
|
||||
type: String,
|
||||
default: 'picker-view__indicator'
|
||||
},
|
||||
// 设置选择器中间选中框的样式
|
||||
indicatorStyle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
}
|
||||
|
||||
// 滚动数据
|
||||
let range = [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
];
|
||||
for (let i = 0; i < 24; i++) {
|
||||
range[0].push(i >= 10 ? String(i) : `0${i}`);
|
||||
range[2].push(i >= 10 ? String(i) : `0${i}`);
|
||||
}
|
||||
for (let i = 0; i < 60; i++) {
|
||||
range[1].push(i >= 10 ? String(i) : `0${i}`);
|
||||
range[3].push(i >= 10 ? String(i) : `0${i}`);
|
||||
}
|
||||
|
||||
export default {
|
||||
props,
|
||||
range
|
||||
}
|
||||
@@ -1,16 +1,24 @@
|
||||
<template name="sunui-upimg">
|
||||
<view class="sunui-uploader-bd">
|
||||
<view class="sunui-uploader-files">
|
||||
<view
|
||||
v-if="showBlankPlaceholder"
|
||||
:style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'"
|
||||
class="sunui-uploader-file"
|
||||
/>
|
||||
<block v-for="(item, index) in upload_before_list" :key="index">
|
||||
<view class="sunui-uploader-file" :class="[item.upload_percent < 100 ? 'sunui-uploader-file-status' : '']" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'">
|
||||
<view class="sunui-uploader-file" :class="[item.upload_percent < 100 ? '' : '']" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'">
|
||||
<image class="sunui-uploader-img" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'" :src="item.path" mode="aspectFill" @tap="preview(index)" v-if="type === 'image'" />
|
||||
<video :id="`myVideo_${index}`" :src="item.path" :data-index="index" @play="videoPlay" @error="videoError" controls :enable-play-gesture="true" objectFit="contain" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'" v-if="type === 'video'"></video>
|
||||
<view class="sunui-img-removeicon right" @tap.stop="remove(index)" v-show="upimg_move">x</view>
|
||||
<view class="sunui-loader-filecontent" v-if="item.upload_percent < 100">{{item.upload_percent}}%</view>
|
||||
<!-- <view class="sunui-loader-filecontent" v-if="item.upload_percent < 100">{{item.upload_percent}}%</view> -->
|
||||
</view>
|
||||
</block>
|
||||
<view v-show="upload_before_list.length < upload_count" hover-class="sunui-uploader-hover" class="sunui-uploader-inputbox" @tap="choose" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'">
|
||||
<view :style="'line-height:'+ upload_img_wh + 'rpx;'"><text class="iconfont icon-mn_shangchuantupian" style="color: #666;"></text></view>
|
||||
<view :style="'line-height:'+ upload_img_wh + 'rpx;'">
|
||||
<text v-if="type === 'image'" class="iconfont icon-mn_shangchuantupian" style="color: #666;"></text>
|
||||
<u-icon v-if="type === 'video'" size="48px" name="play-circle" style="color: #666;"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -48,6 +56,11 @@ export default {
|
||||
},
|
||||
name: 'sunui-upimg',
|
||||
props: {
|
||||
// 是否显示空白占位图,用于同时上传视频和图片,两个上传空间并列
|
||||
showBlankPlaceholder: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
upload_video_max: {
|
||||
type: Number,
|
||||
default: 30 // 最大上传容量(M)
|
||||
@@ -94,6 +107,21 @@ export default {
|
||||
default: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dataList: {
|
||||
handler(val) {
|
||||
this.upload_before_list = val
|
||||
this.upload_cache_list = []
|
||||
if (val.length > 0) {
|
||||
val.map(item => {
|
||||
item && this.upload_cache_list.push(item.path)
|
||||
})
|
||||
}
|
||||
this.emit()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
onReady(res) {
|
||||
this.$nextTick(() => {
|
||||
for (let i = 0; i < 10; i++) {
|
||||
@@ -101,40 +129,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
watch: {
|
||||
// url(val) {
|
||||
// this.upload_before_list.map((item) => {
|
||||
// this.upload_cache_list.push(item.path);
|
||||
// });
|
||||
// this.emit();
|
||||
// }
|
||||
dataList:{
|
||||
handler(val){
|
||||
console.log('dataList change'+JSON.stringify(val));
|
||||
this.upload_before_list = val;
|
||||
if(this.upload_before_list.length>0){
|
||||
this.upload_cache_list = [];
|
||||
this.upload_before_list.map((item) => {
|
||||
//过滤掉非网络图片
|
||||
if(item.path.substring(0,4) == 'http' && item.path.substring(0,11) != 'http://tmp/')
|
||||
{
|
||||
this.upload_cache_list.push(item.path);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.upload_cache_list = [];
|
||||
}
|
||||
this.emit();
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
videoPlay(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
@@ -145,10 +139,10 @@ export default {
|
||||
}
|
||||
},
|
||||
videoError(e) {
|
||||
uni.showModal({
|
||||
content: '网络错误,请稍后重试!',
|
||||
showCancel: false
|
||||
});
|
||||
// uni.showModal({
|
||||
// content: '网络错误,请稍后重试!',
|
||||
// showCancel: false
|
||||
// });
|
||||
},
|
||||
uploadFile(paths) {
|
||||
const promises = paths.map((path) => {
|
||||
@@ -161,9 +155,9 @@ export default {
|
||||
});
|
||||
});
|
||||
|
||||
/* uni.showLoading({
|
||||
uni.showLoading({
|
||||
title: `正在上传...`,
|
||||
}); */
|
||||
})
|
||||
|
||||
Promise.all(promises).then((data) => {
|
||||
// uni.hideLoading();
|
||||
@@ -171,9 +165,10 @@ export default {
|
||||
this.upload_cache_list.push(...data);
|
||||
console.log("after uploaded upload_cache_list:"+JSON.stringify(this.upload_cache_list))
|
||||
this.emit();
|
||||
uni.hideLoading()
|
||||
}).catch((res) => {
|
||||
console.log(res);
|
||||
// uni.hideLoading();
|
||||
uni.hideLoading()
|
||||
});
|
||||
},
|
||||
choose() {
|
||||
@@ -190,6 +185,7 @@ export default {
|
||||
if (Math.ceil(res.size / 1024) < this.upload_video_max * 1024) {
|
||||
await this.upload_img_size.push(Math.ceil(res.size / 1024));
|
||||
await this.upload_before_list.push(res);
|
||||
this.$forceUpdate()
|
||||
} else {
|
||||
this.upload_exceeded_list.push(1);
|
||||
|
||||
@@ -224,13 +220,14 @@ export default {
|
||||
if (Math.ceil(res.tempFiles[i].size / 1024) < this.upload_max * 1024) {
|
||||
await this.upload_img_size.push(Math.ceil(res.tempFiles[i].size / 1024));
|
||||
await this.upload_before_list.push(res.tempFiles[i]);
|
||||
this.$forceUpdate()
|
||||
// TODO v3.1增加图片格式限制
|
||||
} else {
|
||||
res.tempFilePaths.splice(i, 1);
|
||||
this.upload_exceeded_list.push(i === 0 ? 1 : i + 1);
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `第${[...new Set(this.upload_exceeded_list)].join(',')}张图片超出限制${this.upload_max}MB,已过滤`,
|
||||
content: `图片超出限制${this.upload_max}MB,已过滤`,
|
||||
showCancel: false,
|
||||
confirmText: '确认',
|
||||
success(res) {
|
||||
@@ -244,6 +241,7 @@ export default {
|
||||
}
|
||||
this.upload_cache = await res.tempFilePaths;
|
||||
this.upload(this.upload_auto);
|
||||
this.$forceUpdate()
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
@@ -343,7 +341,12 @@ export default {
|
||||
|
||||
uploadTask.onProgressUpdate(async (res) => {
|
||||
// this.upload_before_list[this.upload_before_list.length-1].upload_percent = await res.progress;
|
||||
for(let i in this.upload_before_list) { if(this.upload_before_list[i].upload_percent != 100) { this.upload_before_list[i].upload_percent = await res.progress; break; } };
|
||||
for (let i in this.upload_before_list) {
|
||||
if (this.upload_before_list[i].upload_percent != 100) {
|
||||
console.log(res.progress, '-----------res.progress-----------');
|
||||
this.upload_before_list[i].upload_percent = await res.progress
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -378,7 +381,7 @@ export default {
|
||||
}
|
||||
|
||||
.icon-mn_shangchuantupian {
|
||||
font-size: 3em;
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
.sunui-uploader-img {
|
||||
@@ -397,7 +400,7 @@ export default {
|
||||
|
||||
.sunui-uploader-inputbox {
|
||||
position: relative;
|
||||
margin-bottom: 16rpx;
|
||||
margin: 0 16rpx 16rpx 0;
|
||||
box-sizing: border-box;
|
||||
background-color: #ededed;
|
||||
display: flex;
|
||||
@@ -446,7 +449,6 @@ export default {
|
||||
color: #fff;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.sunui-uploader-bd {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
@@ -0,0 +1,320 @@
|
||||
<template>
|
||||
<uni-popup ref="popup" type="bottom">
|
||||
<view class="tpf-time-range-section">
|
||||
<view class="tpf-time-range-title-section flex flex-align-center flex-pack-justify">
|
||||
<text class="tpf-time-range-title-txt tpf-time-range-cancel" @tap="closePopup('cancel')">取消</text>
|
||||
<text class="tpf-time-range-title-txt tpf-time-range-title">营业时间</text>
|
||||
<text class="tpf-time-range-title-txt tpf-time-range-sure" @tap="closePopup('sure')">确定</text>
|
||||
</view>
|
||||
<view class="tpf-time-range-main flex flex-l flex-align-center flex-pack-justify">
|
||||
<view class="tpf-time-range-item flex flex-v flex-align-center">
|
||||
<picker-view class="flex-1 tpf-picker-view" :value="startDefaultTimeArr" indicator-style="height: 50px;" @change="startTimeChange">
|
||||
<picker-view-column>
|
||||
<view class="tpf-time-range-picker-item flex flex-align-center flex-pack-center" v-for="(item,index) in createTimeRange.hours" :key="index">{{item}}</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="tpf-time-range-picker-item flex flex-align-center flex-pack-center" v-for="(item,index) in createTimeRange.startMinutes" :key="index">{{item}}</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
||||
<text class="tpf-time-divide"> - </text>
|
||||
<view class="tpf-time-range-item flex flex-v flex-align-center">
|
||||
<picker-view class="flex-1 tpf-picker-view" :value="endDefaultTimeArr" indicator-style="height: 50px;" @change="endTimeChange">
|
||||
<picker-view-column>
|
||||
<view class="tpf-time-range-picker-item flex flex-align-center flex-pack-center" v-for="(item,index) in createTimeRange.hours" :key="index">{{item}}</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="tpf-time-range-picker-item flex flex-align-center flex-pack-center" v-for="(item,index) in createTimeRange.endMinutes" :key="index">{{item}}</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* TimeRange 时间范围选择
|
||||
* @description 对时间(时、分)区间进行选择,限制选择范围
|
||||
* @property {string} startTime 定义开始时间
|
||||
* @property {string} startDefaultTime 定义开始默认时间
|
||||
* @property {string} endTime 定义结束时间
|
||||
* @property {string} endDefaultTime 定义结束默认时间
|
||||
* @event {Function()} name
|
||||
*/
|
||||
export default{
|
||||
name:"TpfTimeRange",
|
||||
props:{
|
||||
// 开始时间
|
||||
startTime:{
|
||||
type:String,
|
||||
default:"00:00",
|
||||
validator:(value)=>{
|
||||
return /(((2[0-3])|([0-1][0-9])):[0-5][0-9])|24:00/.test(value);
|
||||
}
|
||||
},
|
||||
// 开始默认时间
|
||||
startDefaultTime:{
|
||||
type:String,
|
||||
// #ifdef MP-WEIXIN
|
||||
default:"00:00",
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
default(){
|
||||
return this.startTime;
|
||||
},
|
||||
// #endif
|
||||
|
||||
validator:(value)=>{
|
||||
return /(((2[0-3])|([0-1][0-9])):[0-5][0-9])|24:00/.test(value);
|
||||
}
|
||||
},
|
||||
// 结束时间
|
||||
endTime:{
|
||||
type:String,
|
||||
default:"23:59",
|
||||
validator:(value)=>{
|
||||
return /(((2[0-3])|([0-1][0-9])):[0-5][0-9])|24:00/.test(value);
|
||||
}
|
||||
},
|
||||
// 结束默认时间
|
||||
endDefaultTime:{
|
||||
type:String,
|
||||
// #ifdef MP-WEIXIN
|
||||
default:"23:59",
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
default(){
|
||||
return this.endTime;
|
||||
},
|
||||
// #endif
|
||||
validator:(value)=>{
|
||||
return /(((2[0-3])|([0-1][0-9])):[0-5][0-9])|24:00/.test(value);
|
||||
}
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
startDefaultTimeArr:[0,0],
|
||||
endDefaultTimeArr:[0,0],
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
startTimeChange(e){
|
||||
this.startDefaultTimeArr = e.detail.value;
|
||||
if(this.compareTwoTimeRange(e.detail.value,this.endDefaultTimeArr)) this.endDefaultTimeArr = e.detail.value;
|
||||
},
|
||||
endTimeChange(e){
|
||||
this.endDefaultTimeArr = e.detail.value;
|
||||
if(this.compareTwoTimeRange(this.startDefaultTimeArr,e.detail.value)) this.startDefaultTimeArr = e.detail.value;
|
||||
},
|
||||
open(){
|
||||
this.$refs.popup.open();
|
||||
},
|
||||
closePopup(action=""){
|
||||
if(action == "cancel"){
|
||||
this.$refs.popup.close();
|
||||
return false;
|
||||
}
|
||||
if(this.compareTwoTimeRange(this.startDefaultTimeArr , this.endDefaultTimeArr)){
|
||||
uni.showToast({
|
||||
title:"开始时间不能大于结束时间",
|
||||
icon:'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let startTime = this.createTimeRange.hours[this.startDefaultTimeArr[0]]+":"+this.createTimeRange.startMinutes[this.startDefaultTimeArr[1]];
|
||||
let endTime = this.createTimeRange.hours[this.endDefaultTimeArr[0]]+":"+this.createTimeRange.endMinutes[this.endDefaultTimeArr[1]];
|
||||
this.$emit('timeRange',[
|
||||
startTime,endTime
|
||||
]);
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
compareTwoTimeRange(arr1=[],arr2=[]){
|
||||
if(arr1[0]>arr2[0] || (arr1[0] == arr2[0] && arr1[1] > arr2[1])) return true;
|
||||
return false;
|
||||
},
|
||||
},
|
||||
beforeCreate(){
|
||||
// 初始化小时
|
||||
let hour = [],minute=[];
|
||||
for(let h=0;h<=24;h++){
|
||||
hour.push(h<10?'0'+h:h+'');
|
||||
}
|
||||
for(let m=0;m<60;m++){
|
||||
minute.push(m<10?'0'+m:m+'');
|
||||
}
|
||||
this.timeRange = {hour,minute};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
computed:{
|
||||
createTimeRange(){
|
||||
let {startTime,startDefaultTime,endTime,endDefaultTime} = this.timeRangeDateChange;
|
||||
let startTimeArr = startTime.split(":"),endTimeArr = endTime.split(":");
|
||||
let hours = this.timeRange.hour.slice(
|
||||
this.timeRange.hour.findIndex(item=>item == startTimeArr[0]),
|
||||
this.timeRange.hour.findIndex(item=>item == endTimeArr[0])+1,
|
||||
);
|
||||
|
||||
let startMinutes = null;
|
||||
if(startTimeArr[0] == endTimeArr[0]){
|
||||
startMinutes = this.timeRange.minute.slice(
|
||||
this.timeRange.minute.findIndex(item=>item == startTimeArr[1]),
|
||||
this.timeRange.minute.findIndex(item=>item == endTimeArr[1])+1,
|
||||
);
|
||||
}else{
|
||||
if(this.startDefaultTimeArr[0] == 0){
|
||||
startMinutes = this.timeRange.minute.slice(
|
||||
this.timeRange.minute.findIndex(item=>item == startTimeArr[1])
|
||||
);
|
||||
}
|
||||
else if(this.startDefaultTimeArr[0] == hours.length-1){
|
||||
startMinutes = this.timeRange.minute.slice(
|
||||
0,
|
||||
this.timeRange.minute.findIndex(item=>item == endTimeArr[1])+1
|
||||
);
|
||||
}else{
|
||||
startMinutes = this.timeRange.minute; // 完整数据
|
||||
}
|
||||
}
|
||||
let endMinutes = null;
|
||||
if(startTimeArr[0] == endTimeArr[0]){
|
||||
endMinutes = this.timeRange.minute.slice(
|
||||
this.timeRange.minute.findIndex(item=>item == startTimeArr[1]),
|
||||
this.timeRange.minute.findIndex(item=>item == endTimeArr[1])+1,
|
||||
);
|
||||
}
|
||||
else{
|
||||
if(this.endDefaultTimeArr[0] == 0){
|
||||
endMinutes = this.timeRange.minute.slice(
|
||||
this.timeRange.minute.findIndex(item=>item == startTimeArr[1])
|
||||
);
|
||||
}
|
||||
else if(this.endDefaultTimeArr[0] == hours.length-1){
|
||||
endMinutes = this.timeRange.minute.slice(
|
||||
0,
|
||||
this.timeRange.minute.findIndex(item=>item == endTimeArr[1])+1
|
||||
);
|
||||
}else{
|
||||
endMinutes = this.timeRange.minute; // 完整数据
|
||||
}
|
||||
}
|
||||
return {
|
||||
hours,
|
||||
startMinutes,
|
||||
endMinutes,
|
||||
}
|
||||
},
|
||||
// 用于监听属性的变化
|
||||
timeRangeDateChange(){
|
||||
let {startTime,startDefaultTime,endTime,endDefaultTime} = this;
|
||||
startTime = startTime<endTime?startTime:endTime;
|
||||
startDefaultTime = startDefaultTime>=startTime && startDefaultTime<=endTime?startDefaultTime:startTime;
|
||||
endDefaultTime = endDefaultTime>=startTime && endDefaultTime<=endTime && endDefaultTime>=startDefaultTime?endDefaultTime:startDefaultTime;
|
||||
return {
|
||||
startTime,
|
||||
startDefaultTime,
|
||||
endTime,
|
||||
endDefaultTime
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
timeRangeDateChange:{
|
||||
handler(newVal,oldVal){
|
||||
let {startTime,startDefaultTime,endTime,endDefaultTime} = newVal;
|
||||
let startTimeArr = startTime.split(":"),endTimeArr = endTime.split(":");
|
||||
let startDefaultTimeArr = startDefaultTime.split(":"),endDefaultTimeArr = endDefaultTime.split(":");
|
||||
|
||||
let hours = this.timeRange.hour.slice(
|
||||
this.timeRange.hour.findIndex(item=>item == startTimeArr[0]),
|
||||
this.timeRange.hour.findIndex(item=>item == endTimeArr[0])+1,
|
||||
);
|
||||
|
||||
this.$set(this.startDefaultTimeArr,0, hours.includes(startDefaultTimeArr[0])?hours.findIndex(item=>item == startDefaultTimeArr[0]):0);
|
||||
this.$set(this.endDefaultTimeArr,0, hours.includes(endDefaultTimeArr[0])?hours.findIndex(item=>item == endDefaultTimeArr[0]):this.startDefaultTimeArr[0]);
|
||||
|
||||
let startMinute = null,endMinute = null;
|
||||
if(startTimeArr[0] == endTimeArr[0]){
|
||||
startMinute = endMinute = this.timeRange.minute.slice(
|
||||
this.timeRange.minute.findIndex(item=>item == startTimeArr[1]),
|
||||
this.timeRange.minute.findIndex(item=>item == endTimeArr[1])+1,
|
||||
);
|
||||
}
|
||||
else{
|
||||
if(startDefaultTime.split(":")[0] == startTimeArr[0]){
|
||||
startMinute = this.timeRange.minute.slice(
|
||||
this.timeRange.minute.findIndex(item=>item == startTimeArr[1]),
|
||||
);
|
||||
}
|
||||
else if(startDefaultTime.split(":")[0] == endTimeArr[0]){
|
||||
startMinute = this.timeRange.minute.slice(
|
||||
0,
|
||||
this.timeRange.minute.findIndex(item=>item == endTimeArr[1])+1,
|
||||
);
|
||||
}else{
|
||||
startMinute = this.timeRange.minute;
|
||||
}
|
||||
if(endDefaultTime.split(":")[0] == startTimeArr[0]){
|
||||
endMinute = this.timeRange.minute.slice(
|
||||
this.timeRange.minute.findIndex(item=>item == startTimeArr[1]),
|
||||
);
|
||||
}else if(endDefaultTime.split(":")[0] == endTimeArr[0]){
|
||||
endMinute = this.timeRange.minute.slice(
|
||||
0,
|
||||
this.timeRange.minute.findIndex(item=>item == endTimeArr[1])+1,
|
||||
);
|
||||
}else{
|
||||
endMinute = this.timeRange.minute;
|
||||
}
|
||||
}
|
||||
this.$set(this.startDefaultTimeArr,1, startMinute.includes(startDefaultTimeArr[1])?startMinute.findIndex(item=>item == startDefaultTimeArr[1]):0);
|
||||
this.$set(this.endDefaultTimeArr,1, endMinute.includes(endDefaultTimeArr[1])?endMinute.findIndex(item=>item == endDefaultTimeArr[1]):this.startDefaultTimeArr[1]);
|
||||
},
|
||||
deep:true, // 深度监听
|
||||
immediate:true, // 初始化立即执行
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.flex{display:flex;}
|
||||
.flex-v{flex-direction:column;}
|
||||
.flex-wrap{flex-wrap:wrap;}
|
||||
.flex-row-wrap{flex-flow:row wrap;}
|
||||
.flex-1{flex:1;}
|
||||
.flex-align-center{align-items:center;}
|
||||
.flex-pack-center{justify-content:center;}
|
||||
.flex-pack-justify{justify-content:space-between;}
|
||||
.flex-pack-around{justify-content:space-around;}
|
||||
.tpf-time-range-section{
|
||||
background-color: #FFF;
|
||||
}
|
||||
.tpf-time-range-title-section{
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px #f2f2f2 solid;
|
||||
}
|
||||
.tpf-time-range-title-txt{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.tpf-time-range-title{
|
||||
font-size:32rpx;
|
||||
}
|
||||
.tpf-time-range-main{
|
||||
padding: 0 20rpx 20rpx;
|
||||
}
|
||||
.tpf-time-range-item{
|
||||
height: 400rpx;
|
||||
width: 300rpx;
|
||||
}
|
||||
.tpf-start-time{
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.tpf-picker-view{
|
||||
width:280rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<view class="xdd-product-item" @click="viewHandle(item)">
|
||||
<view class="focus-img">
|
||||
<image
|
||||
v-if="!item.isFarmerShop"
|
||||
:src="item[imageKey]"
|
||||
class="img"
|
||||
/>
|
||||
<image
|
||||
:src="item.farmerShopCover"
|
||||
v-if="item.farmerShopCoverType === 1 && item.isFarmerShop"
|
||||
class="img"
|
||||
mode="heightFix|widthFix">
|
||||
</image>
|
||||
<image
|
||||
:src="item.farmerShopCover + '?vframe/jpg/offset/1'"
|
||||
mode="heightFix|widthFix"
|
||||
v-if="item.farmerShopCoverType !== 1 && item.isFarmerShop"
|
||||
:show-center-play-btn="false"
|
||||
:show-fullscreen-btn="false"
|
||||
:show-play-btn="false"
|
||||
class="img"
|
||||
:poster="item.farmerShopCover + '?vframe/jpg/offset/1'">
|
||||
</image>
|
||||
|
||||
<image
|
||||
v-if="item.isOldBrand"
|
||||
:src="webUrl + '/home/old-mark.png'"
|
||||
class="mark-img"
|
||||
/>
|
||||
<image
|
||||
v-if="item.isLandmarkGoods"
|
||||
:src="webUrl + '/home/mark-land.png'"
|
||||
class="mark-img"
|
||||
style="right: 20rpx"
|
||||
/>
|
||||
<image
|
||||
v-if="item.isCountyFamous"
|
||||
:src="webUrl + '/home/qixian-mark.png'"
|
||||
class="mark-img"
|
||||
/>
|
||||
<image
|
||||
v-if="item.isIch"
|
||||
:src="webUrl + '/home/ich-mark.png'"
|
||||
class="mark-img"
|
||||
style="right: 20rpx; width: 70rpx"
|
||||
/>
|
||||
<image
|
||||
v-if="item.isFarmerShop"
|
||||
:src="webUrl + '/orderIcon/nm.png'"
|
||||
class="mark-img-nm"
|
||||
/>
|
||||
</view>
|
||||
<view v-if="item.isFarmerShop" class="more-t v12-pt-2 v12-font-bold v12-font-28 v12-px-2" >{{ item.farmerShopContent }}</view>
|
||||
<view class="info-wrap" v-if="!item.isFarmerShop">
|
||||
<view class="name more-t">
|
||||
{{ item[nameKey] }}
|
||||
</view>
|
||||
<view v-if="item.bestContent" class="desc more-t">
|
||||
{{ item.bestContent }}
|
||||
</view>
|
||||
<view v-if="item.couponName && showCoupon" class="coupon">
|
||||
<view class="tag">券</view>
|
||||
<view class="tag">{{ item.couponName }}</view>
|
||||
</view>
|
||||
<view class="price-wrap">
|
||||
<view class="price">
|
||||
<text class="price-txt price-red">¥{{ item[priceKey] }}</text>
|
||||
</view>
|
||||
<view class="btn" @click.stop="$emit('add', item)">
|
||||
<image
|
||||
:src="webUrl + '/home/icon-cart.png'"
|
||||
class="img"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="item.isFarmerShop"
|
||||
class="v12-justify-start v12-align-center v12-pt-2 v12-px-2 v12-pb-2">
|
||||
<view class="btn v12-mr-2">
|
||||
<image :src="item.farmerShopLogo" class="nm-img-logo v12-radius-100"></image>
|
||||
</view>
|
||||
<view class="one-t v12-font-24 v12-dark1-text" style="width:230rpx">{{ item.farmerShopName }}/{{ item.farmerShopCityName || '-' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'XddProductItem',
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
imageKey: {
|
||||
type: String,
|
||||
default: 'image'
|
||||
},
|
||||
nameKey: {
|
||||
type: String,
|
||||
default: 'storeName'
|
||||
},
|
||||
priceKey: {
|
||||
type: String,
|
||||
default: 'price'
|
||||
},
|
||||
// 是否显示优惠券
|
||||
showCoupon: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewHandle(item) {
|
||||
this.$emit('view', item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.nm-img-logo {
|
||||
display: block;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
.mark-img-nm{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 3;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0 25rpx 0 0;
|
||||
}
|
||||
.xdd-product-item {
|
||||
border-radius: 20rpx;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
.focus-img {
|
||||
position: relative;
|
||||
.img {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: block;
|
||||
width: 345rpx;
|
||||
height: 345rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.mark-img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 3;
|
||||
display: block;
|
||||
width: 84rpx;
|
||||
height: 74rpx;
|
||||
}
|
||||
}
|
||||
.info-wrap {
|
||||
padding: 12rpx;
|
||||
.name {
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333;
|
||||
}
|
||||
.desc {
|
||||
width: 320rpx;
|
||||
padding: 10rpx 0 0 0;
|
||||
color: #FFC543;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.coupon {
|
||||
display: flex;
|
||||
padding: 10rpx 0 0 0;
|
||||
.tag + .tag {
|
||||
margin: 0 0 0 -1rpx;
|
||||
}
|
||||
.tag {
|
||||
height: 32rpx;
|
||||
padding: 0 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid #C52733;
|
||||
color: #C52733;
|
||||
line-height: 32rpx;
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
.price-wrap {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
padding: 10rpx 0 0 0;
|
||||
.price {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
.price-txt {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.price-red {
|
||||
margin: 0 10rpx 0 0;
|
||||
color: #C52733;
|
||||
}
|
||||
.price-grey {
|
||||
color: #C4C4C4;
|
||||
}
|
||||
.btn {
|
||||
.img {
|
||||
display: block;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<view
|
||||
:style="{
|
||||
'background-image': 'url(' + webUrl + '/home/tabbar-bg.png);'
|
||||
}"
|
||||
class="xdd-tabbar-wrap"
|
||||
>
|
||||
<view class="center-img" id="quweiIcon" @click="switchTabFn('/pages/cloud/haveFun')">
|
||||
<image
|
||||
:src="webUrl + '/home/tabbar-center.png'"
|
||||
class="img"
|
||||
/>
|
||||
<view
|
||||
:class="currIndex === 4 ? 'curr' : ''"
|
||||
class="name"
|
||||
>寻趣味</view>
|
||||
</view>
|
||||
<view class="tabbar-list">
|
||||
<view
|
||||
v-for="(tabbarItem, tabbarIndex) in tabbar"
|
||||
:key="tabbarIndex"
|
||||
class="tabbar-item"
|
||||
>
|
||||
<view
|
||||
v-for="(item, index) in tabbarItem"
|
||||
:key="index"
|
||||
:class="currIndex === item.index ? 'curr' : ''"
|
||||
:id="'icon' + index"
|
||||
class="item"
|
||||
@click="gotoPage(item.url, item.type, item.index)"
|
||||
>
|
||||
<view class="img-wrap">
|
||||
<!-- 预加载两张图片,可以在点击切换的时候不闪屏 -->
|
||||
<image
|
||||
:src="item.onIcon"
|
||||
class="img on"
|
||||
/>
|
||||
<image
|
||||
:src="item.offIcon"
|
||||
class="img off"
|
||||
/>
|
||||
</view>
|
||||
<view class="name">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'XddTabbar',
|
||||
props: {
|
||||
currIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
tabbar: [[
|
||||
{
|
||||
name: '首页',
|
||||
onIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-01-on.png',
|
||||
offIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-01-off.png',
|
||||
url: '/pages/home/index',
|
||||
type: 1,
|
||||
index: 0
|
||||
},
|
||||
{
|
||||
name: '消息',
|
||||
onIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-02-on.png',
|
||||
offIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-02-off.png',
|
||||
url: '/pkg_common/views/roomLogs',
|
||||
type: 2,
|
||||
index: 1
|
||||
}
|
||||
],[
|
||||
{
|
||||
name: '购物车',
|
||||
onIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-03-on.png',
|
||||
offIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-03-off.png',
|
||||
url: '/pages/cart',
|
||||
type: 1,
|
||||
index: 2
|
||||
},
|
||||
{
|
||||
name: '我的',
|
||||
onIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-04-on.png',
|
||||
offIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-04-off.png',
|
||||
url: '/pages/user/User/index',
|
||||
type: 1,
|
||||
index: 3
|
||||
}
|
||||
]]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getElementData('#quweiIcon')
|
||||
this.getIconData('#icon1')
|
||||
},
|
||||
methods: {
|
||||
getElementData(el) {
|
||||
const query = uni.createSelectorQuery().in(this)
|
||||
query.select(el).boundingClientRect().exec((res)=> {
|
||||
if(res[0]) {
|
||||
this.$emit('getElementData', res[0])
|
||||
}
|
||||
})
|
||||
},
|
||||
getIconData(el) {
|
||||
const query = uni.createSelectorQuery().in(this)
|
||||
query.select(el).boundingClientRect().exec((res)=> {
|
||||
if(res[0]) {
|
||||
this.$emit('getIcon', res[0])
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 跳转至目标页面
|
||||
* type: 1-tabbar页面,2-非tabbar页面
|
||||
*/
|
||||
gotoPage(url, type = 1, index) {
|
||||
if (this.currIndex === index) return
|
||||
if (type === 1) {
|
||||
this.switchTabFn(url)
|
||||
}
|
||||
if (type === 2) {
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
},
|
||||
switchTabFn(url) {
|
||||
uni.switchTab({ url })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.xdd-tabbar-wrap {
|
||||
position: fixed;
|
||||
bottom: 21rpx;
|
||||
left: 21rpx;
|
||||
right: 21rpx;
|
||||
z-index: 99;
|
||||
height: 164rpx;
|
||||
background-size: 708rpx 164rpx;
|
||||
background-repeat: no-repeat;
|
||||
.center-img {
|
||||
position: absolute;
|
||||
top: -16rpx;
|
||||
left: 50%;
|
||||
z-index: 5;
|
||||
transform: translateX(-50%);
|
||||
.img {
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
}
|
||||
.name {
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #9a9a9a;
|
||||
transform: translateY(-4rpx);
|
||||
&.curr {
|
||||
color: #C52733;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tabbar-list {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 70rpx 0 0 0;
|
||||
.tabbar-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: calc(50% - 78rpx);
|
||||
.img-wrap {
|
||||
.img {
|
||||
display: block;
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin: 0 auto;
|
||||
&.on {
|
||||
display: none;
|
||||
}
|
||||
&.off {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
.name {
|
||||
padding: 10rpx 0 0 0;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #9a9a9a;
|
||||
}
|
||||
.item {
|
||||
width: 140rpx;
|
||||
&.curr {
|
||||
.name {
|
||||
color: #C52733;
|
||||
}
|
||||
.on {
|
||||
display: block;
|
||||
}
|
||||
.off {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -100,7 +100,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
input {
|
||||
display: none;
|
||||
}
|
||||
@@ -248,7 +248,7 @@
|
||||
background: #EBEBEB;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
z-index: 2;
|
||||
z-index: 999;
|
||||
flex-wrap: wrap;
|
||||
transition:all 0.2s ease-in 0.2s;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
const baseStr = 'edc_epro_prod:'
|
||||
const settings = {
|
||||
storage: {
|
||||
systemInfo: `${baseStr}systemInfo`,
|
||||
firstLaunch: `${baseStr}firstLaunch`,
|
||||
token: `${baseStr}token`,
|
||||
userInfo: `${baseStr}userInfo`,
|
||||
webInfo: `${baseStr}webInfo`
|
||||
},
|
||||
/* 拦截器超时时长 */
|
||||
timeout: 120 * 1000,
|
||||
/* 系统接口前缀,没有统一的填空字符串 */
|
||||
sysPrefix: '/',
|
||||
/* 是否收集错误日志 */
|
||||
collectRequestError: false
|
||||
}
|
||||
|
||||
export default settings
|
||||
+10
-10
@@ -1,11 +1,3 @@
|
||||
// export const VUE_APP_API_URL = "https://shop.xdd618.com/api";
|
||||
// export const VUE_APP_API_URL = "https://www.xdd618.com/api";
|
||||
|
||||
// export const SERVICE_API_URL = "https://service-test.xdd618.com/api";
|
||||
// export const SERVICE_API_URL = "https://service.xdd618.com/api";
|
||||
|
||||
// export const SOCKET_URL = "wss://service-test.xdd618.com/ws";
|
||||
// export const SOCKET_URL = "wss://service.xdd618.com/ws";
|
||||
const NODE_ENV = process.env.VUE_APP_ENV || 'development'
|
||||
let BASE_URL = ''
|
||||
let SERVICE_URL = ''
|
||||
@@ -14,11 +6,17 @@ if (NODE_ENV === 'development' || NODE_ENV === 'test') {
|
||||
BASE_URL = 'https://shop.xdd618.com/api'
|
||||
SERVICE_URL = 'https://service-test.xdd618.com/api'
|
||||
SERVICE_WS_URL = 'wss://service-test.xdd618.com/ws'
|
||||
wx.setEnableDebug({
|
||||
enableDebug: false
|
||||
})
|
||||
}
|
||||
if (NODE_ENV === 'prod') {
|
||||
BASE_URL = 'https://www.xdd618.com/api'
|
||||
BASE_URL = 'https://wxapp.xdd618.com/api'
|
||||
SERVICE_URL = 'https://service.xdd618.com/api'
|
||||
SERVICE_WS_URL = 'wss://service.xdd618.com/ws'
|
||||
wx.setEnableDebug({
|
||||
enableDebug: false
|
||||
})
|
||||
}
|
||||
|
||||
export const VUE_APP_API_URL = BASE_URL
|
||||
@@ -26,7 +24,9 @@ export const SERVICE_API_URL = SERVICE_URL
|
||||
export const SOCKET_URL = SERVICE_WS_URL
|
||||
|
||||
|
||||
export const VUE_APP_RESOURCES_URL = "https://www.xdd618.com/api/file/pic";
|
||||
export const VUE_APP_RESOURCES_URL = "https://wxapp.xdd618.com/api/file/pic"
|
||||
export const STATIC_RESOURCE_URL = "https://resource.xdd618.com/image"
|
||||
|
||||
export const WX_LIVE_APPID = "wx2b03c6e691cd7370";
|
||||
|
||||
export const pageViewDataCacheKey = 'pageViewDataCacheKey'
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import { getPageViewDataToLocalCache } from '@/utils/util'
|
||||
|
||||
export const pageToWatchData = Object.assign({
|
||||
'appIndex': []
|
||||
}, getPageViewDataToLocalCache())
|
||||
+22
-17
@@ -49,25 +49,30 @@ export function takeOrderHandle(orderId) {
|
||||
|
||||
export function delOrderHandle(orderId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
dialog.confirm({
|
||||
mes: "确认删除该订单?",
|
||||
opts() {
|
||||
delOrder(orderId)
|
||||
.then(res => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除该订单?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
delOrder(orderId).then(res => {
|
||||
uni.showToast({
|
||||
title: '删除成功', icon: 'success', duration: 2000
|
||||
});
|
||||
resolve(res);
|
||||
title: '删除成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
resolve(res)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '删除失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
reject(err)
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: '删除失败', icon: 'none', duration: 2000
|
||||
});
|
||||
reject(err);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export function payOrderHandle(orderId, type, from) {
|
||||
|
||||
@@ -15,8 +15,11 @@ import {
|
||||
WX_LIVE_APPID
|
||||
} from "@/config";
|
||||
import uView from "uview-ui";
|
||||
import GooSkeleton from '@/components/GooSkeleton/index.vue'
|
||||
import { pageToWatchData } from '@/config/page'
|
||||
|
||||
Vue.use(uView);
|
||||
Vue.use(uView)
|
||||
Vue.component('GooSkeleton', GooSkeleton)
|
||||
Vue.mixin(mixin)
|
||||
|
||||
// 注册全局组件
|
||||
@@ -30,7 +33,8 @@ Vue.prototype.$VUE_APP_RESOURCES_URL = VUE_APP_RESOURCES_URL
|
||||
Vue.prototype.$STATIC_RESOURCE_URL = STATIC_RESOURCE_URL
|
||||
Vue.prototype.$VUE_APP_API_URL = VUE_APP_API_URL
|
||||
Vue.prototype.$WX_LIVE_APPID = WX_LIVE_APPID
|
||||
Vue.prototype.$global = global;
|
||||
Vue.prototype.$global = global
|
||||
Vue.prototype.$pageToWatchData = pageToWatchData
|
||||
|
||||
Vue.prototype.$validator = function (rule) {
|
||||
return new schema(rule);
|
||||
@@ -42,31 +46,44 @@ Vue.prototype.$validator = function (rule) {
|
||||
// cookie.clearAll();
|
||||
// cookie.set(CACHE_KEY, 1);
|
||||
// }
|
||||
//强制转为几位小数,不足的补0
|
||||
var forceToDecimal = function changeToDecimal(x, len, ignore = false) {
|
||||
var f_x = parseFloat(x);
|
||||
// 强制转为几位小数,不足的补0
|
||||
const forceToDecimal = function changeToDecimal(value, len = 1) {
|
||||
const f_x = parseFloat(value)
|
||||
if (isNaN(f_x)) {
|
||||
return 0;
|
||||
return 0
|
||||
}
|
||||
var f = Math.round(f_x * 100) / 100;
|
||||
if (ignore) {
|
||||
f = Math.floor(f_x * 100) / 100;
|
||||
}
|
||||
var s = f.toString();
|
||||
var rs = s.indexOf('.');
|
||||
let s = f_x.toString()
|
||||
let rs = s.indexOf('.')
|
||||
if (rs < 0) {
|
||||
rs = s.length;
|
||||
s += '.';
|
||||
rs = s.length
|
||||
s += '.'
|
||||
}
|
||||
while (s.length <= rs + len) {
|
||||
s += '0';
|
||||
s += '0'
|
||||
}
|
||||
return s;
|
||||
const tempArr = s.split('.')
|
||||
const decimalArr = tempArr[1].split('')
|
||||
let res = tempArr[0] + '.'
|
||||
for (let i = 0; i < len; i++) {
|
||||
res += decimalArr[i]
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
//强制转为2位小数,不足的补0
|
||||
var force2Decimal = function change2Decimal(x, ignore = false) {
|
||||
return forceToDecimal(x, 2, false);
|
||||
// 强制转为2位小数,不足的补0
|
||||
const force2Decimal = function change2Decimal(value) {
|
||||
return forceToDecimal(value, 2)
|
||||
}
|
||||
|
||||
const toast = (title = '', position = 'center', success = function() {}) => {
|
||||
uni.showToast({
|
||||
title,
|
||||
mask: false,
|
||||
icon: 'none',
|
||||
duration: 2500,
|
||||
position,
|
||||
success
|
||||
})
|
||||
}
|
||||
|
||||
Vue.prototype.$force2Decimal = force2Decimal
|
||||
@@ -75,7 +92,9 @@ Vue.prototype.$forceToDecimal = forceToDecimal
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
Vue.prototype.$store = store
|
||||
Vue.prototype.$dialog = dialog;
|
||||
Vue.prototype.$dialog = dialog
|
||||
|
||||
Vue.prototype.$toast = toast
|
||||
|
||||
|
||||
const app = new Vue(App)
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
import { queryUserGuide, setUserGuide } from '@/api/user'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
scrollView: '',
|
||||
functionGuideData: {
|
||||
step: 0,
|
||||
tips: '',
|
||||
tipsPosition: '',
|
||||
btnGroupPosition: '',
|
||||
position: {}
|
||||
},
|
||||
screenWidth: 0,
|
||||
scrollLeft: 0,
|
||||
totalWidth: 0,
|
||||
scrollViewWidth: 0,
|
||||
imgs: [],
|
||||
_step: 0
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// this.setGuide('countyFamousIndex', 0)
|
||||
// this.setGuide('landmarkGoodsIndex', 0)
|
||||
// this.setGuide('findFunIndex', 0)
|
||||
// this.setGuide('wellnessFoodIndex', 0)
|
||||
// this.setGuide('ichIndex', 0)
|
||||
// this.setGuide('wenwanIndex', 0)
|
||||
// this.setGuide('goodsIndex', 0)
|
||||
// this.setGuide('index', 0)
|
||||
},
|
||||
methods: {
|
||||
setGuide(type, status = 1) {
|
||||
const params = {
|
||||
guideName: type,
|
||||
guideStatus: status
|
||||
}
|
||||
setUserGuide(params).then(res => {
|
||||
if(type === 'index') {
|
||||
this.queryGuide(type)
|
||||
}
|
||||
})
|
||||
},
|
||||
queryGuide(type) {
|
||||
const params = {
|
||||
guideName: type
|
||||
}
|
||||
queryUserGuide(params).then(res => {
|
||||
const { data, success } = res
|
||||
if(success && data.guideStatus === 0) {
|
||||
this.$refs.FunctionGuide.init()
|
||||
}
|
||||
if(type === 'index' && data.guideStatus === 1) {
|
||||
this.isOldUser = true
|
||||
}
|
||||
if(type === 'index' && data.guideStatus === 0) {
|
||||
this.isOldUser = false
|
||||
}
|
||||
})
|
||||
},
|
||||
setFunctionGuideData(data) {
|
||||
this.functionGuideData = {
|
||||
...this.functionGuideData,
|
||||
...data
|
||||
}
|
||||
this.showFunctionGuide()
|
||||
},
|
||||
getElementData(el, cb) {
|
||||
const query = uni.createSelectorQuery().in(this)
|
||||
query.select(el).boundingClientRect().exec((res)=> {
|
||||
console.log(res, 'getElementData');
|
||||
if(res[0]) {
|
||||
cb(res[0])
|
||||
} else {
|
||||
this.$refs.FunctionGuide.show = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,385 @@
|
||||
import {
|
||||
getCartCount,
|
||||
getProductCode,
|
||||
getProductDetail,
|
||||
postCartAdd,
|
||||
getProductSkuBySelected
|
||||
} from '@/api/store'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isWenwan: 0,
|
||||
qualifications: [],
|
||||
source: '',
|
||||
isOpen: false,
|
||||
attrTxt: '',
|
||||
attrValue: '',
|
||||
id: null,
|
||||
productValueArr: [],
|
||||
attr: {
|
||||
cartAttr: false,
|
||||
cart_num: 1,
|
||||
defaultSku: [],
|
||||
defaultSkuIndex: [],
|
||||
productAttr: [],
|
||||
productSelect: {
|
||||
cart_num: 1,
|
||||
earnPoints: 0,
|
||||
image: '',
|
||||
otPrice: 0,
|
||||
price: 0,
|
||||
stock: 0,
|
||||
store_name: '',
|
||||
unique: ''
|
||||
}
|
||||
},
|
||||
cart_num: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getSkuActiveStatus(selectedSku) {
|
||||
getProductSkuBySelected({ id: this.id, selectedSku }).then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
for (const key in data) {
|
||||
if (data[key]) {
|
||||
this.attr.productAttr.map(item => {
|
||||
if (item.attrName === key) {
|
||||
item.attrValue.map(subItem => {
|
||||
data[key].map(dataItem => {
|
||||
if (dataItem.sku === subItem.attr) {
|
||||
subItem.canUsed = dataItem.canUsed
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log(this.$refs);
|
||||
this.$refs.attrWindow.reRender(this.attr)
|
||||
}
|
||||
})
|
||||
},
|
||||
productCon() {
|
||||
getProductDetail(this.id).then(res => {
|
||||
const { data } = res
|
||||
this.storeInfo = {...data.storeInfo}
|
||||
if(data.storeInfo.stock === 0) {
|
||||
uni.showToast({
|
||||
title: "产品库存不足,请选择其他商品",
|
||||
icon: "none",
|
||||
duration: 5000
|
||||
})
|
||||
return
|
||||
}
|
||||
this.isWenwan = data.isWenwan
|
||||
this.qualifications = data.qualifications || []
|
||||
// 给 attr 赋值,将请求回来的规格赋值给 attr
|
||||
if (this.source !== 'pre' && this.source !== 'day' && this.source !== 'kill' && this.source !== 'spe') {
|
||||
// this.$set(this.attr, 'productAttr', data.productAttr)
|
||||
this.attr.productAttr = data.productAttr || []
|
||||
this.productValueArr = []
|
||||
for (const key in data.productValue) {
|
||||
this.productValueArr.push({
|
||||
attrItemkey: key,
|
||||
...data.productValue[key]
|
||||
})
|
||||
}
|
||||
// 初始化认为所有的规格都是可以选的
|
||||
this.attr.productAttr.map(item => {
|
||||
item.attrValue.map(subItem => {
|
||||
subItem.canUsed = true
|
||||
})
|
||||
})
|
||||
}
|
||||
this.attr.defaultSku = data.defaultSku
|
||||
this.attr.defaultSkuIndex = data.defaultSkuIndex
|
||||
this.DefaultSelect()
|
||||
// 是否单一规格
|
||||
const onlyOne = Object.keys(data.productValue).length === 1
|
||||
|
||||
if(onlyOne) {
|
||||
this.handleOk()
|
||||
return
|
||||
}
|
||||
this.attr.cartAttr = !this.isOpen ? true : false
|
||||
})
|
||||
},
|
||||
getAttrItemData(attr) {
|
||||
let result = {}
|
||||
this.productValueArr.map(item => {
|
||||
if (item.attrItemkey === attr) {
|
||||
result = item
|
||||
}
|
||||
})
|
||||
return result
|
||||
},
|
||||
// 默认选中属性
|
||||
DefaultSelect() {
|
||||
const productAttr = this.attr.productAttr
|
||||
const productAttrLength = productAttr.length
|
||||
this.attr.productAttr.map((item, index) => {
|
||||
item.attrValue.map((subItem, subIndex) => {
|
||||
if (this.attr.defaultSkuIndex[index] === subIndex) {
|
||||
subItem.check = true
|
||||
} else {
|
||||
subItem.check = false
|
||||
}
|
||||
})
|
||||
})
|
||||
const skuKey = (this.attr.defaultSku || []).join(',')
|
||||
if (!skuKey) {
|
||||
return
|
||||
}
|
||||
const productSelect = this.getAttrItemData(skuKey)
|
||||
this.attrValue = skuKey
|
||||
this.attrTxt = '已选择'
|
||||
if (productSelect && productAttrLength) {
|
||||
// this.$set(
|
||||
// this.attr.productSelect,
|
||||
// 'store_name',
|
||||
// this.storeInfo.storeName
|
||||
// )
|
||||
// this.$set(this.attr.productSelect, 'image', productSelect.image)
|
||||
// this.$set(this.attr.productSelect, 'price', productSelect.price)
|
||||
// this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
|
||||
// this.$set(this.attr.productSelect, 'stock', productSelect.stock)
|
||||
// this.$set(this.attr.productSelect, 'unique', productSelect.unique)
|
||||
// this.$set(this.attr.productSelect, 'earnPoints', productSelect.earnPoints)
|
||||
// this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
// this.$set(this, 'attrValue', value.sort().join(',')) // 作废
|
||||
// this.$set(this, 'attrValue', skuKey)
|
||||
// this.$set(this, 'attrTxt', '已选择')
|
||||
this.attr.productSelect = {
|
||||
image: productSelect.image,
|
||||
price: productSelect.price,
|
||||
otPrice: productSelect.otPrice,
|
||||
stock: productSelect.stock,
|
||||
earnPoints: productSelect.earnPoints,
|
||||
unique: productSelect.unique,
|
||||
store_name: this.storeInfo.storeName,
|
||||
cart_num: 1
|
||||
}
|
||||
|
||||
this.getSkuActiveStatus(skuKey)
|
||||
} else if (!productSelect && productAttrLength) {
|
||||
// this.$set(
|
||||
// this.attr.productSelect,
|
||||
// 'store_name',
|
||||
// this.storeInfo.storeName
|
||||
// )
|
||||
// this.$set(this.attr.productSelect, 'image', this.storeInfo.image)
|
||||
// this.$set(this.attr.productSelect, 'price', this.storeInfo.price)
|
||||
// this.$set(this.attr.productSelect, 'otPrice', this.storeInfo.otPrice)
|
||||
// this.$set(this.attr.productSelect, 'stock', 0)
|
||||
// this.$set(this.attr.productSelect, 'earnPoints', 0)
|
||||
// this.$set(this.attr.productSelect, 'unique', '')
|
||||
// this.$set(this.attr.productSelect, 'cart_num', 0)
|
||||
// this.$set(this, 'attrValue', '')
|
||||
// this.$set(this, 'attrTxt', '请选择')
|
||||
this.attr.productSelect = {
|
||||
image: this.storeInfo.image,
|
||||
price: this.storeInfo.price,
|
||||
otPrice: this.storeInfo.otPrice,
|
||||
stock: 0,
|
||||
earnPoints: 0,
|
||||
unique: '',
|
||||
store_name: this.storeInfo.storeName,
|
||||
cart_num: 1
|
||||
}
|
||||
} else if (!productSelect && !productAttrLength) {
|
||||
// this.$set(
|
||||
// this.attr.productSelect,
|
||||
// 'store_name',
|
||||
// this.storeInfo.storeName
|
||||
// )
|
||||
// this.$set(this.attr.productSelect, 'image', this.storeInfo.image)
|
||||
// this.$set(this.attr.productSelect, 'price', this.storeInfo.price)
|
||||
// this.$set(this.attr.productSelect, 'otPrice', this.storeInfo.otPrice)
|
||||
// this.$set(this.attr.productSelect, 'stock', this.storeInfo.stock)
|
||||
// this.$set(this.attr.productSelect, 'earnPoints', 0)
|
||||
// this.$set(
|
||||
// this.attr.productSelect,
|
||||
// 'unique',
|
||||
// this.storeInfo.unique || ''
|
||||
// )
|
||||
// this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
this.attr.productSelect = {
|
||||
image: this.storeInfo.image,
|
||||
price: this.storeInfo.price,
|
||||
otPrice: this.storeInfo.otPrice,
|
||||
stock: this.storeInfo.stock,
|
||||
earnPoints: 0,
|
||||
unique: this.storeInfo.unique || '',
|
||||
store_name: this.storeInfo.storeName,
|
||||
cart_num: 1
|
||||
}
|
||||
// this.$set(this, 'attrValue', '')
|
||||
// this.$set(this, 'attrTxt', '请选择')
|
||||
}
|
||||
},
|
||||
// 点击加入购物车按钮
|
||||
addToCart(item, id = 'id') {
|
||||
console.log(item, 'addToCart --------- item');
|
||||
this.id = item[id]
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.productCon()
|
||||
})// if(this.attr.cartAttr && !this.isOpen){
|
||||
// return this.isOpen = true
|
||||
// }
|
||||
console.log(this.$refs.attrWindow, '--222--');
|
||||
|
||||
|
||||
},
|
||||
handleOk() {
|
||||
const productSelect = this.getAttrItemData(this.attrValue)
|
||||
// 如果有属性,没有选择,提示用户选择
|
||||
const hasNo = (this.attr.productAttr.length && productSelect === undefined && this.isOpen) || productSelect.stock === 0
|
||||
if (hasNo) {
|
||||
uni.showToast({
|
||||
title: "产品库存不足,请选择其他商品",
|
||||
icon: "none",
|
||||
duration: 5000
|
||||
})
|
||||
return
|
||||
}
|
||||
const q = {
|
||||
productId: this.id,
|
||||
cartNum: this.attr.productSelect.cart_num,
|
||||
new: 0,
|
||||
uniqueId: this.attr.productSelect !== undefined ? this.attr.productSelect.unique : ''
|
||||
}
|
||||
postCartAdd(q).then(res => {
|
||||
this.isOpen = false
|
||||
this.attr.cartAttr = false
|
||||
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
this.cart_num = 1
|
||||
uni.showToast({
|
||||
title: "添加购物车成功",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
})
|
||||
})
|
||||
},
|
||||
ChangeCartNum(changeValue) {
|
||||
// changeValue:是否 加|减
|
||||
// 获取当前变动属性
|
||||
const productSelect = this.getAttrItemData(this.attrValue)
|
||||
// 如果没有属性,赋值给商品默认库存
|
||||
if (productSelect === undefined && !this.attr.productAttr.length) {
|
||||
productSelect = this.attr.productSelect
|
||||
}
|
||||
// 无属性值即库存为0;不存在加减
|
||||
if (productSelect === undefined) return
|
||||
let stock = productSelect.stock || 0
|
||||
let num = this.attr.productSelect
|
||||
if (changeValue) {
|
||||
if(changeValue > 1) {
|
||||
num.cart_num = changeValue
|
||||
} else {
|
||||
num.cart_num++
|
||||
}
|
||||
if (num.cart_num > stock) {
|
||||
if(stock < 1) {
|
||||
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
this.$set(this, 'cart_num', 1)
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, 'cart_num', stock)
|
||||
this.$set(this, 'cart_num', stock)
|
||||
}
|
||||
} else {
|
||||
if (num.cart_num < 1) {
|
||||
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
this.$set(this, 'cart_num', 1)
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, 'cart_num', num.cart_num)
|
||||
// this.$set(this, 'cart_num', num.cart_num)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
num.cart_num--
|
||||
if (num.cart_num < 1) {
|
||||
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
this.$set(this, 'cart_num', 1)
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, 'cart_num', num.cart_num)
|
||||
this.$set(this, 'cart_num', num.cart_num)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 关闭属性
|
||||
changeattr(msg) {
|
||||
// 修改了规格
|
||||
this.attr.cartAttr = msg
|
||||
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
this.$forceUpdate()
|
||||
this.isOpen = false
|
||||
},
|
||||
// 打开属性插件
|
||||
selecAttrTap() {
|
||||
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
this.attr.cartAttr = true
|
||||
this.isOpen = true
|
||||
this.$forceUpdate()
|
||||
},
|
||||
ChangeAttr(res) {
|
||||
const { index, subIndex, value } = res
|
||||
// 修改了规格
|
||||
const productSelect = this.getAttrItemData(value)
|
||||
if (productSelect) {
|
||||
this.attr.productAttr[index].attrValue.map((subItem, subIdx) => {
|
||||
subItem.check= false
|
||||
if (subIndex === subIdx) {
|
||||
subItem.check = true
|
||||
}
|
||||
})
|
||||
this.$set(this.attr.productSelect, 'image', productSelect.image)
|
||||
this.$set(this.attr.productSelect, 'price', productSelect.price)
|
||||
this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
|
||||
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
|
||||
this.$set(this.attr.productSelect, 'unique', productSelect.unique)
|
||||
this.$set(this.attr.productSelect, 'earnPoints', productSelect.earnPoints)
|
||||
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
this.$set(this, 'attrValue', value)
|
||||
this.$set(this, 'attrTxt', '已选择')
|
||||
this.getSkuActiveStatus(value)
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, 'image', this.storeInfo.image)
|
||||
this.$set(this.attr.productSelect, 'price', this.storeInfo.price)
|
||||
this.$set(this.attr.productSelect, 'otPrice', this.storeInfo.otPrice)
|
||||
this.$set(this.attr.productSelect, 'stock', 0)
|
||||
this.$set(this.attr.productSelect, 'unique', '')
|
||||
this.$set(this.attr.productSelect, 'earnPoints', 0)
|
||||
this.$set(this.attr.productSelect, 'cart_num', 0)
|
||||
this.$set(this, 'attrValue', '')
|
||||
this.$set(this, 'attrTxt', '请选择')
|
||||
}
|
||||
},
|
||||
changeFun(opt) {
|
||||
if (typeof opt !== 'object') opt = {}
|
||||
let action = opt.action || ''
|
||||
let value = opt.value === undefined ? '' : opt.value
|
||||
this.cart_num = 1
|
||||
this[action] && this[action](value)
|
||||
},
|
||||
// queryCartCount (isAnima) {
|
||||
// const isLogin = this.isLogin
|
||||
// if (isLogin) {
|
||||
// getCartCount({
|
||||
// numType: 0
|
||||
// }).then(res => {
|
||||
// this.CartCount = res.data.count
|
||||
// //加入购物车后重置属性
|
||||
// if (isAnima) {
|
||||
// this.animated = true
|
||||
// setTimeout(function () {
|
||||
// this.animated = false
|
||||
// }, 500)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import {
|
||||
pageToWatchShowCount,
|
||||
pageToWatchShowTimer,
|
||||
getCurrDateTime,
|
||||
TimeDifference
|
||||
} from '@/utils/util'
|
||||
export const pageListenMixins = {
|
||||
data(){
|
||||
return {
|
||||
pageViewDateTime: ''
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.pageViewDateTime = getCurrDateTime()
|
||||
this.pageToWatchShowCount(this.pageKeyId)
|
||||
this.videoContext = uni.createVideoContext('indexVideo', this);
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
this.pageToHideHandle()
|
||||
},
|
||||
methods: {
|
||||
pageToWatchShowCount,
|
||||
pageToWatchShowTimer,
|
||||
pageToHideHandle() {
|
||||
const visitTime = TimeDifference(this.pageViewDateTime, getCurrDateTime())
|
||||
if (visitTime > 0) {
|
||||
this.pageToWatchShowTimer(this.pageKeyId, {
|
||||
statsName: this.pageKeyId,
|
||||
statsTime: this.pageViewDateTime,
|
||||
visitTime
|
||||
})
|
||||
}
|
||||
this.pageViewDateTime = ''
|
||||
console.log('清除页面监听-----%s', this.pageKeyId)
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+17700
File diff suppressed because it is too large
Load Diff
+145
-145
@@ -1,148 +1,148 @@
|
||||
{
|
||||
"name": "xdd_mp",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"name": "xdd_mp",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "npm run dev:h5",
|
||||
"build": "npm run build:h5",
|
||||
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
|
||||
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
|
||||
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
|
||||
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
|
||||
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
|
||||
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
|
||||
"build:mp-jd": "cross-env NODE_ENV=production UNI_PLATFORM=mp-jd vue-cli-service uni-build",
|
||||
"build:mp-kuaishou": "cross-env NODE_ENV=production UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build",
|
||||
"build:mp-lark": "cross-env NODE_ENV=production UNI_PLATFORM=mp-lark vue-cli-service uni-build",
|
||||
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
|
||||
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
|
||||
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
|
||||
"build:mp-xhs": "cross-env NODE_ENV=production UNI_PLATFORM=mp-xhs vue-cli-service uni-build",
|
||||
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
|
||||
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
|
||||
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
|
||||
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
|
||||
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
|
||||
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
|
||||
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
|
||||
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
|
||||
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
|
||||
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
|
||||
"dev:mp-jd": "cross-env NODE_ENV=development UNI_PLATFORM=mp-jd vue-cli-service uni-build --watch",
|
||||
"dev:mp-kuaishou": "cross-env NODE_ENV=development UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build --watch",
|
||||
"dev:mp-lark": "cross-env NODE_ENV=development UNI_PLATFORM=mp-lark vue-cli-service uni-build --watch",
|
||||
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
|
||||
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
|
||||
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
|
||||
"dev:mp-xhs": "cross-env NODE_ENV=development UNI_PLATFORM=mp-xhs vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch",
|
||||
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
|
||||
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
|
||||
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
|
||||
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
|
||||
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
|
||||
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
|
||||
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dcloudio/uni-app": "^2.0.2-3090920231225001",
|
||||
"@dcloudio/uni-app-plus": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-h5": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-helper-json": "*",
|
||||
"@dcloudio/uni-i18n": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-360": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-alipay": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-baidu": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-jd": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-kuaishou": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-lark": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-qq": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-toutiao": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-vue": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-weixin": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-xhs": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-quickapp-native": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-quickapp-webview": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-stacktracey": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-stat": "^2.0.1-35320220729002",
|
||||
"@vue/composition-api": "^1.7.2",
|
||||
"@vue/shared": "^3.0.0",
|
||||
"animate.css": "^3.7.2",
|
||||
"async-validator": "^3.2.4",
|
||||
"core-js": "^3.6.5",
|
||||
"dayjs": "^1.11.2",
|
||||
"flyio": "^0.6.2",
|
||||
"jweixin-module": "^1.6.0",
|
||||
"miniapp-color-thief": "^1.0.5",
|
||||
"number-precision": "^1.5.2",
|
||||
"regenerator-runtime": "^0.12.1",
|
||||
"uview-ui": "2.0.36",
|
||||
"vconsole": "^3.14.6",
|
||||
"vue": "^2.6.11",
|
||||
"vue-ydui": "^1.2.6",
|
||||
"vuex": "^3.2.0",
|
||||
"wechat-jssdk": "^5.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/runtime": "~7.17.9",
|
||||
"@dcloudio/types": "^3.0.4",
|
||||
"@dcloudio/uni-automator": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-cli-i18n": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-cli-shared": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-migration": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-template-compiler": "^2.0.1-35320220729002",
|
||||
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.1-35320220729002",
|
||||
"@dcloudio/vue-cli-plugin-uni": "^2.0.1-35320220729002",
|
||||
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.1-35320220729002",
|
||||
"@dcloudio/webpack-uni-mp-loader": "^2.0.1-35320220729002",
|
||||
"@dcloudio/webpack-uni-pages-loader": "^2.0.1-35320220729002",
|
||||
"@vue/cli-plugin-babel": "~4.5.19",
|
||||
"@vue/cli-service": "~4.5.19",
|
||||
"babel-plugin-import": "^1.11.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"jest": "^25.4.0",
|
||||
"less": "^4.1.0",
|
||||
"less-loader": "^4.1.0",
|
||||
"mini-types": "*",
|
||||
"miniprogram-api-typings": "*",
|
||||
"postcss-comment": "^2.0.0",
|
||||
"sass": "^1.5.0",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"browserslist": [
|
||||
"Android >= 4.4",
|
||||
"ios >= 9"
|
||||
],
|
||||
"resolutions": {
|
||||
"@babel/runtime": "~7.17.9"
|
||||
},
|
||||
"uni-app": {
|
||||
"scripts": {
|
||||
"serve": "npm run dev:h5",
|
||||
"build": "npm run build:h5",
|
||||
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
|
||||
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
|
||||
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
|
||||
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
|
||||
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
|
||||
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
|
||||
"build:mp-jd": "cross-env NODE_ENV=production UNI_PLATFORM=mp-jd vue-cli-service uni-build",
|
||||
"build:mp-kuaishou": "cross-env NODE_ENV=production UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build",
|
||||
"build:mp-lark": "cross-env NODE_ENV=production UNI_PLATFORM=mp-lark vue-cli-service uni-build",
|
||||
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
|
||||
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
|
||||
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
|
||||
"build:mp-xhs": "cross-env NODE_ENV=production UNI_PLATFORM=mp-xhs vue-cli-service uni-build",
|
||||
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
|
||||
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
|
||||
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
|
||||
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
|
||||
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
|
||||
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
|
||||
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
|
||||
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
|
||||
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
|
||||
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
|
||||
"dev:mp-jd": "cross-env NODE_ENV=development UNI_PLATFORM=mp-jd vue-cli-service uni-build --watch",
|
||||
"dev:mp-kuaishou": "cross-env NODE_ENV=development UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build --watch",
|
||||
"dev:mp-lark": "cross-env NODE_ENV=development UNI_PLATFORM=mp-lark vue-cli-service uni-build --watch",
|
||||
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
|
||||
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
|
||||
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
|
||||
"dev:mp-xhs": "cross-env NODE_ENV=development UNI_PLATFORM=mp-xhs vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch",
|
||||
"dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch",
|
||||
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
|
||||
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
|
||||
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
|
||||
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
|
||||
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
|
||||
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
|
||||
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dcloudio/uni-app": "^2.0.2-3090920231225001",
|
||||
"@dcloudio/uni-app-plus": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-h5": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-helper-json": "*",
|
||||
"@dcloudio/uni-i18n": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-360": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-alipay": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-baidu": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-jd": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-kuaishou": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-lark": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-qq": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-toutiao": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-vue": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-weixin": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-mp-xhs": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-quickapp-native": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-quickapp-webview": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-stacktracey": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-stat": "^2.0.1-35320220729002",
|
||||
"@vue/composition-api": "^1.7.2",
|
||||
"@vue/shared": "^3.0.0",
|
||||
"animate.css": "^3.7.2",
|
||||
"async-validator": "^3.2.4",
|
||||
"core-js": "^3.6.5",
|
||||
"dayjs": "^1.11.2",
|
||||
"flyio": "^0.6.2",
|
||||
"jweixin-module": "^1.6.0",
|
||||
"miniapp-color-thief": "^1.0.5",
|
||||
"number-precision": "^1.5.2",
|
||||
"regenerator-runtime": "^0.12.1",
|
||||
"uview-ui": "2.0.36",
|
||||
"vconsole": "^3.14.6",
|
||||
"vue": "^2.6.11",
|
||||
"vue-ydui": "^1.2.6",
|
||||
"vuex": "^3.2.0",
|
||||
"wechat-jssdk": "^5.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/runtime": "~7.17.9",
|
||||
"@dcloudio/types": "^3.0.4",
|
||||
"@dcloudio/uni-automator": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-cli-i18n": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-cli-shared": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-migration": "^2.0.1-35320220729002",
|
||||
"@dcloudio/uni-template-compiler": "^2.0.1-35320220729002",
|
||||
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.1-35320220729002",
|
||||
"@dcloudio/vue-cli-plugin-uni": "^2.0.1-35320220729002",
|
||||
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.1-35320220729002",
|
||||
"@dcloudio/webpack-uni-mp-loader": "^2.0.1-35320220729002",
|
||||
"@dcloudio/webpack-uni-pages-loader": "^2.0.1-35320220729002",
|
||||
"@vue/cli-plugin-babel": "~4.5.19",
|
||||
"@vue/cli-service": "~4.5.19",
|
||||
"babel-plugin-import": "^1.11.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"jest": "^25.4.0",
|
||||
"less": "^4.1.0",
|
||||
"less-loader": "^4.1.0",
|
||||
"mini-types": "*",
|
||||
"miniprogram-api-typings": "*",
|
||||
"postcss-comment": "^2.0.0",
|
||||
"sass": "^1.5.0",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"browserslist": [
|
||||
"Android >= 4.4",
|
||||
"ios >= 9"
|
||||
],
|
||||
"resolutions": {
|
||||
"@babel/runtime": "~7.17.9"
|
||||
},
|
||||
"uni-app": {
|
||||
"scripts": {
|
||||
"mp-weixin-test": {
|
||||
"title": "微信小程序(Test环境)",
|
||||
"env": {
|
||||
"UNI_PLATFORM": "mp-weixin",
|
||||
"VUE_APP_ENV": "test",
|
||||
"UNI_OUTPUT_DIR": "dist"
|
||||
},
|
||||
"define": {
|
||||
"CUSTOM-CONST": true
|
||||
}
|
||||
},
|
||||
"mp-weixin": {
|
||||
"title": "微信小程序(生产环境)",
|
||||
"env": {
|
||||
"UNI_PLATFORM": "mp-weixin",
|
||||
"VUE_APP_ENV": "prod",
|
||||
"UNI_OUTPUT_DIR": "dist"
|
||||
},
|
||||
"define": {
|
||||
"CUSTOM-CONST": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"mp-weixin-test": {
|
||||
"title": "微信小程序(Test环境)",
|
||||
"env": {
|
||||
"UNI_PLATFORM": "mp-weixin",
|
||||
"VUE_APP_ENV": "test",
|
||||
"UNI_OUTPUT_DIR": "dist"
|
||||
},
|
||||
"define": {
|
||||
"CUSTOM-CONST": true
|
||||
}
|
||||
},
|
||||
"mp-weixin": {
|
||||
"title": "微信小程序(生产环境)",
|
||||
"env": {
|
||||
"UNI_PLATFORM": "mp-weixin",
|
||||
"VUE_APP_ENV": "prod",
|
||||
"UNI_OUTPUT_DIR": "dist"
|
||||
},
|
||||
"define": {
|
||||
"CUSTOM-CONST": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+215
-121
@@ -39,7 +39,20 @@
|
||||
{
|
||||
"path": "pages/home/landMark",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地标好物"
|
||||
"navigationBarTitleText": "寻地标好物"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/searchPage",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/newZone",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新品专区",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -58,7 +71,7 @@
|
||||
{
|
||||
"path": "pages/shop/GoodSearch/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索商品"
|
||||
"navigationBarTitleText": "搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -78,7 +91,7 @@
|
||||
{
|
||||
"path": "pages/shop/GoodsList/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品列表"
|
||||
"navigationBarTitleText": "搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -90,7 +103,15 @@
|
||||
{
|
||||
"path": "pages/cloud/haveFun",
|
||||
"style": {
|
||||
"navigationBarTitleText": "寻趣味"
|
||||
"navigationBarTitleText": "趣游生活"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/town/index",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "趣游生活"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -139,6 +160,13 @@
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/shop/GoodsCon/qualifications",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家资质",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/address/AddAddress/index",
|
||||
"style": {
|
||||
@@ -201,6 +229,14 @@
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/History/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品足迹",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/UserBill/index",
|
||||
"style": {
|
||||
@@ -287,96 +323,6 @@
|
||||
"navigationBarTitleText": "退货列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/orderAdmin/OrderIndex/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家订单统计"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/orderAdmin/AdminOrderList/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/orderAdmin/GoodsDeliver/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发货"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/orderAdmin/AdminOrder/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家订单列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/orderAdmin/Statistics/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家统计数据"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/orderAdmin/OrderCancellation/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家取消订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/Poster/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "推广海报"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/DargainDetails/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "帮砍价"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/GoodsBargain/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/BargainRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "砍价记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/GoodsGroup/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "团购商品列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/GroupDetails/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "团购商品详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/GroupRule/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "团购规则"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/GoodsSeckill/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "秒杀"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/activity/SeckillDetails/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "秒杀详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/map/index",
|
||||
"style": {
|
||||
@@ -448,6 +394,12 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的喜欢"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/Points/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
@@ -461,6 +413,13 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "inn/farmerStore",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "inn/innGoodList",
|
||||
"style": {
|
||||
@@ -609,13 +568,56 @@
|
||||
{
|
||||
"path": "views/healthList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "康养 · 食材"
|
||||
"navigationBarTitleText": "选择城市",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/expoList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "康养旅居",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/expoDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "文化艺术",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/healthSanctum",
|
||||
"style": {
|
||||
"navigationBarTitleText": "康养旅居",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/healthFoods",
|
||||
"style": {
|
||||
"navigationBarTitleText": "康养旅居",
|
||||
"navigationBarBackgroundColor": "#FAEED8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/healthFoodDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "康养旅居",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/healthSearch",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/heritage",
|
||||
"style": {
|
||||
"navigationBarTitleText": "非遗文化"
|
||||
"navigationBarTitleText": "非遗文创"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -624,12 +626,32 @@
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/heritage/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "非遗文创",
|
||||
"navigationBarBackgroundColor": "#FAEED8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/heritage/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "非遗文创",
|
||||
"navigationBarBackgroundColor": "#FAEED8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/heritageVideo",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/heritageGoodAndVideo",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/homestay",
|
||||
"style": {
|
||||
@@ -652,7 +674,47 @@
|
||||
{
|
||||
"path": "views/famousList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "千县名品"
|
||||
"navigationBarTitleText": "寻千县万村"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/famousQianxian",
|
||||
"style": {
|
||||
"navigationBarTitleText": "寻千县万村"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/famousQianxianShop",
|
||||
"style": {
|
||||
"navigationBarTitleText": "寻千县万村",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/famousQianxianTheme",
|
||||
"style": {
|
||||
"navigationBarTitleText": "寻千县万村",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/famousQianxianVillageShop",
|
||||
"style": {
|
||||
"navigationBarTitleText": "寻千县万村",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/sojoumStore",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/famousQianxianInvestment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "招商政策"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -689,8 +751,8 @@
|
||||
"path": "views/nativeList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "特产",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#FF564A"
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -710,6 +772,24 @@
|
||||
{
|
||||
"root": "pkg_user",
|
||||
"pages": [
|
||||
{
|
||||
"path": "views/giftList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的礼品卡"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/gift/gift",
|
||||
"style": {
|
||||
"navigationBarTitleText": "送礼包"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/gift/receive",
|
||||
"style": {
|
||||
"navigationBarTitleText": "好友赠送的礼包"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/myFavorite",
|
||||
"style": {
|
||||
@@ -769,6 +849,27 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "aiChat",
|
||||
"pages": [
|
||||
{
|
||||
"path": "views/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "云灵AI智能助手",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/history",
|
||||
"style": {
|
||||
"navigationBarTitleText": "云灵AI智能助手",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "v4",
|
||||
"pages": [
|
||||
@@ -856,14 +957,6 @@
|
||||
"navigationBarTitleText": "文玩"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/store",
|
||||
"style": {
|
||||
"navigationBarTitleText": "文玩店铺详情",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/storeList",
|
||||
"style": {
|
||||
@@ -883,38 +976,39 @@
|
||||
},
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "地标文化特产",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#8B8F99",
|
||||
"custom": true,
|
||||
"selectedColor": "#FF564A",
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/home/index",
|
||||
"iconPath": "static/tabbar/icon-home.png",
|
||||
"selectedIconPath": "static/tabbar/icon-home-hot.png",
|
||||
"iconPath": "/static/images/tabbar/tabbar-01-on.png",
|
||||
"selectedIconPath": "/static/images/tabbar/tabbar-01-on.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/home/landMark",
|
||||
"iconPath": "static/tabbar/icon-land.png",
|
||||
"selectedIconPath": "static/tabbar/icon-land-hot.png",
|
||||
"text": "地标好物"
|
||||
"pagePath": "pages/cloud/haveFun",
|
||||
"iconPath": "/static/images/tabbar/tabbar-01-on.png",
|
||||
"selectedIconPath": "/static/images/tabbar/tabbar-01-on.png",
|
||||
"text": "寻趣味"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/cart",
|
||||
"iconPath": "static/tabbar/icon-cart.png",
|
||||
"selectedIconPath": "static/tabbar/icon-cart-hot.png",
|
||||
"iconPath": "/static/images/tabbar/tabbar-01-on.png",
|
||||
"selectedIconPath": "/static/images/tabbar/tabbar-01-on.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/User/index",
|
||||
"iconPath": "static/tabbar/icon-user.png",
|
||||
"selectedIconPath": "static/tabbar/icon-user-hot.png",
|
||||
"iconPath": "/static/images/tabbar/tabbar-01-on.png",
|
||||
"selectedIconPath": "/static/images/tabbar/tabbar-01-on.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
@@ -925,7 +1019,7 @@
|
||||
{
|
||||
"name": "商品详情",
|
||||
"path": "pages/shop/GoodsCon/index",
|
||||
"query": "id=277"
|
||||
"query": "id=588"
|
||||
},
|
||||
{
|
||||
"name": "店铺详情",
|
||||
@@ -963,8 +1057,8 @@
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"name": "特色礼品",
|
||||
"path": "pkg_product/views/giftList",
|
||||
"name": "搜索",
|
||||
"path": "pages/shop/GoodsList/index",
|
||||
"query": ""
|
||||
}
|
||||
]
|
||||
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
// this.videoContext = uni.createVideoContext('myVideo');
|
||||
// this.videoContext.requestFullScreen();
|
||||
|
||||
this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl='+video.video);
|
||||
this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl='+video.video + '&id=' + video.id);
|
||||
},
|
||||
liveClick:function(video){
|
||||
var liveAppId = this.$WX_LIVE_APPID;
|
||||
|
||||
@@ -4,27 +4,32 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
|
||||
components:{
|
||||
uniPopup
|
||||
uniPopup
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
curPlayVideoUrl:'',
|
||||
isVideoPopupShow:false
|
||||
curPlayVideoUrl:'',
|
||||
isVideoPopupShow:false,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onReady: function(res) {
|
||||
onReady(res) {
|
||||
this.videoContext = uni.createVideoContext('myVideo');
|
||||
this.videoContext.requestFullScreen();
|
||||
},
|
||||
onLoad:function(e){
|
||||
|
||||
this.curPlayVideoUrl = e.videoUrl;
|
||||
//this.$refs.popup.open();
|
||||
|
||||
onLoad(options) {
|
||||
if (!options.click) {
|
||||
uni.switchTab({ url: '/pages/home/index' })
|
||||
return
|
||||
}
|
||||
this.curPlayVideoUrl = options.videoUrl
|
||||
const id = options.id
|
||||
this.pageKeyId = `findVideo_videoId_${id}`
|
||||
},
|
||||
methods: {
|
||||
videoErrorCallback: function(e) {
|
||||
|
||||
@@ -32,71 +32,73 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getStoreVideoType, getArticleList} from "@/api/public";
|
||||
import {getVideoList} from "@/api/user";
|
||||
import {getStoreVideoType, getArticleList} from '@/api/public'
|
||||
import {getVideoList} from '@/api/user'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
typeList: [{"label": "全部", "value": ""}],
|
||||
type: "",
|
||||
typeList: [{'label': '全部', 'value': ''}],
|
||||
type: '',
|
||||
page: 1,
|
||||
limit: 10,
|
||||
keyword: "",
|
||||
keyword: '',
|
||||
list: [],
|
||||
isWait: false
|
||||
isWait: false,
|
||||
pageKeyId: Object.freeze('findVideoList')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getType();
|
||||
this.fetchList();
|
||||
onLoad(options) {
|
||||
if (!options.click) {
|
||||
uni.switchTab({ url: '/pages/home/index' })
|
||||
return
|
||||
}
|
||||
this.getType()
|
||||
this.fetchList()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.page++;
|
||||
this.fetchList();
|
||||
this.page++
|
||||
this.fetchList()
|
||||
},
|
||||
methods: {
|
||||
getType() {
|
||||
getStoreVideoType().then(({data}) => {
|
||||
if (data.length > 0) {
|
||||
data.forEach(item => {
|
||||
this.typeList.push(item);
|
||||
this.typeList.push(item)
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
changeType(item) {
|
||||
this.type = item.value;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.fetchList();
|
||||
this.type = item.value
|
||||
this.page = 1
|
||||
this.list = []
|
||||
this.fetchList()
|
||||
},
|
||||
|
||||
fetchList() {
|
||||
if (this.isWait) return;
|
||||
this.isWait = true;
|
||||
|
||||
let params = {
|
||||
if (this.isWait) return
|
||||
this.isWait = true
|
||||
const params = {
|
||||
type: this.type,
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
};
|
||||
|
||||
}
|
||||
getVideoList(params).then(res => {
|
||||
if (res.status === 200) {
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
res.data[i].hide = true;
|
||||
res.data[i].hide = true
|
||||
this.list.push(res.data[i])
|
||||
}
|
||||
}
|
||||
this.isWait = false;
|
||||
});
|
||||
this.isWait = false
|
||||
})
|
||||
},
|
||||
|
||||
goDetail(item) {
|
||||
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video);
|
||||
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id + '&click=1')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
<template>
|
||||
<view class="bargain-record" ref="container">
|
||||
<view class="item" v-for="(item, bargainrecordIndex) in bargain" :key="bargainrecordIndex">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="item.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-column-around">
|
||||
<view class="line1">{{ item.title }}</view>
|
||||
<count-down
|
||||
:isDay="true"
|
||||
:tipText="'倒计时 '"
|
||||
:dayText="' 天 '"
|
||||
:hourText="' 时 '"
|
||||
:minuteText="' 分 '"
|
||||
:secondText="' 秒'"
|
||||
:datatime="item.datatime"
|
||||
></count-down>
|
||||
<view class="money font-color-red">
|
||||
已砍至
|
||||
<text class="symbol">¥</text>
|
||||
<text class="num">{{ item.residuePrice }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom acea-row row-between-wrapper">
|
||||
<view class="purple" v-if="item.status === 1">活动进行中</view>
|
||||
<view class="success" v-else-if="item.status === 3">砍价成功</view>
|
||||
<view class="end" v-else>活动已结束</view>
|
||||
<view class="acea-row row-middle row-right">
|
||||
<view
|
||||
class="bnt cancel"
|
||||
v-if="item.status === 1"
|
||||
@click="getBargainUserCancel(item.bargainId)"
|
||||
>取消活动</view>
|
||||
<view
|
||||
class="bnt bg-color-red"
|
||||
v-if="item.status === 1"
|
||||
@click="goDetail(item.bargainId)"
|
||||
>继续砍价</view>
|
||||
<view class="bnt bg-color-red" v-else @click="goList">重开一个</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="status" :loading="loadingList"></Loading>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import CountDown from "@/components/CountDown";
|
||||
import { getBargainUserList, getBargainUserCancel } from "@/api/activity";
|
||||
import Loading from "@/components/Loading";
|
||||
|
||||
export default {
|
||||
name: "BargainRecord",
|
||||
components: {
|
||||
CountDown,
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
bargain: [],
|
||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
||||
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
|
||||
page: 1, //页码
|
||||
limit: 20 //数量
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
this.getBargainUserList();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loadingList && this.getBargainUserList();
|
||||
},
|
||||
methods: {
|
||||
goDetail: function(id) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/DargainDetails/index",
|
||||
query: { id, partake: 0 }
|
||||
});
|
||||
},
|
||||
goList: function() {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GoodsBargain/index"
|
||||
});
|
||||
},
|
||||
getBargainUserList: function() {
|
||||
var that = this;
|
||||
if (that.loadingList) return;
|
||||
if (that.status) return;
|
||||
getBargainUserList({ page: that.page, limit: that.limit })
|
||||
.then(res => {
|
||||
that.status = res.data.length < that.limit;
|
||||
that.bargain.push.apply(that.bargain, res.data);
|
||||
that.page++;
|
||||
that.loadingList = false;
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
getBargainUserCancel: function(bargainId) {
|
||||
var that = this;
|
||||
getBargainUserCancel({ bargainId: bargainId })
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
that.status = false;
|
||||
that.loadingList = false;
|
||||
that.page = 1;
|
||||
that.bargain = [];
|
||||
that.getBargainUserList();
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,617 +0,0 @@
|
||||
<template>
|
||||
<view class="bargain">
|
||||
<!-- 在header上加 on 为请求支援 -->
|
||||
<view :class="[bargainPartake != userInfo.uid ? 'header on' : 'header']">
|
||||
<view class="people">{{ lookCount }}人查看 丨 {{ shareCount }}人分享 丨 {{ userCount }}人参与</view>
|
||||
<!-- 帮助砍价、帮砍成功:-->
|
||||
<view class="pictxt acea-row row-center-wrapper" v-if="bargainPartake != userInfo.uid">
|
||||
<view class="pictrue">
|
||||
<image :src="bargainUserInfo.avatar" />
|
||||
</view>
|
||||
<view class="text">
|
||||
{{ bargainUserInfo.nickname }}
|
||||
<text>邀请您帮忙砍价</text>
|
||||
</view>
|
||||
</view>
|
||||
<count-down
|
||||
:isDay="true"
|
||||
:tipText="'倒计时 '"
|
||||
:dayText="' 天 '"
|
||||
:hourText="' 时 '"
|
||||
:minuteText="' 分 '"
|
||||
:secondText="' 秒'"
|
||||
:datatime="datatime"
|
||||
></count-down>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="pictxt acea-row row-between-wrapper" @click="openAlone">
|
||||
<view class="pictrue">
|
||||
<image :src="bargain.image" />
|
||||
<view class="bargain_view">
|
||||
查看商品
|
||||
<view class="iconfont icon-jiantou iconfonts"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text acea-row row-column-around">
|
||||
<view class="line2" v-text="bargain.title"></view>
|
||||
<view class="money font-color-red">
|
||||
已砍至: ¥
|
||||
<text class="num" v-text="price"></text>
|
||||
</view>
|
||||
<view class="acea-row row-middle">
|
||||
<view class="successNum" v-text="'原价' + bargain.price"></view>
|
||||
<view class="successNum" v-text="'已有' + bargainSumCount + '人砍价成功'"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-progress acea-row row-middle round margin-top">
|
||||
<view
|
||||
class="acea-row row-middle bg-red"
|
||||
:style="{ width: loading ? pricePercent + '%' : '' }"
|
||||
></view>
|
||||
</view>
|
||||
<view class="balance acea-row row-between-wrapper">
|
||||
<view v-text="'已砍' + alreadyPrice + '元'"></view>
|
||||
<view v-if="surplusPrice === 0">砍价成功</view>
|
||||
<view v-else v-text="'还剩' + surplusPrice + '元'"></view>
|
||||
</view>
|
||||
<!-- 帮助砍价、帮砍成功:-->
|
||||
<view
|
||||
class="bargainSuccess"
|
||||
v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading"
|
||||
>
|
||||
<span class="iconfont icon-xiaolian"></span>已成功帮助好友砍价
|
||||
</view>
|
||||
<!-- 砍价成功:-->
|
||||
<view
|
||||
class="bargainSuccess"
|
||||
v-if="
|
||||
surplusPrice === 0 &&
|
||||
bargainPartake === userInfo.uid &&
|
||||
userBargainStatus === 1 &&
|
||||
!helpListLoading
|
||||
"
|
||||
>
|
||||
<span class="iconfont icon-xiaolian"></span>恭喜您砍价成功,快去支付吧~
|
||||
</view>
|
||||
<view
|
||||
v-if="userBargainStatus == 0 && bargainPartake === userInfo.uid"
|
||||
class="bargainBnt"
|
||||
@click="goParticipate"
|
||||
>立即参与砍价</view>
|
||||
<view
|
||||
class="bargainBnt"
|
||||
@click="goPoster"
|
||||
v-if="
|
||||
surplusPrice > 0 &&
|
||||
bargainPartake === userInfo.uid &&
|
||||
userBargainStatus === 1 &&
|
||||
!helpListLoading
|
||||
"
|
||||
>邀请好友帮砍价</view>
|
||||
<view
|
||||
class="bargainBnt"
|
||||
@click="getBargainHelp"
|
||||
v-else-if="
|
||||
bargainPartake != userInfo.uid &&
|
||||
userBargainStatus == 1 &&
|
||||
statusUser &&
|
||||
!helpListLoading
|
||||
"
|
||||
>帮好友砍一刀</view>
|
||||
<view
|
||||
class="bargainBnt"
|
||||
@click="getBargainStart"
|
||||
v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading"
|
||||
>我也要参与</view>
|
||||
<view
|
||||
class="bargainBnt"
|
||||
@click="goPay"
|
||||
v-if="
|
||||
surplusPrice === 0 &&
|
||||
bargainPartake === userInfo.uid &&
|
||||
userBargainStatus === 1
|
||||
"
|
||||
>立即支付</view>
|
||||
<view class="bargainBnt on" @click="goList">抢更多商品</view>
|
||||
<view class="tip">
|
||||
已有
|
||||
<span class="font-color-red" v-text="helpCount"></span>
|
||||
位好友成功帮您砍价
|
||||
</view>
|
||||
<view class="lock"></view>
|
||||
</view>
|
||||
<view class="bargainGang">
|
||||
<view class="title font-color-red acea-row row-center-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
||||
</view>
|
||||
<view class="titleCon">砍价帮</view>
|
||||
<view class="pictrue on">
|
||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(item, bargainHelpListIndex) in bargainHelpList"
|
||||
:key="bargainHelpListIndex"
|
||||
>
|
||||
<view class="pictxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="item.avatar" />
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="name line1" v-text="item.nickname"></view>
|
||||
<view class="line1" v-text="item.add_time"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money font-color-red">
|
||||
<text class="iconfont icon-kanjia"></text>
|
||||
砍掉{{ item.price }}元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="load font-color-red"
|
||||
v-if="!helpListStatus && !helpListLoading"
|
||||
@click="getBargainHelpList"
|
||||
>点击加载更多</view>
|
||||
<view class="lock"></view>
|
||||
</view>
|
||||
<view class="goodsDetails">
|
||||
<view class="title font-color-red acea-row row-center-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
||||
</view>
|
||||
<view class="titleCon">商品详情</view>
|
||||
<view class="pictrue on">
|
||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="conter" v-html="bargain.description"></view>
|
||||
<view class="lock"></view>
|
||||
</view>
|
||||
<view class="goodsDetails">
|
||||
<view class="title font-color-red acea-row row-center-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
||||
</view>
|
||||
<view class="titleCon">活动规则</view>
|
||||
<view class="pictrue on">
|
||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="conter" v-html="bargain.rule"></view>
|
||||
</view>
|
||||
<view class="bargainTip" :class="active === true ? 'on' : ''">
|
||||
<!-- <view class="pictrue">
|
||||
<image src="@/static/images/bargainBg.jpg" />
|
||||
<view class="iconfont icon-guanbi" @click="close"></view>
|
||||
</view>-->
|
||||
<view class="cutOff" v-if="bargainPartake === userInfo.uid">
|
||||
您已砍掉
|
||||
<text class="font-color-red" v-text="bargainHelpPrice"></text>元,听说分享次数越多砍价成功的机会越大哦!
|
||||
</view>
|
||||
<view class="cutOff on" v-else>
|
||||
<view class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></view>,您也可以砍价低价拿哦,快去挑选心仪的商品吧~
|
||||
</view>
|
||||
<view class="tipBnt" @click="goPoster" v-if="bargainPartake === userInfo.uid">邀请好友帮砍价</view>
|
||||
<view class="tipBnt" @click="getBargainStart" v-else>我也要参与</view>
|
||||
</view>
|
||||
<view class="mask" @touchmove.prevent :hidden="active === false" @click="close"></view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import CountDown from "@/components/CountDown";
|
||||
import {
|
||||
getBargainDetail,
|
||||
getBargainShare,
|
||||
getBargainStart,
|
||||
getBargainHelp,
|
||||
getBargainHelpPrice,
|
||||
getBargainHelpList,
|
||||
getBargainHelpCount,
|
||||
getBargainStartUser
|
||||
} from "@/api/activity";
|
||||
import { postCartAdd } from "@/api/store";
|
||||
import { mapGetters } from "vuex";
|
||||
import {} from "@/libs/wechat";
|
||||
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index";
|
||||
|
||||
const NAME = "DargainDetails";
|
||||
|
||||
export default {
|
||||
name: "DargainDetails",
|
||||
components: {
|
||||
CountDown
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
price: 0,
|
||||
bargainId: 0, //砍价编号
|
||||
bargainPartake: 0, //参与砍价
|
||||
bargain: [], //砍价产品信息
|
||||
partake: null,
|
||||
bargainSumCount: 0, //砍价成功人数
|
||||
activeMsg: "",
|
||||
active: false,
|
||||
loading: false,
|
||||
datatime: 0,
|
||||
lookCount: 0, //查看人数
|
||||
shareCount: 0, //分享人数
|
||||
userCount: 0, //参与人数
|
||||
bargainHelpPrice: 0, //砍掉金额
|
||||
bargainHelpList: [],
|
||||
helpListStatus: false, //砍价列表是否获取完成 false 未完成 true 完成
|
||||
helpListLoading: false, //当前接口是否请求完成 false 完成 true 未完成
|
||||
page: 1, //页码
|
||||
limit: 2, //数量
|
||||
helpCount: 0, //砍价帮总人数
|
||||
surplusPrice: 0, //剩余金额
|
||||
alreadyPrice: 0, //已砍掉价格
|
||||
pricePercent: 0, //砍价进度条
|
||||
bargainUserInfo: [], //砍价 开启砍价用户信息
|
||||
userBargainStatus: 2, //砍价状态
|
||||
statusUser: false ,// 是否帮别人砍,没砍是true,砍了false
|
||||
share:{
|
||||
title:'',
|
||||
path: `/pages/activity/DargainDetails/index/?id=${this.$yroute.query.id}&partake=${this.userInfo.uid}`,
|
||||
imageUrl:'',
|
||||
desc:'',
|
||||
content:''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: mapGetters(["userInfo", "isLogin"]),
|
||||
// watch: {
|
||||
// $yroute: function(n) {
|
||||
// var that = this;
|
||||
// if (n.name === NAME) {
|
||||
// that.mountedStart();
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
mounted: function() {
|
||||
var that = this;
|
||||
that.mountedStart();
|
||||
setTimeout(function() {
|
||||
that.loading = true;
|
||||
}, 500);
|
||||
},
|
||||
methods: {
|
||||
//参与砍价
|
||||
goParticipate() {
|
||||
if (this.bargainPartake === this.userInfo.uid) this.getBargainStart();
|
||||
else this.getBargainStartUser();
|
||||
this.getBargainHelpCount();
|
||||
},
|
||||
openAlone: function() {
|
||||
this.$yrouter.push({ path: "/detail/" + this.bargain.productId });
|
||||
},
|
||||
mountedStart: function() {
|
||||
var that = this;
|
||||
let url = handleQrCode();
|
||||
if (url) {
|
||||
that.bargainId = url.bargainId;
|
||||
that.partake = url.uid;
|
||||
} else {
|
||||
that.bargainId = that.$yroute.query.id;
|
||||
that.partake = parseInt(that.$yroute.query.partake);
|
||||
}
|
||||
if (
|
||||
this.partake === undefined ||
|
||||
this.partake <= 0 ||
|
||||
isNaN(this.partake)
|
||||
) {
|
||||
that.bargainPartake = that.userInfo.uid;
|
||||
// that.$yrouter.push({
|
||||
// path: "/pages/activity/DargainDetails/index",
|
||||
// query: { id: that.bargainId, partake: that.bargainPartake }
|
||||
// });
|
||||
} else {
|
||||
that.bargainPartake = parseInt(this.partake);
|
||||
}
|
||||
that.getBargainHelpCountStart();
|
||||
that.getBargainDetail();
|
||||
that.getBargainShare(0);
|
||||
// if (that.bargainPartake !== that.userInfo.uid) that.getBargainStartUser();
|
||||
if (that.bargainPartake === that.userInfo.uid) {
|
||||
// that.getBargainStart();
|
||||
} else {
|
||||
that.getBargainStartUser();
|
||||
}
|
||||
},
|
||||
goPay: function() {
|
||||
var data = {};
|
||||
var that = this;
|
||||
data.productId = that.bargain.productId;
|
||||
data.cartNum = that.bargain.num;
|
||||
data.uniqueId = "";
|
||||
data.bargainId = that.bargainId;
|
||||
data.new = 1;
|
||||
postCartAdd(data)
|
||||
.then(res => {
|
||||
that.$yrouter.push({
|
||||
path: "/pages/order/OrderSubmission/index",
|
||||
query: { id: res.data.cartId }
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
goPoster: function() {
|
||||
var that = this;
|
||||
that.getBargainShare(that.bargainId);
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/Poster/index",
|
||||
query: { id: that.bargainId, type: 2 }
|
||||
});
|
||||
},
|
||||
goList: function() {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GoodsBargain/index"
|
||||
});
|
||||
},
|
||||
//砍价分享
|
||||
//bargainId 0 获取 查看人数 分享人数 参与人数
|
||||
//bargainId 砍价产品编号 添加分享次数 获取 查看人数 分享人数 参与人数
|
||||
getBargainShare: function(bargainId) {
|
||||
var that = this;
|
||||
getBargainShare({ bargainId: bargainId }).then(res => {
|
||||
that.lookCount = res.data.lookCount;
|
||||
that.shareCount = res.data.shareCount;
|
||||
that.userCount = res.data.userCount;
|
||||
});
|
||||
},
|
||||
// 获取产品详情
|
||||
getBargainDetail: function() {
|
||||
var that = this;
|
||||
getBargainDetail(that.bargainId)
|
||||
.then(res => {
|
||||
res.data.bargain = res.data.bargain.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;"'
|
||||
);
|
||||
that.bargain = res.data.bargain;
|
||||
that.datatime = that.bargain.stopTime / 1000;
|
||||
that.getBargainHelpCount();
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
//开启砍价
|
||||
getBargainStart: function() {
|
||||
var that = this;
|
||||
getBargainStart({ bargainId: that.bargainId })
|
||||
.then(() => {
|
||||
that.bargainPartake = that.userInfo.uid;
|
||||
that.getBargainHelp();
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
//参与砍价
|
||||
getBargainHelp: function() {
|
||||
var that = this;
|
||||
if (
|
||||
that.surplusPrice === 0 &&
|
||||
that.bargainPartake !== that.userInfo.uid
|
||||
) {
|
||||
return uni.showToast({
|
||||
title: "好友已经砍价成功",
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
var data = {
|
||||
bargainId: that.bargainId,
|
||||
bargainUserUid: that.bargainPartake
|
||||
};
|
||||
getBargainHelp(data)
|
||||
.then(res => {
|
||||
that.activeMsg = res.data.status;
|
||||
if (
|
||||
res.data.status === "SUCCESSFUL" &&
|
||||
that.bargainPartake !== that.userInfo.uid
|
||||
) {
|
||||
uni.showToast({
|
||||
title: "您已经砍过了",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
that.helpListStatus = false;
|
||||
that.page = 1;
|
||||
that.bargainHelpList = [];
|
||||
that.getBargainHelpPrice();
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
//获取砍掉的金额
|
||||
getBargainHelpPrice: function() {
|
||||
var that = this;
|
||||
getBargainHelpPrice({
|
||||
bargainId: that.bargainId,
|
||||
bargainUserUid: that.bargainPartake
|
||||
})
|
||||
.then(res => {
|
||||
that.bargainHelpPrice = res.data.price;
|
||||
that.getBargainHelpCount();
|
||||
that.getBargainHelpList();
|
||||
switch (that.activeMsg) {
|
||||
case "SUCCESSFUL":
|
||||
break;
|
||||
case "SUCCESS":
|
||||
that.active = true;
|
||||
break;
|
||||
}
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
//砍价帮
|
||||
getBargainHelpList: function() {
|
||||
var that = this;
|
||||
if (that.helpListLoading === true) return;
|
||||
if (that.helpListStatus === true) return;
|
||||
that.helpListLoading = true;
|
||||
getBargainHelpList({
|
||||
bargainId: that.bargainId,
|
||||
bargainUserUid: that.bargainPartake,
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
})
|
||||
.then(res => {
|
||||
that.helpListStatus = res.data.length < that.limit;
|
||||
that.helpListLoading = false;
|
||||
that.page++;
|
||||
that.bargainHelpList.push.apply(that.bargainHelpList, res.data);
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
getBargainHelpCountStart: function() {
|
||||
var that = this;
|
||||
getBargainHelpCount({
|
||||
bargainId: that.bargainId,
|
||||
bargainUserUid: that.bargainPartake
|
||||
})
|
||||
.then(() => {})
|
||||
.catch(() => {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/DargainDetails/index",
|
||||
query: { id: that.bargainId, partake: that.userInfo.uid }
|
||||
});
|
||||
// that.$router.push({
|
||||
// path:
|
||||
// "/activity/dargain_detail/" +
|
||||
// that.bargainId +
|
||||
// "/" +
|
||||
// that.userInfo.uid
|
||||
// });
|
||||
});
|
||||
},
|
||||
getBargainHelpCount: function() {
|
||||
var that = this;
|
||||
getBargainHelpCount({
|
||||
bargainId: that.bargainId,
|
||||
bargainUserUid: that.bargainPartake
|
||||
})
|
||||
.then(res => {
|
||||
that.userBargainStatus = res.data.status;
|
||||
that.helpCount = res.data.count;
|
||||
that.surplusPrice = res.data.price;
|
||||
that.alreadyPrice = res.data.alreadyPrice;
|
||||
that.pricePercent = res.data.pricePercent;
|
||||
that.price = (that.bargain.price - that.alreadyPrice).toFixed(2);
|
||||
console.log(that);
|
||||
})
|
||||
.catch(() => {
|
||||
that.bargainPartake = that.userInfo.uid;
|
||||
// that.$yrouter.push({
|
||||
// path: "/pages/activity/DargainDetails/index",
|
||||
// query: { id: that.bargainId, partake: that.userInfo.uid }
|
||||
// });
|
||||
});
|
||||
},
|
||||
getBargainStartUser: function() {
|
||||
var that = this;
|
||||
getBargainStartUser({
|
||||
bargainId: that.bargainId,
|
||||
bargainUserUid: that.bargainPartake
|
||||
})
|
||||
.then(res => {
|
||||
that.bargainUserInfo = res.data;
|
||||
that.getBargainHelpList();
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
close: function() {
|
||||
this.active = false;
|
||||
}
|
||||
}
|
||||
// ,
|
||||
// onShareAppMessage() {
|
||||
// return {
|
||||
// path: `/pages/activity/DargainDetails/index/?id=${this.$yroute.query.id}&partake=${this.userInfo.uid}`
|
||||
// };
|
||||
// }
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
page {
|
||||
background-color: #eb3729;
|
||||
}
|
||||
.bargainBnt_hui {
|
||||
font-size: 0.3 * 100rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
width: 6 * 100rpx;
|
||||
height: 0.8 * 100rpx;
|
||||
border-radius: 0.4 * 100rpx;
|
||||
background: #bbb;
|
||||
text-align: center;
|
||||
line-height: 0.8 * 100rpx;
|
||||
margin-top: 0.32 * 100rpx;
|
||||
}
|
||||
.bargain_view {
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 0.48 * 100rpx;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
opacity: 1;
|
||||
border-radius: 0 0 0.06 * 100rpx 0.06 * 100rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
font-size: 0.22 * 100rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 0.48 * 100rpx;
|
||||
}
|
||||
.iconfonts {
|
||||
font-size: 0.22 * 100rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,84 +0,0 @@
|
||||
<template>
|
||||
<view class="bargain-list">
|
||||
<!-- <view class="header">
|
||||
<image src="@/static/images/cut-bg.png" alt="">
|
||||
</view>-->
|
||||
<view class="list" v-if="bargainLis.length > 0">
|
||||
<view class="item acea-row row-between-wrapper" v-for="(item, bargainLisIndex) in bargainLis"
|
||||
:key="bargainLisIndex">
|
||||
<view class="pictrue">
|
||||
<image :src="item.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-column-around">
|
||||
<view class="line1" v-text="item.title"></view>
|
||||
<view class="num">
|
||||
<text class="iconfont icon-pintuan"></text>
|
||||
{{ item.people }}人正在参与
|
||||
</view>
|
||||
<view class="money font-color-red">
|
||||
可砍至: ¥
|
||||
<text class="price">{{item.minPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cutBnt bg-color-red" @click="goDetail(item.id)">
|
||||
<text class="iconfont icon-kanjia"></text>参与砍价
|
||||
</view>
|
||||
</view>
|
||||
<view class="load font-color-red" v-if="!status" @click="getBargainList">点击加载更多</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getBargainList
|
||||
} from "@/api/activity";
|
||||
export default {
|
||||
name: "GoodsBargain",
|
||||
components: {},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
bargainLis: [], //砍价列表
|
||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
||||
loading: false, //当前接口是否请求完成 false 完成 true 未完成
|
||||
page: 1, //页码
|
||||
limit: 20 //数量
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
this.getBargainList();
|
||||
},
|
||||
methods: {
|
||||
getBargainList: function() {
|
||||
var that = this;
|
||||
if (that.loading) return;
|
||||
if (that.status) return;
|
||||
that.loading = true;
|
||||
getBargainList({
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
}).then(res => {
|
||||
that.status = res.data.length < that.limit;
|
||||
that.bargainLis.push.apply(that.bargainLis, res.data);
|
||||
that.page++;
|
||||
that.loading = false;
|
||||
});
|
||||
},
|
||||
goDetail: function(id) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/DargainDetails/index",
|
||||
query: {
|
||||
id,
|
||||
partake: 0
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: rgb(245, 245, 245);
|
||||
}
|
||||
</style>
|
||||
@@ -1,91 +0,0 @@
|
||||
<template>
|
||||
<view class="group-list" ref="container">
|
||||
<view class="list" v-if="combinationList.length>0">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(item, combinationListIndex) in combinationList"
|
||||
:key="combinationListIndex"
|
||||
@click="link(item.id)"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="item.image" />
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="line1" v-text="item.title"></view>
|
||||
<view class="acea-row">
|
||||
<view class="team acea-row row-middle cart-color">
|
||||
<view class="iconfont icon-pintuan"></view>
|
||||
<view class="num" v-text="item.people + '人团'"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom acea-row row-between-wrapper">
|
||||
<view class="money">
|
||||
¥
|
||||
<text class="num" v-text="item.price"></text>
|
||||
<text class="y-money" v-text="'¥' + item.productPrice"></text>
|
||||
</view>
|
||||
<view class="groupBnt bg-color-red">
|
||||
去拼团
|
||||
<text class="iconfont icon-jiantou"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="status" :loading="loadingList"></Loading>
|
||||
</view>
|
||||
<view class="noCommodity" style="background-color: #fff;" v-if="combinationList.length === 0">
|
||||
<view class="noPictrue">
|
||||
<image :src="webUrl+'/20210203153900181449.png'" class="image" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getCombinationList } from "@/api/activity";
|
||||
import Loading from "@/components/Loading";
|
||||
|
||||
export default {
|
||||
name: "GoodsGroup",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
combinationList: [],
|
||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
||||
loading: false, //当前接口是否请求完成 false 完成 true 未完成
|
||||
page: 1, //页码
|
||||
limit: 20, //数量
|
||||
loadingList: false
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
// document.querySelector('body').setAttribute('style', 'background-color:#eb3729');
|
||||
this.getCombinationList();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loadingList && this.getCombinationList();
|
||||
},
|
||||
methods: {
|
||||
getCombinationList: function() {
|
||||
var that = this;
|
||||
if (that.loading) return;
|
||||
if (that.status) return;
|
||||
getCombinationList({ page: that.page, limit: that.limit }).then(res => {
|
||||
that.status = res.data.length < that.limit;
|
||||
that.combinationList.push.apply(that.combinationList, res.data);
|
||||
that.page++;
|
||||
that.loading = false;
|
||||
});
|
||||
},
|
||||
link: function(id) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GroupDetails/index",
|
||||
query: { id }
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,261 +0,0 @@
|
||||
<template>
|
||||
<view class="flash-sale" ref="container">
|
||||
<view class="header" v-if="headerImg">
|
||||
<image :src="headerImg"/>
|
||||
</view>
|
||||
<scroll-view scroll-y="false" scroll-x="true">
|
||||
<view class="timeScroll">
|
||||
<view v-for="(item, index) in timeList" :key="index">
|
||||
<view v-if="active==index" class="timeItem active" @click="setTime(index)">
|
||||
<view class="time">{{ item.time }}</view>
|
||||
<view class="state">{{ item.state }}</view>
|
||||
</view>
|
||||
<view v-if="active!=index" class="timeItem" @click="setTime(index)">
|
||||
<view class="time">{{ item.time }}</view>
|
||||
<view class="state">{{ item.state }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view v-for="(item, index) in timeList" :key="index">
|
||||
<view v-if="active == index">
|
||||
<view class="countDown font-color-red acea-row row-center-wrapper">
|
||||
<view v-if="item.status === 0" class="activity">活动已结束</view>
|
||||
<count-down
|
||||
:isDay="false"
|
||||
:tipText="'距结束仅剩 '"
|
||||
:dayText="false"
|
||||
:hourText="' : '"
|
||||
:minuteText="' : '"
|
||||
:secondText="false"
|
||||
:datatime="datatime"
|
||||
v-if="item.status === 1"
|
||||
></count-down>
|
||||
<view v-if="item.status === 2" class="activity">活动即将开始</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(itemSeckill, indexSeckill) in seckillList"
|
||||
:key="indexSeckill"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="itemSeckill.image"/>
|
||||
</view>
|
||||
<view class="text acea-row row-column-around">
|
||||
<view class="line1" v-text="itemSeckill.title"></view>
|
||||
<view class="money">
|
||||
限时价
|
||||
<text class="num font-color-red" v-text="'¥' + itemSeckill.price"></text>
|
||||
</view>
|
||||
<view class="progress cart-color">
|
||||
<view class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></view>
|
||||
<view class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="grab bg-color-red"
|
||||
v-if="item.status === 1 && itemSeckill.stock > 0"
|
||||
@click="goDetail(itemSeckill.id)"
|
||||
>马上抢
|
||||
</view>
|
||||
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
|
||||
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
|
||||
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="noCommodity"
|
||||
style="background-color: #fff;"
|
||||
v-if="seckillList.length === 0 && page > 1"
|
||||
>
|
||||
<view class="noPictrue">
|
||||
<image :src="webUrl+'/20210203153900181449.png'" class="image"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {getSeckillConfig, getSeckillList} from "@/api/activity";
|
||||
import CountDown from "@/components/CountDown";
|
||||
|
||||
export default {
|
||||
name: "GoodsSeckill",
|
||||
components: {
|
||||
CountDown
|
||||
},
|
||||
props: {},
|
||||
data: function () {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
headerImg: "",
|
||||
timeList: [],
|
||||
sticky: false,
|
||||
loading: false,
|
||||
datatime: 0,
|
||||
active: 0,
|
||||
seckillList: [],
|
||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
||||
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
|
||||
page: 1, //页码
|
||||
limit: 5, //数量
|
||||
title: []
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
this.mountedStart();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loadingList && this.getSeckillList();
|
||||
},
|
||||
methods: {
|
||||
changeTime: function (index) {
|
||||
this.active = index;
|
||||
this.getSeckillList();
|
||||
},
|
||||
mountedStart: function () {
|
||||
var that = this;
|
||||
uni.showLoading();
|
||||
getSeckillConfig().then(res => {
|
||||
that.$set(that, "headerImg", res.data.lovely);
|
||||
that.$set(that, "timeList", res.data.seckillTime);
|
||||
that.$set(that, "active", res.data.seckillTimeIndex);
|
||||
|
||||
let title = [];
|
||||
title = res.data.seckillTime.map((item, index) => {
|
||||
return {
|
||||
name: "div",
|
||||
attrs: {
|
||||
class: "timeItem"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "div",
|
||||
attrs: {
|
||||
class: "time"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
type: "text",
|
||||
text: item.time
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "div",
|
||||
attrs: {
|
||||
class: "state"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
type: "text",
|
||||
text: item.state
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
that.$set(that, "title", title);
|
||||
that.datatime = that.timeList[that.active].stop;
|
||||
that.getSeckillList();
|
||||
that.$nextTick(function () {
|
||||
that.sticky = true;
|
||||
uni.hideLoading();
|
||||
});
|
||||
});
|
||||
},
|
||||
setTime: function (index) {
|
||||
var that = this;
|
||||
that.page = 1;
|
||||
that.loadingList = false;
|
||||
that.status = false;
|
||||
that.active = index;
|
||||
that.datatime = that.timeList[that.active].stop;
|
||||
this.seckillList = [];
|
||||
that.getSeckillList();
|
||||
},
|
||||
getSeckillList: function () {
|
||||
var that = this;
|
||||
if (that.loadingList) return;
|
||||
if (that.status) return;
|
||||
var time = that.timeList[that.active].id;
|
||||
getSeckillList(time, {
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
}).then(res => {
|
||||
that.status = res.data.length < that.limit;
|
||||
that.seckillList.push.apply(that.seckillList, res.data);
|
||||
that.page++;
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
goDetail: function (id) {
|
||||
var that = this;
|
||||
var time = that.timeList[that.active].stop;
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/SeckillDetails/index",
|
||||
query: {
|
||||
id,
|
||||
time
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.timeScroll {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.timeItem {
|
||||
font-size: 0.22 * 100rpx;
|
||||
color: #282828;
|
||||
width: 150rpx;
|
||||
text-align: center;
|
||||
padding: 0.11 * 100rpx 0;
|
||||
background-color: none;
|
||||
|
||||
&.active {
|
||||
.time {
|
||||
color: #eb3729;
|
||||
}
|
||||
|
||||
.state {
|
||||
background-color: #eb3729;
|
||||
color: #fff;
|
||||
opacity: 1;
|
||||
border-radius: 30rpx;
|
||||
padding: 0 0.2 * 100rpx;
|
||||
font-weight: 800;
|
||||
height: 0.37 * 100rpx;
|
||||
line-height: 0.37 * 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.timeItem .time {
|
||||
font-size: 0.32 * 100rpx;
|
||||
font-weight: bold;
|
||||
height: 0.37 * 100rpx;
|
||||
line-height: 0.37 * 100rpx;
|
||||
}
|
||||
|
||||
.timeItem .state {
|
||||
height: 0.37 * 100rpx;
|
||||
line-height: 0.37 * 100rpx;
|
||||
}
|
||||
|
||||
.activity {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.flash-sale .list .item .grab {
|
||||
background-color: #999;
|
||||
}
|
||||
</style>
|
||||
@@ -1,375 +0,0 @@
|
||||
<template>
|
||||
<view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
|
||||
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
|
||||
<view class="wrapper">
|
||||
<view class="share acea-row row-between row-bottom">
|
||||
<view class="money font-color-red">
|
||||
¥
|
||||
<text class="num" v-text="storeInfo.price"></text>
|
||||
<text class="y-money" v-text="'¥' + storeInfo.productPrice"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="introduce" v-text="storeInfo.title"></view>
|
||||
<view class="label acea-row row-between-wrapper">
|
||||
<view v-text="'类型:' + storeInfo.people + '人团'"></view>
|
||||
<view v-text="'库存:' + storeInfo.stock + storeInfo.unitName"></view>
|
||||
<view v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="notice acea-row row-middle">
|
||||
<view class="num font-color-red">
|
||||
<text class="iconfont icon-laba"></text>
|
||||
已拼{{ storeInfo.sales
|
||||
}}{{ storeInfo.unitName }}
|
||||
<text class="line">|</text>
|
||||
</view>
|
||||
<view class="swiper-no-swiping swiper">
|
||||
<swiper class="swiper-wrapper" :options="swiperTip" :autoplay="true" :interval="3000">
|
||||
<block v-for="(item, itemNewIndex) in itemNew" :key="itemNewIndex">
|
||||
<swiper-item>
|
||||
<view class="line1">{{ item }}</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="assemble">
|
||||
<view v-for="(item, groupListindex) in groupList" :key="groupListindex">
|
||||
<view class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount">
|
||||
<view class="pictxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="item.avatar" class="image" />
|
||||
</view>
|
||||
<view class="text line1" v-text="item.nickname"></view>
|
||||
</view>
|
||||
<view class="right acea-row row-middle">
|
||||
<view>
|
||||
<view class="lack">
|
||||
<text>还差</text>
|
||||
<text class="font-color-red" v-text="item.count"></text>
|
||||
<text>人成团</text>
|
||||
</view>
|
||||
<count-down
|
||||
:isDay="false"
|
||||
:tipText="'剩余 '"
|
||||
:dayText="false"
|
||||
:hourText="':'"
|
||||
:minuteText="':'"
|
||||
:secondText="false"
|
||||
:datatime="item.stopTime/1000"
|
||||
></count-down>
|
||||
</view>
|
||||
<view class="spellBnt" @click="groupRule(item.id)">
|
||||
去拼单
|
||||
<text class="iconfont icon-jiantou"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="more" v-if="groupList.length > groupListCount" @click="setGroupListCount">
|
||||
查看更多
|
||||
<text class="iconfont icon-xiangxia"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="playWay">
|
||||
<view class="title acea-row row-between-wrapper">
|
||||
<view>拼团玩法</view>
|
||||
</view>
|
||||
<view class="way acea-row row-middle">
|
||||
<view class="item">
|
||||
<text class="num">①</text>开团/参团
|
||||
</view>
|
||||
<view class="iconfont icon-arrow"></view>
|
||||
<view class="item">
|
||||
<text class="num">②</text>邀请好友
|
||||
</view>
|
||||
<view class="iconfont icon-arrow"></view>
|
||||
<view class="item">
|
||||
<view>
|
||||
<text class="num">③</text>满员发货
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="userEvaluation">
|
||||
<view class="title acea-row row-between-wrapper">
|
||||
<view v-text="'用户评价(' + replyCount + ')'"></view>
|
||||
<view class="praise" @click="goReply">
|
||||
<text class="font-color-red" v-text="replyChance + '%'"></text>好评率
|
||||
<text class="iconfont icon-jiantou"></text>
|
||||
</view>
|
||||
</view>
|
||||
<UserEvaluation :reply="reply"></UserEvaluation>
|
||||
</view>
|
||||
<view class="product-intro">
|
||||
<view class="title">产品介绍</view>
|
||||
<view class="conter" v-html="storeInfo.description"></view>
|
||||
<!-- <view class="conter" v-html=""></view> -->
|
||||
</view>
|
||||
<view style="height:100rpx;"></view>
|
||||
<view class="footer-group acea-row row-between-wrapper">
|
||||
<!-- <view class="customerSer acea-row row-center-wrapper row-column">
|
||||
<view class="iconfont icon-kefu"></view>
|
||||
<view>客服</view>
|
||||
</view>-->
|
||||
<view class="customerSer acea-row row-center-wrapper row-column" @click="setCollect">
|
||||
<view class="iconfont" :class="userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view>
|
||||
<text>收藏</text>
|
||||
</view>
|
||||
<view class="bnt bg-color-violet" @click="openAlone">单独购买</view>
|
||||
<view class="bnt bg-color-red" @click="openTeam">立即开团</view>
|
||||
</view>
|
||||
<ProductWindow v-if="cartNum" v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
|
||||
<StorePoster
|
||||
v-on:setPosterImageStatus="setPosterImageStatus"
|
||||
:posterImageStatus="posterImageStatus"
|
||||
:posterData="posterData"
|
||||
></StorePoster>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||
|
||||
import ProductConSwiper from "@/components/ProductConSwiper";
|
||||
import CountDown from "@/components/CountDown";
|
||||
import UserEvaluation from "@/components/UserEvaluation";
|
||||
import ProductWindow from "@/components/ProductWindow";
|
||||
import StorePoster from "@/components/StorePoster";
|
||||
import { getCombinationDetail } from "@/api/activity";
|
||||
import { postCartAdd } from "@/api/store";
|
||||
import { imageBase64 } from "@/api/public";
|
||||
import {
|
||||
getCoupon,
|
||||
getCollectAdd,
|
||||
getCollectDel,
|
||||
getUserInfo
|
||||
} from "@/api/user";
|
||||
const NAME = "GroupDetails";
|
||||
|
||||
export default {
|
||||
name: "GroupDetails",
|
||||
components: {
|
||||
ProductConSwiper,
|
||||
CountDown,
|
||||
UserEvaluation,
|
||||
// swiper,
|
||||
// swiperSlide,
|
||||
ProductWindow,
|
||||
StorePoster
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
domStatus: false,
|
||||
posterData: {
|
||||
image: "",
|
||||
title: "",
|
||||
price: "",
|
||||
code: ""
|
||||
},
|
||||
posterImageStatus: false,
|
||||
reply: [],
|
||||
replyCount: 0,
|
||||
replyChance: 0,
|
||||
imgUrls: [],
|
||||
storeInfo: {},
|
||||
itemNew: {},
|
||||
groupListCount: 2,
|
||||
groupList: {},
|
||||
swiperTip: {
|
||||
direction: "vertical",
|
||||
autoplay: {
|
||||
disableOnInteraction: false,
|
||||
delay: 2000
|
||||
},
|
||||
loop: true,
|
||||
speed: 1000,
|
||||
observer: true,
|
||||
observeParents: true
|
||||
},
|
||||
attr: {
|
||||
cartAttr: false,
|
||||
productSelect: {
|
||||
image: "",
|
||||
store_name: "",
|
||||
price: "",
|
||||
stock: "",
|
||||
unique: "",
|
||||
cart_num: 1
|
||||
}
|
||||
},
|
||||
cartNum: 1,
|
||||
userCollect: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$yroute: function(n) {
|
||||
var that = this;
|
||||
if (n.name === NAME) {
|
||||
that.mountedStart();
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
this.mountedStart();
|
||||
},
|
||||
methods: {
|
||||
openAlone: function() {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
query: { id: this.storeInfo.productId }
|
||||
});
|
||||
// this.$yrouter.replace({ path: "/detail/" + this.storeInfo.productId });
|
||||
},
|
||||
//收藏商品
|
||||
setCollect: function() {
|
||||
let that = this,
|
||||
id = that.storeInfo.id,
|
||||
category = "product";
|
||||
if (that.userCollect) {
|
||||
getCollectDel(id, category).then(function() {
|
||||
that.userCollect = !that.userCollect;
|
||||
});
|
||||
} else {
|
||||
getCollectAdd(id, category).then(function() {
|
||||
that.userCollect = !that.userCollect;
|
||||
});
|
||||
}
|
||||
},
|
||||
mountedStart: function() {
|
||||
var that = this;
|
||||
let id = that.$yroute.query.id;
|
||||
getCombinationDetail(id).then(res => {
|
||||
that.userCollect = res.data.userCollect;
|
||||
res.data.storeInfo.description = res.data.storeInfo.description.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;"'
|
||||
);
|
||||
that.$set(that, "storeInfo", res.data.storeInfo);
|
||||
that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr);
|
||||
that.$set(that, "itemNew", res.data.pinkOkList);
|
||||
that.$set(that, "groupList", res.data.pink);
|
||||
that.$set(that, "reply", [res.data.reply]);
|
||||
that.$set(that, "replyCount", res.data.replyCount);
|
||||
that.$set(that, "replyChance", res.data.replyChance);
|
||||
that.setProductSelect();
|
||||
that.posterData.image = that.storeInfo.image;
|
||||
if (that.storeInfo.title.length > 30) {
|
||||
that.posterData.title = that.storeInfo.title.substring(0, 30) + "...";
|
||||
} else {
|
||||
that.posterData.title = that.storeInfo.title;
|
||||
}
|
||||
that.posterData.price = that.storeInfo.price;
|
||||
that.posterData.code = that.storeInfo.code_base;
|
||||
that.domStatus = true;
|
||||
//that.getImageBase64();
|
||||
});
|
||||
},
|
||||
getImageBase64: function() {
|
||||
let that = this;
|
||||
imageBase64(this.posterData.image, that.posterData.code).then(res => {
|
||||
that.posterData.image = res.data.image;
|
||||
that.posterData.code = res.data.code;
|
||||
});
|
||||
},
|
||||
setPosterImageStatus: function() {
|
||||
// var sTop = document.body || document.documentElement;
|
||||
// sTop.scrollTop = 0;
|
||||
this.posterImageStatus = !this.posterImageStatus;
|
||||
},
|
||||
groupRule: function(id) {
|
||||
var that = this;
|
||||
that.$yrouter.push({
|
||||
path: "/pages/activity/GroupRule/index",
|
||||
query: { id }
|
||||
});
|
||||
},
|
||||
goReply: function() {
|
||||
var that = this;
|
||||
that.$yrouter.push({
|
||||
path: "/pages/shop/EvaluateList/index",
|
||||
query: { id: that.storeInfo.product_id }
|
||||
});
|
||||
},
|
||||
setGroupListCount: function() {
|
||||
this.groupListCount = this.groupListCount + 2;
|
||||
},
|
||||
//将父级向子集多次传送的函数合二为一;
|
||||
changeFun: function(opt) {
|
||||
if (typeof opt !== "object") opt = {};
|
||||
let action = opt.action || "";
|
||||
let value = opt.value === undefined ? "" : opt.value;
|
||||
this[action] && this[action](value);
|
||||
},
|
||||
changeattr: function(res) {
|
||||
var that = this;
|
||||
that.attr.cartAttr = res;
|
||||
},
|
||||
ChangeCartNum: function(res) {
|
||||
var that = this;
|
||||
that.attr.productSelect.cart_num = 1;
|
||||
that.cartNum = 1;
|
||||
uni.showToast({
|
||||
title: "每人每次限购1" + that.storeInfo.unitName,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
},
|
||||
setProductSelect: function() {
|
||||
var that = this;
|
||||
var attr = that.attr;
|
||||
attr.productSelect.image = that.storeInfo.image;
|
||||
attr.productSelect.store_name = that.storeInfo.title;
|
||||
attr.productSelect.price = that.storeInfo.price;
|
||||
attr.productSelect.stock = that.storeInfo.stock;
|
||||
attr.cartAttr = false;
|
||||
that.$set(that, "attr", attr);
|
||||
},
|
||||
openTeam: function() {
|
||||
var that = this;
|
||||
if (that.attr.cartAttr == false) {
|
||||
that.attr.cartAttr = !this.attr.cartAttr;
|
||||
} else {
|
||||
var data = {};
|
||||
data.productId = that.storeInfo.productId;
|
||||
data.cartNum = that.attr.productSelect.cart_num;
|
||||
data.uniqueId = that.attr.productSelect.unique;
|
||||
data.combinationId = that.storeInfo.id;
|
||||
data.new = 1;
|
||||
postCartAdd(data)
|
||||
.then(res => {
|
||||
that.$yrouter.push({
|
||||
path: "/pages/order/OrderSubmission/index",
|
||||
query: { id: res.data.cartId }
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.product-con .wrapper {
|
||||
padding-bottom: 0.26 * 100rpx;
|
||||
}
|
||||
.noscroll {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.product-con .footer-group .bnt {
|
||||
// flex:1;
|
||||
width: 43%;
|
||||
}
|
||||
.product-con .footer-group .bnt.bg-color-violet {
|
||||
background-color: #fa8013;
|
||||
}
|
||||
</style>
|
||||
@@ -1,248 +0,0 @@
|
||||
<template>
|
||||
<view class="group-con">
|
||||
<view class="header acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="storeCombination.image" />
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="line1" v-text="storeCombination.title"></view>
|
||||
<view class="money">
|
||||
<text>¥</text>
|
||||
<text class="num" v-text="storeCombination.price"></text>
|
||||
<text class="team cart-color" v-text="storeCombination.people + '人拼'"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></view>
|
||||
<view v-else-if="pinkBool === 1" class="iconfont icon-pintuanchenggong font-color-red"></view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="title acea-row row-center-wrapper">
|
||||
<view class="line"></view>
|
||||
<view class="name acea-row row-center-wrapper">
|
||||
<text>剩余</text>
|
||||
<count-down
|
||||
:isDay="false"
|
||||
:tipText="false"
|
||||
:dayText="false"
|
||||
:hourText="' : '"
|
||||
:minuteText="' : '"
|
||||
:secondText="false"
|
||||
:datatime="pinkT.stopTime/1000"
|
||||
></count-down>
|
||||
<text>结束</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="tips-warp">
|
||||
<text class="tips font-color-red" v-if="pinkBool === 1">恭喜您拼团成功</text>
|
||||
<text class="tips" v-else-if="pinkBool === -1">还差{{ count }}人,拼团失败</text>
|
||||
<text class="tips font-color-red" v-else-if="pinkBool === 0">拼团中,还差{{ count }}人拼团成功</text>
|
||||
</view>
|
||||
<view
|
||||
class="list acea-row row-middle"
|
||||
:class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="pinkT.avatar" />
|
||||
</view>
|
||||
<view class="acea-row row-middle" v-if="pinkAll.length > 0">
|
||||
<view class="pictrue" v-for="(item, pinkAllIndex) in pinkAll" :key="pinkAllIndex">
|
||||
<image :src="item.avatar" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="pictrue" v-for="countIndex in count" :key="countIndex">
|
||||
<image class="img-none" :src="webUrl+'/20230304204903336964.png'" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="(pinkBool === 1 || pinkBool === -1) && count > 9"
|
||||
class="lookAll acea-row row-center-wrapper"
|
||||
@click="lookAll"
|
||||
>
|
||||
{{ iShidden ? "收起" : "查看全部" }}
|
||||
<text class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></text>
|
||||
</view>
|
||||
<view
|
||||
class="teamBnt bg-color-red"
|
||||
v-if="userBool === 1 && isOk == 0 && pinkBool === 0"
|
||||
@click="goPoster"
|
||||
>邀请好友参团</view>
|
||||
<view
|
||||
class="teamBnt bg-color-red"
|
||||
v-else-if="userBool === 0 && pinkBool === 0 && count > 0"
|
||||
@click="pay"
|
||||
>我要参团</view>
|
||||
<view
|
||||
class="teamBnt bg-color-red"
|
||||
v-if="pinkBool === 1 || pinkBool === -1"
|
||||
@click="goDetail(storeCombination.id)"
|
||||
>再次开团</view>
|
||||
<view class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
|
||||
<text class="iconfont icon-guanbi3"></text>
|
||||
<text>取消开团</text>
|
||||
</view>
|
||||
<view class="lookOrder" v-if="pinkBool === 1" @click="goOrder">
|
||||
<text>查看订单信息</text>
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import CountDown from "@/components/CountDown";
|
||||
import { getCombinationPink, getCombinationRemove } from "@/api/activity";
|
||||
import { postCartAdd } from "@/api/store";
|
||||
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index";
|
||||
|
||||
const NAME = "GroupRule";
|
||||
export default {
|
||||
name: NAME,
|
||||
components: {
|
||||
CountDown
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
currentPinkOrder: "", //当前拼团订单
|
||||
isOk: 0, //判断拼团是否完成
|
||||
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功
|
||||
userBool: 0, //判断当前用户是否在团内|0=未在,1=在
|
||||
pinkAll: [], //团员
|
||||
pinkT: [], //团长信息
|
||||
storeCombination: [], //拼团产品
|
||||
pinkId: 0,
|
||||
count: 0, //拼团剩余人数
|
||||
iShidden: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$yroute(n) {
|
||||
var that = this;
|
||||
if (n.name === NAME) {
|
||||
that.pinkId = that.$yroute.query.id;
|
||||
that.getCombinationPink();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
var that = this;
|
||||
let url = handleQrCode();
|
||||
if (url) {
|
||||
that.pinkId = url.pinkId;
|
||||
} else {
|
||||
that.pinkId = that.$yroute.query.id;
|
||||
}
|
||||
that.getCombinationPink();
|
||||
},
|
||||
methods: {
|
||||
pay: function() {
|
||||
var that = this;
|
||||
var data = {};
|
||||
data.productId = that.storeCombination.productId;
|
||||
data.cartNum = that.pinkT.totalNum;
|
||||
data.uniqueId = "";
|
||||
data.combinationId = that.storeCombination.id;
|
||||
data.new = 1;
|
||||
postCartAdd(data)
|
||||
.then(res => {
|
||||
that.$yrouter.push({
|
||||
path: "/pages/order/OrderSubmission/index",
|
||||
query: {
|
||||
id: res.data.cartId,
|
||||
pinkid: that.pinkId
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
goPoster: function() {
|
||||
var that = this;
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/Poster/index",
|
||||
query: {
|
||||
id: that.pinkId,
|
||||
type: 1
|
||||
}
|
||||
});
|
||||
},
|
||||
goOrder: function() {
|
||||
var that = this;
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: {
|
||||
id: that.currentPinkOrder
|
||||
}
|
||||
});
|
||||
},
|
||||
//拼团列表
|
||||
goList: function() {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GoodsGroup/index"
|
||||
});
|
||||
},
|
||||
//拼团详情
|
||||
goDetail: function(id) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GroupDetails/index",
|
||||
query: {
|
||||
id
|
||||
}
|
||||
});
|
||||
},
|
||||
//拼团信息
|
||||
getCombinationPink: function() {
|
||||
var that = this;
|
||||
getCombinationPink(that.pinkId).then(res => {
|
||||
that.$set(that, "storeCombination", res.data.storeCombination);
|
||||
that.$set(that, "pinkT", res.data.pinkT);
|
||||
that.$set(that, "pinkAll", res.data.pinkAll);
|
||||
that.$set(that, "count", res.data.count);
|
||||
that.$set(that, "userBool", res.data.userBool);
|
||||
that.$set(that, "pinkBool", res.data.pinkBool);
|
||||
that.$set(that, "isOk", res.data.isOk);
|
||||
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
|
||||
});
|
||||
},
|
||||
//拼团取消
|
||||
getCombinationRemove: function() {
|
||||
var that = this;
|
||||
getCombinationRemove({
|
||||
id: that.pinkId,
|
||||
cid: that.storeCombination.id
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
lookAll: function() {
|
||||
this.iShidden = !this.iShidden;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.tips-warp {
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,79 +0,0 @@
|
||||
<template>
|
||||
<view class="poster-poster" v-if="status === false">
|
||||
<view class="tip">
|
||||
<text class="iconfont icon-shuoming"></text>提示:长按图片保存至手机相册
|
||||
</view>
|
||||
<view class="poster">
|
||||
<image :src="image" mode="widthFix" show-menu-by-longpress />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getBargainPoster, getCombinationPoster } from "@/api/activity";
|
||||
|
||||
export default {
|
||||
name: "Poster",
|
||||
components: {},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
status: true,
|
||||
id: 0,
|
||||
image: ""
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
var that = this;
|
||||
var id = that.$yroute.query.id;
|
||||
var type = that.$yroute.query.type;
|
||||
that.id = id;
|
||||
if (type == 2) {
|
||||
that.getBargainPoster();
|
||||
} else {
|
||||
that.getCombinationPoster();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getBargainPoster: function() {
|
||||
var that = this;
|
||||
getBargainPoster({ bargainId: that.id, from: "wechat" })
|
||||
.then(res => {
|
||||
that.image = res.data.url;
|
||||
that.status = false;
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
// 拼团海报
|
||||
getCombinationPoster: function() {
|
||||
var that = this;
|
||||
getCombinationPoster({ id: that.id, from: "wechat" })
|
||||
.then(res => {
|
||||
that.image = res.data.url;
|
||||
that.status = false;
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
page {
|
||||
background-color: #eb3729;
|
||||
}
|
||||
.poster-poster {
|
||||
height: unset !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,235 +0,0 @@
|
||||
<template>
|
||||
<view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
|
||||
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
|
||||
<view class="nav acea-row row-between-wrapper">
|
||||
<view class="money">
|
||||
¥
|
||||
<text class="num" v-text="storeInfo.price"></text>
|
||||
<text class="y-money" v-text="'¥' + storeInfo.price"></text>
|
||||
</view>
|
||||
<view class="acea-row row-middle">
|
||||
<view class="times">
|
||||
<view>距秒杀结束仅剩</view>
|
||||
<count-down
|
||||
:isDay="false"
|
||||
:tipText="false"
|
||||
:dayText="false"
|
||||
:hourText="' : '"
|
||||
:minuteText="' : '"
|
||||
:secondText="false"
|
||||
:datatime="datatime"
|
||||
></count-down>
|
||||
</view>
|
||||
<view class="iconfont icon-jiantou"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapperRush">
|
||||
<view class="introduce acea-row row-between">
|
||||
<view class="infor" v-text="storeInfo.title"></view>
|
||||
<!-- <view class="iconfont icon-fenxiang" @click="setPosterImageStatus"></view> -->
|
||||
</view>
|
||||
<view class="label acea-row row-middle">
|
||||
<view class="stock" v-text="'库存:' + storeInfo.stock + '件'"></view>
|
||||
<view v-text="'销量:' + storeInfo.sales + '件'"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product-intro">
|
||||
<view class="title">产品介绍</view>
|
||||
<view class="conter" v-html="storeInfo.description"></view>
|
||||
</view>
|
||||
<view style="height:100rpx;"></view>
|
||||
<view class="footerRush acea-row row-between-wrapper">
|
||||
<!-- <view
|
||||
class="customerSer acea-row row-center-wrapper row-column"
|
||||
@click="routerGo()"
|
||||
>
|
||||
<view class="iconfont icon-kefu"></view>
|
||||
<view>客服</view>
|
||||
</view> -->
|
||||
<view class="bnt bg-color-red" @click="tapBuy">立即购买</view>
|
||||
</view>
|
||||
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
|
||||
<StorePoster
|
||||
v-on:setPosterImageStatus="setPosterImageStatus"
|
||||
:posterImageStatus="posterImageStatus"
|
||||
:posterData="posterData"
|
||||
></StorePoster>
|
||||
</view>
|
||||
</template>
|
||||
<style scoped lang="less">
|
||||
.noscroll {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import ProductConSwiper from "@/components/ProductConSwiper";
|
||||
import CountDown from "@/components/CountDown";
|
||||
import ProductWindow from "@/components/ProductWindow";
|
||||
import StorePoster from "@/components/StorePoster";
|
||||
import { getSeckillDetail } from "@/api/activity";
|
||||
import { postCartAdd } from "@/api/store";
|
||||
import { imageBase64 } from "@/api/public";
|
||||
const NAME = "SeckillDetails";
|
||||
|
||||
export default {
|
||||
name: "SeckillDetails",
|
||||
components: {
|
||||
ProductConSwiper,
|
||||
CountDown,
|
||||
ProductWindow,
|
||||
StorePoster
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
domStatus: false,
|
||||
posterData: {
|
||||
image: "",
|
||||
title: "",
|
||||
price: "",
|
||||
code: ""
|
||||
},
|
||||
posterImageStatus: false,
|
||||
action: "",
|
||||
imgUrls: [],
|
||||
storeInfo: [],
|
||||
replyCount: 0,
|
||||
reply: [],
|
||||
cartNum: 1,
|
||||
attr: {
|
||||
cartAttr: false,
|
||||
productSelect: {
|
||||
image: "",
|
||||
store_name: "",
|
||||
price: "",
|
||||
stock: "",
|
||||
unique: "",
|
||||
cart_num: 1
|
||||
}
|
||||
},
|
||||
datatime: 0
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$yroute: function(n) {
|
||||
var that = this;
|
||||
if (n.name === NAME) {
|
||||
that.mountedStart();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
this.mountedStart();
|
||||
},
|
||||
methods: {
|
||||
routerGo(item) {
|
||||
this.$yrouter.push({ path: '/pages/user/CustomerList/index' })
|
||||
},
|
||||
mountedStart: function() {
|
||||
var that = this;
|
||||
let id = that.$yroute.query.id;
|
||||
that.datatime = parseInt(that.$yroute.query.time);
|
||||
getSeckillDetail(id).then(res => {
|
||||
res.data.storeInfo.description = res.data.storeInfo.description.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;"'
|
||||
);
|
||||
that.$set(that, "storeInfo", res.data.storeInfo);
|
||||
that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr);
|
||||
that.$set(that, "replyCount", res.data.replyCount);
|
||||
that.$set(that, "reply", res.data.reply);
|
||||
that.posterData.image = that.storeInfo.image_base;
|
||||
that.updateTitle();
|
||||
if (that.storeInfo.title.length > 30) {
|
||||
that.posterData.title = that.storeInfo.title.substring(0, 30) + "...";
|
||||
} else {
|
||||
that.posterData.title = that.storeInfo.title;
|
||||
}
|
||||
that.posterData.price = that.storeInfo.price;
|
||||
that.posterData.code = that.storeInfo.code_base;
|
||||
that.setProductSelect();
|
||||
that.domStatus = true;
|
||||
});
|
||||
},
|
||||
updateTitle() {
|
||||
// document.title = this.storeInfo.title || this.$yroute.meta.title;
|
||||
},
|
||||
setPosterImageStatus: function() {
|
||||
// var sTop = document.body || document.documentElement;
|
||||
// sTop.scrollTop = 0;
|
||||
this.posterImageStatus = !this.posterImageStatus;
|
||||
},
|
||||
//将父级向子集多次传送的函数合二为一;
|
||||
changeFun: function(opt) {
|
||||
if (typeof opt !== "object") opt = {};
|
||||
let action = opt.action || "";
|
||||
let value = opt.value === undefined ? "" : opt.value;
|
||||
this[action] && this[action](value);
|
||||
},
|
||||
changeattr: function(res) {
|
||||
var that = this;
|
||||
that.attr.cartAttr = res;
|
||||
},
|
||||
ChangeCartNum: function(res) {
|
||||
var that = this;
|
||||
if (res) {
|
||||
if (that.attr.productSelect.cart_num < that.storeInfo.stock) {
|
||||
that.attr.productSelect.cart_num++;
|
||||
this.cartNum++;
|
||||
}
|
||||
} else {
|
||||
if (that.attr.productSelect.cart_num > 1) {
|
||||
that.attr.productSelect.cart_num--;
|
||||
this.cartNum--;
|
||||
}
|
||||
}
|
||||
},
|
||||
setProductSelect: function() {
|
||||
var that = this;
|
||||
var attr = that.attr;
|
||||
attr.productSelect.image = that.storeInfo.image;
|
||||
attr.productSelect.store_name = that.storeInfo.title;
|
||||
attr.productSelect.price = that.storeInfo.price;
|
||||
attr.productSelect.stock = that.storeInfo.stock;
|
||||
attr.cartAttr = false;
|
||||
that.$set(that, "attr", attr);
|
||||
},
|
||||
selecAttrTap: function() {
|
||||
this.cartAttr = true;
|
||||
},
|
||||
tapBuy: function() {
|
||||
var that = this;
|
||||
if (that.attr.cartAttr == false) {
|
||||
that.attr.cartAttr = !this.attr.attrcartAttr;
|
||||
} else {
|
||||
var data = {};
|
||||
data.productId = that.storeInfo.productId;
|
||||
data.cartNum = that.attr.productSelect.cart_num;
|
||||
data.uniqueId = that.attr.productSelect.unique;
|
||||
data.secKillId = that.storeInfo.id;
|
||||
data.new = 1;
|
||||
postCartAdd(data)
|
||||
.then(res => {
|
||||
that.$yrouter.push({
|
||||
path: "/pages/order/OrderSubmission/index",
|
||||
query: { id: res.data.cartId }
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.product-con .nav {
|
||||
padding: 0 0.2*100rpx;
|
||||
}
|
||||
</style>
|
||||
+220
-88
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="pages-auth">
|
||||
<view class="tip-1">为了提供更优质的服务,需要获取</view>
|
||||
<view class="pages-auth v12-justify-between v12-flex-column">
|
||||
<!-- <view class="tip-1">为了提供更优质的服务,需要获取</view>
|
||||
<view class="tip-2">您的头像、昵称</view>
|
||||
|
||||
<view class="wechat flex jc-between ai-center">
|
||||
@@ -12,18 +12,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<image class="select" :src="webUrl+'/20220613104953149068.png'" mode="scaleToFill"/>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="agree-box">
|
||||
<checkbox-group @change="changeAgree">
|
||||
<label>
|
||||
<checkbox value="yes" style="transform:scale(0.8)"/>
|
||||
</label>
|
||||
<text @click="changeShow">我已阅读并同意
|
||||
<text class="btn-show">《用户服务协议及隐私政策》</text>
|
||||
</text>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="dialog-mask" v-if="show">
|
||||
<view class="dialog-body">
|
||||
@@ -40,19 +31,130 @@
|
||||
|
||||
<view class="dialog-mask" v-if="showFillOut">
|
||||
<view class="dialog-fill flex flex-col ai-center">
|
||||
<view class="title bold">请完善您的头像和昵称</view>
|
||||
<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
||||
<image class="avatar" :src="avatarUrl"></image>
|
||||
</button>
|
||||
<input type="nickname" class="input-wrapper" placeholder="请输入昵称" @input="inputName" @confirm="inputName"
|
||||
@blur="inputName"/>
|
||||
<view class="btn-submit" @click="onSubmit">确认</view>
|
||||
<!-- <view class="title bold">请完善您的信息</view> -->
|
||||
<view class="v12-align-center v12-justify-start v12-py-4" style="width:550rpx">
|
||||
<view class="v12-mr-3">
|
||||
<image class="app-logo__image--inner" :src="webUrl+'/orderIcon/applogo.png'" mode="aspectFit|aspectFill|widthFix" lazy-load="true"></image>
|
||||
</view>
|
||||
<view class="v12-dark-text v12-font-bold">
|
||||
<text class="v12-font-40">
|
||||
地标文化特产
|
||||
</text>
|
||||
<text class="v12-mx-1">
|
||||
|
|
||||
</text>
|
||||
<text class="v12-font-24">
|
||||
申请使用
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-dark-text v12-font-40 v12-mt-3 v12-font-bold" style="width:550rpx">
|
||||
获取你的昵称、头像
|
||||
</view>
|
||||
<view class="v12-align-center v12-justify-between v12-mb-3 v12-mt-6" style="width:550rpx">
|
||||
<view class="v12-align-center">
|
||||
<view class="v12-dark-text v12-mr-3">
|
||||
头像
|
||||
</view>
|
||||
<button
|
||||
class="avatar-wrapper v12-ma-0"
|
||||
open-type="chooseAvatar"
|
||||
@chooseavatar="onChooseAvatar"
|
||||
>
|
||||
<image
|
||||
:src="avatarUrl"
|
||||
class="avatar"
|
||||
/>
|
||||
</button>
|
||||
</view>
|
||||
<view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-align-center v12-justify-between v12-my-4" style="width:550rpx">
|
||||
<view class="v12-align-center">
|
||||
<view class="v12-dark-text v12-mr-3">
|
||||
昵称
|
||||
</view>
|
||||
<input
|
||||
type="nickname"
|
||||
maxlength="12"
|
||||
class="input-wrapper "
|
||||
placeholder="请填写您的昵称"
|
||||
v-model="nickname"
|
||||
@input="inputName"
|
||||
@confirm="inputName"
|
||||
@blur="inputName"
|
||||
/>
|
||||
</view>
|
||||
<view>
|
||||
<u-icon name="close" @click="clearName"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="input-wrapper">
|
||||
<picker
|
||||
:value="form.birthday"
|
||||
mode="date"
|
||||
class="picker"
|
||||
@change="birthdayChange"
|
||||
>
|
||||
{{ form.birthday || '请选择出生日期' }}
|
||||
</picker>
|
||||
</view> -->
|
||||
<!-- <view class="gender-row">
|
||||
性别:
|
||||
<u-radio-group
|
||||
v-model="form.gender"
|
||||
placement="row"
|
||||
>
|
||||
<u-radio
|
||||
:name="1"
|
||||
:customStyle="{marginRight: '16px'}"
|
||||
active-color="#C41617"
|
||||
label="男"
|
||||
/>
|
||||
<u-radio
|
||||
:name="2"
|
||||
active-color="#C41617"
|
||||
label="女"
|
||||
/>
|
||||
</u-radio-group>
|
||||
</view> -->
|
||||
<view class="v12-justify-between v12-py-6 " style="width: 550rpx">
|
||||
<view class="v12-primary-border v12-primary v12-white-text v12-btn v12-px-8 v12-py-1" @click="onSubmit">允许</view>
|
||||
<view class="v12-dark-border v12-dark-text v12-btn v12-px-8 v12-py-1" @click="back">拒绝</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="app-logo v12-align-center v12-flex-column">
|
||||
<image class="app-logo__image" :src="webUrl+'/orderIcon/applogo.png'" mode="aspectFit|aspectFill|widthFix" lazy-load="true"></image>
|
||||
<view class="v12-mt-3 v12-font-32 v12-dark-text v12-font-weight-600">发现家乡好物</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<button class="btn-yes" type="default" v-if="canIUseGetUserProfile" @tap="getUserInfoProfile">同意</button>
|
||||
<button class="btn-no" type="default" @tap="back">拒绝</button>
|
||||
<button class="btn-yes v12-primary" type="mini" @tap="getUserInfoProfile">快捷登录</button>
|
||||
<!-- <button class="btn-no" type="default" @tap="back">拒绝</button> -->
|
||||
</view>
|
||||
<view class="agree-box v12-align-center">
|
||||
<u-checkbox-group
|
||||
@change="changeAgree"
|
||||
v-model="isAgree"
|
||||
>
|
||||
<u-checkbox
|
||||
activeColor="#C52733"
|
||||
size="16"
|
||||
name="yes"
|
||||
>
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<text @click="changeShow">我已阅读并同意
|
||||
<text class="btn-show">《用户服务协议及隐私政策》</text>
|
||||
</text>
|
||||
<!-- <checkbox-group @change="changeAgree">
|
||||
<label>
|
||||
<checkbox value="yes" style="transform:scale(0.6)" iconColor="#C52733" />
|
||||
</label>
|
||||
|
||||
</checkbox-group> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -61,33 +163,30 @@
|
||||
import {mapActions, mapMutations, mapState} from 'vuex'
|
||||
import cookie from '@/utils/store/cookie'
|
||||
import {login, uploadImage} from '@/utils'
|
||||
import {getAgree} from "@/api/public";
|
||||
import {postUserEdit} from "@/api/user";
|
||||
|
||||
const defaultAvatarUrl = "/20230506100714762257.png"
|
||||
import {getAgree} from "@/api/public"
|
||||
import {postUserEdit} from "@/api/user"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
authorize: false,
|
||||
canIUseGetUserProfile: false,
|
||||
agreeInfo: {},
|
||||
isAgree: false,
|
||||
isAgree: [],
|
||||
show: false,
|
||||
|
||||
showFillOut: false,
|
||||
nickname: "",
|
||||
avatarUrl: this.$VUE_APP_RESOURCES_URL + defaultAvatarUrl,
|
||||
nickname: '',
|
||||
avatarUrl: this.$VUE_APP_RESOURCES_URL + '/20230506100714762257.png',
|
||||
form: {
|
||||
gender: '',
|
||||
birthday: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['isAuthorization', '$deviceType', 'token']),
|
||||
},
|
||||
onLoad() {
|
||||
if (wx.getUserProfile) {
|
||||
this.canIUseGetUserProfile = true
|
||||
}
|
||||
// 先校验用户是否授权,如果没有授权,显示授权按钮
|
||||
getAgree().then(({data}) => this.agreeInfo = data);
|
||||
},
|
||||
@@ -106,7 +205,10 @@ export default {
|
||||
this.show=!this.show;
|
||||
},
|
||||
changeAgree(event) {
|
||||
this.isAgree = event.detail.value.length > 0
|
||||
this.isAgree = event
|
||||
},
|
||||
clearName() {
|
||||
this.nickname = ''
|
||||
},
|
||||
toLogin() {
|
||||
this.$yrouter.push({
|
||||
@@ -121,18 +223,19 @@ export default {
|
||||
})
|
||||
},
|
||||
doneRedirect() {
|
||||
let redirectUrl = cookie.get('redirect') || "";
|
||||
redirectUrl = redirectUrl.replace(/\ /g, '');
|
||||
//如果已经是授权页,跳转主页
|
||||
let redirectUrl = cookie.get('redirect') || ''
|
||||
redirectUrl = redirectUrl.replace(/\ /g, '')
|
||||
// 如果已经是授权页,跳转主页
|
||||
if (redirectUrl == '/pages/authorization/index' || redirectUrl.length === 0) {
|
||||
redirectUrl = '/pages/home/index';
|
||||
redirectUrl = '/pages/home/index'
|
||||
}
|
||||
this.$yrouter.reLaunch({
|
||||
path: redirectUrl,
|
||||
path: redirectUrl
|
||||
})
|
||||
},
|
||||
getUserInfoProfile() {
|
||||
if (!this.isAgree) {
|
||||
const _this = this
|
||||
if (!_this.isAgree[0]) {
|
||||
uni.showToast({
|
||||
title: "请先阅读并同意《用户服务协议及隐私政策》",
|
||||
icon: "none",
|
||||
@@ -140,33 +243,33 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
wx.getUserProfile({
|
||||
lang: 'zh_CN',
|
||||
desc: '需要获取您的信息用来展示',
|
||||
success: res => {
|
||||
uni.showLoading({
|
||||
title: '登录中',
|
||||
})
|
||||
login(res).then(e => {
|
||||
let db_nickname = e.data.nickname;
|
||||
|
||||
if (db_nickname === null || db_nickname === undefined || db_nickname === "" || db_nickname === "微信用户") {
|
||||
this.showFillOut = true;
|
||||
} else {
|
||||
this.doneRedirect();
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
})
|
||||
},
|
||||
_this.loginReq(res)
|
||||
}
|
||||
})
|
||||
},
|
||||
loginReq(res) {
|
||||
uni.showLoading({
|
||||
title: '登录中'
|
||||
})
|
||||
login(res).then(e => {
|
||||
const db_nickname = e.data.nickname
|
||||
if (db_nickname === null || db_nickname === undefined || db_nickname === '' || db_nickname === '微信用户') {
|
||||
this.showFillOut = true
|
||||
} else {
|
||||
this.doneRedirect()
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onChooseAvatar(e) {
|
||||
const {avatarUrl} = e.detail;
|
||||
this.avatarUrl = avatarUrl;
|
||||
@@ -174,6 +277,10 @@ export default {
|
||||
inputName(e) {
|
||||
this.nickname = e.detail.value;
|
||||
},
|
||||
birthdayChange(e) {
|
||||
const value = e.detail.value
|
||||
this.form.birthday = value
|
||||
},
|
||||
onSubmit() {
|
||||
let that = this;
|
||||
|
||||
@@ -205,9 +312,11 @@ export default {
|
||||
},
|
||||
|
||||
saveUserInfo() {
|
||||
let param = {
|
||||
const param = {
|
||||
nickname: this.nickname,
|
||||
avatar: this.avatarUrl
|
||||
avatar: this.avatarUrl,
|
||||
gender: this.form.gender || 0,
|
||||
birthday: this.form.birthday || ''
|
||||
}
|
||||
postUserEdit(param).then(res => {
|
||||
if (res.status === 200) {
|
||||
@@ -232,10 +341,20 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="less">
|
||||
.app-logo{
|
||||
margin-top: 70rpx;
|
||||
}
|
||||
.app-logo__image--inner{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.pages-auth {
|
||||
padding: 148rpx 48rpx;
|
||||
|
||||
padding: 148rpx 48rpx;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
.tip-1 {
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
@@ -279,12 +398,12 @@ export default {
|
||||
}
|
||||
|
||||
.agree-box {
|
||||
margin: 200rpx 0 60rpx;
|
||||
// margin: 200rpx 0 60rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
|
||||
color: #333;
|
||||
padding: 0 20rpx;
|
||||
.btn-show {
|
||||
color: #000;
|
||||
color: #4099FF;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,7 +421,7 @@ export default {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 630rpx;
|
||||
width: 686rpx;
|
||||
height: 70vh;
|
||||
box-sizing: border-box;
|
||||
padding: 60rpx;
|
||||
@@ -335,8 +454,7 @@ export default {
|
||||
transform: translate(-50%, -50%);
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
width: 516rpx;
|
||||
height: 576rpx;
|
||||
width: 686rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #fff;
|
||||
|
||||
@@ -348,15 +466,14 @@ export default {
|
||||
}
|
||||
|
||||
.avatar-wrapper {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
margin-top: 38rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
padding: 0;
|
||||
background: none;
|
||||
|
||||
.avatar {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
@@ -366,21 +483,28 @@ export default {
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
width: 360rpx;
|
||||
height: 72rpx;
|
||||
margin-top: 32rpx;
|
||||
background: rgba(248, 249, 251, 1);
|
||||
color: #999;
|
||||
font-size: 32rpx;
|
||||
text-align: left;
|
||||
border-radius: 40rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.gender-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.picker {
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
|
||||
.btn-submit {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
margin: 32rpx 0 0 0;
|
||||
box-sizing: border-box;
|
||||
border-top: 2rpx solid #E0E0E0;
|
||||
color: #3A87FC;
|
||||
@@ -392,9 +516,10 @@ export default {
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
width: 338rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
// width: 338rpx;
|
||||
// margin: 0 auto;
|
||||
padding: 0 20rpx;
|
||||
padding-bottom: 340rpx;
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
@@ -405,8 +530,10 @@ export default {
|
||||
}
|
||||
|
||||
.btn-yes {
|
||||
background: #FF564A;
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
border-radius: 40rpx;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.btn-no {
|
||||
@@ -416,4 +543,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.app-logo__image{
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
</style>
|
||||
|
||||
+977
-132
File diff suppressed because it is too large
Load Diff
+220
-59
@@ -10,14 +10,14 @@
|
||||
@confirm="search"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/20220903142935869059.png'"
|
||||
:src="webUrl + '/orderIcon/search.png'"
|
||||
class="icon"
|
||||
mode="scaleToFill"
|
||||
@click="search"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="aside">
|
||||
<view class="aside" id="aside">
|
||||
<view
|
||||
v-for="(item, index) in listGroup"
|
||||
:key="index"
|
||||
@@ -44,7 +44,7 @@
|
||||
<view class="fixed-box">
|
||||
<view class="line-location flex ai-center">
|
||||
<image :src="webUrl + '/20220903142929759087.png'" mode="scaleToFill"></image>
|
||||
<text class="bold" v-if="location">当前定位:{{ location }}</text>
|
||||
<text class="bold" v-if="location">当前城市:{{ location }}</text>
|
||||
<view style="color:#f66" @click="reload()" v-else>定位失败
|
||||
<image :src="webUrl + '/20231215213824297278.png'" mode="scaleToFill" />
|
||||
</view>
|
||||
@@ -57,9 +57,20 @@
|
||||
@click="bannerItemTapHandle(banner)"
|
||||
/>
|
||||
</view>
|
||||
<!--9-2 推荐信息-->
|
||||
<view class="recommendInfo" v-if="recommendInfo && type < 2">
|
||||
<template v-if="(type === 0 && recommendInfo.hotelList) || (type === 1 && recommendInfo.productList)">
|
||||
<!--全国特产和文玩的推荐信息-->
|
||||
<view
|
||||
v-if="recommendInfo && type < 2"
|
||||
class="recommendInfo"
|
||||
>
|
||||
<!--bug#1060-增加控制-->
|
||||
<template
|
||||
v-if="recommendInfo.displayStatus === 1 &&
|
||||
(
|
||||
(type === 0 && recommendInfo.hotelList) ||
|
||||
(type === 1 && recommendInfo.productList)
|
||||
)
|
||||
"
|
||||
>
|
||||
<view class="red-border-title">{{ recommendInfo.title }}</view>
|
||||
<image
|
||||
:src="recommendInfo.backgroundImage"
|
||||
@@ -79,7 +90,11 @@
|
||||
class="item flex-0 flex flex-col jc-between ai-center"
|
||||
@click="goToStore(item.hotelId || '')"
|
||||
>
|
||||
<image class="cover" :src="item.hotelImage" mode="scaleToFill" />
|
||||
<image
|
||||
:src="item.hotelImage + (item.hotelImage.indexOf('.mp4') > -1 ? '?vframe/jpg/offset/1' : '')"
|
||||
class="cover"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image class="logo" :src="item.hotelLogo" mode="scaleToFill" />
|
||||
<view style="width: 100%;box-sizing: border-box;padding:0 8rpx">
|
||||
<view class="name tc one-t">{{ item.hotelName }}</view>
|
||||
@@ -114,7 +129,7 @@
|
||||
@click="select(item)"
|
||||
>
|
||||
<view class="has-goods" v-if="type === 0 && item.hasData === 0">暂无特产</view>
|
||||
<view class="has-goods" v-if="type > 0 && type < 6 && item.hasShop === 0">暂无店铺</view>
|
||||
<view class="has-goods" v-if="type > 0 && type < 6 && item.hasShop === 0 && item.hasAncientTown === 0">暂无店铺</view>
|
||||
<view class="has-goods" v-if="type === 6 && item.hasData === 0">暂无景点</view>
|
||||
<image :src="item.icon" mode="scaleToFill"></image>
|
||||
<view class="one-t">{{ item.cityName }}</view>
|
||||
@@ -122,37 +137,40 @@
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
<FunctionGuide :maxStep="maxStep" @hide="setGuide(pageKeyId)" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollMixins from "@/mixins/mescroll-mixins.js";
|
||||
import {fetchCity} from "@/api/wenwan";
|
||||
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
|
||||
import {getCurAddress, getLocation} from "@/utils/common.js";
|
||||
import MescrollMixins from '@/mixins/mescroll-mixins.js'
|
||||
import {fetchCity} from '@/api/wenwan'
|
||||
import MescrollBody from '@/components/mescroll-uni/mescroll-body.vue'
|
||||
import {getCurAddress, getLocation} from '@/utils/common.js'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
import FunctionGuide from '@/components/FunctionGuide'
|
||||
import GuideMixins from '@/mixins/GuideMixins'
|
||||
|
||||
export default {
|
||||
name: "choseCity",
|
||||
name: 'ChoseCity',
|
||||
components: {
|
||||
MescrollBody
|
||||
MescrollBody,
|
||||
FunctionGuide
|
||||
},
|
||||
props: {},
|
||||
mixins: [
|
||||
MescrollMixins({
|
||||
getPageData(mescroll) {
|
||||
// 此时mescroll会携带page的参数:
|
||||
// let pageNum = mescroll.num; // 页码, 默认从1开始
|
||||
// let pageSize = mescroll.size; // 页长, 默认每页10条
|
||||
|
||||
mescroll.endSuccess(10);
|
||||
mescroll.endSuccess(10)
|
||||
}
|
||||
})
|
||||
}),
|
||||
pageListenMixins,
|
||||
GuideMixins
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
upOption: {
|
||||
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||
// 如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||
noMoreSize: 10,
|
||||
auto: false,
|
||||
empty: {
|
||||
tip: '暂无城市'
|
||||
@@ -162,25 +180,129 @@ export default {
|
||||
auto: true
|
||||
},
|
||||
listGroup: [],
|
||||
provinceName: "",
|
||||
provinceName: '',
|
||||
listCity: [],
|
||||
navActive: 0,
|
||||
keyword: "",
|
||||
keyword: '',
|
||||
// 0、特产;1、文玩;2、七彩云上;3、特色礼品;4、康养食材;5、千县名品;6、景点门票
|
||||
type: null,
|
||||
location: "",
|
||||
location: '',
|
||||
banner: {},
|
||||
recommendInfo: null // 推荐信息
|
||||
};
|
||||
// 推荐信息
|
||||
recommendInfo: null,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
maxStep() {
|
||||
const stepsMap = {
|
||||
0: 1,
|
||||
1: 2,
|
||||
}
|
||||
return stepsMap[this.type] || 1
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.type = Number(options.type);
|
||||
this.location = options.city;
|
||||
if (this.location === undefined) {
|
||||
this.getMapData();
|
||||
const type = Number(options.type)
|
||||
this.type = type
|
||||
switch(type) {
|
||||
case 0:
|
||||
this.pageKeyId = 'goodsIndex'
|
||||
break
|
||||
case 1:
|
||||
this.pageKeyId = 'wenwanIndex'
|
||||
break
|
||||
case 3:
|
||||
this.pageKeyId = 'customizedGiftIndex'
|
||||
break
|
||||
case 4:
|
||||
this.pageKeyId = 'wellnessFoodIndex'
|
||||
break
|
||||
case 5:
|
||||
this.pageKeyId = 'countyFamousIndex'
|
||||
break
|
||||
default:
|
||||
this.pageKeyId = ''
|
||||
break
|
||||
}
|
||||
this.init();
|
||||
this.location = options.city
|
||||
if (this.location === undefined) {
|
||||
this.getMapData()
|
||||
}
|
||||
this.init()
|
||||
if([0,1] .includes(type)) {
|
||||
this.queryGuide(this.pageKeyId)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showFunctionGuide() {
|
||||
if(this._step == this.functionGuideData.step) return
|
||||
if(this.functionGuideData.step == 1) {
|
||||
this._step = this.functionGuideData.step
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/全国特产/Group 1-1.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '357rpx',
|
||||
top: '100rpx',
|
||||
left: '-110rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '382rpx',
|
||||
/* px: ; */
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/全国特产/Group 1-2.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 125*2+'rpx',
|
||||
left: -120*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/全国特产/Group 1-3.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 125*2+'rpx',
|
||||
left: 170*2+'rpx',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
this.getElementData('#aside', res=>{
|
||||
this.setFunctionGuideData({
|
||||
imgs: imgs,
|
||||
tipsPosition: '420rpx',
|
||||
btnGroupPosition: '',
|
||||
position: {
|
||||
top: res.top*2 + 'rpx',
|
||||
left: res.left*2 + 'rpx',
|
||||
width: `${res.width*2}rpx`,
|
||||
height: `${res.height*2}rpx`,
|
||||
}
|
||||
})
|
||||
})
|
||||
return
|
||||
} else {
|
||||
if(this.type === 1) {
|
||||
this.$refs.FunctionGuide.show = false
|
||||
}
|
||||
return
|
||||
}
|
||||
},
|
||||
reload() {
|
||||
uni.getSetting({
|
||||
success(res) {
|
||||
@@ -218,23 +340,23 @@ export default {
|
||||
})
|
||||
},
|
||||
async getMapData() {
|
||||
const map = await getLocation();
|
||||
const map = await getLocation()
|
||||
if (map) {
|
||||
const {latitude, longitude} = map[1];
|
||||
const address = await getCurAddress(latitude, longitude);
|
||||
this.location = address[1].data.result.ad_info.city;
|
||||
const {latitude, longitude} = map[1]
|
||||
const address = await getCurAddress(latitude, longitude)
|
||||
this.location = address[1].data.result.ad_info.city
|
||||
}
|
||||
},
|
||||
init() {
|
||||
fetchCity(this.type).then(res => {
|
||||
if (res.success) {
|
||||
this.listGroup = res.data.group;
|
||||
this.listGroup = res.data.group
|
||||
if (this.listGroup.length > 0) {
|
||||
this.listCity = this.listGroup[0].city;
|
||||
this.provinceName = this.listGroup[0].label;
|
||||
this.listCity = this.listGroup[0].city
|
||||
this.provinceName = this.listGroup[0].label
|
||||
this.recommendInfo = this.listGroup[0].recommendInfo
|
||||
this.banner = {
|
||||
...this.listGroup[0],
|
||||
...this.listGroup[0],
|
||||
icon: this.listGroup[0].icon,
|
||||
url: this.listGroup[0].uniappUrl
|
||||
}
|
||||
@@ -243,28 +365,29 @@ export default {
|
||||
})
|
||||
},
|
||||
asideTap(index) {
|
||||
this.navActive = index;
|
||||
this.listCity = this.listGroup[index].city;
|
||||
this.provinceName = this.listGroup[index].label;
|
||||
this.navActive = index
|
||||
this.listCity = this.listGroup[index].city
|
||||
this.provinceName = this.listGroup[index].label
|
||||
this.recommendInfo = this.listGroup[index].recommendInfo
|
||||
this.banner = {
|
||||
...this.listGroup[index],
|
||||
icon: this.listGroup[index].icon,
|
||||
url: this.listGroup[index].uniappUrl
|
||||
}
|
||||
//触发加载请求
|
||||
this.mescroll.scrollTo(0, 0);
|
||||
this.mescroll && this.mescroll.resetUpScroll(false);
|
||||
// 触发加载请求
|
||||
this.mescroll.scrollTo(0, 0)
|
||||
this.mescroll && this.mescroll.resetUpScroll(false)
|
||||
},
|
||||
emptyClick: function () {
|
||||
//触发加载请求
|
||||
this.mescroll && this.mescroll.triggerDownScroll()
|
||||
},
|
||||
search() {
|
||||
if(this.keyword === '') return
|
||||
this.listGroup.findIndex((group, index) => {
|
||||
let result;
|
||||
let result
|
||||
group.city.forEach(item => {
|
||||
result = item.cityName.indexOf(this.keyword, 0);
|
||||
result = item.cityName.indexOf(this.keyword, 0)
|
||||
if (result !== -1) {
|
||||
this.asideTap(index);
|
||||
return null;
|
||||
@@ -276,8 +399,8 @@ export default {
|
||||
})
|
||||
},
|
||||
select(item) {
|
||||
if (this.type === 0 && item.hasData === 0) return;
|
||||
if ((this.type === 1 || this.type === 2) && item.hasShop === 0) return;
|
||||
if (this.type === 0 && item.hasData === 0) return
|
||||
if ((this.type === 1 || this.type === 2) && item.hasShop === 0 && item.hasAncientTown === 0) return
|
||||
uni.setStorageSync("cityName", item.cityName)
|
||||
|
||||
switch (this.type) {
|
||||
@@ -285,20 +408,20 @@ export default {
|
||||
uni.navigateTo({
|
||||
url: `/pkg_product/views/nativeList?cityId=${item.cityId}`
|
||||
})
|
||||
break;
|
||||
break
|
||||
case 1:
|
||||
uni.navigateTo({
|
||||
url: `/wenwan/views/storeList?cityId=${item.cityId}`
|
||||
})
|
||||
break;
|
||||
break
|
||||
case 6:
|
||||
uni.navigateTo({
|
||||
url: `/pkg_product/views/scenicSpot?cityId=${item.cityId}`
|
||||
})
|
||||
break;
|
||||
break
|
||||
default:
|
||||
uni.navigateBack()
|
||||
break;
|
||||
break
|
||||
}
|
||||
},
|
||||
goToStore(id) {
|
||||
@@ -306,14 +429,49 @@ export default {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: "/pagesInn/inn/innHome?id=" + id
|
||||
url: '/pagesInn/inn/innHome?id=' + id + '&from=' + this.getOptionsParams()
|
||||
})
|
||||
},
|
||||
goToGoods(productId) {
|
||||
if (!productId) {
|
||||
return
|
||||
}
|
||||
this.$global.navToGoods(productId)
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${productId}&from=${this.getOptionsParams()}`
|
||||
})
|
||||
},
|
||||
goToExhibition(linkExhibitionId) {
|
||||
if (!linkExhibitionId) {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pkg_product/views/expoDetails?id=${linkExhibitionId}&from=${this.getOptionsParams()}`
|
||||
})
|
||||
},
|
||||
getOptionsParams() {
|
||||
// 0、特产;1、文玩;2、七彩云上;3、特色礼品;4、康养食材;5、千县名品;6、景点门票
|
||||
let from = ''
|
||||
switch(this.type) {
|
||||
case 0:
|
||||
from = 'techan'
|
||||
break
|
||||
case 1:
|
||||
from = 'wenwan'
|
||||
break
|
||||
case 3:
|
||||
from = 'gift'
|
||||
break
|
||||
case 4:
|
||||
from = 'wellness'
|
||||
break
|
||||
case 5:
|
||||
from = 'famous'
|
||||
break
|
||||
default:
|
||||
from = ''
|
||||
break
|
||||
}
|
||||
return from
|
||||
},
|
||||
bannerItemTapHandle(banner) {
|
||||
if (!banner) {
|
||||
@@ -332,6 +490,9 @@ export default {
|
||||
case 2:
|
||||
this.goToGoods(banner.linkProductId)
|
||||
break
|
||||
case 3:
|
||||
this.goToExhibition(banner.linkExhibitionId)
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -432,10 +593,10 @@ export default {
|
||||
}
|
||||
|
||||
.item.on {
|
||||
border-left: 6rpx solid #FD574B;
|
||||
border-left: 6rpx solid #C52733;
|
||||
|
||||
.name {
|
||||
color: #FD574B;
|
||||
color: #C52733;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@@ -455,7 +616,7 @@ export default {
|
||||
box-sizing: border-box;
|
||||
margin: 18rpx 0;
|
||||
padding: 8rpx 0 0 8rpx;
|
||||
border-left: 6rpx solid #FD574B;
|
||||
border-left: 6rpx solid #C52733;
|
||||
color: #262626;
|
||||
font-size: 30rpx;
|
||||
line-height: 30rpx;
|
||||
|
||||
+315
-307
@@ -1,9 +1,19 @@
|
||||
<template>
|
||||
<view class="cloud-page">
|
||||
<view class="search-box">
|
||||
<uni-search-bar placeholder="输入搜索关键词" @confirm="search" @clear="clearName"></uni-search-bar>
|
||||
<view class="search-box flex">
|
||||
<view class="city-box" @click="goCity('cloud')">
|
||||
<image
|
||||
:src="webUrl+'/20220903142929759087.png'"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<text>{{ cityName }}</text>
|
||||
</view>
|
||||
<uni-search-bar
|
||||
placeholder="输入搜索关键词"
|
||||
@confirm="search"
|
||||
@clear="clearName"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="nav-box">
|
||||
<view
|
||||
v-for="(item, index) in typeList"
|
||||
@@ -12,370 +22,368 @@
|
||||
@click="changeType(index)"
|
||||
>
|
||||
<image :src="item.icon" mode="scaleToFill"></image>
|
||||
<view class="nav">{{item.name}}</view>
|
||||
<view class="nav">{{ item.name }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="list-box">
|
||||
<text class="type-name">{{typeList[type]['name']}}</text>
|
||||
|
||||
<view class="city-box" @click="goCity('cloud')">
|
||||
<image :src="webUrl+'/20220903142929759087.png'" mode="scaleToFill"></image>
|
||||
<text>{{cityName}}</text>
|
||||
</view>
|
||||
|
||||
<view class="list" v-if="hotelList.length">
|
||||
<view
|
||||
v-if="hotelList.length"
|
||||
class="list"
|
||||
>
|
||||
<custom-waterfalls-flow :value="hotelList" imageKey="cover">
|
||||
<view class="item" v-for="(item,index) in hotelList" :key="index" slot="slot{{index}}"
|
||||
@click="goInnDetail(item)">
|
||||
<view
|
||||
v-for="(item,index) in hotelList"
|
||||
:key="index"
|
||||
slot="slot{{index}}"
|
||||
class="item"
|
||||
@click="goInnDetail(item)"
|
||||
>
|
||||
<view class="cover-box">
|
||||
<image class="cover" :src="item.cover" mode="scaleToFill"></image>
|
||||
<image
|
||||
:src="item.cover"
|
||||
mode="scaleToFill"
|
||||
class="cover"
|
||||
/>
|
||||
<view class="my-mask">
|
||||
<image class="icon" :src="webUrl+'/20220510142728577618.png'" mode="scaleToFill"></image>
|
||||
<text>{{item.cityName}}</text>
|
||||
<image
|
||||
class="icon"
|
||||
:src="webUrl+'/20220510142728577618.png'"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<text>{{ item.cityName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="more-t">{{item.content}}</view>
|
||||
<view class="more-t">{{ item.content }}</view>
|
||||
<view class="flex ai-center" style="margin-bottom: 18rpx;">
|
||||
<image class="logo" :src="item.logo" mode="scaleToFill"></image>
|
||||
<text class="one-t">{{item.name}}</text>
|
||||
<image
|
||||
class="logo"
|
||||
:src="item.logo"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<text class="one-t">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</custom-waterfalls-flow>
|
||||
</view>
|
||||
|
||||
<view class="v4-nodata" v-else>
|
||||
<image src="@/static/images/img_nodata.png" mode="scaleToFill" />
|
||||
<view class="text">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from '@/utils/mapConfig';
|
||||
import {
|
||||
getHotelTypeList,
|
||||
getHotelList
|
||||
} from "@/api/inn.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
typeList: [],
|
||||
name: "",
|
||||
page: 1,
|
||||
type: 0,
|
||||
tabName: "", // 跳转初始分类名
|
||||
hotelList: [],
|
||||
cityName: "丽江市",
|
||||
paramCity: ""
|
||||
}
|
||||
import config from '@/utils/mapConfig'
|
||||
import {
|
||||
getHotelTypeList,
|
||||
getHotelList
|
||||
} from '@/api/inn.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
typeList: [],
|
||||
name: '',
|
||||
page: 1,
|
||||
type: 0,
|
||||
// 跳转初始分类名
|
||||
tabName: '',
|
||||
hotelList: [],
|
||||
cityName: '丽江市',
|
||||
paramCity: ''
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
this.fetchTypeList()
|
||||
},
|
||||
onShow() {
|
||||
const name = uni.getStorageSync('name')
|
||||
if (name) {
|
||||
this.tabName = name
|
||||
uni.removeStorageSync('name')
|
||||
}
|
||||
const memCityName = uni.getStorageSync('cityName')
|
||||
if (memCityName.length) {
|
||||
this.cityName = memCityName
|
||||
this.paramCity = memCityName
|
||||
this.page = 1
|
||||
this.hotelList = []
|
||||
this.fetchList()
|
||||
uni.removeStorageSync('cityName')
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.page++
|
||||
this.fetchList()
|
||||
},
|
||||
methods: {
|
||||
goCity() {
|
||||
uni.navigateTo({
|
||||
url:`/pages/chose-city/chose-city?type=2&city=${this.cityName}`
|
||||
})
|
||||
},
|
||||
onLoad(){
|
||||
this.fetchTypeList()
|
||||
},
|
||||
onShow() {
|
||||
let name = uni.getStorageSync("name");
|
||||
if (name) {
|
||||
this.tabName = name;
|
||||
uni.removeStorageSync("name");
|
||||
}
|
||||
//获取当前定位地址
|
||||
getCurAddress() {
|
||||
const that = this
|
||||
//定位
|
||||
uni.showLoading({
|
||||
title: '定位中...'
|
||||
})
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(res) {
|
||||
let latitude = res.latitude
|
||||
let longitude = res.longitude
|
||||
// #ifdef H5
|
||||
Vue.jsonp(
|
||||
'https://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' + longitude + '&key=' +
|
||||
config.key, {
|
||||
output: 'jsonp',
|
||||
}).then(json => {
|
||||
// Success.
|
||||
uni.hideLoading();
|
||||
that.cityName = json.result.ad_info.city
|
||||
that.paramCity = json.result.ad_info.city
|
||||
//定位成功刷新数据
|
||||
that.fetchList()
|
||||
}).catch(err => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
// #endif
|
||||
|
||||
let memCityName = uni.getStorageSync("cityName")
|
||||
if (memCityName.length) {
|
||||
this.cityName = memCityName;
|
||||
this.paramCity = memCityName;
|
||||
this.page = 1;
|
||||
this.hotelList = [];
|
||||
this.fetchList();
|
||||
|
||||
uni.removeStorageSync("cityName")
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.page++;
|
||||
this.fetchList();
|
||||
},
|
||||
methods: {
|
||||
goCity() {
|
||||
uni.navigateTo({
|
||||
url:`/pages/chose-city/chose-city?type=2&city=${this.cityName}`
|
||||
})
|
||||
},
|
||||
//获取当前定位地址
|
||||
getCurAddress() {
|
||||
var that = this;
|
||||
//定位
|
||||
uni.showLoading({
|
||||
title: '定位中...'
|
||||
});
|
||||
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(res) {
|
||||
let latitude = res.latitude;
|
||||
let longitude = res.longitude;
|
||||
|
||||
// #ifdef H5
|
||||
Vue.jsonp(
|
||||
'https://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' + longitude + '&key=' +
|
||||
config.key, {
|
||||
output: 'jsonp',
|
||||
}).then(json => {
|
||||
// Success.
|
||||
// #ifndef H5
|
||||
uni.request({
|
||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' + longitude +
|
||||
'&key=' + config.key,
|
||||
success: function(res) {
|
||||
uni.hideLoading();
|
||||
that.cityName = json.result.ad_info.city;
|
||||
that.paramCity = json.result.ad_info.city;
|
||||
|
||||
that.cityName = res.data.result.ad_info.city
|
||||
that.paramCity = res.data.result.ad_info.city
|
||||
//定位成功刷新数据
|
||||
that.fetchList()
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
uni.request({
|
||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' + longitude +
|
||||
'&key=' + config.key,
|
||||
success: function(res) {
|
||||
uni.hideLoading();
|
||||
|
||||
that.cityName = res.data.result.ad_info.city;
|
||||
that.paramCity = res.data.result.ad_info.city;
|
||||
//定位成功刷新数据
|
||||
that.fetchList()
|
||||
},
|
||||
fail: function(res) {
|
||||
uni.hideLoading();
|
||||
},
|
||||
complete: function() {}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
fail: function(res) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
fetchTypeList() {
|
||||
this.hotelList = []
|
||||
getHotelTypeList().then(res => {
|
||||
if (res.status === 200) {
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
if (this.tabName == res.data[i].name) this.type = i;
|
||||
},
|
||||
fail: function(res) {
|
||||
uni.hideLoading()
|
||||
}
|
||||
|
||||
this.typeList = res.data
|
||||
|
||||
let memCityName = uni.getStorageSync("cityName")
|
||||
if (memCityName.length) {
|
||||
this.cityName = memCityName;
|
||||
this.paramCity = memCityName;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.fetchList();
|
||||
|
||||
uni.removeStorageSync("cityName")
|
||||
} else {
|
||||
this.getCurAddress();
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
fail: function(res) {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
fetchTypeList() {
|
||||
this.hotelList = []
|
||||
getHotelTypeList().then(res => {
|
||||
const { status, data } = res
|
||||
if (status === 200) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (this.tabName == data[i].name) {
|
||||
this.type = i
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
search(e) {
|
||||
this.name = e.value;
|
||||
this.page = 1;
|
||||
this.hotelList = [];
|
||||
this.fetchList();
|
||||
},
|
||||
|
||||
clearName() {
|
||||
this.name = "";
|
||||
this.page = 1;
|
||||
this.hotelList = [];
|
||||
this.fetchList();
|
||||
},
|
||||
|
||||
changeType(index) {
|
||||
this.type = index;
|
||||
this.page = 1;
|
||||
this.hotelList = [];
|
||||
this.fetchList();
|
||||
},
|
||||
|
||||
fetchList() {
|
||||
getHotelList({
|
||||
name: this.name,
|
||||
page: this.page,
|
||||
type: this.typeList[this.type].id,
|
||||
cityName: this.paramCity
|
||||
}).then(res => {
|
||||
if (res.status === 200) {
|
||||
this.paramCity = this.cityName;
|
||||
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
res.data[i].hide = true;
|
||||
this.hotelList.push(res.data[i])
|
||||
}
|
||||
this.typeList = data
|
||||
const memCityName = uni.getStorageSync('cityName')
|
||||
if (memCityName.length) {
|
||||
this.cityName = memCityName
|
||||
this.paramCity = memCityName
|
||||
this.page = 1
|
||||
this.list = []
|
||||
this.fetchList()
|
||||
uni.removeStorageSync('cityName')
|
||||
} else {
|
||||
this.getCurAddress()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
goInnDetail: function(item) {
|
||||
//跳转到客栈详情
|
||||
this.$yrouter.push({
|
||||
path: "/pagesInn/inn/innHome",
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
search(e) {
|
||||
this.name = e.value
|
||||
this.page = 1
|
||||
this.hotelList = []
|
||||
this.fetchList()
|
||||
},
|
||||
clearName() {
|
||||
this.name = ''
|
||||
this.page = 1
|
||||
this.hotelList = []
|
||||
this.fetchList()
|
||||
},
|
||||
changeType(index) {
|
||||
this.type = index
|
||||
this.page = 1
|
||||
this.hotelList = []
|
||||
this.fetchList()
|
||||
},
|
||||
fetchList() {
|
||||
getHotelList({
|
||||
name: this.name,
|
||||
page: this.page,
|
||||
type: this.typeList[this.type].id,
|
||||
cityName: this.paramCity
|
||||
}).then(res => {
|
||||
if (res.status === 200) {
|
||||
this.paramCity = this.cityName
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
res.data[i].hide = true
|
||||
this.hotelList.push(res.data[i])
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
goInnDetail(item) {
|
||||
//跳转到客栈详情
|
||||
this.$yrouter.push({
|
||||
path: '/pagesInn/inn/innHome',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.cloud-page {
|
||||
.search-box {
|
||||
padding: 0 12rpx;
|
||||
background: #fff;
|
||||
.cloud-page {
|
||||
.search-box {
|
||||
padding: 0 12rpx;
|
||||
background: #fff;
|
||||
|
||||
/deep/.uni-searchbar__box {
|
||||
border-radius: 44rpx !important;
|
||||
}
|
||||
/deep/.uni-searchbar__box {
|
||||
border-radius: 44rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.city-box {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-left: 32rpx;
|
||||
padding: 8rpx 18rpx 8rpx 16rpx;
|
||||
border-radius: 30px;
|
||||
background: #fff;
|
||||
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.city-box {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
display: inline-flex;
|
||||
text {
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 36rpx 24rpx;
|
||||
background: #fff;
|
||||
overflow-x: auto;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-left: 32rpx;
|
||||
padding: 8rpx 18rpx 8rpx 16rpx;
|
||||
border-radius: 30px;
|
||||
background: #fff;
|
||||
margin-left: 70rpx;
|
||||
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 4rpx;
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
.nav {
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 36rpx 24rpx;
|
||||
background: #fff;
|
||||
overflow-x: auto;
|
||||
.item:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-left: 70rpx;
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
.list-box {
|
||||
padding: 20rpx 32rpx;
|
||||
|
||||
.nav {
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.item:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
.type-name {
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #080F1A;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
.type-name::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 10rpx;
|
||||
background: rgba(253, 104, 93, 0.39);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.list-box {
|
||||
padding: 20rpx 32rpx;
|
||||
.list {
|
||||
margin-top: 20rpx;
|
||||
|
||||
.type-name {
|
||||
.cover {
|
||||
width: 332rpx;
|
||||
height: 332rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
vertical-align: middle;
|
||||
margin: 0 8rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.cover-box {
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #080F1A;
|
||||
height: auto;
|
||||
|
||||
.my-mask {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 24rpx;
|
||||
background: linear-gradient(rgba(51, 51, 51, 0), rgba(0, 0, 0, 1));
|
||||
color: #fff;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.type-name::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 10rpx;
|
||||
background: rgba(253, 104, 93, 0.39);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.list {
|
||||
margin-top: 20rpx;
|
||||
|
||||
.cover {
|
||||
width: 332rpx;
|
||||
height: 332rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
vertical-align: middle;
|
||||
margin: 0 8rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.cover-box {
|
||||
position: relative;
|
||||
height: auto;
|
||||
|
||||
.my-mask {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 24rpx;
|
||||
background: linear-gradient(rgba(51, 51, 51, 0), rgba(0, 0, 0, 1));
|
||||
color: #fff;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.more-t {
|
||||
margin: 10rpx;
|
||||
}
|
||||
.more-t {
|
||||
margin: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -17,18 +17,22 @@
|
||||
</view>
|
||||
<view class="more-t">{{ item.content }}</view>
|
||||
<view class="flex ai-center bottom">
|
||||
<image
|
||||
v-if="item.logo"
|
||||
:src="item.logo"
|
||||
<view
|
||||
class="logo"
|
||||
mode="scaleToFill"
|
||||
></image>
|
||||
<image
|
||||
>
|
||||
<image
|
||||
v-if="item.logo"
|
||||
:src="item.logo"
|
||||
class="logo"
|
||||
mode="scaleToFill"
|
||||
></image>
|
||||
<image
|
||||
v-else
|
||||
:src="webUrl + '/20230609145651814148.png'"
|
||||
class="logo"
|
||||
/>
|
||||
<text class="one-t">{{ item.name }}</text>
|
||||
</view>
|
||||
<text class="one-t v12-ml-1">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -51,18 +55,24 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.logo {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
vertical-align: middle;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.cover-box-wrap {
|
||||
margin: 20rpx 0 0 0;
|
||||
.cover-box {
|
||||
position: relative;
|
||||
width: 328rpx;
|
||||
width: 338rpx;
|
||||
height: auto;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.cover {
|
||||
width: 328rpx;
|
||||
height: 328rpx;
|
||||
width: 338rpx;
|
||||
height: 338rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.icon {
|
||||
@@ -73,8 +83,8 @@ export default {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.logo {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
vertical-align: middle;
|
||||
margin: 0 8rpx;
|
||||
border-radius: 50%;
|
||||
@@ -105,6 +115,7 @@ export default {
|
||||
}
|
||||
.bottom {
|
||||
margin: 0 0 20rpx 0;
|
||||
align-content: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
+548
-63
@@ -1,41 +1,130 @@
|
||||
<template>
|
||||
<view class="have-fun">
|
||||
<view class="have-fun tabbar-page">
|
||||
<view class="top-box">
|
||||
<view class="search-box flex jc-between ai-center">
|
||||
<input
|
||||
v-model="name"
|
||||
type="text"
|
||||
placeholder="搜索店铺"
|
||||
placeholder-style="color:#949494"
|
||||
@confirm="search"
|
||||
>
|
||||
<view class="v12-justify-start v12-align-center">
|
||||
<view class="flex jc-end">
|
||||
<view class="city-box" @click="goCity('cloud')" id="city-box">
|
||||
<text style="white-space:nowrap; width: 90rpx" class="v12-primary-text one-t">{{ cityName }}</text>
|
||||
<image :src="webUrl+'/icon/fun-city-change.png'" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-box v12-primary-border flex jc-between ai-center">
|
||||
<input
|
||||
v-model="name"
|
||||
type="text"
|
||||
placeholder="请输入关键词~"
|
||||
placeholder-style="color:#949494"
|
||||
@confirm="search"
|
||||
>
|
||||
<view class="search-btn v12-primary v12-white-text v12-radius-60" @click="search">
|
||||
<text class="v12-font-bold">搜索</text>
|
||||
<image
|
||||
class="icon v12-ml-1"
|
||||
:src="webUrl+'/orderIcon/搜索 (1).png'"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-pa-2" style="position: relative">
|
||||
<view class="v12-radius-20 v12-px-2 v12-py-1 tip-wrap v12-align-center v12-justify-between">
|
||||
<view class="v12-align-center">
|
||||
<image
|
||||
class="map-icon"
|
||||
mode="scaleToFill"
|
||||
:src="webUrl + '/orderIcon/map_white.png'"
|
||||
></image>
|
||||
<text style="width: 95%" class="v12-font-24 v12-white-text">定位显示你在 {{ cityName }} 点击可切换其他城市</text>
|
||||
</view>
|
||||
<view @click="goCity('cloud')" class="qh-btn v12-white v12-radius-10 v12-font-24 v12-font-bold v12-dark-text v12-px-2">点击切换</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="type-box flex" id="type-box">
|
||||
<view class="first-box">
|
||||
<view class="first-box__inner">
|
||||
<view
|
||||
:class="{
|
||||
'active': typeIndex === -1
|
||||
}"
|
||||
class="item flex-0 flex flex-col jc-center ai-center"
|
||||
@click="tapType(-1)"
|
||||
>
|
||||
<image :src="townConfig.icon" mode="scaleToFill"/>
|
||||
<view class="name">{{ townConfig.label }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="padding-left: 0" class="type-box flex " >
|
||||
|
||||
</view> -->
|
||||
<view class="scroll-box">
|
||||
<view
|
||||
v-for="(item, index) in typeList"
|
||||
:key="index"
|
||||
:class="{
|
||||
'active': typeIndex === index
|
||||
}"
|
||||
class="item flex-0 flex flex-col jc-center ai-center"
|
||||
@click="tapType(index)"
|
||||
>
|
||||
<image :src="item.icon" mode="scaleToFill"/>
|
||||
<view class="name">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="type-banner-wrap">
|
||||
<view v-if="currType.titleImage" class="title">
|
||||
<image
|
||||
class="icon"
|
||||
:src="webUrl+'/20220903142935869059.png'"
|
||||
mode="scaleToFill"
|
||||
@click="search"
|
||||
:src="currType.titleImage"
|
||||
mode="heightFix"
|
||||
class="img"
|
||||
/>
|
||||
</view>
|
||||
<scroll-view class="type-box flex" scroll-x enable-flex>
|
||||
<view
|
||||
v-for="(item, index) in typeList"
|
||||
:key="index"
|
||||
:class="{
|
||||
'active': typeIndex === index
|
||||
}"
|
||||
class="item flex-0 flex flex-col jc-center ai-center"
|
||||
@click="tapType(index)"
|
||||
<view v-if="currType.carousel" class="slider-wrap">
|
||||
<swiper
|
||||
indicatorDots="true"
|
||||
indicator-color="rgba(255, 255, 255, .3)"
|
||||
indicator-active-color="#ffffff"
|
||||
autoplay
|
||||
circular
|
||||
style="height: 330rpx;"
|
||||
>
|
||||
<image :src="item.icon" mode="scaleToFill"/>
|
||||
<view class="name">{{ item.name }}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<block
|
||||
v-for="(item, bannerIndex) in currType.carousel"
|
||||
:key="bannerIndex"
|
||||
>
|
||||
<swiper-item>
|
||||
<view class="swiper-item" @click="typeBannerItemClick(item)">
|
||||
<image :src="item.carouselImage" class="img" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="body">
|
||||
<view class="flex jc-end">
|
||||
<view class="city-box" @click="goCity('cloud')">
|
||||
<image :src="webUrl+'/20220903142929759087.png'" mode="scaleToFill"></image>
|
||||
<text>{{ cityName }}</text>
|
||||
<view class="body" v-if="typeIndex === -1" id="body1">
|
||||
<view class="town-card" v-for="(town, i) in townList" :key="i" @click="toTown(town)">
|
||||
<!-- <view class="town-title">{{ town.name }}</view> -->
|
||||
<image :src="town.frontImage" mode="scaleToFill"/>
|
||||
<view class="v12-primary enter-btn">点击进入
|
||||
<view class="icon-box"><u-icon name="arrow-rightward" color="#fff" size="8"></u-icon></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v4-nodata" v-if="townList.length === 0">
|
||||
<image src="@/static/images/img_nodata.png" mode="scaleToFill"/>
|
||||
<view class="text">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="body" v-else>
|
||||
<view class="v12-justify-between v12-align-center">
|
||||
<text class="v12-font-bold" v-if="currType.carousel">推荐</text>
|
||||
<view class="v12-dark1-text v12-font-28 v12-align-center" @click="handleRefresh">
|
||||
<u-icon name="reload"></u-icon>
|
||||
换一换
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isLoad">
|
||||
@@ -68,30 +157,47 @@
|
||||
<view class="text">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
<goo-skeleton v-else />
|
||||
<goo-skeleton
|
||||
v-else
|
||||
:show-avatar="false"
|
||||
/>
|
||||
</view>
|
||||
<FunctionGuide @hide="setGuide('findFunIndex')" :maxStep="3" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
|
||||
<xdd-tabbar :curr-index="4" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getHotelList, getHotelTypeList } from "@/api/inn.js"
|
||||
import { getHotelList, getHotelTypeList, getAncientTownIcon, getAncientTownList } from "@/api/inn.js"
|
||||
import { getCurAddress, getLocation } from "@/utils/common"
|
||||
import GooSkeleton from '@/components/GooSkeleton/index.vue'
|
||||
import FunHotelItem from './components/HotelItem'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
import XddTabbar from '@/components/xdd-tabbar'
|
||||
import FunctionGuide from '@/components/FunctionGuide'
|
||||
import GuideMixins from '@/mixins/GuideMixins'
|
||||
export default {
|
||||
components: {
|
||||
GooSkeleton,
|
||||
FunHotelItem
|
||||
FunHotelItem,
|
||||
XddTabbar,
|
||||
FunctionGuide
|
||||
},
|
||||
mixins: [pageListenMixins, GuideMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
name: '',
|
||||
page: 1,
|
||||
typeList: [],
|
||||
typeIndex: 0,
|
||||
typeIndex: -1,
|
||||
// 当前选中的类型
|
||||
currType: {},
|
||||
cityName: '',
|
||||
hotelList: [],
|
||||
isLoad: false
|
||||
isLoad: false,
|
||||
pageKeyId: Object.freeze('findFunIndex'),
|
||||
isNext: false,
|
||||
townConfig: {},
|
||||
townList: [],
|
||||
randomSeed: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -104,21 +210,236 @@ export default {
|
||||
return arr
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
// 后端接口结构需要调整下,需要补充总页数,前端可判断当前页数大于等于总页数则不发送网络请求
|
||||
if(this.isNext) {
|
||||
this.page++
|
||||
const random = this.randomSeed ? 1 : 0
|
||||
this.fetchList(random, this.randomSeed)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getMapData()
|
||||
this.currType = {}
|
||||
getHotelTypeList().then(({data}) => {
|
||||
this.typeList = data;
|
||||
this.typeList = data
|
||||
this.currType = this.typeIndex === -1 ? {} : data[this.typeIndex]
|
||||
this.getMapData()
|
||||
})
|
||||
this.getIcon()
|
||||
this.queryGuide('findFunIndex')
|
||||
},
|
||||
onShow() {
|
||||
const memCityName = uni.getStorageSync('cityName')
|
||||
// this.typeIndex = 0
|
||||
this.name = ''
|
||||
if (memCityName.length) {
|
||||
this.cityName = memCityName
|
||||
uni.removeStorageSync('cityName')
|
||||
this.search()
|
||||
this.name = ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cityName: {
|
||||
handler(value) {
|
||||
if(value) {
|
||||
this.search()
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showFunctionGuide() {
|
||||
if(this._step == this.functionGuideData.step) return
|
||||
if(this.functionGuideData.step == 1) {
|
||||
this._step = this.functionGuideData.step
|
||||
|
||||
this.getElementData('#city-box', res=>{
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/寻趣味/Group 1/Group 1-1.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '390rpx',
|
||||
top: 0*2+'rpx',
|
||||
left: res.width*2+'rpx',
|
||||
height: '162rpx',
|
||||
/* px: ; */
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/寻趣味/Group 1/Group 1-2.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 80*2+'rpx',
|
||||
left: -60*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/寻趣味/Group 1/Group 1-3.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 80*2+'rpx',
|
||||
left: 200*2+'rpx',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
this.setFunctionGuideData({
|
||||
imgs: imgs,
|
||||
tipsPosition: '420rpx',
|
||||
btnGroupPosition: '',
|
||||
position: {
|
||||
top: res.top + 'px',
|
||||
left: res.left + 'px',
|
||||
width: `${res.width}px`,
|
||||
height: `${res.height}px`,
|
||||
}
|
||||
})
|
||||
})
|
||||
return
|
||||
} else {
|
||||
if(this.functionGuideData.step == 2) {
|
||||
this._step = this.functionGuideData.step
|
||||
|
||||
this.getElementData('#type-box', res=>{
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/寻趣味/Group 2/Group 2-1.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '504rpx',
|
||||
top: 170*2+'rpx',
|
||||
left: 0+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '191rpx',
|
||||
/* px: ; */
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/寻趣味/Group 2/Group 2-3.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 270*2+'rpx',
|
||||
left: -160*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/寻趣味/Group 2/Group 2-2.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 270*2+'rpx',
|
||||
left: 160*2+'rpx',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
this.setFunctionGuideData({
|
||||
imgs: imgs,
|
||||
tipsPosition: '420rpx',
|
||||
btnGroupPosition: '',
|
||||
position: {
|
||||
top: res.top + 'px',
|
||||
left: res.left + 'px',
|
||||
width: `${res.width}px`,
|
||||
height: `${(res.height-20)}px`,
|
||||
}
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.functionGuideData.step == 3) {
|
||||
this._step = this.functionGuideData.step
|
||||
|
||||
this.getElementData('#body1', res=>{
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/寻趣味/Group 3/Group 3-1.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '290rpx',
|
||||
top: 90*2+'rpx',
|
||||
left: 0,
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '165rpx',
|
||||
/* px: ; */
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/寻趣味/Group 3/Group 3-2.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '97rpx',
|
||||
top: 60*2+'rpx',
|
||||
left: 60*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '55rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
]
|
||||
this.setFunctionGuideData({
|
||||
imgs: imgs,
|
||||
tipsPosition: '420rpx',
|
||||
btnGroupPosition: '',
|
||||
position: {
|
||||
top: (res.top) + 'px',
|
||||
left: res.left+10 + 'px',
|
||||
width: `${res.width-20}px`,
|
||||
height: `${res.height-20}px`,
|
||||
}
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
},
|
||||
handleRefresh() {
|
||||
uni.showLoading()
|
||||
this.page = 1
|
||||
this.hotelList = []
|
||||
this.fetchList(1, this.randomSeed)
|
||||
},
|
||||
toTown(town) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/town/index?id=${town.id}`
|
||||
})
|
||||
},
|
||||
getIcon() {
|
||||
getAncientTownIcon().then(res => {
|
||||
this.townConfig = res.data
|
||||
})
|
||||
},
|
||||
goCity() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/chose-city/chose-city?type=2&city=${this.cityName}`
|
||||
@@ -126,7 +447,7 @@ export default {
|
||||
},
|
||||
goInnDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesInn/inn/innHome?id=${item.id}`
|
||||
url: `/pagesInn/inn/innHome?id=${item.id}&from=fun`
|
||||
})
|
||||
},
|
||||
async getMapData() {
|
||||
@@ -134,13 +455,19 @@ export default {
|
||||
if (map.length > 1) {
|
||||
const {latitude, longitude} = map[1]
|
||||
const address = await getCurAddress(latitude, longitude)
|
||||
this.cityName = address[1].data.result.ad_info.city
|
||||
this.search()
|
||||
if(!this.cityName) {
|
||||
this.cityName = address[1].data.result.ad_info.city
|
||||
}
|
||||
// this.search()
|
||||
}
|
||||
},
|
||||
tapType(index) {
|
||||
|
||||
if (this.typeIndex === index) return
|
||||
this.typeIndex = index
|
||||
this.randomSeed = null
|
||||
this.currType = index === -1 ? {} : this.typeList[index]
|
||||
this.name = ''
|
||||
this.search()
|
||||
},
|
||||
search() {
|
||||
@@ -149,19 +476,35 @@ export default {
|
||||
this.hotelList = []
|
||||
this.fetchList()
|
||||
},
|
||||
fetchList() {
|
||||
fetchList(random = 0, randomSeed) {
|
||||
if(this.typeIndex === -1) {
|
||||
const params = {
|
||||
cityName: this.cityName,
|
||||
page: 1,
|
||||
limit: 999
|
||||
}
|
||||
getAncientTownList(params).then(res => {
|
||||
this.townList = res.data.records
|
||||
})
|
||||
return
|
||||
}
|
||||
const param = {
|
||||
page: this.page,
|
||||
type: this.typeList[this.typeIndex].id,
|
||||
cityName: this.cityName
|
||||
cityName: this.cityName,
|
||||
random: random,
|
||||
randomSeed: this.page > 1 ? randomSeed : null
|
||||
}
|
||||
const name = this.name.trim()
|
||||
if (name.length > 0) {
|
||||
param.name = name
|
||||
}
|
||||
getHotelList(param).then(res => {
|
||||
const { success, data } = res
|
||||
const { success, data, msg } = res
|
||||
if (success) {
|
||||
if(random === 1) {
|
||||
this.randomSeed = msg
|
||||
}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const cover = data[i].cover
|
||||
data[i].hide = true
|
||||
@@ -173,28 +516,144 @@ export default {
|
||||
data[i].videoCover = ''
|
||||
}
|
||||
this.hotelList.push(data[i])
|
||||
if(data.length < 10) {
|
||||
this.isNext = false
|
||||
} else {
|
||||
this.isNext = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.isLoad = true
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
typeBannerItemClick(item) {
|
||||
if (!item.hotelId) return
|
||||
uni.navigateTo({ url: `/pagesInn/inn/innHome?id=${item.hotelId}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.map-icon{
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
.qh-btn{
|
||||
padding-top: 4rpx;
|
||||
padding-bottom: 4rpx;
|
||||
// border: thin dashed #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tip-wrap{
|
||||
background: #AAAEB3;
|
||||
position: relative;
|
||||
align-items: self-start !important;
|
||||
&::before{
|
||||
position: absolute;
|
||||
content: '';
|
||||
border-left: 15rpx solid transparent;
|
||||
border-right: 15rpx solid transparent;
|
||||
border-top: 20rpx solid transparent;
|
||||
border-bottom: 20rpx solid #AAAEB3;
|
||||
top: -30rpx;
|
||||
left: 10%;
|
||||
}
|
||||
}
|
||||
.icon-box{
|
||||
border: 1rpx solid #fff;
|
||||
border-radius: 100%;
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
margin-left: 5rpx;
|
||||
padding: 2rpx;
|
||||
}
|
||||
.enter-btn{
|
||||
color: #fff;
|
||||
width: fit-content;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 16rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 30rpx 0;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.town-title{
|
||||
border-radius: 100rpx;
|
||||
/* border-color: #333; */
|
||||
// mix-blend-mode: difference;
|
||||
width: fit-content;
|
||||
padding: 5rpx 20rpx;
|
||||
border: 1rpx solid #fff;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
top: 20rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.town-card{
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
background: #fff;
|
||||
border-radius: 30rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin-bottom: 30rpx;
|
||||
image{
|
||||
width: -webkit-fit-content;
|
||||
width: inherit;
|
||||
height: -webkit-fit-content;
|
||||
height: inherit;
|
||||
}
|
||||
}
|
||||
.first-box{
|
||||
padding-right: 15rpx;
|
||||
position: sticky;
|
||||
left: 0;
|
||||
background-color: #f5f5f5;
|
||||
z-index: 9;
|
||||
}
|
||||
.first-box__inner{
|
||||
padding: 10rpx;
|
||||
background: #fff;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.scroll-box{
|
||||
display: flex;
|
||||
height: fit-content;
|
||||
background: #fff;
|
||||
overflow-x: scroll;
|
||||
padding: 10rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.search-btn{
|
||||
position: absolute;
|
||||
top: 2rpx;
|
||||
bottom: 2rpx;
|
||||
right: 2rpx;
|
||||
padding: 0rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.have-fun {
|
||||
//padding-top: 120rpx;
|
||||
|
||||
.top-box {
|
||||
padding: 32rpx 0 20rpx;
|
||||
background: #fff;
|
||||
padding: 32rpx 0 0rpx;
|
||||
background: #f5f5f5;
|
||||
|
||||
.search-box {
|
||||
width: 686rpx;
|
||||
position: relative;
|
||||
width: 575rpx;
|
||||
height: 60rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 0 auto;
|
||||
// margin: 0 auto;
|
||||
padding: 0 24rpx 0 32rpx;
|
||||
border: 2rpx solid #BBD2D2;
|
||||
border-radius: 30rpx;
|
||||
@@ -210,20 +669,20 @@ export default {
|
||||
}
|
||||
|
||||
.type-box {
|
||||
height: 180rpx;
|
||||
height: 200rpx;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
padding: 20rpx 20rpx 0 48rpx;
|
||||
padding: 0rpx 20rpx 0 20rpx;
|
||||
|
||||
.item {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
margin-right: 20rpx;
|
||||
width: 154rpx;
|
||||
height: 154rpx;
|
||||
// margin-right: 20rpx;
|
||||
border-radius: 26rpx;
|
||||
|
||||
image {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
width: 92rpx;
|
||||
height: 92rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
@@ -245,16 +704,16 @@ export default {
|
||||
}
|
||||
|
||||
.body {
|
||||
padding: 20rpx 32rpx;
|
||||
background: #F9F9F9;
|
||||
padding: 0 20rpx 20rpx;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.city-box {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 8rpx 18rpx 8rpx 16rpx;
|
||||
padding: 8rpx 20rpx 8rpx 20rpx;
|
||||
border-radius: 30px;
|
||||
background: #fff;
|
||||
background: #f5f5f5;
|
||||
|
||||
image {
|
||||
width: 32rpx;
|
||||
@@ -272,7 +731,7 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.list {
|
||||
width: 328rpx;
|
||||
width: 348rpx;
|
||||
.item {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
@@ -280,4 +739,30 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.tabbar-page {
|
||||
padding: 0 0 180rpx 0;
|
||||
}
|
||||
.type-banner-wrap {
|
||||
padding: 0 20rpx;
|
||||
background-color: #f5f5f5;
|
||||
.title {
|
||||
padding: 0 0 20rpx;
|
||||
.img {
|
||||
display: block;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
.slider-wrap {
|
||||
width: 100%;
|
||||
height: 330rpx;
|
||||
padding: 0 0 20rpx 0;
|
||||
.swiper-item {
|
||||
.img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 330rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="culture v12-d-grid-columns-2">
|
||||
<view class="img-item " v-for="(item, index) in list" :key="index" @click="viewImg(item)">
|
||||
<image class="img-item" :src="item" mode="widthFix|heightFix" lazy-load="false"></image>
|
||||
</view>
|
||||
</view>
|
||||
<image
|
||||
v-if="list.length === 0"
|
||||
:src="webUrl + '/orderIcon/wu.png'"
|
||||
class="img-nodata"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getCulture,
|
||||
} from "@/api/product"
|
||||
export default {
|
||||
props: {
|
||||
landmarkDataId: null
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
landmarkDataId(value) {
|
||||
if(value) {
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
viewImg(item) {
|
||||
uni.previewImage({
|
||||
current: item, // 当前显示图片的http链接
|
||||
urls: this.list || [] // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
getCulture({landmarkDataId: this.landmarkDataId}).then(res => {
|
||||
this.list = res.data.cultureImages || []
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.culture{
|
||||
grid-gap: 20rpx 20rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.img-item{
|
||||
width: 340rpx;
|
||||
height: 320rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.img-nodata {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 352rpx;
|
||||
height: 338rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<view class="list-box flex flex-wrap">
|
||||
<view
|
||||
v-for="item in goods"
|
||||
:key="item.id"
|
||||
class="item"
|
||||
@click="goGoods(item.productId)"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/home/mark-land.png'"
|
||||
class="mark-img"
|
||||
/>
|
||||
<image
|
||||
:src="item.storeImage"
|
||||
mode="scaleToFill"
|
||||
class="good-img"
|
||||
/>
|
||||
<view class="content flex flex-col jc-between">
|
||||
<view class="more-t bold">{{ item.title }}</view>
|
||||
<view class="one-t desc">{{ item.description }}</view>
|
||||
<view class="flex jc-between ai-center">
|
||||
<text class="price">¥{{ item.price }}</text>
|
||||
<image
|
||||
@click.stop="$emit('add', item)"
|
||||
:src="webUrl + '/home/icon-cart.png'"
|
||||
class="btn"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image
|
||||
v-if="goods.length === 0"
|
||||
:src="webUrl + '/20231023131208675588.png'"
|
||||
class="img-nodata"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
goods: {
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${id}&from=landmark`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.img-nodata {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 352rpx;
|
||||
height: 338rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
.list-box {
|
||||
margin-top: 24rpx;
|
||||
padding: 0 20rpx;
|
||||
.item {
|
||||
position: relative;
|
||||
width: 344rpx;
|
||||
margin-right: 22rpx;
|
||||
margin-bottom: 22rpx;
|
||||
border-radius: 20rpx;
|
||||
background: #FFFFFF;
|
||||
overflow: hidden;
|
||||
.mark-img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 3;
|
||||
display: block;
|
||||
width: 84rpx;
|
||||
height: 74rpx;
|
||||
}
|
||||
.good-img {
|
||||
display: block;
|
||||
width: 344rpx;
|
||||
height: 344rpx;
|
||||
}
|
||||
.content {
|
||||
height: 156rpx;
|
||||
padding: 8rpx 8rpx 18rpx 8rpx;
|
||||
.more-t {
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
color: #333;
|
||||
}
|
||||
.desc {
|
||||
padding: 5rpx 0;
|
||||
height: 34rpx;
|
||||
color: #FFC543;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.price {
|
||||
font-size: 40rpx;
|
||||
line-height: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #C52733;
|
||||
}
|
||||
.btn {
|
||||
display: block;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item:nth-child(2n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.list-wrap {
|
||||
margin: 20rpx 0 0 0;
|
||||
padding: 0 20rpx;
|
||||
.loadend {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,330 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="infoArray.length > 0" class="info-wrapper">
|
||||
<view class="info-list">
|
||||
<view v-for="(item, index) in infoArray" :key="index" class="info-item">
|
||||
<view
|
||||
:class="item.isTop === 1 ? 'info-item-top' : ''"
|
||||
:style="{
|
||||
'background-image': item.isTop
|
||||
? 'url(' + webUrl + '/page/hotel/info-top-bg.png)'
|
||||
: 'none',
|
||||
}"
|
||||
class="info-item-header"
|
||||
>
|
||||
<view class="name">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="intro">
|
||||
{{ item.content }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item-body">
|
||||
<video
|
||||
v-if="item.type === 2"
|
||||
@play="infoItemViewClick(item, index)"
|
||||
play-btn-position="center"
|
||||
:show-fullscreen-btn="false"
|
||||
class="video-item v12-mt-0"
|
||||
:src="item.video"
|
||||
controls
|
||||
:id="'video-item' + index"
|
||||
:poster="item.video + '?vframe/jpg/offset/1'"></video>
|
||||
<img-box
|
||||
v-else
|
||||
:imgList="item.images"
|
||||
:num="item.images.length"
|
||||
:img-radius="10"
|
||||
style="width: 100%"
|
||||
@click="infoItemViewClick(item)"
|
||||
/>
|
||||
|
||||
</view>
|
||||
<view class="info-item-bottom">
|
||||
<view class="time">
|
||||
{{
|
||||
item.createTime
|
||||
? item.createTime.replace(/-/g, ".").substr(0, 10)
|
||||
: ""
|
||||
}}
|
||||
</view>
|
||||
<view class="btns">
|
||||
<view class="flex">
|
||||
<image
|
||||
:src="webUrl + '/20230803152147141807.png'"
|
||||
class="icon"
|
||||
/>
|
||||
<text class="seeNum-txt v12-font-28">{{ item.pv }}</text>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<image
|
||||
v-if="!item.hasZan"
|
||||
:src="webUrl + '/page/hotel/zan-off-2.png'"
|
||||
class="zan-off-icon"
|
||||
@click="likeInfoItemHandle(item, index, item.zan + 1, true)"
|
||||
/>
|
||||
<image
|
||||
v-else
|
||||
:src="webUrl + '/page/hotel/zan-on-2.png'"
|
||||
class="zan-on-icon"
|
||||
@click="likeInfoItemHandle(item, index, item.zan - 1, false)"
|
||||
/>
|
||||
<text
|
||||
v-show="item.zan > 0"
|
||||
:class="item.hasZan ? 'on' : ''"
|
||||
class="seeNum-txt v12-font-28 v12-ml-1"
|
||||
>{{ item.zan }}</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image
|
||||
:src="webUrl + '/home/no-data-bg.png'"
|
||||
mode="widthFix"
|
||||
class="no-data-loadend"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</view>
|
||||
<image
|
||||
v-if="infoArray.length === 0"
|
||||
:src="webUrl + '/orderIcon/wu.png'"
|
||||
class="img-nodata"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getNews,
|
||||
hadLike,
|
||||
hadView
|
||||
} from "@/api/product"
|
||||
import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
||||
export default {
|
||||
props: {
|
||||
landmarkDataId: null
|
||||
},
|
||||
components: {
|
||||
imgBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
infoArray: [],
|
||||
videoPlayers:[]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
landmarkDataId(value) {
|
||||
if(value) {
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
const params = {
|
||||
landmarkDataId: this.landmarkDataId,
|
||||
page: 1,
|
||||
limit: 9999
|
||||
}
|
||||
getNews(params).then(res => {
|
||||
this.infoArray = res.data.records || []
|
||||
})
|
||||
},
|
||||
likeInfoItemHandle(item, index, value, voValue) {
|
||||
hadLike({ landmarkNewsId: item.id }).then(res => {
|
||||
const { success } = res
|
||||
if (success) {
|
||||
this.$dialog.toast({
|
||||
mes: '操作成功!'
|
||||
})
|
||||
this.$set(this.infoArray[index], 'zan', value)
|
||||
this.$set(this.infoArray[index], 'hasZan', voValue)
|
||||
}
|
||||
})
|
||||
},
|
||||
infoItemViewClick(item, index) {
|
||||
if(item.type === 2) {
|
||||
// const coverCtx = uni.createVideoContext('coverVideo', this)
|
||||
// coverCtx.pause()
|
||||
const playerId = 'video-item' + index
|
||||
if(this.videoPlayers.includes(playerId)) {
|
||||
this.videoPlayers.forEach(player => {
|
||||
if(player === playerId) return
|
||||
const playerCtx = uni.createVideoContext(player, this)
|
||||
playerCtx.pause()
|
||||
})
|
||||
} {
|
||||
this.videoPlayers.push(playerId)
|
||||
this.videoPlayers.forEach(player => {
|
||||
if(player === playerId) return
|
||||
const playerCtx = uni.createVideoContext(player, this)
|
||||
playerCtx.pause()
|
||||
})
|
||||
}
|
||||
this.$emit('video')
|
||||
}
|
||||
uni.$u.debounce(() => {
|
||||
hadView({ landmarkNewsId: item.id }).finally(() => {
|
||||
this.infoArray.map(info => {
|
||||
if (info.id === item.id) {
|
||||
info.pv += 1
|
||||
}
|
||||
})
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.video-item {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.info-wrapper{
|
||||
padding: 20px 10px;
|
||||
}
|
||||
|
||||
.info-item + .info-item {
|
||||
margin: 22rpx 0 0 0;
|
||||
}
|
||||
.info-item {
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
.info-item-header {
|
||||
position: relative;
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
&.info-item-top {
|
||||
padding-top: 60rpx;
|
||||
background-size: 100% 80rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url();
|
||||
}
|
||||
.name {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
.intro {
|
||||
margin: 10rpx 0 0 0;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.info-item-body {
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
.video {
|
||||
padding: 20rpx 0 0 0;
|
||||
.video-item {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.info-item-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
border-top: 1px solid #f1f1f1;
|
||||
font-size: 16px;
|
||||
.time {
|
||||
flex: 1;
|
||||
color: #999999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.btns {
|
||||
display: flex;
|
||||
color: #999;
|
||||
.flex + .flex {
|
||||
margin: 0 0 0 32rpx;
|
||||
}
|
||||
.flex {
|
||||
align-items: center;
|
||||
}
|
||||
.icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin: 0 8rpx 0 0;
|
||||
}
|
||||
.zan-off-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.zan-on-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.seeNum-txt {
|
||||
&.on {
|
||||
color: #D81E06;
|
||||
}
|
||||
}
|
||||
.more-btn {
|
||||
position: relative;
|
||||
.more-wrapper {
|
||||
position: absolute;
|
||||
right: -20rpx;
|
||||
top: -150rpx;
|
||||
z-index: 5;
|
||||
width: 200rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 1px 6px rgba(0,0,0,0.16);
|
||||
.more-item + .more-item {
|
||||
border-top: 1px solid #d5d5d5;
|
||||
}
|
||||
.more-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 70rpx;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
.more-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin: 0 10rpx 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.info-item-top {
|
||||
padding-top: 60rpx;
|
||||
background-size: 100% 80rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url();
|
||||
}
|
||||
.name {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
.intro {
|
||||
margin: 10rpx 0 0 0;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
.img-nodata {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 352rpx;
|
||||
height: 338rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<view class="policy">
|
||||
<view class="list-item" v-for="(item, index) in currentList" :key="index" @click="fileItemClick(item)">
|
||||
<view class="v12-justify-start v12-align-center">
|
||||
<view class="v12-font-bold v12-font-28">·</view>
|
||||
<view class="item-title">{{ item.title }}</view>
|
||||
</view>
|
||||
<view class="item-action v12-dark"><u-icon name="arrow-right" color="#fff" size="8"></u-icon></view>
|
||||
</view>
|
||||
<view class="more-wrap">
|
||||
<view class="more-btn v12-primary v12-align-center" @click="showMore" v-if="list.length > 0">
|
||||
{{ isMore ? '查看更多' : '查看更多' }}
|
||||
<view class="item-action v12-white"><u-icon name="arrow-right" color="#C52733 " size="12"></u-icon></view>
|
||||
</view>
|
||||
</view>
|
||||
<image
|
||||
v-if="list.length === 0"
|
||||
:src="webUrl + '/orderIcon/wu.png'"
|
||||
class="img-nodata"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPorjectPolicyFiles,
|
||||
} from "@/api/product"
|
||||
export default {
|
||||
props: {
|
||||
landmarkDataId: null
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
list: [],
|
||||
currentList: [],
|
||||
isMore: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
landmarkDataId(value) {
|
||||
if(value) {
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
const params = {
|
||||
landmarkDataId: this.landmarkDataId,
|
||||
page: 1,
|
||||
limit: 99999
|
||||
}
|
||||
getPorjectPolicyFiles(params).then(res => {
|
||||
this.list = res.data.records || []
|
||||
if(this.isMore) {
|
||||
this.currentList = this.list
|
||||
} else {
|
||||
this.currentList = this.list.filter((item, index) => index < 3)
|
||||
}
|
||||
})
|
||||
},
|
||||
showMore() {
|
||||
// this.isMore = !this.isMore
|
||||
// if(this.isMore) {
|
||||
// this.currentList = this.list
|
||||
// } else {
|
||||
// this.currentList = this.list.filter((item, index) => index < 3)
|
||||
// }
|
||||
uni.navigateTo({ url: `/pages/home/searchPage?id=${this.landmarkDataId}&type=2` })
|
||||
|
||||
},
|
||||
fileItemClick(file) {
|
||||
const url = file.attachment || ''
|
||||
if (!url) return
|
||||
uni.downloadFile({
|
||||
url,
|
||||
success: res => {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath,
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.more-btn{
|
||||
.item-action{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
.policy{
|
||||
padding: 20rpx;
|
||||
background: #f0f0f0;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
.list-item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 24rpx;
|
||||
align-items: center;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.item-action{
|
||||
font-size: 22rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
color: #fff;
|
||||
padding: 5rpx;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
.item-title{
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
margin-left: 10rpx;
|
||||
max-width: 520rpx;
|
||||
}
|
||||
.log-img{
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
background: rgba(197,39,51,0.39);
|
||||
border-radius: 50%;
|
||||
}
|
||||
.more-wrap{
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.more-btn{
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
padding: 5rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.img-nodata {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 352rpx;
|
||||
height: 338rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<view class="projects">
|
||||
<view class="tabs-wrap">
|
||||
<view
|
||||
@click="handleTab(item.value)"
|
||||
class="tab-item"
|
||||
:class="{
|
||||
'tab-isActived': actived === item.value
|
||||
}"
|
||||
v-for="(item, index) in tabs"
|
||||
:key="index">
|
||||
<view
|
||||
:class="{
|
||||
'tab-isActived': actived === item.value,
|
||||
'no-actived-1': actived === 2 && item.value === 1,
|
||||
'no-actived-2': actived === 1 && item.value === 2,
|
||||
'no-actived-3': actived === 3 && item.value === 2,
|
||||
'no-actived-4': actived === 2 && item.value === 3,
|
||||
}"
|
||||
>
|
||||
<image class="tab-icon" :src="webUrl + '/orderIcon/' + item.icon" mode="aspectFit|aspectFill|widthFix"></image>
|
||||
{{ item.name }}
|
||||
<!-- <view>
|
||||
<view>{{ item.name }}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="content"
|
||||
:class="{
|
||||
'first-one': actived === 1,
|
||||
'last-one': actived === 3
|
||||
}"
|
||||
|
||||
>
|
||||
<recommend v-if="actived === 1" :landmarkDataId="landmarkDataId"></recommend>
|
||||
<policy v-if="actived === 2" :landmarkDataId="landmarkDataId"></policy>
|
||||
<serviec v-if="actived === 3" :info="info"></serviec>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import recommend from './recommend.vue'
|
||||
import policy from './policy.vue'
|
||||
import serviec from './serviec.vue'
|
||||
export default {
|
||||
components: {
|
||||
recommend,
|
||||
policy,
|
||||
serviec
|
||||
},
|
||||
props: {
|
||||
landmarkDataId: null,
|
||||
info: {
|
||||
default:() => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
actived: 1,
|
||||
tabs: [
|
||||
{name: '企业推荐', value: 1, icon: 'qytj.png'},
|
||||
{name: '政策', value: 2, icon: 'zc.png'},
|
||||
{name: '服务', value: 3, icon: 'fw.png'},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTab(value) {
|
||||
this.actived = value
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tab-icon{
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.fit-box-inner{
|
||||
background: #f0f0f0;
|
||||
width: initial;
|
||||
height: inherit;
|
||||
width: 40rpx;
|
||||
}
|
||||
.first-one{
|
||||
border-radius: 0 24rpx 24rpx 24rpx !important;
|
||||
}
|
||||
.last-one{
|
||||
border-radius: 24rpx 0 24rpx 24rpx !important;
|
||||
}
|
||||
.fit-box{
|
||||
width: 40rpx;
|
||||
height: initial;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
}
|
||||
.projects{
|
||||
padding: 20rpx;
|
||||
}
|
||||
.tabs-wrap{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.tab-item{
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
background: #fff;
|
||||
view{
|
||||
padding: 20rpx 0;
|
||||
background: #f0f0f0;
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center
|
||||
}
|
||||
}
|
||||
.no-actived-1{
|
||||
border-radius: 0 0 24rpx 0 !important;
|
||||
}
|
||||
.no-actived-2{
|
||||
border-radius: 0 0 0 24rpx !important;
|
||||
}
|
||||
.no-actived-3{
|
||||
border-radius: 0 0 24rpx 0 !important;
|
||||
}
|
||||
.no-actived-4{
|
||||
border-radius: 0 0 0 24rpx !important;
|
||||
}
|
||||
.tab-isActived{
|
||||
background: #fff !important;
|
||||
border-radius: 24rpx 24rpx 0 0 !important;
|
||||
position: relative;
|
||||
}
|
||||
.content{
|
||||
background: #fff;
|
||||
padding: 20rpx 10rpx;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<view class="recommend">
|
||||
<view class="list-item" v-for="(item, index) in currentList" :key="index" @click="toStore(item.hotelId)">
|
||||
<view class="v12-justify-start v12-align-center">
|
||||
<view class="log-img">
|
||||
<image class="log-img" :src="item.logo" mode="aspectFit|aspectFill|widthFix"></image>
|
||||
</view>
|
||||
<view class="item-title one-t">{{ item.name }}</view>
|
||||
</view>
|
||||
<view class="item-action-wrap v12-primary">
|
||||
点击查看
|
||||
<view class="item-action v12-white"><u-icon name="arrow-right" color="#C52733" size="8"></u-icon></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="more-wrap" v-if="isMore ? isMore : list.length > 3">
|
||||
<view class="more-btn v12-primary" @click="showMore">
|
||||
{{ isMore ? '收起' : '查看更多' }}
|
||||
<view class="item-action v12-white"><u-icon name="arrow-right" color="#C52733 " size="12"></u-icon></view>
|
||||
</view>
|
||||
</view>
|
||||
<image
|
||||
v-if="list.length === 0"
|
||||
:src="webUrl + '/orderIcon/wu.png'"
|
||||
class="img-nodata"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPorjectRecommend,
|
||||
} from "@/api/product"
|
||||
export default {
|
||||
props: {
|
||||
landmarkDataId: null
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
list: [],
|
||||
currentList: [],
|
||||
isMore: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
landmarkDataId(value) {
|
||||
if(value) {
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getData() {
|
||||
getPorjectRecommend({landmarkDataId: this.landmarkDataId}).then(res => {
|
||||
this.list = res.data || []
|
||||
if(this.isMore) {
|
||||
this.currentList = this.list
|
||||
} else {
|
||||
this.currentList = this.list.filter((item, index) => index < 3)
|
||||
}
|
||||
})
|
||||
},
|
||||
toStore(id) {
|
||||
if (!id) {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pagesInn/inn/innHome?id=' + id
|
||||
})
|
||||
},
|
||||
showMore() {
|
||||
this.isMore = !this.isMore
|
||||
if(this.isMore) {
|
||||
this.currentList = this.list
|
||||
} else {
|
||||
this.currentList = this.list.filter((item, index) => index < 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.more-btn{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.item-action{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
margin-left: 10rpx;
|
||||
padding: 5rpx;
|
||||
}
|
||||
}
|
||||
.recommend{
|
||||
padding: 20rpx;
|
||||
background: #f0f0f0;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
.list-item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 24rpx;
|
||||
align-items: center;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.item-action-wrap{
|
||||
font-size: 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 30rpx;
|
||||
color: #fff;
|
||||
padding: 5rpx 10rpx;
|
||||
}
|
||||
.item-action{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.item-title{
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
margin-left: 20rpx;
|
||||
max-width: 180rpx;
|
||||
}
|
||||
.log-img{
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.more-wrap{
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.more-btn{
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
padding: 5rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.img-nodata {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 352rpx;
|
||||
height: 338rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<view class="service">
|
||||
<view class="map-cont">
|
||||
<map
|
||||
:longitude="info.longitude"
|
||||
:latitude="info.latitude"
|
||||
:markers="[{latitude: info.latitude,longitude: info.longitude,width: 20, height: 25, iconPath: webUrl + '/page/qianxian/icon-location.png'}]"
|
||||
style="width: 100%;height: 100%; border-radius: 20rpx;"
|
||||
/>
|
||||
</view>
|
||||
<view class="v12-mt-3 info-wrap">
|
||||
<view>
|
||||
<view class="v12-font-32 v12-font-bold v12-mb-2">{{ info.name || '' }}</view>
|
||||
<view class="v12-font-24 v12-mb-1 v12-dark1-text">办公时间:{{ info.officeTime || '' }}</view>
|
||||
<view class="v12-font-24 v12-mb-1 v12-dark1-text">{{ info.address || '' }}</view>
|
||||
</view>
|
||||
<view class="action-wrap">
|
||||
<view @click="showLocation">
|
||||
<view>
|
||||
<image :src="webUrl + '/page/qianxian/icon-addr.png'" class="img" />
|
||||
</view>
|
||||
<view class="text-center">导航</view>
|
||||
</view>
|
||||
<view @click="call">
|
||||
<view>
|
||||
<image :src="webUrl + '/page/qianxian/icon-phone.png'" class="img" />
|
||||
</view>
|
||||
<view class="text-center">咨询</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 0 20rpx;"><u-divider></u-divider></view>
|
||||
<view class="intro-wrap">
|
||||
<view class="v12-dark-text v12-font-bold">
|
||||
简介
|
||||
</view>
|
||||
<view class="intro-text">
|
||||
{{ info.intro || '' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
info: {
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.info);
|
||||
},
|
||||
methods: {
|
||||
showLocation() {
|
||||
console.log(this.info);
|
||||
|
||||
if (!this.info.latitude || !this.info.longitude) {
|
||||
this.$dialog.error('暂无位置信息')
|
||||
} else {
|
||||
uni.openLocation({
|
||||
latitude: this.info.latitude,
|
||||
longitude: this.info.longitude
|
||||
})
|
||||
}
|
||||
},
|
||||
call() {
|
||||
if (this.info.tel) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.info.tel
|
||||
})
|
||||
} else {
|
||||
this.$dialog.error('电话为空')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.intro-text{
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.intro-wrap{
|
||||
padding: 0 20rpx 20rpx;
|
||||
}
|
||||
.action-wrap{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.text-center{
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.info-wrap{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 40rpx 20rpx 0;
|
||||
}
|
||||
.service{
|
||||
position: relative;
|
||||
}
|
||||
.map-cont {
|
||||
height: 400rpx;
|
||||
border-radius: 20rpx;
|
||||
background: #f2f1ed;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.img{
|
||||
display: block;
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
margin: 0 0 16rpx 16rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<view v-if="posterImageStatus" class="poster-first">
|
||||
<view class="poster-pop">
|
||||
<img
|
||||
src="@/static/images/poster-close.png"
|
||||
mode="widthFix"
|
||||
class="close"
|
||||
@click="posterImageClose"
|
||||
/>
|
||||
<image
|
||||
:src="posterImage"
|
||||
alt="tp"
|
||||
class="poster-image"
|
||||
:show-menu-by-longpress="false"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="v12-white-text v12-radius-20 share-btn" @click="saveImg(posterImage)">保存图片</view>
|
||||
</view>
|
||||
<view class="mask"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getShareImg } from "@/api/product";
|
||||
|
||||
export default {
|
||||
name: "LandMarkShareImg",
|
||||
data: function () {
|
||||
return {
|
||||
posterImage: "",
|
||||
posterImageStatus: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
saveImg(url) {
|
||||
uni.showLoading({
|
||||
mask:true,
|
||||
})
|
||||
uni.downloadFile({
|
||||
url: url, // 文件的下载地址
|
||||
success(res) {
|
||||
if (res.statusCode === 200) {
|
||||
let tempFilePath = res.tempFilePath; // 临时文件路径
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: tempFilePath,
|
||||
success:(success)=> {
|
||||
uni.showToast({
|
||||
title: "保存成功",
|
||||
icon: "none",
|
||||
mask: true,
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
title: "保存失败,请重新尝试",
|
||||
icon: "none",
|
||||
mask: true,
|
||||
});
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
posterImageClose() {
|
||||
this.posterImageStatus = false;
|
||||
this.$emit("setPosterImageStatus");
|
||||
},
|
||||
savePosterPath(id) {
|
||||
uni.showLoading({ title: "海报生成中", mask: true });
|
||||
|
||||
getShareImg(id)
|
||||
.then((res) => {
|
||||
this.posterImage = res.data;
|
||||
this.posterImageStatus = true;
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less" lang="less">
|
||||
.share-btn{
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
background: #ff564a;
|
||||
}
|
||||
.poster-first {
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
.poster-pop {
|
||||
width: 6 * 100rpx;
|
||||
height: 8 * 100rpx;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 99;
|
||||
top: 50%;
|
||||
margin-top: -4.6 * 100rpx;
|
||||
}
|
||||
.poster-pop .canvas {
|
||||
background-color: #ffffff;
|
||||
height: 8 * 100rpx;
|
||||
}
|
||||
.poster-pop .poster-image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.poster-pop .close {
|
||||
width: 0.46 * 100rpx;
|
||||
height: 0.75 * 100rpx;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: -0.73 * 100rpx;
|
||||
display: block;
|
||||
}
|
||||
.poster-pop .save-poster {
|
||||
background-color: #df2d0a;
|
||||
font-size: 0.22 * 100rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
height: 0.76 * 100rpx;
|
||||
line-height: 0.76 * 100rpx;
|
||||
width: 100%;
|
||||
margin-top: -0.04 * 100rpx;
|
||||
}
|
||||
.poster-pop .keep {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 0.25 * 100rpx;
|
||||
margin-top: 0.1 * 100rpx;
|
||||
}
|
||||
.mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
z-index: 9;
|
||||
}
|
||||
</style>
|
||||
+1750
-988
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+390
-372
@@ -1,429 +1,444 @@
|
||||
<script>
|
||||
import {getProvince, getProvinceGoods, getProvinceList} from "@/api/product";
|
||||
<template>
|
||||
<view class="pkg-product-land-mark">
|
||||
<view v-if="isLoad">
|
||||
<view class="top-wrap">
|
||||
<view class="top-box">
|
||||
<view class="nav flex" id="nav-dibiao">
|
||||
<view
|
||||
v-for="(item,index) in navList"
|
||||
:key="index"
|
||||
:class="{
|
||||
'active': navIndex === index
|
||||
}"
|
||||
class="flex flex-0 ai-center nav-item"
|
||||
@click="changeNav(index)"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/home/landmark-icon.png'"
|
||||
class="bg"
|
||||
/>
|
||||
{{ item.provinceName }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-box">
|
||||
<view class="map-box">
|
||||
<image
|
||||
:src="mapData.mapImage"
|
||||
mode="widthFix"
|
||||
class="img-map"
|
||||
/>
|
||||
</view>
|
||||
<view class="share-btn" @click="toShare"><u-icon name="share-square" color="#C52733"></u-icon>分享给好友</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="middle-img-wrap"
|
||||
>
|
||||
<image
|
||||
v-if="mapData.middleImage"
|
||||
:src="mapData.middleImage"
|
||||
mode="widthFix"
|
||||
class="img"
|
||||
/>
|
||||
<view class="tabs-wrap">
|
||||
<view @click="handleTab(item.value)" :class="{ 'tab-actived' : item.value === actived }" class="tab-item" v-for="(item, index) in tabs" :key="index">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-wrap" id="list-wrap">
|
||||
<view v-if="actived === 1">
|
||||
<projects :landmarkDataId="landmarkDataId" :info="mapData.serviceInfo"></projects>
|
||||
</view>
|
||||
<view v-if="actived === 2">
|
||||
<culture :landmarkDataId="landmarkDataId"></culture>
|
||||
</view>
|
||||
<view v-if="actived === 3">
|
||||
<information :landmarkDataId="landmarkDataId"></information>
|
||||
</view>
|
||||
<view v-if="actived === 4">
|
||||
<goods :goods="goods" v-if="goods.length > 0" @add='addToCart($event, "productId")'></goods>
|
||||
<!-- <image
|
||||
v-if="isCompleteLoadGood"
|
||||
:src="webUrl + '/home/no-data-bg.png'"
|
||||
mode="widthFix"
|
||||
class="loadend"
|
||||
/> -->
|
||||
<view class="v12-px-6" >
|
||||
<u-divider :text="goods.length === 0 ? ' · 暂无数据 · ' : ' · 已经到底啦 · '" textPosition="center"></u-divider>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<goo-skeleton
|
||||
v-else
|
||||
:show-avatar="false"
|
||||
/>
|
||||
<shareImg ref="shareImg"></shareImg>
|
||||
<ProductWindow
|
||||
ref="attrWindow"
|
||||
:attr="attr"
|
||||
:cartNum="cart_num"
|
||||
:showOk="true"
|
||||
@changeFun="changeFun"
|
||||
@ok="handleOk"
|
||||
/>
|
||||
<FunctionGuide @hide="setGuide('landmarkGoodsIndex')" :maxStep="2" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getProvince,
|
||||
getProvinceGoods,
|
||||
getProvinceList
|
||||
} from "@/api/product"
|
||||
import goods from "./components/goods.vue"
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
import goCartMixin from '@/mixins/goCartMixins'
|
||||
import projects from './components/projects.vue'
|
||||
import culture from "./components/culture.vue"
|
||||
import information from "./components/information.vue"
|
||||
import shareImg from "./components/shareImg.vue"
|
||||
import ProductWindow from '@/components/ProductWindow'
|
||||
import FunctionGuide from '@/components/FunctionGuide'
|
||||
import GuideMixins from '@/mixins/GuideMixins'
|
||||
export default {
|
||||
name: "landMark",
|
||||
name: 'LandMarkPage',
|
||||
components: {
|
||||
goods,
|
||||
projects,
|
||||
culture,
|
||||
information,
|
||||
shareImg,
|
||||
ProductWindow,
|
||||
FunctionGuide
|
||||
},
|
||||
mixins: [pageListenMixins, goCartMixin, GuideMixins],
|
||||
data() {
|
||||
return {
|
||||
actived: 1,
|
||||
tabs: [
|
||||
{name: '项目', value: 1},
|
||||
{name: '文化', value: 2},
|
||||
{name: '资讯', value: 3},
|
||||
{name: '产品', value: 4},
|
||||
],
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
keyword: '',
|
||||
isLoad: false,
|
||||
page: 1,
|
||||
navList: [],
|
||||
navIndex: 0,
|
||||
mapData: null,
|
||||
mapLocations: [],
|
||||
goods: [],
|
||||
directionClass: ['', 'up', 'right', 'down', 'left'],
|
||||
isCompleteLoadGood: false,
|
||||
pageKeyId: Object.freeze('landmarkGoodsIndex'),
|
||||
posterImageStatus: false,
|
||||
sceneId: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
topBoxBgColor() {
|
||||
return this.navList.length > 0 ? this.navList[this.navIndex]['backgroundColor'] : '#FFFFFF';
|
||||
},
|
||||
viewBoxBgColor() {
|
||||
return this.mapData?.backgroundColor || '#FFFFFF';
|
||||
},
|
||||
scale() {
|
||||
return 718 / (this.mapData?.mapImageWidth || 1);
|
||||
landmarkDataId() {
|
||||
return this.navList[this.navIndex] ? this.navList[this.navIndex]['id'] : null
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getNavList();
|
||||
onLoad(opts) {
|
||||
console.log('进入地标页');
|
||||
console.log(opts, '地标opts');
|
||||
if(opts && opts.scene) {
|
||||
console.log(opts.scene, 'opts.scene');
|
||||
this.sceneId = decodeURIComponent(opts.scene).split('&')[0].split('=')[1]
|
||||
}
|
||||
this.getNavList()
|
||||
this.queryGuide('landmarkGoodsIndex')
|
||||
},
|
||||
onHide() {
|
||||
this.pageToHideHandle()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.page++;
|
||||
this.fetchGoods();
|
||||
if (this.isCompleteLoadGood) {
|
||||
return
|
||||
}
|
||||
this.page++
|
||||
this.fetchGoods()
|
||||
},
|
||||
methods: {
|
||||
showFunctionGuide() {
|
||||
if(this._step == this.functionGuideData.step) return
|
||||
if(this.functionGuideData.step == 1) {
|
||||
this._step = this.functionGuideData.step
|
||||
|
||||
this.getElementData('#nav-dibiao', res=>{
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/地标好物/Group1/Group 1-1.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '495rpx',
|
||||
top: 50*2+'rpx',
|
||||
left: 0,
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '194rpx',
|
||||
/* px: ; */
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/地标好物/Group1/Group 1-2.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 160*2+'rpx',
|
||||
left: -160*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/地标好物/Group1/Group 1-3.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 160*2+'rpx',
|
||||
left: 160*2+'rpx',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
this.setFunctionGuideData({
|
||||
imgs: imgs,
|
||||
tipsPosition: '420rpx',
|
||||
btnGroupPosition: '',
|
||||
position: {
|
||||
top: res.top + 'px',
|
||||
left: res.left + 'px',
|
||||
width: `${res.width}px`,
|
||||
height: `${res.height}px`,
|
||||
}
|
||||
})
|
||||
})
|
||||
return
|
||||
} else {
|
||||
if(this.functionGuideData.step == 2) {
|
||||
this._step = this.functionGuideData.step
|
||||
this.getElementData('#list-wrap', res=>{
|
||||
const imgs = [
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/地标好物/Group2/Group 2-1.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '450rpx',
|
||||
top: 300*2+'rpx',
|
||||
left: 0,
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '174rpx',
|
||||
/* px: ; */
|
||||
},
|
||||
isBtn: false
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/地标好物/Group2/Group 2-2.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 280*2+'rpx',
|
||||
left: -120*2+'rpx',
|
||||
right: 0,
|
||||
margin: 'auto',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'jump'
|
||||
},
|
||||
{
|
||||
url: this.webUrl + '/引导页素材/地标好物/Group2/Group 2-3.png',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
zIndex: 99,
|
||||
width: '117rpx',
|
||||
top: 280*2+'rpx',
|
||||
left: 180*2+'rpx',
|
||||
height: '46rpx',
|
||||
},
|
||||
isBtn: 'next'
|
||||
},
|
||||
]
|
||||
uni.pageScrollTo({
|
||||
scrollTop: res.top,
|
||||
duration: 300
|
||||
})
|
||||
this.setFunctionGuideData({
|
||||
imgs: imgs,
|
||||
tipsPosition: '420rpx',
|
||||
btnGroupPosition: '',
|
||||
position: {
|
||||
bottom: 0,
|
||||
left: res.left + 'px',
|
||||
width: `${res.width}px`,
|
||||
height: `${(res.height) + 41}px`,
|
||||
}
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
},
|
||||
toShare() {
|
||||
this.$refs.shareImg.savePosterPath(this.landmarkDataId)
|
||||
},
|
||||
handleTab(value) {
|
||||
this.actived = value
|
||||
},
|
||||
getNavList() {
|
||||
getProvinceList().then(({data}) => {
|
||||
this.navList = data;
|
||||
this.changeNav(this.navIndex);
|
||||
});
|
||||
this.navList = data
|
||||
if(this.sceneId) {
|
||||
this.navIndex = this.navList.map(e => +e.id).indexOf(+this.sceneId)
|
||||
console.log(this.navIndex, 'navIndex');
|
||||
}
|
||||
this.changeNav(this.navIndex)
|
||||
})
|
||||
},
|
||||
|
||||
search() {
|
||||
this.page = 1;
|
||||
this.fetchGoods();
|
||||
},
|
||||
|
||||
changeNav(index) {
|
||||
this.navIndex = index;
|
||||
this.page = 1;
|
||||
this.getMap();
|
||||
this.fetchGoods();
|
||||
this.navIndex = index
|
||||
this.page = 1
|
||||
this.goods = []
|
||||
this.isCompleteLoadGood = false
|
||||
this.actived = 1
|
||||
this.getMap()
|
||||
this.fetchGoods()
|
||||
},
|
||||
|
||||
getMap() {
|
||||
const id = this.navList[this.navIndex]['id']
|
||||
getProvince(id).then(({data}) => {
|
||||
this.mapData = data;
|
||||
this.mapLocations = data.mapLocations;
|
||||
this.calcPosition();
|
||||
});
|
||||
},
|
||||
|
||||
// 计算位置
|
||||
calcPosition() {
|
||||
this.mapLocations?.forEach(item => {
|
||||
item.gx = item.x * this.scale;
|
||||
item.gy = item.y * this.scale;
|
||||
this.mapData = data || {}
|
||||
this.isLoad = true
|
||||
})
|
||||
},
|
||||
|
||||
fetchGoods() {
|
||||
const id = this.navList[this.navIndex]['id']
|
||||
getProvinceGoods(id, this.keyword, this.page).then(({data}) => {
|
||||
if (this.page === 1) this.goods = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.goods.push(data[i]);
|
||||
const len = data.length
|
||||
for (let i = 0; i < len; i++) {
|
||||
this.goods.push(data[i])
|
||||
}
|
||||
if (len === 0 || len < 10) {
|
||||
this.isCompleteLoadGood = true
|
||||
}
|
||||
})
|
||||
},
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${id}&from=landmark`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="pkg-product-land-mark" v-if="mapData">
|
||||
<view class="top-box" :style="{'backgroundColor':topBoxBgColor}">
|
||||
<view class="view-box">
|
||||
<view class="search-box flex ai-center">
|
||||
<input
|
||||
v-model="keyword"
|
||||
type="text"
|
||||
placeholder="搜索商品"
|
||||
placeholder-style="color:#999"
|
||||
@confirm="search()"
|
||||
/>
|
||||
<image
|
||||
:src="webUrl+'/20231223183627184005.png'"
|
||||
mode="scaleToFill"
|
||||
style="width:30rpx;height:30rpx"
|
||||
@click="search()"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="map-box">
|
||||
<image class="img-map" :src="mapData.mapImage" mode="widthFix"/>
|
||||
|
||||
<view class="item" :style="{'left':item.gx+'rpx','top':item.gy+'rpx'}" v-for="item in mapLocations" @click="$global.navToGoods(item.productId)">
|
||||
<view class="round">
|
||||
<view class="line" :class="'line-'+directionClass[item.labelDirection]"></view>
|
||||
</view>
|
||||
<view class="label flex ai-end" :class="'label-'+directionClass[item.labelDirection]">
|
||||
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection===4"/>
|
||||
<view class="title flex ai-center">{{ item.mapTitle }}</view>
|
||||
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection!==4"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="nav flex">
|
||||
<view class="flex flex-0 ai-center" :class="{'active': navIndex===index}" v-for="(item,index) in navList"
|
||||
:key="index" @click="changeNav(index)">{{ item.provinceName }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="main-box" v-if="mapData.recommended.storeImage"
|
||||
@click="$global.navToGoods(mapData.recommended.productId)">
|
||||
<image class="bg-main" :src="mapData.recommended.storeImage" mode="scaleToFill"/>
|
||||
<view class="box-mask flex flex-col jc-end">
|
||||
<view class="one-t bold">{{ mapData.recommended.title }}</view>
|
||||
<view class="more-t">{{ mapData.recommended.description }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list-box flex flex-wrap">
|
||||
<view class="item" v-for="item in goods" :key="item.id" @click="$global.navToGoods(item.productId)">
|
||||
<image :src="item.storeImage" mode="scaleToFill"/>
|
||||
<view class="content flex flex-col jc-between">
|
||||
<view class="more-t bold">{{ item.title }}</view>
|
||||
<view class="flex jc-between ai-center">
|
||||
<text class="price">¥{{ item.price }}</text>
|
||||
<image class="btn" :src="webUrl+'/20231114151028082368.png'" mode="scaleToFill"/>
|
||||
<!-- <view class="btn flex jc-center ai-center">立即购买</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<image class="img-nodata" :src="webUrl+'/20231023131208675588.png'" mode="scaleToFill"
|
||||
v-if="goods.length===0"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.share-btn{
|
||||
color: #C52733;
|
||||
background: rgba(211,92,101,0.5);
|
||||
font-size: 24rpx;
|
||||
width: fit-content;
|
||||
padding: 8rpx 10rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 80%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tabs-wrap{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 20rpx 20rpx 0;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.tab-item{
|
||||
|
||||
}
|
||||
.tab-actived{
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
background: linear-gradient(to right, #C52733 0%, rgba(211,92,101,0.91) 54%, rgba(255,255,255,0.62) 100%);
|
||||
border-radius: 38rpx 0rpx 0 38rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.top-wrap{
|
||||
padding: 20rpx 20rpx 0;
|
||||
}
|
||||
.pkg-product-land-mark {
|
||||
background: #F7F3ED;
|
||||
|
||||
image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
background: #f0f0f0;
|
||||
min-height: 100vh;
|
||||
.top-box {
|
||||
padding: 32rpx 0 20rpx;
|
||||
|
||||
border-radius: 20rpx;
|
||||
background-color: #fff;
|
||||
.view-box {
|
||||
position: relative;
|
||||
margin: 0 16rpx;
|
||||
border-radius: 40rpx;
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.search-box {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 34rpx;
|
||||
width: 650rpx;
|
||||
height: 64rpx;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 32rpx;
|
||||
background: #FFFFFF;
|
||||
z-index: 10;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
line-height: 64rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.map-box {
|
||||
position: relative;
|
||||
width: 718rpx;
|
||||
|
||||
.img-map {
|
||||
width: 718rpx;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.item {
|
||||
position: absolute;
|
||||
|
||||
.round {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 8rpx rgba(225, 38, 65, .4);;
|
||||
background: #E12641;
|
||||
}
|
||||
|
||||
.line {
|
||||
position: relative;
|
||||
border: 2rpx solid #E12641;
|
||||
}
|
||||
|
||||
.line-up {
|
||||
left: 50%;
|
||||
transform: translate(-50%, -100%);
|
||||
width: 0;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.line-right {
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
width: 30rpx;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.line-down {
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 0;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.line-left {
|
||||
top: 50%;
|
||||
transform: translate(-100%, -50%);
|
||||
width: 30rpx;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
position: relative;
|
||||
|
||||
.cover {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
box-sizing: border-box;
|
||||
border: 6rpx solid #E12641;
|
||||
border-radius: 50%;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 32rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 10rpx;
|
||||
padding: 0 16rpx;
|
||||
background: #E12641;
|
||||
color: #FFFFFF;
|
||||
font-size: 22rpx;
|
||||
line-height: 32rpx;
|
||||
white-space: nowrap;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.label-up {
|
||||
top: -80rpx;
|
||||
left: -50%;
|
||||
|
||||
.title {
|
||||
margin-right: -9rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.label-right {
|
||||
top: -40rpx;
|
||||
left: 32rpx;
|
||||
|
||||
.title {
|
||||
margin-right: -9rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.label-down {
|
||||
left: -50%;
|
||||
|
||||
.title {
|
||||
margin-right: -9rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.label-left {
|
||||
left: -100%;
|
||||
transform: translate(-30rpx, -40rpx);
|
||||
|
||||
.title {
|
||||
margin-left: -9rpx;
|
||||
border-radius: 0 20rpx 20rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav {
|
||||
padding: 30rpx 20rpx 0;
|
||||
overflow-x: scroll;
|
||||
|
||||
view {
|
||||
height: 52rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 18rpx;
|
||||
border: 4rpx solid transparent;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
border-color: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-box {
|
||||
position: relative;
|
||||
width: 718rpx;
|
||||
height: 360rpx;
|
||||
margin: 24rpx 16rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.bg-main {
|
||||
width: 718rpx;
|
||||
height: 360rpx;
|
||||
}
|
||||
|
||||
.box-mask {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx 16rpx 16rpx;
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
|
||||
color: #FFFFFF;
|
||||
|
||||
.one-t {
|
||||
margin-bottom: 16rpx;
|
||||
font-size: 46rpx;
|
||||
line-height: 52rpx;
|
||||
}
|
||||
|
||||
.more-t {
|
||||
.img-map {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.nav {
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
overflow-x: scroll;
|
||||
.nav-item + .nav-item {
|
||||
margin: 0 0 0 20rpx;
|
||||
}
|
||||
.nav-item {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding-top: 10rpx;
|
||||
border-top: 1rpx solid #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-box {
|
||||
margin-top: 24rpx;
|
||||
padding: 0 16rpx 34rpx;
|
||||
|
||||
.item {
|
||||
width: 234rpx;
|
||||
height: 380rpx;
|
||||
margin-right: 8rpx;
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
background: #FFFFFF;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 234rpx;
|
||||
height: 234rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 122rpx;
|
||||
margin: 6rpx 6rpx 18rpx;
|
||||
|
||||
.more-t {
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
color: #DC1616;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 118rpx;
|
||||
padding: 0 32rpx 20rpx 0;
|
||||
color: #333;
|
||||
font-size: 32rpx;
|
||||
.bg {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 6rpx;
|
||||
width: 63rpx;
|
||||
height: 42rpx;
|
||||
//background: linear-gradient(180deg, #EFEDC7 0%, #EAC94B 100%);
|
||||
//border-radius: 4rpx;
|
||||
//color: #764A00;
|
||||
//font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.active {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
.bg {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
.middle-img-wrap {
|
||||
margin: 20rpx 0 0 0;
|
||||
background: #fff;
|
||||
padding: 20rpx;
|
||||
.img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img-nodata {
|
||||
position: relative;
|
||||
top: 0;
|
||||
@@ -434,4 +449,7 @@ export default {
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
}
|
||||
.loadend {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,454 @@
|
||||
<template>
|
||||
<view class="pkg-product-land-mark" v-if="mapData">
|
||||
<view class="top-box" :style="{'backgroundColor':topBoxBgColor}">
|
||||
<view class="view-box">
|
||||
<view class="search-box flex ai-center">
|
||||
<input
|
||||
v-model="keyword"
|
||||
type="text"
|
||||
placeholder="搜索商品"
|
||||
placeholder-style="color:#999"
|
||||
@confirm="search()"
|
||||
/>
|
||||
<image
|
||||
:src="webUrl+'/20231223183627184005.png'"
|
||||
mode="scaleToFill"
|
||||
style="width:30rpx;height:30rpx"
|
||||
@click="search()"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="map-box">
|
||||
<image class="img-map" :src="mapData.mapImage" mode="widthFix"/>
|
||||
|
||||
<view
|
||||
v-for="(item, index) in mapLocations"
|
||||
:key="index"
|
||||
class="item"
|
||||
:style="{'left':item.gx+'rpx','top':item.gy+'rpx'}"
|
||||
@click="goGoods(item.productId)"
|
||||
>
|
||||
<view class="round">
|
||||
<view class="line" :class="'line-'+directionClass[item.labelDirection]"></view>
|
||||
</view>
|
||||
<view class="label flex ai-end" :class="'label-'+directionClass[item.labelDirection]">
|
||||
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection===4"/>
|
||||
<view class="title flex ai-center">{{ item.mapTitle }}</view>
|
||||
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection!==4"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="nav flex">
|
||||
<view class="flex flex-0 ai-center" :class="{'active': navIndex===index}" v-for="(item,index) in navList"
|
||||
:key="index" @click="changeNav(index)">{{ item.provinceName }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="main-box" v-if="mapData.recommended.storeImage"
|
||||
@click="goGoods(mapData.recommended.productId)">
|
||||
<image class="bg-main" :src="mapData.recommended.storeImage" mode="scaleToFill"/>
|
||||
<view class="box-mask flex flex-col jc-end">
|
||||
<view class="one-t bold">{{ mapData.recommended.title }}</view>
|
||||
<view class="more-t">{{ mapData.recommended.description }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list-box flex flex-wrap">
|
||||
<view class="item" v-for="item in goods" :key="item.id" @click="goGoods(item.productId)">
|
||||
<image :src="item.storeImage" mode="scaleToFill"/>
|
||||
<view class="content flex flex-col jc-between">
|
||||
<view class="more-t bold">{{ item.title }}</view>
|
||||
<view class="flex jc-between ai-center">
|
||||
<text class="price">¥{{ item.price }}</text>
|
||||
<image class="btn" :src="webUrl+'/20231114151028082368.png'" mode="scaleToFill"/>
|
||||
<!-- <view class="btn flex jc-center ai-center">立即购买</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<image class="img-nodata" :src="webUrl+'/20231023131208675588.png'" mode="scaleToFill"
|
||||
v-if="goods.length===0"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getProvince, getProvinceGoods, getProvinceList} from "@/api/product";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: 'LandMarkPage',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
keyword: '',
|
||||
page: 1,
|
||||
navList: [],
|
||||
navIndex: 0,
|
||||
mapData: null,
|
||||
mapLocations: [],
|
||||
goods: [],
|
||||
directionClass: ['', 'up', 'right', 'down', 'left'],
|
||||
pageKeyId: Object.freeze('landmarkGoodsIndex')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
topBoxBgColor() {
|
||||
return this.navList.length > 0 ? this.navList[this.navIndex]['backgroundColor'] : '#FFFFFF';
|
||||
},
|
||||
viewBoxBgColor() {
|
||||
return this.mapData?.backgroundColor || '#FFFFFF';
|
||||
},
|
||||
scale() {
|
||||
return 718 / (this.mapData?.mapImageWidth || 1);
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getNavList();
|
||||
},
|
||||
onHide() {
|
||||
this.pageToHideHandle()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.page++;
|
||||
this.fetchGoods();
|
||||
},
|
||||
methods: {
|
||||
getNavList() {
|
||||
getProvinceList().then(({data}) => {
|
||||
this.navList = data;
|
||||
this.changeNav(this.navIndex);
|
||||
});
|
||||
},
|
||||
|
||||
search() {
|
||||
this.page = 1;
|
||||
this.fetchGoods();
|
||||
},
|
||||
|
||||
changeNav(index) {
|
||||
this.navIndex = index;
|
||||
this.page = 1;
|
||||
this.getMap();
|
||||
this.fetchGoods();
|
||||
},
|
||||
|
||||
getMap() {
|
||||
const id = this.navList[this.navIndex]['id']
|
||||
getProvince(id).then(({data}) => {
|
||||
this.mapData = data;
|
||||
this.mapLocations = data.mapLocations;
|
||||
this.calcPosition();
|
||||
});
|
||||
},
|
||||
|
||||
// 计算位置
|
||||
calcPosition() {
|
||||
this.mapLocations?.forEach(item => {
|
||||
item.gx = item.x * this.scale;
|
||||
item.gy = item.y * this.scale;
|
||||
})
|
||||
},
|
||||
|
||||
fetchGoods() {
|
||||
const id = this.navList[this.navIndex]['id']
|
||||
getProvinceGoods(id, this.keyword, this.page).then(({data}) => {
|
||||
if (this.page === 1) this.goods = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.goods.push(data[i]);
|
||||
}
|
||||
})
|
||||
},
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${id}&from=landmark`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.pkg-product-land-mark {
|
||||
background: #F7F3ED;
|
||||
|
||||
image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.top-box {
|
||||
padding: 32rpx 0 20rpx;
|
||||
|
||||
.view-box {
|
||||
position: relative;
|
||||
margin: 0 16rpx;
|
||||
border-radius: 40rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.search-box {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 34rpx;
|
||||
width: 650rpx;
|
||||
height: 64rpx;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 32rpx;
|
||||
background: #FFFFFF;
|
||||
z-index: 10;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
line-height: 64rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.map-box {
|
||||
position: relative;
|
||||
width: 718rpx;
|
||||
|
||||
.img-map {
|
||||
width: 718rpx;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.item {
|
||||
position: absolute;
|
||||
|
||||
.round {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 8rpx rgba(225, 38, 65, .4);;
|
||||
background: #E12641;
|
||||
}
|
||||
|
||||
.line {
|
||||
position: relative;
|
||||
border: 2rpx solid #E12641;
|
||||
}
|
||||
|
||||
.line-up {
|
||||
left: 50%;
|
||||
transform: translate(-50%, -100%);
|
||||
width: 0;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.line-right {
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
width: 30rpx;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.line-down {
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 0;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.line-left {
|
||||
top: 50%;
|
||||
transform: translate(-100%, -50%);
|
||||
width: 30rpx;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
position: relative;
|
||||
|
||||
.cover {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
box-sizing: border-box;
|
||||
border: 6rpx solid #E12641;
|
||||
border-radius: 50%;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 32rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 10rpx;
|
||||
padding: 0 16rpx;
|
||||
background: #E12641;
|
||||
color: #FFFFFF;
|
||||
font-size: 22rpx;
|
||||
line-height: 32rpx;
|
||||
white-space: nowrap;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.label-up {
|
||||
top: -80rpx;
|
||||
left: -50%;
|
||||
|
||||
.title {
|
||||
margin-right: -9rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.label-right {
|
||||
top: -40rpx;
|
||||
left: 32rpx;
|
||||
|
||||
.title {
|
||||
margin-right: -9rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.label-down {
|
||||
left: -50%;
|
||||
|
||||
.title {
|
||||
margin-right: -9rpx;
|
||||
border-radius: 20rpx 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.label-left {
|
||||
left: -100%;
|
||||
transform: translate(-30rpx, -40rpx);
|
||||
|
||||
.title {
|
||||
margin-left: -9rpx;
|
||||
border-radius: 0 20rpx 20rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav {
|
||||
padding: 30rpx 20rpx 0;
|
||||
overflow-x: scroll;
|
||||
|
||||
view {
|
||||
height: 52rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 18rpx;
|
||||
border: 4rpx solid transparent;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
border-color: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-box {
|
||||
position: relative;
|
||||
width: 718rpx;
|
||||
height: 360rpx;
|
||||
margin: 24rpx 16rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.bg-main {
|
||||
width: 718rpx;
|
||||
height: 360rpx;
|
||||
}
|
||||
|
||||
.box-mask {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx 16rpx 16rpx;
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
|
||||
color: #FFFFFF;
|
||||
|
||||
.one-t {
|
||||
margin-bottom: 16rpx;
|
||||
font-size: 46rpx;
|
||||
line-height: 52rpx;
|
||||
}
|
||||
|
||||
.more-t {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding-top: 10rpx;
|
||||
border-top: 1rpx solid #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-box {
|
||||
margin-top: 24rpx;
|
||||
padding: 0 16rpx 34rpx;
|
||||
|
||||
.item {
|
||||
width: 234rpx;
|
||||
height: 380rpx;
|
||||
margin-right: 8rpx;
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
background: #FFFFFF;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 234rpx;
|
||||
height: 234rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 122rpx;
|
||||
margin: 6rpx 6rpx 18rpx;
|
||||
|
||||
.more-t {
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
color: #DC1616;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 118rpx;
|
||||
height: 42rpx;
|
||||
//background: linear-gradient(180deg, #EFEDC7 0%, #EAC94B 100%);
|
||||
//border-radius: 4rpx;
|
||||
//color: #764A00;
|
||||
//font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.img-nodata {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 352rpx;
|
||||
height: 338rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user