Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
7bd7f39e
Commit
7bd7f39e
authored
Jul 01, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 默认品牌选择
parent
878a1bfe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
addParts.vue
src/pages/parts/addParts.vue
+17
-7
No files found.
src/pages/parts/addParts.vue
View file @
7bd7f39e
...
...
@@ -123,9 +123,8 @@ export default {
getApp
().
trackPage
(
'选择配件页'
)
if
(
e
)
{
this
.
categaryId
=
e
.
categaryId
this
.
brandId
=
e
.
brandId
this
.
type
=
e
.
type
this
.
getBrandList
()
this
.
getBrandList
(
e
.
brandId
)
}
else
{
this
.
getCategaryList
()
}
...
...
@@ -150,19 +149,30 @@ export default {
})
},
// 获取品牌
getBrandList
()
{
getBrandList
(
id
)
{
this
.
$u
.
api
.
getBrandList
({
categoryId
:
this
.
categaryId
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
const
data
=
res
.
data
if
(
data
.
length
>
0
)
{
this
.
brand
=
data
.
map
(
v
=>
{
let
item
,
index
this
.
brand
=
data
.
map
((
v
,
i
)
=>
{
if
(
id
&&
parseInt
(
id
)
===
v
.
brandId
)
{
item
=
v
index
=
i
}
v
.
label
=
v
.
brandName
return
v
})
this
.
brandId
=
this
.
brand
[
0
].
brandId
if
(
item
&&
index
)
{
this
.
selectBrand
(
item
,
index
)
this
.
scrollId
=
`brand
${
item
.
brandId
}
`
}
else
{
this
.
brandId
=
this
.
brand
[
0
].
brandId
this
.
lists
=
[]
this
.
getPartsList
()
}
}
this
.
lists
=
[]
this
.
getPartsList
()
}
})
},
...
...
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