mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
Compare commits
394 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa8aa633bf | ||
|
|
dca8ee512f | ||
|
|
50c3fd6af8 | ||
|
|
bb93be2fb1 | ||
|
|
17a4131bf1 | ||
|
|
eb9c999a16 | ||
|
|
a70c741990 | ||
|
|
6007dc57d5 | ||
|
|
7dfdb4f685 | ||
|
|
0cc27f4e60 | ||
|
|
163f9f26c2 | ||
|
|
68ba97e590 | ||
|
|
d36c2bdc3d | ||
|
|
72c64f017f | ||
|
|
0f28a7f16c | ||
|
|
581a1f75e1 | ||
|
|
a727001daf | ||
|
|
2f9754b2a5 | ||
|
|
a11452a430 | ||
|
|
7d90846960 | ||
|
|
23e456d265 | ||
|
|
cddd94b9e5 | ||
|
|
685ec5f679 | ||
|
|
0933f1942e | ||
|
|
2792df38c0 | ||
|
|
62d8d121c6 | ||
|
|
b99db4c673 | ||
|
|
3639804d1b | ||
|
|
f6ff0b8a12 | ||
|
|
a345586b25 | ||
|
|
3d0ba486df | ||
|
|
4651d74b7b | ||
|
|
55aa57d812 | ||
|
|
36c4584970 | ||
|
|
96b6565272 | ||
|
|
8b22b73f3d | ||
|
|
ba91d7c26d | ||
|
|
fd847944b7 | ||
|
|
4ea142ea08 | ||
|
|
2aceffc112 | ||
|
|
ed59b389a5 | ||
|
|
2b433cf1e8 | ||
|
|
41ea3b7a88 | ||
|
|
f5a452c124 | ||
|
|
9ce3a5e916 | ||
|
|
248c4031c0 | ||
|
|
8715066f7c | ||
|
|
5dc5cce96b | ||
|
|
f58500c4e3 | ||
|
|
2041eca723 | ||
|
|
db6e47fa04 | ||
|
|
116c168ed7 | ||
|
|
8ff6c0414a | ||
|
|
aaf1c172de | ||
|
|
f7c310b126 | ||
|
|
ab0db38eb2 | ||
|
|
283f4d6afa | ||
|
|
db51df89f7 | ||
|
|
b77b4c0ef8 | ||
|
|
dd67687d3a | ||
|
|
61f5dde015 | ||
|
|
0355dcddde | ||
|
|
1d6a61d5d9 | ||
|
|
bf393181b8 | ||
|
|
79ff1cecb4 | ||
|
|
0d21c87816 | ||
|
|
c281b0a867 | ||
|
|
bd322709f3 | ||
|
|
bc4f9527d0 | ||
|
|
0b5e7c40b0 | ||
|
|
8d5f4db494 | ||
|
|
4ecb41e9a2 | ||
|
|
dba167738b | ||
|
|
c1853fd4e0 | ||
|
|
75ef173c64 | ||
|
|
752c1086a0 | ||
|
|
6c5994202b | ||
|
|
00e229e7f4 | ||
|
|
4674cfae37 | ||
|
|
eeadfc1db9 | ||
|
|
34788d800e | ||
|
|
954cd1cda9 | ||
|
|
f3ef286aa7 | ||
|
|
7874931b1f | ||
|
|
c3b3e7bb61 | ||
|
|
12839eee8d | ||
|
|
601a2e8d33 | ||
|
|
a3fe3a3743 | ||
|
|
86fa39d7af | ||
|
|
a785718715 | ||
|
|
d4eb17e573 | ||
|
|
994b700892 | ||
|
|
317bf1cd47 | ||
|
|
8327639c23 | ||
|
|
c1830df1a2 | ||
|
|
590ceaf641 | ||
|
|
c7b739e546 | ||
|
|
42db858d61 | ||
|
|
85349a197f | ||
|
|
8ef3510c4b | ||
|
|
8d6fa2f19f | ||
|
|
af975b9f46 | ||
|
|
3de928ee14 | ||
|
|
0a5563e5e2 | ||
|
|
f4b7068cd6 | ||
|
|
2cb6f04465 | ||
|
|
037a307ed1 | ||
|
|
cd81a6afb1 | ||
|
|
f930d73a6a | ||
|
|
23bae9efd5 | ||
|
|
2880c21a26 | ||
|
|
274ac3f155 | ||
|
|
c85d488de4 | ||
|
|
92d58ea7e5 | ||
|
|
9a3d202524 | ||
|
|
ba71eaeaaf | ||
|
|
273fdf2e84 | ||
|
|
59cfa0efb0 | ||
|
|
14d720beed | ||
|
|
2dcfacd431 | ||
|
|
71690cfd8f | ||
|
|
d2c2da25b4 | ||
|
|
c3c29af8c7 | ||
|
|
e5f9f81ef7 | ||
|
|
0c0c903529 | ||
|
|
115fa87ff2 | ||
|
|
bb40364aed | ||
|
|
0e921de6c3 | ||
|
|
58eeed4bbd | ||
|
|
21289f5a92 | ||
|
|
0aec486291 | ||
|
|
5c34245ba4 | ||
|
|
3d0a202cbe | ||
|
|
66143deb0d | ||
|
|
2111020f62 | ||
|
|
160658cfb6 | ||
|
|
8a7f9b2487 | ||
|
|
85061ed2f8 | ||
|
|
3405cf68bb | ||
|
|
ebacb58049 | ||
|
|
8873f575db | ||
|
|
994ef217ac | ||
|
|
1bda042bc9 | ||
|
|
e97dbe1c90 | ||
|
|
f19071542a | ||
|
|
50836e0aa3 | ||
|
|
1b4c05f70b | ||
|
|
32dffe96ed | ||
|
|
e2df32d906 | ||
|
|
9eab3b261e | ||
|
|
1e40e2d557 | ||
|
|
256ada983b | ||
|
|
cd0c90ace8 | ||
|
|
913b96af5a | ||
|
|
a3f5212bbc | ||
|
|
9d7a06e867 | ||
|
|
48f3c38fbd | ||
|
|
706bab7eff | ||
|
|
b6fa3175c6 | ||
|
|
3cd57a6915 | ||
|
|
d433ff02cb | ||
|
|
68d2c25ff5 | ||
|
|
9ccf51dd5c | ||
|
|
727d240715 | ||
|
|
1f4448ba08 | ||
|
|
6064c168bf | ||
|
|
479470832d | ||
|
|
71fa00c267 | ||
|
|
c1331e8ccf | ||
|
|
8a2ec77c84 | ||
|
|
b197cda548 | ||
|
|
c83eddd62e | ||
|
|
46168a037d | ||
|
|
cbb2365ae8 | ||
|
|
ec3093246a | ||
|
|
670ba74044 | ||
|
|
84e0803558 | ||
|
|
1691f8244f | ||
|
|
24f4a36082 | ||
|
|
7cf7123dd2 | ||
|
|
37064141c2 | ||
|
|
5bd66b9ec6 | ||
|
|
9e34b44165 | ||
|
|
8d9a64d84b | ||
|
|
92aafe3031 | ||
|
|
81f4f4a742 | ||
|
|
9b14cd633e | ||
|
|
118aaaf6fb | ||
|
|
0635dd38a2 | ||
|
|
1d648bbad7 | ||
|
|
5dfcc2482c | ||
|
|
7ff51b5e53 | ||
|
|
c4168c9a2b | ||
|
|
7312b3ec3f | ||
|
|
c09e25974f | ||
|
|
744567e8de | ||
|
|
4156d51d78 | ||
|
|
0faae31b2e | ||
|
|
79a719e7ff | ||
|
|
0d09920314 | ||
|
|
d641123987 | ||
|
|
ce871a804c | ||
|
|
36fd58a446 | ||
|
|
9e0a681e01 | ||
|
|
df408e640a | ||
|
|
f365231ee7 | ||
|
|
2e8d124560 | ||
|
|
1e8279c849 | ||
|
|
48668fd2d4 | ||
|
|
ee5539fb0f | ||
|
|
97d88abf80 | ||
|
|
9a33db76e9 | ||
|
|
65aa9d0a9f | ||
|
|
baaeef0978 | ||
|
|
e27070e089 | ||
|
|
2ea2723aed | ||
|
|
5188bba5b1 | ||
|
|
33bb16a0d3 | ||
|
|
87f6b81e37 | ||
|
|
3b4f0b8c9d | ||
|
|
3b540b1aac | ||
|
|
378ac39315 | ||
|
|
2dac958227 | ||
|
|
c879cb2af0 | ||
|
|
32336decc6 | ||
|
|
7cd64553ab | ||
|
|
6e737a3fa7 | ||
|
|
25b403cde9 | ||
|
|
535a36c378 | ||
|
|
7b30bc42d7 | ||
|
|
403ae0a963 | ||
|
|
800b91d406 | ||
|
|
bf92b0804e | ||
|
|
7e8ff778f9 | ||
|
|
31f438edfa | ||
|
|
a7ed6454af | ||
|
|
12ea0c2b84 | ||
|
|
44086e8bf4 | ||
|
|
b740a6f906 | ||
|
|
7376d4d890 | ||
|
|
f9d09365ea | ||
|
|
81297db7a8 | ||
|
|
b5ca94ab98 | ||
|
|
a220339fd6 | ||
|
|
0994b6659a | ||
|
|
c4037a346d | ||
|
|
45a6e76d4a | ||
|
|
aee67ec317 | ||
|
|
51610546c4 | ||
|
|
e8e7d27c0d | ||
|
|
166e889b6f | ||
|
|
db95647cd8 | ||
|
|
db13814156 | ||
|
|
5cf3956bc8 | ||
|
|
329e6df722 | ||
|
|
8023852b3c | ||
|
|
228935034d | ||
|
|
acff55dc65 | ||
|
|
61a9110c51 | ||
|
|
3a3e14e0a7 | ||
|
|
6ba767419e | ||
|
|
925365018b | ||
|
|
5960df31bd | ||
|
|
21f9fd92e2 | ||
|
|
9765310136 | ||
|
|
51cde2dd0d | ||
|
|
3311568e50 | ||
|
|
e5918b041a | ||
|
|
f46330ecf0 | ||
|
|
846e80f1fa | ||
|
|
631519d7c7 | ||
|
|
bbeb31e8a3 | ||
|
|
52bcf07e25 | ||
|
|
4d725221a5 | ||
|
|
c8a0619141 | ||
|
|
e1d7b1801d | ||
|
|
15456ae377 | ||
|
|
1c3d711298 | ||
|
|
1bee69cefb | ||
|
|
cf740d9605 | ||
|
|
d2aca24d06 | ||
|
|
6e042c4b78 | ||
|
|
1afd1704ab | ||
|
|
d5f81fe5d8 | ||
|
|
fada0a735f | ||
|
|
35de0c031d | ||
|
|
2e5eefc079 | ||
|
|
1fa264b0bf | ||
|
|
d2a0940858 | ||
|
|
4ff8eb6494 | ||
|
|
8ca87cdb2a | ||
|
|
f45b115355 | ||
|
|
7490211340 | ||
|
|
76d028277a | ||
|
|
0a0066fe5c | ||
|
|
4f7e38db3b | ||
|
|
54dcd2d8be | ||
|
|
6c1d7cce8d | ||
|
|
06b090cdf6 | ||
|
|
3653b4e7cb | ||
|
|
c6c890da63 | ||
|
|
75e7bc2d9c | ||
|
|
649f983990 | ||
|
|
193628913a | ||
|
|
cb304d7d53 | ||
|
|
4bb7bd4603 | ||
|
|
1e408eb8ae | ||
|
|
d762d18c7b | ||
|
|
3622c7bb53 | ||
|
|
1b9b2d9c95 | ||
|
|
0d5c60ed8c | ||
|
|
ab2bcb515f | ||
|
|
b3e6eb72eb | ||
|
|
9742aaf0bc | ||
|
|
bc1942c492 | ||
|
|
44facf549a | ||
|
|
09dd9861fd | ||
|
|
8d3b5cf91d | ||
|
|
5a90567e98 | ||
|
|
246ba9057f | ||
|
|
9eecc603db | ||
|
|
1fe4078115 | ||
|
|
ef73a6fe94 | ||
|
|
edef393535 | ||
|
|
97e6fc79ea | ||
|
|
0b82ae7569 | ||
|
|
3cb0e52ca0 | ||
|
|
fd1d32d431 | ||
|
|
8c169489eb | ||
|
|
6ecb6b8055 | ||
|
|
515cd3ebbd | ||
|
|
6c6b89f512 | ||
|
|
1ac5dcfe25 | ||
|
|
ccd5decbf7 | ||
|
|
9a12a29127 | ||
|
|
8d96a3c106 | ||
|
|
41bfd17cd0 | ||
|
|
5614414185 | ||
|
|
7ac4010910 | ||
|
|
ffc5af6d39 | ||
|
|
c64f00fe9e | ||
|
|
d3a49f3f3e | ||
|
|
06c6abe250 | ||
|
|
f54739e337 | ||
|
|
cdc673da06 | ||
|
|
0bd99df26a | ||
|
|
0dcee2f2e2 | ||
|
|
f7f836f5fd | ||
|
|
16d1576c10 | ||
|
|
0d1dbd0350 | ||
|
|
18ea8a4366 | ||
|
|
b9aa720bea | ||
|
|
28473979ec | ||
|
|
dbe5a21f4d | ||
|
|
31d9859f10 | ||
|
|
7cbd2b698c | ||
|
|
6fa3fa7822 | ||
|
|
e80316d43d | ||
|
|
9979b6fd67 | ||
|
|
a36a4cd244 | ||
|
|
f99e2673a6 | ||
|
|
47da7d3b16 | ||
|
|
4f2f6e8d20 | ||
|
|
4da164dcba | ||
|
|
1aab8aa8c8 | ||
|
|
8a2a946bc1 | ||
|
|
038de5ed53 | ||
|
|
0bac362c95 | ||
|
|
04599148fc | ||
|
|
b61faef093 | ||
|
|
642536f83e | ||
|
|
7ebb5e21d2 | ||
|
|
0c18a0f6db | ||
|
|
93768e4014 | ||
|
|
3674b63db4 | ||
|
|
9e8f369da4 | ||
|
|
04cc8b991c | ||
|
|
0342f1d17a | ||
|
|
82838a5ebb | ||
|
|
20042786aa | ||
|
|
2037b57a5d | ||
|
|
2932c7f35d | ||
|
|
53cc6f46d1 | ||
|
|
a5e2ae9a4d | ||
|
|
95beebc5c7 | ||
|
|
f7b8713be1 | ||
|
|
c33d10734f | ||
|
|
edde94af69 | ||
|
|
fbf2b6a6fa | ||
|
|
b84f1b595e | ||
|
|
e4bc52a219 | ||
|
|
ea8c86e2e2 | ||
|
|
70506767ef | ||
|
|
48002d6143 |
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
*/.vscode/
|
||||
/.idea/
|
||||
*/dist/
|
||||
.DS_Store
|
||||
node_modules/
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
17
.idea/codeStyles/Project.xml
generated
17
.idea/codeStyles/Project.xml
generated
@@ -1,17 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<option name="OTHER_INDENT_OPTIONS">
|
||||
<value>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<codeStyleSettings language="JavaScript">
|
||||
<indentOptions>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="0" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
5
.idea/codeStyles/codeStyleConfig.xml
generated
@@ -1,5 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
||||
6
.idea/inspectionProfiles/Project_Default.xml
generated
6
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
12
.idea/lili-shop-ui.iml
generated
12
.idea/lili-shop-ui.iml
generated
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/misc.xml
generated
6
.idea/misc.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/lili-shop-ui.iml" filepath="$PROJECT_DIR$/.idea/lili-shop-ui.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
380
.idea/workspace.xml
generated
380
.idea/workspace.xml
generated
@@ -1,380 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="BranchesTreeState">
|
||||
<expand>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
|
||||
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="7e964aa0-753b-43f7-854a-2942a3e76fe4" name="默认更改列表" comment="店铺设置">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<<<<<<< HEAD
|
||||
<change beforePath="$PROJECT_DIR$/buyer/src/pages/home/orderCenter/AddAddress.vue" beforeDir="false" afterPath="$PROJECT_DIR$/buyer/src/pages/home/orderCenter/AddAddress.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/manager/src/config/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/manager/src/config/index.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/seller/src/config/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/seller/src/config/index.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/seller/src/views/statistics/goods/goodsStatistics.vue" beforeDir="false" afterPath="$PROJECT_DIR$/seller/src/views/statistics/goods/goodsStatistics.vue" afterDir="false" />
|
||||
=======
|
||||
<change beforePath="$PROJECT_DIR$/manager/src/views/goods-unit/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/manager/src/views/goods-unit/index.vue" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/manager/src/views/sensitiveWords/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/manager/src/views/sensitiveWords/index.vue" afterDir="false" />
|
||||
>>>>>>> new-lmr
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="Vue File" />
|
||||
<option value="Vue Single File Component" />
|
||||
<option value="JavaScript File" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectId" id="1gGPnr0TWcTGoYhLT7QHFe5MrX4" />
|
||||
<component name="ProjectLevelVcsManager">
|
||||
<ConfirmationsSetting value="2" id="Add" />
|
||||
</component>
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<<<<<<< HEAD
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/manager/src/api" />
|
||||
=======
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/manager/src/views/sys/setting-manage" />
|
||||
>>>>>>> new-lmr
|
||||
<property name="node.js.detected.package.eslint" value="true" />
|
||||
<property name="node.js.detected.package.tslint" value="true" />
|
||||
<property name="node.js.path.for.package.eslint" value="project" />
|
||||
<property name="node.js.path.for.package.tslint" value="project" />
|
||||
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
||||
<property name="node.js.selected.package.tslint" value="(autodetect)" />
|
||||
<property name="nodejs_package_manager_path" value="npm" />
|
||||
<property name="settings.editor.selected.configurable" value="preferences.sourceCode.XML" />
|
||||
<property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<<<<<<< HEAD
|
||||
<recent name="$PROJECT_DIR$/manager/src/api" />
|
||||
<recent name="$PROJECT_DIR$/manager/src/views/my-components" />
|
||||
=======
|
||||
<recent name="$PROJECT_DIR$/manager/src/views/sys/setting-manage" />
|
||||
>>>>>>> new-lmr
|
||||
<recent name="$PROJECT_DIR$/buyer/src/components/verify" />
|
||||
<recent name="$PROJECT_DIR$/buyer/src/components/change" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/buyer/src/components/change" />
|
||||
<recent name="$PROJECT_DIR$/buyer/src/pages/home/memberCenter" />
|
||||
<recent name="$PROJECT_DIR$/buyer/src/pages/home/orderCenter" />
|
||||
<recent name="$PROJECT_DIR$/buyer/src/pages/home" />
|
||||
<recent name="$PROJECT_DIR$/buyer/src/components/home/order" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration name="Home.vue" type="JavascriptDebugType" temporary="true" nameIsGenerated="true" uri="http://localhost:63342/lili-shop-ui/buyer/src/page/user/Home.vue" useBuiltInWebServerPort="true">
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="JavaScript Debug.Home.vue" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="7e964aa0-753b-43f7-854a-2942a3e76fe4" name="默认更改列表" comment="" />
|
||||
<created>1597738125477</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1597738125477</updated>
|
||||
<workItem from="1597738127938" duration="6268000" />
|
||||
<workItem from="1597825716012" duration="3768000" />
|
||||
<workItem from="1597830090678" duration="7632000" />
|
||||
<workItem from="1597972262326" duration="865000" />
|
||||
<workItem from="1597974893526" duration="112000" />
|
||||
<workItem from="1597975021121" duration="17000" />
|
||||
<workItem from="1597975216701" duration="17254000" />
|
||||
<workItem from="1598184961388" duration="14000" />
|
||||
<workItem from="1598233017859" duration="10307000" />
|
||||
<workItem from="1598259954059" duration="2720000" />
|
||||
<workItem from="1598318520176" duration="726000" />
|
||||
<workItem from="1598319433942" duration="106000" />
|
||||
<workItem from="1598319554477" duration="13265000" />
|
||||
<workItem from="1598406300597" duration="6030000" />
|
||||
<workItem from="1598422866858" duration="7787000" />
|
||||
<workItem from="1598491104901" duration="37245000" />
|
||||
<workItem from="1606876680167" duration="61000" />
|
||||
<workItem from="1611131536390" duration="5616000" />
|
||||
<workItem from="1611537245379" duration="828000" />
|
||||
<workItem from="1611538362285" duration="350000" />
|
||||
<workItem from="1611560515629" duration="834000" />
|
||||
<workItem from="1611650051294" duration="3000" />
|
||||
<workItem from="1611818003333" duration="239000" />
|
||||
<workItem from="1613989205923" duration="7005000" />
|
||||
<workItem from="1614076082765" duration="8973000" />
|
||||
<workItem from="1614142479169" duration="2129000" />
|
||||
<workItem from="1614162982178" duration="8343000" />
|
||||
<workItem from="1614228135182" duration="3456000" />
|
||||
<workItem from="1614248866969" duration="8023000" />
|
||||
<workItem from="1614313313338" duration="83000" />
|
||||
<workItem from="1614313447954" duration="211000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="管理端页面优化">
|
||||
<created>1613996019944</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1613996019944</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00002" summary="修复修改商家地址报错问题">
|
||||
<created>1613996389449</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1613996389449</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00003" summary="去掉id">
|
||||
<created>1614076370139</created>
|
||||
<option name="number" value="00003" />
|
||||
<option name="presentableId" value="LOCAL-00003" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614076370139</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00004" summary="选择物流规则不能选择物流模板">
|
||||
<created>1614080544415</created>
|
||||
<option name="number" value="00004" />
|
||||
<option name="presentableId" value="LOCAL-00004" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614080544415</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00005" summary="修改查询条件样式">
|
||||
<created>1614143298555</created>
|
||||
<option name="number" value="00005" />
|
||||
<option name="presentableId" value="LOCAL-00005" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614143298555</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00006" summary="修改样式">
|
||||
<created>1614143902874</created>
|
||||
<option name="number" value="00006" />
|
||||
<option name="presentableId" value="LOCAL-00006" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614143902874</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00007" summary="修改更新时间为NAN">
|
||||
<created>1614144541858</created>
|
||||
<option name="number" value="00007" />
|
||||
<option name="presentableId" value="LOCAL-00007" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614144541858</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00008" summary="修复app版本无法添加和修改">
|
||||
<created>1614230386509</created>
|
||||
<option name="number" value="00008" />
|
||||
<option name="presentableId" value="LOCAL-00008" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614230386509</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00009" summary="去掉打印">
|
||||
<created>1614230407722</created>
|
||||
<option name="number" value="00009" />
|
||||
<option name="presentableId" value="LOCAL-00009" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614230407722</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00010" summary="去掉多选">
|
||||
<created>1614230544808</created>
|
||||
<option name="number" value="00010" />
|
||||
<option name="presentableId" value="LOCAL-00010" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614230544808</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00011" summary="修改消息标题宽度">
|
||||
<created>1614230627881</created>
|
||||
<option name="number" value="00011" />
|
||||
<option name="presentableId" value="LOCAL-00011" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614230627881</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00012" summary="店铺相关js提交">
|
||||
<created>1614231645143</created>
|
||||
<option name="number" value="00012" />
|
||||
<option name="presentableId" value="LOCAL-00012" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614231645143</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00013" summary="店铺修改">
|
||||
<created>1614231785359</created>
|
||||
<option name="number" value="00013" />
|
||||
<option name="presentableId" value="LOCAL-00013" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614231785359</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00014" summary="优化页面">
|
||||
<created>1614249105672</created>
|
||||
<option name="number" value="00014" />
|
||||
<option name="presentableId" value="LOCAL-00014" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614249105672</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00015" summary="页面优化">
|
||||
<created>1614258980903</created>
|
||||
<option name="number" value="00015" />
|
||||
<option name="presentableId" value="LOCAL-00015" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614258980903</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00016" summary="页面优化">
|
||||
<created>1614259068248</created>
|
||||
<option name="number" value="00016" />
|
||||
<option name="presentableId" value="LOCAL-00016" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614259068248</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00017" summary="页面优化">
|
||||
<created>1614313690732</created>
|
||||
<option name="number" value="00017" />
|
||||
<option name="presentableId" value="LOCAL-00017" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1614313690732</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="18" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
<component name="Vcs.Log.History.Properties">
|
||||
<option name="COLUMN_ID_ORDER">
|
||||
<list>
|
||||
<option value="Default.Root" />
|
||||
<option value="Default.Author" />
|
||||
<option value="Default.Date" />
|
||||
<option value="Default.Subject" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="1">
|
||||
<value>
|
||||
<State>
|
||||
<option name="SHOW_ONLY_AFFECTED_CHANGES" value="true" />
|
||||
<option name="FILTERS">
|
||||
<map>
|
||||
<entry key="branch">
|
||||
<value>
|
||||
<list>
|
||||
<option value="HEAD" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="structure">
|
||||
<value>
|
||||
<list>
|
||||
<option value="dir:/Users/liushuai/Documents/workspace/lili-shop-ui/seller/src/router" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State>
|
||||
<option name="COLUMN_ORDER" />
|
||||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="店铺设置" />
|
||||
<MESSAGE value="文件排序问题处理" />
|
||||
<MESSAGE value="管理端页面优化" />
|
||||
<MESSAGE value="修复修改商家地址报错问题" />
|
||||
<MESSAGE value="去掉id" />
|
||||
<MESSAGE value="选择物流规则不能选择物流模板" />
|
||||
<MESSAGE value="修改查询条件样式" />
|
||||
<MESSAGE value="修改样式" />
|
||||
<MESSAGE value="修改更新时间为NAN" />
|
||||
<MESSAGE value="修复app版本无法添加和修改" />
|
||||
<MESSAGE value="去掉打印" />
|
||||
<MESSAGE value="去掉多选" />
|
||||
<MESSAGE value="修改消息标题宽度" />
|
||||
<MESSAGE value="店铺相关js提交" />
|
||||
<MESSAGE value="店铺修改" />
|
||||
<MESSAGE value="优化页面" />
|
||||
<MESSAGE value="页面优化" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="页面优化" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="2074" y="292" key="CommitChangelistDialog2" timestamp="1614313690605">
|
||||
<screen x="0" y="23" width="3440" height="1333" />
|
||||
</state>
|
||||
<state x="2074" y="292" key="CommitChangelistDialog2/0.23.3440.1333@0.23.3440.1333" timestamp="1614313690605" />
|
||||
<state x="1660" y="123" width="1572" height="1133" key="DiffContextDialog" timestamp="1614231764977">
|
||||
<screen x="0" y="23" width="3440" height="1333" />
|
||||
</state>
|
||||
<state x="1660" y="123" width="1572" height="1133" key="DiffContextDialog/0.23.3440.1333@0.23.3440.1333" timestamp="1614231764977" />
|
||||
<state x="2046" y="418" key="Vcs.Push.Dialog.v2" timestamp="1614313692405">
|
||||
<screen x="0" y="23" width="3440" height="1333" />
|
||||
</state>
|
||||
<state x="2046" y="418" key="Vcs.Push.Dialog.v2/0.23.3440.1333@0.23.3440.1333" timestamp="1614313692405" />
|
||||
<state x="2055" y="414" width="782" height="550" key="find.popup" timestamp="1614256597933">
|
||||
<screen x="0" y="23" width="3440" height="1333" />
|
||||
</state>
|
||||
<state x="2055" y="414" width="782" height="550" key="find.popup/0.23.3440.1333@0.23.3440.1333" timestamp="1614256597933" />
|
||||
<state x="2111" y="325" key="run.anything.popup" timestamp="1613991372498">
|
||||
<screen x="0" y="23" width="3440" height="1333" />
|
||||
</state>
|
||||
<state x="2111" y="325" key="run.anything.popup/0.23.3440.1333@0.23.3440.1333" timestamp="1613991372498" />
|
||||
<state x="2111" y="327" width="670" height="676" key="search.everywhere.popup" timestamp="1614254687317">
|
||||
<screen x="0" y="23" width="3440" height="1333" />
|
||||
</state>
|
||||
<state x="2111" y="327" width="670" height="676" key="search.everywhere.popup/0.23.3440.1333@0.23.3440.1333" timestamp="1614254687317" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<breakpoints>
|
||||
<line-breakpoint enabled="true" type="javascript">
|
||||
<url>file://$PROJECT_DIR$/manager/src/views/sys/monitor/monitor.vue</url>
|
||||
<line>5</line>
|
||||
<option name="timeStamp" value="2" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
</component>
|
||||
</project>
|
||||
238
README.md
238
README.md
@@ -1,96 +1,75 @@
|
||||
## Lilishop B2B2C商城系统
|
||||
|
||||
##### 官方公众号 & 开源不易,如有帮助请点Star
|
||||
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,其他问题先看文档后提问)
|
||||
|
||||
|
||||
##### 交流 qq 1群 961316482(已满)
|
||||
<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=BAhURE3DG2YWhQk6kRxVapbLykqMoPS8&jump_from=webapi"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="Lilishop交流群" title="Lilishop交流群">点击快捷加群</a>
|
||||
|
||||
##### 交流 qq 2群 875294241(已满)
|
||||
|
||||
<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=_lrekOvr5k2p5uTn5GRidI-chKEmpCX3&jump_from=webapi"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="Lilishop交流群2群" title="Lilishop交流群2群">点击快捷加群</a>
|
||||
|
||||
|
||||
##### 交流 qq 3群 263785057
|
||||
|
||||
<a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=VUogkDvaso4zLTFH8nxFPDRKq0EthUn1&jump_from=webapi"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="Lilishop交流群3群" title="Lilishop交流群3群">点击快捷加群</a>
|
||||
|
||||
|
||||
##### 体验 公众号/小程序/APP 体验,扫描二维码
|
||||
|
||||

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

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

|
||||
|
||||
### 3行命令搭建本地环境
|
||||
### 快速本地部署
|
||||
|
||||
温馨提示:由于服务较多,如果笔记本环境启动内存没有32g可能无法启动成功(macbookpro 2020 16g内存启动无法成功),台式机在16g内存、AMD 3700x 的ubuntu系统成功运行。
|
||||
|
||||
##### 下载docker脚本
|
||||
`git clone https://gitee.com/beijing_hongye_huicheng/docker.git `
|
||||
##### 部署基础环境
|
||||
`docker-compose up -d`
|
||||
|
||||
##### 部署应用
|
||||
`docker-compose -f docker-compose-application.yml up -d`
|
||||
|
||||
|
||||
|
||||
PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql
|
||||
|
||||
##### 各个地址
|
||||
|
||||
| API | 地址 |
|
||||
| -------------- | --------------- |
|
||||
| 买家API | http://127.0.0.1:8888 |
|
||||
| 商家API | http://127.0.0.1:8889 |
|
||||
| 管理端API | http://127.0.0.1:8887 |
|
||||
| 通用API | http://127.0.0.1:8890 |
|
||||
|
||||
| 前端演示 | 地址 |
|
||||
| -------------- | --------------- |
|
||||
| PC | http://127.0.0.1:10000 |
|
||||
| WAP | http://127.0.0.1:10001 |
|
||||
| 商家 | http://127.0.0.1:10002 |
|
||||
| 管理端 | http://127.0.0.1:10003 |
|
||||
[点击跳转](https://docs.pickmall.cn/deploy/%E8%BF%90%E8%A1%8C%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87.html)
|
||||
|
||||
**商城数据库**
|
||||
使用docker-compose部署数据库,自动初始化数据库,不需要手动下载等操作
|
||||
|
||||
如果手动部署,才需要获取sql [点击跳转](https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql) (PS:这里有与tag版本一致的sql,如果是历史版本,则docker项目也切换至历史版本获取sql即可,历史版本升级则根据java相聚的根目录DB目录下的升级sql,按需执行)。
|
||||
|
||||
|
||||
|
||||
@@ -98,33 +77,24 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
|
||||
|
||||
|
||||
#### 平台功能
|
||||
#### 平台管理端功能
|
||||
|
||||

|
||||

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

|
||||
|
||||
|
||||
### 商城前端功能展示
|
||||
|
||||
|
||||
|
||||
### 功能展示
|
||||
|
||||
|
||||
|
||||
#### 移动端
|
||||
|
||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="管理端功能展示" style="zoom:50%;" />
|
||||
#### 商城移动端
|
||||
|
||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
#### 管理端
|
||||
#### 平台管理端
|
||||
|
||||

|
||||
|
||||
@@ -133,9 +103,9 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
|
||||
#### 架构图
|
||||
|
||||

|
||||

|
||||
|
||||
##### Java后台
|
||||
##### 后台技术选型
|
||||
|
||||
| 说明 | 框架 | 说明 | |
|
||||
| -------------- | --------------- | -------------- | ------------- |
|
||||
@@ -166,102 +136,21 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
| 基础UI库 | uViewui | 基础框架 | uni-app |
|
||||
| CSS预处理 | scss | 地图引擎 | amap |
|
||||
|
||||
### 升级计划
|
||||
|
||||
#### 计划每个月发布一个版本,具体时间可能有出入
|
||||
|
||||
时间:2021年6月15日
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.微信小程序直播
|
||||
2.优惠券活动
|
||||
3.新人赠券
|
||||
4.准确发券
|
||||
5.用户等级
|
||||
6.数据导出
|
||||
7.订单批量
|
||||
8.APP版本升级检测
|
||||
9.积分商城
|
||||
|
||||
功能优化:
|
||||
1.优惠券有效期增加类型:设置领取后*内有效。
|
||||
2.秒杀活动设置为每天开启,需设置秒杀活动开启时间。
|
||||
3.店铺配送模板,配送地区如果选择省份则下方的市级地址不展示。
|
||||
4.店铺配送模板支持,店铺包邮。
|
||||
5.普通商品设置去除卖家承担运费。
|
||||
|
||||
```
|
||||
|
||||
时间:2021年7月15日
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.会员权益
|
||||
2.支持用户升级会员
|
||||
3.供求单
|
||||
4.IM:腾讯云智服
|
||||
5.服务商品
|
||||
6.店铺支持订单核销
|
||||
7.店铺自提点
|
||||
功能优化:
|
||||
1.用户分享商城、关注店铺、邀请新用户可获取积分、经验值。
|
||||
```
|
||||
|
||||
时间:2021年8月16日
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.微淘功能
|
||||
2.店铺移动端
|
||||
3.店铺发货单
|
||||
```
|
||||
|
||||
时间:2021年9月15日
|
||||
|
||||
```
|
||||
新增功能:
|
||||
增加供应商功能
|
||||
```
|
||||
|
||||
### 版本升级
|
||||
|
||||
```
|
||||
后续会持续版本升级,修复bug,完善功能,覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
|
||||
|
||||
后续会考虑推出微服务/中台等 企业级版本
|
||||
系统后续会提供多场景解决方案。
|
||||
更多架构:微服务、Saas、中台等,都会支持。 支持差价升级商业授权
|
||||
```
|
||||
|
||||
### 技术亮点
|
||||
### 商业授权
|
||||
商业版本与开源版本代码一致,没有区分
|
||||
|
||||
商业使用需要授权,授权方式可选择联系官网客服,或者qq群联系群主。
|
||||
|
||||
1.后端框架基于Springboot,构建基于maven,持久层使用MyBatisPlus。使用elasticsearch、redis、mongodb、rocketmq 等各种中间健。都是主流架构,轻松应对各种环境。
|
||||
|
||||
2.支持集群、分布式,支持docker 轻松部署,解决各种复杂场景!
|
||||
|
||||
3.代码模块清晰,主要分为三端api(买家、卖家、管理),各端API互相隔离,自己鉴权,自己操作业务。
|
||||
|
||||
4.使用阿里开源的RocketMQ,基于mq解决各种并发场景,解决事务一致性,解决搞并发延迟场景问题。
|
||||
|
||||
5.项目使用多级缓存,应用不同场景,redis缓存业务数据、mongodb缓存关系型多对多关系问题、nginx缓存高频访问低频修改的页面。
|
||||
|
||||
6.支持各种联合登陆,支持各种客户端的支付问题,灵活配置灵活开启。
|
||||
|
||||
7.内置完善的楼层装修机制,各种拖拉拽,维护跳转页面或外网,即便是一个什么都不懂的运营也可以轻松掌握。
|
||||
|
||||
8.内置阿里短信接口,可以在线申请短信模版。内置阿里oss系统,可以对文件执行各种操作。oss商家端资源相互隔离。
|
||||
|
||||
10.强大的统计报表,统计效果,可以实现各个场景,包含在线人数,历史在线人数,活跃人数等信息。
|
||||
|
||||
11.标准Api接口、提供swagger文档,快速二开。
|
||||
|
||||
12.分布式调度任务中心,解决分布式定时任务多次执行问题。
|
||||
|
||||
13.代码注释完善,快速上手。
|
||||
|
||||
14.非移动端采用IView框架,各种自定义插件、选择器实现。移动端采用uniapp,一次编写,全端使用
|
||||
|
||||
15.已经对接好各种第三方插件,支持各种复杂等联合登陆,联合支付等场景。
|
||||
商业授权模式为永久授权,支持永久升级。
|
||||
|
||||
商业案例由于涉及部分多层二开关系,如需了解可以咨询销售。
|
||||
|
||||
|
||||
### 开源须知
|
||||
@@ -269,9 +158,14 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
|
||||
2.禁止将本开源的代码和资源进行任何形式任何名义的出售.
|
||||
|
||||
3.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||
3.软件受国家计算机软件著作权保护(登记号:2021SR0805085)。
|
||||
|
||||
4.限制商用,如果需要商业使用请联系我们。QQ3409056806.或者加入qq群联系群主。
|
||||
|
||||
|
||||
|
||||
### 交流群
|
||||
|
||||
**QQ群**:961316482
|
||||
|
||||
##### 官方qq 1群 961316482(已满)
|
||||
##### 官方qq 2群 875294241(已满)
|
||||
##### 官网qq 3群 263785057
|
||||
|
||||
20
build.sh
Normal file
20
build.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#代码目录
|
||||
code_path=$PWD
|
||||
|
||||
git checkout master
|
||||
git pull
|
||||
|
||||
cd ${code_path}/manager
|
||||
rm -rf ./dist
|
||||
yarn install
|
||||
yarn build
|
||||
|
||||
cd ${code_path}/seller
|
||||
rm -rf ./dist
|
||||
yarn install
|
||||
yarn build
|
||||
|
||||
cd ${code_path}/buyer
|
||||
rm -rf ./dist
|
||||
yarn install
|
||||
yarn build
|
||||
5
buyer/.npmrc
Normal file
5
buyer/.npmrc
Normal file
@@ -0,0 +1,5 @@
|
||||
# 默认依赖包指定淘宝源
|
||||
registry=https://registry.npm.taobao.org/
|
||||
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
|
||||
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
|
||||
electron_mirror=https://npm.taobao.org/mirrors/electron/
|
||||
5
buyer/.yarnrc
Normal file
5
buyer/.yarnrc
Normal file
@@ -0,0 +1,5 @@
|
||||
registry "https://registry.npmmirror.com"
|
||||
sass_binary_site "https://npmmirror.com/mirrors/node-sass"
|
||||
phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
|
||||
electron_mirror "https://npmmirror.com/mirrors/electron"
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
FROM nginx:alpine
|
||||
FROM node:10.19.0 as build-stage
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
RUN mkdir -p /app/
|
||||
COPY ./dist /app/
|
||||
# production stage
|
||||
FROM nginx:stable-alpine as production-stage
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]k
|
||||
|
||||
@@ -1 +1 @@
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-4.2.0:0.0.2 .
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.4.1 .
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -1,51 +1,46 @@
|
||||
#这个文件给docker用的
|
||||
#user nobody;
|
||||
worker_processes 1;
|
||||
worker_processes 1;
|
||||
|
||||
#error_log logs/error.log;
|
||||
#error_log logs/error.log notice;
|
||||
#error_log logs/error.log info;
|
||||
|
||||
#pid logs/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
# '$status $body_bytes_sent "$http_referer" '
|
||||
# '"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
#access_log logs/access.log main;
|
||||
|
||||
sendfile on;
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 65;
|
||||
keepalive_timeout 65;
|
||||
client_max_body_size 10m;
|
||||
gzip on;
|
||||
gzip_min_length 5k;
|
||||
gzip_buffers 4 16k;
|
||||
gzip_min_length 5k;
|
||||
gzip_buffers 4 16k;
|
||||
gzip_http_version 1.0;
|
||||
gzip_comp_level 4;
|
||||
gzip_types text/plain application/x-javascript application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
|
||||
gzip_types text/plain application/x-javascript application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
|
||||
gzip_vary on;
|
||||
|
||||
server {
|
||||
listen 10000;
|
||||
server_name localhost;
|
||||
listen 10000;
|
||||
|
||||
location / {
|
||||
root /app;
|
||||
try_files $uri $uri/ /index.html $uri/ =404;
|
||||
index index.html index.htm;
|
||||
index index.html index.htm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2003
buyer/package-lock.json
generated
2003
buyer/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
17
buyer/public/config.js
Normal file
17
buyer/public/config.js
Normal file
@@ -0,0 +1,17 @@
|
||||
var BASE = {
|
||||
/**
|
||||
* @description api请求基础路径
|
||||
*/
|
||||
API_DEV: {
|
||||
common: "http://localhost:8890",
|
||||
buyer: "http://localhost:8888",
|
||||
seller: "http://localhost:8889",
|
||||
manager: "http://localhost:8887"
|
||||
},
|
||||
API_PROD: {
|
||||
common: "http://192.168.2.110:8890",
|
||||
buyer: "http://192.168.2.110:8888",
|
||||
seller: "http://192.168.2.110:8889",
|
||||
manager: "http://192.168.2.110:8887"
|
||||
},
|
||||
};
|
||||
@@ -14,7 +14,9 @@
|
||||
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
||||
<script src="<%=js%>"></script>
|
||||
<% } %>
|
||||
<script src="/config.js"></script>
|
||||
<noscript>
|
||||
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,25 +1,66 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
import storage from '@/plugins/storage';
|
||||
import storage from "@/plugins/storage";
|
||||
import { getBaseSite } from "@/api/common.js";
|
||||
export default {
|
||||
name: 'App',
|
||||
mounted () {
|
||||
let uuid = storage.getItem('uuid');
|
||||
if (!uuid) {
|
||||
uuid = uuidv4();
|
||||
storage.setItem('uuid', uuid);
|
||||
name: "App",
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods:{
|
||||
init(){
|
||||
if(!storage.getItem("siteName")||!storage.getItem("logoImg")||!storage.getItem("sitelogo_expiration_time")) {
|
||||
this.getSite();
|
||||
}else{
|
||||
// 如果缓存过期,则获取最新的信息
|
||||
if (new Date() > storage.getItem("sitelogo_expiration_time")) {
|
||||
this.getSite();
|
||||
return;
|
||||
}else{
|
||||
window.document.title = storage.getItem("siteName");
|
||||
//动态获取icon
|
||||
let link =document.querySelector("link[rel*='icon']") ||document.createElement("link");
|
||||
link.type = "image/x-icon";
|
||||
link.href = storage.getItem("logoImg");
|
||||
link.rel = "shortcut icon";
|
||||
document.getElementsByTagName("head")[0].appendChild(link);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
getSite(){
|
||||
//获取基本站点信息
|
||||
getBaseSite().then((res) => {
|
||||
if (res.success && res.result.settingValue) {
|
||||
let data = JSON.parse(res.result.settingValue);
|
||||
// 过期时间
|
||||
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||
// 存放过期时间
|
||||
storage.setItem("sitelogo_expiration_time", expirationTime);
|
||||
// 存放信息
|
||||
storage.setItem('siteName', data.siteName);
|
||||
storage.setItem('logoImg', data.buyerSideLogo);
|
||||
|
||||
window.document.title = data.siteName;
|
||||
//动态获取icon
|
||||
let link =document.querySelector("link[rel*='icon']") ||document.createElement("link");
|
||||
link.type = "image/x-icon";
|
||||
link.href = data.buyerSideLogo;
|
||||
link.rel = "shortcut icon";
|
||||
document.getElementsByTagName("head")[0].appendChild(link);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#app{
|
||||
#app {
|
||||
@include background_color($light_background_color);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,7 +11,7 @@ import request, {Method} from '@/plugins/request.js'
|
||||
// 获取密码状态
|
||||
export function getPwdStatus (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/check',
|
||||
url: '/buyer/passport/member/wallet/check',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -21,7 +21,7 @@ export function getPwdStatus (params) {
|
||||
// 设置密码
|
||||
export function setPwd (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/set-password',
|
||||
url: '/buyer/passport/member/wallet/set-password',
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -31,7 +31,7 @@ export function setPwd (params) {
|
||||
// 设置支付密码
|
||||
export function setUpdatePwdOrdinary (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/update-password/ordinary',
|
||||
url: '/buyer/passport/member/wallet/update-password/ordinary',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -41,7 +41,7 @@ export function setUpdatePwdOrdinary (params) {
|
||||
// 修改会员资料
|
||||
export function editMemberInfo (params) {
|
||||
return request({
|
||||
url: '/buyer/members/editOwn',
|
||||
url: '/buyer/passport/member/editOwn',
|
||||
method: Method.PUT,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -51,9 +51,18 @@ export function editMemberInfo (params) {
|
||||
// 修改密码
|
||||
export function editPwd (params) {
|
||||
return request({
|
||||
url: `/buyer/members/modifyPass`,
|
||||
url: `/buyer/passport/member/modifyPass`,
|
||||
method: Method.PUT,
|
||||
needToken: true,
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取密码状态
|
||||
export function logout () {
|
||||
return request({
|
||||
url: '/buyer/passport/member/logout',
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 会员收货地址列表
|
||||
export function memberAddress () {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
url: '/buyer/member/address',
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
@@ -14,7 +14,7 @@ export function memberAddress () {
|
||||
// 添加收货地址
|
||||
export function newMemberAddress (params) {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
url: '/buyer/member/address',
|
||||
needToken: true,
|
||||
method: Method.POST,
|
||||
data: params
|
||||
@@ -24,7 +24,7 @@ export function newMemberAddress (params) {
|
||||
// 编辑收货地址
|
||||
export function editMemberAddress (params) {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
url: '/buyer/member/address',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -34,7 +34,7 @@ export function editMemberAddress (params) {
|
||||
// 删除收货地址
|
||||
export function delMemberAddress (id) {
|
||||
return request({
|
||||
url: `/buyer/memberAddress/delById/${id}`,
|
||||
url: `/buyer/member/address/delById/${id}`,
|
||||
needToken: true,
|
||||
method: Method.DELETE
|
||||
});
|
||||
@@ -43,7 +43,7 @@ export function delMemberAddress (id) {
|
||||
// 根据id获取会员地址详情
|
||||
export function getAddrDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/memberAddress/get/${id}`,
|
||||
url: `/buyer/member/address/get/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
@@ -52,7 +52,7 @@ export function getAddrDetail (id) {
|
||||
// 传给后台citycode 获取城市街道等id
|
||||
export function handleRegion (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/region/region`,
|
||||
url: `${commonUrl}/common/common/region/region`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {Method, commonUrl} from '@/plugins/request.js';
|
||||
*/
|
||||
export function getVerifyImg (verificationEnums) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -15,7 +15,7 @@ export function getVerifyImg (verificationEnums) {
|
||||
*/
|
||||
export function postVerifyImg (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${params.verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -26,26 +26,17 @@ export function postVerifyImg (params) {
|
||||
*/
|
||||
export function sendSms (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/sms/${params.verificationEnums}/${params.mobile}`,
|
||||
url: `${commonUrl}/common/common/sms/${params.verificationEnums}/${params.mobile}`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取logo图标
|
||||
*/
|
||||
export function getLogo () {
|
||||
return request({
|
||||
url: `${commonUrl}/common/logo`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
}
|
||||
|
||||
// 地区数据,用于三级联动
|
||||
export function getRegion (id) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/region/item/${id}`,
|
||||
url: `${commonUrl}/common/common/region/item/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
@@ -57,7 +48,7 @@ export function getRegion (id) {
|
||||
*/
|
||||
export function articleList (params) {
|
||||
return request({
|
||||
url: `/buyer/article`,
|
||||
url: `/buyer/other/article`,
|
||||
method: Method.GET,
|
||||
params
|
||||
});
|
||||
@@ -69,7 +60,7 @@ export function articleList (params) {
|
||||
*/
|
||||
export function articleCateList () {
|
||||
return request({
|
||||
url: `/buyer/article/articleCategory/list`,
|
||||
url: `/buyer/other/article/articleCategory/list`,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
@@ -77,7 +68,28 @@ export function articleCateList () {
|
||||
// 通过id获取文章
|
||||
export function articleDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/article/get/${id}`,
|
||||
url: `/buyer/other/article/get/${id}`,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取IM接口前缀
|
||||
export function getIMDetail () {
|
||||
return request({
|
||||
url: `${commonUrl}/common/common/IM`,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//获取图片logo
|
||||
export function getBaseSite(){
|
||||
return request ({
|
||||
url:`${commonUrl}/common/common/site`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 商品列表
|
||||
export function goodsList (params) {
|
||||
return request({
|
||||
url: '/buyer/goods/es',
|
||||
url: '/buyer/goods/goods/es',
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -15,7 +15,7 @@ export function goodsList (params) {
|
||||
// 商品分类 筛选条件 品牌, 尺寸等
|
||||
export function filterList (params) {
|
||||
return request({
|
||||
url: '/buyer/goods/es/related',
|
||||
url: '/buyer/goods/goods/es/related',
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -25,7 +25,7 @@ export function filterList (params) {
|
||||
// id获取商品详情
|
||||
export function goodsDetail (goodsId) {
|
||||
return request({
|
||||
url: `/buyer/goods/get/${goodsId}`,
|
||||
url: `/buyer/goods/goods/get/${goodsId}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export function goodsDetail (goodsId) {
|
||||
// id获取商品Sku详情
|
||||
export function goodsSkuDetail (params) {
|
||||
return request({
|
||||
url: `/buyer/goods/sku/${params.goodsId}/${params.skuId}`,
|
||||
url: `/buyer/goods/goods/sku/${params.goodsId}/${params.skuId}`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -44,7 +44,7 @@ export function goodsSkuDetail (params) {
|
||||
// 获取所有商品分类
|
||||
export function getCategory (parentId) {
|
||||
return request({
|
||||
url: `/buyer/category/get/${parentId}`,
|
||||
url: `/buyer/goods/category/get/${parentId}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -65,7 +65,7 @@ export function pintuanMembers (pintuanId) {
|
||||
*/
|
||||
export function hotWords (params) {
|
||||
return request({
|
||||
url: `/buyer/goods/hot-words`,
|
||||
url: `/buyer/goods/goods/hot-words`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
import request, {Method} from '@/plugins/request.js'
|
||||
import request, { Method } from "@/plugins/request.js";
|
||||
|
||||
// 获取首页楼层装修数据
|
||||
export function indexData (params) {
|
||||
export function indexData(params) {
|
||||
return request({
|
||||
url: '/buyer/pageData/getIndex',
|
||||
url: "/buyer/other/pageData/getIndex",
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
})
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店铺楼层数据
|
||||
*/
|
||||
export function getFloorStoreData(params) {
|
||||
return request({
|
||||
url: `/buyer/other/pageData?pageClientType=PC`,
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -15,21 +26,33 @@ export function indexData (params) {
|
||||
* @param pageClientType 客户端类型,可用值:PC,H5,WECHAT_MP,APP
|
||||
* @param pageType 页面类型,可用值:INDEX,STORE,SPECIAL
|
||||
*/
|
||||
export function pageData (params) {
|
||||
export function pageData(params) {
|
||||
return request({
|
||||
url: `/buyer/pageData`,
|
||||
url: `/buyer/other/pageData`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
})
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新token
|
||||
*/
|
||||
export function handleRefreshToken (token) {
|
||||
export function handleRefreshToken(token) {
|
||||
return request({
|
||||
url: `/buyer/members/refresh/${token}`,
|
||||
url: `/buyer/passport/member/refresh/${token}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
})
|
||||
needToken: false,
|
||||
});
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 获取店铺楼层数据
|
||||
// */
|
||||
// export function getFloorStoreData(params) {
|
||||
// return request({
|
||||
// url: `/buyer/other/pageData?pageClientType=PC`,
|
||||
// method: "get",
|
||||
// params,
|
||||
// });
|
||||
// }
|
||||
|
||||
@@ -6,7 +6,7 @@ import request, {Method, buyerUrl} from '@/plugins/request.js';
|
||||
*/
|
||||
export function regist (params) {
|
||||
return request({
|
||||
url: '/buyer/members/register',
|
||||
url: '/buyer/passport/member/register',
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
data: params
|
||||
@@ -18,7 +18,7 @@ export function regist (params) {
|
||||
*/
|
||||
export function login (params) {
|
||||
return request({
|
||||
url: '/buyer/members/userLogin',
|
||||
url: '/buyer/passport/member/userLogin',
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
data: params,
|
||||
@@ -31,7 +31,7 @@ export function login (params) {
|
||||
*/
|
||||
export function smsLogin (params) {
|
||||
return request({
|
||||
url: '/buyer/members/smsLogin',
|
||||
url: '/buyer/passport/member/smsLogin',
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
data: params,
|
||||
@@ -44,7 +44,7 @@ export function smsLogin (params) {
|
||||
*/
|
||||
export function getMemberMsg (params) {
|
||||
return request({
|
||||
url: '/buyer/members',
|
||||
url: '/buyer/passport/member',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -55,7 +55,7 @@ export function getMemberMsg (params) {
|
||||
* 第三方登录 支付宝,微博,qq,微信
|
||||
*/
|
||||
export function webLogin (type) {
|
||||
window.open(`${buyerUrl}/buyer/connect/login/web/${type}`, 'blank');
|
||||
window.open(`${buyerUrl}/buyer/passport/connect/connect/login/web/${type}`, 'blank');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ export function webLogin (type) {
|
||||
*/
|
||||
export function loginCallback (uuid) {
|
||||
return request({
|
||||
url: `/buyer/connect/result?state=${uuid}`,
|
||||
url: `/buyer/passport/connect/connect/result?state=${uuid}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -74,7 +74,7 @@ export function loginCallback (uuid) {
|
||||
*/
|
||||
export function validateCode (params) {
|
||||
return request({
|
||||
url: `/buyer/members/resetByMobile`,
|
||||
url: `/buyer/passport/member/resetByMobile`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -86,7 +86,24 @@ export function validateCode (params) {
|
||||
*/
|
||||
export function resetPassword (params) {
|
||||
return request({
|
||||
url: `/buyer/members/resetPassword`,
|
||||
url: `/buyer/passport/member/resetPassword`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
export function getSCLoginCode(params) {
|
||||
return request({
|
||||
url: `/buyer/passport/member/pc_session`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
});
|
||||
}
|
||||
export function sCLogin(token,params) {
|
||||
return request({
|
||||
url: `/buyer/passport/member/session_login/`+token,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
|
||||
@@ -3,7 +3,7 @@ import request, {Method} from '@/plugins/request.js';
|
||||
// 查询账户余额
|
||||
export function getMembersWallet () {
|
||||
return request({
|
||||
url: '/buyer/members/wallet',
|
||||
url: '/buyer/wallet/wallet',
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -22,7 +22,7 @@ export function getDepositLog (params) {
|
||||
// 查询充值记录
|
||||
export function getRecharge (params) {
|
||||
return request({
|
||||
url: '/buyer/member/recharge',
|
||||
url: '/buyer/wallet/recharge',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -52,7 +52,7 @@ export function recharge (params) {
|
||||
// 提现
|
||||
export function withdrawalApply (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/withdrawal',
|
||||
url: '/buyer/wallet/wallet/withdrawal',
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -99,7 +99,7 @@ export function collectList (params) {
|
||||
// 单个商品评价
|
||||
export function goodsComment (params) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation/${params.goodsId}/goodsEvaluation`,
|
||||
url: `/buyer/member/evaluation/${params.goodsId}/goodsEvaluation`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -109,7 +109,7 @@ export function goodsComment (params) {
|
||||
// 商品各评价类别数量
|
||||
export function goodsCommentNum (goodsId) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation/${goodsId}/evaluationNumber`,
|
||||
url: `/buyer/member/evaluation/${goodsId}/evaluationNumber`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -118,7 +118,7 @@ export function goodsCommentNum (goodsId) {
|
||||
// 添加会员评价
|
||||
export function addEvaluation (params) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation`,
|
||||
url: `/buyer/member/evaluation`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -128,7 +128,7 @@ export function addEvaluation (params) {
|
||||
// 会员评价详情
|
||||
export function evaluationDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation/get/${id}`,
|
||||
url: `/buyer/member/evaluation/get/${id}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -195,7 +195,7 @@ export function receiveCoupon (couponId) {
|
||||
// 获取申请售后列表
|
||||
export function afterSaleList (params) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/page`,
|
||||
url: `/buyer/order/afterSale/page`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -205,7 +205,7 @@ export function afterSaleList (params) {
|
||||
// 获取申请售后页面信息
|
||||
export function afterSaleInfo (sn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/applyAfterSaleInfo/${sn}`,
|
||||
url: `/buyer/order/afterSale/applyAfterSaleInfo/${sn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -214,7 +214,7 @@ export function afterSaleInfo (sn) {
|
||||
// 获取申请售后、投诉原因
|
||||
export function afterSaleReason (serviceType) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/get/afterSaleReason/${serviceType}`,
|
||||
url: `/buyer/order/afterSale/get/afterSaleReason/${serviceType}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -222,7 +222,7 @@ export function afterSaleReason (serviceType) {
|
||||
// 获取申请售后详情
|
||||
export function afterSaleDetail (sn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/get/${sn}`,
|
||||
url: `/buyer/order/afterSale/get/${sn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -230,7 +230,7 @@ export function afterSaleDetail (sn) {
|
||||
// 售后日志
|
||||
export function afterSaleLog (sn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/get/getAfterSaleLog/${sn}`,
|
||||
url: `/buyer/order/afterSale/get/getAfterSaleLog/${sn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -239,7 +239,7 @@ export function afterSaleLog (sn) {
|
||||
// 申请售后
|
||||
export function applyAfterSale (params) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/save/${params.orderItemSn}`,
|
||||
url: `/buyer/order/afterSale/save/${params.orderItemSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -249,7 +249,7 @@ export function applyAfterSale (params) {
|
||||
// 取消售后申请
|
||||
export function cancelAfterSale (afterSaleSn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/cancel/${afterSaleSn}`,
|
||||
url: `/buyer/order/afterSale/cancel/${afterSaleSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
});
|
||||
@@ -258,7 +258,7 @@ export function cancelAfterSale (afterSaleSn) {
|
||||
// 投诉商品
|
||||
export function handleComplain (data) {
|
||||
return request({
|
||||
url: `/buyer/complain`,
|
||||
url: `/buyer/order/complain`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
data
|
||||
@@ -267,7 +267,7 @@ export function handleComplain (data) {
|
||||
// 分页获取我的投诉列表
|
||||
export function complainList (params) {
|
||||
return request({
|
||||
url: `/buyer/complain`,
|
||||
url: `/buyer/order/complain`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -279,7 +279,7 @@ export function complainList (params) {
|
||||
*/
|
||||
export function getComplainDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/complain/${id}`,
|
||||
url: `/buyer/order/complain/${id}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -290,7 +290,7 @@ export function getComplainDetail (id) {
|
||||
*/
|
||||
export function clearComplain (id) {
|
||||
return request({
|
||||
url: `/buyer/complain/status/${id}`,
|
||||
url: `/buyer/order/complain/status/${id}`,
|
||||
method: Method.PUT,
|
||||
needToken: true
|
||||
});
|
||||
@@ -301,7 +301,7 @@ export function clearComplain (id) {
|
||||
*/
|
||||
export function distribution () {
|
||||
return request({
|
||||
url: `/buyer/distribution`,
|
||||
url: `/buyer/distribution/distribution`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -314,7 +314,7 @@ export function distribution () {
|
||||
*/
|
||||
export function applyDistribution (params) {
|
||||
return request({
|
||||
url: `/buyer/distribution`,
|
||||
url: `/buyer/distribution/distribution`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -326,7 +326,7 @@ export function applyDistribution (params) {
|
||||
*/
|
||||
export function getDistOrderList (params) {
|
||||
return request({
|
||||
url: `/buyer/distribution/distributionOrder`,
|
||||
url: `/buyer/distribution/order`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -338,7 +338,7 @@ export function getDistOrderList (params) {
|
||||
*/
|
||||
export function getDistGoodsList (params) {
|
||||
return request({
|
||||
url: `/buyer/distributionGoods`,
|
||||
url: `/buyer/distribution/goods`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -352,7 +352,7 @@ export function getDistGoodsList (params) {
|
||||
*/
|
||||
export function selectDistGoods (params) {
|
||||
return request({
|
||||
url: `/buyer/distributionGoods/checked/${params.distributionGoodsId}`,
|
||||
url: `/buyer/distribution/goods/checked/${params.distributionGoodsId}`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -390,7 +390,7 @@ export function distCash (params) {
|
||||
*/
|
||||
export function tracksList (params) {
|
||||
return request({
|
||||
url: `/buyer/footprint`,
|
||||
url: `/buyer/member/footprint`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -402,7 +402,7 @@ export function tracksList (params) {
|
||||
*/
|
||||
export function clearTracks () {
|
||||
return request({
|
||||
url: `/buyer/footprint`,
|
||||
url: `/buyer/member/footprint`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -414,7 +414,7 @@ export function clearTracks () {
|
||||
*/
|
||||
export function clearTracksById (ids) {
|
||||
return request({
|
||||
url: `/buyer/footprint/delByIds/${ids}`,
|
||||
url: `/buyer/member/footprint/delByIds/${ids}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -449,7 +449,7 @@ export function memberPointHistory (params) {
|
||||
*/
|
||||
export function memberMsgList (params) {
|
||||
return request({
|
||||
url: `/buyer/member/message`,
|
||||
url: `/buyer/message/member`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -462,7 +462,7 @@ export function memberMsgList (params) {
|
||||
|
||||
export function readMemberMsg (id) {
|
||||
return request({
|
||||
url: `/buyer/member/message/${id}`,
|
||||
url: `/buyer/message/member/${id}`,
|
||||
method: Method.PUT,
|
||||
needToken: true
|
||||
});
|
||||
@@ -473,7 +473,7 @@ export function readMemberMsg (id) {
|
||||
*/
|
||||
export function delMemberMsg (id) {
|
||||
return request({
|
||||
url: `/buyer/member/message/${id}`,
|
||||
url: `/buyer/message/member/${id}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -485,7 +485,7 @@ export function delMemberMsg (id) {
|
||||
*/
|
||||
export function getGoodsDistribution (distributionId) {
|
||||
return request({
|
||||
url: `/buyer/distribution/bindingDistribution/${distributionId}`,
|
||||
url: `/buyer/distribution/distribution/bindingDistribution/${distributionId}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 查询会员订单列表
|
||||
export function getOrderList (params) {
|
||||
return request({
|
||||
url: `/buyer/orders`,
|
||||
url: `/buyer/order/order`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -18,7 +18,7 @@ export function getOrderList (params) {
|
||||
*/
|
||||
export function orderDetail (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/${orderSn}`,
|
||||
url: `/buyer/order/order/${orderSn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -31,7 +31,7 @@ export function orderDetail (orderSn) {
|
||||
*/
|
||||
export function cancelOrder (params) {
|
||||
return request({
|
||||
url: `/buyer/orders/${params.orderSn}/cancel`,
|
||||
url: `/buyer/order/order/${params.orderSn}/cancel`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -44,7 +44,7 @@ export function cancelOrder (params) {
|
||||
*/
|
||||
export function delOrder (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/${orderSn}`,
|
||||
url: `/buyer/order/order/${orderSn}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -56,7 +56,7 @@ export function delOrder (orderSn) {
|
||||
*/
|
||||
export function sureReceived (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/${orderSn}/receiving`,
|
||||
url: `/buyer/order/order/${orderSn}/receiving`,
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
});
|
||||
@@ -68,7 +68,7 @@ export function sureReceived (orderSn) {
|
||||
*/
|
||||
export function getTraces (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/getTraces/${orderSn}`,
|
||||
url: `/buyer/order/order/getTraces/${orderSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
});
|
||||
@@ -80,7 +80,7 @@ export function getTraces (orderSn) {
|
||||
*/
|
||||
export function evolutionList (params) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation`,
|
||||
url: `/buyer/member/evaluation`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -90,7 +90,7 @@ export function evolutionList (params) {
|
||||
// 添加交易投诉对话
|
||||
export function communication (params) {
|
||||
return request({
|
||||
url: `/buyer/complain/communication`,
|
||||
url: `/buyer/order/complain/communication`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -100,7 +100,7 @@ export function communication (params) {
|
||||
// 退换货服务 提交物流
|
||||
export function afterSaleDelivery (params) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/delivery/${params.afterSaleSn}`,
|
||||
url: `/buyer/order/afterSale/delivery/${params.afterSaleSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -109,7 +109,7 @@ export function afterSaleDelivery (params) {
|
||||
// 获取退货可选物流公司
|
||||
export function getLogisticsCompany () {
|
||||
return request({
|
||||
url: `/buyer/logistics`,
|
||||
url: `/buyer/other/logistics`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params: { pageNumber: 1, pageSize: 200, disabled: 'OPEN' }
|
||||
|
||||
@@ -10,7 +10,7 @@ import request, {
|
||||
*/
|
||||
export function tradeDetail (params) {
|
||||
return request({
|
||||
url: '/buyer/cashier/tradeDetail',
|
||||
url: '/buyer/payment/cashier/tradeDetail',
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
@@ -26,7 +26,7 @@ export function tradeDetail (params) {
|
||||
*/
|
||||
export function pay (params) {
|
||||
return request({
|
||||
url: `/buyer/cashier/pay/${params.paymentMethod}/${params.paymentClient}`,
|
||||
url: `/buyer/payment/cashier/pay/${params.paymentMethod}/${params.paymentClient}`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
@@ -40,7 +40,7 @@ export function pay (params) {
|
||||
*/
|
||||
export function payCallback (params) {
|
||||
return request({
|
||||
url: `/buyer/cashier/result`,
|
||||
url: `/buyer/payment/cashier/result`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 店铺分页列表
|
||||
export function shopList (params) {
|
||||
return request({
|
||||
url: '/buyer/store',
|
||||
url: '/buyer/store/store',
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
@@ -15,7 +15,7 @@ export function shopList (params) {
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applyFirst (params) {
|
||||
return request({
|
||||
url: '/buyer/store/apply/first',
|
||||
url: '/buyer/store/store/apply/first',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -25,7 +25,7 @@ export function applyFirst (params) {
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applySecond (params) {
|
||||
return request({
|
||||
url: '/buyer/store/apply/second',
|
||||
url: '/buyer/store/store/apply/second',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -35,7 +35,7 @@ export function applySecond (params) {
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applyThird (params) {
|
||||
return request({
|
||||
url: '/buyer/store/apply/third',
|
||||
url: '/buyer/store/store/apply/third',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -45,7 +45,7 @@ export function applyThird (params) {
|
||||
// 店铺详情
|
||||
export function getDetailById (id) {
|
||||
return request({
|
||||
url: `/buyer/store/get/detail/${id}`,
|
||||
url: `/buyer/store/store/get/detail/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
@@ -53,7 +53,7 @@ export function getDetailById (id) {
|
||||
// 店铺分类
|
||||
export function getCateById (id) {
|
||||
return request({
|
||||
url: `/buyer/store/label/get/${id}`,
|
||||
url: `/buyer/store/store/label/get/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
@@ -61,7 +61,7 @@ export function getCateById (id) {
|
||||
// 店铺入驻协议
|
||||
export function agreement () {
|
||||
return request({
|
||||
url: `/buyer/article/type/STORE_REGISTER`,
|
||||
url: `/buyer/other/article/type/STORE_REGISTER`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
@@ -70,7 +70,7 @@ export function agreement () {
|
||||
// 获取当前登录会员的店铺信息
|
||||
export function applyStatus () {
|
||||
return request({
|
||||
url: `/buyer/store/apply`,
|
||||
url: `/buyer/store/store/apply`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
|
||||
BIN
buyer/src/assets/images/jinghui.png
Normal file
BIN
buyer/src/assets/images/jinghui.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
BIN
buyer/src/assets/images/zhizhao.jpg
Normal file
BIN
buyer/src/assets/images/zhizhao.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 374 KiB |
@@ -10,7 +10,7 @@ $warning_color: #ff9900;
|
||||
$error_color: #ed3f14;
|
||||
$handle-btn-color: #438cde;
|
||||
|
||||
$theme_color: #ed3f14;
|
||||
$theme_color: #e4393c;
|
||||
|
||||
$border_color: #dddee1;
|
||||
$title_color: #8c8c8c;
|
||||
@@ -336,4 +336,4 @@ li {
|
||||
margin:10px auto ;
|
||||
text-align: right;
|
||||
width: 1200px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,18 @@
|
||||
margin-top: 6px;
|
||||
}
|
||||
.goods-show-detail {
|
||||
height: 36px;
|
||||
font-size: 12px;
|
||||
margin: 6px 0px;
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
display:-webkit-box;
|
||||
-webkit-line-clamp:2;
|
||||
-webkit-box-orient:vertical;
|
||||
color:#808080;
|
||||
}
|
||||
.goods-show-detail :hover{
|
||||
color:#E23A3A;
|
||||
}
|
||||
.goods-show-num {
|
||||
font-size: 12px;
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
@import '~view-design/src/styles/index.less';
|
||||
@import "~view-design/src/styles/index.less";
|
||||
// iview 自定义样式
|
||||
|
||||
@primary-color: #ed3f14;
|
||||
@primary-color: #ff5c58;
|
||||
@info-color: #fa6419;
|
||||
@success-color: #68cabe;
|
||||
@error-color: #ff3c2a;
|
||||
@table-thead-bg: #f8f8f9;
|
||||
@table-td-stripe-bg: #f8f8f9;
|
||||
@table-td-hover-bg: #ededed;
|
||||
@table-td-highlight-bg: #ededed;
|
||||
@font-size-base: 12px;
|
||||
|
||||
.ivu-drawer,
|
||||
.drawer,
|
||||
.ivu-drawer-wrap {
|
||||
z-index: 2600 !important;
|
||||
}
|
||||
|
||||
@table-thead-bg : #f8f8f9;
|
||||
@table-td-stripe-bg : #f8f8f9;
|
||||
@table-td-hover-bg : #ededed;
|
||||
@table-td-highlight-bg : #ededed;
|
||||
@@ -143,20 +143,24 @@ export default {
|
||||
position: absolute;
|
||||
left: -360px;
|
||||
top: -9px;
|
||||
width: 150px;
|
||||
max-width: 150px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.store-search{
|
||||
width:55.6px;
|
||||
padding: 0 9px;
|
||||
border-radius: 0;
|
||||
border-radius: 3px;
|
||||
&:nth-child(2){
|
||||
margin-left: -5px;
|
||||
width:55px;
|
||||
margin-left: -2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
.btn-div{
|
||||
position: relative;
|
||||
height: 0px;
|
||||
top: -38px;
|
||||
left: 339px;
|
||||
left: 352px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -190,7 +190,7 @@ export default {
|
||||
this.$router.push('/home/Coupons')
|
||||
},
|
||||
onCancel: () => {
|
||||
if (item.storeId !== 'platform') {
|
||||
if (item.storeId !== '0') {
|
||||
this.$router.push({path: '/merchant', query: {id: item.storeId}})
|
||||
} else {
|
||||
if (item.scopeType === 'PORTION_GOODS_CATEGORY') {
|
||||
@@ -290,7 +290,7 @@ export default {
|
||||
}
|
||||
this.loading = true
|
||||
tracksList(params).then(res => {
|
||||
this.tracksList = res.result
|
||||
this.tracksList = res.result.records
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
}
|
||||
|
||||
@@ -29,18 +29,38 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="friend-link">
|
||||
<div class="friend-link flex">
|
||||
<div class="friend-link-item">
|
||||
<ul>
|
||||
<li v-for="(link, index) in moreLink" :key="index" @click="goArticle">
|
||||
<span class="link-item" :class="{'link-last-item': index === 4}">{{link}}</span>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="icp">
|
||||
<li v-if="config.icpCard">
|
||||
<a :href='"https://tsm.miit.gov.cn/dxxzsp/xkz/xkzgl/resource/qiyesearch.jsp?num="+config.icpCard+"&type=xuke"' target="_blank">
|
||||
{{config.icpCard}}
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="config.icpMessage" class="footer-bottmom">
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank">
|
||||
{{config.icpMessage}}
|
||||
</a>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information footer-bottmom">
|
||||
|
||||
<a class="flex " :href="config.company.href">
|
||||
<img class="zhizhao" src="@/assets/images/zhizhao.jpg" mode="" />{{config.company.name}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="copyright">
|
||||
<p>Copyright © {{year}} LILI</p>
|
||||
<p>Copyright © {{year}} {{config.title}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -48,28 +68,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'Footer',
|
||||
data () {
|
||||
name: "Footer",
|
||||
data() {
|
||||
return {
|
||||
guideArr: [ // 导航链接
|
||||
[ '购物指南', '购物流程', '会员介绍', '生活旅行', '常见问题' ],
|
||||
[ '配送方式', '上门自提', '配送服务查询', '收取标准', '物流规则' ],
|
||||
[ '支付方式', '在线支付', '公司转账', '余额支付', '积分支付' ],
|
||||
[ '售后服务', '售后政策', '退款说明', '返修/退货', '取消订单' ]
|
||||
config:require('@/config'),
|
||||
guideArr: [
|
||||
// 导航链接
|
||||
["购物指南", "购物流程", "会员介绍", "生活旅行", "常见问题"],
|
||||
["配送方式", "上门自提", "配送服务查询", "收取标准", "物流规则"],
|
||||
["支付方式", "在线支付", "公司转账", "余额支付", "积分支付"],
|
||||
["售后服务", "售后政策", "退款说明", "返修/退货", "取消订单"],
|
||||
],
|
||||
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'], // 更多链接
|
||||
year: new Date().getFullYear() // 当前年份
|
||||
moreLink: ["关于我们", "联系我们", "联系客服", "商家帮助", "隐私政策"], // 更多链接
|
||||
year: new Date().getFullYear(), // 当前年份
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goArticle () { // 跳转文章页
|
||||
goArticle() {
|
||||
// 跳转文章页
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/article'
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
}
|
||||
}
|
||||
path: "/article",
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -77,11 +101,9 @@ export default {
|
||||
/*****************************底 部 开 始*****************************/
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 380px;
|
||||
padding-top: 30px;
|
||||
|
||||
@include background_color($light_background_color);
|
||||
|
||||
}
|
||||
.icon-row {
|
||||
margin: 15px auto;
|
||||
@@ -112,7 +134,20 @@ export default {
|
||||
.footer-icon-child-4 {
|
||||
background-position: 0 -129px;
|
||||
}
|
||||
.footer-icon-text{
|
||||
.icp {
|
||||
>*{
|
||||
margin: 0 4px;
|
||||
}
|
||||
flex-direction: column;
|
||||
}
|
||||
.flex{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
>img{
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
.footer-icon-text {
|
||||
margin-left: 45px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
@@ -138,22 +173,39 @@ export default {
|
||||
cursor: pointer;
|
||||
line-height: 26px;
|
||||
}
|
||||
.servece-type-info li:hover{
|
||||
color:#b8b8be;
|
||||
}
|
||||
.servece-type-info li:first-child {
|
||||
font-size: 16px;
|
||||
line-height: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.servece-type-info li:first-child:hover{
|
||||
// font-size:15px;
|
||||
// font-weight: bold;
|
||||
color:#b8b8be;
|
||||
}
|
||||
.friend-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
width: 908px;
|
||||
height: 30px;
|
||||
padding: 10px 0;
|
||||
margin: 0px auto;
|
||||
border-top: 1px solid $border_color;
|
||||
}
|
||||
.friend-link-item {
|
||||
margin: 0px auto;
|
||||
.information {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
> * {
|
||||
margin: 2px 0;
|
||||
}
|
||||
}
|
||||
.zhizhao {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.friend-link-item ul {
|
||||
list-style: none;
|
||||
@@ -162,6 +214,17 @@ export default {
|
||||
padding: 5px 0px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.friend-link-item li:hover{
|
||||
color:#b8b8be;
|
||||
margin-top:-2px;
|
||||
}
|
||||
.footer-bottmom:hover{
|
||||
margin-top:0 !important;
|
||||
}
|
||||
.footer-bottmom>a:hover{
|
||||
color:#e4393c;
|
||||
}
|
||||
.link-item {
|
||||
padding: 0px 8px;
|
||||
cursor: pointer;
|
||||
@@ -175,15 +238,17 @@ export default {
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
.copyright a{
|
||||
.copyright a {
|
||||
color: #232323;
|
||||
font-size: 20px;
|
||||
}
|
||||
.footer-icon-text{
|
||||
@include title_color($light_title_color)
|
||||
.footer-icon-text {
|
||||
@include title_color($light_title_color);
|
||||
}
|
||||
.copyright,.friend-link,.servece-type-info {
|
||||
@include sub_color($light_sub_color)
|
||||
.copyright,
|
||||
.friend-link,
|
||||
.servece-type-info {
|
||||
@include sub_color($light_sub_color);
|
||||
}
|
||||
/*****************************底 部 结 束*****************************/
|
||||
</style>
|
||||
|
||||
@@ -7,6 +7,18 @@
|
||||
<div class="item-detail-big-img">
|
||||
<pic-zoom :url="imgList[imgIndex].url" :scale="2"></pic-zoom>
|
||||
</div>
|
||||
<div
|
||||
v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'"
|
||||
style="margin-top:10px;rgb(153, 149, 149);"
|
||||
>
|
||||
实物商品
|
||||
</div>
|
||||
<div
|
||||
v-else-if="skuDetail.goodsType == 'VIRTUAL_GOODS'"
|
||||
style="margin-top:10px;rgb(153, 149, 149);"
|
||||
>
|
||||
虚拟商品
|
||||
</div>
|
||||
<div class="item-detail-img-row">
|
||||
<div
|
||||
class="item-detail-img-small"
|
||||
@@ -19,7 +31,12 @@
|
||||
</div>
|
||||
|
||||
<div class="goodsConfig mt_10">
|
||||
<span @click="collect" ><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{isCollected?'已收藏':'收藏'}}</span>
|
||||
<span @click="collect"
|
||||
><Icon
|
||||
type="ios-heart"
|
||||
:color="isCollected ? '#ed3f14' : '#666'"
|
||||
/>{{ isCollected ? "已收藏" : "收藏" }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右侧商品信息、活动信息、操作展示 -->
|
||||
@@ -30,50 +47,140 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="sell-point">
|
||||
{{skuDetail.sellingPoint}}
|
||||
{{ skuDetail.sellingPoint }}
|
||||
</div>
|
||||
<!-- 限时秒杀 -->
|
||||
<Promotion v-if="promotionMap['SECKILL']" :time="promotionMap['SECKILL'].endTime"></Promotion>
|
||||
<Promotion
|
||||
v-if="promotionMap['SECKILL']"
|
||||
:time="promotionMap['SECKILL'].endTime"
|
||||
></Promotion>
|
||||
<!-- 商品详细 价格、优惠券、促销 -->
|
||||
<div class="item-detail-price-row">
|
||||
<div class="item-price-left">
|
||||
<!-- 商品原价 -->
|
||||
<div class="item-price-row" v-if="!skuDetail.promotionPrice">
|
||||
<!-- 秒杀价格 -->
|
||||
<div
|
||||
class="item-price-row"
|
||||
v-if="skuDetail.promotionPrice && promotionMap['SECKILL']"
|
||||
>
|
||||
<p>
|
||||
<span class="item-price-title">价 格</span>
|
||||
<span class="item-price">{{skuDetail.price | unitPrice("¥")}}</span>
|
||||
<span class="item-price-title" v-if="promotionMap['SECKILL']"
|
||||
>秒 杀 价</span
|
||||
>
|
||||
<span class="item-price">{{
|
||||
skuDetail.promotionPrice | unitPrice("¥")
|
||||
}}</span>
|
||||
<span class="item-price-old">{{
|
||||
skuDetail.price | unitPrice("¥")
|
||||
}}</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- 秒杀价格 -->
|
||||
<div class="item-price-row" v-if="skuDetail.promotionPrice">
|
||||
<p>
|
||||
<span class="item-price-title" v-if="promotionMap['SECKILL']">秒 杀 价</span>
|
||||
<span class="item-price">{{skuDetail.promotionPrice | unitPrice("¥")}}</span>
|
||||
<span class="item-price-old">{{skuDetail.price | unitPrice("¥")}}</span>
|
||||
</p>
|
||||
<!-- 商品原价 -->
|
||||
<div class="item-price-row" v-else>
|
||||
<!-- 批发价格 -->
|
||||
<div v-if="wholesaleNum && wholesaleNum.length">
|
||||
<div class="flex">
|
||||
<div class="item-price-title">
|
||||
价 格
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-for="(item, index) in wholesalePrice"
|
||||
:key="index"
|
||||
class="item-price item-num"
|
||||
>
|
||||
{{ item | unitPrice("¥") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="item-price-title">起 批 量</div>
|
||||
<div
|
||||
v-for="(item, index) in wholesaleNum"
|
||||
:key="index"
|
||||
class="item-num item-price-num"
|
||||
>
|
||||
{{ item }}{{ skuDetail.goodsUnit }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 普通价格 -->
|
||||
<div v-else>
|
||||
<span class="item-price-title"
|
||||
>价 格</span
|
||||
>
|
||||
<span class="item-price">{{
|
||||
skuDetail.price | unitPrice("¥")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 优惠券展示 -->
|
||||
<div class="item-price-row" v-if="promotionMap['COUPON'].length">
|
||||
<p>
|
||||
<div class="item-price-coupon-row" v-if="promotionMap['COUPON'].length">
|
||||
<p class="Ellipsis">
|
||||
<span class="item-price-title">优 惠 券</span>
|
||||
<span
|
||||
class="item-coupon"
|
||||
v-for="(item, index) in promotionMap['COUPON']"
|
||||
:key="index"
|
||||
@click="receiveCoupon(item.id)"
|
||||
<span>
|
||||
<span
|
||||
class="item-coupon"
|
||||
v-for="(item, index) in promotionMap['COUPON'].slice(0, 6)"
|
||||
:key="index"
|
||||
@click="receiveCoupon(item.id)"
|
||||
>
|
||||
<span v-if="item.couponType == 'PRICE'">满{{ item.consumeThreshold }}减{{item.price}}</span>
|
||||
<span v-if="item.couponType == 'DISCOUNT'">满{{ item.consumeThreshold }}打{{item.couponDiscount}}折</span>
|
||||
<span v-if="item.couponType == 'PRICE'"
|
||||
>满{{ item.consumeThreshold }}减{{ item.price }}</span
|
||||
>
|
||||
<span v-if="item.couponType == 'DISCOUNT'"
|
||||
>满{{ item.consumeThreshold }}打{{
|
||||
item.couponDiscount
|
||||
}}折</span
|
||||
>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<div class="dropdown" v-if="promotionMap['COUPON'].length > 6">
|
||||
<span>展开更多</span>
|
||||
<div class="dropdown-content">
|
||||
<span
|
||||
class="item-coupon"
|
||||
v-for="(item, index) in promotionMap['COUPON'].slice(6, promotionMap['COUPON'].length)"
|
||||
:key="index"
|
||||
@click="receiveCoupon(item.id)"
|
||||
>
|
||||
<span v-if="item.couponType == 'PRICE'"
|
||||
>满{{ item.consumeThreshold }}减{{ item.price }}</span
|
||||
>
|
||||
<span v-if="item.couponType == 'DISCOUNT'"
|
||||
>满{{ item.consumeThreshold }}打{{
|
||||
item.couponDiscount
|
||||
}}折</span
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
<!-- 满减展示 -->
|
||||
<div class="item-price-row" v-if="promotionMap['FULL_DISCOUNT']">
|
||||
<p>
|
||||
<span class="item-price-title">促 销</span>
|
||||
<span class="item-price-title"
|
||||
>促 销</span
|
||||
>
|
||||
<span class="item-promotion">满减</span>
|
||||
<span class="item-desc-pintuan" v-if="promotionMap['FULL_DISCOUNT'].fullMinus">满{{ promotionMap['FULL_DISCOUNT'].fullMoney }}元,立减现金{{ promotionMap['FULL_DISCOUNT'].fullMinus}}元</span>
|
||||
<span class="item-desc-pintuan" v-if="promotionMap['FULL_DISCOUNT'].fullRate">满{{ promotionMap['FULL_DISCOUNT'].fullMoney }}元,立享{{ promotionMap['FULL_DISCOUNT'].fullRate}}折</span>
|
||||
<span
|
||||
class="item-desc-pintuan"
|
||||
v-if="promotionMap['FULL_DISCOUNT'].fullMinus"
|
||||
>满{{ promotionMap["FULL_DISCOUNT"].fullMoney }}元,立减现金{{
|
||||
promotionMap["FULL_DISCOUNT"].fullMinus
|
||||
}}元</span
|
||||
>
|
||||
<span
|
||||
class="item-desc-pintuan"
|
||||
v-if="
|
||||
promotionMap['FULL_DISCOUNT'].fullRate &&
|
||||
promotionMap['FULL_DISCOUNT'].fullRateFlag
|
||||
"
|
||||
>满{{ promotionMap["FULL_DISCOUNT"].fullMoney }}元,立享{{
|
||||
promotionMap["FULL_DISCOUNT"].fullRate
|
||||
}}折</span
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -81,20 +188,35 @@
|
||||
<div class="item-remarks-sum">
|
||||
<p>累计评价</p>
|
||||
<p>
|
||||
<span class="item-remarks-num">{{ skuDetail.commentNum || 0 }} 条</span>
|
||||
<span class="item-remarks-num"
|
||||
>{{ skuDetail.commentNum || 0 }} 条</span
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 选择颜色 -->
|
||||
<div class="item-select" v-for="(sku, index) in formatList" :key="sku.name">
|
||||
<div
|
||||
class="item-select"
|
||||
v-for="(sku, index) in formatList"
|
||||
:key="sku.name"
|
||||
>
|
||||
<div class="item-select-title">
|
||||
<p>{{ sku.name }}</p>
|
||||
</div>
|
||||
<div class="item-select-column">
|
||||
<div class="item-select-row" v-for="(item) in sku.values" :key="item.value">
|
||||
<div class="item-select-box" @click="select(index, item.value)"
|
||||
:class="{ 'item-select-box-active': item.value === currentSelceted[index] }"
|
||||
<div
|
||||
class="item-select-row"
|
||||
v-for="item in sku.values"
|
||||
:key="item.value"
|
||||
>
|
||||
<div
|
||||
class="item-select-box"
|
||||
@click="select(index, item.value)"
|
||||
:class="{
|
||||
'item-select-box-active':
|
||||
item.value === currentSelceted[index],
|
||||
}"
|
||||
>
|
||||
<div class="item-select-intro">
|
||||
<p>{{ item.value }}</p>
|
||||
@@ -110,26 +232,61 @@
|
||||
<p>数量</p>
|
||||
</div>
|
||||
<div class="item-select-row">
|
||||
<InputNumber :min="1" :disabled="skuDetail.quantity === 0" v-model="count"></InputNumber>
|
||||
<span class="inventory"> 库存{{skuDetail.quantity}}</span>
|
||||
<InputNumber
|
||||
:min="1"
|
||||
:max="skuDetail.quantity"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
v-model="count"
|
||||
:precision="0.1"
|
||||
></InputNumber>
|
||||
<span class="inventory"> 库存{{ skuDetail.quantity }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-select" v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS' && skuDetail.weight !== 0">
|
||||
<div
|
||||
class="item-select"
|
||||
v-if="
|
||||
skuDetail.goodsType !== 'VIRTUAL_GOODS' && skuDetail.weight !== 0
|
||||
"
|
||||
>
|
||||
<div class="item-select-title">
|
||||
<p>重量</p>
|
||||
</div>
|
||||
<div class="item-select-row">
|
||||
<span class="inventory"> {{skuDetail.weight}}kg</span>
|
||||
<span class="inventory"> {{ skuDetail.weight }}kg</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-buy-car" v-if="$route.query.way === 'POINT' && skuDetail.isAuth === 'PASS'">
|
||||
<Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="pointPay">积分购买</Button>
|
||||
<div
|
||||
class="add-buy-car"
|
||||
v-if="$route.query.way === 'POINT' && skuDetail.authFlag === 'PASS'"
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="pointPay"
|
||||
>积分购买</Button
|
||||
>
|
||||
</div>
|
||||
<div class="add-buy-car" v-if="$route.query.way !== 'POINT' && skuDetail.isAuth === 'PASS'">
|
||||
<Button type="error" v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'" :loading="loading" :disabled="skuDetail.quantity === 0" @click="addShoppingCartBtn">加入购物车</Button>
|
||||
<Button type="warning" :loading="loading1" :disabled="skuDetail.quantity === 0" @click="buyNow">立即购买</Button>
|
||||
<div
|
||||
class="add-buy-car"
|
||||
v-if="$route.query.way !== 'POINT' && skuDetail.authFlag === 'PASS'"
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="addShoppingCartBtn"
|
||||
>加入购物车</Button
|
||||
>
|
||||
<Button
|
||||
type="warning"
|
||||
:loading="loading1"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="buyNow"
|
||||
>立即购买</Button
|
||||
>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,45 +294,82 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Promotion from './Promotion.vue';
|
||||
import PicZoom from 'vue-piczoom'; // 图片放大
|
||||
import { collectGoods, isCollection, receiveCoupon, cancelCollect } from '@/api/member.js';
|
||||
import { addCartGoods } from '@/api/cart.js';
|
||||
import Promotion from "./Promotion.vue";
|
||||
import PicZoom from "vue-piczoom"; // 图片放大
|
||||
import {
|
||||
collectGoods,
|
||||
isCollection,
|
||||
receiveCoupon,
|
||||
cancelCollect,
|
||||
} from "@/api/member.js";
|
||||
import { addCartGoods } from "@/api/cart.js";
|
||||
export default {
|
||||
name: 'ShowGoods',
|
||||
name: "ShowGoods",
|
||||
props: {
|
||||
// 商品数据
|
||||
detail: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
watch: {
|
||||
detail: {
|
||||
handler(val) {
|
||||
this.skuDetail = val.data;
|
||||
this.wholesaleList = val.wholesaleList;
|
||||
this.swiperGoodsImg();
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
wholesaleList: [],
|
||||
count: 1, // 商品数量
|
||||
imgIndex: 0, // 展示图片下标
|
||||
currentSelceted: [], // 当前商品sku
|
||||
imgList: [{}], // 商品图片列表
|
||||
skuDetail: this.detail.data, // sku详情
|
||||
imgList: [{ url: "" }], // 商品图片列表
|
||||
skuDetail: {
|
||||
specList: [],
|
||||
}, // sku详情
|
||||
goodsSpecList: this.detail.specs, // 商品spec
|
||||
promotionMap: { // 活动状态
|
||||
promotionMap: {
|
||||
// 活动状态
|
||||
SECKILL: null,
|
||||
FULL_DISCOUNT: null,
|
||||
COUPON: []
|
||||
COUPON: [],
|
||||
}, // 促销活动
|
||||
formatList: [], // 选择商品品类的数组
|
||||
loading: false, // 立即购买loading
|
||||
loading1: false, // 加入购物车loading
|
||||
isCollected: false // 是否收藏
|
||||
isCollected: false, // 是否收藏
|
||||
};
|
||||
},
|
||||
components: { PicZoom, Promotion },
|
||||
computed: {
|
||||
wholesalePrice(key) {
|
||||
return this.wholesaleList.length
|
||||
? this.wholesaleList.map((item) => {
|
||||
return item.price;
|
||||
})
|
||||
: [];
|
||||
},
|
||||
wholesaleNum(key) {
|
||||
return this.wholesaleList.length
|
||||
? this.wholesaleList.map((item) => {
|
||||
return item.num;
|
||||
})
|
||||
: [];
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
select (index, value) { // 选择规格
|
||||
select(index, value) {
|
||||
// 选择规格
|
||||
this.$set(this.currentSelceted, index, value);
|
||||
let selectedSkuId = this.goodsSpecList.find((i) => {
|
||||
let matched = true;
|
||||
let specValues = i.specValues.filter((j) => j.specName !== 'images');
|
||||
let specValues = i.specValues.filter((j) => j.specName !== "images");
|
||||
for (let n = 0; n < specValues.length; n++) {
|
||||
if (specValues[n].specValue !== this.currentSelceted[n]) {
|
||||
matched = false;
|
||||
@@ -186,77 +380,90 @@ export default {
|
||||
return i;
|
||||
}
|
||||
});
|
||||
this.$router.push({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId: selectedSkuId.skuId, goodsId: this.skuDetail.goodsId }
|
||||
this.$emit("handleClickSku", {
|
||||
skuId: selectedSkuId.skuId,
|
||||
goodsId: this.skuDetail.goodsId,
|
||||
});
|
||||
},
|
||||
|
||||
addShoppingCartBtn () { // 添加购物车
|
||||
const params = {
|
||||
num: this.count,
|
||||
skuId: this.skuDetail.id
|
||||
};
|
||||
this.loading = true;
|
||||
addCartGoods(params).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
buyNow () { // 立即购买
|
||||
addShoppingCartBtn() {
|
||||
// 添加购物车
|
||||
const params = {
|
||||
num: this.count,
|
||||
skuId: this.skuDetail.id,
|
||||
cartType: 'BUY_NOW'
|
||||
};
|
||||
this.loading = true;
|
||||
addCartGoods(params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$router.push({
|
||||
path: "/shoppingCart",
|
||||
query: { detail: this.skuDetail, count: this.count },
|
||||
});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
buyNow() {
|
||||
// 立即购买
|
||||
const params = {
|
||||
num: this.count,
|
||||
skuId: this.skuDetail.id,
|
||||
cartType: "BUY_NOW",
|
||||
};
|
||||
// 虚拟商品购买
|
||||
if (this.skuDetail.goodsType === 'VIRTUAL_GOODS') {
|
||||
params.cartType = 'VIRTUAL'
|
||||
if (this.skuDetail.goodsType === "VIRTUAL_GOODS") {
|
||||
params.cartType = "VIRTUAL";
|
||||
}
|
||||
this.loading1 = true;
|
||||
addCartGoods(params).then(res => {
|
||||
this.loading1 = false;
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/pay', query: {way: params.cartType}});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading1 = false;
|
||||
});
|
||||
addCartGoods(params)
|
||||
.then((res) => {
|
||||
this.loading1 = false;
|
||||
if (res.success) {
|
||||
this.$router.push({
|
||||
path: "/pay",
|
||||
query: { way: params.cartType },
|
||||
});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading1 = false;
|
||||
});
|
||||
},
|
||||
async collect () { // 收藏商品
|
||||
async collect() {
|
||||
// 收藏商品
|
||||
if (this.isCollected) {
|
||||
let cancel = await cancelCollect('GOODS', this.skuDetail.id)
|
||||
let cancel = await cancelCollect("GOODS", this.skuDetail.id);
|
||||
if (cancel.success) {
|
||||
this.$Message.success('取消收藏成功')
|
||||
this.isCollected = false
|
||||
this.$Message.success("取消收藏成功");
|
||||
this.isCollected = false;
|
||||
}
|
||||
} else {
|
||||
let collect = await collectGoods('GOODS', this.skuDetail.id);
|
||||
let collect = await collectGoods("GOODS", this.skuDetail.id);
|
||||
if (collect.code === 200) {
|
||||
this.isCollected = true;
|
||||
this.$Message.success('收藏商品成功,可以前往个人中心我的收藏查看');
|
||||
this.$Message.success("收藏商品成功,可以前往个人中心我的收藏查看");
|
||||
}
|
||||
}
|
||||
},
|
||||
// 格式化数据
|
||||
formatSku (list) {
|
||||
formatSku(list) {
|
||||
let arr = [{}];
|
||||
list.forEach((item, index) => {
|
||||
item.specValues.forEach((spec, specIndex) => {
|
||||
let name = spec.specName;
|
||||
let values = {
|
||||
value: spec.specValue,
|
||||
quantity: item.quantity
|
||||
quantity: item.quantity,
|
||||
};
|
||||
if (name === 'images') {
|
||||
if (name === "images") {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -275,7 +482,7 @@ export default {
|
||||
if (!keys.includes(name)) {
|
||||
arr.push({
|
||||
name: name,
|
||||
values: [values]
|
||||
values: [values],
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -286,55 +493,61 @@ export default {
|
||||
|
||||
let cur = list.filter((i) => i.skuId === this.$route.query.skuId)[0];
|
||||
if (cur) {
|
||||
cur.specValues.filter((i) => i.specName !== 'images')
|
||||
cur.specValues
|
||||
.filter((i) => i.specName !== "images")
|
||||
.forEach((value, _index) => {
|
||||
this.currentSelceted[_index] = value.specValue;
|
||||
});
|
||||
}
|
||||
this.skuList = list;
|
||||
},
|
||||
receiveCoupon (id) { // 领取优惠券
|
||||
receiveCoupon(id).then(res => {
|
||||
receiveCoupon(id) {
|
||||
// 领取优惠券
|
||||
receiveCoupon(id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('优惠券领取成功')
|
||||
this.$Message.success("优惠券领取成功");
|
||||
} else {
|
||||
this.$Message.warning(res.message)
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
promotion () { // 格式化促销活动,返回当前促销的对象
|
||||
promotion() {
|
||||
// 格式化促销活动,返回当前促销的对象
|
||||
if (!this.detail.promotionMap) return false;
|
||||
let keysArr = Object.keys(this.detail.promotionMap);
|
||||
if (keysArr.length === 0) return false;
|
||||
|
||||
for (let i = 0; i < keysArr.length; i++) {
|
||||
let key = keysArr[i].split('-')[0]
|
||||
if (key === 'COUPON') {
|
||||
this.promotionMap[key].push(this.detail.promotionMap[keysArr[i]])
|
||||
let key = keysArr[i].split("-")[0];
|
||||
if (key === "COUPON") {
|
||||
this.promotionMap[key].push(this.detail.promotionMap[keysArr[i]]);
|
||||
} else {
|
||||
this.promotionMap[key] = this.detail.promotionMap[keysArr[i]]
|
||||
this.promotionMap[key] = this.detail.promotionMap[keysArr[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
swiperGoodsImg() {
|
||||
this.skuDetail.specList.forEach((e) => {
|
||||
if (e.specName === "images") {
|
||||
this.imgList = e.specImage;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
// 用户登录才会判断是否收藏
|
||||
if (this.Cookies.getItem('userInfo')) {
|
||||
isCollection('GOODS', this.skuDetail.id).then(res => {
|
||||
if (this.Cookies.getItem("userInfo")) {
|
||||
isCollection("GOODS", this.skuDetail.id).then((res) => {
|
||||
if (res.success && res.result) {
|
||||
this.isCollected = true;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
this.detail.data.specList.forEach(e => {
|
||||
if (e.specName === 'images') {
|
||||
this.imgList = e.specImage
|
||||
}
|
||||
})
|
||||
|
||||
this.formatSku(this.goodsSpecList);
|
||||
this.promotion()
|
||||
document.title = this.skuDetail.goodsName
|
||||
}
|
||||
this.promotion();
|
||||
document.title = this.skuDetail.goodsName;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -344,58 +557,24 @@ export default {
|
||||
width: 175px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
.inventory {
|
||||
padding-left: 4px;
|
||||
|
||||
}
|
||||
|
||||
.global_color {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.see-Img {
|
||||
width: 100%;
|
||||
height: 175px;
|
||||
}
|
||||
|
||||
.see-Item {
|
||||
> p {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.Report {
|
||||
color: $theme_color !important;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
@include white_background_color();
|
||||
}
|
||||
.item-sale-flex {
|
||||
width: 29%;
|
||||
padding: 0 3%;
|
||||
|
||||
.item-num {
|
||||
text-align: center;
|
||||
width: 100px;
|
||||
}
|
||||
.item-sale {
|
||||
margin: 10px 0;
|
||||
> h3 {
|
||||
width: 13%;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
line-height: 60px;
|
||||
box-sizing: border-box;
|
||||
border-right: 1px solid $border_color;
|
||||
}
|
||||
height: 60px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid $border_color;
|
||||
background: #f7f7f7;
|
||||
.item-price-num {
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.item-detail-show {
|
||||
@@ -505,14 +684,65 @@ export default {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.item-price-coupon-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
|
||||
.Ellipsis {
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2; //控制显示几行
|
||||
-webkit-box-orient: vertical; //webbox方向
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.dropdown .item-coupon {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
color: $theme_color;
|
||||
margin: 5px 0;
|
||||
font-size: 12px;
|
||||
background-color: #ffdedf;
|
||||
border: 1px dotted $theme_color;
|
||||
cursor: pointer;
|
||||
|
||||
span {
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #f9f9f9;
|
||||
min-width: 160px;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
padding: 12px 16px;
|
||||
}
|
||||
.dropdown:hover .dropdown-content {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.item-coupon {
|
||||
margin-right: 5px;
|
||||
padding: 3px;
|
||||
padding: 0 5px;
|
||||
color: $theme_color;
|
||||
font-size: 12px;
|
||||
background-color: #ffdedf;
|
||||
border: 1px dotted $theme_color;
|
||||
cursor: pointer;
|
||||
|
||||
span {
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
.item-promotion {
|
||||
margin-right: 5px;
|
||||
@@ -521,8 +751,17 @@ export default {
|
||||
font-size: 12px;
|
||||
border: 1px solid $theme_color;
|
||||
}
|
||||
|
||||
.item-price-right {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-remarks-sum {
|
||||
padding-left: 8px;
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
padding: 0 10px;
|
||||
border-left: 1px solid $border_color;
|
||||
}
|
||||
|
||||
@@ -597,7 +836,7 @@ export default {
|
||||
|
||||
.add-buy-car {
|
||||
margin-top: 15px;
|
||||
>*{
|
||||
> * {
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
@@ -607,7 +846,7 @@ export default {
|
||||
justify-content: space-between;
|
||||
> span {
|
||||
padding-right: 10px;
|
||||
&:hover{
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="height:auto;">
|
||||
<div class="item-intro-show">
|
||||
<div class="item-intro-detail" ref="itemIntroDetail">
|
||||
<div class="item-intro-nav item-tabs">
|
||||
<Tabs :animated="false" @on-click="tabClick">
|
||||
<TabPane label="商品介绍">
|
||||
<div class="item-intro-img" ref="itemIntroGoods">
|
||||
<div v-html="skuDetail.intro" v-if="skuDetail.intro"></div>
|
||||
<div class="item-intro" v-html="skuDetail.intro" v-if="skuDetail.intro"></div>
|
||||
<div v-else style="margin:20px;">暂无商品介绍</div>
|
||||
</div>
|
||||
</TabPane>
|
||||
@@ -71,7 +71,7 @@
|
||||
</TabPane>
|
||||
<TabPane label="商品参数">
|
||||
<template v-if="detail.goodsParamsDTOList && detail.goodsParamsDTOList.length">
|
||||
<div class="goods-params" v-for="item in detail.goodsParamsDTOList" :key="item.groupId">
|
||||
<div class="goods-params" style="height:inherit;" v-for="item in detail.goodsParamsDTOList" :key="item.groupId">
|
||||
<span class="ml_10">{{item.groupName}}</span>
|
||||
<table class="mb_10" cellpadding='0' cellspacing="0" >
|
||||
<tr v-for="param in item.goodsParamsItemDTOList" :key="param.paramId">
|
||||
@@ -214,12 +214,18 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.item-intro{
|
||||
>img{
|
||||
display:block;
|
||||
}
|
||||
}
|
||||
/***************商品详情介绍和推荐侧边栏开始***************/
|
||||
.item-intro-show{
|
||||
|
||||
width: 1200px;
|
||||
margin: 15px auto;
|
||||
display: flex;
|
||||
overflow-x: hidden;
|
||||
flex-direction: row;
|
||||
|
||||
}
|
||||
@@ -303,6 +309,9 @@ export default {
|
||||
.item-intro-img {
|
||||
width: 100%;
|
||||
min-height: 300px;
|
||||
/deep/ img{
|
||||
margin:0 auto;
|
||||
}
|
||||
}
|
||||
.item-intro-img img{
|
||||
max-width: 1000px;
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
<script>
|
||||
import storage from '@/plugins/storage.js';
|
||||
import { cartGoodsAll } from '@/api/cart.js';
|
||||
import { logout } from '@/api/account.js';
|
||||
export default {
|
||||
name: 'M-Header',
|
||||
created () {
|
||||
@@ -120,12 +121,14 @@ export default {
|
||||
window.open(url.href, '_blank');
|
||||
},
|
||||
signOutFun () { // 退出登录
|
||||
storage.removeItem('accessToken');
|
||||
storage.removeItem('refreshToken');
|
||||
storage.removeItem('userInfo');
|
||||
storage.removeItem('cartNum');
|
||||
this.$store.commit('SET_CARTNUM', 0)
|
||||
this.$router.push('/login');
|
||||
logout().then(res => {
|
||||
storage.removeItem('accessToken');
|
||||
storage.removeItem('refreshToken');
|
||||
storage.removeItem('userInfo');
|
||||
storage.removeItem('cartNum');
|
||||
this.$store.commit('SET_CARTNUM', 0)
|
||||
this.$router.push('/login');
|
||||
});
|
||||
},
|
||||
goUserCenter (path) {
|
||||
// 跳转我的订单,我的足迹、收藏等
|
||||
|
||||
@@ -2,92 +2,110 @@
|
||||
<div class="scroll-show">
|
||||
<div class="content clearfix">
|
||||
<cateNav class="cate" :hover="true" :showNavBar="false"></cateNav>
|
||||
<Search class="search-con" :hover="true" :showLogo="false" :showTag="false"></Search>
|
||||
<Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" />
|
||||
<i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i>
|
||||
<Search
|
||||
class="search-con"
|
||||
:hover="true"
|
||||
:showLogo="false"
|
||||
:showTag="false"
|
||||
></Search>
|
||||
<Icon
|
||||
type="ios-cart-outline"
|
||||
@click="goCartList"
|
||||
class="cart-icon"
|
||||
@mouseenter.native="getCartList"
|
||||
/>
|
||||
<i class="cart-badge">{{ cartNum < 100 ? cartNum : "99" }}</i>
|
||||
</div>
|
||||
<hr class="hr"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {cartCount} from '@/api/cart.js'
|
||||
import storage from '@/plugins/storage.js';
|
||||
import { cartCount } from "@/api/cart.js";
|
||||
import storage from "@/plugins/storage.js";
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {} // 用户信息
|
||||
}
|
||||
userInfo: {}, // 用户信息
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
cartNum () { // 购物车商品数量
|
||||
return this.$store.state.cartNum
|
||||
}
|
||||
cartNum() {
|
||||
// 购物车商品数量
|
||||
return this.$store.state.cartNum;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
goCartList () { // 跳转购物车页面
|
||||
goCartList() {
|
||||
// 跳转购物车页面
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: '/cart'
|
||||
})
|
||||
window.open(routerUrl.href, '_blank')
|
||||
path: "/cart",
|
||||
});
|
||||
window.open(routerUrl.href, "_blank");
|
||||
},
|
||||
getCartList () { // 获取购物车列表
|
||||
if (storage.getItem('userInfo')) {
|
||||
cartCount().then(res => {
|
||||
this.$store.commit('SET_CARTNUM', res.result)
|
||||
this.Cookies.setItem('cartNum', res.result)
|
||||
})
|
||||
getCartList() {
|
||||
// 获取购物车列表
|
||||
if (storage.getItem("userInfo")) {
|
||||
cartCount().then((res) => {
|
||||
this.$store.commit("SET_CARTNUM", res.result);
|
||||
this.Cookies.setItem("cartNum", res.result);
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (storage.getItem("userInfo")) {
|
||||
this.userInfo = JSON.parse(storage.getItem("userInfo"));
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (storage.getItem('userInfo')) {
|
||||
this.userInfo = JSON.parse(storage.getItem('userInfo'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
width: 1200px;
|
||||
height: 40px;
|
||||
margin: 10px auto;
|
||||
position: relative;
|
||||
}
|
||||
.cate {
|
||||
float: left;
|
||||
width: 200px!important;
|
||||
}
|
||||
.search-con{
|
||||
float: left;
|
||||
width: 800px;
|
||||
overflow: hidden;
|
||||
margin-top: -27px;
|
||||
}
|
||||
.cart-icon {
|
||||
width: 30px;
|
||||
float: left;
|
||||
font-size: 25px;
|
||||
margin-top: 8px;
|
||||
color: $theme_color;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.cart-badge {
|
||||
position: absolute;
|
||||
font-style: normal;
|
||||
right: 165px;
|
||||
display: block;
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
border-radius: 10px;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
z-index: 5;
|
||||
top: 3px;
|
||||
.hr{
|
||||
height:1px;
|
||||
background:$theme_color;
|
||||
}
|
||||
.content {
|
||||
width: 1200px;
|
||||
height: 40px;
|
||||
margin: 10px auto;
|
||||
position: relative;
|
||||
}
|
||||
.cate {
|
||||
float: left;
|
||||
width: 200px !important;
|
||||
}
|
||||
.search-con {
|
||||
float: left;
|
||||
width: 800px;
|
||||
overflow: hidden;
|
||||
margin-top: -27px;
|
||||
}
|
||||
.cart-icon {
|
||||
width: 30px;
|
||||
float: left;
|
||||
font-size: 25px;
|
||||
margin-top: 8px;
|
||||
color: $theme_color;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.cart-badge {
|
||||
position: absolute;
|
||||
font-style: normal;
|
||||
right: 165px;
|
||||
display: block;
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
border-radius: 10px;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
z-index: 5;
|
||||
top: 3px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,13 +2,19 @@
|
||||
<div class="model-item" v-if="element && element.key">
|
||||
<!-- 轮播图模块,包括个人信息,快捷导航模块 -->
|
||||
<template v-if="element.type == 'carousel'">
|
||||
<model-carousel :data="element" class="mb_20 width_1200_auto"></model-carousel>
|
||||
<model-carousel
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></model-carousel>
|
||||
</template>
|
||||
<template v-if="element.type == 'carousel1'">
|
||||
<model-carousel1 :data="element" class="mb_20"></model-carousel1>
|
||||
</template>
|
||||
<template v-if="element.type == 'carousel2'">
|
||||
<model-carousel2 :data="element" class="mb_20 width_1200_auto"></model-carousel2>
|
||||
<model-carousel2
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></model-carousel2>
|
||||
</template>
|
||||
<!-- 热门广告 -->
|
||||
<template v-if="element.type == 'hotAdvert'">
|
||||
@@ -37,13 +43,16 @@
|
||||
</template>
|
||||
<!-- 限时秒杀 待完善 -->
|
||||
<template v-if="element.type == 'seckill' && element.options.list.length">
|
||||
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
|
||||
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
|
||||
</template>
|
||||
<!-- 折扣广告 -->
|
||||
<template v-if="element.type == 'discountAdvert'">
|
||||
<div
|
||||
class="discountAdvert"
|
||||
:style="{'backgroundImage' :'url(' + require('@/assets/images/decorate.png') + ')'}"
|
||||
:style="{
|
||||
backgroundImage:
|
||||
'url(' + require('@/assets/images/decorate.png') + ')',
|
||||
}"
|
||||
>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
@@ -74,41 +83,53 @@
|
||||
</template>
|
||||
<!-- 新品排行 -->
|
||||
<template v-if="element.type == 'newGoodsSort'">
|
||||
<new-goods-sort :data="element" class="mb_20 width_1200_auto"></new-goods-sort>
|
||||
<new-goods-sort
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></new-goods-sort>
|
||||
</template>
|
||||
<!-- 首页广告 -->
|
||||
<template v-if="element.type == 'firstAdvert'">
|
||||
<first-page-advert :data="element" class="mb_20 width_1200_auto"></first-page-advert>
|
||||
<first-page-advert
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></first-page-advert>
|
||||
</template>
|
||||
<!-- 横幅广告 -->
|
||||
<template v-if="element.type == 'bannerAdvert'">
|
||||
<img
|
||||
width="1200"
|
||||
class="hover-pointer mb_20"
|
||||
@click="linkTo(element.options.url)"
|
||||
:src="element.options.img"
|
||||
alt=""
|
||||
/>
|
||||
<div style="width: 100%; text-align: center">
|
||||
<img
|
||||
width="1200"
|
||||
class="hover-pointer mb_20"
|
||||
@click="linkTo(element.options.url)"
|
||||
:src="element.options.img"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="element.type == 'notEnough'">
|
||||
<not-enough :data="element" class="mb_20 width_1200_auto"></not-enough>
|
||||
<template v-if="element.type == 'notEnough'"
|
||||
>
|
||||
<not-enough
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></not-enough>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ModelCarousel from './modelList/Carousel.vue';
|
||||
import ModelCarousel1 from './modelList/Carousel1.vue';
|
||||
import ModelCarousel2 from './modelList/Carousel2.vue';
|
||||
import FirstPageAdvert from './modelList/FirstPageAdvert.vue';
|
||||
import NewGoodsSort from './modelList/NewGoodsSort.vue';
|
||||
import Recommend from './modelList/Recommend.vue';
|
||||
import NotEnough from './modelList/NotEnough.vue';
|
||||
import Seckill from './modelList/Seckill.vue';
|
||||
import ModelCarousel from "./modelList/Carousel.vue";
|
||||
import ModelCarousel1 from "./modelList/Carousel1.vue";
|
||||
import ModelCarousel2 from "./modelList/Carousel2.vue";
|
||||
import FirstPageAdvert from "./modelList/FirstPageAdvert.vue";
|
||||
import NewGoodsSort from "./modelList/NewGoodsSort.vue";
|
||||
import Recommend from "./modelList/Recommend.vue";
|
||||
import NotEnough from "./modelList/NotEnough.vue";
|
||||
import Seckill from "./modelList/Seckill.vue";
|
||||
|
||||
export default {
|
||||
name: 'modelFormItem',
|
||||
props: ['element', 'select', 'index', 'data'],
|
||||
name: "modelFormItem",
|
||||
props: ["element", "select", "index", "data"],
|
||||
components: {
|
||||
ModelCarousel,
|
||||
ModelCarousel1,
|
||||
@@ -117,20 +138,20 @@ export default {
|
||||
NewGoodsSort,
|
||||
FirstPageAdvert,
|
||||
NotEnough,
|
||||
Seckill
|
||||
Seckill,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
showModal: false, // 控制模态框显隐
|
||||
selected: {} // 已选数据
|
||||
selected: {}, // 已选数据
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.model-item {
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/** 热门广告 */
|
||||
@@ -177,7 +198,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.width_1200_auto{
|
||||
.width_1200_auto {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
|
||||
@@ -23,12 +23,18 @@
|
||||
<div class="person-msg">
|
||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||
<div>Hi,{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
|
||||
<div>
|
||||
Hi, {{
|
||||
userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile
|
||||
}}
|
||||
</div>
|
||||
<div v-if="userInfo.id">
|
||||
<Button type="error" shape="circle" @click="$router.push('home')">会员中心</Button>
|
||||
<Button class="btns" shape="circle" @click="$router.push('home')"
|
||||
>会员中心</Button
|
||||
>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Button type="error" @click="$router.push('login')" shape="circle"
|
||||
<Button class="btns" @click="$router.push('login')" shape="circle"
|
||||
>请登录</Button
|
||||
>
|
||||
</div>
|
||||
@@ -37,8 +43,14 @@
|
||||
<div>
|
||||
<span>常见问题</span>
|
||||
<ul class="article-list">
|
||||
<li class="ellipsis" :alt="article.title" v-for="(article, index) in articleList" :key="index" @click="goArticle(article.id)">
|
||||
{{article.title}}
|
||||
<li
|
||||
class="ellipsis"
|
||||
:alt="article.title"
|
||||
v-for="(article, index) in articleList"
|
||||
:key="index"
|
||||
@click="goArticle(article.id)"
|
||||
>
|
||||
{{ article.title }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -49,43 +61,48 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {articleList} from '@/api/common.js'
|
||||
import storage from '@/plugins/storage';
|
||||
import { articleList } from "@/api/common.js";
|
||||
import storage from "@/plugins/storage";
|
||||
export default {
|
||||
name: 'modelCarousel',
|
||||
props: ['data'],
|
||||
data () {
|
||||
name: "modelCarousel",
|
||||
props: ["data"],
|
||||
data() {
|
||||
return {
|
||||
config: require("@/config"),
|
||||
userInfo: {}, // 用户信息
|
||||
articleList: [], // 常见问题
|
||||
params: { // 请求常见问题参数
|
||||
params: {
|
||||
// 请求常见问题参数
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
type: 'ANNOUNCEMENT',
|
||||
sort: 'sort'
|
||||
}
|
||||
type: "ANNOUNCEMENT",
|
||||
sort: "sort",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getArticleList () { // 获取常见问题列表
|
||||
articleList(this.params).then(res => {
|
||||
getArticleList() {
|
||||
// 获取常见问题列表
|
||||
articleList(this.params).then((res) => {
|
||||
if (res.success) {
|
||||
this.articleList = res.result.records
|
||||
this.articleList = res.result.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
goArticle (id) { // 跳转文章详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/article',
|
||||
query: {id}
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
}
|
||||
},
|
||||
goArticle(id) {
|
||||
// 跳转文章详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: "/article",
|
||||
query: { id },
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (storage.getItem("userInfo"))
|
||||
this.userInfo = JSON.parse(storage.getItem("userInfo"));
|
||||
this.getArticleList();
|
||||
},
|
||||
mounted () {
|
||||
if (storage.getItem('userInfo')) this.userInfo = JSON.parse(storage.getItem('userInfo'));
|
||||
this.getArticleList()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -96,6 +113,16 @@ export default {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btns {
|
||||
background-color:#363634 ;
|
||||
line-height:30px;
|
||||
color: white !important;
|
||||
}
|
||||
.btns:hover {
|
||||
background-color: #363634;
|
||||
line-height:32px !important;
|
||||
color: #e5d790 !important;
|
||||
}
|
||||
/* 导航主体 */
|
||||
.nav-body {
|
||||
width: 1200px;
|
||||
@@ -128,12 +155,14 @@ export default {
|
||||
flex-direction: column;
|
||||
margin: 20px auto;
|
||||
button {
|
||||
height: 25px !important;
|
||||
height: 30px !important;
|
||||
margin-top: 10px;
|
||||
line-height: 30px;
|
||||
border: none;
|
||||
}
|
||||
.ivu-btn-default {
|
||||
color: $theme_color;
|
||||
border-color: $theme_color;
|
||||
// color: $theme_color;
|
||||
// border-color: $theme_color;
|
||||
}
|
||||
img {
|
||||
margin-bottom: 10px;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="person-msg">
|
||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||
<div>Hi,{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
|
||||
<div>Hi,{{ userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile }}</div>
|
||||
<div v-if="userInfo.id">
|
||||
<Button type="error" shape="circle">会员中心</Button>
|
||||
</div>
|
||||
@@ -57,6 +57,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {articleList} from '@/api/common.js'
|
||||
import storage from '@/plugins/storage';
|
||||
export default {
|
||||
@@ -64,6 +65,7 @@ export default {
|
||||
props: ['data'],
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
userInfo: {}, // 用户信息
|
||||
articleList: [], // 常见问题
|
||||
params: { // 请求常见问题参数
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
<template>
|
||||
<div class="not-enough">
|
||||
<ul class="nav-bar">
|
||||
<li
|
||||
v-for="(item, index) in conData.options.navList"
|
||||
:class="currentIndex === index ? 'curr' : ''"
|
||||
@click="changeCurr(index)"
|
||||
:key="index"
|
||||
>
|
||||
<p>{{ item.title }}</p>
|
||||
<p>{{ item.desc }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="not-enough" ref="obtain" id="demo">
|
||||
<Affix :offset-top="62" @on-change="change">
|
||||
<ul class="nav-bar" v-show="topSearchShow">
|
||||
<li
|
||||
v-for="(item, index) in conData.options.navList"
|
||||
:class="currentIndex === index ? 'curr' : ''"
|
||||
@click="changeCurr(index)"
|
||||
:key="index"
|
||||
>
|
||||
<p @click="gotoDemo">{{ item.title }}</p>
|
||||
<p @click="gotoDemo">{{ item.desc }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
</Affix>
|
||||
<div class="content" v-if="showContent">
|
||||
<div
|
||||
v-for="(item, index) in conData.options.list[currentIndex]"
|
||||
@@ -29,17 +31,26 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
window.addEventListener('scroll',this.handleScrollx,true)
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
screenHeight:document.body.clientHeight,
|
||||
scrollHieght:0,
|
||||
topSearchShow: true, //展示 导航条
|
||||
topIndex: 0, // 当前滚动条位置 (取整)
|
||||
scrollTops: 0,
|
||||
open:'',
|
||||
currentIndex: 0, // 当前分类下标
|
||||
conData: this.data, // 装修数据
|
||||
showContent: true // 是否展示内容
|
||||
showContent: true, // 是否展示内容
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -47,14 +58,40 @@ export default {
|
||||
this.conData = val;
|
||||
},
|
||||
conData: function (val) {
|
||||
this.$emit('content', val);
|
||||
}
|
||||
this.$emit("content", val);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
changeCurr (index) { // 选择分类
|
||||
this.currentIndex = index;
|
||||
handleScrollx(){
|
||||
// console.log('滚动高度',window.pageYOffset) // 获取滚动条的高度
|
||||
// console.log(this.$refs.obtain.getBoundingClientRect().top) //获取到距离顶部的距离
|
||||
this.scrollHieght = Number(window.pageYOffset);//获取到距离顶部的距离
|
||||
this.scrollTops = Number(this.$refs.obtain.getBoundingClientRect().top); // 获取到距离顶部的距离
|
||||
this.topSearchShow = true; // 展示图钉
|
||||
if(this.scrollTops < -660){ // 超过隐藏
|
||||
this.topSearchShow = false;
|
||||
}
|
||||
},
|
||||
toguid(path,id){
|
||||
var path =path;
|
||||
var Id = id;
|
||||
localStorage.setItem('toId',Id);
|
||||
this.$router.push(path);
|
||||
},
|
||||
change(status){ //获取是否获取到图钉
|
||||
this.open = status
|
||||
},
|
||||
gotoDemo(){ // 跳转到demo的位置
|
||||
if(this.open){ // 获取到图钉之后在跳转当前位置
|
||||
document.querySelector("#demo").scrollIntoView(true);
|
||||
}
|
||||
}
|
||||
//scrollIntoView()可以在所有的HTML元素上调用,通过滚动浏览器窗口或某个容器元素
|
||||
},
|
||||
changeCurr(index) {
|
||||
// 选择分类
|
||||
this.currentIndex = index;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -63,10 +100,13 @@ export default {
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
background-color: rgb(218, 217, 217);
|
||||
background-color: #f8f8f8;
|
||||
height: 60px;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
position: sticky;
|
||||
position: -webkit-sticky;
|
||||
top: 0;
|
||||
li {
|
||||
padding: 0 30px;
|
||||
text-align: center;
|
||||
@@ -140,5 +180,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
padding: 0 10px;
|
||||
font-size: 12px;
|
||||
>div:nth-child(1) {
|
||||
width: 130px;
|
||||
|
||||
margin-top: 30px;
|
||||
span:nth-child(1){
|
||||
color: #fff;
|
||||
@@ -169,7 +169,7 @@ export default {
|
||||
padding: 0 5px;
|
||||
background-color: #a25684;
|
||||
display: block;
|
||||
width: 120px;
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0 10px 10px 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="seckill">
|
||||
<div class="seckill" v-if="goodsList.length">
|
||||
<div class="aside hover-pointer" @click="goToSeckill">
|
||||
<div class="title">{{ actName }}</div>
|
||||
<div class="hour">
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<swiper :options="swiperOption" ref="mySwiper">
|
||||
<swiper-slide v-for="(item,index) in goodsList" :key="index">
|
||||
<div class="content hover-pointer" @click="goToSeckill">
|
||||
<div class="content hover-pointer" @click.stop="goToSeckill">
|
||||
<img :src="item.goodsImage" width="140" height="140" :alt="item.goodsName">
|
||||
<div class="ellipsis">{{item.goodsName}}</div>
|
||||
<div>
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
seconds: 0, // 秒
|
||||
interval: null, // 定时器
|
||||
swiperOption: { // 轮播图参数
|
||||
loop: true,
|
||||
|
||||
slidesPerView: 5,
|
||||
// 设置点击箭头
|
||||
navigation: {
|
||||
@@ -157,6 +157,7 @@ export default {
|
||||
// ]
|
||||
this.list = this.data.options.list
|
||||
this.goodsList = this.list[0].seckillGoodsList
|
||||
console.log( this.goodsList)
|
||||
this.countDown(this.currIndex)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<script>
|
||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||
import { handleRegion } from '@/api/address.js';
|
||||
|
||||
export default {
|
||||
name: 'map',
|
||||
props: {
|
||||
@@ -41,6 +42,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
showMap: false, // 展示地图
|
||||
mapSearch: '', // 地图搜索
|
||||
map: null, // 初始化地图
|
||||
@@ -88,7 +90,7 @@ export default {
|
||||
},
|
||||
init () { // 初始化地图
|
||||
AMapLoader.load({
|
||||
key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
key: this.config.aMapKey, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||
plugins: [
|
||||
'AMap.ToolBar',
|
||||
|
||||
@@ -1,27 +1,55 @@
|
||||
<template>
|
||||
<div class="cate-nav">
|
||||
<div class="nav-con">
|
||||
<div class="all-categories hover-pointer" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">全部商品分类</div>
|
||||
<div
|
||||
class="all-categories hover-pointer"
|
||||
@mouseenter="showFirstLists"
|
||||
@mouseleave="showFirstList = false"
|
||||
>
|
||||
全部商品分类
|
||||
</div>
|
||||
<ul class="nav-item" v-if="showNavBar">
|
||||
<li
|
||||
class="nav-lis"
|
||||
v-for="(item, index) in navList.list"
|
||||
:key="index"
|
||||
@click="linkTo(item.url)"
|
||||
>
|
||||
{{ item.name }}
|
||||
<!-- {{item}} -->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 全部商品分类 -->
|
||||
<div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
|
||||
<div
|
||||
class="cate-list"
|
||||
v-show="showAlways || showFirstList"
|
||||
@mouseenter="showFirstList = true"
|
||||
@mouseleave="showFirstList = false"
|
||||
>
|
||||
<!-- 第一级分类 -->
|
||||
<div class="nav-side" :class="{'large-nav': large, 'opacity-nav': opacity}" @mouseleave="panel = false">
|
||||
<div
|
||||
class="nav-side"
|
||||
:class="{ 'large-nav': large, 'opacity-nav': opacity }"
|
||||
@mouseleave="panel = false"
|
||||
>
|
||||
<ul>
|
||||
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" >
|
||||
<span class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span>
|
||||
<li
|
||||
v-for="(item, index) in cateList"
|
||||
:key="index"
|
||||
@mouseenter="showDetail(index)"
|
||||
>
|
||||
<span class="nav-side-item" @click="goGoodsList(item.id)">{{
|
||||
item.name
|
||||
}}</span>
|
||||
<span v-for="(second, secIndex) in item.children" :key="secIndex">
|
||||
<span v-if="secIndex < 2" > / </span>
|
||||
<span @click="goGoodsList(second.id, second.parentId)" class="nav-side-item" v-if="secIndex < 2">{{second.name}}</span>
|
||||
<span v-if="secIndex < 2"> / </span>
|
||||
<span
|
||||
@click="goGoodsList(second.id, second.parentId)"
|
||||
class="nav-side-item"
|
||||
v-if="secIndex < 2"
|
||||
>{{ second.name }}</span
|
||||
>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -29,14 +57,19 @@
|
||||
<!-- 展开分类 -->
|
||||
<div
|
||||
class="detail-item-panel"
|
||||
:style="{'minHeight': large?'470px':'340px'}"
|
||||
:style="{ minHeight: large ? '470px' : '340px' }"
|
||||
v-show="panel"
|
||||
@mouseenter="panel = true"
|
||||
@mouseleave="panel = false"
|
||||
>
|
||||
<div class="nav-detail-item">
|
||||
<template v-for="(item, index) in panelData">
|
||||
<span @click="goGoodsList(item.id, item.parentId)" v-if="index < 8" :key="index">{{ item.name }}<Icon type="ios-arrow-forward" /></span>
|
||||
<template v-for="(item,index) in panelData">
|
||||
<span
|
||||
@click="goGoodsList(item.id,item.parentId)"
|
||||
v-if="index < 8"
|
||||
:key="index"
|
||||
>{{ item.name }}<Icon type="ios-arrow-forward"
|
||||
/></span>
|
||||
</template>
|
||||
</div>
|
||||
<ul>
|
||||
@@ -45,13 +78,21 @@
|
||||
:key="index"
|
||||
class="detail-item-row"
|
||||
>
|
||||
<span class="detail-item-title" @click="goGoodsList(items.id,items.parentId)">
|
||||
<span
|
||||
class="detail-item-title"
|
||||
@click="goGoodsList(items.id, items.parentId)"
|
||||
>
|
||||
{{ items.name }} <Icon type="ios-arrow-forward" />
|
||||
<span class="glyphicon glyphicon-menu-right"></span>
|
||||
</span>
|
||||
<div>
|
||||
<span v-for="(item, subIndex) in items.children" @click="goGoodsList(item.id,items.id,items.parentId)"
|
||||
:key="subIndex" class="detail-item">{{ item.name }}</span>
|
||||
<span
|
||||
v-for="(item, subIndex) in items.children"
|
||||
@click="goGoodsList(item.id, items.id, items.parentId)"
|
||||
:key="subIndex"
|
||||
class="detail-item"
|
||||
>{{ item.name }}</span
|
||||
>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -61,101 +102,132 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCategory } from '@/api/goods';
|
||||
import storage from '@/plugins/storage.js'
|
||||
import { getCategory } from "@/api/goods";
|
||||
import storage from "@/plugins/storage.js";
|
||||
export default {
|
||||
name: 'GoodsListNav',
|
||||
name: "GoodsListNav",
|
||||
props: {
|
||||
showAlways: { // 总是显示下拉分类
|
||||
showAlways: {
|
||||
// 总是显示下拉分类
|
||||
default: false,
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
},
|
||||
showNavBar: { // 显示全部商品分类右侧导航条
|
||||
showNavBar: {
|
||||
// 显示全部商品分类右侧导航条
|
||||
default: true,
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
},
|
||||
hover: {
|
||||
default: false,
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
},
|
||||
large: { // 是否更高的高度
|
||||
large: {
|
||||
// 是否更高的高度
|
||||
default: false,
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
},
|
||||
opacity: { // 是否背景透明
|
||||
opacity: {
|
||||
// 是否背景透明
|
||||
default: false,
|
||||
type: Boolean
|
||||
}
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
panel: false, // 二级分类展示
|
||||
panelData: [], // 二级分类数据
|
||||
showFirstList: false, // 始终展示一级列表
|
||||
cateList: [] // 商品分类
|
||||
}
|
||||
cateList: [], // 商品分类
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
navList () { // 导航列表
|
||||
if (storage.getItem('navList')) {
|
||||
return JSON.parse(storage.getItem('navList'))
|
||||
navList() {
|
||||
// 导航列表
|
||||
if (storage.getItem("navList")) {
|
||||
return JSON.parse(storage.getItem("navList"));
|
||||
} else {
|
||||
return []
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getCate () { // 获取分类数据
|
||||
if (this.hover) return false;
|
||||
getCategory(0).then(res => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
this.$store.commit('SET_CATEGORY', res.result)
|
||||
// 过期时间
|
||||
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||
// 存放过期时间
|
||||
localStorage.setItem('category_expiration_time', expirationTime);
|
||||
// 存放分类信息
|
||||
localStorage.setItem('category', JSON.stringify(res.result))
|
||||
}
|
||||
});
|
||||
},
|
||||
showDetail (index) { // 展示全部分类
|
||||
this.panel = true
|
||||
this.panelData = this.cateList[index].children
|
||||
},
|
||||
goGoodsList (id, secondId, firstId) { // 分类共有三级,传全部分类过去
|
||||
const arr = [firstId, secondId, id]
|
||||
if (!arr[1]) {
|
||||
arr.splice(0, 2)
|
||||
}
|
||||
if (!arr[0]) {
|
||||
arr.shift()
|
||||
}
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: '/goodsList',
|
||||
query: {categoryId: arr.toString()}
|
||||
})
|
||||
window.open(routerUrl.href, '_blank')
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (localStorage.getItem('category') && localStorage.getItem('category_expiration_time')) {
|
||||
showFirstLists(){
|
||||
this.showFirstList = true;
|
||||
if(
|
||||
localStorage.getItem("category") &&
|
||||
localStorage.getItem("category_expiration_time")
|
||||
) {
|
||||
// this.getCate();
|
||||
// 如果缓存过期,则获取最新的信息
|
||||
if (new Date() > localStorage.getItem('category_expiration_time')) {
|
||||
if (new Date() > localStorage.getItem("category_expiration_time")) {
|
||||
this.getCate();
|
||||
return;
|
||||
}
|
||||
this.cateList = JSON.parse(localStorage.getItem('category'))
|
||||
this.cateList = JSON.parse(localStorage.getItem("category"));
|
||||
// this.$Message.info(cateList)
|
||||
}
|
||||
},
|
||||
getCate() {
|
||||
// 获取分类数据
|
||||
if (this.hover) return false;
|
||||
getCategory(0).then((res) => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
this.$store.commit("SET_CATEGORY", res.result);
|
||||
// 过期时间
|
||||
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||
// 存放过期时间
|
||||
localStorage.setItem("category_expiration_time", expirationTime);
|
||||
// 存放分类信息
|
||||
localStorage.setItem("category", JSON.stringify(res.result));
|
||||
}
|
||||
});
|
||||
},
|
||||
showDetail(index) {
|
||||
// 展示全部分类
|
||||
this.panel = true;
|
||||
this.panelData = this.cateList[index].children;
|
||||
},
|
||||
goGoodsList(id, secondId, firstId) {
|
||||
// 分类共有三级,传全部分类过去
|
||||
const arr = [firstId, secondId, id];
|
||||
if (!arr[1]) {
|
||||
arr.splice(0, 2);
|
||||
}
|
||||
if (!arr[0]) {
|
||||
arr.shift();
|
||||
}
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: "/goodsList",
|
||||
query: { categoryId: arr.toString() },
|
||||
});
|
||||
window.open(routerUrl.href, "_blank");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (
|
||||
localStorage.getItem("category") &&
|
||||
localStorage.getItem("category_expiration_time")
|
||||
) {
|
||||
// 如果缓存过期,则获取最新的信息
|
||||
if (new Date() > localStorage.getItem("category_expiration_time")) {
|
||||
this.getCate();
|
||||
return;
|
||||
}
|
||||
this.cateList = JSON.parse(localStorage.getItem("category"));
|
||||
} else {
|
||||
this.getCate()
|
||||
this.getCate();
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cate-nav{
|
||||
.nav-lis:hover {
|
||||
color: $theme_color !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cate-nav {
|
||||
width: 1200px;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
@@ -173,6 +245,7 @@ export default {
|
||||
background-color: $theme_color;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: none;
|
||||
}
|
||||
.nav-item {
|
||||
width: 1000px;
|
||||
@@ -180,22 +253,22 @@ export default {
|
||||
line-height: 40px;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
background-color: #eee;
|
||||
// background-color: #eee;
|
||||
display: flex;
|
||||
li {
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
margin-left: 20px;
|
||||
color: rgb(89, 88, 88);
|
||||
color: rgb(129, 127, 127);
|
||||
font-size: 15px;
|
||||
&:hover {
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 分类列表
|
||||
.cate-list{
|
||||
.cate-list {
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
@@ -210,14 +283,14 @@ export default {
|
||||
height: 335px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.large-nav{
|
||||
.large-nav {
|
||||
height: 470px;
|
||||
ul>li{
|
||||
ul > li {
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
.opacity-nav{
|
||||
background-color:rgba(0,0,0,.5);
|
||||
.opacity-nav {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.nav-side ul {
|
||||
width: 100%;
|
||||
@@ -230,13 +303,13 @@ export default {
|
||||
padding-left: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
&:hover{
|
||||
&:hover {
|
||||
background: #999395;
|
||||
}
|
||||
}
|
||||
.nav-side-item:hover {
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
|
||||
/*显示商品详细信息*/
|
||||
@@ -265,7 +338,7 @@ export default {
|
||||
background-color: #6e6568;
|
||||
}
|
||||
.nav-detail-item span:hover {
|
||||
background-color: $theme_color;
|
||||
background-color: #e1251b;
|
||||
}
|
||||
.detail-item-panel li {
|
||||
line-height: 30px;
|
||||
@@ -280,11 +353,13 @@ export default {
|
||||
text-align: right;
|
||||
}
|
||||
.detail-item-title:hover {
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
.detail-item-row {
|
||||
.detail-item-row {
|
||||
display: flex;
|
||||
>div{flex: 1;}
|
||||
> div {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.detail-item {
|
||||
font-size: 12px;
|
||||
@@ -292,12 +367,12 @@ export default {
|
||||
padding-right: 8px;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid #ccc;
|
||||
&:first-child{
|
||||
&:first-child {
|
||||
border: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
.detail-item:hover {
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -545,7 +545,7 @@ export default {
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
float: left;
|
||||
line-height: 50px;
|
||||
line-height: 45px;
|
||||
border: 1px solid #ddd;
|
||||
margin: -1px -1px 0 0;
|
||||
overflow: hidden;
|
||||
@@ -558,6 +558,7 @@ export default {
|
||||
|
||||
&:hover {
|
||||
border-color: $theme_color;
|
||||
border: 2px solid $theme_color;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: relative;
|
||||
@@ -666,7 +667,7 @@ export default {
|
||||
height: 30px;
|
||||
float: left;
|
||||
line-height: 30px;
|
||||
color: $primary_color;
|
||||
color:#4d9cf1;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
font-size: 12px;
|
||||
@@ -716,11 +717,13 @@ export default {
|
||||
}
|
||||
.more-options{
|
||||
margin: 5px;
|
||||
color: #2d8cf0;
|
||||
color: #4d9cf1;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.more-options:hover{
|
||||
color:#0165d1;
|
||||
}
|
||||
/** 其他筛选项 end */
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,7 @@ import storage from '@/plugins/storage.js';
|
||||
*/
|
||||
export function getVerifyImg (verificationEnums) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
headers: {uuid: storage.getItem('uuid')}
|
||||
@@ -19,7 +19,7 @@ export function getVerifyImg (verificationEnums) {
|
||||
*/
|
||||
export function postVerifyImg (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${params.verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params,
|
||||
|
||||
@@ -1,49 +1,21 @@
|
||||
export default {
|
||||
/**
|
||||
* @description 配置显示在浏览器标签的title
|
||||
*/
|
||||
title: 'Lili电商',
|
||||
/**
|
||||
* @description token在Cookie中存储的天数,默认1天
|
||||
*/
|
||||
cookieExpires: 1,
|
||||
/**
|
||||
* @description 是否使用国际化,默认为false
|
||||
* 如果不使用,则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
|
||||
* 用来在菜单中显示文字
|
||||
*/
|
||||
useI18n: false,
|
||||
/**
|
||||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
// common: 'http://192.168.0.101:8890',
|
||||
// buyer: 'http://192.168.0.101:8888',
|
||||
// seller: 'http://192.168.0.101:8889',
|
||||
// manager: 'http://192.168.0.101:8887'
|
||||
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
},
|
||||
api_prod: {
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
},
|
||||
const Cookie = require('js-cookie')
|
||||
module.exports = {
|
||||
title:Cookie.get('siteName') || 'lilishop', //配置显示在浏览器标签的title、底部信息、部分信息展示的值
|
||||
icpCard: "", // icp证
|
||||
company: {
|
||||
href: "https://pickmall.cn",
|
||||
name: "北京宏业汇成科技有限公司",
|
||||
}, //公司信息
|
||||
icpMessage: "京ICP备20009696号-1", //icp备案
|
||||
/**
|
||||
* @description api请求基础路径前缀
|
||||
* 高德地图申请链接
|
||||
* https://lbs.amap.com/api/javascript-api/guide/abc/prepare
|
||||
* 添加成功后,可获取到key值和安全密钥jscode(自2021年12月02日升级,升级之后所申请的 key 必须配备安全密钥 jscode 一起使用)
|
||||
*/
|
||||
baseUrlPrefix: '/buyer',
|
||||
/**
|
||||
* @description 需要加载的插件
|
||||
*/
|
||||
plugin: {
|
||||
'error-store': {
|
||||
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
|
||||
developmentOff: true // 设为true后在开发环境不会收集错误信息,方便开发中排查错误
|
||||
}
|
||||
}
|
||||
//FIXME 请检查当前高德key创建的日期,如果2021年12月02日之前申请的 无需填写安全密钥
|
||||
aMapSecurityJsCode:"2bd0fbf621881f4c77be74f0e76495f3", // 高德web端js申请的安全密钥
|
||||
aMapKey: "7f11113750315d8543daaf5c3ba353ca", //高德web端js申请的api key
|
||||
enableCDN: true, //生产环境 是否启用cdn加载 vue等js
|
||||
port: 10000, //端口
|
||||
};
|
||||
|
||||
@@ -1,53 +1,65 @@
|
||||
import Vue from 'vue';
|
||||
import App from './App';
|
||||
import router from './router';
|
||||
import ViewUI from 'view-design';
|
||||
import './assets/styles/theme.less';
|
||||
import Vue from "vue";
|
||||
import App from "./App";
|
||||
import router from "./router";
|
||||
import ViewUI from "view-design";
|
||||
import "./assets/styles/theme.less";
|
||||
// import './assets/iconfont/iconfont.css';
|
||||
import * as filters from './plugins/filters';
|
||||
import store from '@/vuex/store'
|
||||
import storage from '@/plugins/storage';
|
||||
import * as filters from "./plugins/filters";
|
||||
import store from "@/vuex/store";
|
||||
import storage from "@/plugins/storage";
|
||||
// 全局引入封装组件
|
||||
import {InstallAll} from '@/components/global.js';
|
||||
import { InstallAll } from "@/components/global.js";
|
||||
|
||||
const { aMapSecurityJsCode, title } = require("@/config");
|
||||
Vue.use(ViewUI);
|
||||
Vue.use(InstallAll);
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
Object.keys(filters).forEach(key => {
|
||||
Object.keys(filters).forEach((key) => {
|
||||
Vue.filter(key, filters[key]);
|
||||
});
|
||||
|
||||
// 高德安全密钥
|
||||
if (aMapSecurityJsCode) {
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: aMapSecurityJsCode,
|
||||
};
|
||||
}
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
ViewUI.LoadingBar.start();
|
||||
window.document.title = to.meta.title === undefined ? 'lili shop' : to.meta.title
|
||||
window.document.title = to.meta.title === undefined ? title : to.meta.title;
|
||||
next();
|
||||
});
|
||||
|
||||
router.afterEach(route => {
|
||||
router.afterEach((route) => {
|
||||
ViewUI.LoadingBar.finish();
|
||||
});
|
||||
|
||||
Vue.prototype.linkTo = function (url) {
|
||||
if (url.substr(0, 1) === '/') { // 非外部链接,没有origin,只有路由地址
|
||||
if (router.mode === 'hash') {
|
||||
window.open(location.origin + '/#' + url, '_blank');
|
||||
if (url.substr(0, 1) === "/") {
|
||||
// 非外部链接,没有origin,只有路由地址
|
||||
if (router.mode === "hash") {
|
||||
window.open(location.origin + "/#" + url, "_blank");
|
||||
} else {
|
||||
window.open(location.origin + url, '_blank');
|
||||
window.open(location.origin + url, "_blank");
|
||||
}
|
||||
} else { // 外部链接,完整的url地址
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
// 外部链接,完整的url地址
|
||||
window.open(url, "_blank");
|
||||
}
|
||||
}
|
||||
};
|
||||
// 联系客服
|
||||
Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca') {
|
||||
const url = 'https://yzf.qq.com/xv/web/static/chat/index.html?sign=' + sign
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
Vue.prototype.Cookies = storage
|
||||
Vue.prototype.connectCs = function (
|
||||
sign = "37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca"
|
||||
) {
|
||||
const url = "https://yzf.qq.com/xv/web/static/chat/index.html?sign=" + sign;
|
||||
window.open(url, "_blank");
|
||||
};
|
||||
Vue.prototype.Cookies = storage;
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
}).$mount("#app")
|
||||
render: (h) => h(App),
|
||||
}).$mount("#app");
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
<!-- LOGO 搜索 -->
|
||||
<div class="width_1200 logo">
|
||||
<div>
|
||||
<router-link to="/"><img :src="$store.state.logoImg" alt="lili shop" title="lilishop" /></router-link>
|
||||
<router-link to="/"><img :src="$store.state.logoImg" /></router-link>
|
||||
<div>
|
||||
购物车(<span>{{ goodsTotal }}</span>)
|
||||
购物车(<span>{{ goodsTotal }}</span
|
||||
>)
|
||||
</div>
|
||||
</div>
|
||||
<Search :showTag="false" :showLogo="false"></Search>
|
||||
@@ -17,9 +18,15 @@
|
||||
<div class="available-area">
|
||||
<div class="cart-steps">
|
||||
<span :class="stepIndex == 0 ? 'active' : ''">1.我的购物车</span>
|
||||
<Icon :class="stepIndex == 0 ? 'active-arrow' : ''" custom="icomoon icon-next"></Icon>
|
||||
<Icon
|
||||
:class="stepIndex == 0 ? 'active-arrow' : ''"
|
||||
custom="icomoon icon-next"
|
||||
></Icon>
|
||||
<span :class="stepIndex == 1 ? 'active' : ''">2.填写订单信息</span>
|
||||
<Icon :class="stepIndex == 1 ? 'active-arrow' : ''" custom="icomoon icon-next"></Icon>
|
||||
<Icon
|
||||
:class="stepIndex == 1 ? 'active-arrow' : ''"
|
||||
custom="icomoon icon-next"
|
||||
></Icon>
|
||||
<span :class="stepIndex == 2 ? 'active' : ''">3.成功提交订单</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,7 +34,11 @@
|
||||
<div class="cart-goods">
|
||||
<div class="cart-goods-title">
|
||||
<div class="width_60">
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')">全选</Checkbox>
|
||||
<Checkbox
|
||||
v-model="allChecked"
|
||||
@on-change="changeChecked(allChecked, 'all')"
|
||||
>全选</Checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="goods-title">商品</div>
|
||||
<div class="width_150">单价(元)</div>
|
||||
@@ -39,52 +50,116 @@
|
||||
<p>购物车空空如也</p>
|
||||
<router-link to="/">去选购></router-link>
|
||||
</div>
|
||||
<div v-else class="cart-goods-items" v-for="(shop, index) in cartList" :key="index">
|
||||
<div
|
||||
v-else
|
||||
class="cart-goods-items"
|
||||
v-for="(shop, index) in cartList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="shop-name">
|
||||
<div>
|
||||
<Checkbox v-model="shop.checked" @on-change="changeChecked(shop.checked, 'shop', shop.storeId)"></Checkbox>
|
||||
<span class="go-shop-page" @click="goShopPage(shop.storeId)">{{shop.storeName}}</span>
|
||||
<Checkbox
|
||||
v-model="shop.checked"
|
||||
@on-change="changeChecked(shop.checked, 'shop', shop.storeId)"
|
||||
></Checkbox>
|
||||
<span class="go-shop-page" @click="goShopPage(shop.storeId)">{{
|
||||
shop.storeName
|
||||
}}</span>
|
||||
</div>
|
||||
<span class="shop-coupon" v-if="shop.couponList.length" :class="couponAvailable === index ? 'shop-coupon-show' : ''" @click.stop="showCoupon(shop.id, index)">
|
||||
<span
|
||||
class="shop-coupon"
|
||||
v-if="shop.couponList.length"
|
||||
:class="couponAvailable === index ? 'shop-coupon-show' : ''"
|
||||
@click.stop="showCoupon(shop.id, index)"
|
||||
>
|
||||
<!-- 优惠券模态框 -->
|
||||
<div v-if="couponAvailable === index">
|
||||
<div class="coupon-item" v-for="(item, index) in shop.couponList" :key="index">
|
||||
<span v-if="item.couponType === 'PRICE'">¥{{ item.price }}</span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'">{{ item.couponDiscount }}折</span>
|
||||
<span>满{{item.consumeThreshold}}元可用</span>
|
||||
<Button class="coupon-btn" size="small" type="primary" @click="receiveShopCoupon(item)" :disabled="item.disabled">{{ item.disabled ? "已领取" : "领取" }}</Button>
|
||||
<div
|
||||
class="coupon-item"
|
||||
v-for="(item, index) in shop.couponList"
|
||||
:key="index"
|
||||
>
|
||||
<span v-if="item.couponType === 'PRICE'"
|
||||
>¥{{ item.price }}</span
|
||||
>
|
||||
<span v-if="item.couponType === 'DISCOUNT'"
|
||||
>{{ item.couponDiscount }}折</span
|
||||
>
|
||||
<span>满{{ item.consumeThreshold }}元可用</span>
|
||||
<Button
|
||||
class="coupon-btn"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="receiveShopCoupon(item)"
|
||||
:disabled="item.disabled"
|
||||
>{{ item.disabled ? "已领取" : "领取" }}</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<div class="promotion-notice">{{shop.promotionNotice}}</div>
|
||||
<div class="promotion-notice">{{ shop.promotionNotice }}</div>
|
||||
</div>
|
||||
<template v-for="(goods, goodsIndex) in shop.skuList">
|
||||
<div class="goods-item" :key="goodsIndex">
|
||||
<div class="width_60">
|
||||
<Checkbox v-model="goods.checked" @on-change="changeChecked(goods.checked, 'goods', goods.goodsSku.id)"></Checkbox>
|
||||
<Checkbox
|
||||
v-model="goods.checked"
|
||||
@on-change="
|
||||
changeChecked(goods.checked, 'goods', goods.goodsSku.id)
|
||||
"
|
||||
></Checkbox>
|
||||
</div>
|
||||
<div class="goods-title" @click="goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)">
|
||||
<img :src="
|
||||
goods.goodsSku.thumbnail || '../assets/images/goodsDetail/item-detail-1.jpg'
|
||||
" />
|
||||
<div
|
||||
class="goods-title"
|
||||
@click="
|
||||
goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)
|
||||
"
|
||||
>
|
||||
<img
|
||||
:src="
|
||||
goods.goodsSku.thumbnail ||
|
||||
'../assets/images/goodsDetail/item-detail-1.jpg'
|
||||
"
|
||||
/>
|
||||
<div>
|
||||
<p>{{ goods.goodsSku.goodsName }}</p>
|
||||
<template v-for="(promotion, promotionIndex) in goods.promotions">
|
||||
<div class="promotion" :key="promotionIndex" v-if="promotion.promotionType === 'SECKILL'">
|
||||
<p>
|
||||
{{ goods.goodsSku.goodsName }}
|
||||
</p>
|
||||
<p><Tag
|
||||
v-if="goods.goodsSku.salesModel === 'WHOLESALE'"
|
||||
class="goods-show-tag"
|
||||
color="purple"
|
||||
>
|
||||
批发商品
|
||||
</Tag></p>
|
||||
<template
|
||||
v-for="(promotion, promotionIndex) in goods.promotions"
|
||||
>
|
||||
<div
|
||||
class="promotion"
|
||||
:key="promotionIndex"
|
||||
v-if="promotion.promotionType === 'SECKILL'"
|
||||
>
|
||||
<span>秒杀</span>
|
||||
<promotion :time="promotion.endTime" type="cart"></promotion>
|
||||
<promotion
|
||||
:time="promotion.endTime"
|
||||
type="cart"
|
||||
></promotion>
|
||||
</div>
|
||||
</template>
|
||||
<template v-for="(promotion, promotionIndex) in goods.promotions">
|
||||
<div class="promotion" :key="promotionIndex" v-if="promotion.promotionType === 'FULL_DISCOUNT'">
|
||||
<template
|
||||
v-for="(promotion, promotionIndex) in goods.promotions"
|
||||
>
|
||||
<div
|
||||
class="promotion"
|
||||
:key="promotionIndex"
|
||||
v-if="promotion.promotionType === 'FULL_DISCOUNT'"
|
||||
>
|
||||
<span>满优惠活动</span>
|
||||
<promotion :time="promotion.endTime" type="cart"></promotion>
|
||||
</div>
|
||||
</template>
|
||||
<template v-for="(promotion, promotionIndex) in goods.promotions">
|
||||
<div class="promotion" :key="promotionIndex" v-if="promotion.promotionType === 'COUPON'">
|
||||
<span>优惠券</span>
|
||||
<promotion :time="promotion.endTime" type="cart"></promotion>
|
||||
<promotion
|
||||
:time="promotion.endTime"
|
||||
type="cart"
|
||||
></promotion>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -93,43 +168,76 @@
|
||||
{{ goods.purchasePrice | unitPrice("¥") }}
|
||||
</div>
|
||||
<div class="width_100">
|
||||
<InputNumber :min="1" size="small" v-model="goods.num" @on-change="changeNum(goods.num, goods.goodsSku.id)"></InputNumber>
|
||||
<div class="fontsize_12">{{goods.goodsSku.quantity > 0 ? '有货' : '无货'}}</div>
|
||||
<InputNumber
|
||||
:min="1"
|
||||
size="small"
|
||||
v-model="goods.num"
|
||||
@on-change="changeNum(goods.num, goods.goodsSku.id)"
|
||||
></InputNumber>
|
||||
<div class="fontsize_12">
|
||||
{{ goods.goodsSku.quantity > 0 ? "有货" : "无货" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="width_150">
|
||||
{{ goods.subTotal | unitPrice("¥") }}
|
||||
</div>
|
||||
<div class="width_100">
|
||||
<span class="handle-btn" v-if="!goods.errorMessage" @click="delGoods(goods.goodsSku.id)">删除</span>
|
||||
<span class="handle-btn" v-if="!goods.errorMessage" @click="collectGoods(goods.goodsSku.id)">收藏</span>
|
||||
<Button
|
||||
v-if="!goods.errorMessage"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="delGoods(goods.goodsSku.id)"
|
||||
>删除</Button
|
||||
>
|
||||
<Button
|
||||
v-if="!goods.errorMessage"
|
||||
size="small"
|
||||
type="info"
|
||||
@click="collectGoods(goods.goodsSku.id)"
|
||||
style="margin-left: 10px"
|
||||
>收藏</Button
|
||||
>
|
||||
</div>
|
||||
<div class="error-goods" v-if="goods.errorMessage">
|
||||
<div>{{goods.errorMessage}}</div>
|
||||
<Button type="primary" @click="delGoods(goods.goodsSku.id)">删除</Button>
|
||||
<div style="margin-top: 20px">{{ goods.errorMessage }}</div>
|
||||
<Button type="primary" @click="delGoods(goods.goodsSku.id)"
|
||||
>删除</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
<!-- 底部支付栏 -->
|
||||
<div class="cart-goods-footer">
|
||||
<div>
|
||||
<div class="width_60">
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')">全选</Checkbox>
|
||||
<Checkbox
|
||||
v-model="allChecked"
|
||||
@on-change="changeChecked(allChecked, 'all')"
|
||||
>全选</Checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="width_100 handle-btn" @click="delGoods()">
|
||||
删除选中商品
|
||||
</div>
|
||||
<div class="width_100 handle-btn" @click="delGoods">删除选中商品</div>
|
||||
<!-- <div class="width_100 handle-btn" @click="collectGoods">移到我的收藏</div> -->
|
||||
<div class="width_100 handle-btn" @click="clearCart">清空购物车</div>
|
||||
<div class="width_100 handle-btn" @click="clearCart">
|
||||
清空购物车
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="selected-count">
|
||||
已选择<span>{{ checkedNum }}</span>件商品
|
||||
已选择<span>{{ checkedNum }}</span
|
||||
>件商品
|
||||
</div>
|
||||
<div class="ml_20 save-price">
|
||||
已节省<span>{{ priceDetailDTO.discountPrice | unitPrice("¥") }}</span>
|
||||
已节省<span>{{
|
||||
priceDetailDTO.discountPrice | unitPrice("¥")
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="ml_20 total-price">
|
||||
总价(不含运费):<div>{{ priceDetailDTO.flowPrice | unitPrice("¥") }}</div>
|
||||
总价(不含运费):
|
||||
<div>{{ priceDetailDTO.flowPrice | unitPrice("¥") }}</div>
|
||||
</div>
|
||||
<div class="pay ml_20" @click="pay">去结算</div>
|
||||
</div>
|
||||
@@ -142,141 +250,143 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Promotion from '@/components/goodsDetail/Promotion';
|
||||
import Search from '@/components/Search';
|
||||
import * as APICart from '@/api/cart';
|
||||
import * as APIMember from '@/api/member';
|
||||
import Promotion from "@/components/goodsDetail/Promotion";
|
||||
import Search from "@/components/Search";
|
||||
import * as APICart from "@/api/cart";
|
||||
import * as APIMember from "@/api/member";
|
||||
export default {
|
||||
name: 'Cart',
|
||||
beforeRouteEnter (to, from, next) {
|
||||
name: "Cart",
|
||||
beforeRouteEnter(to, from, next) {
|
||||
window.scrollTo(0, 0);
|
||||
next();
|
||||
},
|
||||
components: {
|
||||
Search,
|
||||
Promotion
|
||||
Promotion,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
couponAvailable: false, // 展示优惠券
|
||||
stepIndex: 0, // 当前处于哪一步,购物车==0,填写订单信息==1,成功提交订单==2
|
||||
goodsTotal: 1, // 商品数量
|
||||
goodsTotal: 0, // 商品数量
|
||||
checkedNum: 0, // 选中数量
|
||||
allChecked: false, // 全选
|
||||
loading: false, // 加载状态
|
||||
cartList: [], // 购物车列表
|
||||
couponList: [], // 优惠券列表
|
||||
priceDetailDTO: {}, // 价格明细
|
||||
skuList: [] // sku列表
|
||||
skuList: [], // sku列表
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 跳转商品详情
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 跳转店铺首页
|
||||
goShopPage (id) {
|
||||
goShopPage(id) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/Merchant',
|
||||
query: { id }
|
||||
path: "/Merchant",
|
||||
query: { id },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 收藏商品
|
||||
collectGoods (id) {
|
||||
collectGoods(id) {
|
||||
this.$Modal.confirm({
|
||||
title: '收藏',
|
||||
content: '<p>商品收藏后可在个人中心我的收藏查看</p>',
|
||||
title: "收藏",
|
||||
content: "<p>商品收藏后可在个人中心我的收藏查看</p>",
|
||||
onOk: () => {
|
||||
APIMember.collectGoods('GOODS', id).then((res) => {
|
||||
APIMember.collectGoods("GOODS", id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('收藏商品成功');
|
||||
this.$Message.success("收藏商品成功");
|
||||
this.getCartList();
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {}
|
||||
onCancel: () => {},
|
||||
});
|
||||
},
|
||||
// 删除商品
|
||||
delGoods (id) {
|
||||
delGoods(id) {
|
||||
const idArr = [];
|
||||
if (!id) {
|
||||
const list = this.cartList;
|
||||
list.forEach((shop) => {
|
||||
shop.skuList.forEach((goods) => {
|
||||
idArr.push(goods.goodsSku.id);
|
||||
if (goods.checked) {
|
||||
idArr.push(goods.goodsSku.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
idArr.push(id);
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: '删除',
|
||||
content: '<p>确定要删除该商品吗?</p>',
|
||||
title: "删除",
|
||||
content: "<p>确定要删除该商品吗?</p>",
|
||||
onOk: () => {
|
||||
APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功');
|
||||
this.$Message.success("删除成功");
|
||||
this.getCartList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 清空购物车
|
||||
clearCart () {
|
||||
clearCart() {
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
content: '<p>确定要清空购物车吗?清空后不可恢复</p>',
|
||||
title: "提示",
|
||||
content: "<p>确定要清空购物车吗?清空后不可恢复</p>",
|
||||
onOk: () => {
|
||||
APICart.clearCart().then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('清空购物车成功');
|
||||
this.$Message.success("清空购物车成功");
|
||||
this.getCartList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 跳转支付页面
|
||||
pay () {
|
||||
pay() {
|
||||
if (this.checkedNum) {
|
||||
this.$router.push({ path: '/pay', query: { way: 'CART' } });
|
||||
this.$router.push({ path: "/pay", query: { way: "CART" } });
|
||||
} else {
|
||||
this.$Message.warning('请至少选择一件商品');
|
||||
this.$Message.warning("请至少选择一件商品");
|
||||
}
|
||||
},
|
||||
// 展示优惠券
|
||||
showCoupon (storeId, index) {
|
||||
showCoupon(storeId, index) {
|
||||
this.couponAvailable = index;
|
||||
},
|
||||
// 设置购买数量
|
||||
changeNum (val, id) {
|
||||
console.log(val, id);
|
||||
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
|
||||
console.log(res);
|
||||
if (res.success) {
|
||||
this.getCartList();
|
||||
}
|
||||
});
|
||||
changeNum(val, id) {
|
||||
if (val) {
|
||||
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getCartList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 设置商品选中状态
|
||||
async changeChecked (status, type, id) {
|
||||
async changeChecked(status, type, id) {
|
||||
const check = status ? 1 : 0;
|
||||
if (type === 'all') {
|
||||
if (type === "all") {
|
||||
// 全选
|
||||
await APICart.setCheckedAll({ checked: check });
|
||||
} else if (type === 'shop') {
|
||||
} else if (type === "shop") {
|
||||
// 选中店铺所有商品
|
||||
await APICart.setCheckedSeller({ checked: check, storeId: id });
|
||||
} else {
|
||||
@@ -287,17 +397,17 @@ export default {
|
||||
this.getCartList();
|
||||
},
|
||||
// 领取优惠券
|
||||
async receiveShopCoupon (item) {
|
||||
async receiveShopCoupon(item) {
|
||||
let res = await APIMember.receiveCoupon(item.id);
|
||||
if (res.success) {
|
||||
this.$set(item, 'disabled', true);
|
||||
this.$Message.success('领取成功');
|
||||
this.$set(item, "disabled", true);
|
||||
this.$Message.success("领取成功");
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
},
|
||||
// 购物车列表
|
||||
async getCartList () {
|
||||
async getCartList() {
|
||||
this.loading = true;
|
||||
try {
|
||||
let res = await APICart.cartGoodsAll();
|
||||
@@ -326,15 +436,15 @@ export default {
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.getCartList();
|
||||
APICart.cartCount().then((res) => {
|
||||
// 购物车商品数量
|
||||
if (res.success) this.goodsTotal = res.result;
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -657,12 +767,12 @@ export default {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.cart-goods-footer > div{
|
||||
.cart-goods-footer > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.total-price{
|
||||
.total-price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ export default {
|
||||
list: [], // 优惠券列表
|
||||
total: 0, // 优惠券总数
|
||||
params: { // 请求参数
|
||||
getType: 'FREE',
|
||||
pageNumber: 1,
|
||||
pageSize: 20
|
||||
}
|
||||
@@ -95,11 +96,12 @@ export default {
|
||||
content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>',
|
||||
okText: '我的优惠券',
|
||||
cancelText: '立即使用',
|
||||
closable: true,
|
||||
onOk: () => {
|
||||
this.$router.push('/home/Coupons')
|
||||
},
|
||||
onCancel: () => {
|
||||
if (item.storeId !== 'platform') {
|
||||
if (item.storeId !== '0') {
|
||||
this.$router.push({path: '/merchant', query: {id: item.storeId}})
|
||||
} else {
|
||||
if (item.scopeType === 'PORTION_GOODS_CATEGORY') {
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
Copyright © {{year}} - Present
|
||||
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
|
||||
>lili-shop</a
|
||||
>{{config.title}}</a
|
||||
>
|
||||
版权所有
|
||||
</Row>
|
||||
@@ -108,6 +108,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import * as RegExp from '@/plugins/RegExp.js';
|
||||
import { md5 } from '@/plugins/md5.js';
|
||||
import * as apiLogin from '@/api/login.js';
|
||||
@@ -118,6 +119,7 @@ export default {
|
||||
components: { Verify },
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
loading: false, // 加载状态
|
||||
loading1: false, // 第二步加载状态
|
||||
formFirst: { // 手机验证码表单
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="background:#fff;">
|
||||
<div style="background: #fff">
|
||||
<BaseHeader></BaseHeader>
|
||||
<Search></Search>
|
||||
<drawer></drawer>
|
||||
@@ -8,24 +8,39 @@
|
||||
<div class="shop-nav-container">
|
||||
<Breadcrumb>
|
||||
<BreadcrumbItem to="/">首页</BreadcrumbItem>
|
||||
<BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">
|
||||
<BreadcrumbItem
|
||||
v-for="(item, index) in categoryBar"
|
||||
:to="goGoodsList(index)"
|
||||
target="_blank"
|
||||
:key="index"
|
||||
>
|
||||
{{ item.name }}
|
||||
</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
<div class="store-collect">
|
||||
<span class="mr_10" v-if="goodsMsg.data"><router-link
|
||||
:to="'Merchant?id=' + goodsMsg.data.storeId">{{ goodsMsg.data.storeName }}</router-link></span>
|
||||
<span @click="collect"><Icon type="ios-heart"
|
||||
:color="storeCollected ? '#ed3f14' : '#666'"/>
|
||||
{{storeCollected ? '已收藏店铺' : '收藏店铺'}}
|
||||
</span>
|
||||
<span @click="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon
|
||||
custom="icomoon icon-customer-service"/>联系客服</span>
|
||||
<span class="mr_10" v-if="goodsMsg.data">
|
||||
<router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{
|
||||
goodsMsg.data.storeName
|
||||
}}</router-link>
|
||||
</span>
|
||||
<span @click="collect">
|
||||
<Icon
|
||||
type="ios-heart"
|
||||
:color="storeCollected ? '#ed3f14' : '#666'"
|
||||
/>
|
||||
{{ storeCollected ? "已收藏店铺" : "收藏店铺" }}
|
||||
</span>
|
||||
<span class="ml_10" @click="IMService()">联系客服</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 商品信息展示 -->
|
||||
<ShowGoods v-if="goodsMsg.data" :detail="goodsMsg"></ShowGoods>
|
||||
<ShowGoods
|
||||
@handleClickSku="targetClickSku"
|
||||
v-if="goodsMsg.data"
|
||||
:detail="goodsMsg"
|
||||
></ShowGoods>
|
||||
<!-- 商品详细展示 -->
|
||||
<ShowGoodsDetail v-if="goodsMsg.data" :detail="goodsMsg"></ShowGoodsDetail>
|
||||
|
||||
@@ -35,128 +50,169 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Search from '@/components/Search';
|
||||
import ShopHeader from '@/components/header/ShopHeader';
|
||||
import ShowGoods from '@/components/goodsDetail/ShowGoods';
|
||||
import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
|
||||
import {goodsSkuDetail} from '@/api/goods';
|
||||
import {cancelCollect, collectGoods, isCollection, getGoodsDistribution} from '@/api/member';
|
||||
import {getDetailById} from '@/api/shopentry'
|
||||
|
||||
import Search from "@/components/Search";
|
||||
import ShopHeader from "@/components/header/ShopHeader";
|
||||
import ShowGoods from "@/components/goodsDetail/ShowGoods";
|
||||
import ShowGoodsDetail from "@/components/goodsDetail/ShowGoodsDetail";
|
||||
import { goodsSkuDetail } from "@/api/goods";
|
||||
import {
|
||||
cancelCollect,
|
||||
collectGoods,
|
||||
isCollection,
|
||||
getGoodsDistribution,
|
||||
} from "@/api/member";
|
||||
import { getDetailById } from "@/api/shopentry";
|
||||
import { getIMDetail } from "@/api/common";
|
||||
import Storage from "../plugins/storage";
|
||||
export default {
|
||||
name: 'GoodsDetail',
|
||||
beforeRouteEnter (to, from, next) {
|
||||
name: "GoodsDetail",
|
||||
beforeRouteEnter(to, from, next) {
|
||||
window.scrollTo(0, 0);
|
||||
next();
|
||||
},
|
||||
created () {
|
||||
created() {
|
||||
this.getGoodsDetail();
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
goodsMsg: {}, // 商品信息
|
||||
isLoading: false, // 加载状态
|
||||
categoryBar: [], // 分类
|
||||
storeCollected: false, // 商品收藏
|
||||
storeMsg: {} // 店铺信息
|
||||
storeMsg: {}, // 店铺信息
|
||||
IMLink: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 跳转im客服
|
||||
async IMService() {
|
||||
// 获取访问Token
|
||||
let accessToken = Storage.getItem("accessToken");
|
||||
await this.getIMDetailMethods();
|
||||
if (!accessToken) {
|
||||
this.$Message.error("请登录后再联系客服");
|
||||
return;
|
||||
}
|
||||
window.open(
|
||||
this.IMLink +
|
||||
"?token=" +
|
||||
accessToken +
|
||||
"&id=" +
|
||||
this.goodsMsg.data.storeId
|
||||
);
|
||||
},
|
||||
// 获取im信息
|
||||
async getIMDetailMethods() {
|
||||
let res = await getIMDetail();
|
||||
if (res.success) {
|
||||
this.IMLink = res.result;
|
||||
}
|
||||
},
|
||||
// 点击规格
|
||||
targetClickSku(val) {
|
||||
this.getGoodsDetail(val);
|
||||
},
|
||||
// 获取商品详情
|
||||
getGoodsDetail () {
|
||||
getGoodsDetail(val) {
|
||||
this.isLoading = true;
|
||||
const params = this.$route.query;
|
||||
const params = val || this.$route.query;
|
||||
|
||||
// 分销员id
|
||||
let distributionId = (params && params.distributionId) ? params.distributionId : this.Cookies.getItem('distributionId');
|
||||
let distributionId =
|
||||
params && params.distributionId
|
||||
? params.distributionId
|
||||
: this.Cookies.getItem("distributionId");
|
||||
// 如果有分销信息
|
||||
if (distributionId) {
|
||||
console.log(distributionId)
|
||||
console.log(distributionId);
|
||||
// 先存储
|
||||
this.Cookies.setItem('distributionId', params.distributionId)
|
||||
this.Cookies.setItem("distributionId", params.distributionId);
|
||||
let _this = this;
|
||||
// 绑定关系
|
||||
getGoodsDistribution(params.distributionId).then(res => {
|
||||
getGoodsDistribution(params.distributionId).then((res) => {
|
||||
// 绑定成功,则清除关系
|
||||
if (res.success) {
|
||||
_this.Cookies.removeItem('distributionId');
|
||||
_this.Cookies.removeItem("distributionId");
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
goodsSkuDetail(params).then((res) => {
|
||||
this.isLoading = false;
|
||||
if (res.success) {
|
||||
const result = res.result;
|
||||
const cateName = res.result.categoryName;
|
||||
const cateId = result.data.categoryPath.split(',');
|
||||
const cateArr = [];
|
||||
cateId.forEach((e, index) => { // 插入分类id和name
|
||||
cateArr.push({
|
||||
id: e,
|
||||
name: cateName[index]
|
||||
goodsSkuDetail(params)
|
||||
.then((res) => {
|
||||
this.isLoading = false;
|
||||
if (res.success) {
|
||||
const result = res.result;
|
||||
const cateName = res.result.categoryName;
|
||||
const cateId = result.data.categoryPath.split(",");
|
||||
const cateArr = [];
|
||||
cateId.forEach((e, index) => {
|
||||
// 插入分类id和name
|
||||
cateArr.push({
|
||||
id: e,
|
||||
name: cateName[index],
|
||||
});
|
||||
});
|
||||
});
|
||||
this.categoryBar = cateArr;
|
||||
this.goodsMsg = res.result;
|
||||
// 判断是否收藏
|
||||
if (this.Cookies.getItem('userInfo')) {
|
||||
isCollection('STORE', this.goodsMsg.data.storeId).then(res => {
|
||||
if (res.success && res.result) {
|
||||
this.storeCollected = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取店铺信息
|
||||
getDetailById(this.goodsMsg.data.storeId).then(res => {
|
||||
if (res.success) {
|
||||
this.storeMsg = res.result
|
||||
this.categoryBar = cateArr;
|
||||
this.$set(this, "goodsMsg", res.result);
|
||||
// 判断是否收藏
|
||||
if (this.Cookies.getItem("userInfo")) {
|
||||
isCollection("STORE", this.goodsMsg.data.storeId).then((res) => {
|
||||
if (res.success && res.result) {
|
||||
this.storeCollected = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$Message.error(res.message)
|
||||
this.$router.push('/')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$router.push('/')
|
||||
});
|
||||
if (!this.storeMsg) {
|
||||
// 获取店铺信息
|
||||
getDetailById(this.goodsMsg.data.storeId).then((res) => {
|
||||
if (res.success) {
|
||||
this.storeMsg = res.result;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
this.$router.push("/");
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$router.push("/");
|
||||
});
|
||||
},
|
||||
goGoodsList (currIndex) { // 跳转商品列表
|
||||
const arr = []
|
||||
goGoodsList(currIndex) {
|
||||
// 跳转商品列表
|
||||
const arr = [];
|
||||
this.categoryBar.forEach((e, index) => {
|
||||
if (index <= currIndex) {
|
||||
arr.push(e.id)
|
||||
arr.push(e.id);
|
||||
}
|
||||
})
|
||||
return location.origin + '/goodsList?categoryId=' + arr.toString()
|
||||
});
|
||||
return location.origin + "/goodsList?categoryId=" + arr.toString();
|
||||
},
|
||||
async collect () { // 收藏店铺
|
||||
async collect() {
|
||||
// 收藏店铺
|
||||
if (this.storeCollected) {
|
||||
let cancel = await cancelCollect('STORE', this.goodsMsg.data.storeId)
|
||||
let cancel = await cancelCollect("STORE", this.goodsMsg.data.storeId);
|
||||
if (cancel.success) {
|
||||
this.$Message.success('已取消收藏')
|
||||
this.$Message.success("已取消收藏");
|
||||
this.storeCollected = false;
|
||||
}
|
||||
} else {
|
||||
let collect = await collectGoods('STORE', this.goodsMsg.data.storeId);
|
||||
let collect = await collectGoods("STORE", this.goodsMsg.data.storeId);
|
||||
if (collect.code === 200) {
|
||||
this.storeCollected = true;
|
||||
this.$Message.success('收藏店铺成功,可以前往个人中心我的收藏查看');
|
||||
this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$route.query.skuId': function (val) {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
components: {
|
||||
Search,
|
||||
ShopHeader,
|
||||
ShowGoods,
|
||||
ShowGoodsDetail
|
||||
}
|
||||
ShowGoodsDetail,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -62,6 +62,13 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="goods-show-detail">
|
||||
<Tag
|
||||
v-if="item.content.salesModel === 'WHOLESALE'"
|
||||
class="goods-show-tag"
|
||||
color="purple"
|
||||
>
|
||||
批发
|
||||
</Tag>
|
||||
<span>{{ item.content.goodsName }}</span>
|
||||
</div>
|
||||
<div class="goods-show-num">
|
||||
@@ -69,7 +76,32 @@
|
||||
>人评价
|
||||
</div>
|
||||
<div class="goods-show-seller">
|
||||
<Tag v-if="item.content.selfOperated" style="padding:0 4px;" size="default" color="error">自营</Tag><span>{{ item.content.storeName }}</span>
|
||||
<Tag
|
||||
class="goods-show-buyer"
|
||||
v-if="item.content.selfOperated"
|
||||
size="default"
|
||||
color="error"
|
||||
>自营
|
||||
</Tag>
|
||||
<div class="goods-show-right">
|
||||
<div
|
||||
class="goods-show-middle"
|
||||
v-if="goodsListType.content.goodsType == 'VIRTUAL_GOODS'"
|
||||
>
|
||||
虚拟
|
||||
</div>
|
||||
<div
|
||||
class="goods-show-middle"
|
||||
v-else-if="
|
||||
goodsListType.content.goodsType == 'PHYSICAL_GOODS'
|
||||
"
|
||||
>
|
||||
实物
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-bottom" style="color: #e4393c">{{
|
||||
item.content.storeName
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,127 +124,171 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GoodsClassNav from '@/components/nav/GoodsClassNav';
|
||||
import * as apiGoods from '@/api/goods';
|
||||
import GoodsClassNav from "@/components/nav/GoodsClassNav";
|
||||
import * as apiGoods from "@/api/goods";
|
||||
export default {
|
||||
name: 'GoodsList',
|
||||
beforeRouteEnter (to, from, next) {
|
||||
name: "GoodsList",
|
||||
beforeRouteEnter(to, from, next) {
|
||||
window.scrollTo(0, 0);
|
||||
next();
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
sortIndex: 0, // 排序状态
|
||||
sortPriceIndex: false, // 判断价格升序还是降序
|
||||
goodsTool: [ // 排序类型
|
||||
{ title: '综合', en: '' },
|
||||
{ title: '销量', en: 'buyCount' },
|
||||
{ title: '评论数', en: 'commentNum' },
|
||||
{ title: '新品', en: 'releaseTime' }
|
||||
goodsTool: [
|
||||
// 排序类型
|
||||
{ title: "综合", en: "" },
|
||||
{ title: "销量", en: "buyCount" },
|
||||
{ title: "评论数", en: "commentNum" },
|
||||
{ title: "新品", en: "releaseTime" },
|
||||
],
|
||||
goodsList: [], // 商品列表
|
||||
loading: false, // 加载状态
|
||||
goodsListType: "",
|
||||
total: 0, // 列表总数
|
||||
params: { // 请求参数
|
||||
params: {
|
||||
// 请求参数
|
||||
pageNumber: 0,
|
||||
pageSize: 20,
|
||||
categoryId: ''
|
||||
}
|
||||
categoryId: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route () {
|
||||
const keyword = this.$route.query.keyword
|
||||
this.handleSearch(keyword)
|
||||
}
|
||||
$route() {
|
||||
const keyword = this.$route.query.keyword;
|
||||
this.handleSearch(keyword);
|
||||
if (this.$route.query.categoryId) {
|
||||
let cateId = this.$route.query.categoryId.split(",");
|
||||
Object.assign(this.params, this.$route.query);
|
||||
this.params.categoryId = cateId[cateId.length - 1];
|
||||
this.getGoodsList();
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
handleSearch (key) {
|
||||
this.params.keyword = key
|
||||
this.params.pageNumber = 0
|
||||
this.getGoodsList()
|
||||
handleSearch(key) {
|
||||
this.params.keyword = key;
|
||||
this.params.pageNumber = 0;
|
||||
this.getGoodsList();
|
||||
},
|
||||
orderBy (data, index) {
|
||||
orderBy(data, index) {
|
||||
// 排序
|
||||
this.sortIndex = index;
|
||||
this.params.sort = data;
|
||||
this.params.order = 'desc';
|
||||
if (data === 'price') {
|
||||
this.params.order = "desc";
|
||||
if (data === "price") {
|
||||
if (!this.sortPriceIndex) {
|
||||
this.sortPriceIndex = 'asc';
|
||||
this.sortPriceIndex = "asc";
|
||||
} else {
|
||||
this.sortPriceIndex === 'desc' ? (this.sortPriceIndex = 'asc') : (this.sortPriceIndex = 'desc');
|
||||
this.sortPriceIndex === "desc"
|
||||
? (this.sortPriceIndex = "asc")
|
||||
: (this.sortPriceIndex = "desc");
|
||||
}
|
||||
this.params.order = this.sortPriceIndex
|
||||
this.params.order = this.sortPriceIndex;
|
||||
} else {
|
||||
this.sortPriceIndex = false
|
||||
this.sortPriceIndex = false;
|
||||
}
|
||||
this.getGoodsList();
|
||||
},
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 分页 修改页码
|
||||
changePageNum (val) {
|
||||
changePageNum(val) {
|
||||
this.params.pageNumber = val;
|
||||
this.getGoodsList();
|
||||
},
|
||||
// 分页 修改页数
|
||||
changePageSize (val) {
|
||||
changePageSize(val) {
|
||||
this.params.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getGoodsList();
|
||||
},
|
||||
|
||||
// 获取商品列表
|
||||
getGoodsList () {
|
||||
getGoodsList() {
|
||||
this.loading = true;
|
||||
apiGoods.goodsList(this.params)
|
||||
apiGoods
|
||||
.goodsList(this.params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.goodsList = res.result.content;
|
||||
this.total = res.result.totalElements;
|
||||
for (var i = 0; i < this.goodsList.length; i++) {
|
||||
this.goodsListType = this.goodsList[i];
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getParams (val) {
|
||||
getParams(val) {
|
||||
// 筛选条件回显
|
||||
Object.assign(this.params, val)
|
||||
this.getGoodsList()
|
||||
}
|
||||
Object.assign(this.params, val);
|
||||
this.getGoodsList();
|
||||
},
|
||||
},
|
||||
created () {
|
||||
created() {
|
||||
if (this.$route.query.categoryId) {
|
||||
let cateId = this.$route.query.categoryId.split(',')
|
||||
Object.assign(this.params, this.$route.query)
|
||||
this.params.categoryId = cateId[cateId.length - 1]
|
||||
let cateId = this.$route.query.categoryId.split(",");
|
||||
Object.assign(this.params, this.$route.query);
|
||||
this.params.categoryId = cateId[cateId.length - 1];
|
||||
} else {
|
||||
Object.assign(this.params, this.$route.query)
|
||||
Object.assign(this.params, this.$route.query);
|
||||
}
|
||||
this.getGoodsList()
|
||||
this.getGoodsList();
|
||||
},
|
||||
components: {
|
||||
GoodsClassNav
|
||||
}
|
||||
GoodsClassNav,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '../assets/styles/goodsList.scss';
|
||||
@import "../assets/styles/goodsList.scss";
|
||||
.goods-show-info > .goods-show-seller > .goods-show-buyer {
|
||||
height: 16px;
|
||||
width: 30px;
|
||||
white-space: nowrap;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
padding: 0 3px;
|
||||
background-color: #e23a3a;
|
||||
}
|
||||
|
||||
.goods-show-tag {
|
||||
height: 18px;
|
||||
width: 32px;
|
||||
line-height: 14px;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
.goods-show-seller {
|
||||
// padding:3px 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.container {
|
||||
margin: 15px auto;
|
||||
width: 1200px;
|
||||
min-width: 1000px;
|
||||
position: relative;
|
||||
}
|
||||
.price-sort:hover {
|
||||
color: #e23a3a;
|
||||
}
|
||||
.goods-box {
|
||||
display: flex;
|
||||
}
|
||||
@@ -221,6 +297,28 @@ export default {
|
||||
width: 200px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.goods-show-right {
|
||||
width: 35px;
|
||||
height: 17px;
|
||||
// vertical-align:middle;
|
||||
overflow: hidden;
|
||||
margin-top: 1.5px;
|
||||
margin-right: 5px;
|
||||
line-height: 16px;
|
||||
background: white;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 5px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
border: 1px solid rgba(112, 123, 187, 0.8);
|
||||
color: rgba(112, 123, 187, 0.8);
|
||||
}
|
||||
.goods-show-middle:hover {
|
||||
color: rgba(2, 15, 88, 0.6);
|
||||
border: 0.2px solid rgba(0, 13, 87, 0.6);
|
||||
border-radius: 4px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.item-as-title {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
@@ -235,7 +333,7 @@ export default {
|
||||
float: right;
|
||||
margin-right: 15px;
|
||||
font-size: 10px;
|
||||
color: #ccc;
|
||||
color: rgb(204, 204, 204);
|
||||
}
|
||||
.item-as {
|
||||
width: 160px;
|
||||
@@ -284,6 +382,7 @@ export default {
|
||||
display: block;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.price-sort {
|
||||
span {
|
||||
display: inline-block;
|
||||
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
methods: {
|
||||
getIndexData () {
|
||||
// 获取首页装修数据
|
||||
indexData({ clientType: 'PC' }).then((res) => {
|
||||
indexData({ clientType: 'PC' }).then(async (res) => {
|
||||
if (res.success) {
|
||||
let dataJson = JSON.parse(res.result.pageData);
|
||||
// 秒杀活动不是装修的数据,需要调用接口判断是否有秒杀商品
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
this.carouselLarge = true
|
||||
this.carouselOpacity = true
|
||||
} else if (type === 'seckill') {
|
||||
let seckill = this.getListByDay()
|
||||
let seckill = await this.getListByDay()
|
||||
dataJson.list[i].options.list = seckill
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 3000;
|
||||
z-index: 9999;
|
||||
box-shadow:0 0 10px 2px rgb(90 90 90 / 60%);
|
||||
transition: 0.35s;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Carousel loop :autoplay-speed="5000" class="login-carousel" arrow="never">
|
||||
<CarouselItem>
|
||||
<div class="demo-carousel" @click='$refs.verify.show = false'>
|
||||
<img src="https://wanmi-b2b.oss-cn-shanghai.aliyuncs.com/201811141632252680" />
|
||||
<img src="https://lili-system.oss-cn-beijing.aliyuncs.com/background.jpg" />
|
||||
</div>
|
||||
</CarouselItem>
|
||||
</Carousel>
|
||||
@@ -21,69 +21,119 @@
|
||||
<div class="form-box" @click='$refs.verify.show = false'>
|
||||
<div class="account-number">
|
||||
<div class="tab-switch">
|
||||
<span>{{type?'账号登录':'验证码登录'}}</span>
|
||||
<span @click="type = !type">{{type?'验证码登录':'账号登录'}}</span>
|
||||
<span>{{ type ? '账号登录' : '验证码登录' }}</span>
|
||||
<span @click="type = !type,scannerCodeLoginFLag=false">{{ type ? '验证码登录' : '账号登录' }}</span>
|
||||
</div>
|
||||
<div @click="$router.push('signUp')">立即注册</div>
|
||||
<!---->
|
||||
<div @click="scannerCodeLoginFLag=!scannerCodeLoginFLag">{{!scannerCodeLoginFLag ? '扫码登录' : '返回'}}</div>
|
||||
</div>
|
||||
<!-- 账号密码登录 -->
|
||||
<Form ref="formInline" :model="formData" :rules="ruleInline" v-show="type === true"
|
||||
@click.self='$refs.verify.show = false'>
|
||||
<FormItem prop="username">
|
||||
<i-input type="text" v-model="formData.username" clearable placeholder="用户名">
|
||||
<Icon type="md-person" slot="prepend"></Icon>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem prop="password">
|
||||
<i-input type="password" v-model="formData.password" clearable placeholder="密码">
|
||||
<Icon type="md-lock" slot="prepend"> </Icon>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="error" @click.stop="handleSubmit('formInline')" long>登录</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<!-- 验证码登录 -->
|
||||
<Form ref="formSms" :model="formSms" :rules="ruleInline" v-show="type === false"
|
||||
@click.self='$refs.verify.show = false'>
|
||||
<FormItem prop="mobile">
|
||||
<i-input type="text" v-model="formSms.mobile" clearable placeholder="手机号">
|
||||
<Icon type="md-lock" slot="prepend"></Icon>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem prop="code">
|
||||
<i-input type="text" v-model="formSms.code" placeholder="手机验证码">
|
||||
<Icon type="ios-text-outline" style="font-weight: bold" slot="prepend" />
|
||||
<Button slot="append" @click="sendCode">{{ codeMsg }}</Button>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button @click.stop="verifyBtnClick" long
|
||||
:type="verifyStatus?'success':'default'">{{verifyStatus?'验证通过':'点击完成安全验证'}}</Button>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="error" @click="handleSubmit('formSms')" long>登录</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div class="regist">
|
||||
<span @click="$router.push('forgetPassword')">忘记密码</span>
|
||||
</div>
|
||||
<div class="other-login">
|
||||
<svg t="1631154795933" class="icon" @click="handleWebLogin('QQ')" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="4969" width="32" height="32">
|
||||
<path
|
||||
d="M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z"
|
||||
p-id="4970" fill="#1296db"></path>
|
||||
</svg>
|
||||
<svg t="1631154766336" class="icon" @click="handleWebLogin('WECHAT_PC')" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="3844" width="32" height="32">
|
||||
<path
|
||||
d="M683.058 364.695c11 0 22 1.016 32.943 1.976C686.564 230.064 538.896 128 370.681 128c-188.104 0.66-342.237 127.793-342.237 289.226 0 93.068 51.379 169.827 136.725 229.256L130.72 748.43l119.796-59.368c42.918 8.395 77.37 16.79 119.742 16.79 11 0 21.46-0.48 31.914-1.442a259.168 259.168 0 0 1-10.455-71.358c0.485-148.002 128.744-268.297 291.403-268.297l-0.06-0.06z m-184.113-91.992c25.99 0 42.913 16.79 42.913 42.575 0 25.188-16.923 42.579-42.913 42.579-25.45 0-51.38-16.85-51.38-42.58 0-25.784 25.93-42.574 51.38-42.574z m-239.544 85.154c-25.384 0-51.374-16.85-51.374-42.58 0-25.784 25.99-42.574 51.374-42.574 25.45 0 42.918 16.79 42.918 42.575 0 25.188-16.924 42.579-42.918 42.579z m736.155 271.655c0-135.647-136.725-246.527-290.983-246.527-162.655 0-290.918 110.88-290.918 246.527 0 136.128 128.263 246.587 290.918 246.587 33.972 0 68.423-8.395 102.818-16.85l93.809 50.973-25.93-84.677c68.907-51.93 120.286-119.815 120.286-196.033z m-385.275-42.58c-16.923 0-34.452-16.79-34.452-34.179 0-16.79 17.529-34.18 34.452-34.18 25.99 0 42.918 16.85 42.918 34.18 0 17.39-16.928 34.18-42.918 34.18z m188.165 0c-16.984 0-33.972-16.79-33.972-34.179 0-16.79 16.927-34.18 33.972-34.18 25.93 0 42.913 16.85 42.913 34.18 0 17.39-16.983 34.18-42.913 34.18z"
|
||||
fill="#09BB07" p-id="3845"></path>
|
||||
</svg>
|
||||
<!--扫码登录-->
|
||||
<div v-show="scannerCodeLoginFLag">
|
||||
<div class="qr-container">
|
||||
<div class='qr-shadow flex' v-show="qrCodeStatus == 'fail'">
|
||||
<span>
|
||||
二维码已失效
|
||||
</span>
|
||||
<Button size='small' @click="createPCLoginSession">刷新二维码</Button>
|
||||
</div>
|
||||
<vue-qr
|
||||
:text="qrCode"
|
||||
:margin="0"
|
||||
colorDark="#000"
|
||||
colorLight="#fff"
|
||||
:size="150"
|
||||
></vue-qr>
|
||||
</div>
|
||||
<div class="drag-area">
|
||||
<!-- 等待扫码-->
|
||||
<div v-if="scannerCodeLoginStatus === 0" class="pending-scan">
|
||||
<p>打开手机App/小程序,扫码登录</p>
|
||||
</div>
|
||||
<!-- 已经扫码-->
|
||||
<div v-else-if="scannerCodeLoginStatus === 1" class="scanned">
|
||||
<p>扫码成功,等待确认</p>
|
||||
</div>
|
||||
|
||||
<!-- 存在session,等待发送给客户端验证-->
|
||||
<div v-if="scannerCodeLoginStatus === 2" class="scanned">
|
||||
<p>登录成功,正在页面跳转</p>
|
||||
</div>
|
||||
|
||||
<!-- 已经发送登录请求-->
|
||||
<div v-else-if="scannerCodeLoginStatus === 3" class="quick-logining">
|
||||
<p>取消登录</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div v-show="!scannerCodeLoginFLag">
|
||||
<!-- 账号密码登录 -->
|
||||
<Form ref="formInline" :model="formData" :rules="ruleInline" v-show="type === true"
|
||||
@click.self='$refs.verify.show = false'>
|
||||
<FormItem prop="username">
|
||||
<i-input type="text" v-model="formData.username" clearable placeholder="用户名">
|
||||
<Icon type="md-person" slot="prepend"></Icon>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem prop="password">
|
||||
<i-input type="password" v-model="formData.password" clearable placeholder="密码">
|
||||
<Icon type="md-lock" slot="prepend"></Icon>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="error" @click.stop="handleSubmit('formInline')" long>登录</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<!-- 验证码登录 -->
|
||||
<Form ref="formSms" :model="formSms" :rules="ruleInline" v-show="type === false"
|
||||
@click.self='$refs.verify.show = false'>
|
||||
<FormItem prop="mobile">
|
||||
<i-input type="text" v-model="formSms.mobile" clearable placeholder="手机号">
|
||||
<Icon type="md-lock" slot="prepend"></Icon>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem prop="code">
|
||||
<i-input type="text" v-model="formSms.code" placeholder="手机验证码">
|
||||
<Icon type="ios-text-outline" style="font-weight: bold" slot="prepend"/>
|
||||
<Button slot="append" @click="sendCode">{{ codeMsg }}</Button>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button @click.stop="verifyBtnClick" long
|
||||
:type="verifyStatus?'success':'default'">{{ verifyStatus ? '验证通过' : '点击完成安全验证' }}
|
||||
</Button>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="error" @click="handleSubmit('formSms')" long>登录</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</div>
|
||||
<div class="other">
|
||||
<div class="other-login">
|
||||
<svg t="1631154795933" class="icon" @click="handleWebLogin('QQ')" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="4969" width="32" height="32">
|
||||
<path
|
||||
d="M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z"
|
||||
p-id="4970" fill="#1296db"></path>
|
||||
</svg>
|
||||
<svg t="1631154766336" class="icon" @click="handleWebLogin('WECHAT_PC')" viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="3844" width="32" height="32">
|
||||
<path
|
||||
d="M683.058 364.695c11 0 22 1.016 32.943 1.976C686.564 230.064 538.896 128 370.681 128c-188.104 0.66-342.237 127.793-342.237 289.226 0 93.068 51.379 169.827 136.725 229.256L130.72 748.43l119.796-59.368c42.918 8.395 77.37 16.79 119.742 16.79 11 0 21.46-0.48 31.914-1.442a259.168 259.168 0 0 1-10.455-71.358c0.485-148.002 128.744-268.297 291.403-268.297l-0.06-0.06z m-184.113-91.992c25.99 0 42.913 16.79 42.913 42.575 0 25.188-16.923 42.579-42.913 42.579-25.45 0-51.38-16.85-51.38-42.58 0-25.784 25.93-42.574 51.38-42.574z m-239.544 85.154c-25.384 0-51.374-16.85-51.374-42.58 0-25.784 25.99-42.574 51.374-42.574 25.45 0 42.918 16.79 42.918 42.575 0 25.188-16.924 42.579-42.918 42.579z m736.155 271.655c0-135.647-136.725-246.527-290.983-246.527-162.655 0-290.918 110.88-290.918 246.527 0 136.128 128.263 246.587 290.918 246.587 33.972 0 68.423-8.395 102.818-16.85l93.809 50.973-25.93-84.677c68.907-51.93 120.286-119.815 120.286-196.033z m-385.275-42.58c-16.923 0-34.452-16.79-34.452-34.179 0-16.79 17.529-34.18 34.452-34.18 25.99 0 42.918 16.85 42.918 34.18 0 17.39-16.928 34.18-42.918 34.18z m188.165 0c-16.984 0-33.972-16.79-33.972-34.179 0-16.79 16.927-34.18 33.972-34.18 25.93 0 42.913 16.85 42.913 34.18 0 17.39-16.983 34.18-42.913 34.18z"
|
||||
fill="#09BB07" p-id="3845"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="register">
|
||||
<span style="color:red" @click="$router.push('signUp')">还没有账号?点击立即注册</span>
|
||||
<span @click="$router.push('forgetPassword')">忘记密码</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 拼图验证码 -->
|
||||
<verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify>
|
||||
</div>
|
||||
@@ -95,7 +145,7 @@
|
||||
</Row>
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
Copyright © {{year}} - Present
|
||||
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
|
||||
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">{{config.title}}</a>
|
||||
版权所有
|
||||
</Row>
|
||||
</div>
|
||||
@@ -103,21 +153,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import * as RegExp from "@/plugins/RegExp.js";
|
||||
import { md5 } from "@/plugins/md5.js";
|
||||
import * as apiLogin from "@/api/login.js";
|
||||
import { sendSms } from "@/api/common.js";
|
||||
import { webLogin, loginCallback } from "@/api/login.js";
|
||||
import { webLogin, loginCallback,sCLogin,getSCLoginCode} from "@/api/login.js";
|
||||
import storage from "@/plugins/storage.js";
|
||||
import verify from "@/components/verify";
|
||||
import vueQr from "vue-qr";
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
components: {
|
||||
verify,
|
||||
vueQr
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
qrCodeStatus:"success", //
|
||||
qrCode: '',
|
||||
qrSessionToken:'',
|
||||
//是否是二维码登录
|
||||
scannerCodeLoginFLag: false,
|
||||
scannerCodeLoginStatus: 0,
|
||||
qrCodeTimer:null,
|
||||
config: require('@/config'),
|
||||
type: true, // true 账号登录 false 验证码登录
|
||||
formData: {
|
||||
// 登录表单
|
||||
@@ -132,19 +193,19 @@ export default {
|
||||
verifyStatus: false, // 是否图片验证通过
|
||||
ruleInline: {
|
||||
// 验证规则
|
||||
username: [{ required: true, message: "请输入用户名" }],
|
||||
username: [{required: true, message: "请输入用户名"}],
|
||||
password: [
|
||||
{ required: true, message: "请输入密码" },
|
||||
{ type: "string", min: 6, message: "密码不能少于6位" },
|
||||
{required: true, message: "请输入密码"},
|
||||
{type: "string", min: 6, message: "密码不能少于6位"},
|
||||
],
|
||||
mobile: [
|
||||
{ required: true, message: "请输入手机号码" },
|
||||
{required: true, message: "请输入手机号码"},
|
||||
{
|
||||
pattern: RegExp.mobile,
|
||||
message: "请输入正确的手机号",
|
||||
},
|
||||
],
|
||||
code: [{ required: true, message: "请输入手机验证码" }],
|
||||
code: [{required: true, message: "请输入手机验证码"}],
|
||||
},
|
||||
codeMsg: "发送验证码", // 验证码文字
|
||||
interval: null, // 定时器
|
||||
@@ -152,7 +213,14 @@ export default {
|
||||
year: new Date().getFullYear(),
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
|
||||
scannerCodeLoginFLag(val){
|
||||
!val ? this.clearInterval() : ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 登录
|
||||
handleSubmit(name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
@@ -239,24 +307,7 @@ export default {
|
||||
.login(data)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("登录成功");
|
||||
storage.setItem("accessToken", res.result.accessToken);
|
||||
storage.setItem("refreshToken", res.result.refreshToken);
|
||||
apiLogin.getMemberMsg().then((res) => {
|
||||
this.$Spin.hide();
|
||||
if (res.success) {
|
||||
storage.setItem("userInfo", res.result);
|
||||
let query = this.$route.query;
|
||||
if (query.rePath) {
|
||||
this.$router.push({
|
||||
path: query.rePath,
|
||||
query: JSON.parse(query.query),
|
||||
});
|
||||
} else {
|
||||
this.$router.push("/");
|
||||
}
|
||||
}
|
||||
});
|
||||
this.loginSuccess(res.result.accessToken,res.result.refreshToken);
|
||||
} else {
|
||||
this.$Spin.hide();
|
||||
this.$Message.error(res.message);
|
||||
@@ -280,6 +331,89 @@ export default {
|
||||
// 第三方登录
|
||||
webLogin(type);
|
||||
},
|
||||
loginSuccess(accessToken,refreshToken){
|
||||
this.$Message.success("登录成功");
|
||||
storage.setItem("accessToken", accessToken);
|
||||
storage.setItem("refreshToken", refreshToken);
|
||||
apiLogin.getMemberMsg().then((res) => {
|
||||
this.$Spin.hide();
|
||||
if (res.success) {
|
||||
storage.setItem("userInfo", res.result);
|
||||
let query = this.$route.query;
|
||||
if (query.rePath) {
|
||||
this.$router.push({
|
||||
path: query.rePath,
|
||||
query: JSON.parse(query.query),
|
||||
});
|
||||
} else {
|
||||
this.$router.push("/");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
async createPCLoginSession() {
|
||||
getSCLoginCode({}).then(response=>{
|
||||
this.clearQRLoginInfo();
|
||||
if (response.code == 200) {
|
||||
this.qrCodeStatus = 'success'
|
||||
let session = response.result;
|
||||
this.qrSessionToken = session.token;
|
||||
if (session.status === 0) {
|
||||
this.qrCode = session.token;
|
||||
this.refreshQrCode();
|
||||
}
|
||||
this.qrLogin();
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
async refreshQrCode() {
|
||||
if (!this.qrCodeTimer) {
|
||||
this.qrCodeTimer = setInterval(() => {
|
||||
|
||||
this.qrCodeStatus = 'fail' // 如果过期将二维码转为失效状态
|
||||
}, 10 * 1000);
|
||||
}
|
||||
},
|
||||
|
||||
clearQRLoginInfo(){
|
||||
this.scannerCodeLoginStatus=0;
|
||||
this.qrSessionToken='';
|
||||
if (this.qrCodeTimer) {
|
||||
clearInterval(this.qrCodeTimer)
|
||||
}
|
||||
this.qrCodeTimer= null;
|
||||
},
|
||||
|
||||
async qrLogin() {
|
||||
if(!this.qrSessionToken) return;
|
||||
sCLogin(this.qrSessionToken,{beforeSessionStatus:this.scannerCodeLoginStatus}).then(response=>{
|
||||
if (response.success) {
|
||||
this.scannerCodeLoginStatus = response.result.status;
|
||||
switch (response.result.status) {
|
||||
case 0:
|
||||
case 1:
|
||||
this.qrLogin();break;
|
||||
case 2:
|
||||
this.loginSuccess(response.result.token.accessToken,response.result.token.refreshToken);
|
||||
break;
|
||||
case 3:
|
||||
this.createPCLoginSession();
|
||||
break;
|
||||
default:
|
||||
this.clearQRLoginInfo();
|
||||
break
|
||||
}
|
||||
} else{
|
||||
this.clearQRLoginInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
this.clearQRLoginInfo();
|
||||
},
|
||||
mounted() {
|
||||
let uuid = this.$route.query.state;
|
||||
@@ -287,28 +421,21 @@ export default {
|
||||
storage.setItem("uuid", uuid);
|
||||
loginCallback(uuid).then((res) => {
|
||||
if (res.success) {
|
||||
const result = res.result;
|
||||
storage.setItem("accessToken", result.accessToken);
|
||||
storage.setItem("refreshToken", result.refreshToken);
|
||||
apiLogin.getMemberMsg().then((res) => {
|
||||
if (res.success) {
|
||||
storage.setItem("userInfo", res.result);
|
||||
let query = this.$route.query;
|
||||
if (query.rePath) {
|
||||
this.$router.push({
|
||||
path: query.rePath,
|
||||
query: JSON.parse(query.query),
|
||||
});
|
||||
} else {
|
||||
this.$router.push("/");
|
||||
}
|
||||
}
|
||||
});
|
||||
this.loginSuccess(res.result.accessToken,res.result.refreshToken);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
scannerCodeLoginFLag(v){
|
||||
if(v){
|
||||
this.createPCLoginSession();
|
||||
console.log("二维码登录");
|
||||
}else{
|
||||
console.log("取消二维码登录");
|
||||
this.clearQRLoginInfo();
|
||||
}
|
||||
},
|
||||
type(v) {
|
||||
if (v) {
|
||||
this.$refs.formInline.resetFields();
|
||||
@@ -325,10 +452,43 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.drag-area{
|
||||
margin: 10px 0;
|
||||
}
|
||||
.login {
|
||||
height: 100%;
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
.other{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.qr-container{
|
||||
text-align: center;
|
||||
margin: 20px 0;
|
||||
position: relative;
|
||||
>.qr-shadow{
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -75px;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
color: #fff;
|
||||
>span{
|
||||
margin-bottom: 20px;
|
||||
font-size: 13px;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.top-content {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
@@ -345,19 +505,35 @@ export default {
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
width: 150px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div {
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.pending-scan{
|
||||
text-align: center;
|
||||
color:black;
|
||||
}
|
||||
.scanned{
|
||||
text-align: center;
|
||||
color:green;
|
||||
}
|
||||
.quick-logining{
|
||||
text-align: center;
|
||||
color:red;
|
||||
}
|
||||
|
||||
.login-carousel {
|
||||
width: 100%;
|
||||
height: 550px;
|
||||
|
||||
.demo-carousel {
|
||||
height: 550px;
|
||||
width: inherit;
|
||||
@@ -380,15 +556,18 @@ export default {
|
||||
right: 15%;
|
||||
padding: 20px;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
|
||||
.account-number {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
font-weight: bold;
|
||||
|
||||
> div:nth-child(2) {
|
||||
color: $theme_color;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tab-switch {
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
@@ -402,6 +581,7 @@ export default {
|
||||
span:nth-child(2) {
|
||||
cursor: pointer;
|
||||
padding-left: 10px;
|
||||
|
||||
&:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
@@ -418,7 +598,7 @@ export default {
|
||||
}
|
||||
|
||||
.other-login {
|
||||
margin: 0 auto;
|
||||
|
||||
> svg {
|
||||
cursor: pointer;
|
||||
width: 24px;
|
||||
@@ -426,18 +606,22 @@ export default {
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
.regist {
|
||||
|
||||
.register {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
margin-top: -10px;
|
||||
|
||||
span {
|
||||
margin-left: 10px;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.foot {
|
||||
position: fixed;
|
||||
bottom: 4vh;
|
||||
@@ -445,19 +629,24 @@ export default {
|
||||
left: calc(50% - 184px);
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 14px;
|
||||
|
||||
.help {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 1vh;
|
||||
width: 60%;
|
||||
|
||||
.item {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
:hover {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon-hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,108 +1,207 @@
|
||||
<template>
|
||||
<div class="merchant">
|
||||
<BaseHeader />
|
||||
<!-- 搜索栏 -->
|
||||
<Search :store="true" @search="search"></Search>
|
||||
<!-- 店铺logo -->
|
||||
<div class="shop-logo">
|
||||
<div>
|
||||
<img :src="storeMsg.storeLogo" height="80" alt="">
|
||||
<BaseHeader/>
|
||||
<!-- 搜索栏 -->
|
||||
<Search :store="true" @search="search"></Search>
|
||||
<!-- 店铺logo -->
|
||||
<div class="shop-logo">
|
||||
<div>
|
||||
<p>{{storeMsg.storeName || 'xx店铺'}}</p>
|
||||
<p class="ellipsis" :alt="storeMsg.storeDesc" v-html="storeMsg.storeDesc"></p>
|
||||
</div>
|
||||
<div>
|
||||
<span class="hover-pointer" @click="collect"><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#fff'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span>
|
||||
<span style="width:80px" class="hover-pointer ml_10" @click="connectCs(storeMsg.yzfSign)"><Icon custom="icomoon icon-customer-service" />联系客服</span>
|
||||
<span style="width:80px" class="hover-pointer ml_10" @click="IMService()"><Icon custom="icomoon icon-customer-service" />联系客服</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="store-category">
|
||||
<ul class="cate-list">
|
||||
<li class="cate-item" @click="searchByCate({id:'', labelName: '店铺推荐'})">首页</li>
|
||||
<li class="cate-item" v-for="(cate, index) in cateList" :key="index">
|
||||
<Dropdown v-if="cate.children.length">
|
||||
<div @click.self="searchByCate(cate)">{{cate.labelName}} <Icon type="ios-arrow-down"></Icon></div>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem @click.native="searchByCate(sec)" :name="sec.id" v-for="sec in cate.children" :key="sec.id">{{sec.labelName}}</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
<span v-else @click.self="searchByCate(cate)">{{cate.labelName}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="promotion-decorate">{{cateName}}</div>
|
||||
|
||||
<div class="goods-list">
|
||||
<empty v-if="goodsList.length === 0" />
|
||||
<div
|
||||
v-else
|
||||
class="goods-show-info"
|
||||
v-for="(item, index) in goodsList"
|
||||
:key="index"
|
||||
@click="goGoodsDetail(item.content.id, item.content.goodsId)"
|
||||
>
|
||||
<div class="goods-show-img">
|
||||
<img width="220" height="220" :src="item.content.thumbnail" />
|
||||
</div>
|
||||
<div class="goods-show-price">
|
||||
<span>
|
||||
<span class="seckill-price text-danger">{{
|
||||
item.content.price | unitPrice("¥")
|
||||
}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="goods-show-detail">
|
||||
<span>{{ item.content.goodsName }}</span>
|
||||
</div>
|
||||
<div class="goods-show-num">
|
||||
已有<span>{{ item.content.commentNum || 0 }}</span>人评价
|
||||
</div>
|
||||
<div class="store-category">
|
||||
<ul class="cate-list">
|
||||
<li
|
||||
class="cate-item"
|
||||
@click="searchByCate({ id: '', labelName: '店铺推荐' })"
|
||||
>
|
||||
首页
|
||||
</li>
|
||||
<li class="cate-item" v-for="(cate, index) in cateList" :key="index">
|
||||
<Dropdown v-if="cate.children.length">
|
||||
<div @click.self="searchByCate(cate)">
|
||||
{{ cate.labelName }}
|
||||
<Icon type="ios-arrow-down"></Icon>
|
||||
</div>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem
|
||||
@click.native="searchByCate(sec)"
|
||||
:name="sec.id"
|
||||
v-for="sec in cate.children"
|
||||
:key="sec.id"
|
||||
>{{ sec.labelName }}
|
||||
</DropdownItem
|
||||
>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
<span v-else @click.self="searchByCate(cate)">{{
|
||||
cate.labelName
|
||||
}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goods-page">
|
||||
<Page
|
||||
show-sizer
|
||||
@on-change="changePageNum"
|
||||
@on-page-size-change="changePageSize"
|
||||
:total="total"
|
||||
:page-size="params.pageSize"
|
||||
></Page>
|
||||
</div>
|
||||
<BaseFooter />
|
||||
|
||||
<div class="promotion-decorate">{{ cateName }}</div>
|
||||
|
||||
<!-- <div class="goods-list">-->
|
||||
<!-- <empty v-if="goodsList.length === 0"/>-->
|
||||
<!-- <div-->
|
||||
<!-- v-else-->
|
||||
<!-- class="goods-show-info"-->
|
||||
<!-- v-for="(item, index) in goodsList"-->
|
||||
<!-- :key="index"-->
|
||||
<!-- @click="goGoodsDetail(item.content.id, item.content.goodsId)"-->
|
||||
<!-- >-->
|
||||
<!-- <div class="goods-show-img">-->
|
||||
<!-- <img width="220" height="220" :src="item.content.thumbnail"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="goods-show-price">-->
|
||||
<!-- <span>-->
|
||||
<!-- <span class="seckill-price text-danger">{{-->
|
||||
<!-- item.content.price | unitPrice("¥")-->
|
||||
<!-- }}</span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="goods-show-detail">-->
|
||||
<!-- <span>{{ item.content.goodsName }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="goods-show-num">-->
|
||||
<!-- 已有<span>{{ item.content.commentNum || 0 }}</span-->
|
||||
<!-- >人评价-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="goods-page">-->
|
||||
<!-- <Page-->
|
||||
<!-- show-sizer-->
|
||||
<!-- @on-change="changePageNum"-->
|
||||
<!-- @on-page-size-change="changePageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- :page-size="params.pageSize"-->
|
||||
<!-- ></Page>-->
|
||||
<!-- </div>-->
|
||||
<!-- -->
|
||||
|
||||
|
||||
<!-- 楼层装修部分 -->
|
||||
<model-form ref="modelForm" :data="modelForm"></model-form>
|
||||
|
||||
<BaseFooter/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getDetailById, getCateById} from '@/api/shopentry'
|
||||
import { cancelCollect, collectGoods, isCollection } from '@/api/member';
|
||||
import {goodsList} from '@/api/goods';
|
||||
import { getIMDetail } from "@/api/common";
|
||||
import Storage from "../plugins/storage";
|
||||
import {getDetailById, getCateById} from "@/api/shopentry";
|
||||
import {cancelCollect, collectGoods, isCollection} from "@/api/member";
|
||||
import {goodsList} from "@/api/goods";
|
||||
import Search from "@/components/Search";
|
||||
import ModelForm from "@/components/indexDecorate/ModelForm";
|
||||
import HoverSearch from "@/components/header/hoverSearch";
|
||||
import storage from "@/plugins/storage";
|
||||
import {getFloorStoreData} from "@/api/index.js";
|
||||
import {seckillByDay} from "@/api/promotion";
|
||||
|
||||
export default {
|
||||
name: 'Merchant',
|
||||
data () {
|
||||
name: "Merchant",
|
||||
components: {
|
||||
Search,
|
||||
ModelForm,
|
||||
HoverSearch,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 店铺装修的内容
|
||||
modelForm: {list: []}, // 楼层装修数据
|
||||
topAdvert: {}, // 顶部广告
|
||||
showNav: false, // 是否展示分类栏
|
||||
topSearchShow: false, // 滚动后顶部搜索栏展示
|
||||
carouselLarge: false, // 不同轮播分类尺寸
|
||||
carouselOpacity: false, // 不同轮播分类样式,
|
||||
enablePageData: false, //是否显示楼层装修内容
|
||||
basePageData: false, //基础店铺信息
|
||||
storeMsg: {}, // 店铺信息
|
||||
cateList: [], // 店铺分裂
|
||||
goodsList: [], // 商品列表
|
||||
total: 0, // 商品数量
|
||||
params: { // 请求参数
|
||||
IMLink:"",
|
||||
params: {
|
||||
// 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 20,
|
||||
keyword: '',
|
||||
keyword: "",
|
||||
storeId: this.$route.query.id,
|
||||
storeCatId: ''
|
||||
storeCatId: "",
|
||||
},
|
||||
cateName: '店铺推荐', // 分类名称
|
||||
storeCollected: false // 是否收藏
|
||||
}
|
||||
cateName: "店铺推荐", // 分类名称
|
||||
storeCollected: false, // 是否收藏
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this.getStoreMsg()
|
||||
this.getCateList()
|
||||
this.getGoodsList()
|
||||
created() {
|
||||
this.getStoreMsg();
|
||||
},
|
||||
methods: {
|
||||
getIndexData() {
|
||||
// 获取首页装修数据
|
||||
getFloorStoreData({clientType: "PC", num: this.$route.query.id, pageType: 'STORE'}).then(
|
||||
(res) => {
|
||||
if (res.success) {
|
||||
let dataJson = JSON.parse(res.result.pageData);
|
||||
// 秒杀活动不是装修的数据,需要调用接口判断是否有秒杀商品
|
||||
// 轮播图根据不同轮播,样式不同
|
||||
for (let i = 0; i < dataJson.list.length; i++) {
|
||||
let type = dataJson.list[i].type;
|
||||
if (type === "carousel2") {
|
||||
this.carouselLarge = true;
|
||||
} else if (type === "carousel1") {
|
||||
this.carouselLarge = true;
|
||||
this.carouselOpacity = true;
|
||||
}
|
||||
|
||||
// else if (type === "seckill") {
|
||||
// let seckill = this.getListByDay();
|
||||
// dataJson.list[i].options.list = seckill;
|
||||
// }
|
||||
}
|
||||
this.modelForm = dataJson;
|
||||
storage.setItem("navList", dataJson.list[1]);
|
||||
this.showNav = true;
|
||||
this.topAdvert = dataJson.list[0];
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
// 跳转im客服
|
||||
async IMService() {
|
||||
// 获取访问Token
|
||||
let accessToken = Storage.getItem("accessToken");
|
||||
await this.getIMDetailMethods();
|
||||
if (!accessToken) {
|
||||
this.$Message.error("请登录后再联系客服");
|
||||
return;
|
||||
}
|
||||
window.open(
|
||||
this.IMLink +
|
||||
"?token=" +
|
||||
accessToken +
|
||||
"&id=" +
|
||||
this.storeMsg.storeId
|
||||
);
|
||||
},
|
||||
// 获取im信息
|
||||
async getIMDetailMethods() {
|
||||
let res = await getIMDetail();
|
||||
if (res.success) {
|
||||
this.IMLink = res.result;
|
||||
}
|
||||
},
|
||||
getStoreMsg () { // 店铺信息
|
||||
getDetailById(this.$route.query.id).then(res => {
|
||||
if (res.success) {
|
||||
@@ -118,100 +217,144 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getCateList () { // 店铺分类
|
||||
getCateById(this.$route.query.id).then(res => {
|
||||
// async getListByDay() {
|
||||
// // 当天秒杀活动
|
||||
// const res = await seckillByDay();
|
||||
// if (res.success && res.result.length) {
|
||||
// return res.result;
|
||||
// } else {
|
||||
// return [];
|
||||
// }
|
||||
// },
|
||||
|
||||
// getStoreMsg() {
|
||||
// // 店铺信息
|
||||
// getDetailById(this.$route.query.id).then((res) => {
|
||||
// if (res.success) {
|
||||
//
|
||||
// this.storeMsg = res.result;
|
||||
//
|
||||
//
|
||||
// this.getIndexData();
|
||||
// let that = this;
|
||||
// window.onscroll = function () {
|
||||
// let top =
|
||||
// document.documentElement.scrollTop || document.body.scrollTop;
|
||||
// if (top > 300) {
|
||||
// that.topSearchShow = true;
|
||||
// } else {
|
||||
// that.topSearchShow = false;
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
getCateList() {
|
||||
// 店铺分类
|
||||
getCateById(this.$route.query.id).then((res) => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result
|
||||
this.cateList = res.result;
|
||||
}
|
||||
})
|
||||
},
|
||||
getGoodsList () { // 商品信息
|
||||
goodsList(this.params).then((res) => {
|
||||
if (res.success) {
|
||||
this.goodsList = res.result.content;
|
||||
this.total = res.result.totalElements;
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
getGoodsList() {
|
||||
// 商品信息
|
||||
goodsList(this.params)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.goodsList = res.result.content;
|
||||
this.total = res.result.totalElements;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: {skuId, goodsId},
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
search (val) { // 搜索本店商品
|
||||
search(val) {
|
||||
// 搜索本店商品
|
||||
console.log(val);
|
||||
this.params.keyword = val
|
||||
this.getGoodsList()
|
||||
this.params.keyword = val;
|
||||
this.getGoodsList();
|
||||
},
|
||||
searchByCate (cate) { // 搜索同分类下商品
|
||||
this.params.storeCatId = cate.id
|
||||
this.cateName = cate.labelName
|
||||
this.getGoodsList()
|
||||
searchByCate(cate) {
|
||||
// 搜索同分类下商品
|
||||
this.params.storeCatId = cate.id;
|
||||
this.cateName = cate.labelName;
|
||||
this.getGoodsList();
|
||||
},
|
||||
// 分页 修改页码
|
||||
changePageNum (val) {
|
||||
changePageNum(val) {
|
||||
this.params.pageNumber = val;
|
||||
this.getGoodsList();
|
||||
},
|
||||
// 分页 修改页数
|
||||
changePageSize (val) {
|
||||
changePageSize(val) {
|
||||
this.params.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getGoodsList();
|
||||
},
|
||||
async collect () { // 收藏店铺
|
||||
async collect() {
|
||||
// 收藏店铺
|
||||
if (this.storeCollected) {
|
||||
let cancel = await cancelCollect('STORE', this.storeMsg.storeId)
|
||||
let cancel = await cancelCollect("STORE", this.storeMsg.storeId);
|
||||
if (cancel.success) {
|
||||
this.$Message.success('已取消收藏')
|
||||
this.$Message.success("已取消收藏");
|
||||
this.storeCollected = false;
|
||||
}
|
||||
} else {
|
||||
let collect = await collectGoods('STORE', this.storeMsg.storeId);
|
||||
let collect = await collectGoods("STORE", this.storeMsg.storeId);
|
||||
if (collect.code === 200) {
|
||||
this.storeCollected = true;
|
||||
this.$Message.success('收藏店铺成功,可以前往个人中心我的收藏查看');
|
||||
this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '../assets/styles/goodsList.scss';
|
||||
@import "../assets/styles/goodsList.scss";
|
||||
|
||||
.merchant {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.shop-logo {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background-color: #666;
|
||||
padding: 4px;
|
||||
color: #fff;
|
||||
>div{
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
|
||||
>div:nth-child(2){
|
||||
> div:nth-child(2) {
|
||||
margin-left: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
>div:nth-child(3){
|
||||
> div:nth-child(3) {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
p:nth-child(1) {
|
||||
font-size: 20px;
|
||||
}
|
||||
p:nth-child(2){
|
||||
|
||||
p:nth-child(2) {
|
||||
font-size: 14px;
|
||||
max-height: 40px;
|
||||
max-width: 400px;
|
||||
@@ -221,22 +364,27 @@ export default {
|
||||
.store-category {
|
||||
background-color: #005aa0;
|
||||
color: #fff;
|
||||
.cate-list{
|
||||
|
||||
.cate-list {
|
||||
width: 1200px;
|
||||
margin: 0 auto ;
|
||||
margin: 0 auto;
|
||||
clear: left;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
|
||||
.cate-item {
|
||||
margin-right: 25px;
|
||||
float: left;
|
||||
}
|
||||
.cate-item:hover{
|
||||
|
||||
.cate-item:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.promotion-decorate::before,.promotion-decorate::after{
|
||||
background-image: url('/src/assets/images/sprite@2x.png');
|
||||
|
||||
.promotion-decorate::before,
|
||||
.promotion-decorate::after {
|
||||
background-image: url("/src/assets/images/sprite@2x.png");
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</Row>
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
Copyright © {{year}} - Present
|
||||
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
|
||||
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">{{config.title}}</a>
|
||||
版权所有
|
||||
</Row>
|
||||
</div>
|
||||
@@ -97,6 +97,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import * as RegExp from '@/plugins/RegExp.js';
|
||||
import { md5 } from '@/plugins/md5.js';
|
||||
import * as apiLogin from '@/api/login.js';
|
||||
@@ -107,6 +108,7 @@ export default {
|
||||
components: { Verify },
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
year: new Date().getFullYear(),
|
||||
formRegist: {
|
||||
// 注册表单
|
||||
|
||||
88
buyer/src/pages/article/detail.vue
Normal file
88
buyer/src/pages/article/detail.vue
Normal file
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="wrapper">
|
||||
<div class="nav" @click="back">
|
||||
<img src="@/assets/images/logo2.png" alt="" class="logo" />
|
||||
<div class="title">{{ detail.title }}</div>
|
||||
</div>
|
||||
<div v-html="detail.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { articleDetail } from "@/api/common.js";
|
||||
const config = require("@/config/index");
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
detail: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.push("/");
|
||||
},
|
||||
// 初始化文章
|
||||
init() {
|
||||
const id = this.$route.query.id;
|
||||
|
||||
articleDetail(id).then((res) => {
|
||||
if (res.success) {
|
||||
this.detail = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.logo {
|
||||
max-width: 200px;
|
||||
}
|
||||
.box {
|
||||
min-height: 100vh;
|
||||
width: 1200px;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
padding: 32px;
|
||||
}
|
||||
.wrapper {
|
||||
width: 1200px;
|
||||
min-height: 600px;
|
||||
padding: 32px;
|
||||
background: #fff;
|
||||
}
|
||||
.nav {
|
||||
text-align: center;
|
||||
font-size: 21px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
|
||||
font-size: 21px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
// iphone
|
||||
@media screen and (max-width: 767px) {
|
||||
.box {
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
min-height: 600px;
|
||||
padding: 0 16px;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,182 +1,329 @@
|
||||
<template>
|
||||
<div class='wrapper'>
|
||||
<card _Title='我的分销'/>
|
||||
<!-- 分销申请 -->
|
||||
<div v-if="status === 0">
|
||||
<Alert type="warning">分销商申请</Alert>
|
||||
<Form ref="form" :model="applyForm" :rules="rules">
|
||||
<FormItem label="姓名" prop="name">
|
||||
<Input v-model="applyForm.name"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="身份证号" prop="idNumber">
|
||||
<Input v-model="applyForm.idNumber"></Input>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="primary" :loading="applyLoading" @click="apply">提交申请</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</div>
|
||||
<!-- 分销审核 -->
|
||||
<div v-if="status === 1">
|
||||
<Alert type="success">
|
||||
您提交的信息正在审核
|
||||
<template slot="desc">提交认证申请后,工作人员将在三个工作日进行核对完成审核</template>
|
||||
</Alert>
|
||||
</div>
|
||||
<!-- 分销提现、商品、订单 -->
|
||||
<div v-if="status === 2">
|
||||
<div class="box">
|
||||
<div class="mb_20 account-price">
|
||||
<span class="subTips">可提现金额:</span>
|
||||
<span class="fontsize_48 global_color">¥{{ result.canRebate | unitPrice }}</span>
|
||||
<span class="subTips">冻结金额:</span>
|
||||
<span class="">¥{{ result.commissionFrozen | unitPrice }}</span>
|
||||
<Button type="primary" size="small" class="ml_20" @click="withdrawApplyModal = true">申请提现</Button>
|
||||
</div>
|
||||
</div>
|
||||
<Tabs :value="tabName" @on-click="tabPaneChange">
|
||||
<TabPane label="已选商品" name="goodsChecked">
|
||||
<Table stripe :columns="goodsColumns" :data="goodsData.records">
|
||||
<template slot-scope="{ row }" slot="name">
|
||||
<div class="goods-msg" @click="linkTo(`/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}`)"><img style="vertical-align:top;" :src="row.thumbnail" width="60" height="60" alt=""> {{row.goodsName}}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="price">
|
||||
<span> ¥{{ row.price | unitPrice }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="commission">
|
||||
<span> ¥{{ row.commission | unitPrice }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button type="success" size="small" style="margin-right: 5px" @click="fenxiao(row)">分销商品</Button>
|
||||
<Button type="error" size="small" @click="selectGoods(row.id, false)">取消选择</Button>
|
||||
</template>
|
||||
</Table>
|
||||
<div class="page-size">
|
||||
<Page
|
||||
:current="params.pageNumber"
|
||||
:total="goodsData.total"
|
||||
:page-size="params.pageSize"
|
||||
@on-change="changePage"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
></Page>
|
||||
</div>
|
||||
</TabPane>
|
||||
<TabPane label="未选商品" name="goodsUncheck">
|
||||
<Table stripe :columns="goodsColumns" :data="goodsData.records">
|
||||
<template slot-scope="{ row }" slot="name">
|
||||
<div class="goods-msg" @click="linkTo(`/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}`)"><img style="vertical-align:top;" :src="row.thumbnail" width="60" height="60" alt=""> {{row.goodsName}}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="price">
|
||||
<span> ¥{{ row.price | unitPrice }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="commission">
|
||||
<span> ¥{{ row.commission | unitPrice }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button type="primary" size="small" style="margin-right: 5px" @click="selectGoods(row.id, true)">选择商品</Button>
|
||||
</template>
|
||||
</Table>
|
||||
<div class="page-size">
|
||||
<Page
|
||||
:current="params.pageNumber"
|
||||
:total="goodsData.total"
|
||||
:page-size="params.pageSize"
|
||||
@on-change="changePage"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
></Page>
|
||||
</div>
|
||||
</TabPane>
|
||||
<TabPane label="提现记录" name="log">
|
||||
<Table stripe :columns="logColumns" :data="logData.records">
|
||||
<template slot-scope="{ row }" slot="sn">
|
||||
<span>{{row.sn}}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="time">
|
||||
<span>{{row.createTime}}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="price">
|
||||
<span v-if="row.distributionCashStatus == 'REFUSE'" style="color: green"> +¥{{ row.price | unitPrice }}</span>
|
||||
<span v-else style="color: red"> -¥{{ row.price | unitPrice }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="status">
|
||||
<span> {{row.distributionCashStatus == "APPLY" ? "待处理" : row.distributionCashStatus == "PASS" ? "通过" : "拒绝"}}</span>
|
||||
</template>
|
||||
</Table>
|
||||
<div class="page-size">
|
||||
<Page
|
||||
:current="logParams.pageNumber"
|
||||
:total="logData.total"
|
||||
:page-size="logParams.pageSize"
|
||||
@on-change="changePageLog"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
></Page>
|
||||
</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
<!-- 未开放 -->
|
||||
<div v-if="status === 3">
|
||||
<Alert type="error">
|
||||
分销功能暂未开启
|
||||
<template slot="desc">提交认证申请后,工作人员将在三个工作日进行核对完成审核</template>
|
||||
</Alert>
|
||||
<div class="wrapper">
|
||||
<card _Title="我的分销" />
|
||||
<!-- 分销申请 -->
|
||||
|
||||
<div v-if="status === 0">
|
||||
<Alert type="warning">分销商申请</Alert>
|
||||
<Form ref="form" :model="applyForm" :rules="rules">
|
||||
<FormItem label="姓名" prop="name">
|
||||
<Input v-model="applyForm.name"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="身份证号" prop="idNumber">
|
||||
<Input v-model="applyForm.idNumber"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="银行开户行" prop="settlementBankBranchName">
|
||||
<Input v-model="applyForm.settlementBankBranchName"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="银行开户名" prop="settlementBankAccountName">
|
||||
<Input v-model="applyForm.settlementBankAccountName"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="银行账号" prop="settlementBankAccountNum">
|
||||
<Input v-model="applyForm.settlementBankAccountNum"></Input>
|
||||
</FormItem>
|
||||
|
||||
<FormItem>
|
||||
<Button type="primary" :loading="applyLoading" @click="apply"
|
||||
>提交申请</Button
|
||||
>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</div>
|
||||
<!-- 分销审核 -->
|
||||
<div v-if="status === 1">
|
||||
<Alert type="success">
|
||||
您提交的信息正在审核
|
||||
<template slot="desc"
|
||||
>提交认证申请后,工作人员将在三个工作日进行核对完成审核</template
|
||||
>
|
||||
</Alert>
|
||||
</div>
|
||||
<!-- 分销提现、商品、订单 -->
|
||||
<div v-if="status === 2">
|
||||
<div class="tips">
|
||||
|
||||
<p>分销下线付款之后会生成分销订单。</p>
|
||||
<p>
|
||||
冻结金额:用户提现金额即为冻结金额,审核通过后扣除冻结金额,审核拒绝之后冻结金额返回可提现金额。
|
||||
</p>
|
||||
<p>可提现金额:分销订单佣金T+1解冻后可变为可提现金额。</p>
|
||||
|
||||
</div>
|
||||
|
||||
<Modal v-model="withdrawApplyModal" width="530">
|
||||
<p slot="header">
|
||||
<Icon type="edit"></Icon>
|
||||
<span>提现金额</span>
|
||||
</p>
|
||||
<div>
|
||||
<Input
|
||||
v-model="withdrawPrice"
|
||||
size="large"
|
||||
number
|
||||
maxlength="9"
|
||||
><span slot="append">元</span></Input>
|
||||
<div class="box">
|
||||
<div class="mb_20 account-price">
|
||||
<span class="subTips">可提现金额:</span>
|
||||
<span class="fontsize_48 global_color"
|
||||
>¥{{ result.canRebate | unitPrice }}</span
|
||||
>
|
||||
<span class="subTips">冻结金额:</span>
|
||||
<span class="">¥{{ result.commissionFrozen | unitPrice }}</span>
|
||||
<span class="subTips">返利总金额:</span>
|
||||
<span class="">¥{{ result.rebateTotal | unitPrice }}</span>
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
class="ml_20"
|
||||
@click="withdrawApplyModal = true"
|
||||
>申请提现</Button
|
||||
>
|
||||
</div>
|
||||
<div slot="footer" style="text-align: center">
|
||||
<Button type="primary" size="large" @click="withdraw">提现</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal v-model="qrcodeShow" title="分销商品" width="800">
|
||||
<Alert type="warning">
|
||||
下载二维码或者复制链接分享商品
|
||||
</Alert>
|
||||
<div style="width:200px;height:200px;border:1px solid #eee;">
|
||||
<vue-qr :text="qrcode" :callback="qrcodeData" :margin="0" colorDark="#000" colorLight="#fff" :size="200"></vue-qr>
|
||||
<Button class="download-btn" type="success" @click="downloadQrcode">下载二维码</Button>
|
||||
</div>
|
||||
<div class="mt_10">商品链接:<Input style="width:400px" v-model="qrcode"></Input></div>
|
||||
</Modal>
|
||||
</div>
|
||||
<Tabs :value="tabName" @on-click="tabPaneChange">
|
||||
<TabPane label="已选商品" name="goodsChecked">
|
||||
<Table stripe :columns="goodsColumns" :data="goodsData.records">
|
||||
<template slot-scope="{ row }" slot="name">
|
||||
<div
|
||||
class="goods-msg"
|
||||
@click="
|
||||
linkTo(
|
||||
`/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}`
|
||||
)
|
||||
"
|
||||
>
|
||||
<img
|
||||
style="vertical-align: top"
|
||||
:src="row.thumbnail"
|
||||
width="60"
|
||||
height="60"
|
||||
alt=""
|
||||
/> {{ row.goodsName }}
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="price">
|
||||
<span> ¥{{ row.price | unitPrice }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="commission">
|
||||
<span> ¥{{ row.commission | unitPrice }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
type="success"
|
||||
size="small"
|
||||
style="margin-right: 5px"
|
||||
@click="fenxiao(row)"
|
||||
>分销商品</Button
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
size="small"
|
||||
@click="selectGoods(row.id, false)"
|
||||
>取消选择</Button
|
||||
>
|
||||
</template>
|
||||
</Table>
|
||||
<div class="page-size">
|
||||
<Page
|
||||
:current="params.pageNumber"
|
||||
:total="goodsData.total"
|
||||
:page-size="params.pageSize"
|
||||
@on-change="changePage"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
></Page>
|
||||
</div>
|
||||
</TabPane>
|
||||
<TabPane label="未选商品" name="goodsUncheck">
|
||||
<Table stripe :columns="goodsColumns" :data="goodsData.records">
|
||||
<template slot-scope="{ row }" slot="name">
|
||||
<div
|
||||
class="goods-msg"
|
||||
@click="
|
||||
linkTo(
|
||||
`/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}`
|
||||
)
|
||||
"
|
||||
>
|
||||
<img
|
||||
style="vertical-align: top"
|
||||
:src="row.thumbnail"
|
||||
width="60"
|
||||
height="60"
|
||||
alt=""
|
||||
/> {{ row.goodsName }}
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="price">
|
||||
<span> ¥{{ row.price | unitPrice }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="commission">
|
||||
<span> ¥{{ row.commission | unitPrice }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
style="margin-right: 5px"
|
||||
@click="selectGoods(row.id, true)"
|
||||
>选择商品</Button
|
||||
>
|
||||
</template>
|
||||
</Table>
|
||||
<div class="page-size">
|
||||
<Page
|
||||
:current="params.pageNumber"
|
||||
:total="goodsData.total"
|
||||
:page-size="params.pageSize"
|
||||
@on-change="changePage"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
></Page>
|
||||
</div>
|
||||
</TabPane>
|
||||
<TabPane label="提现记录" name="log">
|
||||
<Table stripe :columns="logColumns" :data="logData.records">
|
||||
<template slot-scope="{ row }" slot="sn">
|
||||
<span>{{ row.sn }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="time">
|
||||
<span>{{ row.createTime }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="price">
|
||||
<span
|
||||
v-if="row.distributionCashStatus == 'VIA_AUDITING'"
|
||||
style="color: green"
|
||||
>
|
||||
+¥{{ row.price | unitPrice }}</span
|
||||
>
|
||||
<span v-else style="color: red">
|
||||
-¥{{ row.price | unitPrice }}</span
|
||||
>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="status">
|
||||
<span>
|
||||
{{
|
||||
row.distributionCashStatus == "APPLY"
|
||||
? "待处理"
|
||||
: row.distributionCashStatus == "VIA_AUDITING"
|
||||
? "通过"
|
||||
: "拒绝"
|
||||
}}</span
|
||||
>
|
||||
</template>
|
||||
</Table>
|
||||
<div class="page-size">
|
||||
<Page
|
||||
:current="logParams.pageNumber"
|
||||
:total="logData.total"
|
||||
:page-size="logParams.pageSize"
|
||||
@on-change="changePageLog"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
></Page>
|
||||
</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
<!-- 未开放 -->
|
||||
<div v-if="status === 3">
|
||||
<Alert type="error">
|
||||
分销功能暂未开启
|
||||
<template slot="desc"
|
||||
>提交认证申请后,工作人员将在三个工作日进行核对完成审核</template
|
||||
>
|
||||
</Alert>
|
||||
</div>
|
||||
|
||||
<Modal v-model="withdrawApplyModal" width="530">
|
||||
<p slot="header">
|
||||
<Icon type="edit"></Icon>
|
||||
<span>提现金额</span>
|
||||
</p>
|
||||
<div>
|
||||
<Input v-model="withdrawPrice" size="large" number maxlength="9"
|
||||
><span slot="append">元</span></Input
|
||||
>
|
||||
</div>
|
||||
<div slot="footer" style="text-align: center">
|
||||
<Button type="primary" size="large" @click="withdraw">提现</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal v-model="qrcodeShow" title="分销商品" width="800">
|
||||
<Alert type="warning"> 下载二维码或者复制链接分享商品 </Alert>
|
||||
<div style="width: 200px; height: 200px; border: 1px solid #eee">
|
||||
<vue-qr
|
||||
:text="qrcode"
|
||||
:callback="qrcodeData"
|
||||
:margin="0"
|
||||
colorDark="#000"
|
||||
colorLight="#fff"
|
||||
:size="200"
|
||||
></vue-qr>
|
||||
<Button class="download-btn" type="success" @click="downloadQrcode"
|
||||
>下载二维码</Button
|
||||
>
|
||||
</div>
|
||||
<div class="mt_10">
|
||||
商品链接:<Input style="width: 400px" v-model="qrcode"></Input>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {distribution, applyDistribution, distCash, distCashHistory, getDistGoodsList, selectDistGoods} from '@/api/member.js'
|
||||
import { IDCard } from '@/plugins/RegExp.js';
|
||||
import vueQr from 'vue-qr';
|
||||
import {
|
||||
distribution,
|
||||
applyDistribution,
|
||||
distCash,
|
||||
distCashHistory,
|
||||
getDistGoodsList,
|
||||
selectDistGoods,
|
||||
} from "@/api/member.js";
|
||||
import { IDCard } from "@/plugins/RegExp.js";
|
||||
import { checkBankno } from "@/plugins/Foundation";
|
||||
import vueQr from "vue-qr";
|
||||
export default {
|
||||
name: 'Distribution',
|
||||
name: "Distribution",
|
||||
components: { vueQr },
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
status: 0, // 申请状态,0为未申请 1 申请中 2 申请完成 3 功能暂未开启
|
||||
applyForm: {}, // 申请表单
|
||||
rules: { // 验证规则
|
||||
name: [{required: true, message: '请输入真实姓名'}],
|
||||
rules: {
|
||||
// 验证规则
|
||||
name: [{ required: true, message: "请输入真实姓名" }],
|
||||
idNumber: [
|
||||
{required: true, message: '请输入身份证号'},
|
||||
{pattern: IDCard, message: '请输入正确的身份证号'}
|
||||
]
|
||||
{ required: true, message: "请输入身份证号" },
|
||||
{ pattern: IDCard, message: "请输入正确的身份证号" },
|
||||
],
|
||||
settlementBankBranchName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入银行开户行",
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
settlementBankAccountName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入银行开户名",
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
//银行账号
|
||||
settlementBankAccountNum: [
|
||||
{
|
||||
required: true,
|
||||
message: "银行账号不正确",
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
// 上面有说,返回true表示校验通过,返回false表示不通过
|
||||
// this.$u.test.mobile()就是返回true或者false的
|
||||
return checkBankno(value);
|
||||
},
|
||||
message: "银行账号不正确",
|
||||
},
|
||||
],
|
||||
},
|
||||
tabName: 'goodsChecked', // 当前所在tab
|
||||
tabName: "goodsChecked", // 当前所在tab
|
||||
result: {}, // 审核结果
|
||||
applyLoading: false, // 申请加载状态
|
||||
goodsLoading: false, // 列表加载状态
|
||||
@@ -184,136 +331,155 @@ export default {
|
||||
withdrawPrice: 0, // 提现金额
|
||||
goodsData: {}, // 商品数据
|
||||
logData: {}, // 日志数据
|
||||
goodsColumns: [ // 商品表头
|
||||
{title: '商品名称', slot: 'name', width: 400},
|
||||
{title: '商品价格', slot: 'price'},
|
||||
{title: '佣金', slot: 'commission'},
|
||||
{title: '操作', slot: 'action', minWidth: 120}
|
||||
goodsColumns: [
|
||||
// 商品表头
|
||||
{ title: "商品名称", slot: "name", width: 400 },
|
||||
{ title: "商品价格", slot: "price" },
|
||||
{ title: "佣金", slot: "commission" },
|
||||
{ title: "操作", slot: "action", minWidth: 120 },
|
||||
],
|
||||
logColumns: [ // 日志表头
|
||||
{title: '编号', slot: 'sn'},
|
||||
{title: '申请时间', slot: 'time'},
|
||||
{title: '提现金额', slot: 'price'},
|
||||
{title: '提现状态', slot: 'status'}
|
||||
logColumns: [
|
||||
// 日志表头
|
||||
{ title: "编号", slot: "sn" },
|
||||
{ title: "申请时间", slot: "time" },
|
||||
{ title: "提现金额", slot: "price" },
|
||||
{ title: "提现状态", slot: "status" },
|
||||
],
|
||||
params: { // 商品请求参数
|
||||
params: {
|
||||
// 商品请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 20,
|
||||
checked: true
|
||||
checked: true,
|
||||
},
|
||||
orderParams: { // 订单商品请求参数
|
||||
orderParams: {
|
||||
// 订单商品请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 20
|
||||
pageSize: 20,
|
||||
},
|
||||
logParams: { // 日志参数
|
||||
logParams: {
|
||||
// 日志参数
|
||||
pageNumber: 1,
|
||||
pageSize: 20
|
||||
pageSize: 20,
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
},
|
||||
qrcode: '', // 二维码
|
||||
qrcode: "", // 二维码
|
||||
qrcodeShow: false, // 显示二维码
|
||||
base64Img: '', // base64编码
|
||||
goodsNameCurr: ''// 当前分销商品名称
|
||||
}
|
||||
base64Img: "", // base64编码
|
||||
goodsNameCurr: "", // 当前分销商品名称
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this.distribution()
|
||||
mounted() {
|
||||
this.distribution();
|
||||
},
|
||||
methods: {
|
||||
apply () { // 申请成为分销商
|
||||
this.$refs.form.validate(valid => {
|
||||
apply() {
|
||||
// 申请成为分销商
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.applyLoading = true
|
||||
applyDistribution(this.form).then(res => {
|
||||
this.applyLoading = false
|
||||
this.applyLoading = true;
|
||||
applyDistribution(this.form).then((res) => {
|
||||
this.applyLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success('申请已提交,请等待管理员审核')
|
||||
this.$Message.success("申请已提交,请等待管理员审核");
|
||||
this.status = 1;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
withdraw () { // 申请提现
|
||||
distCash({price: this.withdrawPrice}).then(res => {
|
||||
this.withdrawApplyModal = false
|
||||
withdraw() {
|
||||
// 申请提现
|
||||
distCash({ price: this.withdrawPrice }).then((res) => {
|
||||
this.withdrawApplyModal = false;
|
||||
this.price = 0;
|
||||
if (res.success) {
|
||||
this.$Message.success('申请已提交,请等待审核')
|
||||
this.distribution()
|
||||
this.getLog()
|
||||
this.$Message.success("申请已提交,请等待审核");
|
||||
this.distribution();
|
||||
this.getLog();
|
||||
} else {
|
||||
this.$Message.error(res.message)
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
qrcodeData (data64) { // 二维码base64地址
|
||||
this.base64Img = data64
|
||||
qrcodeData(data64) {
|
||||
// 二维码base64地址
|
||||
this.base64Img = data64;
|
||||
},
|
||||
downloadQrcode () { // 下载二维码
|
||||
let a = document.createElement('a'); // 生成一个a元素
|
||||
let event = new MouseEvent('click'); // 创建一个单击事件
|
||||
a.download = this.goodsNameCurr || 'photo'
|
||||
downloadQrcode() {
|
||||
// 下载二维码
|
||||
let a = document.createElement("a"); // 生成一个a元素
|
||||
let event = new MouseEvent("click"); // 创建一个单击事件
|
||||
a.download = this.goodsNameCurr || "photo";
|
||||
a.href = this.base64Img; // 将生成的URL设置为a.href属性
|
||||
a.dispatchEvent(event); // 触发a的单击事件
|
||||
},
|
||||
tabPaneChange (tab) { // tab栏切换
|
||||
if (tab === 'goodsChecked') {
|
||||
tabPaneChange(tab) {
|
||||
// tab栏切换
|
||||
if (tab === "goodsChecked") {
|
||||
this.params.checked = true;
|
||||
this.params.pageNUmber = 1
|
||||
this.getGoodsData()
|
||||
} else if (tab === 'goodsUncheck') {
|
||||
this.params.checked = false
|
||||
this.getGoodsData()
|
||||
} else if (tab === 'log') {
|
||||
this.logParams.pageNumber = 1
|
||||
this.getLog()
|
||||
this.params.pageNUmber = 1;
|
||||
this.getGoodsData();
|
||||
} else if (tab === "goodsUncheck") {
|
||||
this.params.checked = false;
|
||||
this.getGoodsData();
|
||||
} else if (tab === "log") {
|
||||
this.logParams.pageNumber = 1;
|
||||
this.getLog();
|
||||
}
|
||||
},
|
||||
changePage (val) { // 修改页码
|
||||
changePage(val) {
|
||||
// 修改页码
|
||||
this.params.pageNumber = val;
|
||||
this.getGoodsData()
|
||||
this.getGoodsData();
|
||||
},
|
||||
changePageLog (val) { // 修改页码 日志
|
||||
changePageLog(val) {
|
||||
// 修改页码 日志
|
||||
this.logParams.pageNumber = val;
|
||||
this.getLog()
|
||||
this.getLog();
|
||||
},
|
||||
selectGoods (id, checked) { // 选择商品
|
||||
selectGoods(id, checked) {
|
||||
// 选择商品
|
||||
let params = {
|
||||
distributionGoodsId: id,
|
||||
checked: checked
|
||||
}
|
||||
selectDistGoods(params).then(res => {
|
||||
checked: checked,
|
||||
};
|
||||
selectDistGoods(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('操作成功!')
|
||||
this.getGoodsData()
|
||||
this.$Message.success("操作成功!");
|
||||
this.getGoodsData();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
fenxiao (row) { // 分销商品
|
||||
this.qrcode = `${location.origin}/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}&distributionId=${this.result.id}`
|
||||
this.goodsNameCurr = row.goodsName
|
||||
fenxiao(row) {
|
||||
// 分销商品
|
||||
this.qrcode = `${location.origin}/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}&distributionId=${this.result.id}`;
|
||||
this.goodsNameCurr = row.goodsName;
|
||||
this.qrcodeShow = true;
|
||||
},
|
||||
getGoodsData () { // 商品数据
|
||||
getDistGoodsList(this.params).then(res => {
|
||||
if (res.success) this.goodsData = res.result
|
||||
})
|
||||
getGoodsData() {
|
||||
// 商品数据
|
||||
getDistGoodsList(this.params).then((res) => {
|
||||
if (res.success) this.goodsData = res.result;
|
||||
});
|
||||
},
|
||||
getLog () { // 提现历史
|
||||
distCashHistory(this.logParams).then(res => {
|
||||
if (res.success) this.logData = res.result
|
||||
})
|
||||
getLog() {
|
||||
// 提现历史
|
||||
distCashHistory(this.logParams).then((res) => {
|
||||
if (res.success) this.logData = res.result;
|
||||
});
|
||||
},
|
||||
distribution () { // 获取分销商信息
|
||||
distribution() {
|
||||
// 获取分销商信息
|
||||
distribution().then((res) => {
|
||||
if (res.result) {
|
||||
this.result = res.result;
|
||||
let type = res.result.distributionStatus;
|
||||
|
||||
if (type === 'PASS') {
|
||||
if (type === "PASS") {
|
||||
this.status = 2;
|
||||
this.getGoodsData()
|
||||
} else if (type === 'RETREAT' || type === 'REFUSE') {
|
||||
this.getGoodsData();
|
||||
} else if (type === "RETREAT" || type === "REFUSE") {
|
||||
this.status = 0;
|
||||
} else {
|
||||
this.status = 1;
|
||||
@@ -322,15 +488,15 @@ export default {
|
||||
this.status = 3;
|
||||
} else {
|
||||
// 没有资格申请 先去实名认证
|
||||
this.status = 0
|
||||
this.status = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang='scss'>
|
||||
<style scoped lang="scss">
|
||||
.box {
|
||||
margin: 20px 0;
|
||||
}
|
||||
@@ -342,16 +508,16 @@ export default {
|
||||
font-weight: bold;
|
||||
}
|
||||
.subTips {
|
||||
|
||||
margin-left: 10px;
|
||||
}
|
||||
.fontsize_48 {
|
||||
font-size: 48px;
|
||||
}
|
||||
.goods-msg{
|
||||
.goods-msg {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 3px;
|
||||
&:hover{
|
||||
&:hover {
|
||||
color: $theme_color;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -361,4 +527,17 @@ export default {
|
||||
top: -200px;
|
||||
left: 200px;
|
||||
}
|
||||
/depp/ .ivu-alert-message {
|
||||
p {
|
||||
margin: 4px 0;
|
||||
}
|
||||
}
|
||||
.tips{
|
||||
background:#f7f7f7;
|
||||
padding: 16px;
|
||||
border-radius: .4em;
|
||||
>p{
|
||||
margin: 6px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -150,6 +150,9 @@ export default {
|
||||
}
|
||||
.goodsBuy {
|
||||
margin-left: 80px;
|
||||
>*{
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
.page-size{
|
||||
text-align: right;
|
||||
|
||||
@@ -48,7 +48,7 @@ export default {
|
||||
nickName: [{required: true, message: '用户昵称不能为空'}, { max: 16, message: '用户昵称不能超过15个字符' }]
|
||||
},
|
||||
formItem: {}, // 表单数据
|
||||
action: commonUrl + '/common/upload/file', // 上传接口
|
||||
action: commonUrl + '/common/common/upload/file', // 上传接口
|
||||
accessToken: {} // 验证token
|
||||
}
|
||||
},
|
||||
|
||||
@@ -81,7 +81,7 @@ export default {
|
||||
descriptionScore: 5
|
||||
}, // 表单
|
||||
visible: false, // 图片预览
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
previewImage: '', // 预览图片地址
|
||||
loading: false // 提交加载状态
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<div class="title">
|
||||
<card _Title="评价详情" :_Size="16"></card>
|
||||
<p>
|
||||
<span class="color999">创建人:</span><span>{{orderGoods.createBy | secrecyMobile}}</span>
|
||||
<span class="color999 ml_20">{{orderGoods.createTime}}</span>
|
||||
<span class="color999">创建人:</span
|
||||
><span>{{ orderGoods.createBy | secrecyMobile }}</span>
|
||||
<span class="color999 ml_20">{{ orderGoods.createTime }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- 物流评分、服务评分 -->
|
||||
@@ -13,31 +14,64 @@
|
||||
<div class="color999">
|
||||
<span>物流评价:<Rate disabled :value="Number(orderGoods.deliveryScore)" /></span>
|
||||
<span>服务评价:<Rate disabled :value="Number(orderGoods.serviceScore)" /></span>
|
||||
<span>服务评价:<Rate disabled :value="Number(orderGoods.descriptionScore)" /></span>
|
||||
<span
|
||||
>服务评价:<Rate disabled :value="Number(orderGoods.descriptionScore)"
|
||||
/></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 添加订单评价 左侧商品详情 右侧评价框 -->
|
||||
<ul class="goods-eval">
|
||||
<li >
|
||||
<li>
|
||||
<div class="goods-con">
|
||||
<img :src="orderGoods.goodsImage" class="hover-pointer" alt="" width="100" @click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)">
|
||||
<p class="hover-pointer color999" @click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)">{{orderGoods.goodsName}}</p>
|
||||
<img
|
||||
:src="orderGoods.goodsImage"
|
||||
class="hover-pointer"
|
||||
alt=""
|
||||
width="100"
|
||||
@click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)"
|
||||
/>
|
||||
<p
|
||||
class="hover-pointer color999"
|
||||
@click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)"
|
||||
>
|
||||
{{ orderGoods.goodsName }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="eval-con">
|
||||
<div>
|
||||
<span class="color999">商品评价:</span>
|
||||
<RadioGroup style="margin-bottom:5px;color:#999" v-model="orderGoods.grade" type="button" button-style="solid">
|
||||
<RadioGroup
|
||||
style="margin-bottom: 5px; color: #999"
|
||||
v-model="orderGoods.grade"
|
||||
type="button"
|
||||
button-style="solid"
|
||||
>
|
||||
<Radio label="GOOD" disabled>好评</Radio>
|
||||
<Radio label="MODERATE" disabled>中评</Radio>
|
||||
<Radio label="WORSE" disabled>差评</Radio>
|
||||
</RadioGroup>
|
||||
<Input type="textarea" maxlength="500" readonly show-word-limit :rows="4" v-model="orderGoods.content" />
|
||||
<Input
|
||||
type="textarea"
|
||||
maxlength="500"
|
||||
readonly
|
||||
show-word-limit
|
||||
:rows="4"
|
||||
v-model="orderGoods.content"
|
||||
/>
|
||||
</div>
|
||||
<div style="display:flex;align-items:center;">
|
||||
<div>
|
||||
<span class="color999">商家回复:</span>
|
||||
<span>{{ orderGoods.reply }}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<template v-if="orderGoods.images">
|
||||
<div class="demo-upload-list" v-for="(img, index) in orderGoods.images.split(',')" :key="index">
|
||||
<img :src="img">
|
||||
<div
|
||||
class="demo-upload-list"
|
||||
v-for="(img, index) in orderGoods.images.split(',')"
|
||||
:key="index"
|
||||
>
|
||||
<img :src="img" />
|
||||
<div class="demo-upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="handleView(img)"></Icon>
|
||||
</div>
|
||||
@@ -48,44 +82,47 @@
|
||||
</li>
|
||||
</ul>
|
||||
<Modal title="View Image" v-model="visible">
|
||||
<img :src="previewImage" v-if="visible" style="width: 100%">
|
||||
<img :src="previewImage" v-if="visible" style="width: 100%" />
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { evaluationDetail } from '@/api/member.js';
|
||||
import { evaluationDetail } from "@/api/member.js";
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
order: {}, // 订单详情
|
||||
orderGoods: {}, // 订单商品
|
||||
visible: false, // 图片预览
|
||||
previewImage: '', // 预览图片链接
|
||||
loading: false // 加载状态
|
||||
}
|
||||
previewImage: "", // 预览图片链接
|
||||
loading: false, // 加载状态
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getDetail () { // 获取评价详情
|
||||
evaluationDetail(this.$route.query.id).then(res => {
|
||||
if (res.success) this.orderGoods = res.result
|
||||
})
|
||||
getDetail() {
|
||||
// 获取评价详情
|
||||
evaluationDetail(this.$route.query.id).then((res) => {
|
||||
if (res.success) this.orderGoods = res.result;
|
||||
});
|
||||
},
|
||||
goGoodsDetail (skuId, goodsId) { // 跳转商品详情
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: {skuId, goodsId}
|
||||
})
|
||||
window.open(routerUrl.href, '_blank')
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routerUrl.href, "_blank");
|
||||
},
|
||||
handleView (name) { // 预览图片
|
||||
handleView(name) {
|
||||
// 预览图片
|
||||
this.previewImage = name;
|
||||
this.visible = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
mounted() {
|
||||
this.getDetail();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.delivery-rate {
|
||||
@@ -94,12 +131,12 @@ export default {
|
||||
margin-top: 20px;
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #eee;
|
||||
>div:nth-child(1) {
|
||||
> div:nth-child(1) {
|
||||
width: 120px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.goods-eval li{
|
||||
.goods-eval li {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
@@ -109,7 +146,9 @@ export default {
|
||||
text-align: center;
|
||||
p {
|
||||
word-wrap: wrap;
|
||||
&:hover{ color: $theme_color; }
|
||||
&:hover {
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
.eval-con {
|
||||
@@ -118,7 +157,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.demo-upload-list{
|
||||
.demo-upload-list {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
@@ -129,27 +168,27 @@ export default {
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
margin-right: 4px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.demo-upload-list img{
|
||||
.demo-upload-list img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.demo-upload-list-cover{
|
||||
.demo-upload-list-cover {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(0,0,0,.6);
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
.demo-upload-list:hover .demo-upload-list-cover{
|
||||
.demo-upload-list:hover .demo-upload-list-cover {
|
||||
display: block;
|
||||
}
|
||||
.demo-upload-list-cover i{
|
||||
.demo-upload-list-cover i {
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
@@ -157,14 +196,14 @@ export default {
|
||||
}
|
||||
.icon-upload {
|
||||
width: 58px;
|
||||
height:58px;
|
||||
height: 58px;
|
||||
line-height: 58px;
|
||||
text-align:center;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
border:1px dashed #999;
|
||||
border: 1px dashed #999;
|
||||
border-radius: 4px;
|
||||
margin-top: 10px;
|
||||
&:hover{
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
border-color: $theme_color;
|
||||
}
|
||||
|
||||
@@ -2,39 +2,23 @@
|
||||
<div>
|
||||
<card _Title="收货地址" />
|
||||
<div class="add-box">
|
||||
<Form
|
||||
:model="formData"
|
||||
ref="form"
|
||||
label-position="left"
|
||||
:label-width="100"
|
||||
:rules="ruleInline"
|
||||
>
|
||||
<Form :model="formData" ref="form" label-position="left" :label-width="100" :rules="ruleInline">
|
||||
<FormItem label="收件人" prop="name">
|
||||
<i-input v-model="formData.name" placeholder="请输入收件人姓名" style="width: 600px"></i-input>
|
||||
</FormItem>
|
||||
<FormItem label="收件地区" prop="address">
|
||||
<i-input
|
||||
v-model="formData.address"
|
||||
disabled
|
||||
placeholder="请选择收货地址"
|
||||
style="width: 600px"
|
||||
></i-input>
|
||||
<i-input v-model="formData.address" disabled placeholder="请选择收货地址" style="width: 600px"></i-input>
|
||||
<Button type="primary" size="small" @click="$refs.map.showMap = true">选择</Button>
|
||||
</FormItem>
|
||||
<FormItem label="详细地址" prop="detail">
|
||||
<i-input v-model="formData.detail" placeholder="请输入详细地址" style="width: 600px"></i-input>
|
||||
<i-input v-model="formData.detail" placeholder="请输入详细地址" style="width: 600px"></i-input>
|
||||
</FormItem>
|
||||
<FormItem label="手机号码" prop="mobile">
|
||||
<i-input v-model="formData.mobile" placeholder="请输入收件人手机号" style="width: 600px"></i-input>
|
||||
<i-input v-model="formData.mobile" placeholder="请输入收件人手机号" style="width: 600px"></i-input>
|
||||
</FormItem>
|
||||
<FormItem label="地址别名">
|
||||
<i-input
|
||||
v-model="formData.alias"
|
||||
length
|
||||
:maxlength="4"
|
||||
placeholder="请输入地址别名,例如公司"
|
||||
style="width: 600px"
|
||||
></i-input>
|
||||
<i-input v-model="formData.alias" length :maxlength="4" placeholder="请输入地址别名,例如公司" style="width: 600px">
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem label="默认地址">
|
||||
<i-switch v-model="formData.isDefault" />
|
||||
@@ -42,9 +26,7 @@
|
||||
</Form>
|
||||
</div>
|
||||
<div class="mt_20">
|
||||
<Button type="primary" class="mr_10" :loading="loading" @click="save"
|
||||
>保存收货地址</Button
|
||||
>
|
||||
<Button type="primary" class="mr_10" :loading="loading" @click="save">保存收货地址</Button>
|
||||
<Button @click="$router.back()">返回</Button>
|
||||
</div>
|
||||
<lili-map ref="map" @getAddress="getAddress"></lili-map>
|
||||
@@ -52,89 +34,108 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import card from '@/components/card';
|
||||
import liliMap from '@/components/map';
|
||||
import card from "@/components/card";
|
||||
import liliMap from "@/components/map";
|
||||
|
||||
import * as RegExp from "@/plugins/RegExp.js";
|
||||
import {
|
||||
newMemberAddress,
|
||||
editMemberAddress,
|
||||
getAddrDetail
|
||||
} from '@/api/address';
|
||||
getAddrDetail,
|
||||
} from "@/api/address";
|
||||
export default {
|
||||
name: 'AddAddress',
|
||||
data () {
|
||||
name: "AddAddress",
|
||||
data() {
|
||||
return {
|
||||
formData: { // 添加地址表单
|
||||
isDefault: false
|
||||
formData: {
|
||||
// 添加地址表单
|
||||
isDefault: false,
|
||||
},
|
||||
ruleInline: { // 验证规则
|
||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
||||
address: [{ required: true, message: '请输入地址', trigger: 'change' }],
|
||||
ruleInline: {
|
||||
// 验证规则
|
||||
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||
address: [{ required: true, message: "请输入地址", trigger: "change" }],
|
||||
detail: [
|
||||
{ required: true, message: '请输入详细地址', trigger: 'blur' }
|
||||
{ required: true, message: "请输入详细地址", trigger: "blur" },
|
||||
],
|
||||
mobile: [
|
||||
]
|
||||
{ required: true, message: "请输入手机号码" },
|
||||
{
|
||||
pattern: RegExp.mobile,
|
||||
trigger: "blur",
|
||||
message: "请输入正确的手机号",
|
||||
},
|
||||
],
|
||||
},
|
||||
loading: false, // 加载状态
|
||||
mapMsg: {} // 地图信息
|
||||
mapMsg: {}, // 地图信息
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
save () { // 保存地址
|
||||
save() {
|
||||
// 保存地址
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const params = JSON.parse(JSON.stringify(this.formData));
|
||||
params.consigneeAddressPath = params.address.replace(/\s/g, ',');
|
||||
params.consigneeAddressPath = params.address.replace(/\s/g, ",");
|
||||
delete params.address;
|
||||
this.loading = true;
|
||||
if (this.$route.query.id) {
|
||||
editMemberAddress(params).then((res) => {
|
||||
if (res.success) {
|
||||
editMemberAddress(params)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.loading = false;
|
||||
this.$router.push("/home/MyAddress");
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.$router.push('/home/MyAddress');
|
||||
}
|
||||
}).catch(() => { this.loading = false; });
|
||||
});
|
||||
} else {
|
||||
newMemberAddress(params).then((res) => {
|
||||
if (res.success) {
|
||||
newMemberAddress(params)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.loading = false;
|
||||
this.$router.push("/home/MyAddress");
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.$router.push('/home/MyAddress');
|
||||
}
|
||||
}).catch(() => { this.loading = false; });
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getAddrById (id) {
|
||||
getAddrById(id) {
|
||||
// 获取地址详情
|
||||
getAddrDetail(id).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res);
|
||||
const data = res.result;
|
||||
data.address = res.result.consigneeAddressPath.replace(/,/g, ' ');
|
||||
data.address = res.result.consigneeAddressPath.replace(/,/g, " ");
|
||||
this.formData = data;
|
||||
}
|
||||
});
|
||||
},
|
||||
getAddress (item) {
|
||||
getAddress(item) {
|
||||
// 获取地图选择信息
|
||||
console.log(item);
|
||||
this.mapMsg = item;
|
||||
this.$set(this.formData, 'address', item.addr);
|
||||
this.$set(this.formData, 'consigneeAddressIdPath', item.addrId);
|
||||
this.$set(this.formData, 'detail', item.detail);
|
||||
this.$set(this.formData, "address", item.addr);
|
||||
this.$set(this.formData, "consigneeAddressIdPath", item.addrId);
|
||||
this.$set(this.formData, "detail", item.detail);
|
||||
this.formData.lat = item.position.lat;
|
||||
this.formData.lon = item.position.lng;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
const id = this.$route.query.id;
|
||||
if (id) this.getAddrById(id);
|
||||
},
|
||||
components: {
|
||||
card,
|
||||
liliMap
|
||||
}
|
||||
liliMap,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
class="width_300"
|
||||
search
|
||||
enter-button
|
||||
v-model="params.keywords"
|
||||
v-model="params.sn"
|
||||
@on-search="getList"
|
||||
placeholder="请输入订单号搜索"
|
||||
/>
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
params: { // 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
keywords: '',
|
||||
sn: '',
|
||||
sort: 'createTime',
|
||||
order: 'desc'
|
||||
},
|
||||
@@ -345,7 +345,7 @@ export default {
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
width: 500px;
|
||||
// width: 500px;
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
|
||||
@@ -362,6 +362,5 @@ export default {
|
||||
|
||||
.modal-goods {
|
||||
padding: 5px;
|
||||
background-color: #eee;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Card class="mb_10" v-if="(afterSale.serviceStatus == 'PASS' &&
|
||||
afterSale.serviceType != 'RETURN_MONEY') || (afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel)">
|
||||
<Button type="success" @click="openModal" v-if="afterSale.serviceStatus == 'PASS' &&
|
||||
afterSale.serviceType != 'RETURN_MONEY'" size="small">提交物流</Button>
|
||||
afterSale.serviceType != 'RETURN_MONEY'" size="small">提交物流</Button>
|
||||
<Button type="error" @click="cancel(afterSale.sn)" v-if="afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel" size="small">取消售后</Button>
|
||||
</Card>
|
||||
<div class="order-card">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="goodsPrice">
|
||||
<div>{{row.goodsPrice | unitPrice('¥')}}</div>
|
||||
<div>{{row.applyRefundPrice | unitPrice('¥')}}</div>
|
||||
</template>
|
||||
</Table>
|
||||
<div>
|
||||
@@ -117,7 +117,7 @@ export default {
|
||||
num: 1
|
||||
},
|
||||
uploadList: [], // 上传列表
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
visible: false, // 图片预览
|
||||
previewImage: '', // 预览图片url
|
||||
@@ -165,6 +165,7 @@ export default {
|
||||
let params = Object.assign(this.info, this.form)
|
||||
params.images = this.uploadList.toString()
|
||||
params.orderItemSn = this.$route.query.sn
|
||||
params.reason = this.reasonList.find(item => item.id == params.reason).reason
|
||||
applyAfterSale(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$Message.success('售后申请提交成功,请到售后订单查看!')
|
||||
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
content: ''
|
||||
}, // 表单
|
||||
visible: false, // 图片预览
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
previewImage: '', // 图片地址
|
||||
loading: false, // 加载状态
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<Button @click="delOrder(order.sn)" class="del-btn mr_10 fontsize_16" style="margin-top:-5px;" type="text" icon="ios-trash-outline" size="small"></Button>
|
||||
<Button v-if="order.orderStatus === 'COMPLETED'" @click="delOrder(order.sn)" class="del-btn mr_10 fontsize_16" style="margin-top:-5px;" type="text" icon="ios-trash-outline" size="small"></Button>
|
||||
<span>{{ order.flowPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,7 +55,7 @@
|
||||
>{{ goods.goodsPrice | unitPrice("¥") }} </span
|
||||
>x {{ goods.num }}
|
||||
</div>
|
||||
<Button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" type="success" class="fontsize_12" style="position:relative;top:-22px;left:100px">评价</Button>
|
||||
<Button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" type="success" class="fontsize_12" style="position:relative;top:-22px;left:100px;margin-right:10px">评价</Button>
|
||||
<Button v-if="goods.complainStatus == 'NO_APPLY'" @click="complain(order.sn, goodsIndex)" type="warning" class="fontsize_12" size="small" style="position:relative;top:-22px;left:100px">投诉</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -70,7 +70,7 @@
|
||||
<Button @click="goPay(order.sn)" size="small" type="success" v-if="order.allowOperationVO.pay">去支付</Button>
|
||||
<Button @click="received(order.sn)" size="small" type="warning" v-if="order.allowOperationVO.rog">确认收货</Button>
|
||||
<!-- 售后 -->
|
||||
<Button v-if="order.groupAfterSaleStatus.includes('NOT_APPLIED')" @click="applyAfterSale(order.orderItems)" size="small">申请售后</Button>
|
||||
<Button v-if="order.groupAfterSaleStatus && order.groupAfterSaleStatus.includes('NOT_APPLIED')" @click="applyAfterSale(order.orderItems)" size="small">申请售后</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -287,7 +287,7 @@ export default {
|
||||
},
|
||||
filterOrderStatus (status) { // 获取订单状态中文
|
||||
const ob = this.orderStatusList.filter(e => { return e.status === status });
|
||||
return ob[0].name
|
||||
return ob && ob[0] ? ob[0].name : status
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,17 +1,50 @@
|
||||
<template>
|
||||
<div class="order-detail" v-if="order.order">
|
||||
<card _Title="订单详情" :_Size="16"></card>
|
||||
<Card class="mb_10" v-if="order.allowOperationVO.pay || order.allowOperationVO.rog || order.allowOperationVO.cancel">
|
||||
<Button type="success" @click="goPay(order.order.sn)" size="small" v-if="order.allowOperationVO.pay">去支付</Button>
|
||||
<Button type="info" @click="received(order.order.sn)" size="small" v-if="order.allowOperationVO.rog">确认收货</Button>
|
||||
<Button type="error" @click="handleCancelOrder(order.order.sn)" v-if="order.allowOperationVO.cancel" size="small">取消订单</Button>
|
||||
<Card
|
||||
class="mb_10"
|
||||
v-if="
|
||||
order.allowOperationVO.pay ||
|
||||
order.allowOperationVO.rog ||
|
||||
order.allowOperationVO.cancel
|
||||
"
|
||||
>
|
||||
<Button
|
||||
type="success"
|
||||
@click="goPay(order.order.sn)"
|
||||
size="small"
|
||||
v-if="order.allowOperationVO.pay"
|
||||
>去支付</Button
|
||||
>
|
||||
<Button
|
||||
type="info"
|
||||
@click="received(order.order.sn)"
|
||||
size="small"
|
||||
v-if="order.allowOperationVO.rog"
|
||||
>确认收货</Button
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
@click="handleCancelOrder(order.order.sn)"
|
||||
v-if="order.allowOperationVO.cancel"
|
||||
size="small"
|
||||
>取消订单</Button
|
||||
>
|
||||
</Card>
|
||||
<p class="verificationCode" v-if="order.order.verificationCode">核验码:<span>{{order.order.verificationCode}}</span></p>
|
||||
<p class="verificationCode" v-if="order.order.verificationCode">
|
||||
核验码:<span>{{ order.order.verificationCode }}</span>
|
||||
</p>
|
||||
<div class="order-card">
|
||||
<p class="global_color fontsize_18">{{ order.orderStatusValue }}</p>
|
||||
<p>订单号:{{ order.order.sn }}</p>
|
||||
<div style="color:#999;" class="operation-time">操作时间:{{order.order.updateTime}}</div>
|
||||
<Steps class="progress" :current="progressList.length" direction="vertical">
|
||||
<div style="color: #999" class="operation-time">
|
||||
操作时间:{{ order.order.updateTime || order.order.createTime }}
|
||||
</div>
|
||||
<Steps
|
||||
class="progress"
|
||||
:current="progressList.length"
|
||||
direction="vertical"
|
||||
>
|
||||
<Step
|
||||
:title="progress.message"
|
||||
:content="progress.createTime"
|
||||
@@ -22,35 +55,55 @@
|
||||
</div>
|
||||
<div class="order-card">
|
||||
<h3>收货人信息</h3>
|
||||
<p>收货人:{{order.order.consigneeName}}</p>
|
||||
<p>手机号码:{{order.order.consigneeMobile | secrecyMobile}}</p>
|
||||
<p>收货地址:{{order.order.consigneeAddressPath | unitAddress}} {{order.order.consigneeDetail}}</p>
|
||||
<p>收货人:{{ order.order.consigneeName }}</p>
|
||||
<p>手机号码:{{ order.order.consigneeMobile | secrecyMobile }}</p>
|
||||
<p>
|
||||
收货地址:{{ order.order.consigneeAddressPath | unitAddress }}
|
||||
{{ order.order.consigneeDetail }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="order-card">
|
||||
<h3>付款信息</h3>
|
||||
<p>支付方式:{{order.paymentMethodValue}}</p>
|
||||
<p>付款状态:{{order.payStatusValue}}</p>
|
||||
<p>支付方式:{{ order.paymentMethodValue }}</p>
|
||||
<p>付款状态:{{ order.payStatusValue }}</p>
|
||||
</div>
|
||||
<div class="order-card" v-if="!order.order.verificationCode">
|
||||
<h3>配送信息</h3>
|
||||
<p>配送方式:{{order.deliveryMethodValue}}</p>
|
||||
<p>配送状态:{{order.deliverStatusValue}}</p>
|
||||
</div>
|
||||
<div class="order-card">
|
||||
<h3>发票信息</h3>
|
||||
<template v-if="order.order.receipt">
|
||||
<p>发票抬头:{{order.order.receiptVO.receiptTitle}}</p>
|
||||
<p>发票内容:{{order.order.receiptVO.receiptContent}}</p>
|
||||
<p v-if="order.order.receiptVO.taxpayerId">纳税人识别号:{{order.order.receiptVO.taxpayerId}}</p>
|
||||
</template>
|
||||
<div v-else style="color:#999;margin-left:5px">
|
||||
未开发票
|
||||
<p>配送方式:{{ order.deliveryMethodValue }}</p>
|
||||
<p>配送状态:{{ order.deliverStatusValue }}</p>
|
||||
<p v-if="logistics">
|
||||
物流信息:{{ logistics.shipper || "暂无物流信息" }}
|
||||
</p>
|
||||
<p v-if="logistics">
|
||||
物流单号:{{ logistics.logisticCode || "暂无物流单号" }}
|
||||
</p>
|
||||
<div class="div-express-log" v-if="logistics">
|
||||
<div class="express-log">
|
||||
<p>订单日志:</p>
|
||||
<div v-for="(item, index) in logistics.traces" :key="index">
|
||||
<span class="time">{{ item.AcceptTime }}</span>
|
||||
<span class="detail">{{ item.AcceptStation }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-card" v-if="order.order.payStatus === 'PAID'">
|
||||
<h3>发票信息</h3>
|
||||
<template v-if="order.order.needReceipt">
|
||||
<p>发票抬头:{{ order.receipt.receiptTitle }}</p>
|
||||
<p>发票内容:{{ order.receipt.receiptContent }}</p>
|
||||
<p v-if="order.receipt.taxpayerId">
|
||||
纳税人识别号:{{ order.receipt.taxpayerId }}
|
||||
</p>
|
||||
</template>
|
||||
<div v-else style="color: #999; margin-left: 5px">未开发票</div>
|
||||
</div>
|
||||
<!-- 订单商品 -->
|
||||
<div class="goods">
|
||||
<div class="shop-name">
|
||||
<span @click="shopPage(order.order.storeId)">{{ order.order.storeName }}</span>
|
||||
<span @click="shopPage(order.order.storeId)">{{
|
||||
order.order.storeName
|
||||
}}</span>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -66,21 +119,52 @@
|
||||
<tbody>
|
||||
<tr v-for="(goods, goodsIndex) in order.orderItems" :key="goodsIndex">
|
||||
<td>
|
||||
<img @click="goodsDetail(goods.id, goods.goodsId)" :src="goods.image" alt="" />
|
||||
<img
|
||||
@click="goodsDetail(goods.skuId, goods.goodsId)"
|
||||
:src="goods.image"
|
||||
alt=""
|
||||
/>
|
||||
<div>
|
||||
<p @click="goodsDetail(goods.id, goods.goodsId)" class="hover-color">
|
||||
<p
|
||||
@click="goodsDetail(goods.skuId, goods.goodsId)"
|
||||
class="hover-color"
|
||||
>
|
||||
{{ goods.goodsName }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ goods.id }}</td>
|
||||
<td>{{ goods.goodsPrice | unitPrice('¥') }}</td>
|
||||
<td>{{ goods.goodsPrice | unitPrice("¥") }}</td>
|
||||
<td>{{ goods.num }}</td>
|
||||
<td>{{ (goods.goodsPrice * goods.num) | unitPrice('¥') }}</td>
|
||||
<td>{{ (goods.goodsPrice * goods.num) | unitPrice("¥") }}</td>
|
||||
<td>
|
||||
<Button v-if="goods.afterSaleStatus.includes('NOT_APPLIED')" @click="applyAfterSale(goods.sn)" type="info" size="small" class="mb_5">申请售后</Button>
|
||||
<Button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.order.sn, goodsIndex)" size="small" type="success" class="fontsize_12 mb_5" >评价</Button>
|
||||
<Button v-if="goods.complainStatus == 'NO_APPLY'" @click="complain(order.order.sn, goodsIndex)" type="warning" class="fontsize_12" size="small">投诉</Button>
|
||||
<Button
|
||||
v-if="
|
||||
goods.afterSaleStatus.includes('NOT_APPLIED') ||
|
||||
goods.afterSaleStatus.includes('PART_AFTER_SALE')
|
||||
"
|
||||
@click="applyAfterSale(goods.sn)"
|
||||
type="info"
|
||||
size="small"
|
||||
class="mb_5"
|
||||
>申请售后</Button
|
||||
>
|
||||
<Button
|
||||
v-if="goods.commentStatus == 'UNFINISHED'"
|
||||
@click="comment(order.order.sn, goodsIndex)"
|
||||
size="small"
|
||||
type="success"
|
||||
class="fontsize_12 mb_5"
|
||||
>评价</Button
|
||||
>
|
||||
<Button
|
||||
v-if="goods.complainStatus == 'NO_APPLY'"
|
||||
@click="complain(order.order.sn, goodsIndex)"
|
||||
type="warning"
|
||||
class="fontsize_12"
|
||||
size="small"
|
||||
>投诉</Button
|
||||
>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -91,127 +175,179 @@
|
||||
<span>商品件数:</span><span>{{ order.order.goodsNum }}件</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>商品总价:</span><span>{{ order.order.goodsPrice | unitPrice("¥") }}</span><br>
|
||||
<span>商品总价:</span
|
||||
><span>{{ order.order.goodsPrice | unitPrice("¥") }}</span
|
||||
><br />
|
||||
</div>
|
||||
<div>
|
||||
<span>运费:</span><span>+{{ order.order.freightPrice | unitPrice("¥") }}</span><br>
|
||||
<span>运费:</span
|
||||
><span>+{{ order.order.freightPrice | unitPrice("¥") }}</span
|
||||
><br />
|
||||
</div>
|
||||
<div v-if="order.order.priceDetailDTO.couponPrice">
|
||||
<span>优惠券:</span
|
||||
><span
|
||||
>-{{
|
||||
order.order.priceDetailDTO.couponPrice || 0 | unitPrice("¥")
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
<div v-if="order.order.discountPrice">
|
||||
<span>活动优惠:</span
|
||||
><span>-{{ order.order.discountPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div v-if="order.order.priceDetailDTO.couponPrice"><span>优惠券:</span><span>-{{ order.order.priceDetailDTO.couponPrice || 0 | unitPrice("¥") }}</span></div>
|
||||
<div v-if="order.order.discountPrice"><span>活动优惠:</span><span>-{{ order.order.discountPrice | unitPrice("¥") }}</span></div>
|
||||
<div>
|
||||
<span>应付金额:</span>
|
||||
<span class="actrual-price">{{ order.order.flowPrice | unitPrice("¥") }}</span>
|
||||
<span class="actrual-price">{{
|
||||
order.order.flowPrice | unitPrice("¥")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Modal v-model="cancelAvail" title="请选择取消订单原因" @on-ok="sureCancel" @on-cancel="cancelAvail = false">
|
||||
<RadioGroup v-model="cancelParams.reason" vertical type="button" button-style="solid">
|
||||
<Modal
|
||||
v-model="cancelAvail"
|
||||
title="请选择取消订单原因"
|
||||
@on-ok="sureCancel"
|
||||
@on-cancel="cancelAvail = false"
|
||||
>
|
||||
<RadioGroup
|
||||
v-model="cancelParams.reason"
|
||||
vertical
|
||||
type="button"
|
||||
button-style="solid"
|
||||
>
|
||||
<Radio :label="item.reason" v-for="item in cancelReason" :key="item.id">
|
||||
{{item.reason}}
|
||||
{{ item.reason }}
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { orderDetail, getTraces, sureReceived, cancelOrder } from '@/api/order.js';
|
||||
import { afterSaleReason } from '@/api/member';
|
||||
import {
|
||||
orderDetail,
|
||||
getTraces,
|
||||
sureReceived,
|
||||
cancelOrder,
|
||||
} from "@/api/order.js";
|
||||
import { afterSaleReason } from "@/api/member";
|
||||
export default {
|
||||
name: 'order-detail',
|
||||
data () {
|
||||
name: "order-detail",
|
||||
data() {
|
||||
return {
|
||||
order: {}, // 订单详情数据
|
||||
progressList: [], // 订单流程
|
||||
logistics: [], // 物流数据
|
||||
cancelParams: { // 取消售后参数
|
||||
orderSn: '',
|
||||
reason: ''
|
||||
logistics: "", // 物流数据
|
||||
cancelParams: {
|
||||
// 取消售后参数
|
||||
orderSn: "",
|
||||
reason: "",
|
||||
},
|
||||
cancelAvail: false, // 取消订单modal控制
|
||||
cancelReason: [] // 取消订单原因
|
||||
cancelReason: [], // 取消订单原因
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goodsDetail (skuId, goodsId) {
|
||||
goodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 跳转店铺首页
|
||||
shopPage (id) {
|
||||
shopPage(id) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/Merchant',
|
||||
query: { id: id }
|
||||
path: "/Merchant",
|
||||
query: { id: id },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
getDetail () { // 获取订单详情
|
||||
orderDetail(this.$route.query.sn).then(res => {
|
||||
getDetail() {
|
||||
// 获取订单详情
|
||||
orderDetail(this.$route.query.sn).then((res) => {
|
||||
if (res.success) {
|
||||
this.order = res.result;
|
||||
this.progressList = res.result.orderLogs
|
||||
this.progressList = res.result.orderLogs;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
traces () { // 物流信息
|
||||
getTraces(this.$route.query.sn).then(res => {
|
||||
traces() {
|
||||
// 物流信息
|
||||
getTraces(this.$route.query.sn).then((res) => {
|
||||
if (res.success) {
|
||||
this.logistics = res.result
|
||||
this.logistics = res.result;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
received (sn) { // 确认收货
|
||||
sureReceived(sn).then(res => {
|
||||
received(sn) {
|
||||
// 确认收货
|
||||
sureReceived(sn).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('确认收货成功')
|
||||
this.getDetail()
|
||||
this.$Message.success("确认收货成功");
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
goPay (sn) { // 去支付
|
||||
this.$router.push({path: '/payment', query: {orderType: 'ORDER', sn}});
|
||||
goPay(sn) {
|
||||
// 去支付
|
||||
this.$router.push({
|
||||
path: "/payment",
|
||||
query: { orderType: "ORDER", sn },
|
||||
});
|
||||
},
|
||||
applyAfterSale (sn) { // 申请售后
|
||||
this.$router.push({name: 'ApplyAfterSale', query: {sn: sn}})
|
||||
applyAfterSale(sn) {
|
||||
// 申请售后
|
||||
this.$router.push({ name: "ApplyAfterSale", query: { sn: sn } });
|
||||
},
|
||||
comment (sn, goodsIndex) { // 评价
|
||||
this.$router.push({path: '/home/addEval', query: {sn, index: goodsIndex}})
|
||||
comment(sn, goodsIndex) {
|
||||
// 评价
|
||||
this.$router.push({
|
||||
path: "/home/addEval",
|
||||
query: { sn, index: goodsIndex },
|
||||
});
|
||||
},
|
||||
complain (sn, goodsIndex) { // 投诉
|
||||
this.$router.push({name: 'Complain', query: {sn, index: goodsIndex}})
|
||||
complain(sn, goodsIndex) {
|
||||
// 投诉
|
||||
this.$router.push({ name: "Complain", query: { sn, index: goodsIndex } });
|
||||
},
|
||||
handleCancelOrder (sn) {
|
||||
handleCancelOrder(sn) {
|
||||
// 取消订单
|
||||
this.cancelParams.orderSn = sn;
|
||||
afterSaleReason('CANCEL').then(res => {
|
||||
afterSaleReason("CANCEL").then((res) => {
|
||||
if (res.success) {
|
||||
this.cancelReason = res.result;
|
||||
this.cancelAvail = true
|
||||
this.cancelParams.reason = this.cancelReason[0].reason
|
||||
this.cancelAvail = true;
|
||||
this.cancelParams.reason = this.cancelReason[0].reason;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
sureCancel () { // 确定取消
|
||||
cancelOrder(this.cancelParams).then(res => {
|
||||
sureCancel() {
|
||||
// 确定取消
|
||||
cancelOrder(this.cancelParams).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('取消订单成功')
|
||||
this.getDetail()
|
||||
this.cancelAvail = false
|
||||
this.$Message.success("取消订单成功");
|
||||
this.getDetail();
|
||||
this.cancelAvail = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getDetail();
|
||||
this.traces();
|
||||
},
|
||||
mounted () {
|
||||
this.getDetail()
|
||||
this.traces()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.mb_5{
|
||||
.mb_10 {
|
||||
Button:nth-of-type(2) {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.mb_5 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.order-card {
|
||||
@@ -312,7 +448,7 @@ table {
|
||||
color: rgb(65, 63, 63);
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
span{
|
||||
span {
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
go (item) { // 根据使用条件跳转商品列表页面
|
||||
if (this.params.memberCouponStatus !== 'NEW') return;
|
||||
|
||||
if (item.storeId !== 'platform') {
|
||||
if (item.storeId !== '0') {
|
||||
this.$router.push({path: '/merchant', query: {id: item.storeId}})
|
||||
} else {
|
||||
if (item.scopeType === 'PORTION_GOODS_CATEGORY') {
|
||||
|
||||
@@ -496,7 +496,7 @@ export default {
|
||||
font-weight: bold;
|
||||
}
|
||||
.subTips {
|
||||
|
||||
margin-left: 10px;
|
||||
}
|
||||
.account-btns {
|
||||
margin: 10px 0;
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<!-- 卡片组件 -->
|
||||
<card _Title="我的足迹" :_Size="16" ></card>
|
||||
<card _Title="我的足迹" :_Size="16"></card>
|
||||
<Button class="del-btn" @click="clearAll" type="primary">删除全部</Button>
|
||||
<!-- 订单列表 -->
|
||||
<empty v-if="list.length === 0" />
|
||||
<ul class="track-list" v-else>
|
||||
<li v-for="(item, index) in list" :key="index" @click="goodsDetail(item.id, item.goodsId)">
|
||||
<img :src="item.thumbnail" :alt="item.thumbnail" width="200" height="200">
|
||||
<p class="ellipsis">{{item.goodsName}}</p>
|
||||
<p>{{item.price | unitPrice('¥')}}</p>
|
||||
<li
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@click="goodsDetail(item.id, item.goodsId)"
|
||||
>
|
||||
<img :src="item.thumbnail" :alt="item.thumbnail" width="200" height="200" />
|
||||
<p class="ellipsis">{{ item.goodsName }}</p>
|
||||
<p>{{ item.price | unitPrice("¥") }}</p>
|
||||
<span class="del-icon" @click.stop="clearById(item.goodsId)">
|
||||
<Icon type="md-trash" />
|
||||
</span>
|
||||
@@ -17,96 +21,104 @@
|
||||
</ul>
|
||||
<!-- 分页 -->
|
||||
<div class="page-size">
|
||||
<Page :total="total" @on-change="changePageNum"
|
||||
<Page
|
||||
:total="total"
|
||||
@on-change="changePageNum"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size="params.pageSize"
|
||||
show-sizer>
|
||||
show-sizer
|
||||
>
|
||||
</Page>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { tracksList, clearTracks, clearTracksById } from '@/api/member';
|
||||
import { tracksList, clearTracks, clearTracksById } from "@/api/member";
|
||||
export default {
|
||||
name: 'MyTrack',
|
||||
data () {
|
||||
name: "MyTrack",
|
||||
data() {
|
||||
return {
|
||||
list: [], // 我的足迹,商品列表
|
||||
spinShow: false, // 控制loading是否加载
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
pageSize: 30,
|
||||
order: 'desc',
|
||||
sort: 'createTime'
|
||||
order: "desc",
|
||||
sort: "updateTime",
|
||||
},
|
||||
total: 0
|
||||
total: 0,
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
goodsDetail (skuId, goodsId) {
|
||||
goodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 跳转店铺首页
|
||||
shopPage (id) {
|
||||
shopPage(id) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/Merchant',
|
||||
query: { id: id }
|
||||
path: "/Merchant",
|
||||
query: { id: id },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
clearAll () { // 清除全部足迹
|
||||
clearAll() {
|
||||
// 清除全部足迹
|
||||
this.$Modal.confirm({
|
||||
title: '删除',
|
||||
content: '<p>确定要删除全部足迹吗?</p>',
|
||||
title: "删除",
|
||||
content: "<p>确定要删除全部足迹吗?</p>",
|
||||
onOk: () => {
|
||||
clearTracks().then(res => {
|
||||
clearTracks().then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功')
|
||||
this.getList()
|
||||
this.$Message.success("删除成功");
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
onCancel: () => { }
|
||||
onCancel: () => {},
|
||||
});
|
||||
},
|
||||
clearById (id) { // 清除全部足迹
|
||||
clearTracksById(id).then(res => {
|
||||
clearById(id) {
|
||||
// 清除全部足迹
|
||||
clearTracksById(id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功')
|
||||
this.getList()
|
||||
this.$Message.success("删除成功");
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
changePageNum (val) { // 修改页码
|
||||
changePageNum(val) {
|
||||
// 修改页码
|
||||
this.params.pageNumber = val;
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
changePageSize (val) { // 修改页数
|
||||
changePageSize(val) {
|
||||
// 修改页数
|
||||
this.params.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
getList () { // 获取足迹列表
|
||||
getList() {
|
||||
// 获取足迹列表
|
||||
this.spinShow = true;
|
||||
tracksList(this.params).then(res => {
|
||||
this.spinShow = false
|
||||
if (res.success && res.result) {
|
||||
this.list = res.result;
|
||||
tracksList(this.params).then((res) => {
|
||||
this.spinShow = false;
|
||||
if (res.success && res.result.records.length) {
|
||||
this.list = res.result.records;
|
||||
} else {
|
||||
this.list = []
|
||||
this.list = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@@ -120,34 +132,34 @@ export default {
|
||||
.track-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
li{
|
||||
li {
|
||||
width: 200px;
|
||||
overflow: hidden;
|
||||
margin-left: 15px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #eee;
|
||||
position: relative;
|
||||
&:hover{
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
box-shadow:1px 1px 3px #999;
|
||||
.del-icon{
|
||||
box-shadow: 1px 1px 3px #999;
|
||||
.del-icon {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
p{
|
||||
p {
|
||||
padding: 0 5px;
|
||||
margin: 3px 0;
|
||||
}
|
||||
p:nth-child(2) {
|
||||
color: #999;
|
||||
}
|
||||
p:nth-child(3){
|
||||
p:nth-child(3) {
|
||||
color: $theme_color;
|
||||
}
|
||||
.del-icon {
|
||||
display: none;
|
||||
font-size: 30px;
|
||||
background-color:rgba(0,0,0,.3);
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
<!-- LOGO 步骤条 -->
|
||||
<div class="width_1200 logo">
|
||||
<div>
|
||||
<router-link to="/"
|
||||
><img :src="$store.state.logoImg" alt="lili shop" title="lilishop"
|
||||
/></router-link>
|
||||
<router-link to="/"><img :src="$store.state.logoImg" /></router-link>
|
||||
<div>结算页</div>
|
||||
</div>
|
||||
<div class="cart-steps">
|
||||
@@ -23,7 +21,7 @@
|
||||
<span :class="stepIndex == 2 ? 'active' : ''">3.成功提交订单</span>
|
||||
</div>
|
||||
</div>
|
||||
<Divider/>
|
||||
<Divider />
|
||||
<div class="content width_1200">
|
||||
<!-- 收货地址 -->
|
||||
<div class="address">
|
||||
@@ -45,9 +43,8 @@
|
||||
<div>
|
||||
<span>{{ item.name }}</span>
|
||||
<Tag class="ml_10" v-if="item.isDefault" color="red">默认</Tag>
|
||||
<Tag class="ml_10" v-if="item.alias" color="warning">{{
|
||||
item.alias
|
||||
}}
|
||||
<Tag class="ml_10" v-if="item.alias" color="warning"
|
||||
>{{ item.alias }}
|
||||
</Tag>
|
||||
</div>
|
||||
<div>{{ item.mobile }}</div>
|
||||
@@ -60,16 +57,16 @@
|
||||
class="ml_10"
|
||||
v-if="!item.isDefault"
|
||||
@click.stop="delAddress(item)"
|
||||
>删除</span
|
||||
>删除</span
|
||||
>
|
||||
</div>
|
||||
<div class="corner-icon" v-show="selectedAddress.id === item.id">
|
||||
<div></div>
|
||||
<Icon type="md-checkmark"/>
|
||||
<Icon type="md-checkmark" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-address" @click="editAddress('')">
|
||||
<Icon type="ios-add-circle-outline"/>
|
||||
<Icon type="ios-add-circle-outline" />
|
||||
<div>添加新地址</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,8 +77,8 @@
|
||||
v-if="addressList.length > 3"
|
||||
>
|
||||
{{ moreAddr ? "收起地址" : "更多地址" }}
|
||||
<Icon v-show="!moreAddr" type="md-arrow-dropdown"/>
|
||||
<Icon v-show="moreAddr" type="md-arrow-dropup"/>
|
||||
<Icon v-show="!moreAddr" type="md-arrow-dropdown" />
|
||||
<Icon v-show="moreAddr" type="md-arrow-dropup" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 商品信息 -->
|
||||
@@ -95,52 +92,54 @@
|
||||
v-for="(shop, shopIndex) in goodsList"
|
||||
:key="shopIndex"
|
||||
>
|
||||
<div class="shop-name">
|
||||
<span>
|
||||
<span class="hover-color" @click="goShopPage(shop.storeId)">{{
|
||||
<div v-if="shop.checked">
|
||||
<div class="shop-name">
|
||||
<span>
|
||||
<span class="hover-color" @click="goShopPage(shop.storeId)">{{
|
||||
shop.storeName
|
||||
}}</span
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
<div class="goods-list">
|
||||
<div
|
||||
class="goods-item"
|
||||
v-for="(goods, goodsIndex) in shop.skuList"
|
||||
:key="goodsIndex"
|
||||
>
|
||||
<span
|
||||
class="hover-color"
|
||||
@click="
|
||||
goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)
|
||||
"
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
<div class="goods-list">
|
||||
<div
|
||||
class="goods-item"
|
||||
v-for="(goods, goodsIndex) in shop.checkedSkuList"
|
||||
:key="goodsIndex"
|
||||
>
|
||||
<img :src="goods.goodsSku.thumbnail" alt=""/>
|
||||
<span style="vertical-align: top">{{
|
||||
<span
|
||||
class="hover-color"
|
||||
@click="
|
||||
goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)
|
||||
"
|
||||
>
|
||||
<img :src="goods.goodsSku.thumbnail" alt="" />
|
||||
<span style="vertical-align: top">{{
|
||||
goods.goodsSku.goodsName
|
||||
}}</span>
|
||||
</span>
|
||||
<span class="goods-price">{{
|
||||
</span>
|
||||
<span class="goods-price">{{
|
||||
goods.purchasePrice | unitPrice("¥")
|
||||
}}</span>
|
||||
<span>x{{ goods.num }}</span>
|
||||
<span>{{ goods.goodsSku.quantity > 0 ? "有货" : "无货" }}</span>
|
||||
<span class="goods-price">{{
|
||||
<span>x{{ goods.num }}</span>
|
||||
<span>{{ goods.goodsSku.quantity > 0 ? "有货" : "无货" }}</span>
|
||||
<span class="goods-price">{{
|
||||
goods.subTotal | unitPrice("¥")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-mark">
|
||||
<Input
|
||||
type="textarea"
|
||||
maxlength="60"
|
||||
v-model="shop.remark"
|
||||
show-word-limit
|
||||
placeholder="订单备注"
|
||||
/>
|
||||
<span style="font-size: 12px; color: #999"
|
||||
>提示:请勿填写有关支付、收货、发票方面的信息</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-mark">
|
||||
<Input
|
||||
type="textarea"
|
||||
maxlength="60"
|
||||
v-model="shop.remark"
|
||||
show-word-limit
|
||||
placeholder="订单备注"
|
||||
/>
|
||||
<span style="font-size: 12px; color: #999"
|
||||
>提示:请勿填写有关支付、收货、发票方面的信息</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,7 +147,7 @@
|
||||
<div class="invoice">
|
||||
<div class="card-head mt_20 mb_20">
|
||||
<span class="relative"
|
||||
>发票信息<span class="inv-tips">
|
||||
>发票信息<span class="inv-tips">
|
||||
<Icon
|
||||
type="ios-alert-outline"
|
||||
/>开企业抬头发票须填写纳税人识别号,以免影响报销
|
||||
@@ -178,18 +177,18 @@
|
||||
<span
|
||||
v-if="item.couponType === 'PRICE'"
|
||||
class="fontsize_12 global_color"
|
||||
>¥<span class="price">{{
|
||||
>¥<span class="price">{{
|
||||
item.price | unitPrice
|
||||
}}</span></span
|
||||
>
|
||||
<span
|
||||
v-if="item.couponType === 'DISCOUNT'"
|
||||
class="fontsize_12 global_color"
|
||||
><span class="price">{{ item.discount }}</span
|
||||
>折</span
|
||||
><span class="price">{{ item.discount }}</span
|
||||
>折</span
|
||||
>
|
||||
<span class="describe"
|
||||
>满{{ item.consumeThreshold }}元可用</span
|
||||
>满{{ item.consumeThreshold }}元可用</span
|
||||
>
|
||||
</div>
|
||||
<p>使用范围:{{ useScope(item.scopeType) }}</p>
|
||||
@@ -207,7 +206,7 @@
|
||||
class="c-right"
|
||||
v-if="usedCouponId.includes(item.id)"
|
||||
@click="useCoupon(item.id, false)"
|
||||
>放弃优惠</a
|
||||
>放弃优惠</a
|
||||
>
|
||||
<i class="circle-top"></i>
|
||||
<i class="circle-bottom"></i>
|
||||
@@ -220,32 +219,22 @@
|
||||
<span>{{ totalNum }}件商品,总商品金额:</span
|
||||
><span>{{ priceDetailDTO.goodsPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div v-if="priceDetailDTO.freightPrice>0">
|
||||
<div v-if="priceDetailDTO.freightPrice > 0">
|
||||
<span>运费:</span
|
||||
><span>{{ priceDetailDTO.freightPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div v-if="priceDetailDTO.discountPrice>0">
|
||||
<div v-if="priceDetailDTO.discountPrice > 0">
|
||||
<span>优惠金额:</span
|
||||
><span
|
||||
>-{{
|
||||
priceDetailDTO.discountPrice | unitPrice("¥")
|
||||
}}</span
|
||||
>
|
||||
><span>-{{ priceDetailDTO.discountPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div v-if="priceDetailDTO.couponPrice>0">
|
||||
<div v-if="priceDetailDTO.couponPrice > 0">
|
||||
<span>优惠券金额:</span
|
||||
><span
|
||||
>-{{
|
||||
priceDetailDTO.couponPrice | unitPrice("¥")
|
||||
}}</span
|
||||
>
|
||||
><span>-{{ priceDetailDTO.couponPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="$route.query.way === 'POINTS'">
|
||||
<span>应付积分:</span
|
||||
><span class="actrual-price">{{
|
||||
priceDetailDTO.payPoint
|
||||
}}</span>
|
||||
><span class="actrual-price">{{ priceDetailDTO.payPoint }}</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span>应付金额:</span
|
||||
@@ -282,58 +271,58 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import invoiceModal from '@/components/invoiceModal';
|
||||
import addressManage from '@/components/addressManage';
|
||||
import {memberAddress, delMemberAddress} from '@/api/address';
|
||||
import invoiceModal from "@/components/invoiceModal";
|
||||
import addressManage from "@/components/addressManage";
|
||||
import { memberAddress, delMemberAddress } from "@/api/address";
|
||||
import {
|
||||
cartGoodsPay,
|
||||
createTrade,
|
||||
selectAddr,
|
||||
selectCoupon,
|
||||
couponNum
|
||||
} from '@/api/cart';
|
||||
import {canUseCouponList} from '@/api/member.js';
|
||||
couponNum,
|
||||
} from "@/api/cart";
|
||||
import { canUseCouponList } from "@/api/member.js";
|
||||
|
||||
export default {
|
||||
name: 'Pay',
|
||||
components: {invoiceModal, addressManage},
|
||||
data () {
|
||||
name: "Pay",
|
||||
components: { invoiceModal, addressManage },
|
||||
data() {
|
||||
return {
|
||||
stepIndex: 1, // 顶部步骤条状态
|
||||
invoiceAvailable: false, // 发票编辑按钮
|
||||
showEditBtn: '', // 鼠标移入显示编辑按钮
|
||||
orderMark: '', // 订单备注
|
||||
showEditBtn: "", // 鼠标移入显示编辑按钮
|
||||
orderMark: "", // 订单备注
|
||||
invoiceData: {
|
||||
// 发票数据
|
||||
receiptTitle: '个人',
|
||||
receiptContent: '不开发票'
|
||||
receiptTitle: "个人",
|
||||
receiptContent: "不开发票",
|
||||
},
|
||||
addressList: [], // 地址列表
|
||||
selectedAddress: {}, // 所选地址
|
||||
goodsList: [], // 商品列表
|
||||
priceDetailDTO: {}, // 商品价格
|
||||
totalNum: 0, // 购买数量
|
||||
addrId: '', // 编辑地址传入的id
|
||||
addrId: "", // 编辑地址传入的id
|
||||
moreAddr: false, // 更多地址
|
||||
canUseCouponNum: 0, // 可用优惠券数量
|
||||
couponList: [], // 可用优惠券列表
|
||||
usedCouponId: [], // 已使用优惠券id
|
||||
selectedCoupon: {} // 已选优惠券对象
|
||||
selectedCoupon: {}, // 已选优惠券对象
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init () {
|
||||
init() {
|
||||
this.getGoodsDetail();
|
||||
},
|
||||
goAddressManage () {
|
||||
goAddressManage() {
|
||||
// 跳转地址管理页面
|
||||
this.$router.push('/home/MyAddress');
|
||||
this.$router.push("/home/MyAddress");
|
||||
},
|
||||
getAddress () {
|
||||
getAddress() {
|
||||
// 获取收货地址列表
|
||||
memberAddress().then((res) => {
|
||||
if (res.success) {
|
||||
@@ -346,34 +335,66 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
getGoodsDetail () {
|
||||
getGoodsDetail() {
|
||||
// 订单商品详情
|
||||
this.$Spin.show();
|
||||
cartGoodsPay({way: this.$route.query.way})
|
||||
cartGoodsPay({ way: this.$route.query.way })
|
||||
.then((res) => {
|
||||
this.$Spin.hide();
|
||||
if (res.success) {
|
||||
if (
|
||||
!res.result.checkedSkuList ||
|
||||
res.result.checkedSkuList.length === 0
|
||||
) {
|
||||
if (res.result.skuList && res.result.skuList[0]) {
|
||||
this.$Modal.warning({
|
||||
title: "购物车存在无效商品!",
|
||||
content:
|
||||
"[" +
|
||||
res.result.skuList[0].goodsSku.goodsName +
|
||||
"]" +
|
||||
res.result.skuList[0].errorMessage,
|
||||
});
|
||||
}
|
||||
this.$router.push({
|
||||
path: "/cart",
|
||||
replace: true,
|
||||
});
|
||||
}
|
||||
this.goodsList = res.result.cartList;
|
||||
this.priceDetailDTO = res.result.priceDetailDTO;
|
||||
this.skuList = res.result.skuList;
|
||||
|
||||
if (res.result.receiptVO) {
|
||||
this.invoiceData = res.result.receiptVO
|
||||
this.invoiceData = res.result.receiptVO;
|
||||
}
|
||||
let notSupArea = res.result.notSupportFreight;
|
||||
this.selectedCoupon = {};
|
||||
if (res.result.platformCoupon) this.selectedCoupon.platformCoupon = res.result.platformCoupon;
|
||||
Object.assign(this.selectedCoupon, res.result.storeCoupons);
|
||||
if (res.result.platformCoupon)
|
||||
this.selectedCoupon[res.result.platformCoupon.memberCoupon.id] =
|
||||
res.result.platformCoupon;
|
||||
if (
|
||||
res.result.storeCoupons &&
|
||||
Object.keys(res.result.storeCoupons)[0]
|
||||
) {
|
||||
let storeMemberCouponsId = Object.keys(
|
||||
res.result.storeCoupons
|
||||
)[0];
|
||||
let storeCouponId =
|
||||
res.result.storeCoupons[storeMemberCouponsId].memberCoupon.id;
|
||||
this.selectedCoupon[storeCouponId] =
|
||||
res.result.storeCoupons[storeMemberCouponsId];
|
||||
}
|
||||
if (notSupArea) {
|
||||
let content = [];
|
||||
let title = '';
|
||||
let title = "";
|
||||
notSupArea.forEach((e) => {
|
||||
title = e.errorMessage;
|
||||
content.push(e.goodsSku.goodsName);
|
||||
});
|
||||
this.$Modal.warning({
|
||||
title: '以下商品超出配送区域' || title,
|
||||
content: content.toString()
|
||||
title: "以下商品超出配送区域" || title,
|
||||
content: content.toString(),
|
||||
});
|
||||
}
|
||||
if (res.result.memberAddress) {
|
||||
@@ -384,16 +405,31 @@ export default {
|
||||
for (let i = 0; i < this.skuList.length; i++) {
|
||||
this.totalNum += this.skuList[i].num;
|
||||
}
|
||||
this.getCouponNum();
|
||||
this.usedCouponId = [];
|
||||
this.couponList = res.result.canUseCoupons;
|
||||
const couponKeys = Object.keys(this.selectedCoupon);
|
||||
if (couponKeys.length) {
|
||||
this.couponList.forEach((e) => {
|
||||
if (
|
||||
this.selectedCoupon[e.id] &&
|
||||
e.id === this.selectedCoupon[e.id].memberCoupon.id
|
||||
) {
|
||||
this.usedCouponId.push(e.id);
|
||||
}
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.$forceUpdate();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.$Spin.hide();
|
||||
});
|
||||
},
|
||||
getCouponNum () {
|
||||
getCouponNum() {
|
||||
// 获取可用优惠券数量
|
||||
couponNum({way: this.$route.query.way}).then((res) => {
|
||||
couponNum({ way: this.$route.query.way }).then((res) => {
|
||||
this.canUseCouponNum = res.result;
|
||||
if (res.result) {
|
||||
let storeArr = [];
|
||||
@@ -407,10 +443,10 @@ export default {
|
||||
let params = {
|
||||
pageNumber: 1,
|
||||
pageSize: 100,
|
||||
memberCouponStatus: 'NEW',
|
||||
memberCouponStatus: "NEW",
|
||||
scopeId: skuArr.toString(),
|
||||
storeId: storeArr.toString(),
|
||||
totalPrice: this.priceDetailDTO.goodsPrice
|
||||
totalPrice: this.priceDetailDTO.goodsPrice,
|
||||
};
|
||||
canUseCouponList(params).then((res) => {
|
||||
// 可用优惠券列表
|
||||
@@ -431,78 +467,77 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
selectAddress (item) {
|
||||
selectAddress(item) {
|
||||
// 选择地址
|
||||
let params = {
|
||||
way: this.$route.query.way,
|
||||
shippingAddressId: item.id
|
||||
shippingAddressId: item.id,
|
||||
};
|
||||
selectAddr(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('选择收货地址成功');
|
||||
this.$Message.success("选择收货地址成功");
|
||||
this.selectedAddress = item;
|
||||
this.getGoodsDetail();
|
||||
}
|
||||
});
|
||||
},
|
||||
editAddress (id) {
|
||||
editAddress(id) {
|
||||
// 编辑地址
|
||||
this.addrId = id;
|
||||
this.$refs.address.show();
|
||||
},
|
||||
addrChange () {
|
||||
addrChange() {
|
||||
// 添加,编辑地址回显
|
||||
this.getAddress();
|
||||
},
|
||||
delAddress (item) {
|
||||
delAddress(item) {
|
||||
// 删除地址
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
content: '你确定删除这个收货地址',
|
||||
title: "提示",
|
||||
content: "你确定删除这个收货地址",
|
||||
onOk: () => {
|
||||
delMemberAddress(item.id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功');
|
||||
this.$Message.success("删除成功");
|
||||
this.getAddress();
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
onCancel: () => {},
|
||||
});
|
||||
},
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: {skuId, goodsId}
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 跳转店铺首页
|
||||
goShopPage (id) {
|
||||
goShopPage(id) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/Merchant',
|
||||
query: {id: id}
|
||||
path: "/Merchant",
|
||||
query: { id: id },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
useCoupon (id, used) {
|
||||
useCoupon(id, used) {
|
||||
// 使用优惠券
|
||||
let params = {
|
||||
way: this.$route.query.way,
|
||||
memberCouponId: id,
|
||||
used: used // true 为使用, false为弃用
|
||||
used: used, // true 为使用, false为弃用
|
||||
};
|
||||
selectCoupon(params).then((res) => {
|
||||
if (res.success) this.init();
|
||||
});
|
||||
},
|
||||
editInvoice () {
|
||||
editInvoice() {
|
||||
// 编辑发票信息
|
||||
this.$refs.invModal.invoiceAvailable = true;
|
||||
},
|
||||
getInvMsg (item) {
|
||||
getInvMsg(item) {
|
||||
// 获取发票信息
|
||||
if (item) {
|
||||
this.init();
|
||||
@@ -510,18 +545,18 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
pay () {
|
||||
pay() {
|
||||
// 结算
|
||||
const params = {
|
||||
client: 'PC',
|
||||
client: "PC",
|
||||
remark: [],
|
||||
way: this.$route.query.way
|
||||
way: this.$route.query.way,
|
||||
};
|
||||
this.goodsList.forEach((e) => {
|
||||
if (e.remark) {
|
||||
params.remark.push({
|
||||
remark: e.remark,
|
||||
storeId: e.storeId
|
||||
storeId: e.storeId,
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -533,12 +568,13 @@ export default {
|
||||
.then((res) => {
|
||||
this.$Spin.hide();
|
||||
if (res.success) {
|
||||
if (params.way === 'POINTS') { // 积分支付不需要跳转支付页面
|
||||
this.$router.push('/payDone')
|
||||
if (params.way === "POINTS") {
|
||||
// 积分支付不需要跳转支付页面
|
||||
this.$router.push("/payDone");
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: '/payment',
|
||||
query: {orderType: 'TRADE', sn: res.result.sn}
|
||||
path: "/payment",
|
||||
query: { orderType: "TRADE", sn: res.result.sn },
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -548,27 +584,30 @@ export default {
|
||||
});
|
||||
},
|
||||
// 优惠券可用范围
|
||||
useScope (type) {
|
||||
let goods = '全部商品';
|
||||
useScope(type) {
|
||||
let goods = "全部商品";
|
||||
switch (type) {
|
||||
case 'ALL':
|
||||
goods = '全部商品';
|
||||
case "ALL":
|
||||
goods = "全部商品";
|
||||
break;
|
||||
case 'PORTION_GOODS':
|
||||
goods = '部分商品';
|
||||
case "PORTION_GOODS":
|
||||
goods = "部分商品";
|
||||
break;
|
||||
case 'PORTION_GOODS_CATEGORY':
|
||||
goods = '部分分类商品';
|
||||
case "PORTION_GOODS_CATEGORY":
|
||||
goods = "部分分类商品";
|
||||
break;
|
||||
}
|
||||
return `${goods}可用`;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "../../assets/styles/coupon.scss";
|
||||
.goods-msg {
|
||||
overflow: hidden;
|
||||
}
|
||||
/** logo start */
|
||||
.logo {
|
||||
height: 40px;
|
||||
@@ -772,11 +811,13 @@ export default {
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
width: 1150px;
|
||||
background-color: #f8f8f8;
|
||||
margin: 10px 0 20px 0;
|
||||
|
||||
.goods-item {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
@@ -799,8 +840,12 @@ export default {
|
||||
|
||||
> span:nth-child(1) {
|
||||
font-size: 12px;
|
||||
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
> span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
> span:last-child {
|
||||
@@ -891,6 +936,7 @@ export default {
|
||||
/** content end */
|
||||
/** 底部支付栏 */
|
||||
.order-footer {
|
||||
z-index: 20;
|
||||
height: 50px;
|
||||
@include background_color($light_white_background_color);
|
||||
@include title_color($title_color);
|
||||
|
||||
@@ -6,14 +6,23 @@
|
||||
<div class="promotion-decorate">限时秒杀</div>
|
||||
<ul class="time-line">
|
||||
<template v-for="(time, index) in list">
|
||||
<li v-if="index < 5" @click="currIndex = index" :key="index" :class="{'currTimeline': currIndex === index}">
|
||||
<div>{{time.timeLine+':00'}}</div>
|
||||
<li
|
||||
v-if="index < 5"
|
||||
@click="currIndex = index"
|
||||
:key="index"
|
||||
:class="{ currTimeline: currIndex === index }"
|
||||
>
|
||||
<div>{{ time.timeLine + ":00" }}</div>
|
||||
<div v-if="currIndex === index">
|
||||
<p>{{nowHour >= time.timeLine ? '秒杀中' : '即将开始'}}</p>
|
||||
<p>{{nowHour >= time.timeLine ? '距结束' : '距开始'}} {{currTime}}</p>
|
||||
<p>{{ nowHour >= time.timeLine ? "秒杀中" : "即将开始" }}</p>
|
||||
<p>
|
||||
{{ nowHour >= time.timeLine ? "距结束" : "距开始" }} {{
|
||||
currTime
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
<div v-else class="not-curr">
|
||||
{{nowHour >= time.timeLine ? '秒杀中' : '即将开始'}}
|
||||
{{ nowHour >= time.timeLine ? "秒杀中" : "即将开始" }}
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
@@ -23,28 +32,63 @@
|
||||
<empty v-if="goodsList.length === 0" />
|
||||
<div
|
||||
v-else
|
||||
class="goods-show-info"
|
||||
class="goods-show-info1"
|
||||
v-for="(item, index) in goodsList"
|
||||
:key="index"
|
||||
@click="goGoodsDetail(item.skuId, item.goodsId)"
|
||||
>
|
||||
<div class="goods-show-img">
|
||||
<img width="220" height="220" :src="item.goodsImage" />
|
||||
<img width="200" height="200" :src="item.goodsImage" />
|
||||
</div>
|
||||
<div class="goods-show-price">
|
||||
<span>
|
||||
<span class="seckill-price text-danger">{{
|
||||
item.price | unitPrice("¥")
|
||||
}}</span>
|
||||
<span style="color:#999;text-decoration:line-through;">{{item.originalPrice | unitPrice('¥')}}</span>
|
||||
<span style="color: #999; text-decoration: line-through">{{
|
||||
item.originalPrice | unitPrice("¥")
|
||||
}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="goods-show-detail">
|
||||
<span>{{ item.goodsName }}</span>
|
||||
</div>
|
||||
<div class="goods-seckill-btn" :class="{'goods-seckill-btn-gray' : nowHour < list[currIndex].timeLine}">{{nowHour >= list[currIndex].timeLine ? '立即抢购' : '即将开始'}}</div>
|
||||
<div class="goods-show-num">
|
||||
已售<Progress style="width:110px" class="ml_10" :percent="Math.floor(item.salesNum/item.quantity)" />
|
||||
<div
|
||||
class="goods-seckill-btn"
|
||||
:class="{
|
||||
'goods-seckill-btn-gray': nowHour < list[currIndex].timeLine,
|
||||
}"
|
||||
>
|
||||
{{ nowHour >= list[currIndex].timeLine ? "立即抢购" : "即将开始" }}
|
||||
</div>
|
||||
<div
|
||||
v-if="nowHour >= list[currIndex].timeLine"
|
||||
class="goods-seckill-btn goods-seckill-btn-gray"
|
||||
>
|
||||
已售罄
|
||||
</div>
|
||||
<div v-if="nowHour >= list[currIndex].timeLine" class="goods-show-num1">
|
||||
<span
|
||||
>已售{{
|
||||
(item.quantity && item.quantity > 0
|
||||
? Math.ceil(
|
||||
(item.salesNum / (item.quantity + item.salesNum)) * 100
|
||||
)
|
||||
: 100) + "%"
|
||||
}}</span
|
||||
><Progress
|
||||
hide-info
|
||||
stroke-color="#df0021"
|
||||
style="width: 110px"
|
||||
class="ml_10"
|
||||
:percent="
|
||||
item.quantity && item.quantity > 0
|
||||
? Math.ceil(
|
||||
(item.salesNum / (item.quantity + item.salesNum)) * 100
|
||||
)
|
||||
: 100
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="goods-show-seller">
|
||||
<span>{{ item.storeName }}</span>
|
||||
@@ -55,9 +99,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {seckillByDay} from '@/api/promotion'
|
||||
import { seckillByDay } from "@/api/promotion";
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
list: [], // 秒杀时段列表
|
||||
goodsList: [], // 商品列表
|
||||
@@ -65,22 +109,22 @@ export default {
|
||||
currIndex: 0, // 当前时间段的下标
|
||||
currTime: 0, // 当前显示的倒计时
|
||||
diffSeconds: 0, // 倒计时时间戳
|
||||
nowHour: new Date().getHours() // 当前小时数
|
||||
}
|
||||
nowHour: new Date().getHours(), // 当前小时数
|
||||
};
|
||||
},
|
||||
beforeDestroy () {
|
||||
beforeDestroy() {
|
||||
// 销毁前清除定时器
|
||||
clearInterval(this.interval);
|
||||
},
|
||||
watch: {
|
||||
currIndex (val) {
|
||||
clearInterval(this.interval)
|
||||
this.interval = null
|
||||
this.nowHour = new Date().getHours()
|
||||
this.countDown(val)
|
||||
this.goodsList = this.list[val].seckillGoodsList
|
||||
currIndex(val) {
|
||||
clearInterval(this.interval);
|
||||
this.interval = null;
|
||||
this.nowHour = new Date().getHours();
|
||||
this.countDown(val);
|
||||
this.goodsList = this.list[val].seckillGoodsList;
|
||||
},
|
||||
diffSeconds (val) {
|
||||
diffSeconds(val) {
|
||||
const hours = Math.floor(val / 3600);
|
||||
// 当前秒数 / 60,向下取整
|
||||
// 获取到所有分钟数 3600 / 60 = 60分钟
|
||||
@@ -88,66 +132,72 @@ export default {
|
||||
const minutes = Math.floor(val / 60) % 60;
|
||||
// 当前的秒数 % 60,获取到 超过小时数、分钟数的秒数(秒数)
|
||||
const seconds = val % 60;
|
||||
this.currTime = filteTime(hours) + ':' + filteTime(minutes) + ':' + filteTime(seconds)
|
||||
this.currTime =
|
||||
filteTime(hours) + ":" + filteTime(minutes) + ":" + filteTime(seconds);
|
||||
if (val <= 0) {
|
||||
clearInterval(this.interval)
|
||||
this.interval = null
|
||||
clearInterval(this.interval);
|
||||
this.interval = null;
|
||||
}
|
||||
function filteTime (time) {
|
||||
function filteTime(time) {
|
||||
if (time < 10) {
|
||||
return '0' + time
|
||||
return "0" + time;
|
||||
} else {
|
||||
return time
|
||||
return time;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getListByDay () { // 当天秒杀活动
|
||||
seckillByDay().then(res => {
|
||||
getListByDay() {
|
||||
// 当天秒杀活动
|
||||
seckillByDay().then((res) => {
|
||||
if (res.success) {
|
||||
this.list = res.result
|
||||
this.goodsList = this.list[0].seckillGoodsList
|
||||
this.countDown(this.currIndex)
|
||||
this.list = res.result;
|
||||
this.goodsList = this.list[0].seckillGoodsList;
|
||||
this.countDown(this.currIndex);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
countDown (currIndex) { // 倒计时
|
||||
countDown(currIndex) {
|
||||
// 倒计时
|
||||
// 0点时间戳
|
||||
let zeroTime = new Date(new Date().toLocaleDateString()).getTime();
|
||||
let currTime = new Date().getTime()
|
||||
let currTime = new Date().getTime();
|
||||
let actTime = 0;
|
||||
let nowHour = new Date().getHours(); // 当前小时数
|
||||
if (this.list[currIndex].timeLine > nowHour) { // 活动未开始
|
||||
actTime = zeroTime + this.list[currIndex].timeLine * 3600 * 1000
|
||||
} else if (this.list[currIndex].timeLine <= nowHour) { // 活动进行中
|
||||
if (currIndex === this.list.length - 1) { // 如果是最后一个活动,直到24点结束
|
||||
actTime = zeroTime + 24 * 3600 * 1000
|
||||
if (this.list[currIndex].timeLine > nowHour) {
|
||||
// 活动未开始
|
||||
actTime = zeroTime + this.list[currIndex].timeLine * 3600 * 1000;
|
||||
} else if (this.list[currIndex].timeLine <= nowHour) {
|
||||
// 活动进行中
|
||||
if (currIndex === this.list.length - 1) {
|
||||
// 如果是最后一个活动,直到24点结束
|
||||
actTime = zeroTime + 24 * 3600 * 1000;
|
||||
} else {
|
||||
actTime = zeroTime + this.list[currIndex + 1].timeLine * 3600 * 1000
|
||||
actTime = zeroTime + this.list[currIndex + 1].timeLine * 3600 * 1000;
|
||||
}
|
||||
}
|
||||
this.diffSeconds = Math.floor((actTime - currTime) / 1000)
|
||||
this.diffSeconds = Math.floor((actTime - currTime) / 1000);
|
||||
this.interval = setInterval(() => {
|
||||
this.diffSeconds--
|
||||
}, 1000)
|
||||
}
|
||||
this.diffSeconds--;
|
||||
}, 1000);
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getListByDay()
|
||||
}
|
||||
}
|
||||
mounted() {
|
||||
this.getListByDay();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '../../assets/styles/goodsList.scss';
|
||||
@import "../../assets/styles/goodsList.scss";
|
||||
.goods-seckill-btn {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
@@ -163,16 +213,17 @@ export default {
|
||||
.goods-seckill-btn-gray {
|
||||
background-color: #666;
|
||||
}
|
||||
.promotion-decorate::before,.promotion-decorate::after{
|
||||
background-image: url('/src/assets/images/sprite@2x.png');
|
||||
.promotion-decorate::before,
|
||||
.promotion-decorate::after {
|
||||
background-image: url("/src/assets/images/sprite@2x.png");
|
||||
}
|
||||
.time-line{
|
||||
.time-line {
|
||||
width: 1200px;
|
||||
height: 60px;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
li{
|
||||
li {
|
||||
padding: 0 30px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
@@ -180,7 +231,7 @@ export default {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&:hover{
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.not-curr {
|
||||
@@ -192,16 +243,37 @@ export default {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
.currTimeline{
|
||||
.currTimeline {
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
>div:nth-child(1) {
|
||||
> div:nth-child(1) {
|
||||
font-size: 20px;
|
||||
}
|
||||
>div:nth-child(2) {
|
||||
> div:nth-child(2) {
|
||||
font-size: 14px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.goods-show-info1 {
|
||||
width: 275px;
|
||||
padding: 6px;
|
||||
margin: 10px 0px;
|
||||
margin-left: 5px;
|
||||
position: relative;
|
||||
border: 1px solid #fff;
|
||||
cursor: pointer;
|
||||
background-color: #fff;
|
||||
}
|
||||
.goods-show-info1:hover {
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 0px 0px 15px #ccc;
|
||||
}
|
||||
.goods-show-img {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.ivu-progress-success .ivu-progress-bg {
|
||||
background-color: #111fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -205,7 +205,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
visible: false, // 预览图片
|
||||
loading: false, // 加载状态
|
||||
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
return {
|
||||
loading: false, // 加载状态
|
||||
uploadLoading: false, // 上传加载状态
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
previewPicture: '', // 预览图片
|
||||
address: '', // 回显地址
|
||||
|
||||
@@ -15,10 +15,15 @@
|
||||
>
|
||||
<div class="user-icon">
|
||||
<div class="user-img">
|
||||
<img :src="userInfo.face" style="width:100%;height:100%;" v-if="userInfo.face" alt />
|
||||
<img
|
||||
:src="userInfo.face"
|
||||
style="width: 100%; height: 100%"
|
||||
v-if="userInfo.face"
|
||||
alt
|
||||
/>
|
||||
<Avatar icon="ios-person" class="mb_10" v-else size="96" />
|
||||
</div>
|
||||
<p>{{userInfo.nickName}}</p>
|
||||
<p>{{ userInfo.nickName }}</p>
|
||||
</div>
|
||||
|
||||
<!-- 循环导航栏 -->
|
||||
@@ -38,7 +43,6 @@
|
||||
>{{ chlidren.title }}</MenuItem
|
||||
>
|
||||
</Submenu>
|
||||
|
||||
</Menu>
|
||||
</Sider>
|
||||
<Layout class="layout ml_10">
|
||||
@@ -54,32 +58,33 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import menuList from './menu';
|
||||
import Storage from '@/plugins/storage.js';
|
||||
import menuList from "./menu";
|
||||
import Storage from "@/plugins/storage.js";
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
data () {
|
||||
name: "Home",
|
||||
data() {
|
||||
return {
|
||||
menuList // 会员中心左侧列表
|
||||
menuList, // 会员中心左侧列表
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
userInfo () { // 用户信息
|
||||
return JSON.parse(Storage.getItem('userInfo'));
|
||||
}
|
||||
userInfo() {
|
||||
// 用户信息
|
||||
if (Storage.getItem("userInfo")) {
|
||||
return JSON.parse(Storage.getItem("userInfo"));
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 每次点击左侧bar的callback
|
||||
onSelect (name) {
|
||||
this.$router.push({name: name});
|
||||
onSelect(name) {
|
||||
this.$router.push({ name: name });
|
||||
},
|
||||
// 跳转到个人中心的首页
|
||||
toUserMain () {
|
||||
this.$router.push(`/home`);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,132 +1,200 @@
|
||||
/**
|
||||
* 一些常用的基础方法
|
||||
* unixToDate 将unix时间戳转换为指定格式
|
||||
* dateToUnix 将时间转unix时间戳
|
||||
* deepClone 对一个对象进行深拷贝
|
||||
* formatPrice 货币格式化
|
||||
* secrecyMobile 手机号隐私保护
|
||||
* randomString 随机生成指定长度的字符串
|
||||
*/
|
||||
|
||||
/**
|
||||
* 将unix时间戳转换为指定格式
|
||||
* @param unix 时间戳【秒】
|
||||
* @param format 转换格式
|
||||
* @returns {*|string}
|
||||
*/
|
||||
function unixToDate (unix, format) {
|
||||
if (!unix) return unix
|
||||
let _format = format || 'yyyy-MM-dd hh:mm:ss'
|
||||
const d = new Date(unix)
|
||||
const o = {
|
||||
'M+': d.getMonth() + 1,
|
||||
'd+': d.getDate(),
|
||||
'h+': d.getHours(),
|
||||
'm+': d.getMinutes(),
|
||||
's+': d.getSeconds(),
|
||||
'q+': Math.floor((d.getMonth() + 3) / 3),
|
||||
S: d.getMilliseconds()
|
||||
}
|
||||
if (/(y+)/.test(_format)) _format = _format.replace(RegExp.$1, (d.getFullYear() + '').substr(4 - RegExp.$1.length))
|
||||
for (const k in o)
|
||||
if (new RegExp('(' + k + ')').test(_format)) _format = _format.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) :
|
||||
(('00' + o[k]).substr(('' + o[k]).length)))
|
||||
return _format
|
||||
}
|
||||
|
||||
/**
|
||||
* 将时间转unix时间戳
|
||||
* @param date
|
||||
* @returns {number} 【秒】
|
||||
*/
|
||||
function dateToUnix (date) {
|
||||
let newStr = date.replace(/:/g, '-')
|
||||
newStr = newStr.replace(/ /g, '-')
|
||||
const arr = newStr.split('-')
|
||||
const datum = new Date(Date.UTC(
|
||||
arr[0],
|
||||
arr[1] - 1,
|
||||
arr[2],
|
||||
arr[3] - 8 || -8,
|
||||
arr[4] || 0,
|
||||
arr[5] || 0
|
||||
))
|
||||
return parseInt(datum.getTime() / 1000)
|
||||
}
|
||||
|
||||
/**
|
||||
* 货币格式化
|
||||
* @param price
|
||||
* @returns {string}
|
||||
*/
|
||||
function formatPrice (price) {
|
||||
if (typeof price !== 'number') return price
|
||||
return String(Number(price).toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号隐私保护
|
||||
* 隐藏中间四位数字
|
||||
* @param mobile
|
||||
* @returns {*}
|
||||
*/
|
||||
function secrecyMobile (mobile) {
|
||||
mobile = String(mobile)
|
||||
if (!/\d{11}/.test(mobile)) {
|
||||
return mobile
|
||||
}
|
||||
return mobile.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3')
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机生成指定长度的字符串
|
||||
* @param length
|
||||
* @returns {string}
|
||||
*/
|
||||
function randomString (length = 32) {
|
||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
|
||||
const maxPos = chars.length
|
||||
let _string = ''
|
||||
for (let i = 0; i < length; i++) {
|
||||
_string += chars.charAt(Math.floor(Math.random() * maxPos))
|
||||
}
|
||||
return _string
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算传秒数的倒计时【天、时、分、秒】
|
||||
* @param seconds
|
||||
* @returns {{day : *, hours : *, minutes : *, seconds : *}}
|
||||
*/
|
||||
|
||||
function countTimeDown (seconds) {
|
||||
const leftTime = (time) => {
|
||||
if (time < 10) time = '0' + time
|
||||
return time + ''
|
||||
}
|
||||
return {
|
||||
day: leftTime(parseInt(seconds / 60 / 60 / 24, 10)),
|
||||
hours: leftTime(parseInt(seconds / 60 / 60 % 24, 10)),
|
||||
minutes: leftTime(parseInt(seconds / 60 % 60, 10)),
|
||||
seconds: leftTime(parseInt(seconds % 60, 10))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算当前时间到第二天0点的倒计时[秒]
|
||||
* @returns {number}
|
||||
*/
|
||||
function theNextDayTime () {
|
||||
const nowDate = new Date()
|
||||
const time = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate() + 1, 0, 0, 0).getTime() - nowDate.getTime()
|
||||
return parseInt(time / 1000)
|
||||
}
|
||||
export {
|
||||
unixToDate,
|
||||
dateToUnix,
|
||||
formatPrice,
|
||||
secrecyMobile,
|
||||
randomString,
|
||||
countTimeDown,
|
||||
theNextDayTime
|
||||
}
|
||||
/**
|
||||
* 一些常用的基础方法
|
||||
* unixToDate 将unix时间戳转换为指定格式
|
||||
* dateToUnix 将时间转unix时间戳
|
||||
* deepClone 对一个对象进行深拷贝
|
||||
* formatPrice 货币格式化
|
||||
* secrecyMobile 手机号隐私保护
|
||||
* randomString 随机生成指定长度的字符串
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 验证银行卡号
|
||||
*/
|
||||
export function checkBankno(bankno) {
|
||||
var lastNum = bankno.substr(bankno.length - 1, 1); //取出最后一位(与luhm进行比较)
|
||||
var first15Num = bankno.substr(0, bankno.length - 1); //前15或18位
|
||||
var newArr = [];
|
||||
|
||||
for (var i = first15Num.length - 1; i > -1; i--) {
|
||||
//前15或18位倒序存进数组
|
||||
newArr.push(first15Num.substr(i, 1));
|
||||
}
|
||||
|
||||
var arrJiShu = []; //奇数位*2的积 <9
|
||||
var arrJiShu2 = []; //奇数位*2的积 >9
|
||||
var arrOuShu = []; //偶数位数组
|
||||
for (var j = 0; j < newArr.length; j++) {
|
||||
if ((j + 1) % 2 == 1) {
|
||||
//奇数位
|
||||
if (parseInt(newArr[j]) * 2 < 9) arrJiShu.push(parseInt(newArr[j]) * 2);
|
||||
else arrJiShu2.push(parseInt(newArr[j]) * 2);
|
||||
} //偶数位
|
||||
else arrOuShu.push(newArr[j]);
|
||||
}
|
||||
|
||||
var jishu_child1 = []; //奇数位*2 >9 的分割之后的数组个位数
|
||||
var jishu_child2 = []; //奇数位*2 >9 的分割之后的数组十位数
|
||||
for (var h = 0; h < arrJiShu2.length; h++) {
|
||||
jishu_child1.push(parseInt(arrJiShu2[h]) % 10);
|
||||
jishu_child2.push(parseInt(arrJiShu2[h]) / 10);
|
||||
}
|
||||
|
||||
var sumJiShu = 0; //奇数位*2 < 9 的数组之和
|
||||
var sumOuShu = 0; //偶数位数组之和
|
||||
var sumJiShuChild1 = 0; //奇数位*2 >9 的分割之后的数组个位数之和
|
||||
var sumJiShuChild2 = 0; //奇数位*2 >9 的分割之后的数组十位数之和
|
||||
var sumTotal = 0;
|
||||
for (var m = 0; m < arrJiShu.length; m++) {
|
||||
sumJiShu = sumJiShu + parseInt(arrJiShu[m]);
|
||||
}
|
||||
for (var n = 0; n < arrOuShu.length; n++) {
|
||||
sumOuShu = sumOuShu + parseInt(arrOuShu[n]);
|
||||
}
|
||||
for (var p = 0; p < jishu_child1.length; p++) {
|
||||
sumJiShuChild1 = sumJiShuChild1 + parseInt(jishu_child1[p]);
|
||||
sumJiShuChild2 = sumJiShuChild2 + parseInt(jishu_child2[p]);
|
||||
}
|
||||
//计算总和
|
||||
sumTotal =
|
||||
parseInt(sumJiShu) +
|
||||
parseInt(sumOuShu) +
|
||||
parseInt(sumJiShuChild1) +
|
||||
parseInt(sumJiShuChild2);
|
||||
//计算Luhm值
|
||||
var k = parseInt(sumTotal) % 10 == 0 ? 10 : parseInt(sumTotal) % 10;
|
||||
var luhm = 10 - k;
|
||||
if (lastNum == luhm) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 将unix时间戳转换为指定格式
|
||||
* @param unix 时间戳【秒】
|
||||
* @param format 转换格式
|
||||
* @returns {*|string}
|
||||
*/
|
||||
function unixToDate (unix, format) {
|
||||
if (!unix) return unix
|
||||
let _format = format || 'yyyy-MM-dd hh:mm:ss'
|
||||
const d = new Date(unix)
|
||||
const o = {
|
||||
'M+': d.getMonth() + 1,
|
||||
'd+': d.getDate(),
|
||||
'h+': d.getHours(),
|
||||
'm+': d.getMinutes(),
|
||||
's+': d.getSeconds(),
|
||||
'q+': Math.floor((d.getMonth() + 3) / 3),
|
||||
S: d.getMilliseconds()
|
||||
}
|
||||
if (/(y+)/.test(_format)) _format = _format.replace(RegExp.$1, (d.getFullYear() + '').substr(4 - RegExp.$1.length))
|
||||
for (const k in o)
|
||||
if (new RegExp('(' + k + ')').test(_format)) _format = _format.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) :
|
||||
(('00' + o[k]).substr(('' + o[k]).length)))
|
||||
return _format
|
||||
}
|
||||
|
||||
/**
|
||||
* 将时间转unix时间戳
|
||||
* @param date
|
||||
* @returns {number} 【秒】
|
||||
*/
|
||||
function dateToUnix (date) {
|
||||
let newStr = date.replace(/:/g, '-')
|
||||
newStr = newStr.replace(/ /g, '-')
|
||||
const arr = newStr.split('-')
|
||||
const datum = new Date(Date.UTC(
|
||||
arr[0],
|
||||
arr[1] - 1,
|
||||
arr[2],
|
||||
arr[3] - 8 || -8,
|
||||
arr[4] || 0,
|
||||
arr[5] || 0
|
||||
))
|
||||
return parseInt(datum.getTime() / 1000)
|
||||
}
|
||||
|
||||
/**
|
||||
* 货币格式化
|
||||
* @param price
|
||||
* @returns {string}
|
||||
*/
|
||||
function formatPrice (price) {
|
||||
if (typeof price !== 'number') return price
|
||||
return String(Number(price).toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号隐私保护
|
||||
* 隐藏中间四位数字
|
||||
* @param mobile
|
||||
* @returns {*}
|
||||
*/
|
||||
function secrecyMobile (mobile) {
|
||||
mobile = String(mobile)
|
||||
if (!/\d{11}/.test(mobile)) {
|
||||
return mobile
|
||||
}
|
||||
return mobile.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3')
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机生成指定长度的字符串
|
||||
* @param length
|
||||
* @returns {string}
|
||||
*/
|
||||
function randomString (length = 32) {
|
||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
|
||||
const maxPos = chars.length
|
||||
let _string = ''
|
||||
for (let i = 0; i < length; i++) {
|
||||
_string += chars.charAt(Math.floor(Math.random() * maxPos))
|
||||
}
|
||||
return _string
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算传秒数的倒计时【天、时、分、秒】
|
||||
* @param seconds
|
||||
* @returns {{day : *, hours : *, minutes : *, seconds : *}}
|
||||
*/
|
||||
|
||||
function countTimeDown (seconds) {
|
||||
const leftTime = (time) => {
|
||||
if (time < 10) time = '0' + time
|
||||
return time + ''
|
||||
}
|
||||
return {
|
||||
day: leftTime(parseInt(seconds / 60 / 60 / 24, 10)),
|
||||
hours: leftTime(parseInt(seconds / 60 / 60 % 24, 10)),
|
||||
minutes: leftTime(parseInt(seconds / 60 % 60, 10)),
|
||||
seconds: leftTime(parseInt(seconds % 60, 10))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算当前时间到第二天0点的倒计时[秒]
|
||||
* @returns {number}
|
||||
*/
|
||||
function theNextDayTime () {
|
||||
const nowDate = new Date()
|
||||
const time = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate() + 1, 0, 0, 0).getTime() - nowDate.getTime()
|
||||
return parseInt(time / 1000)
|
||||
}
|
||||
export {
|
||||
unixToDate,
|
||||
dateToUnix,
|
||||
formatPrice,
|
||||
secrecyMobile,
|
||||
randomString,
|
||||
countTimeDown,
|
||||
theNextDayTime
|
||||
}
|
||||
|
||||
@@ -2,28 +2,29 @@ import axios from 'axios';
|
||||
import https from 'https';
|
||||
import { Message, Spin, Modal } from 'view-design';
|
||||
import Storage from './storage';
|
||||
import config from '@/config';
|
||||
import router from '../router/index.js';
|
||||
import store from '../vuex/store';
|
||||
import { handleRefreshToken } from '@/api/index';
|
||||
import { v4 as uuidv4} from 'uuid';
|
||||
|
||||
const qs = require('qs');
|
||||
// api地址
|
||||
export const buyerUrl =
|
||||
process.env.NODE_ENV === 'development'
|
||||
? config.api_dev.buyer
|
||||
: config.api_prod.buyer;
|
||||
? BASE.API_DEV.buyer
|
||||
: BASE.API_PROD.buyer;
|
||||
export const commonUrl =
|
||||
process.env.NODE_ENV === 'development'
|
||||
? config.api_dev.common
|
||||
: config.api_prod.common;
|
||||
? BASE.API_DEV.common
|
||||
: BASE.API_PROD.common;
|
||||
export const managerUrl =
|
||||
process.env.NODE_ENV === 'development'
|
||||
? config.api_dev.manager
|
||||
: config.api_prod.manager;
|
||||
? BASE.API_DEV.manager
|
||||
: BASE.API_PROD.manager;
|
||||
export const sellerUrl =
|
||||
process.env.NODE_ENV === 'development'
|
||||
? config.api_dev.seller
|
||||
: config.api_prod.seller;
|
||||
? BASE.API_DEV.seller
|
||||
: BASE.API_PROD.seller;
|
||||
// 创建axios实例
|
||||
var isRefreshToken = 0;
|
||||
const refreshToken = getTokenDebounce();
|
||||
@@ -60,7 +61,11 @@ service.interceptors.request.use(
|
||||
config.loading = Spin.show();
|
||||
}
|
||||
|
||||
const uuid = Storage.getItem('uuid');
|
||||
let uuid = Storage.getItem('uuid');
|
||||
if (!uuid) {
|
||||
uuid = uuidv4();
|
||||
Storage.setItem('uuid', uuid);
|
||||
}
|
||||
config.headers['uuid'] = uuid;
|
||||
|
||||
// 获取访问Token
|
||||
@@ -83,7 +88,7 @@ service.interceptors.request.use(
|
||||
}
|
||||
);
|
||||
|
||||
async function refresh (error) {
|
||||
async function refresh(error) {
|
||||
const getTokenRes = await refreshToken();
|
||||
if (getTokenRes === 'success') {
|
||||
// 刷新token
|
||||
@@ -116,7 +121,8 @@ async function refresh (error) {
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
router.go(0)
|
||||
// router.go(0)
|
||||
router.push("/");
|
||||
Modal.remove();
|
||||
}
|
||||
});
|
||||
@@ -136,7 +142,7 @@ service.interceptors.response.use(
|
||||
const errorResponse = error.response || {};
|
||||
const errorData = errorResponse.data || {};
|
||||
|
||||
if (errorResponse.status === 403) {
|
||||
if (errorResponse.status === 401 || errorResponse.status === 403 || error.response.data.code === 20004) {
|
||||
isRefreshToken++;
|
||||
|
||||
if (isRefreshToken === 1) {
|
||||
|
||||
@@ -1,344 +1,391 @@
|
||||
import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
import Index from '@/pages/Index';
|
||||
const Login = resolve => require(['@/pages/Login'], resolve);
|
||||
const SignUp = resolve => require(['@/pages/SignUp'], resolve);
|
||||
const ForgetPassword = resolve => require(['@/pages/ForgetPassword'], resolve);
|
||||
const GoodsList = resolve => require(['@/pages/GoodsList'], resolve);
|
||||
const GoodsDetail = resolve => require(['@/pages/GoodsDetail'], resolve);
|
||||
const PointGoodsDetail = resolve => require(['@/pages/promotion/PointGoodsDetail'], resolve);
|
||||
const ShoppingCart = resolve => require(['@/pages/ShoppingCart'], resolve);
|
||||
const Cart = resolve => require(['@/pages/Cart'], resolve);
|
||||
const Pay = resolve => require(['@/pages/payment/Pay'], resolve);
|
||||
const PayDone = resolve => require(['@/pages/payment/PayDone'], resolve);
|
||||
const PayMent = resolve => require(['@/pages/payment/PayMent'], resolve);
|
||||
const ThirdPay = resolve => require(['@/pages/payment/ThirdPay'], resolve);
|
||||
const Coupon = resolve => require(['@/pages/CouponCenter'], resolve);
|
||||
const seckill = resolve => require(['@/pages/promotion/seckill'], resolve);
|
||||
const article = resolve => require(['@/pages/article/index'], resolve);
|
||||
const PointMall = resolve => require(['@/pages/promotion/PointMall'], resolve);
|
||||
import Vue from "vue";
|
||||
import Router from "vue-router";
|
||||
import Index from "@/pages/Index";
|
||||
const Login = (resolve) => require(["@/pages/Login"], resolve);
|
||||
const SignUp = (resolve) => require(["@/pages/SignUp"], resolve);
|
||||
const ForgetPassword = (resolve) =>
|
||||
require(["@/pages/ForgetPassword"], resolve);
|
||||
const GoodsList = (resolve) => require(["@/pages/GoodsList"], resolve);
|
||||
const GoodsDetail = (resolve) => require(["@/pages/GoodsDetail"], resolve);
|
||||
const PointGoodsDetail = (resolve) =>
|
||||
require(["@/pages/promotion/PointGoodsDetail"], resolve);
|
||||
const ShoppingCart = (resolve) => require(["@/pages/ShoppingCart"], resolve);
|
||||
const Cart = (resolve) => require(["@/pages/Cart"], resolve);
|
||||
const Pay = (resolve) => require(["@/pages/payment/Pay"], resolve);
|
||||
const PayDone = (resolve) => require(["@/pages/payment/PayDone"], resolve);
|
||||
const PayMent = (resolve) => require(["@/pages/payment/PayMent"], resolve);
|
||||
const ThirdPay = (resolve) => require(["@/pages/payment/ThirdPay"], resolve);
|
||||
const Coupon = (resolve) => require(["@/pages/CouponCenter"], resolve);
|
||||
const seckill = (resolve) => require(["@/pages/promotion/seckill"], resolve);
|
||||
const article = (resolve) => require(["@/pages/article/index"], resolve);
|
||||
const articleDetail = (resolve) => require(["@/pages/article/detail"], resolve);
|
||||
const PointMall = (resolve) =>
|
||||
require(["@/pages/promotion/PointMall"], resolve);
|
||||
|
||||
/*
|
||||
* 会员中心
|
||||
* 订单列表
|
||||
*/
|
||||
const MyOrder = resolve => require([`@/pages/home/orderCenter/MyOrder`], resolve);
|
||||
const OrderDetail = resolve => require([`@/pages/home/orderCenter/OrderDetail`], resolve);
|
||||
const MyAddress = resolve => require(['@/pages/home/orderCenter/MyAddress'], resolve);
|
||||
const AddAddress = resolve => require(['@/pages/home/orderCenter/AddAddress'], resolve);
|
||||
const Complain = resolve => require(['@/pages/home/orderCenter/Complain'], resolve);
|
||||
const AfterSale = resolve => require(['@/pages/home/orderCenter/AfterSale'], resolve);
|
||||
const AfterSaleDetail = resolve => require(['@/pages/home/orderCenter/AfterSaleDetail'], resolve);
|
||||
const ApplyAfterSale = resolve => require(['@/pages/home/orderCenter/ApplyAfterSale'], resolve);
|
||||
const MyOrder = (resolve) =>
|
||||
require([`@/pages/home/orderCenter/MyOrder`], resolve);
|
||||
const OrderDetail = (resolve) =>
|
||||
require([`@/pages/home/orderCenter/OrderDetail`], resolve);
|
||||
const MyAddress = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/MyAddress"], resolve);
|
||||
const AddAddress = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/AddAddress"], resolve);
|
||||
const Complain = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/Complain"], resolve);
|
||||
const AfterSale = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/AfterSale"], resolve);
|
||||
const AfterSaleDetail = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/AfterSaleDetail"], resolve);
|
||||
const ApplyAfterSale = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/ApplyAfterSale"], resolve);
|
||||
|
||||
/*
|
||||
* 会员中心
|
||||
*/
|
||||
const Profile = resolve => require(['@/pages/home/memberCenter/Profile'], resolve);
|
||||
const AccountSafe = resolve => require(['@/pages/home/memberCenter/AccountSafe'], resolve);
|
||||
const ModifyPwd = resolve => require(['@/pages/home/memberCenter/ModifyPwd'], resolve);
|
||||
const Favorites = resolve => require(['@/pages/home/memberCenter/Favorites'], resolve);
|
||||
const Distribution = resolve => require(['@/pages/home/memberCenter/Distribution'], resolve);
|
||||
const CommentList = resolve => require(['@/pages/home/memberCenter/CommentList'], resolve); // 评价列表
|
||||
const AddEval = resolve => require(['@/pages/home/memberCenter/evaluation/AddEval'], resolve); // 添加评价
|
||||
const EvalDetail = resolve => require(['@/pages/home/memberCenter/evaluation/EvalDetail'], resolve);
|
||||
const ComplainList = resolve => require(['@/pages/home/memberCenter/ComplainList'], resolve);
|
||||
const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve);
|
||||
const Point = resolve => require(['@/pages/home/memberCenter/Point'], resolve);
|
||||
const MsgList = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgList'], resolve);
|
||||
const MsgDetail = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgDetail'], resolve);
|
||||
const Profile = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/Profile"], resolve);
|
||||
const AccountSafe = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/AccountSafe"], resolve);
|
||||
const ModifyPwd = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/ModifyPwd"], resolve);
|
||||
const Favorites = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/Favorites"], resolve);
|
||||
const Distribution = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/Distribution"], resolve);
|
||||
const CommentList = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/CommentList"], resolve); // 评价列表
|
||||
const AddEval = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/evaluation/AddEval"], resolve); // 添加评价
|
||||
const EvalDetail = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/evaluation/EvalDetail"], resolve);
|
||||
const ComplainList = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/ComplainList"], resolve);
|
||||
const ComplainDetail = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/ComplainDetail"], resolve);
|
||||
const Point = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/Point"], resolve);
|
||||
const MsgList = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/memberMsg/MsgList"], resolve);
|
||||
const MsgDetail = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/memberMsg/MsgDetail"], resolve);
|
||||
|
||||
/*
|
||||
* 会员中心
|
||||
* 账户中心
|
||||
* */
|
||||
const Coupons = resolve => require(['@/pages/home/userCenter/Coupons'], resolve);
|
||||
const MyTracks = resolve => require(['@/pages/home/userCenter/MyTracks'], resolve);
|
||||
const MoneyManagement = resolve => require(['@/pages/home/userCenter/MoneyManagement'], resolve);
|
||||
const Coupons = (resolve) =>
|
||||
require(["@/pages/home/userCenter/Coupons"], resolve);
|
||||
const MyTracks = (resolve) =>
|
||||
require(["@/pages/home/userCenter/MyTracks"], resolve);
|
||||
const MoneyManagement = (resolve) =>
|
||||
require(["@/pages/home/userCenter/MoneyManagement"], resolve);
|
||||
|
||||
const Home = resolve => require(['@/pages/user/Home'], resolve);
|
||||
const Home = (resolve) => require(["@/pages/user/Home"], resolve);
|
||||
|
||||
const Merchant = resolve => require(['@/pages/Merchant'], resolve);
|
||||
const UserMain = resolve => require(['@/pages/home/Main'], resolve);
|
||||
const Merchant = (resolve) => require(["@/pages/Merchant"], resolve);
|
||||
const UserMain = (resolve) => require(["@/pages/home/Main"], resolve);
|
||||
|
||||
/**
|
||||
* 店铺入驻
|
||||
*/
|
||||
const ShopEntry = resolve => require(['@/pages/shopEntry/ShopEntry'], resolve);
|
||||
const ShopEntry = (resolve) =>
|
||||
require(["@/pages/shopEntry/ShopEntry"], resolve);
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
/**
|
||||
* 解决重复点击菜单会控制台报错bug
|
||||
*/
|
||||
const routerPush = Router.prototype.push
|
||||
Router.prototype.push = function push(location) {
|
||||
return routerPush.call(this, location).catch(error=> error)
|
||||
}
|
||||
|
||||
export default new Router({
|
||||
mode: 'history',
|
||||
routes: [{
|
||||
path: '/', // 首页
|
||||
name: 'Index',
|
||||
component: Index
|
||||
},
|
||||
{
|
||||
path: '/login', // 登陆
|
||||
name: 'login',
|
||||
component: Login,
|
||||
meta: {
|
||||
title: 'LiLi 登录'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/SignUp', // 注册
|
||||
name: 'SignUp',
|
||||
component: SignUp,
|
||||
meta: {
|
||||
title: 'LiLi 注册'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/forgetPassword', // 忘记密码
|
||||
name: 'forgetPassword',
|
||||
component: ForgetPassword,
|
||||
meta: {
|
||||
title: 'LiLi 忘记密码'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/goodsList', // 商品列表
|
||||
name: 'GoodsList',
|
||||
component: GoodsList
|
||||
},
|
||||
{
|
||||
path: '/goodsDetail', // 商品详情
|
||||
name: 'GoodsDetail',
|
||||
component: GoodsDetail,
|
||||
meta: {title: '商品详情'}
|
||||
},
|
||||
{
|
||||
path: '/pointGoodsDetail', // 商品详情
|
||||
name: 'PointGoodsDetail',
|
||||
component: PointGoodsDetail,
|
||||
meta: {title: '积分商品'}
|
||||
},
|
||||
{
|
||||
path: '/shoppingCart', // 头部购物车
|
||||
name: 'ShoppingCart',
|
||||
component: ShoppingCart
|
||||
},
|
||||
{
|
||||
path: '/cart', // 购物车
|
||||
name: 'Cart',
|
||||
component: Cart,
|
||||
meta: {title: '购物车'}
|
||||
},
|
||||
{
|
||||
path: '/pay', // 支付页面
|
||||
name: 'Pay',
|
||||
component: Pay,
|
||||
meta: {title: '订单结算'}
|
||||
},
|
||||
{
|
||||
path: '/payMent',
|
||||
name: 'PayMent',
|
||||
component: PayMent
|
||||
},
|
||||
{
|
||||
path: '/PointMall',
|
||||
name: 'PointMall',
|
||||
component: PointMall,
|
||||
meta: {title: '积分商城'}
|
||||
},
|
||||
{
|
||||
path: '/qrpay', // 三方支付
|
||||
name: 'qrpay',
|
||||
component: ThirdPay
|
||||
},
|
||||
{
|
||||
path: '/payDone', // 支付成功页面
|
||||
name: 'PayDone',
|
||||
component: PayDone
|
||||
},
|
||||
{
|
||||
path: '/article', // 文章页面
|
||||
name: 'article',
|
||||
component: article,
|
||||
meta: {
|
||||
title: '帮助中心'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/shopEntry',
|
||||
name: 'shopEntry',
|
||||
component: ShopEntry,
|
||||
meta: {
|
||||
title: '店铺入驻'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/coupon',
|
||||
name: 'coupon',
|
||||
component: Coupon,
|
||||
meta: {
|
||||
title: '领券中心'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/seckill',
|
||||
name: 'seckill',
|
||||
component: seckill,
|
||||
meta: {
|
||||
title: '限时秒杀'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/home', // 主页
|
||||
component: Home,
|
||||
children: [{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: UserMain,
|
||||
mode: "history",
|
||||
routes: [
|
||||
{
|
||||
path: "/", // 首页
|
||||
name: "Index",
|
||||
component: Index,
|
||||
},
|
||||
{
|
||||
path: "/login", // 登陆
|
||||
name: "login",
|
||||
component: Login,
|
||||
meta: {
|
||||
title: '会员中心'
|
||||
}
|
||||
title: "登录",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'MyTracks',
|
||||
name: 'MyTracks',
|
||||
component: MyTracks,
|
||||
meta: {title: '我的足迹'}
|
||||
path: "/SignUp", // 注册
|
||||
name: "SignUp",
|
||||
component: SignUp,
|
||||
meta: {
|
||||
title: "注册",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'MoneyManagement',
|
||||
name: 'MoneyManagement',
|
||||
component: MoneyManagement
|
||||
path: "/forgetPassword", // 忘记密码
|
||||
name: "forgetPassword",
|
||||
component: ForgetPassword,
|
||||
meta: {
|
||||
title: "忘记密码",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'Complain',
|
||||
name: 'Complain',
|
||||
component: Complain
|
||||
path: "/goodsList", // 商品列表
|
||||
name: "GoodsList",
|
||||
component: GoodsList,
|
||||
},
|
||||
{
|
||||
path: 'Coupons',
|
||||
name: 'Coupons',
|
||||
component: Coupons
|
||||
path: "/goodsDetail", // 商品详情
|
||||
name: "GoodsDetail",
|
||||
component: GoodsDetail,
|
||||
meta: { title: "商品详情" },
|
||||
},
|
||||
{
|
||||
path: 'CommentList',
|
||||
name: 'CommentList',
|
||||
component: CommentList,
|
||||
mate: {title: '评价列表'}
|
||||
path: "/pointGoodsDetail", // 商品详情
|
||||
name: "PointGoodsDetail",
|
||||
component: PointGoodsDetail,
|
||||
meta: { title: "积分商品" },
|
||||
},
|
||||
{
|
||||
path: 'AddEval',
|
||||
name: 'AddEval',
|
||||
component: AddEval,
|
||||
mate: {title: '添加评价'}
|
||||
path: "/shoppingCart", // 头部购物车
|
||||
name: "ShoppingCart",
|
||||
component: ShoppingCart,
|
||||
},
|
||||
{
|
||||
path: 'EvalDetail',
|
||||
name: 'EvalDetail',
|
||||
component: EvalDetail,
|
||||
mate: {title: '评价详情'}
|
||||
path: "/cart", // 购物车
|
||||
name: "Cart",
|
||||
component: Cart,
|
||||
meta: { title: "购物车" },
|
||||
},
|
||||
{
|
||||
path: 'ComplainList',
|
||||
name: 'ComplainList',
|
||||
component: ComplainList
|
||||
path: "/pay", // 支付页面
|
||||
name: "Pay",
|
||||
component: Pay,
|
||||
meta: { title: "订单结算" },
|
||||
},
|
||||
{
|
||||
path: 'ComplainDetail',
|
||||
name: 'ComplainDetail',
|
||||
component: ComplainDetail
|
||||
path: "/payMent",
|
||||
name: "PayMent",
|
||||
component: PayMent,
|
||||
},
|
||||
{
|
||||
path: 'AccountSafe',
|
||||
name: 'AccountSafe',
|
||||
component: AccountSafe
|
||||
path: "/PointMall",
|
||||
name: "PointMall",
|
||||
component: PointMall,
|
||||
meta: { title: "积分商城" },
|
||||
},
|
||||
{
|
||||
path: 'ModifyPwd',
|
||||
name: 'ModifyPwd',
|
||||
component: ModifyPwd
|
||||
path: "/qrpay", // 三方支付
|
||||
name: "qrpay",
|
||||
component: ThirdPay,
|
||||
},
|
||||
{
|
||||
path: 'Favorites',
|
||||
name: 'Favorites',
|
||||
component: Favorites,
|
||||
meta: {title: '我的收藏'}
|
||||
path: "/payDone", // 支付成功页面
|
||||
name: "PayDone",
|
||||
component: PayDone,
|
||||
},
|
||||
{
|
||||
path: 'Distribution',
|
||||
name: 'Distribution',
|
||||
component: Distribution,
|
||||
meta: {title: '分销推荐'}
|
||||
path: "/article", // 文章页面
|
||||
name: "article",
|
||||
component: article,
|
||||
meta: {
|
||||
title: "帮助中心",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'Point',
|
||||
name: 'Point',
|
||||
component: Point,
|
||||
meta: {title: '我的积分'}
|
||||
path: "/article/detail", // 文章页面
|
||||
name: "articleDetail",
|
||||
component: articleDetail,
|
||||
meta: {
|
||||
title: "帮助中心",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'Profile',
|
||||
name: 'Profile',
|
||||
component: Profile
|
||||
path: "/shopEntry",
|
||||
name: "shopEntry",
|
||||
component: ShopEntry,
|
||||
meta: {
|
||||
title: "店铺入驻",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'AfterSale',
|
||||
name: 'AfterSale',
|
||||
component: AfterSale,
|
||||
meta: {title: 'LiLi 售后'}
|
||||
path: "/coupon",
|
||||
name: "coupon",
|
||||
component: Coupon,
|
||||
meta: {
|
||||
title: "领券中心",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'ApplyAfterSale',
|
||||
name: 'ApplyAfterSale',
|
||||
component: ApplyAfterSale,
|
||||
meta: {title: '申请售后'}
|
||||
path: "/seckill",
|
||||
name: "seckill",
|
||||
component: seckill,
|
||||
meta: {
|
||||
title: "限时秒杀",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/home/MyAddress',
|
||||
name: 'MyAddress',
|
||||
component: MyAddress,
|
||||
meta: {title: '收货地址'}
|
||||
path: "/home", // 主页
|
||||
component: Home,
|
||||
children: [
|
||||
{
|
||||
path: "/",
|
||||
name: "Home",
|
||||
component: UserMain,
|
||||
meta: {
|
||||
title: "会员中心",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "MyTracks",
|
||||
name: "MyTracks",
|
||||
component: MyTracks,
|
||||
meta: { title: "我的足迹" },
|
||||
},
|
||||
{
|
||||
path: "MoneyManagement",
|
||||
name: "MoneyManagement",
|
||||
component: MoneyManagement,
|
||||
},
|
||||
{
|
||||
path: "Complain",
|
||||
name: "Complain",
|
||||
component: Complain,
|
||||
},
|
||||
{
|
||||
path: "Coupons",
|
||||
name: "Coupons",
|
||||
component: Coupons,
|
||||
},
|
||||
{
|
||||
path: "CommentList",
|
||||
name: "CommentList",
|
||||
component: CommentList,
|
||||
mate: { title: "评价列表" },
|
||||
},
|
||||
{
|
||||
path: "AddEval",
|
||||
name: "AddEval",
|
||||
component: AddEval,
|
||||
mate: { title: "添加评价" },
|
||||
},
|
||||
{
|
||||
path: "EvalDetail",
|
||||
name: "EvalDetail",
|
||||
component: EvalDetail,
|
||||
mate: { title: "评价详情" },
|
||||
},
|
||||
{
|
||||
path: "ComplainList",
|
||||
name: "ComplainList",
|
||||
component: ComplainList,
|
||||
},
|
||||
{
|
||||
path: "ComplainDetail",
|
||||
name: "ComplainDetail",
|
||||
component: ComplainDetail,
|
||||
},
|
||||
{
|
||||
path: "AccountSafe",
|
||||
name: "AccountSafe",
|
||||
component: AccountSafe,
|
||||
},
|
||||
{
|
||||
path: "ModifyPwd",
|
||||
name: "ModifyPwd",
|
||||
component: ModifyPwd,
|
||||
},
|
||||
{
|
||||
path: "Favorites",
|
||||
name: "Favorites",
|
||||
component: Favorites,
|
||||
meta: { title: "我的收藏" },
|
||||
},
|
||||
{
|
||||
path: "Distribution",
|
||||
name: "Distribution",
|
||||
component: Distribution,
|
||||
meta: { title: "分销推荐" },
|
||||
},
|
||||
{
|
||||
path: "Point",
|
||||
name: "Point",
|
||||
component: Point,
|
||||
meta: { title: "我的积分" },
|
||||
},
|
||||
{
|
||||
path: "Profile",
|
||||
name: "Profile",
|
||||
component: Profile,
|
||||
},
|
||||
{
|
||||
path: "AfterSale",
|
||||
name: "AfterSale",
|
||||
component: AfterSale,
|
||||
meta: { title: "售后" },
|
||||
},
|
||||
{
|
||||
path: "ApplyAfterSale",
|
||||
name: "ApplyAfterSale",
|
||||
component: ApplyAfterSale,
|
||||
meta: { title: "申请售后" },
|
||||
},
|
||||
{
|
||||
path: "/home/MyAddress",
|
||||
name: "MyAddress",
|
||||
component: MyAddress,
|
||||
meta: { title: "收货地址" },
|
||||
},
|
||||
{
|
||||
path: "AddAddress",
|
||||
name: "AddAddress",
|
||||
component: AddAddress,
|
||||
},
|
||||
{
|
||||
path: "MsgList",
|
||||
name: "MsgList",
|
||||
component: MsgList,
|
||||
meta: { title: "我的消息" },
|
||||
},
|
||||
{
|
||||
path: "MsgDetail",
|
||||
name: "MsgDetail",
|
||||
component: MsgDetail,
|
||||
meta: { title: "我的消息" },
|
||||
},
|
||||
{
|
||||
path: "MyOrder",
|
||||
name: "MyOrder",
|
||||
component: MyOrder,
|
||||
meta: { title: "我的订单" },
|
||||
},
|
||||
{
|
||||
path: "OrderDetail",
|
||||
name: "OrderDetail",
|
||||
component: OrderDetail,
|
||||
meta: { title: "订单详情" },
|
||||
},
|
||||
{
|
||||
path: "AfterSaleDetail",
|
||||
name: "AfterSaleDetail",
|
||||
component: AfterSaleDetail,
|
||||
meta: { title: "售后详情" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'AddAddress',
|
||||
name: 'AddAddress',
|
||||
component: AddAddress
|
||||
path: "/merchant",
|
||||
name: "Merchant",
|
||||
component: Merchant,
|
||||
meta: { title: "店铺" },
|
||||
},
|
||||
{
|
||||
path: 'MsgList',
|
||||
name: 'MsgList',
|
||||
component: MsgList,
|
||||
meta: {title: '我的消息'}
|
||||
},
|
||||
{
|
||||
path: 'MsgDetail',
|
||||
name: 'MsgDetail',
|
||||
component: MsgDetail,
|
||||
meta: {title: '我的消息'}
|
||||
},
|
||||
{
|
||||
path: 'MyOrder',
|
||||
name: 'MyOrder',
|
||||
component: MyOrder,
|
||||
meta: {title: '我的订单'}
|
||||
},
|
||||
{
|
||||
path: 'OrderDetail',
|
||||
name: 'OrderDetail',
|
||||
component: OrderDetail,
|
||||
meta: {title: '订单详情'}
|
||||
},
|
||||
{
|
||||
path: 'AfterSaleDetail',
|
||||
name: 'AfterSaleDetail',
|
||||
component: AfterSaleDetail,
|
||||
meta: {title: '售后详情'}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/merchant',
|
||||
name: 'Merchant',
|
||||
component: Merchant,
|
||||
meta: {title: '店铺'}
|
||||
}
|
||||
]
|
||||
],
|
||||
});
|
||||
|
||||
@@ -12,3 +12,9 @@ export const SET_CARTNUM = (state, data) => {
|
||||
export const SET_HOTWORDS = (state, data) => {
|
||||
state.hotWordsList = data
|
||||
}
|
||||
export const SET_LOGOIMG = (state, data) => {
|
||||
state.logoImg = data
|
||||
}
|
||||
export const SET_SITENAME = (state, data) => {
|
||||
state.siteName = data
|
||||
}
|
||||
@@ -11,7 +11,8 @@ export default new Vuex.Store({
|
||||
state: {
|
||||
navList: [], // 首页快捷导航
|
||||
cartNum: storage.getItem('cartNum') || 0,
|
||||
logoImg: require('@/assets/images/logo2.png'),
|
||||
logoImg: storage.getItem('logoImg') || require('@/assets/images/logo2.png'),
|
||||
siteName:storage.getItem('siteName')|| 'lilishop',
|
||||
hotWordsList: storage.getItem('hotWordsList'),
|
||||
category: JSON.parse(localStorage.getItem('category'))
|
||||
},
|
||||
|
||||
@@ -4,6 +4,7 @@ const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
|
||||
const resolve = dir => {
|
||||
return path.join(__dirname, dir);
|
||||
};
|
||||
const configs = require('./src/config')
|
||||
/**
|
||||
* 在项目开发的时候将生产环境以及开发环境进行判断
|
||||
* 将生产环境中的路径用cdn来进行优化处理
|
||||
@@ -12,6 +13,7 @@ const resolve = dir => {
|
||||
*/
|
||||
const enableProduction = process.env.NODE_ENV === "production"; // 是否生产环境
|
||||
|
||||
|
||||
let externals = {
|
||||
vue: "Vue",
|
||||
axios: "axios",
|
||||
@@ -23,15 +25,15 @@ let externals = {
|
||||
|
||||
// 使用CDN的内容
|
||||
let cdn = {
|
||||
css: ["https://cdn.jsdelivr.net/npm/view-design@4.1.1/dist/styles/iview.css"],
|
||||
css: ["https://cdn.pickmall.cn/cdn/iview.css"],
|
||||
js: [
|
||||
// vue must at first!
|
||||
"https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/vuex@3.1.2/dist/vuex.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/view-design@4.1.1/dist/iview.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js"
|
||||
"https://cdn.pickmall.cn/cdn/vue.min.js",
|
||||
"https://cdn.pickmall.cn/cdn/vuex.min.js",
|
||||
"https://cdn.pickmall.cn/cdn/vue-router.min.js",
|
||||
"https://cdn.pickmall.cn/cdn/axios0.19.2.js",
|
||||
"https://cdn.pickmall.cn/cdn/iview.min.js",
|
||||
"https://cdn.pickmall.cn/cdn/js.cookie.min.js",
|
||||
]
|
||||
};
|
||||
|
||||
@@ -52,8 +54,8 @@ let jsPlugin = [
|
||||
})
|
||||
];
|
||||
// 判断是否需要加载CDN
|
||||
cdn = enableProduction ? cdn : { css: [], js: [] };
|
||||
externals = enableProduction ? externals : {};
|
||||
cdn = enableProduction && configs.enableCDN ? cdn : { css: [], js: [] };
|
||||
externals = enableProduction && configs.enableCDN ? externals : {};
|
||||
jsPlugin = enableProduction ? jsPlugin : [];
|
||||
|
||||
module.exports = {
|
||||
@@ -79,7 +81,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
devServer: {
|
||||
port: 10000
|
||||
port: configs.port
|
||||
},
|
||||
|
||||
// 打包时不生成.map文件 避免看到源码
|
||||
@@ -128,6 +130,7 @@ module.exports = {
|
||||
config.resolve.alias.set("@", resolve("src"));
|
||||
config.plugin("html").tap(args => {
|
||||
args[0].cdn = cdn;
|
||||
args[0].title = configs.title;
|
||||
return args;
|
||||
});
|
||||
}
|
||||
|
||||
16677
buyer/yarn.lock
16677
buyer/yarn.lock
File diff suppressed because it is too large
Load Diff
18
docker-build.sh
Normal file
18
docker-build.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#代码目录
|
||||
code_path=$PWD
|
||||
REGISTRY_PATH='registry.cn-hangzhou.aliyuncs.com/lilishop-ui'
|
||||
BUILD_VERSION=4.2.4.1
|
||||
|
||||
read -p "请输入仓库地址": REGISTRY_PATH
|
||||
|
||||
echo $REGISTRY_PATH
|
||||
|
||||
docker build -t $REGISTRY_PATH/buyer-ui:$BUILD_VERSION ${code_path}/buyer
|
||||
docker push $REGISTRY_PATH/buyer-ui:$BUILD_VERSION
|
||||
|
||||
docker build -t $REGISTRY_PATH/seller-ui:$BUILD_VERSION ${code_path}/seller
|
||||
docker push $REGISTRY_PATH/seller-ui:$BUILD_VERSION
|
||||
|
||||
docker build -t $REGISTRY_PATH/manager-ui:$BUILD_VERSION ${code_path}/manager
|
||||
docker push $REGISTRY_PATH/manager-ui:$BUILD_VERSION
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.4.1
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui:4.2.4.1
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.4.1
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.4.1
|
||||
|
||||
|
||||
9
lilishop-ui.iml
Normal file
9
lilishop-ui.iml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
5
manager/.npmrc
Normal file
5
manager/.npmrc
Normal file
@@ -0,0 +1,5 @@
|
||||
# 默认依赖包指定淘宝源
|
||||
registry=https://registry.npm.taobao.org/
|
||||
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
|
||||
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
|
||||
electron_mirror=https://npm.taobao.org/mirrors/electron/
|
||||
5
manager/.yarnrc
Normal file
5
manager/.yarnrc
Normal file
@@ -0,0 +1,5 @@
|
||||
registry "https://registry.npmmirror.com"
|
||||
sass_binary_site "https://npmmirror.com/mirrors/node-sass"
|
||||
phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
|
||||
electron_mirror "https://npmmirror.com/mirrors/electron"
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
FROM nginx:alpine
|
||||
FROM node:10.19.0 as build-stage
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
RUN mkdir -p /app/
|
||||
COPY ./dist /app/
|
||||
# production stage
|
||||
FROM nginx:stable-alpine as production-stage
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]k
|
||||
|
||||
@@ -31,7 +31,7 @@ npm run lint
|
||||
#### login.vue页面,测试时不走权限,直接return 318行
|
||||
#### Main.vue 页面,241行,修改,避免报错
|
||||
|
||||
#### main-components 头部,左侧所有内容
|
||||
#### main-parts 头部,左侧所有内容
|
||||
|
||||
#### lili-floor-renovation 楼层装修模块
|
||||
#### decoration 楼层装修模块
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-4.2.0:0.0.2 .
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.4.1 .
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user