Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
4f5f1b64
Commit
4f5f1b64
authored
Aug 31, 2021
by
gengshaojing
Browse files
Options
Browse Files
Download
Plain Diff
fix: 合并hotfix
parents
354158d0
c9861793
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
18001 additions
and
18217 deletions
+18001
-18217
package-lock.json
package-lock.json
+15447
-15418
index.html
public/index.html
+2
-0
relay.js
server/controllers/relay.js
+93
-0
router.js
server/router.js
+6
-0
request.js
server/utils/request.js
+35
-25
index.vue
src/pages/Activity/ActivityDetail/index.vue
+267
-295
addProduc.vue
src/pages/Activity/releaseProduc/components/addProduc.vue
+631
-769
infoEditing.vue
src/pages/Activity/releaseProduc/components/infoEditing.vue
+142
-151
myMap.vue
src/pages/Activity/releaseProduc/components/myMap.vue
+256
-244
index.vue
src/pages/Goods/Detail/index.vue
+1073
-1272
groupmeal.js
src/service/Groupmeal/groupmeal.js
+17
-14
util.js
src/utils/util.js
+32
-29
No files found.
package-lock.json
View file @
4f5f1b64
...
...
@@ -2167,17 +2167,6 @@
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646734234&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz"
,
"integrity"
:
"sha1-qsTit3NKdAhnrrFr8CqtVWoeegE="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"cliui"
:
{
"version"
:
"6.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/cliui/download/cliui-6.0.0.tgz"
,
...
...
@@ -2213,25 +2202,6 @@
"ms"
:
"2.1.2"
}
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626715907927&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz"
,
"integrity"
:
"sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s="
,
"dev"
:
true
,
"optional"
:
true
},
"loader-utils"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.nlark.com/loader-utils/download/loader-utils-2.0.0.tgz"
,
"integrity"
:
"sha1-5MrOW4FtQloWa18JfhDNErNgZLA="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
},
"ms"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz?cache=0&sync_timestamp=1607433988749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.2.tgz"
,
...
...
@@ -2247,28 +2217,6 @@
"minipass"
:
"^3.1.1"
}
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703400240&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz"
,
"integrity"
:
"sha1-G33NyzK4E4gBs+R4umpRyqiWSNo="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.5.0"
,
"resolved"
:
"https://registry.nlark.com/vue-loader/download/vue-loader-16.5.0.tgz?cache=0&sync_timestamp=1628666727543&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue-loader%2Fdownload%2Fvue-loader-16.5.0.tgz"
,
"integrity"
:
"sha1-CcTgcSRmiZ40uZpoZSTxkWX7KJI="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
}
},
"wrap-ansi"
:
{
"version"
:
"6.2.0"
,
"resolved"
:
"https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-6.2.0.tgz"
,
...
...
@@ -2796,7 +2744,7 @@
},
"aggregate-error"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.1.0.tgz?cache=
0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faggregate-error%2Fdownload%2Faggregate-error-3.1.0.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.1.0.tgz?cache=0&sync_timestamp=161868154443
0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faggregate-error%2Fdownload%2Faggregate-error-3.1.0.tgz"
,
"integrity"
:
"sha1-kmcP9Q9TWb23o+DUDQ7DDFc3aHo="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -4339,7 +4287,7 @@
},
"cli-truncate"
:
{
"version"
:
"2.1.0"
,
"resolved"
:
"https://registry.nlark.com/cli-truncate/download/cli-truncate-2.1.0.tgz?cache=0&sync_timestamp=1628634500202&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcli-truncate%2Fdownload%2F
cli-truncate-2.1.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/cli-truncate/download/
cli-truncate-2.1.0.tgz"
,
"integrity"
:
"sha1-w54ovwXtzeW+O5iZKiLe7Vork8c="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -4364,7 +4312,7 @@
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org
/color-convert/download/color-convert-2.0.1.tgz"
,
"resolved"
:
"https://registry.nlark.com
/color-convert/download/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -4373,13 +4321,13 @@
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npm.taobao.org
/color-name/download/color-name-1.1.4.tgz"
,
"resolved"
:
"https://registry.nlark.com
/color-name/download/color-name-1.1.4.tgz"
,
"integrity"
:
"sha1-wqCah6y95pVD3m9j+jmVyCbFNqI="
,
"dev"
:
true
},
"slice-ansi"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/slice-ansi/download/slice-ansi-3.0.0.tgz?cache=0&sync_timestamp=1618554945131&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fslice-ansi%2Fdownload%2F
slice-ansi-3.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/slice-ansi/download/
slice-ansi-3.0.0.tgz"
,
"integrity"
:
"sha1-Md3BCTCht+C2ewjJbC9Jt3p4l4c="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -7975,7 +7923,7 @@
},
"indent-string"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/indent-string/download/indent-string-4.0.0.tgz?cache=0&sync_timestamp=1618679442183&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Findent-string%2Fdownload%2F
indent-string-4.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/indent-string/download/
indent-string-4.0.0.tgz"
,
"integrity"
:
"sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE="
,
"dev"
:
true
},
...
...
@@ -8434,7 +8382,7 @@
},
"is-regexp"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/is-regexp/download/is-regexp-1.0.0.tgz?cache=0&sync_timestamp=1617816642607&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-regexp%2Fdownload%2F
is-regexp-1.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/is-regexp/download/
is-regexp-1.0.0.tgz"
,
"integrity"
:
"sha1-/S2INUXEa6xaYz57mgnof6LLUGk="
,
"dev"
:
true
},
...
...
@@ -9037,7 +8985,7 @@
},
"braces"
:
{
"version"
:
"3.0.2"
,
"resolved"
:
"https://registry.npm.taobao.org
/braces/download/braces-3.0.2.tgz"
,
"resolved"
:
"https://registry.nlark.com
/braces/download/braces-3.0.2.tgz"
,
"integrity"
:
"sha1-NFThpGLujVmeI23zNs2epPiv4Qc="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9046,7 +8994,7 @@
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646655305
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz"
,
"resolved"
:
"https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646734234
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz"
,
"integrity"
:
"sha1-qsTit3NKdAhnrrFr8CqtVWoeegE="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9056,7 +9004,7 @@
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org
/color-convert/download/color-convert-2.0.1.tgz"
,
"resolved"
:
"https://registry.nlark.com
/color-convert/download/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9065,19 +9013,19 @@
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npm.taobao.org
/color-name/download/color-name-1.1.4.tgz"
,
"resolved"
:
"https://registry.nlark.com
/color-name/download/color-name-1.1.4.tgz"
,
"integrity"
:
"sha1-wqCah6y95pVD3m9j+jmVyCbFNqI="
,
"dev"
:
true
},
"commander"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.nlark.com/commander/download/commander-7.2.0.tgz?cache=0&sync_timestamp=1627358314526
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcommander%2Fdownload%2Fcommander-7.2.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/commander/download/commander-7.2.0.tgz?cache=0&sync_timestamp=1627359190297
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcommander%2Fdownload%2Fcommander-7.2.0.tgz"
,
"integrity"
:
"sha1-o2y1fQtQHOEI5NIFWaFQo5HZerc="
,
"dev"
:
true
},
"cosmiconfig"
:
{
"version"
:
"7.0.1"
,
"resolved"
:
"https://registry.nlark.com/cosmiconfig/download/
cosmiconfig-7.0.1.tgz"
,
"resolved"
:
"https://registry.nlark.com/cosmiconfig/download/cosmiconfig-7.0.1.tgz?cache=0&sync_timestamp=1629602330801&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcosmiconfig%2Fdownload%2F
cosmiconfig-7.0.1.tgz"
,
"integrity"
:
"sha1-cU11ZSLKzoZ4Z8y0R0xdAbuuXW0="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9127,7 +9075,7 @@
},
"fill-range"
:
{
"version"
:
"7.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org
/fill-range/download/fill-range-7.0.1.tgz"
,
"resolved"
:
"https://registry.nlark.com
/fill-range/download/fill-range-7.0.1.tgz"
,
"integrity"
:
"sha1-GRmmp8df44ssfHflGYU12prN2kA="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9136,7 +9084,7 @@
},
"get-stream"
:
{
"version"
:
"6.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org
/get-stream/download/get-stream-6.0.1.tgz"
,
"resolved"
:
"https://registry.nlark.com
/get-stream/download/get-stream-6.0.1.tgz"
,
"integrity"
:
"sha1-omLY7vZ6ztV8KFKtYWdSakPL97c="
,
"dev"
:
true
},
...
...
@@ -9154,7 +9102,7 @@
},
"import-fresh"
:
{
"version"
:
"3.3.0"
,
"resolved"
:
"https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.3.0.tgz?cache=0&sync_timestamp=1608469532269
&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-3.3.0.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.3.0.tgz?cache=0&sync_timestamp=1608469520474
&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-3.3.0.tgz"
,
"integrity"
:
"sha1-NxYsJfy566oublPVtNiM4X2eDCs="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9164,7 +9112,7 @@
},
"is-number"
:
{
"version"
:
"7.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org
/is-number/download/is-number-7.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com
/is-number/download/is-number-7.0.0.tgz"
,
"integrity"
:
"sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss="
,
"dev"
:
true
},
...
...
@@ -9196,7 +9144,7 @@
},
"mimic-fn"
:
{
"version"
:
"2.1.0"
,
"resolved"
:
"https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-2.1.0.tgz?cache=0&sync_timestamp=1617823583529&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmimic-fn%2Fdownload%2F
mimic-fn-2.1.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/mimic-fn/download/
mimic-fn-2.1.0.tgz"
,
"integrity"
:
"sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs="
,
"dev"
:
true
},
...
...
@@ -9217,7 +9165,7 @@
},
"onetime"
:
{
"version"
:
"5.1.2"
,
"resolved"
:
"https://registry.npm.taobao.org
/onetime/download/onetime-5.1.2.tgz"
,
"resolved"
:
"https://registry.nlark.com
/onetime/download/onetime-5.1.2.tgz"
,
"integrity"
:
"sha1-0Oluu1awdHbfHdnEgG5SN5hcpF4="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9232,13 +9180,13 @@
},
"path-type"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/path-type/download/
path-type-4.0.0.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/path-type/download/path-type-4.0.0.tgz?cache=0&sync_timestamp=1611752074264&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-type%2Fdownload%2F
path-type-4.0.0.tgz"
,
"integrity"
:
"sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs="
,
"dev"
:
true
},
"resolve-from"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org
/resolve-from/download/resolve-from-4.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com
/resolve-from/download/resolve-from-4.0.0.tgz"
,
"integrity"
:
"sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY="
,
"dev"
:
true
},
...
...
@@ -9288,7 +9236,7 @@
},
"listr2"
:
{
"version"
:
"3.11.0"
,
"resolved"
:
"https://registry.nlark.com/listr2/download/listr2-3.11.0.tgz?cache=0&sync_timestamp=1626978156161&other_urls=https%3A%2F%2Fregistry.nlark.com%2Flistr2%2Fdownload%2F
listr2-3.11.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/listr2/download/
listr2-3.11.0.tgz"
,
"integrity"
:
"sha1-l3GwJAeHWqeOc9bg/2VBu+wKruk="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9312,7 +9260,7 @@
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org
/color-convert/download/color-convert-2.0.1.tgz"
,
"resolved"
:
"https://registry.nlark.com
/color-convert/download/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9321,13 +9269,13 @@
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npm.taobao.org
/color-name/download/color-name-1.1.4.tgz"
,
"resolved"
:
"https://registry.nlark.com
/color-name/download/color-name-1.1.4.tgz"
,
"integrity"
:
"sha1-wqCah6y95pVD3m9j+jmVyCbFNqI="
,
"dev"
:
true
},
"p-map"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.nlark.com/p-map/download/p-map-4.0.0.tgz?cache=0&sync_timestamp=1627082385032
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-map%2Fdownload%2Fp-map-4.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/p-map/download/p-map-4.0.0.tgz?cache=0&sync_timestamp=1627082563421
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-map%2Fdownload%2Fp-map-4.0.0.tgz"
,
"integrity"
:
"sha1-uy+Vpe2i7BaOySdOBqdHw+KQTSs="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9336,7 +9284,7 @@
},
"wrap-ansi"
:
{
"version"
:
"7.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org
/wrap-ansi/download/wrap-ansi-7.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com
/wrap-ansi/download/wrap-ansi-7.0.0.tgz"
,
"integrity"
:
"sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9538,7 +9486,7 @@
},
"log-update"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org
/log-update/download/log-update-4.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com
/log-update/download/log-update-4.0.0.tgz"
,
"integrity"
:
"sha1-WJ7NNSRx8qHAxXAodUOmTf0g4KE="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9574,7 +9522,7 @@
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org
/color-convert/download/color-convert-2.0.1.tgz"
,
"resolved"
:
"https://registry.nlark.com
/color-convert/download/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9583,19 +9531,19 @@
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npm.taobao.org
/color-name/download/color-name-1.1.4.tgz"
,
"resolved"
:
"https://registry.nlark.com
/color-name/download/color-name-1.1.4.tgz"
,
"integrity"
:
"sha1-wqCah6y95pVD3m9j+jmVyCbFNqI="
,
"dev"
:
true
},
"mimic-fn"
:
{
"version"
:
"2.1.0"
,
"resolved"
:
"https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-2.1.0.tgz?cache=0&sync_timestamp=1617823583529&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmimic-fn%2Fdownload%2F
mimic-fn-2.1.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/mimic-fn/download/
mimic-fn-2.1.0.tgz"
,
"integrity"
:
"sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs="
,
"dev"
:
true
},
"onetime"
:
{
"version"
:
"5.1.2"
,
"resolved"
:
"https://registry.npm.taobao.org
/onetime/download/onetime-5.1.2.tgz"
,
"resolved"
:
"https://registry.nlark.com
/onetime/download/onetime-5.1.2.tgz"
,
"integrity"
:
"sha1-0Oluu1awdHbfHdnEgG5SN5hcpF4="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9614,7 +9562,7 @@
},
"slice-ansi"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/slice-ansi/download/slice-ansi-4.0.0.tgz?cache=0&sync_timestamp=1618554945131&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fslice-ansi%2Fdownload%2F
slice-ansi-4.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com/slice-ansi/download/
slice-ansi-4.0.0.tgz"
,
"integrity"
:
"sha1-UA6N0P1VsFgVCGJVsxla3ypF/ms="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -9625,7 +9573,7 @@
},
"wrap-ansi"
:
{
"version"
:
"6.2.0"
,
"resolved"
:
"https://registry.npm.taobao.org
/wrap-ansi/download/wrap-ansi-6.2.0.tgz"
,
"resolved"
:
"https://registry.nlark.com
/wrap-ansi/download/wrap-ansi-6.2.0.tgz"
,
"integrity"
:
"sha1-6Tk7oHEC5skaOyIUePAlfNKFblM="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -10955,7 +10903,7 @@
},
"please-upgrade-node"
:
{
"version"
:
"3.2.0"
,
"resolved"
:
"https://registry.npm.taobao.org
/please-upgrade-node/download/please-upgrade-node-3.2.0.tgz"
,
"resolved"
:
"https://registry.nlark.com
/please-upgrade-node/download/please-upgrade-node-3.2.0.tgz"
,
"integrity"
:
"sha1-rt3T+ZTJM+StmLmdmlVu+g4v6UI="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -11869,7 +11817,7 @@
},
"prettier"
:
{
"version"
:
"2.3.2"
,
"resolved"
:
"https://registry.nlark.com/prettier/download/prettier-2.3.2.tgz?cache=0&sync_timestamp=1624696193562
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fprettier%2Fdownload%2Fprettier-2.3.2.tgz"
,
"resolved"
:
"https://registry.nlark.com/prettier/download/prettier-2.3.2.tgz?cache=0
&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fprettier%2Fdownload%2Fprettier-2.3.2.tgz"
,
"integrity"
:
"sha1-7ygKBewlNxLkhiM9tcbyNEHnNC0="
,
"dev"
:
true
},
...
...
@@ -12792,7 +12740,7 @@
},
"semver-compare"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org
/semver-compare/download/semver-compare-1.0.0.tgz"
,
"resolved"
:
"https://registry.nlark.com
/semver-compare/download/semver-compare-1.0.0.tgz"
,
"integrity"
:
"sha1-De4hahyUGrN+nvsXiPavxf9VN/w="
,
"dev"
:
true
},
...
...
@@ -13615,7 +13563,7 @@
},
"string-argv"
:
{
"version"
:
"0.3.1"
,
"resolved"
:
"https://registry.npm.taobao.org
/string-argv/download/string-argv-0.3.1.tgz"
,
"resolved"
:
"https://registry.nlark.com
/string-argv/download/string-argv-0.3.1.tgz"
,
"integrity"
:
"sha1-leL77AQnrhkYSTX4FtdKqkxcGdo="
,
"dev"
:
true
},
...
...
@@ -13678,7 +13626,7 @@
"dependencies"
:
{
"is-obj"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org/is-obj/download/
is-obj-1.0.1.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/is-obj/download/is-obj-1.0.1.tgz?cache=0&sync_timestamp=1618600242427&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-obj%2Fdownload%2F
is-obj-1.0.1.tgz"
,
"integrity"
:
"sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
,
"dev"
:
true
}
...
...
@@ -14814,6 +14762,87 @@
}
}
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.5.0"
,
"resolved"
:
"https://registry.nlark.com/vue-loader/download/vue-loader-16.5.0.tgz?cache=0&sync_timestamp=1628666727543&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue-loader%2Fdownload%2Fvue-loader-16.5.0.tgz"
,
"integrity"
:
"sha1-CcTgcSRmiZ40uZpoZSTxkWX7KJI="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
},
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha1-7dgDYornHATIWuegkG7a00tkiTc="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646734234&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz"
,
"integrity"
:
"sha1-qsTit3NKdAhnrrFr8CqtVWoeegE="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.nlark.com/color-name/download/color-name-1.1.4.tgz"
,
"integrity"
:
"sha1-wqCah6y95pVD3m9j+jmVyCbFNqI="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626715907927&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz"
,
"integrity"
:
"sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s="
,
"dev"
:
true
,
"optional"
:
true
},
"loader-utils"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.nlark.com/loader-utils/download/loader-utils-2.0.0.tgz"
,
"integrity"
:
"sha1-5MrOW4FtQloWa18JfhDNErNgZLA="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703400240&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz"
,
"integrity"
:
"sha1-G33NyzK4E4gBs+R4umpRyqiWSNo="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
}
}
},
"vue-router"
:
{
"version"
:
"4.0.8"
,
"resolved"
:
"https://registry.nlark.com/vue-router/download/vue-router-4.0.8.tgz"
,
...
...
@@ -15592,7 +15621,7 @@
},
"yaml"
:
{
"version"
:
"1.10.2"
,
"resolved"
:
"https://registry.nlark.com/yaml/download/
yaml-1.10.2.tgz"
,
"resolved"
:
"https://registry.nlark.com/yaml/download/yaml-1.10.2.tgz?cache=0&sync_timestamp=1626517461854&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyaml%2Fdownload%2F
yaml-1.10.2.tgz"
,
"integrity"
:
"sha1-IwHF/78StGfejaIzOkWeKeeSDks="
,
"dev"
:
true
},
...
...
public/index.html
View file @
4f5f1b64
...
...
@@ -16,6 +16,8 @@
<
%
for
(
let
i
in
htmlWebpackPlugin
.
options
.
cdn
&&
htmlWebpackPlugin
.
options
.
cdn
.
js
)
{
%
>
<script
src=
"<%= htmlWebpackPlugin.options.cdn.js[i] %>"
></script>
<
%
}
%
>
<script
src=
"//webapi.amap.com/maps?v=1.3&key=bb057625545d8cf77df1379e7aaae0b5"
></script>
<script
src=
"//webapi.amap.com/ui/1.0/main.js"
></script>
<title><
%=
htmlWebpackPlugin
.
options
.
title
%
></title>
</head>
...
...
server/controllers/relay.js
0 → 100644
View file @
4f5f1b64
const
fs
=
require
(
"fs"
);
const
API_INTERNAL_URI
=
require
(
"../config.js"
).
API_INTERNAL_URI
;
const
reqOther
=
require
(
"../utils/request"
).
httpReqOther
;
const
FormData
=
require
(
"form-data"
);
const
http
=
require
(
"http"
);
const
GROUPMEAL_URI
=
require
(
"../config.js"
).
GROUPMEAL_URI
;
exports
.
uploadPic
=
async
(
ctx
,
next
)
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/ksy/ks3apiunencrypt/ks3api_upload`
;
const
{
body
:
{
type
},
files
,
}
=
ctx
.
request
;
console
.
log
(
"type"
,
type
);
const
filePath
=
files
.
file
.
path
;
const
file
=
fs
.
createReadStream
(
filePath
);
const
form
=
new
FormData
();
form
.
append
(
"file"
,
file
);
form
.
append
(
"type"
,
type
);
const
opts
=
{
method
:
"post"
,
url
:
url
,
body
:
form
,
headers
:
form
.
getHeaders
(),
};
ctx
.
body
=
await
reqOther
(
opts
);
};
exports
.
oldOrderExport
=
async
(
ctx
)
=>
{
const
{
marketing_id
,
type
}
=
ctx
.
query
;
// `${ENV}order/oldbackground/order_export?marketing_id=${eventId}&type=${type}`;
const
url
=
`
${
GROUPMEAL_URI
}
/order/oldbackground/order_export?marketing_id=
${
marketing_id
}
&type=
${
type
}
`
;
console
.
log
(
"url"
,
url
);
const
options
=
new
URL
(
url
);
let
{
buffer
,
res
}
=
await
requestPromise
(
options
);
const
fileName
=
res
.
headers
[
"content-disposition"
].
split
(
"="
)[
1
];
ctx
.
set
(
"Content-Type"
,
"application/octet-stream"
);
ctx
.
set
(
"Content-Disposition"
,
`attachment; filename=
${
fileName
}
`
);
ctx
.
body
=
buffer
;
};
exports
.
orderExport
=
async
(
ctx
)
=>
{
const
{
marketing_id
,
type
}
=
ctx
.
query
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_export?marketing_id=
${
marketing_id
}
&type=
${
type
}
`
;
console
.
log
(
"url"
,
url
);
const
options
=
new
URL
(
url
);
let
{
buffer
,
res
}
=
await
requestPromise
(
options
);
const
fileName
=
res
.
headers
[
"content-disposition"
].
split
(
"="
)[
1
];
ctx
.
set
(
"Content-Type"
,
"application/octet-stream"
);
ctx
.
set
(
"Content-Disposition"
,
`attachment; filename=
${
fileName
}
`
);
ctx
.
body
=
buffer
;
};
function
requestPromise
(
options
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
const
req
=
http
.
request
(
options
,
function
(
res
)
{
let
{
statusCode
}
=
res
;
//返回不是200
if
(
statusCode
!==
200
)
{
return
reject
(
new
Error
(
"error"
));
}
let
arr
=
[];
let
len
=
0
;
res
.
on
(
"data"
,
(
chunk
)
=>
{
len
+=
chunk
.
length
;
arr
.
push
(
Buffer
.
from
(
chunk
));
});
res
.
on
(
"end"
,
()
=>
{
//正确 success
return
resolve
({
buffer
:
Buffer
.
concat
(
arr
,
len
),
res
,
});
});
});
//请求出错
req
.
on
(
"error"
,
(
err
)
=>
{
return
reject
(
err
);
});
req
.
end
();
});
}
server/router.js
View file @
4f5f1b64
...
...
@@ -10,6 +10,7 @@ const activity = require("./controllers/activity");
const
withdrawal
=
require
(
"./controllers/withdrawal"
);
const
groupmeal
=
require
(
"./controllers/groupmeal"
);
const
qr_code
=
require
(
"./controllers/qr-code"
);
const
relay
=
require
(
"./controllers/relay"
);
const
router
=
Router
();
const
API_VERSION
=
"/api/v1"
;
...
...
@@ -130,4 +131,9 @@ router.post(`${API_VERSION}/get_reblack_list`, withdrawal.getReblackList);
router
.
get
(
`
${
API_VERSION
}
/get_wallet_account_status`
,
withdrawal
.
getWalletAccountStatus
);
router
.
post
(
`
${
API_VERSION
}
/reset_wallet_account_status`
,
withdrawal
.
resetAccountStatus
);
// 图片上传
router
.
post
(
`
${
API_VERSION
}
/relay/ks3api_upload`
,
relay
.
uploadPic
);
router
.
get
(
`
${
API_VERSION
}
/relay/order_export`
,
relay
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/relay/old_order_export`
,
relay
.
oldOrderExport
);
module
.
exports
=
router
;
server/utils/request.js
View file @
4f5f1b64
...
...
@@ -11,17 +11,13 @@ exports.httpReq = (ctx, opts) => {
version
:
"999999"
,
distribution
:
"op"
,
net
:
"wifi"
,
platform
:
"2"
platform
:
"2"
,
};
opts
.
qs
=
{
...
defaultQs
,
...
ctx
.
request
.
query
,
...
opts
.
qs
};
request
(
opts
,
(
err
,
res
,
body
)
=>
{
console
.
info
(
`[Api] httpReq (
${
opts
.
url
}
, user:[
${
opts
.
qs
.
op_cur_user
}
]) spent:
${
+
new
Date
()
-
time_start
}
ms`
);
console
.
info
(
`[Api] httpReq (
${
opts
.
url
}
, user:[
${
opts
.
qs
.
op_cur_user
}
]) spent:
${
+
new
Date
()
-
time_start
}
ms`
);
if
(
!
err
)
{
resolve
(
body
);
...
...
@@ -32,3 +28,17 @@ exports.httpReq = (ctx, opts) => {
});
});
};
exports
.
httpReqOther
=
(
opts
)
=>
{
opts
.
timeout
=
opts
.
timeout
||
10000
;
return
new
Promise
((
resolve
,
reject
)
=>
{
request
(
opts
,
(
err
,
res
,
body
)
=>
{
if
(
!
err
)
{
resolve
(
body
);
}
else
{
reject
(
err
);
console
.
error
(
opts
.
url
,
err
);
}
});
});
};
src/pages/Activity/ActivityDetail/index.vue
View file @
4f5f1b64
...
...
@@ -44,9 +44,9 @@
<h3>
{{
marketingInfo
.
marketing_name
}}
</h3>
<!-- 查看参与字段待确认 -->
<p>
<span>
{{
detailInfo
.
lookUserCount
}}
人查看
</span>
|
<span
>
{{
detailInfo
.
haveBuyGoodsUserCount
}}
人参与
</span
>
<span>
{{
detailInfo
.
lookUserCount
}}
人查看
</span>
|
<span>
{{
detailInfo
.
haveBuyGoodsUserCount
}}
人参与
</span
>
</p>
<p
class=
"endTime"
>
{{
showTimer
}}
</p>
</div>
...
...
@@ -82,11 +82,7 @@
><
/el-image
>
<
/el-card
>
<
el
-
card
class
=
"activities box-card"
>
<
div
v
-
for
=
"goodsItem in goodsList"
:
key
=
"goodsItem.goods_sku_id"
class
=
"activityItem"
>
<
div
v
-
for
=
"goodsItem in goodsList"
:
key
=
"goodsItem.goods_sku_id"
class
=
"activityItem"
>
<
el
-
image
class
=
"activityImage"
style
=
"width: 100px; height: 100px"
...
...
@@ -97,15 +93,8 @@
<
p
>
{{
goodsItem
.
goods_name
}}
<
/p
>
<
p
class
=
"price"
>
<
span
class
=
"nowPrice"
>
{{
`¥${goodsItem.price
}
`
}}
<
/span
>
<
span
class
=
"originPrice"
>
{{
`¥${goodsItem.original_price
}
`
}}
<
/span
>
<
span
class
=
"sold"
v
-
if
=
"goodsItem.inventory_rest == 0"
>
抢光了
<
/spa
n
>
<
span
class
=
"sold"
v
-
else
>
已售
{{
goodsItem
.
all_have_buy_goods_count
}}
<
/spa
n
>
<
span
class
=
"originPrice"
>
{{
`¥${goodsItem.original_price
}
`
}}
<
/span
>
<
span
class
=
"sold"
>
已售
{{
goodsItem
.
all_have_buy_goods_count
}}
<
/span
>
<
/p
>
<
/div
>
<
/div
>
...
...
@@ -113,23 +102,17 @@
<
/section
>
<
/div
>
<
div
class
=
"button-close"
>
<
el
-
button
class
=
"button-block"
size
=
"medium"
type
=
"primary"
@
click
=
"closePage"
>
关
闭
<
/el-butto
n
>
<
el
-
button
class
=
"button-block"
size
=
"medium"
type
=
"primary"
@
click
=
"closePage"
>
关
闭
<
/el-button
>
<
/div
>
<
/div
>
<
/template
>
<
script
>
import
ActivityService
from
"@/service/Activity/index"
;
import
{
ElMessage
}
from
"element-plus"
;
import
dayJs
from
"dayjs"
;
import
ActivityService
from
"@/service/Activity/index"
;
import
{
ElMessage
}
from
"element-plus"
;
import
dayJs
from
"dayjs"
;
export
default
{
export
default
{
props
:
{
}
,
data
()
{
return
{
...
...
@@ -138,7 +121,7 @@ export default {
marketingInfo
:
{
}
,
endTime
:
""
,
showTimer
:
""
,
detailInfo
:
{
}
detailInfo
:
{
}
,
}
;
}
,
watch
:
{
}
,
...
...
@@ -150,11 +133,11 @@ export default {
let
dataArr
=
await
Promise
.
all
([
ActivityService
.
checkActivityDetail
({
marketing_id
:
this
.
$route
.
query
.
marketing_id
,
marketing_type
:
this
.
$route
.
query
.
marketing_type
marketing_type
:
this
.
$route
.
query
.
marketing_type
,
}
),
ActivityService
.
checkActivityDetailInfo
({
marketing_id
:
this
.
$route
.
query
.
marketing_id
}
)
marketing_id
:
this
.
$route
.
query
.
marketing_id
,
}
),
]);
this
.
pageLoading
=
false
;
this
.
goodsList
=
dataArr
[
0
].
result
.
goods_list
;
...
...
@@ -171,21 +154,10 @@ export default {
getTimeout
(
timeCount
)
{
if
(
timeCount
>
0
)
{
var
days
=
parseInt
(
timeCount
/
(
1000
*
60
*
60
*
24
));
var
hours
=
parseInt
(
(
timeCount
%
(
1000
*
60
*
60
*
24
))
/
(
1000
*
60
*
60
)
);
var
hours
=
parseInt
((
timeCount
%
(
1000
*
60
*
60
*
24
))
/
(
1000
*
60
*
60
));
var
minutes
=
parseInt
((
timeCount
%
(
1000
*
60
*
60
))
/
(
1000
*
60
));
var
seconds
=
parseInt
((
timeCount
%
(
1000
*
60
))
/
1000
);
this
.
showTimer
=
"距结束:"
+
days
+
" 天 "
+
hours
+
" 小时 "
+
minutes
+
" 分钟 "
+
seconds
+
" 秒 "
;
this
.
showTimer
=
"距结束:"
+
days
+
" 天 "
+
hours
+
" 小时 "
+
minutes
+
" 分钟 "
+
seconds
+
" 秒 "
;
}
else
{
this
.
showTimer
=
"已结束"
;
}
...
...
@@ -206,7 +178,7 @@ export default {
closePage
()
{
this
.
$router
.
go
(
-
1
);
}
}
,
}
,
async
created
()
{
await
this
.
checkActivityDetail
();
...
...
@@ -214,11 +186,11 @@ export default {
}
,
beforeUnmount
()
{
clearInterval
(
this
.
timer
);
}
}
;
}
,
}
;
<
/script
>
<
style
lang
=
"less"
scoped
>
.
wrapper
{
.
wrapper
{
height
:
100
%
;
display
:
flex
;
overflow
-
y
:
scroll
;
...
...
@@ -324,5 +296,5 @@ export default {
width
:
200
px
;
}
}
}
}
<
/style
>
src/pages/Activity/releaseProduc/components/addProduc.vue
View file @
4f5f1b64
...
...
@@ -2,85 +2,44 @@
<div
class=
"addProduc"
>
<!-- 按钮组 -->
<div
class=
"btnGroup"
>
<el-button
class=
"addCommodityBtn"
@
click=
"commodity('add', '')"
>
添加商品
</el-button
>
<el-button
class=
"addCommodityBtn"
@
click=
"commodity('add', '')"
>
添加商品
</el-button>
<!--
<el-button
class=
"commodLibraryAdd"
@
click=
"commodLibraryAdd"
>
从商品库添加
</el-button
>
-->
</div>
<!-- Tab -->
<el-table
:data=
"comTableData"
border
style=
"width: 100%;margin-bottom:80px;"
:header-cell-style=
"cellClass"
>
<el-table
:data=
"comTableData"
border
style=
"width: 100%; margin-bottom: 80px"
:header-cell-style=
"cellClass"
>
<el-table-column
label=
"显示顺序"
align=
"center"
width=
"50px"
>
<el-table-column
label=
""
align=
"center"
width=
"50px"
>
<template
#
default=
"scope"
>
<i
class=
"el-icon-top"
@
click=
"upMove(scope.$index, scope.row)"
style=
"margin-right:15px;"
></i>
<i
class=
"el-icon-top"
@
click=
"upMove(scope.$index, scope.row)"
style=
"margin-right: 15px"
></i>
</
template
>
</el-table-column>
<el-table-column
label=
""
align=
"center"
width=
"50px"
>
<
template
#
default=
"scope"
>
<i
class=
"el-icon-bottom"
@
click=
"upDown(scope.$index, scope.row)"
></i>
<i
class=
"el-icon-bottom"
@
click=
"upDown(scope.$index, scope.row)"
></i>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"goods_sku_id"
label=
"商品ID"
width=
"180"
></el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品标题"
width=
"180"
></el-table-column>
<el-table-column
prop=
"price"
label=
"售价"
>
</el-table-column>
<el-table-column
prop=
"ota_name"
label=
"商家"
>
</el-table-column>
<el-table-column
prop=
"inventory_total"
label=
"库存"
>
</el-table-column>
<el-table-column
prop=
"total_amount_sold"
label=
"已售数量"
>
</el-table-column>
<el-table-column
prop=
"goods_sku_id"
label=
"商品ID"
width=
"180"
></el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品标题"
width=
"180"
></el-table-column>
<el-table-column
prop=
"price"
label=
"售价"
></el-table-column>
<el-table-column
prop=
"ota_name"
label=
"商家"
></el-table-column>
<el-table-column
prop=
"inventory_total"
label=
"库存"
></el-table-column>
<el-table-column
prop=
"total_amount_sold"
label=
"已售数量"
></el-table-column>
<el-table-column
prop=
"inventory_rest"
label=
"剩余库存"
></el-table-column>
<el-table-column
label=
"操作"
width=
"120"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<div
class=
"buttons_actions"
>
<el-button
type=
"text"
size=
"small"
@
click=
"commodity('update', scope.row)"
>
修改
</el-button
>
<el-button
type=
"text"
size=
"small"
@
click=
"removeCom(scope.row)"
>
移除
</el-button
>
<el-button
type=
"text"
size=
"small"
@
click=
"commodity('update', scope.row)"
>
修改
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"removeCom(scope.row)"
>
移除
</el-button>
</div>
</
template
>
</el-table-column>
</el-table>
<!-- 添加商品 -->
<el-dialog
:title=
"addCommodityTitle"
v-model=
"addCommodityPopup"
width=
"50%"
custom-class=
"add_goods_dialog"
>
<el-form
:inline=
"true"
:model=
"commodityForm"
ref=
"infoForm"
class=
"demo-form-inline infoForm"
label-width=
"100px"
>
<el-dialog
:title=
"addCommodityTitle"
v-model=
"addCommodityPopup"
width=
"50%"
custom-class=
"add_goods_dialog"
>
<el-form
:inline=
"true"
:model=
"commodityForm"
ref=
"infoForm"
class=
"demo-form-inline infoForm"
label-width=
"100px"
>
<el-form-item
label=
"图片:"
>
<el-upload
:class=
"{ hide: hideUpload }"
...
...
@@ -102,22 +61,10 @@
</
template
>
</el-upload>
</el-form-item>
<el-form-item
label=
"商品标题:"
prop=
"goods_name"
style=
"width:90%;"
:rules=
"[{ required: true, message: '请输入商品标题' }]"
>
<el-input
v-model=
"commodityForm.goods_name"
maxlength=
"30"
></el-input>
<el-form-item
label=
"商品标题:"
prop=
"goods_name"
style=
"width: 90%"
:rules=
"[{ required: true, message: '请输入商品标题' }]"
>
<el-input
v-model=
"commodityForm.goods_name"
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"售价:"
prop=
"price"
:rules=
"[{ required: true, message: '请输入售价' }]"
>
<el-form-item
label=
"售价:"
prop=
"price"
:rules=
"[{ required: true, message: '请输入售价' }]"
>
<el-input-number
class=
"price"
v-model=
"commodityForm.price"
...
...
@@ -138,11 +85,7 @@
></el-input-number>
</el-form-item>
<br
/>
<el-form-item
label=
"库存:"
prop=
"inventory_total"
:rules=
"[{ required: true, message: '请输入库存' }]"
>
<el-form-item
label=
"库存:"
prop=
"inventory_total"
:rules=
"[{ required: true, message: '请输入库存' }]"
>
<el-input
v-model=
"commodityForm.inventory_total"
placeholder=
""
...
...
@@ -151,9 +94,8 @@
></el-input>
</el-form-item>
<div
style=
"display: inline-block; height: 42px; margin-left: 33px"
>
已售:
<span
style=
"margin-right: 10px"
>
{{
commodityForm.total_amount_sold
}}
</span>
已售:
<span
style=
"margin-right: 10px"
>
{{ commodityForm.total_amount_sold }}
</span>
<!-- 剩余库存:<span>{{ commodityForm.inventory_total }}</span> -->
</div>
<el-form-item
...
...
@@ -162,8 +104,8 @@
{
required: true,
message: '请选择购买限制',
trigger: 'change'
}
trigger: 'change',
},
]"
class=
"limit_radio"
label=
"购买限制"
...
...
@@ -175,25 +117,18 @@
</el-form-item>
<el-form-item
prop=
"num_limit"
:show-message=
"
commodityForm.checkedRadio === '每人最多买' ? true : false
"
:show-message=
"commodityForm.checkedRadio === '每人最多买' ? true : false"
:rules=
"[
{
validator:
commodityForm.checkedRadio === '每人最多买'
? checkPurseLimit
: checkPurseLimitNull,
trigger: 'blur'
}
validator: commodityForm.checkedRadio === '每人最多买' ? checkPurseLimit : checkPurseLimitNull,
trigger: 'blur',
},
]"
>
<el-input
v-model=
"commodityForm.num_limit"
:disabled=
"
commodityForm.checkedRadio === '' ||
commodityForm.checkedRadio === '不限制' ||
commodityForm.checkedRadio === undefined
commodityForm.checkedRadio === '' || commodityForm.checkedRadio === '不限制' || commodityForm.checkedRadio === undefined
? true
: false
"
...
...
@@ -201,27 +136,16 @@
:controls=
"false"
></el-input>
</el-form-item>
<el-form-item
label=
"商家:"
prop=
"business1"
:rules=
"[{ required: true, message: '请选择商家' }]"
>
<el-form-item
label=
"商家:"
prop=
"business1"
:rules=
"[{ required: true, message: '请选择商家' }]"
>
<el-select
v-model=
"commodityForm.business1"
placeholder=
"请选择"
>
<el-option
v-for=
"item in businessOpt"
:key=
"item.ota_id"
:label=
"item.ota_name"
:value=
"item.ota_id"
></el-option>
<el-option
v-for=
"item in businessOpt"
:key=
"item.ota_id"
:label=
"item.ota_name"
:value=
"item.ota_id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"commodityCancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"commoditySave('infoForm')"
>
保存
</el-button
>
<el-button
type=
"primary"
@
click=
"commoditySave('infoForm')"
>
保存
</el-button>
</span>
</
template
>
</el-dialog>
...
...
@@ -230,63 +154,26 @@
<el-image
:src=
"popoverImage"
fit=
"fill"
style=
"width: 100%"
></el-image>
</el-dialog>
<!-- 从商品库添加 -->
<el-dialog
title=
"选择商品"
v-model=
"selCommodityPopup"
width=
"80%"
top=
"2%"
>
<el-dialog
title=
"选择商品"
v-model=
"selCommodityPopup"
width=
"80%"
top=
"2%"
>
<div>
<span>
商家:
</span>
<el-select
v-model=
"business2"
placeholder=
"请选择"
@
change=
"business2Sel"
>
<el-option
v-for=
"item in businessOpt"
:key=
"item.ota_id"
:label=
"item.ota_name"
:value=
"item.ota_id"
></el-option>
<el-select
v-model=
"business2"
placeholder=
"请选择"
@
change=
"business2Sel"
>
<el-option
v-for=
"item in businessOpt"
:key=
"item.ota_id"
:label=
"item.ota_name"
:value=
"item.ota_id"
></el-option>
</el-select>
</div>
<span
class=
"dioFor"
>
已选:{{ multipleSelection.length }}件
</span>
<el-table
:data=
"comLibTableData"
class=
"comLibTableData"
@
selection-change=
"selectGoodsChange"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
prop=
"goods_sku_id"
label=
"商品ID"
width=
"150"
></el-table-column>
<el-table-column
prop=
"goods_name"
label=
"名称"
width=
"200"
></el-table-column>
<el-table
:data=
"comLibTableData"
class=
"comLibTableData"
@
selection-change=
"selectGoodsChange"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
prop=
"goods_sku_id"
label=
"商品ID"
width=
"150"
></el-table-column>
<el-table-column
prop=
"goods_name"
label=
"名称"
width=
"200"
></el-table-column>
<el-table-column
prop=
"price"
label=
"售价"
></el-table-column>
<el-table-column
prop=
"ota_name"
label=
"商家"
></el-table-column>
<el-table-column
prop=
"inventory_total"
label=
"库存"
></el-table-column>
<el-table-column
prop=
"total_amount_sold"
label=
"已售数量"
></el-table-column>
<el-table-column
prop=
"inventory_rest"
label=
"剩余库存"
></el-table-column>
<el-table-column
prop=
"total_amount_sold"
label=
"已售数量"
></el-table-column>
<el-table-column
prop=
"inventory_rest"
label=
"剩余库存"
></el-table-column>
<el-table-column
label=
"操作"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<el-button
@
click=
"commodity('update', scope.row)"
type=
"text"
size=
"small"
>
修改
</el-button
>
<el-button
@
click=
"commodity('update', scope.row)"
type=
"text"
size=
"small"
>
修改
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -301,19 +188,12 @@
</template>
<
script
>
import
{
GOODS_URI
}
from
"../../../../../server/config"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
getCookie
}
from
"@/utils/util"
;
import
{
addGoods
,
getBusinessList
,
pindanGoods
,
markGoodsInfo
,
editGoods
}
from
"../../../../service/Activity/index"
;
// 当选择(每人最多买时 添加验证(非空))
let
checkPurseLimit
=
(
rule
,
value
,
callback
)
=>
{
import
{
ElMessage
}
from
"element-plus"
;
import
{
getCookie
,
UploadPicUrl
}
from
"@/utils/util"
;
import
{
addGoods
,
getBusinessList
,
pindanGoods
,
markGoodsInfo
,
editGoods
}
from
"../../../../service/Activity/index"
;
// 当选择(每人最多买时 添加验证(非空))
let
checkPurseLimit
=
(
rule
,
value
,
callback
)
=>
{
let
str
=
/^
[
1-9
]\d
*$/
;
if
(
value
===
""
||
value
===
undefined
||
value
===
0
)
{
return
callback
(
new
Error
(
"请添加限制购买数量"
));
...
...
@@ -322,25 +202,25 @@ let checkPurseLimit = (rule, value, callback) => {
}
else
{
callback
();
}
};
let
checkPurseLimitNull
=
(
rule
,
value
,
callback
)
=>
{
};
let
checkPurseLimitNull
=
(
rule
,
value
,
callback
)
=>
{
callback
();
};
};
var
addProduct
=
{
var
addProduct
=
{
props
:
{
editInfo
:
{
type
:
Object
,
required
:
()
=>
{}
required
:
()
=>
{},
},
addProduc
:
{
type
:
Array
,
required
:
()
=>
{}
required
:
()
=>
{},
},
stepTwoTitle
:
{
type
:
String
,
default
:
""
}
default
:
""
,
},
},
data
()
{
return
{
...
...
@@ -362,13 +242,13 @@ var addProduct = {
total_amount_order
:
""
,
business1
:
""
,
num_limit
:
""
,
// 购买限制数量
checkedRadio
:
""
// 购买限制radio
checkedRadio
:
""
,
// 购买限制radio
},
picStr
:
""
,
picUrlList
:
[],
picUploadList
:
[],
// 上传详情图片列表
isShowPopver
:
false
,
// 是否展示图片框
uploadUrl
:
`
${
GOODS_URI
}
/ksy/ks3apiunencrypt/ks3api_upload`
,
// 金山云上传地址
uploadUrl
:
UploadPicUrl
,
// 金山云上传地址
hideUpload
:
false
,
limitCount
:
1
,
...
...
@@ -415,17 +295,13 @@ var addProduct = {
// 库存计算
inventoryIpt
(
val
)
{
if
(
val
<
0
)
return
this
.
commodityForm
.
inventory_total
=
0
;
if
(
val
<
0
)
return
(
this
.
commodityForm
.
inventory_total
=
0
)
;
var
pattern
=
/^-
?[
1-9
]\d
*$|^0$/g
;
if
(
!
pattern
.
test
(
this
.
commodityForm
.
inventory_total
))
{
this
.
commodityForm
.
inventory_total
=
""
;
this
.
inventoryRest
=
this
.
inventoryTotal
-
this
.
commodityForm
.
total_amount_order
;
this
.
inventoryRest
=
this
.
inventoryTotal
-
this
.
commodityForm
.
total_amount_order
;
}
else
{
this
.
inventoryRest
=
Number
(
val
)
+
this
.
inventoryTotal
-
this
.
commodityForm
.
total_amount_order
;
this
.
inventoryRest
=
Number
(
val
)
+
this
.
inventoryTotal
-
this
.
commodityForm
.
total_amount_order
;
}
},
...
...
@@ -458,10 +334,7 @@ var addProduct = {
let
params
=
{
ota_name
:
""
,
offset
:
""
,
limit
:
""
};
try
{
const
res
=
await
getBusinessList
(
params
);
this
.
businessOpt
=
[
{
ota_id
:
""
,
ota_name
:
"全部"
},
...
res
.
result
.
list
];
this
.
businessOpt
=
[{
ota_id
:
""
,
ota_name
:
"全部"
},
...
res
.
result
.
list
];
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
console
.
error
(
error
);
...
...
@@ -476,26 +349,17 @@ var addProduct = {
this
.
inventoryTotal
=
res
.
result
.
goods_info
.
inventory_total
;
this
.
inventory
=
res
.
result
.
goods_info
.
inventory_total
;
this
.
commodityForm
=
res
.
result
.
goods_info
;
this
.
commodityForm
.
num_limit
=
res
.
result
.
goods_info
.
rule_limit
===
0
?
""
:
res
.
result
.
goods_info
.
rule_limit
;
// 购买限制的数量
this
.
commodityForm
.
num_limit
=
res
.
result
.
goods_info
.
rule_limit
===
0
?
""
:
res
.
result
.
goods_info
.
rule_limit
;
// 购买限制的数量
this
.
commodityForm
.
checkedRadio
=
res
.
result
.
goods_info
.
rule_limit
===
0
||
res
.
result
.
goods_info
.
rule_limit
===
undefined
?
"不限制"
:
"每人最多买"
;
// 购买限制按钮选择
res
.
result
.
goods_info
.
rule_limit
===
0
||
res
.
result
.
goods_info
.
rule_limit
===
undefined
?
"不限制"
:
"每人最多买"
;
// 购买限制按钮选择
this
.
commodityForm
.
business1
=
res
.
result
.
goods_info
.
ota_id
;
this
.
picUrlList
=
[];
for
(
var
i
in
res
.
result
.
goods_info
.
desc_pic_url_list
)
{
this
.
picUrlList
.
push
({
url
:
res
.
result
.
goods_info
.
desc_pic_url_list
[
i
]
url
:
res
.
result
.
goods_info
.
desc_pic_url_list
[
i
],
});
}
this
.
picStr
=
this
.
getUrlParms
(
res
.
result
.
goods_info
.
desc_pic_url_list
[
0
],
"url"
);
this
.
picStr
=
this
.
getUrlParms
(
res
.
result
.
goods_info
.
desc_pic_url_list
[
0
],
"url"
);
},
getUrlParms
(
path
,
name
)
{
...
...
@@ -524,12 +388,12 @@ var addProduct = {
this
.
commodityForm
.
checkedRadio
===
""
||
this
.
commodityForm
.
checkedRadio
===
undefined
?
0
:
this
.
commodityForm
.
num_limit
:
this
.
commodityForm
.
num_limit
,
});
if
(
res
.
code
==
0
)
{
ElMessage
.
success
({
message
:
"修改成功"
,
type
:
"success"
type
:
"success"
,
});
await
this
.
pindanGoodsMet
();
let
result
=
null
;
...
...
@@ -560,9 +424,7 @@ var addProduct = {
// 添加+修改商品
commodity
(
type
,
val
)
{
// 清楚图片
this
.
$refs
.
picUpload
&&
this
.
$refs
.
picUpload
.
clearFiles
&&
this
.
$refs
.
picUpload
.
clearFiles
();
this
.
$refs
.
picUpload
&&
this
.
$refs
.
picUpload
.
clearFiles
&&
this
.
$refs
.
picUpload
.
clearFiles
();
this
.
picUrlList
=
[];
this
.
picStr
=
""
;
...
...
@@ -603,12 +465,12 @@ var addProduct = {
this
.
commodityForm
.
checkedRadio
===
""
||
this
.
commodityForm
.
checkedRadio
===
undefined
?
0
:
this
.
commodityForm
.
num_limit
:
this
.
commodityForm
.
num_limit
,
});
if
(
res
.
code
==
0
)
{
ElMessage
.
success
({
message
:
"添加商品成功"
,
type
:
"success"
type
:
"success"
,
});
this
.
comTableData
.
push
(
res
.
result
.
goods_info
);
this
.
addCommodityPopup
=
false
;
...
...
@@ -625,7 +487,7 @@ var addProduct = {
// 添加商品保存(操作)
commoditySave
(
infoForm
)
{
this
.
$refs
[
infoForm
].
validate
(
valid
=>
{
this
.
$refs
[
infoForm
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
addCommodityTitle
==
"商品添加"
)
{
this
.
addGoodsMet
();
...
...
@@ -683,9 +545,9 @@ var addProduct = {
if
(
this
.
comTableData
.
length
==
0
)
{
this
.
comTableData
.
push
(...
this
.
multipleSelection
);
}
else
{
this
.
multipleSelection
.
forEach
(
item
=>
{
this
.
multipleSelection
.
forEach
((
item
)
=>
{
let
num
=
0
;
this
.
comTableData
.
some
(
val
=>
{
this
.
comTableData
.
some
((
val
)
=>
{
num
++
;
if
(
val
.
goods_sku_id
===
item
.
goods_sku_id
)
{
val
.
goods_sku_id
=
item
.
goods_sku_id
;
...
...
@@ -708,18 +570,18 @@ var addProduct = {
this
.
comTableData
.
splice
(
i
,
1
);
}
}
}
},
},
watch
:
{
addProduc
:
function
(
newVal
)
{
addProduc
:
function
(
newVal
)
{
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
if
(
marketingId
==
undefined
)
{
return
;
}
this
.
comTableData
=
newVal
;
},
picUrlList
:
function
()
{
picUrlList
:
function
()
{
if
(
this
.
picUrlList
.
length
>=
this
.
limitCount
)
{
this
.
hideUpload
=
true
;
}
else
{
...
...
@@ -729,53 +591,53 @@ var addProduct = {
},
created
()
{
this
.
getBusinessListMet
();
}
};
export
default
addProduct
;
},
};
export
default
addProduct
;
</
script
>
<
style
scoped
lang=
"less"
>
.addProduc {
.addProduc {
width: 90%;
margin: 0 auto;
}
.buttons_actions {
}
.buttons_actions {
display: flex;
justify-content: space-around;
align-items: center;
}
.btnGroup {
}
.btnGroup {
margin-bottom: 15px;
}
}
.addCommodityBtn {
.addCommodityBtn {
margin: 0 20px 0 0;
}
}
.infoForm /deep/.el-form-item:nth-child(1),
.infoForm /deep/.el-form-item:nth-child(2) {
.infoForm /deep/.el-form-item:nth-child(1),
.infoForm /deep/.el-form-item:nth-child(2) {
width: 100%;
}
}
.dioFor {
.dioFor {
display: block;
margin: 10px 0;
}
}
.comLibTableData /deep/ .el-table__body-wrapper {
.comLibTableData /deep/ .el-table__body-wrapper {
height: 550px;
overflow: scroll;
}
}
.price /deep/ .el-input__inner {
.price /deep/ .el-input__inner {
text-align: left;
}
}
.hide /deep/ .el-upload--picture-card {
.hide /deep/ .el-upload--picture-card {
display: none;
}
}
// 商品添加修改dialog-form表单
/deep/ .add_goods_dialog {
// 商品添加修改dialog-form表单
/deep/ .add_goods_dialog {
min-width: 370px;
}
}
</
style
>
src/pages/Activity/releaseProduc/components/infoEditing.vue
View file @
4f5f1b64
<
template
>
<div
class=
"infoEditing"
>
<el-form
ref=
"infoEditForm"
:model=
"infoEditForm"
label-width=
"80px"
@
submit
.
prevent
>
<el-form
ref=
"infoEditForm"
:model=
"infoEditForm"
label-width=
"80px"
@
submit
.
prevent
>
<el-form-item
label=
"标题:"
>
<el-input
v-model=
"infoEditForm.title"
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"介绍:"
>
<el-input
type=
"textarea"
v-model=
"infoEditForm.desc"
maxlength=
"1000"
rows=
"4"
></el-input>
<el-input
type=
"textarea"
v-model=
"infoEditForm.desc"
maxlength=
"1000"
rows=
"4"
></el-input>
</el-form-item>
<el-form-item
label=
"图片:"
>
<el-upload
...
...
@@ -47,18 +37,19 @@
</template>
<
script
>
import
{
GOODS_URI
}
from
"../../../../../server/config"
;
export
default
{
import
{
UploadPicUrl
}
from
"@/utils/util"
;
export
default
{
props
:
{
infoEditArr
:
{
type
:
Object
,
default
:
()
=>
{
return
{
pindan_pic_url
:
[]
pindan_pic_url
:
[],
};
},
require
:
true
}
require
:
true
,
},
},
data
()
{
return
{
...
...
@@ -66,38 +57,38 @@ export default {
title
:
""
,
// 标题
desc
:
""
,
// 介绍
picUploadList
:
[],
// 上传详情图片列表
picUrlList
:
[]
// 图片回显列表
picUrlList
:
[],
// 图片回显列表
},
picSubmitList
:
[],
// 发布功能需要的图片列表
propData
:
{},
isShowPopver
:
false
,
// 是否展示图片框
uploadUrl
:
`
${
GOODS_URI
}
/ksy/ks3apiunencrypt/ks3api_upload`
,
// 金山云上传地址
uploadUrl
:
UploadPicUrl
,
// 金山云上传地址
hideUpload
:
false
,
limitCount
:
9
limitCount
:
9
,
};
},
watch
:
{
infoEditArr
:
{
// 监听props属性 展示自提点列表
handler
:
function
(
newVal
)
{
handler
:
function
(
newVal
)
{
if
(
this
.
$route
.
query
.
marketing_id
)
{
this
.
propData
=
newVal
;
this
.
infoEditForm
.
title
=
this
.
propData
.
marketing_name
;
this
.
infoEditForm
.
desc
=
this
.
propData
.
pindan_desc
;
for
(
var
i
in
this
.
propData
.
pindan_pic_url
)
{
this
.
infoEditForm
.
picUrlList
.
push
({
url
:
this
.
propData
.
pindan_pic_url
[
i
]
url
:
this
.
propData
.
pindan_pic_url
[
i
],
});
this
.
picSubmitList
.
push
({
url
:
this
.
propData
.
pindan_pic_url
[
i
]
url
:
this
.
propData
.
pindan_pic_url
[
i
],
});
}
this
.
hideUpload
=
this
.
picSubmitList
.
length
>=
this
.
limitCount
;
// 大于9 隐藏
}
},
deep
:
true
,
immediate
:
true
}
immediate
:
true
,
},
},
methods
:
{
// 展示商品大图
...
...
@@ -115,7 +106,7 @@ export default {
this
.
infoEditForm
.
picUploadList
.
push
(
res
.
result
.
image_id
);
// 上传成功图片的id
this
.
picSubmitList
.
push
({
// 发布功能需要的图片列表
url
:
res
.
result
.
url
url
:
res
.
result
.
url
,
});
this
.
hideUpload
=
this
.
picSubmitList
.
length
>=
this
.
limitCount
;
},
...
...
@@ -141,23 +132,23 @@ export default {
this
.
infoEditForm
.
desc
=
this
.
propData
.
pindan_desc
;
for
(
var
i
in
this
.
propData
.
pindan_pic_url
)
{
this
.
infoEditForm
.
picUrlList
.
push
({
url
:
this
.
propData
.
pindan_pic_url
[
i
]
url
:
this
.
propData
.
pindan_pic_url
[
i
],
});
}
}
},
},
created
()
{
// this.marketingInfoMet();
}
};
},
};
</
script
>
<
style
scoped
>
.infoEditing
{
.infoEditing
{
width
:
64%
;
margin
:
0
auto
;
}
.hide
/
deep
/
.el-upload--picture-card
{
}
.hide
/
deep
/
.el-upload--picture-card
{
display
:
none
;
}
}
</
style
>
src/pages/Activity/releaseProduc/components/myMap.vue
View file @
4f5f1b64
...
...
@@ -5,42 +5,39 @@
<el-form
ref=
"form"
@
submit
.
prevent
>
<el-form-item
label-position=
"left"
>
<el-button
@
click=
"handleSearch"
>
搜索
</el-button>
<el-input
class=
"dialog-input"
v-model=
"searchKey"
placeholder=
"请输入关键字"
autocomplete=
"on"
>
<el-input
class=
"dialog-input"
v-model=
"searchKey"
placeholder=
"请输入关键字"
autocomplete=
"on"
>
<template
#
suffix
>
<i
@
click=
"searchKey = ''"
class=
"el-input__icon el-icon-close"
></i>
<i
@
click=
"searchKey = ''"
class=
"el-input__icon el-icon-close"
></i>
</
template
>
</el-input>
</el-form-item>
</el-form>
<div
id=
"js-result"
v-show=
"searchKey"
class=
"result"
></div>
</div>
<div
id=
"js-container"
class=
"myMap"
>
正在加载数据 ...
</div>
<div
id=
"js-container"
class=
"myMap"
>
正在加载数据 ...
</div>
</div>
<div
class=
"mapInfo"
>
<div
class=
"infoAll"
>
<h3
class=
"title"
>
拖拽选址
</h3>
<ul
class=
"info"
>
<li><span>
经度:
</span>
{{ dragData.lng }}
</li>
<li><span>
纬度:
</span>
{{ dragData.lat }}
</li>
<li><span>
地址:
</span>
{{ dragData.address }}
</li>
<li>
<span>
经度:
</span>
{{ dragData.lng }}
</li>
<li>
<span>
纬度:
</span>
{{ dragData.lat }}
</li>
<li>
<span>
地址:
</span>
{{ dragData.address }}
</li>
</ul>
</div>
<div
class=
"confirmButton"
>
<el-button
class=
"button_pre"
@
click=
"cancel"
>
取 消
</el-button>
<el-button
class=
"button_next"
type=
"primary"
@
click=
"confirm"
>
确 定
</el-button
>
<el-button
class=
"button_next"
type=
"primary"
@
click=
"confirm"
>
确 定
</el-button>
</div>
</div>
<!-- <div class="confirmButton">
...
...
@@ -51,8 +48,8 @@
</template>
<
script
>
import
remoteLoad
from
"@/utils/remoteLoad.js"
;
export
default
{
import
remoteLoad
from
"@/utils/remoteLoad.js"
;
export
default
{
name
:
"app"
,
data
()
{
return
{
...
...
@@ -65,8 +62,8 @@ export default {
address
:
null
,
nearestJunction
:
null
,
nearestRoad
:
null
,
nearestPOI
:
null
}
nearestPOI
:
null
,
},
};
},
methods
:
{
...
...
@@ -92,7 +89,7 @@ export default {
address
:
data
.
address
,
province
:
data
.
regeocode
.
addressComponent
.
province
,
city
:
data
.
regeocode
.
addressComponent
.
city
,
area
:
data
.
regeocode
.
addressComponent
.
district
area
:
data
.
regeocode
.
addressComponent
.
district
,
};
},
...
...
@@ -102,15 +99,16 @@ export default {
let
AMapUI
=
(
this
.
AMapUI
=
window
.
AMapUI
);
let
AMap
=
(
this
.
AMap
=
window
.
AMap
);
AMapUI
.
loadUI
([
"misc/PositionPicker"
],
PositionPicker
=>
{
AMapUI
.
loadUI
([
"misc/PositionPicker"
],
(
PositionPicker
)
=>
{
let
mapConfig
=
{
zoom
:
16
zoom
:
16
,
// cityName: this.MapCityName
};
if
(
this
.
lat
&&
this
.
lng
)
{
mapConfig
.
center
=
[
this
.
lng
,
this
.
lat
];
}
let
map
=
new
AMap
.
Map
(
"js-container"
,
mapConfig
);
let
_this
=
this
;
// 加载地图搜索插件
AMap
.
service
(
"AMap.PlaceSearch"
,
()
=>
{
...
...
@@ -120,21 +118,37 @@ export default {
citylimit
:
true
,
// city: this.MapCityName,
map
:
map
,
panel
:
"js-result"
panel
:
"js-result"
,
});
this
.
placeSearch
.
on
(
"selectChanged"
,
function
({
selected
})
{
console
.
log
(
selected
);
const
{
address
,
location
,
pname
,
cityname
,
adname
}
=
selected
.
data
;
_this
.
dragData
=
{
lng
:
location
.
lng
,
lat
:
location
.
lat
,
address
:
address
,
province
:
pname
,
city
:
cityname
,
area
:
adname
,
};
_this
.
searchKey
=
""
;
});
});
// 启用工具条
AMap
.
plugin
([
"AMap.ToolBar"
],
function
()
{
AMap
.
plugin
([
"AMap.ToolBar"
],
function
()
{
map
.
addControl
(
new
AMap
.
ToolBar
({
position
:
"RB"
})
position
:
"RB"
,
}),
);
});
// 地图地图定位
AMap
.
plugin
(
"AMap.Geolocation"
,
function
()
{
AMap
.
plugin
(
"AMap.Geolocation"
,
function
()
{
var
geolocation
=
new
AMap
.
Geolocation
({
// 是否使用高精度定位,默认:true
enableHighAccuracy
:
true
,
...
...
@@ -145,7 +159,7 @@ export default {
// 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
zoomToAccuracy
:
true
,
// 定位按钮的排放位置, RB表示右下
buttonPosition
:
"RB"
buttonPosition
:
"RB"
,
});
map
.
addControl
(
geolocation
);
geolocation
.
getCurrentPosition
();
...
...
@@ -171,18 +185,18 @@ export default {
//自定义外观
url
:
"//webapi.amap.com/ui/1.0/assets/position-picker2.png"
,
//图片地址
size
:
[
50
,
50
],
//要显示的点大小,将缩放图片
ancher
:
[
24
,
40
]
//锚点的位置,即被size缩放之后,图片的什么位置作为选中的位置
}
ancher
:
[
24
,
40
],
//锚点的位置,即被size缩放之后,图片的什么位置作为选中的位置
},
});
// 拖拽完成发送自定义 drag 事件
positionPicker
.
on
(
"success"
,
positionResult
=>
{
positionPicker
.
on
(
"success"
,
(
positionResult
)
=>
{
this
.
dragMap
(
positionResult
);
});
// 启动拖放
positionPicker
.
start
();
});
}
},
},
async
mounted
()
{
// 已载入高德地图API,则直接初始化地图
...
...
@@ -190,18 +204,16 @@ export default {
this
.
initMap
();
// 未载入高德地图API,则先载入API再初始化
}
else
{
await
remoteLoad
(
`http://webapi.amap.com/maps?v=1.3&key=bb057625545d8cf77df1379e7aaae0b5`
);
await
remoteLoad
(
`http://webapi.amap.com/maps?v=1.3&key=bb057625545d8cf77df1379e7aaae0b5`
);
await
remoteLoad
(
"http://webapi.amap.com/ui/1.0/main.js"
);
this
.
initMap
();
}
}
};
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.mapContainer {
.mapContainer {
height: 100%;
width: 100%;
// display: flex;
...
...
@@ -250,19 +262,19 @@ export default {
}
}
}
}
.m-map .search {
}
.m-map .search {
position: absolute;
top: 10px;
left: 10px;
width: 285px;
z-index: 1;
}
.m-map .search input {
}
.m-map .search input {
width: 180px;
border: 1px solid #ccc;
line-height: 20px;
padding: 5px;
outline: none;
}
}
</
style
>
src/pages/Goods/Detail/index.vue
View file @
4f5f1b64
...
...
@@ -3,10 +3,7 @@
<!-- 状态区域 -->
<el-card
class=
"state"
>
<h2
class=
"some_state"
>
{{
status
}}
</h2>
<h2
class=
"some_state"
style=
"margin-left:20px"
>
{{
onlineStatus
}}
</h2>
<h2
class=
"some_state"
style=
"margin-left: 20px"
>
{{
onlineStatus
}}
</h2>
<span
class=
"update_time"
>
上次更新时间:
{{
goodsObj
.
update_time
}}
</span>
<span>
创建时间:
{{
goodsObj
.
create_time
}}
</span>
</el-card>
...
...
@@ -15,10 +12,7 @@
<section
class=
"message"
>
<!-- 商品列表修改区 -->
<section
class=
"width50p"
>
<el-form
label-position=
"left"
label-width=
"140px"
>
<el-form
label-position=
"left"
label-width=
"140px"
>
<h3>
基本信息
</h3>
<el-form-item
label=
"生活号名称:"
>
<!--
<el-input
...
...
@@ -94,7 +88,7 @@
</section>
<!-- 商品详情图 -->
<section
class=
"width50p"
>
<h4
style=
"margin-bottom:
20px"
>
商品详情图
</h4>
<h4
style=
"margin-bottom:
20px"
>
商品详情图
</h4>
<el-upload
:data=
"
{ type: 1 }"
:action="uploadUrl"
...
...
@@ -142,7 +136,7 @@
</el-table>
</section> -->
<section
class=
"width50p"
>
<h4
style=
"margin-bottom:
20px"
>
商品介绍图
</h4>
<h4
style=
"margin-bottom:
20px"
>
商品介绍图
</h4>
<el-upload
:data=
"{ type: 1 }"
:disabled=
"$route.params.operation !== 'EDIT'"
...
...
@@ -180,43 +174,19 @@
<section
class=
"width50p"
>
<h3>
可用门店
</h3>
<el-table
:data=
"goodsObj.sub_shop"
>
<el-table-column
label=
"门店名称"
align=
"center"
prop=
"shop_name"
></el-table-column>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"phone"
></el-table-column>
<el-table-column
label=
"地址"
align=
"center"
prop=
"address"
></el-table-column>
<el-table-column
label=
"地理定位"
align=
"center"
>
<el-table-column
label=
"门店名称"
align=
"center"
prop=
"shop_name"
></el-table-column>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"phone"
></el-table-column>
<el-table-column
label=
"地址"
align=
"center"
prop=
"address"
></el-table-column>
<el-table-column
label=
"地理定位"
align=
"center"
>
<
template
#
default=
"scope"
>
<span>
经度:
{{
scope
.
row
.
longitude
}}
</span>
<br
/>
<span>
纬度:
{{
scope
.
row
.
latitude
}}
</span>
</
template
>
</el-table-column>
<el-table-column
v-if=
"$route.params.operation === 'EDIT'"
label=
"操作"
align=
"center"
fixed=
"right"
>
<el-table-column
v-if=
"$route.params.operation === 'EDIT'"
label=
"操作"
align=
"center"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<el-button
type=
"text"
@
click=
"deleteShops(scope.row.sub_shop_id)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"deleteShops(scope.row.sub_shop_id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -231,44 +201,19 @@
<el-button
@
click=
"getShops"
type=
"primary"
style=
"border-radius:20px;margin:20px 0 0 50%;transform: translate(-50%,0);"
>
门店列表
style=
"border-radius: 20px; margin: 20px 0 0 50%; transform: translate(-50%, 0)"
>
门店列表
</el-button>
</
template
>
<!-- 门店列表 -->
<el-table
ref=
"shopListRef"
:data=
"shopsList"
@
selection-change=
"handleShopsChange"
row-key=
"sub_shop_id"
>
<el-table
ref=
"shopListRef"
:data=
"shopsList"
@
selection-change=
"handleShopsChange"
row-key=
"sub_shop_id"
>
<!-- :selectable="canChooseShop"↓ -->
<el-table-column
type=
"selection"
width=
"55"
aria-checked=
"true"
:reserve-selection=
"true"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"shop_name"
label=
"门店名称"
></el-table-column>
<el-table-column
align=
"center"
prop=
"phone"
label=
"联系电话"
></el-table-column>
<el-table-column
align=
"center"
prop=
"address"
label=
"地址"
></el-table-column>
<el-table-column
align=
"center"
label=
"地理定位"
>
<el-table-column
type=
"selection"
width=
"55"
aria-checked=
"true"
:reserve-selection=
"true"
></el-table-column>
<el-table-column
align=
"center"
prop=
"shop_name"
label=
"门店名称"
></el-table-column>
<el-table-column
align=
"center"
prop=
"phone"
label=
"联系电话"
></el-table-column>
<el-table-column
align=
"center"
prop=
"address"
label=
"地址"
></el-table-column>
<el-table-column
align=
"center"
label=
"地理定位"
>
<
template
#
default=
"scope"
>
<span>
经度:
{{
scope
.
row
.
longitude
}}
</span>
<br
/>
...
...
@@ -279,76 +224,39 @@
<!-- 分页 -->
<el-pagination
style=
"margin-top:20px;
"
style=
"margin-top: 20px
"
background
@
current-change=
"changeShopListPage"
v-model:currentPage=
"shopCurrentPage"
:page-size=
"5"
layout=
"total, prev, pager, next"
:total=
"shopsCount"
>
</el-pagination>
<section
style=
"display:flex;justify-content:center;"
>
<el-button
type=
"primary"
style=
"border-radius:20px;"
@
click=
"handleChooseShops"
>
确定
</el-button>
></el-pagination>
<section
style=
"display: flex; justify-content: center"
>
<el-button
type=
"primary"
style=
"border-radius: 20px"
@
click=
"handleChooseShops"
>
确定
</el-button>
<!-- 添加门店弹窗 -->
<el-popover
placement=
"bottom"
:width=
"600"
trigger=
"click"
:visible=
"addShopShow"
>
<el-popover
placement=
"bottom"
:width=
"600"
trigger=
"click"
:visible=
"addShopShow"
>
<
template
#
reference
>
<el-button
@
click=
"addShopShow = true"
type=
"primary"
style=
"border-radius:20px;"
>
添加门店
</el-button>
<el-button
@
click=
"addShopShow = true"
type=
"primary"
style=
"border-radius: 20px"
>
添加门店
</el-button>
</
template
>
<!-- 添加门店表单 -->
<el-form
label-position=
"right"
label-width=
"100px"
:model=
"shopForm"
>
<el-form
label-position=
"right"
label-width=
"100px"
:model=
"shopForm"
>
<el-form-item
label=
"门店名称:"
>
<el-input
v-model=
"shopForm.shop_name"
maxlength=
"20"
show-word-limit
></el-input>
<el-input
v-model=
"shopForm.shop_name"
maxlength=
"20"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
label=
"联系电话:"
>
<el-input
v-model=
"shopForm.connect_phone"
maxlength=
"11"
show-word-limit
></el-input>
<el-input
v-model=
"shopForm.connect_phone"
maxlength=
"11"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
label=
"地址:"
>
<el-input
v-model=
"shopForm.address"
></el-input>
</el-form-item>
<el-form-item
label=
"地理定位:"
class=
"deep_place"
>
<el-form-item
label=
"地理定位:"
class=
"deep_place"
>
<el-input
v-model=
"shopForm.deep_place"
></el-input>
<a
style=
""
target=
"_blank"
href=
"https://lbs.amap.com/tools/picker"
>
高德获取定位
</a>
<a
style=
""
target=
"_blank"
href=
"https://lbs.amap.com/tools/picker"
>
高德获取定位
</a>
</el-form-item>
</el-form>
<section
style=
"display:flex;justify-content:center;"
>
<el-button
type=
"primary"
@
click=
"addShop"
>
保存
</el-button>
<section
style=
"display: flex; justify-content: center"
>
<el-button
type=
"primary"
@
click=
"addShop"
>
保存
</el-button>
<el-button
@
click=
"closeAddShops"
>
取消
</el-button>
</section>
</el-popover>
...
...
@@ -356,7 +264,7 @@
</el-popover>
</section>
<section
class=
"width50p"
>
<h4
style=
"margin-bottom:
20px"
>
价格信息
</h4>
<h4
style=
"margin-bottom:
20px"
>
价格信息
</h4>
<el-form
label-width=
"100px"
>
<!-- <el-form-item label="秒杀价">
<el-input
...
...
@@ -366,19 +274,11 @@
</el-form-item> -->
<el-form-item
label=
"售价"
>
<el-input
v-if=
"$route.params.operation === 'EDIT'"
v-model=
"goodsObj.price"
@
change=
"salePrice"
></el-input>
<el-input
v-if=
"$route.params.operation === 'EDIT'"
v-model=
"goodsObj.price"
@
change=
"salePrice"
></el-input>
<span
v-else
>
{{ goodsObj.price }}
</span>
</el-form-item>
<el-form-item
label=
"原价"
>
<el-input
v-if=
"$route.params.operation === 'EDIT'"
v-model=
"goodsObj.original_price"
@
change=
"perPrice"
></el-input>
<el-input
v-if=
"$route.params.operation === 'EDIT'"
v-model=
"goodsObj.original_price"
@
change=
"perPrice"
></el-input>
<span
v-else
>
{{ goodsObj.original_price }}
</span>
</el-form-item>
<el-form-item
label=
"结算价"
>
...
...
@@ -393,7 +293,7 @@
></el-input>
<span
v-else
>
{{ goodsObj.clear_price }}
</span>
</el-form-item>
<h4
style=
"margin:
20px 0"
>
库存信息
</h4>
<h4
style=
"margin:
20px 0"
>
库存信息
</h4>
<el-form-item
label=
"剩余库存量:"
>
<span>
{{ goodsObj.inventory_rest }}
</span>
</el-form-item>
...
...
@@ -421,13 +321,8 @@
</el-card>
<!-- 使用规则 -->
<el-card
class=
"message_border"
>
<h3
style=
"margin-bottom:30px;"
>
使用规则
</h3>
<el-form
style=
"width:480px"
:model=
"rulesForm"
label-position=
"left"
label-width=
"120px"
>
<h3
style=
"margin-bottom: 30px"
>
使用规则
</h3>
<el-form
style=
"width: 480px"
:model=
"rulesForm"
label-position=
"left"
label-width=
"120px"
>
<el-form-item
label=
"单人可买上限:"
>
<el-input-number
v-if=
"$route.params.operation === 'EDIT'"
...
...
@@ -444,42 +339,21 @@
v-if=
"$route.params.operation === 'EDIT'"
v-model=
"goodsObj.rule_refund"
placeholder=
"请选择"
:disabled=
"goodsObj.audit_status===
1"
:disabled=
"goodsObj.audit_status ===
1"
>
<el-option
v-for=
"item in rulesForm.rulesOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
<el-option
v-for=
"item in rulesForm.rulesOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
<span
v-else-if=
"
$route.params.operation !== 'EDIT' && goodsObj.rule_refund === 1
"
>
到期后自动退款
</span>
<span
v-else-if=
"
$route.params.operation !== 'EDIT' && goodsObj.rule_refund === 2
"
>
购买后不允许退款
</span>
<span
v-else-if=
"
$route.params.operation !== 'EDIT' && goodsObj.rule_refund === 3
"
>
到期后不退款
</span>
<span
v-else-if=
"$route.params.operation !== 'EDIT' && goodsObj.rule_refund === 1"
>
到期后自动退款
</span>
<span
v-else-if=
"$route.params.operation !== 'EDIT' && goodsObj.rule_refund === 2"
>
购买后不允许退款
</span>
<span
v-else-if=
"$route.params.operation !== 'EDIT' && goodsObj.rule_refund === 3"
>
到期后不退款
</span>
</el-form-item>
<el-form-item
label=
"使用日期:"
>
<el-radio-group
v-model=
"goodsObj.rule_date_type"
v-if=
"$route.params.operation === 'EDIT'"
>
<el-radio-group
v-model=
"goodsObj.rule_date_type"
v-if=
"$route.params.operation === 'EDIT'"
>
<el-radio
:label=
"1"
>
周末、节假日通用
</el-radio>
<el-radio
:label=
"2"
>
仅工作日可用
</el-radio>
</el-radio-group>
<span
v-else-if=
"
$route.params.operation !== 'EDIT' &&
goodsObj.rule_date_type === 1
"
>
周末、节假日通用
</span>
<span
v-else-if=
"
$route.params.operation !== 'EDIT' &&
goodsObj.rule_date_type === 2
"
>
仅工作日可用
</span>
<span
v-else-if=
"$route.params.operation !== 'EDIT' && goodsObj.rule_date_type === 1"
>
周末、节假日通用
</span>
<span
v-else-if=
"$route.params.operation !== 'EDIT' && goodsObj.rule_date_type === 2"
>
仅工作日可用
</span>
</el-form-item>
<el-form-item
label=
"使用开始时间:"
>
<el-time-picker
...
...
@@ -487,8 +361,7 @@
v-if=
"$route.params.operation === 'EDIT'"
v-model=
"rulesForm.useStartTime"
@
change=
"pickerStartTime"
>
</el-time-picker>
></el-time-picker>
<span
v-else
>
{{ goodsObj.rule_start_time }}
</span>
</el-form-item>
<el-form-item
label=
"使用结束时间:"
>
...
...
@@ -497,8 +370,7 @@
v-if=
"$route.params.operation === 'EDIT'"
v-model=
"rulesForm.useEndTime"
@
change=
"pickerEndTime"
>
</el-time-picker>
></el-time-picker>
<span
v-else
>
{{ goodsObj.rule_end_time }}
</span>
</el-form-item>
<el-form-item
label=
"过期时间"
>
...
...
@@ -509,8 +381,7 @@
type=
"datetime"
@
change=
"expirDateChange"
placeholder=
"选择日期时间"
>
</el-date-picker>
></el-date-picker>
<span
v-else
>
{{ expirationTime }}
</span>
</el-form-item>
<el-form-item
label=
"使用规则:"
>
...
...
@@ -528,17 +399,9 @@
</el-card>
<!-- 操作记录 -->
<el-card
class=
"message_border"
>
<h3
style=
"margin-bottom:30px;"
>
操作记录
</h3>
<el-table
border
stripe
:data=
"recordLits"
>
<el-table-column
label=
"状态"
prop=
"state"
align=
"center"
>
<h3
style=
"margin-bottom: 30px"
>
操作记录
</h3>
<el-table
border
stripe
:data=
"recordLits"
>
<el-table-column
label=
"状态"
prop=
"state"
align=
"center"
>
<
template
#
default=
"scope"
>
<span
v-if=
"scope.row.status === 0"
>
待审核
</span>
<span
v-else-if=
"scope.row.status === 1"
>
审核通过
</span>
...
...
@@ -549,90 +412,42 @@
<span
v-else
>
已下架
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作者"
prop=
"operator_name"
align=
"center"
></el-table-column>
<el-table-column
label=
"更新时间"
prop=
"create_time"
align=
"center"
></el-table-column>
<el-table-column
label=
"更新描述"
prop=
"note"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作者"
prop=
"operator_name"
align=
"center"
></el-table-column>
<el-table-column
label=
"更新时间"
prop=
"create_time"
align=
"center"
></el-table-column>
<el-table-column
label=
"更新描述"
prop=
"note"
align=
"center"
></el-table-column>
</el-table>
</el-card>
<!-- 审核保存返回 -->
<section
class=
"operationButton"
>
<el-button
type=
"primary"
v-if=
"$route.params.operation === 'AUDIT'"
@
click=
"onSuccess"
>
通过
</el-button>
<el-popover
v-if=
"$route.params.operation === 'AUDIT'"
placement=
"top"
:width=
"600"
trigger=
"click"
v-model:visible=
"rejectVisible"
>
<el-button
type=
"primary"
v-if=
"$route.params.operation === 'AUDIT'"
@
click=
"onSuccess"
>
通过
</el-button>
<el-popover
v-if=
"$route.params.operation === 'AUDIT'"
placement=
"top"
:width=
"600"
trigger=
"click"
v-model:visible=
"rejectVisible"
>
<
template
#
reference
>
<el-button
type=
"danger"
>
驳回
</el-button>
</
template
>
<el-form
:model=
"rejectReason"
>
<el-form-item
label=
"驳回原因:"
>
<el-input
show-word-limit
:maxlength=
"200"
type=
"textarea"
style=
"width:100%"
v-model
.
trim=
"rejectReason.reason"
></el-input>
<el-input
show-word-limit
:maxlength=
"200"
type=
"textarea"
style=
"width: 100%"
v-model
.
trim=
"rejectReason.reason"
></el-input>
</el-form-item>
</el-form>
<section
style=
"display:flex;justify-content:center;"
>
<el-button
type=
"danger"
@
click=
"onDefault"
>
驳回
</el-button>
<el-button
type=
"primary"
@
click=
"rejectVisible = false"
>
取消
</el-button>
<section
style=
"display: flex; justify-content: center"
>
<el-button
type=
"danger"
@
click=
"onDefault"
>
驳回
</el-button>
<el-button
type=
"primary"
@
click=
"rejectVisible = false"
>
取消
</el-button>
</section>
</el-popover>
<el-button
v-if=
"$route.params.operation === 'EDIT'"
type=
"primary"
@
click=
"saveDetailMessage"
>
保存
</el-button>
<el-button
v-if=
"$route.params.operation === 'EDIT'"
type=
"primary"
@
click=
"saveDetailMessage"
>
保存
</el-button>
<el-button
@
click=
"backToDetail"
>
返回
</el-button>
</section>
</el-card>
<!-- 展示缩略图 -->
<el-dialog
width=
"40%"
v-model=
"isShowPopver"
>
<el-image
:src=
"popoverImage"
fit=
"fill"
style=
"width:100%"
></el-image>
<el-dialog
width=
"40%"
v-model=
"isShowPopver"
>
<el-image
:src=
"popoverImage"
fit=
"fill"
style=
"width: 100%"
></el-image>
</el-dialog>
</template>
<
style
lang=
"less"
src=
"./index.less"
scope
></
style
>
<
script
>
import
{
import
{
getGoodsInfo
,
getGoodsList
,
postSuccess
,
...
...
@@ -640,17 +455,17 @@ import {
checkGoodsName
,
getShopsList
,
postAddShop
,
editGoods
}
from
"@/service/Goods/goods"
;
editGoods
,
}
from
"@/service/Goods/goods"
;
import
{
GOODS_URI
}
from
"../../../../server/config.js
"
;
import
{
UploadPicUrl
}
from
"@/utils/util
"
;
import
filterInput
from
"../utils/filterInput"
;
import
filterInput
from
"../utils/filterInput"
;
export
default
{
export
default
{
name
:
"GoodsDetail"
,
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
!
to
.
params
.
operation
)
{
next
({
name
:
"GoodsList"
});
}
else
if
(
!
to
.
params
.
spuId
)
{
...
...
@@ -660,14 +475,14 @@ export default {
}
},
created
()
{
created
()
{
this
.
getOptions
();
this
.
getGoodsDetailList
(
this
.
$route
.
params
.
spuId
);
},
computed
:
{
// 审核状态
status
()
{
status
()
{
if
(
this
.
goodsObj
.
audit_status
===
0
)
{
return
"待审核"
;
}
else
if
(
this
.
goodsObj
.
audit_status
===
1
)
{
...
...
@@ -678,7 +493,7 @@ export default {
},
// 上下架状态
onlineStatus
()
{
onlineStatus
()
{
if
(
this
.
goodsObj
.
online_status
===
0
)
{
return
"未上架"
;
}
else
if
(
this
.
goodsObj
.
online_status
===
1
)
{
...
...
@@ -686,48 +501,48 @@ export default {
}
else
{
return
"已下架"
;
}
}
},
},
watch
:
{
goodsObj
(
val
)
{
goodsObj
(
val
)
{
this
.
optionsValue
=
[
val
.
category_1_id
,
val
.
category_2_id
];
this
.
rulesForm
.
useStartTime
=
this
.
formatDate
(
val
.
rule_start_time
);
this
.
rulesForm
.
useEndTime
=
this
.
formatDate
(
val
.
rule_end_time
);
console
.
log
(
val
.
original_price
);
this
.
goodsObj
.
original_price
=
Number
(
val
.
original_price
)
this
.
goodsObj
.
original_price
=
Number
(
val
.
original_price
);
if
(
!
val
.
original_price
)
{
this
.
$nextTick
(()
=>
{
this
.
goodsObj
.
original_price
=
""
;
})
});
}
},
rejectVisible
(
val
)
{
rejectVisible
(
val
)
{
if
(
!
val
)
{
this
.
rejectReason
.
reason
=
""
;
}
},
},
data
()
{
data
()
{
return
{
// 商品分类选项
optionsProps
:
{
value
:
"category_id"
,
label
:
"name"
,
children
:
"sub_list"
children
:
"sub_list"
,
},
lifeList
:
[
{
value
:
1
,
options
:
"个人生活号"
},
{
value
:
2
,
options
:
"企业生活号"
}
{
value
:
2
,
options
:
"企业生活号"
},
],
optionList
:
[],
// 商品分类选项
optionsValue
:
[],
// 商品分类的值
// 商品回显信息
goodsObj
:
{
introduce
:
""
// 商品介绍
introduce
:
""
,
// 商品介绍
},
inventoryAdd
:
0
,
// 库存增减
...
...
@@ -751,11 +566,11 @@ export default {
rulesOptions
:
[
{
value
:
1
,
label
:
"到期自动退款"
},
{
value
:
2
,
label
:
"购买后不允许退款"
},
{
value
:
3
,
label
:
"到期后不退款"
}
{
value
:
3
,
label
:
"到期后不退款"
},
],
useStartTime
:
""
,
// 使用开始时间
useEndTime
:
""
,
// 使用结束时间
rule_desc
:
""
// 使用描述
rule_desc
:
""
,
// 使用描述
},
// 操作记录列表
...
...
@@ -763,7 +578,7 @@ export default {
// 驳回原因表单
rejectReason
:
{
reason
:
""
reason
:
""
,
},
shopsList
:
[],
// 门店列表
...
...
@@ -778,7 +593,7 @@ export default {
shop_name
:
""
,
connect_phone
:
""
,
address
:
""
,
deep_place
:
""
deep_place
:
""
,
},
shopList
:
[],
// 门店列表
...
...
@@ -793,12 +608,12 @@ export default {
activeStartTime
:
""
,
// 活动开始时间
activeEndTime
:
""
,
// 活动结束时间
uploadUrl
:
`
${
GOODS_URI
}
/ksy/ks3apiunencrypt/ks3api_upload`
,
// 金山云上传地址
uploadUrl
:
UploadPicUrl
,
// 金山云上传地址
addShopShow
:
false
,
// 添加门店弹框显示
expirationTime
:
""
,
// 过期时间
shopIds
:
""
// 已选商店id
shopIds
:
""
,
// 已选商店id
};
},
...
...
@@ -811,7 +626,7 @@ export default {
// else this.goodsObj[level] = "";
// },
// 获取级联选择商品列表
async
getOptions
()
{
async
getOptions
()
{
try
{
const
res
=
await
getGoodsList
();
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
...
...
@@ -822,7 +637,7 @@ export default {
},
// 获取详情列表
async
getGoodsDetailList
(
params
)
{
async
getGoodsDetailList
(
params
)
{
try
{
const
res
=
await
getGoodsInfo
({
goods_spu_id
:
params
});
if
(
res
.
code
!==
0
)
{
...
...
@@ -837,7 +652,7 @@ export default {
// 渲染过期时间
this
.
expirationTime
=
goods_info
.
expiration_time
;
// 初始化门店id
this
.
shopId
=
goods_info
.
sub_shop
.
map
(
item
=>
{
this
.
shopId
=
goods_info
.
sub_shop
.
map
((
item
)
=>
{
return
item
.
sub_shop_id
;
});
this
.
shopIds
=
this
.
shopId
.
join
(
","
);
...
...
@@ -847,14 +662,8 @@ export default {
this
.
activeEndTime
=
goods_info
.
rule_end_time
;
// 回显图片
this
.
formatInitPicture
(
goods_info
.
desc_pic_url_list
,
this
.
descPicUrlList
);
this
.
formatInitPicture
(
goods_info
.
introduce_pic_url_list
,
this
.
introducePicUrlList
);
this
.
formatInitPicture
(
goods_info
.
desc_pic_url_list
,
this
.
descPicUrlList
);
this
.
formatInitPicture
(
goods_info
.
introduce_pic_url_list
,
this
.
introducePicUrlList
);
this
.
detailUploadList
=
this
.
formatUploadPictureList
(
goods_info
.
desc_pic_url
);
this
.
introduceUploadList
=
this
.
formatUploadPictureList
(
goods_info
.
introduce_pic_url
);
}
catch
(
error
)
{
...
...
@@ -863,8 +672,8 @@ export default {
},
// 初始化照片
formatInitPicture
(
pictureList
,
storeList
)
{
pictureList
.
forEach
(
element
=>
{
formatInitPicture
(
pictureList
,
storeList
)
{
pictureList
.
forEach
((
element
)
=>
{
let
obj
=
new
Object
();
obj
.
url
=
element
;
storeList
.
push
(
obj
);
...
...
@@ -872,7 +681,7 @@ export default {
},
// 初始化上传照片列表
formatUploadPictureList
(
fileStr
)
{
formatUploadPictureList
(
fileStr
)
{
if
(
!
fileStr
)
{
return
[];
}
else
{
...
...
@@ -881,12 +690,12 @@ export default {
},
// 上传图片的公共方法
uploadPicture
(
response
,
storageList
)
{
uploadPicture
(
response
,
storageList
)
{
const
responseURL
=
response
.
result
.
image_id
;
storageList
.
push
(
responseURL
);
},
// 删除图片的公共方法
deletePicture
(
file
,
fileList
,
storageList
)
{
deletePicture
(
file
,
fileList
,
storageList
)
{
for
(
let
i
=
0
;
i
<
fileList
.
length
;
i
++
)
{
if
(
fileList
[
i
].
uid
==
file
.
uid
)
{
storageList
.
splice
(
i
,
1
);
...
...
@@ -895,7 +704,7 @@ export default {
},
// 格式化日期
formatDate
(
time
)
{
formatDate
(
time
)
{
const
nowTime
=
new
Date
();
const
nowYear
=
nowTime
.
getFullYear
();
const
nowMonth
=
nowTime
.
getMonth
()
+
1
;
...
...
@@ -908,7 +717,7 @@ export default {
},
// 检查输入是否带有表情符号
checkHaveExpression
(
value
)
{
checkHaveExpression
(
value
)
{
if
(
!
filterInput
.
checkString
(
value
))
{
this
.
$nextTick
(()
=>
{
this
.
goodsObj
.
goods_name
=
""
;
...
...
@@ -918,11 +727,11 @@ export default {
},
// 获取门店列表
async
getShops
()
{
async
getShops
()
{
const
query
=
{
life_account_id
:
this
.
goodsObj
.
life_account_id
,
page
:
this
.
shopCurrentPage
,
page_size
:
5
page_size
:
5
,
};
const
res
=
await
getShopsList
(
query
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
...
...
@@ -930,7 +739,7 @@ export default {
this
.
shopsList
=
res
.
result
;
this
.
shopsCount
=
res
.
count
;
this
.
$nextTick
(()
=>
{
this
.
shopsList
.
forEach
(
row
=>
{
this
.
shopsList
.
forEach
((
row
)
=>
{
if
(
this
.
shopId
.
indexOf
(
row
.
sub_shop_id
)
!==
-
1
)
{
this
.
$refs
.
shopListRef
.
toggleRowSelection
(
row
,
true
);
}
else
{
...
...
@@ -941,42 +750,42 @@ export default {
},
// 删除已选择门店
deleteShops
(
subShopId
)
{
this
.
goodsObj
.
sub_shop
=
this
.
goodsObj
.
sub_shop
.
filter
(
item
=>
{
deleteShops
(
subShopId
)
{
this
.
goodsObj
.
sub_shop
=
this
.
goodsObj
.
sub_shop
.
filter
((
item
)
=>
{
return
item
.
sub_shop_id
!==
subShopId
;
});
this
.
shopId
=
this
.
goodsObj
.
sub_shop
.
map
(
item
=>
{
this
.
shopId
=
this
.
goodsObj
.
sub_shop
.
map
((
item
)
=>
{
return
item
.
sub_shop_id
;
});
this
.
shopIds
=
this
.
shopId
.
join
(
","
);
},
// 门店列表更改时操作
handleShopsChange
(
value
)
{
handleShopsChange
(
value
)
{
this
.
chooseShopsList
=
[];
this
.
chooseShopsList
=
value
;
console
.
log
(
"已选择列表的长度"
,
this
.
chooseShopsList
.
length
);
const
shopList
=
value
.
map
(
item
=>
{
const
shopList
=
value
.
map
((
item
)
=>
{
return
item
.
sub_shop_id
;
});
this
.
shopIds
=
""
;
this
.
shopIds
=
shopList
.
join
(
","
);
},
// 商品列表换页
changeShopListPage
(
page
)
{
changeShopListPage
(
page
)
{
this
.
shopCurrentPage
=
page
;
this
.
getShops
();
},
// 确认选择的店铺
handleChooseShops
()
{
handleChooseShops
()
{
this
.
goodsObj
.
sub_shop
=
this
.
chooseShopsList
;
this
.
shopId
=
this
.
goodsObj
.
sub_shop
.
map
(
item
=>
{
this
.
shopId
=
this
.
goodsObj
.
sub_shop
.
map
((
item
)
=>
{
return
item
.
sub_shop_id
;
});
this
.
shopListShow
=
false
;
},
// 添加新门店
async
addShop
()
{
async
addShop
()
{
const
deepPlace
=
this
.
shopForm
.
deep_place
.
split
(
","
);
const
longitude
=
deepPlace
[
0
];
const
latitude
=
deepPlace
[
1
];
...
...
@@ -986,7 +795,7 @@ export default {
shop_name
:
this
.
shopForm
.
shop_name
,
longitude
,
// 经度
latitude
,
// 纬度
address
:
this
.
shopForm
.
address
address
:
this
.
shopForm
.
address
,
};
if
(
!
query
.
shop_name
)
{
return
this
.
$message
.
error
(
"请填写门店名称"
);
...
...
@@ -1000,10 +809,7 @@ export default {
if
(
!
query
.
longitude
||
!
query
.
latitude
)
{
return
this
.
$message
.
error
(
"请填写地理定位"
);
}
if
(
!
/
([
0-9
]{3,4}
-
)?[
0-9
]{7,8}
/
.
test
(
query
.
phone
)
&&
!
/^
[
1
][
3,4,5,7,8,9
][
0-9
]{9}
$/
.
test
(
query
.
phone
)
)
{
if
(
!
/
([
0-9
]{3,4}
-
)?[
0-9
]{7,8}
/
.
test
(
query
.
phone
)
&&
!
/^
[
1
][
3,4,5,7,8,9
][
0-9
]{9}
$/
.
test
(
query
.
phone
))
{
return
this
.
$message
.
error
(
"联系电话格式不正确"
);
}
...
...
@@ -1026,7 +832,7 @@ export default {
// },
// 取消新建门店
closeAddShops
()
{
closeAddShops
()
{
this
.
shopForm
.
shop_name
=
""
;
this
.
shopForm
.
address
=
""
;
this
.
shopForm
.
connect_phone
=
""
;
...
...
@@ -1035,16 +841,16 @@ export default {
},
// 商品分类列表变化
optionsChange
(
value
)
{
optionsChange
(
value
)
{
this
.
optionsValue
=
value
;
},
// 检查商品名称是否重复
async
checkSameName
()
{
async
checkSameName
()
{
const
res
=
await
checkGoodsName
({
life_account_id
:
this
.
goodsObj
.
life_account_id
,
goods_name
:
this
.
goodsObj
.
goods_name
,
goods_spu_id
:
this
.
goodsObj
.
goods_spu_id
goods_spu_id
:
this
.
goodsObj
.
goods_spu_id
,
});
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
result
.
can_use
)
{
...
...
@@ -1057,31 +863,31 @@ export default {
},
// 商品详情图上传成功时
handleDetailSuccess
(
res
)
{
handleDetailSuccess
(
res
)
{
console
.
log
(
res
);
this
.
uploadPicture
(
res
,
this
.
detailUploadList
);
},
// 商品详情图删除完成后的钩子
removeDetailFiles
(
file
,
fileList
)
{
removeDetailFiles
(
file
,
fileList
)
{
this
.
deletePicture
(
file
,
fileList
,
this
.
detailUploadList
);
},
// 商品介绍图上传成功钩子
introduceSuccess
(
res
)
{
introduceSuccess
(
res
)
{
this
.
uploadPicture
(
res
,
this
.
introduceUploadList
);
},
// 商品介绍图删除后的钩子
intrRemove
(
file
,
fileList
)
{
intrRemove
(
file
,
fileList
)
{
this
.
deletePicture
(
file
,
fileList
,
this
.
introduceUploadList
);
},
// 展示商品大图
previewImage
(
file
)
{
previewImage
(
file
)
{
this
.
popoverImage
=
file
.
url
;
this
.
isShowPopver
=
true
;
},
// 库存增减更改
hasNumberChange
()
{
hasNumberChange
()
{
if
(
!
this
.
inventoryAdd
)
{
this
.
$nextTick
(()
=>
{
this
.
inventoryAdd
=
0
;
...
...
@@ -1098,7 +904,7 @@ export default {
},
// 单人可购买上限的修改
handleLimitChange
()
{
handleLimitChange
()
{
if
(
!
this
.
goodsObj
.
rule_limit
)
{
this
.
$nextTick
(()
=>
{
this
.
goodsObj
.
rule_limit
=
0
;
...
...
@@ -1107,7 +913,7 @@ export default {
},
// 时间校验器
timePicker
(
time
)
{
timePicker
(
time
)
{
let
Hours
=
time
.
getHours
()
+
""
;
let
Minutes
=
time
.
getMinutes
()
+
""
;
let
Seconds
=
time
.
getSeconds
()
+
""
;
...
...
@@ -1123,16 +929,16 @@ export default {
return
`
${
Hours
}
:
${
Minutes
}
:
${
Seconds
}
`
;
},
// 选择规则开始时间
pickerStartTime
(
time
)
{
pickerStartTime
(
time
)
{
this
.
activeStartTime
=
this
.
timePicker
(
time
);
},
// 选择规则结束时间
pickerEndTime
(
time
)
{
pickerEndTime
(
time
)
{
this
.
activeEndTime
=
this
.
timePicker
(
time
);
},
// 过期时间更改
expirDateChange
(
time
)
{
expirDateChange
(
time
)
{
let
YYYY
=
time
.
getFullYear
();
let
MM
=
time
.
getMonth
()
+
1
;
let
DD
=
time
.
getDate
();
...
...
@@ -1158,7 +964,7 @@ export default {
},
// 禁用时间
disableExpirDate
(
time
)
{
disableExpirDate
(
time
)
{
const
timeMs
=
time
.
getTime
();
if
(
timeMs
>
Date
.
now
()
-
86400000
)
{
return
false
;
...
...
@@ -1168,39 +974,34 @@ export default {
},
// 更改售价
salePrice
()
{
salePrice
()
{
if
(
!
this
.
goodsObj
.
price
)
{
this
.
$nextTick
(()
=>
{
this
.
goodsObj
.
price
=
""
;
})
});
}
const
parseFloatValue
=
Number
(
this
.
goodsObj
.
price
).
toFixed
(
2
);
this
.
goodsObj
.
price
=
Number
(
parseFloatValue
);
if
(
typeof
this
.
goodsObj
.
price
===
"number"
&&
isNaN
(
this
.
goodsObj
.
price
)
)
{
if
(
typeof
this
.
goodsObj
.
price
===
"number"
&&
isNaN
(
this
.
goodsObj
.
price
))
{
this
.
goodsObj
.
price
=
""
;
return
this
.
$message
.
error
(
"售价价格必须为数字"
);
}
},
// 更改原价
perPrice
(
val
)
{
perPrice
(
val
)
{
let
reg
=
/^
\d
+
(\.\d{1,2})?
$/
;
if
(
!
reg
.
test
(
val
))
{
if
(
!
reg
.
test
(
val
))
{
return
this
.
$message
.
error
(
"请输入两位小数"
);
}
if
(
val
.
length
===
0
)
val
=
0
;
// const parseOriginalPrice = Number(val).toFixed(2);
// val = Number(parseOriginalPrice);
if
(
typeof
val
===
"number"
&&
isNaN
(
val
))
{
if
(
typeof
val
===
"number"
&&
isNaN
(
val
))
{
val
=
0
;
return
this
.
$message
.
error
(
"原价价格必为数字"
);
}
const
parseOriginalPrice
=
Number
(
this
.
goodsObj
.
original_price
).
toFixed
(
2
);
const
parseOriginalPrice
=
Number
(
this
.
goodsObj
.
original_price
).
toFixed
(
2
);
this
.
goodsObj
.
original_price
=
Number
(
parseOriginalPrice
);
// if (
// typeof this.goodsObj.original_price === "number" &&
...
...
@@ -1212,7 +1013,7 @@ export default {
},
// 审核通过
async
onSuccess
()
{
async
onSuccess
()
{
const
res
=
await
postSuccess
(
this
.
$route
.
params
.
spuId
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
$message
.
success
(
"审核通过"
);
...
...
@@ -1220,10 +1021,10 @@ export default {
},
// 审核拒绝
async
onDefault
()
{
async
onDefault
()
{
const
query
=
{
goods_spu_id
:
this
.
goodsObj
.
goods_spu_id
,
rejected_reason
:
this
.
rejectReason
.
reason
rejected_reason
:
this
.
rejectReason
.
reason
,
};
console
.
log
(
query
.
rejected_reason
);
if
(
query
.
rejected_reason
!==
"0"
&&
!
query
.
rejected_reason
)
{
...
...
@@ -1238,12 +1039,12 @@ export default {
},
// 返回主页面
backToDetail
()
{
backToDetail
()
{
this
.
$router
.
replace
({
name
:
"GoodsList"
});
},
// 保存修改信息
async
saveDetailMessage
()
{
async
saveDetailMessage
()
{
await
this
.
checkSameName
();
// 检验商品名称是否可用
if
(
!
this
.
optionsValue
)
{
return
this
.
$message
.
error
(
"请选择商品分类"
);
...
...
@@ -1268,7 +1069,7 @@ export default {
clear_price
:
+
this
.
goodsObj
.
clear_price
,
// 结算价
price
:
this
.
goodsObj
.
price
,
// 现价
sub_shop_ids
:
this
.
shopIds
,
// 门店id
rule_date_type
:
this
.
goodsObj
.
rule_date_type
// 使用日期类型(周末/工作日)
rule_date_type
:
this
.
goodsObj
.
rule_date_type
,
// 使用日期类型(周末/工作日)
};
console
.
log
(
111222333
,
query
.
original_price
);
...
...
@@ -1333,7 +1134,7 @@ export default {
}
this
.
$message
.
success
(
"商品编辑成功!"
);
this
.
$router
.
replace
({
name
:
"GoodsList"
});
}
}
};
},
},
};
</
script
>
src/service/Groupmeal/groupmeal.js
View file @
4f5f1b64
...
...
@@ -112,15 +112,21 @@ export async function orderRefundReject(params) {
// 导出订单
export
function
getOrderExportURL
(
eventId
,
type
)
{
var
ENV
;
if
(
process
.
env
.
NODE_ENV
==
"development"
)
{
ENV
=
"http://bp-dev.ini.yidian-inc.com/"
;
}
else
if
(
process
.
env
.
NODE_ENV
==
"test"
)
{
ENV
=
"http://bp-test.ini.yidian-inc.com/"
;
// var ENV;
// if(process.env.NODE_ENV == "development"){
// ENV = "http://bp-dev.ini.yidian-inc.com/"
// }else if(process.env.NODE_ENV == "test"){
// ENV = "http://bp-test.ini.yidian-inc.com/"
// }else{
// ENV = "http://bp.int.yidian-inc.com/"
// }
// return `${ENV}order/oldbackground/order_export?marketing_id=${eventId}&type=${type}`;
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
return
`http://127.0.0.1:8055/api/v1/relay/old_order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
}
else
{
ENV
=
"http://bp.int.yidian-inc.com/"
;
return
`/api/v1/relay/old_order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
}
return
`
${
ENV
}
order/oldbackground/order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
}
// 新订单管理
...
...
@@ -191,13 +197,10 @@ export async function newOrderRefundReject(params) {
// 导出订单
export
function
newGetOrderExportURL
(
eventId
,
type
)
{
var
ENV
;
if
(
process
.
env
.
NODE_ENV
==
"development"
)
{
ENV
=
"http://bp-dev.ini.yidian-inc.com/"
;
}
else
if
(
process
.
env
.
NODE_ENV
==
"test"
)
{
ENV
=
"http://bp-test.ini.yidian-inc.com/"
;
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
return
`http://127.0.0.1:8055/api/v1/relay/order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
}
else
{
ENV
=
"http://bp.int.yidian-inc.com/"
;
return
`/api/v1/relay/order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
}
return
`
${
ENV
}
order/background
/order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
// return `/api/v1/relay
/order_export?marketing_id=${eventId}&type=${type}`;
}
src/utils/util.js
View file @
4f5f1b64
...
...
@@ -22,25 +22,25 @@ import router from "@/router";
export
function
redirectToLogin
()
{
let
hasCallback
=
window
.
location
.
href
.
match
(
/
\?
callback/
);
if
(
hasCallback
)
return
;
if
(
hasCallback
)
return
;
let
isLogin
=
window
.
location
.
pathname
.
match
(
/op
\/
login/
);
router
.
push
(
`/op/login
${
!
isLogin
?
'?callback='
+
window
.
encodeURIComponent
(
window
.
location
.
pathname
)
:
''
}
`
)
router
.
push
(
`/op/login
${
!
isLogin
?
"?callback="
+
window
.
encodeURIComponent
(
window
.
location
.
pathname
)
:
""
}
`
);
}
export
function
redirectPage
()
{
let
url
=
window
.
location
.
search
.
split
(
'?callback='
)[
1
]
||
window
.
location
.
pathname
;
router
.
push
(
window
.
decodeURIComponent
(
url
))
let
url
=
window
.
location
.
search
.
split
(
"?callback="
)[
1
]
||
window
.
location
.
pathname
;
router
.
push
(
window
.
decodeURIComponent
(
url
));
}
export
function
isYdUser
(
email
)
{
return
email
.
match
(
/yidian-inc/
)
||
false
return
email
.
match
(
/yidian-inc/
)
||
false
;
}
export
function
setCookie
(
name
,
value
)
{
var
hour
=
8
;
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
+
hour
*
60
*
60
*
1000
);
document
.
cookie
=
name
+
"="
+
value
+
";expires="
+
exp
.
toGMTString
()
+
";path=/"
;
exp
.
setTime
(
exp
.
getTime
()
+
hour
*
60
*
60
*
1000
);
document
.
cookie
=
name
+
"="
+
value
+
";expires="
+
exp
.
toGMTString
()
+
";path=/"
;
}
//获取cookie
...
...
@@ -58,12 +58,15 @@ export function getCookie(NameOfCookie) {
}
export
function
delCookie
()
{
var
keys
=
document
.
cookie
.
match
(
/
[^
=;
]
+
(?=
=
)
/g
)
var
keys
=
document
.
cookie
.
match
(
/
[^
=;
]
+
(?=
=
)
/g
);
if
(
keys
)
{
for
(
var
i
=
keys
.
length
;
i
--
;
)
{
document
.
cookie
=
keys
[
i
]
+
'=0;path=/;expires='
+
new
Date
(
0
).
toUTCString
()
document
.
cookie
=
keys
[
i
]
+
'=0;path=/;domain='
+
document
.
domain
+
';expires='
+
new
Date
(
0
).
toUTCString
()
document
.
cookie
=
keys
[
i
]
+
'=0;path=/;domain=yidian-inc.com;expires='
+
new
Date
(
0
).
toUTCString
()
for
(
var
i
=
keys
.
length
;
i
--
;
)
{
document
.
cookie
=
keys
[
i
]
+
"=0;path=/;expires="
+
new
Date
(
0
).
toUTCString
();
document
.
cookie
=
keys
[
i
]
+
"=0;path=/;domain="
+
document
.
domain
+
";expires="
+
new
Date
(
0
).
toUTCString
();
document
.
cookie
=
keys
[
i
]
+
"=0;path=/;domain=yidian-inc.com;expires="
+
new
Date
(
0
).
toUTCString
();
}
}
}
export
const
UploadPicUrl
=
process
.
env
.
NODE_ENV
===
"development"
?
`http://127.0.0.1:8055/api/v1/relay/ks3api_upload`
:
"/api/v1/relay/ks3api_upload"
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment