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
435e8101
Commit
435e8101
authored
Jul 06, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.banshouhui.com/lijundan/self-support
into dev
parents
4c0d73cc
9f04d6cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
addParts.vue
src/pages/parts/addParts.vue
+19
-18
No files found.
src/pages/parts/addParts.vue
View file @
435e8101
...
...
@@ -118,26 +118,26 @@ export default {
// 总数
num
()
{
return
this
.
submitList
.
reduce
((
counter
,
{
disabled
,
quantity
})
=>
!
disabled
?
counter
+=
quantity
:
counter
,
0
)
},
loadText
()
{
return
{
loadmore
:
'上拉加载更多'
,
loading
:
'努力加载中'
,
nomore
:
this
.
pageNumber
>
1
?
'没有更多了'
:
'未找到备件'
}
},
loadText
()
{
return
{
loadmore
:
'上拉加载更多'
,
loading
:
'努力加载中'
,
nomore
:
this
.
pageNumber
>
1
?
'没有更多了'
:
'未找到备件'
}
}
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'选择配件页'
)
if
(
e
)
{
if
(
e
.
type
==
1
)
{
this
.
categaryId
=
e
.
categaryId
||
''
this
.
type
=
e
.
type
this
.
getBrandList
(
e
.
brandId
)
}
else
if
(
e
.
type
==
2
)
{
this
.
type
=
e
.
type
this
.
getCategaryList
()
}
getApp
().
trackPage
(
'选择配件页'
)
if
(
e
)
{
if
(
e
.
type
==
1
)
{
this
.
categaryId
=
e
.
categaryId
||
''
this
.
type
=
e
.
type
this
.
getBrandList
(
e
.
brandId
)
}
else
if
(
e
.
type
==
2
)
{
this
.
type
=
e
.
type
this
.
getCategaryList
()
}
}
},
onShow
()
{
...
...
@@ -277,6 +277,7 @@ export default {
// 加入申请
apply
(
item
,
index
)
{
this
.
$set
(
this
.
lists
[
index
],
'disabled'
,
false
)
this
.
$set
(
this
.
lists
[
index
],
'quantity'
,
1
)
// 如果购物车没有该记录,则添加
const
findIndex
=
this
.
submitList
.
findIndex
(
v
=>
v
.
id
===
item
.
id
)
...
...
@@ -285,7 +286,7 @@ export default {
// 改变数量
numChange
(
val
,
item
,
index
)
{
this
.
$set
(
this
.
lists
[
index
],
'quantity'
,
val
)
if
(
val
===
0
)
this
.
$set
(
this
.
lists
[
index
],
'disabled'
,
true
)
// 如果购物车有该记录,则更新
const
findIndex
=
this
.
submitList
.
findIndex
(
v
=>
v
.
id
===
item
.
id
)
this
.
$set
(
this
.
submitList
[
findIndex
],
'quantity'
,
val
)
...
...
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