Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 095f643d
authored
May 14, 2025
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复多规格
1 parent
e95349f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
components/Goods/Goods.js
components/Goods/Goods.js
View file @
095f643
...
@@ -91,10 +91,18 @@ Component({
...
@@ -91,10 +91,18 @@ Component({
goodsList
[
index
].
active
=
true
goodsList
[
index
].
active
=
true
// strTemp用来存储上一次选中的值,判断规格是否重新选择 ,避免页面交互闪烁
// strTemp用来存储上一次选中的值,判断规格是否重新选择 ,避免页面交互闪烁
// if (type && str != strTemp) {
// if (type && str != strTemp) {
if
(
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
]){
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
=
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
]
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
=
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationGoodsMap
[
str
]
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
goodsId
=
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
merchantGoodsId
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
goodsId
=
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
merchantGoodsId
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
specificationStr
=
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
specificationData
.
replace
(
';~;'
,
'/'
)
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
specificationStr
=
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
.
specificationData
.
replace
(
';~;'
,
'/'
)
// }
}
else
{
wx
.
$util
.
showToast
(
'暂无该规格商品'
)
goodsList
[
index
].
active
=
false
goodsList
[
index
].
multipleSpecificationsGoods
.
goods
=
''
goodsList
[
index
].
multipleSpecificationsGoods
.
specificationList
.
forEach
(
item
=>
{
item
.
value
=
''
})
}
this
.
setData
({
this
.
setData
({
goodsList
,
goodsList
,
strTemp
:
!
active
?
str
:
''
strTemp
:
!
active
?
str
:
''
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment