Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 97d74e59
authored
Sep 20, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 修复
1 parent
fe23f6a0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
29 deletions
components/CarBrands.vue
pages/boutique/components/Reception.vue
pages/boutique/components/SkuBox.vue
pages/equity/index.vue
store/modules/user.js
components/CarBrands.vue
View file @
97d74e5
...
...
@@ -83,15 +83,15 @@ export default {
mounted
()
{
},
methods
:
{
autoSelect
(
index
=
0
)
{
autoSelect
(
index
=
0
,
autoHideLoading
=
true
)
{
const
{
carBrandList
,
boutiqueDefaultCarBrandId
}
=
this
let
carIndex
=
0
if
(
boutiqueDefaultCarBrandId
)
{
carIndex
=
carBrandList
.
findIndex
(
e
=>
e
.
id
==
boutiqueDefaultCarBrandId
)
if
(
carIndex
<
0
)
carIndex
=
0
if
(
carIndex
<
0
)
carIndex
=
0
}
if
(
index
<
0
)
index
=
0
if
(
carBrandList
.
length
)
this
.
selectCar
(
carBrandList
[
carIndex
],
true
,
index
)
if
(
carBrandList
.
length
)
this
.
selectCar
(
carBrandList
[
carIndex
],
true
,
index
,
autoHideLoading
)
},
open
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
...
...
@@ -125,9 +125,9 @@ export default {
this
.
$refs
.
carBrandListVisible
.
open
()
this
.
carBrandListOff
=
true
},
selectCar
(
e
,
auto
=
false
,
index
)
{
selectCar
(
e
,
auto
=
false
,
index
,
autoHideLoading
=
true
)
{
let
{
clickFlga
}
=
this
if
(
clickFlga
)
return
if
(
clickFlga
)
return
this
.
clickFlga
=
true
this
.
selectItem
=
{
carBrand
:
e
.
brandName
,
...
...
@@ -137,6 +137,7 @@ export default {
}
const
carList
=
uni
.
getStorageSync
(
`
${
e
.
id
}
_
${
e
.
brandId
}
_carlist`
)
if
(
carList
)
{
this
.
clickFlga
=
false
this
.
carlist
=
carList
if
(
auto
&&
carList
.
length
)
this
.
handleSelect
(
carList
[
index
])
else
this
.
$refs
.
carBoxVisible
.
open
()
...
...
@@ -149,7 +150,7 @@ export default {
brandId
:
e
.
brandId
,
childBrandId
:
e
.
id
}).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
autoHideLoading
)
uni
.
hideLoading
()
this
.
carlist
=
res
if
(
res
)
uni
.
setStorageSync
(
`
${
e
.
id
}
_
${
e
.
brandId
}
_carlist`
,
res
)
if
(
!
carList
)
{
...
...
pages/boutique/components/Reception.vue
View file @
97d74e5
...
...
@@ -129,7 +129,12 @@ export default {
'M7'
:
m7
,
'M9'
:
m9
,
}[
newval
]
if
(
this
.
show
&&
newval
&&
!
this
.
isPreview
&&
this
.
customerType
==
1
)
this
.
$refs
.
carBrandRef
.
autoSelect
(
this
.
carList
.
findIndex
(
e
=>
e
==
newval
))
if
(
this
.
show
&&
newval
&&
!
this
.
isPreview
&&
this
.
customerType
==
1
)
{
uni
.
showLoading
({
mask
:
true
})
this
.
$refs
.
carBrandRef
.
autoSelect
(
this
.
carList
.
findIndex
(
e
=>
e
==
newval
),
false
)
}
}
},
watchStatus
:
{
...
...
@@ -178,9 +183,10 @@ export default {
methods
:
{
changeCar
(
item
)
{
if
(
this
.
change_disabled
)
return
if
(
this
.
change_disabled
||
this
.
currentCarString
==
item
)
return
uni
.
hideLoading
()
this
.
currentCarString
=
item
this
.
updateViewKey
=
Date
.
now
()
},
changePreView
(
e
,
leave
=
true
)
{
let
{
currentItem
}
=
this
,
...
...
@@ -210,6 +216,7 @@ export default {
this
.
customerInfo
.
carModel
=
item
.
name
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
this
.
customerInfo
)
this
.
carInfo
=
item
uni
.
hideLoading
()
},
showPicture
(
off
=
true
)
{
let
{
detailPicurl
}
=
this
.
currentItem
...
...
pages/boutique/components/SkuBox.vue
View file @
97d74e5
<
template
>
<view
class=
"sku-content"
>
<view
class=
"first-type-box flex
"
>
<view
:class=
"['first-type-box flex',firstClass(boutiqueMediaConfig[currentCar])]
"
>
<view
:class=
"['block',blockClass]"
></view>
<template
v-for=
"(i,index) in boutiqueMediaConfig[currentCar]"
>
<view
...
...
@@ -29,7 +29,7 @@
<view
class=
"padding-right"
></view>
</view>
</scroll-view>
<
template
v-if=
"tabId == 2 && second
Index == 0
"
>
<
template
v-if=
"tabId == 2 && second
Name == '窗膜'
"
>
<view
class=
"sub-title"
>
品牌
</view>
<scroll-view
class=
"thirdly-type-scroll"
...
...
@@ -107,6 +107,7 @@ export default {
scrollTop
:
0
},
secondList
:
[],
secondName
:
''
}
},
watch
:
{
...
...
@@ -168,8 +169,8 @@ export default {
},
async
setSecondList
()
{
let
secondList
=
this
.
boutiqueMediaConfig
[
this
.
currentCar
],
index
=
secondList
.
findIndex
(
e
=>
e
.
tabId
==
this
.
tabId
)
if
(
index
==
-
1
)
index
=
0
index
=
secondList
.
findIndex
(
e
=>
e
.
tabId
==
this
.
tabId
)
if
(
index
==
-
1
)
index
=
0
let
{
list
}
=
secondList
[
index
]
this
.
secondList
=
list
this
.
secondClick
(
0
,
false
)
...
...
@@ -185,8 +186,10 @@ export default {
},
secondClick
(
index
,
filter
=
true
)
{
if
(
filter
&&
this
.
secondIndex
==
index
)
return
let
{
secondList
}
=
this
this
.
secondIndex
=
index
if
(
this
.
tabId
==
2
&&
index
==
0
)
{
this
.
secondName
=
secondList
[
index
].
category
if
(
this
.
tabId
==
2
&&
this
.
secondName
==
'窗膜'
)
{
let
{
infoList
}
=
this
.
secondList
[
0
],
arr
=
Array
.
from
(
new
Set
([...
infoList
.
map
((
e
)
=>
e
.
brand
)])),
brandList
=
[]
...
...
@@ -218,20 +221,15 @@ export default {
getGoodsList
()
{
this
.
goodsList
=
[]
this
.
flagObject
.
goodsFlag
=
false
uni
.
showLoading
({
mask
:
true
})
let
{
secondIndex
,
secondList
,
tabId
,
brandList
,
thirdlyIndex
}
=
this
uni
.
hideLoading
()
let
goodsList
=
goodsList
=
this
.
setGoodsData
(
tabId
==
2
&&
secondIndex
==
0
?
brandList
[
thirdlyIndex
].
list
:
secondList
[
secondIndex
].
infoList
)
let
{
secondIndex
,
secondList
,
tabId
,
brandList
,
thirdlyIndex
,
secondName
}
=
this
let
goodsList
=
goodsList
=
this
.
setGoodsData
(
tabId
==
2
&&
secondName
==
'窗膜'
?
brandList
[
thirdlyIndex
].
list
:
secondList
[
secondIndex
].
infoList
)
this
.
goodsList
=
goodsList
this
.
$nextTick
(()
=>
{
this
.
flagObject
.
goodsFlag
=
true
this
.
flagObject
.
scrollTop
=
1
this
.
flagObject
.
goodsFlag
=
true
this
.
flagObject
.
scrollTop
=
-
100
this
.
changeGoods
(
goodsList
[
0
],
0
,
false
)
setTimeout
(()
=>
{
this
.
setScrollHeight
()
this
.
changeGoods
(
goodsList
[
0
],
0
,
false
)
})
},
100
)
},
changePreView
()
{
this
.
$emit
(
'changePreView'
,
this
.
currentItem
)
...
...
@@ -243,6 +241,9 @@ export default {
goodsList
.
push
(
e
)
})
return
goodsList
},
firstClass
(
list
=
[])
{
return
list
.
length
==
2
?
'two-block'
:
''
}
}
}
...
...
@@ -277,13 +278,13 @@ export default {
line-height
:
44
rpx
;
position
:
relative
;
z-index
:
2
;
opacity
:
.7
;
opacity
:
0
.7
;
.sprite-icon
{
margin-bottom
:
12
rpx
;
transform
:
scale
(
1.45
);
}
}
.active
{
.active
{
opacity
:
1
;
}
.block
{
...
...
@@ -307,6 +308,18 @@ export default {
left
:
560
rpx
;
}
}
.two-block
{
.first-type-item,
.block
{
width
:
420
rpx
;
}
.block-0
{
left
:
0
;
}
.block-1
{
left
:
420
rpx
;
}
}
.second-type-scroll
{
width
:
100%
;
animation
:
show-view-opacity
0.15s
forwards
;
...
...
pages/equity/index.vue
View file @
97d74e5
...
...
@@ -182,11 +182,12 @@ export default {
uni
.
$api
.
systemApi
.
updateMockData
({
moduleList
,
toolList
,
},
[
'moduleList'
,
'toolList'
],
'byd_mock_data'
)
},
[
'moduleList'
,
'toolList'
],
'byd_mock_data'
)
this
.
setViewInfo
(
moduleList
,
toolList
)
}
else
{
let
{
moduleList
,
toolList
,
default_moduleList
,
default_toolList
,
boutiqueDefaultCarBrandId
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
)
if
(
this
.
channelType
==
3
)
{
/**其他品牌 */
...
...
@@ -220,6 +221,7 @@ export default {
moduleList
,
toolList
},
[
"moduleList"
,
'toolList'
])
this
.
$store
.
state
.
user
.
boutiqueDefaultCarBrandId
=
boutiqueDefaultCarBrandId
this
.
setViewInfo
(
moduleList
,
toolList
)
}
}
...
...
store/modules/user.js
View file @
97d74e5
...
...
@@ -81,7 +81,7 @@ export default {
},
setReceptionTrack
({
state
},
{
key
,
value
})
{
state
.
receptionTrack
[
key
]
=
value
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
state
.
receptionTrack
)))
//
console.log(JSON.parse(JSON.stringify(state.receptionTrack)))
},
clearReceptionTrack
({
state
})
{
state
.
receptionTrack
=
{}
...
...
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