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 da0bd622
authored
Nov 28, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 轻改适配车型
1 parent
38428392
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
52 deletions
pages/boutique/case.vue
pages/boutique/components/Reception.vue
pages/boutique/index.vue
pages/boutique/case.vue
View file @
da0bd62
...
@@ -175,7 +175,6 @@ export default {
...
@@ -175,7 +175,6 @@ export default {
watchStatus
:
{
watchStatus
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
selectIndex
=
'全部'
this
.
selectIndex
=
'全部'
// console.log(val)
// this.name = '';
// this.name = '';
// this.isSearch = false
// this.isSearch = false
// this.list = this.views
// this.list = this.views
...
@@ -232,7 +231,6 @@ export default {
...
@@ -232,7 +231,6 @@ export default {
this
.
isSelect
=
false
this
.
isSelect
=
false
},
},
chooseType
(
val
)
{
chooseType
(
val
)
{
console
.
log
(
val
)
this
.
selectIndex
=
val
.
value
this
.
selectIndex
=
val
.
value
this
.
isSelect
=
false
this
.
isSelect
=
false
this
.
getCaseList
(
this
.
selectIndex
==
'全部'
?
''
:
this
.
selectIndex
,
this
.
name
)
this
.
getCaseList
(
this
.
selectIndex
==
'全部'
?
''
:
this
.
selectIndex
,
this
.
name
)
...
@@ -244,7 +242,6 @@ export default {
...
@@ -244,7 +242,6 @@ export default {
const
params
=
{
merchantId
:
shopMerchantId
,
category
}
const
params
=
{
merchantId
:
shopMerchantId
,
category
}
if
(
name
)
params
.
materialName
=
name
if
(
name
)
params
.
materialName
=
name
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getCaseList
(
params
)
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getCaseList
(
params
)
console
.
log
(
res
)
this
.
list
=
res
.
list
this
.
list
=
res
.
list
this
.
searchList
=
res
.
list
this
.
searchList
=
res
.
list
this
.
scrollTop
=
1
this
.
scrollTop
=
1
...
@@ -256,7 +253,6 @@ export default {
...
@@ -256,7 +253,6 @@ export default {
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
{
shopMerchantId
}
=
userInfo
;
{
shopMerchantId
}
=
userInfo
;
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getCategory
({
merchantId
:
shopMerchantId
})
const
res
=
await
uni
.
$api
.
boutiqueApi
.
getCategory
({
merchantId
:
shopMerchantId
})
console
.
log
(
res
)
const
_list
=
res
.
map
(
item
=>
{
const
_list
=
res
.
map
(
item
=>
{
return
{
return
{
label
:
item
,
label
:
item
,
...
...
pages/boutique/components/Reception.vue
View file @
da0bd62
...
@@ -8,16 +8,26 @@
...
@@ -8,16 +8,26 @@
ref="receptionCanvas"
ref="receptionCanvas"
>
>
<template
slot=
"customContent"
>
<template
slot=
"customContent"
>
<view
class=
"tab-box flex"
>
<view
class=
"select-box flex"
>
<template
v-for=
"(item, index) in carList"
>
<view
<view
:key=
"index"
class=
"select flex"
:class=
"['tab',`$
{currentIndex == index ? 'active' : ''}`]"
@
click
.
stop=
"showSelect"
@click="changeCar(item)"
>
>
{{
item
}}
{{
currentCarString
}}
<view
class=
"sprite-icon icon-arrow-bottom"
v-if=
"carList.length > 1 && !change_disabled"
></view>
</view>
<view
class=
"pop-box"
v-show=
"isSelect"
>
<view
v-for=
"i in carList"
:key=
"i.label"
class=
"type-item flex"
:class=
"i == currentCarString ? 'active' : ''"
@
click=
"changeCar(i)"
>
{{
i
}}
</view>
</view>
</view>
</
template
>
</view>
</view>
<view
<view
class=
"risk-informed flex"
class=
"risk-informed flex"
...
@@ -46,14 +56,6 @@
...
@@ -46,14 +56,6 @@
>
* 点击图片查看详情
>
</view>
>
* 点击图片查看详情
>
</view>
</view>
</view>
</
template
>
</
template
>
<
template
v-else
>
<view
class=
"left-content"
>
<image
class=
"default"
:src=
"defaultImg"
/>
</view>
</
template
>
<view
class=
"right-content"
>
<view
class=
"right-content"
>
<view
:class=
"['sku-box',isPreview ? 'preview' : '']"
>
<view
:class=
"['sku-box',isPreview ? 'preview' : '']"
>
<sku-box
<sku-box
...
@@ -132,7 +134,6 @@ export default {
...
@@ -132,7 +134,6 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
carList
:
[
'M5'
,
'M7'
,
'M9'
],
currentCarString
:
''
,
currentCarString
:
''
,
customerInfo
:
{},
customerInfo
:
{},
updateViewKey
:
Date
.
now
(),
updateViewKey
:
Date
.
now
(),
...
@@ -140,7 +141,8 @@ export default {
...
@@ -140,7 +141,8 @@ export default {
currentImgUrl
:
''
,
currentImgUrl
:
''
,
currentItem
:
null
,
currentItem
:
null
,
tabs
:
[
'加装'
,
'选装'
],
tabs
:
[
'加装'
,
'选装'
],
tabIndex
:
0
tabIndex
:
0
,
isSelect
:
false
,
}
}
},
},
watch
:
{
watch
:
{
...
@@ -160,11 +162,6 @@ export default {
...
@@ -160,11 +162,6 @@ export default {
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
!
this
.
hasOptionals
&&
this
.
tabIndex
==
1
)
this
.
tabIndex
=
0
if
(
!
this
.
hasOptionals
&&
this
.
tabIndex
==
1
)
this
.
tabIndex
=
0
this
.
defaultImg
=
{
'M5'
:
m5
,
'M7'
:
m7
,
'M9'
:
m9
,
}[
newval
]
if
(
this
.
show
&&
newval
&&
!
this
.
isPreview
&&
this
.
customerType
==
1
)
{
if
(
this
.
show
&&
newval
&&
!
this
.
isPreview
&&
this
.
customerType
==
1
)
{
uni
.
showLoading
({
uni
.
showLoading
({
mask
:
true
mask
:
true
...
@@ -185,6 +182,7 @@ export default {
...
@@ -185,6 +182,7 @@ export default {
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
newval
)
{
if
(
newval
)
{
this
.
isSelect
=
false
if
(
newval
&&
this
.
currentItem
&&
this
.
tabIndex
==
0
)
this
.
changePreView
(
this
.
currentItem
,
false
,
false
)
if
(
newval
&&
this
.
currentItem
&&
this
.
tabIndex
==
0
)
this
.
changePreView
(
this
.
currentItem
,
false
,
false
)
}
}
}
}
...
@@ -223,6 +221,13 @@ export default {
...
@@ -223,6 +221,13 @@ export default {
let
flag
=
false
let
flag
=
false
if
(
this
.
show
)
flag
=
this
.
boutiqueMediaConfig
[
this
.
currentCarString
].
optionals
&&
this
.
boutiqueMediaConfig
[
this
.
currentCarString
].
optionals
.
length
if
(
this
.
show
)
flag
=
this
.
boutiqueMediaConfig
[
this
.
currentCarString
].
optionals
&&
this
.
boutiqueMediaConfig
[
this
.
currentCarString
].
optionals
.
length
return
flag
return
flag
},
carList
()
{
let
{
boutiqueMediaConfig
}
=
this
,
carList
=
[]
Object
.
keys
(
boutiqueMediaConfig
).
map
(
e
=>
carList
.
push
(
e
))
console
.
log
(
carList
)
return
carList
}
}
},
},
...
@@ -231,6 +236,7 @@ export default {
...
@@ -231,6 +236,7 @@ export default {
changeCar
(
item
)
{
changeCar
(
item
)
{
if
(
this
.
change_disabled
||
this
.
currentCarString
==
item
)
return
uni
.
hideLoading
()
if
(
this
.
change_disabled
||
this
.
currentCarString
==
item
)
return
uni
.
hideLoading
()
this
.
currentCarString
=
item
this
.
currentCarString
=
item
this
.
isSelect
=
false
this
.
updateViewKey
=
Date
.
now
()
this
.
updateViewKey
=
Date
.
now
()
this
.
clearCanvas
()
this
.
clearCanvas
()
},
},
...
@@ -274,7 +280,7 @@ export default {
...
@@ -274,7 +280,7 @@ export default {
this
.
$emit
(
'reception'
,
e
)
this
.
$emit
(
'reception'
,
e
)
},
},
clearCustomerReceivedTimer
()
{
clearCustomerReceivedTimer
()
{
if
(
this
.
couponPopupRef
.
pageParams
.
qrTimer
)
{
if
(
this
.
couponPopupRef
?.
pageParams
?
.
qrTimer
)
{
clearInterval
(
this
.
couponPopupRef
.
pageParams
.
qrTimer
)
clearInterval
(
this
.
couponPopupRef
.
pageParams
.
qrTimer
)
this
.
couponPopupRef
.
pageParams
.
qrTimer
=
null
this
.
couponPopupRef
.
pageParams
.
qrTimer
=
null
}
}
...
@@ -302,6 +308,10 @@ export default {
...
@@ -302,6 +308,10 @@ export default {
if
(
index
==
1
)
this
.
previewLeave
(
this
.
currentItem
)
if
(
index
==
1
)
this
.
previewLeave
(
this
.
currentItem
)
else
this
.
$refs
.
sku
.
changeCar
(
this
.
currentCarString
)
else
this
.
$refs
.
sku
.
changeCar
(
this
.
currentCarString
)
this
.
clearCanvas
()
this
.
clearCanvas
()
},
showSelect
(){
if
(
this
.
carList
.
length
==
1
||
this
.
change_disabled
)
return
this
.
isSelect
=
!
this
.
isSelect
}
}
}
}
}
}
...
@@ -327,44 +337,41 @@ export default {
...
@@ -327,44 +337,41 @@ export default {
margin-left
:
8
rpx
;
margin-left
:
8
rpx
;
}
}
}
}
.
tab
-box
{
.
select
-box
{
padding-top
:
66
rpx
;
padding-top
:
66
rpx
;
position
:
fixed
;
position
:
fixed
;
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
width
:
100%
;
width
:
100%
;
justify-content
:
center
;
justify-content
:
center
;
.tab
{
z-index
:
2
;
padding
:
0
32
rpx
;
.select
{
font-weight
:
500
;
color
:
#333333
;
font-size
:
36
rpx
;
font-size
:
36
rpx
;
color
:
#333333
b3
;
font-weight
:
500
;
line-height
:
44
rpx
;
line-height
:
44
rpx
;
width
:
130
rpx
;
text-align
:
center
;
position
:
relative
;
}
}
.active
{
.pop-box
{
font-weight
:
700
;
width
:
272
rpx
;
color
:
#333333
;
border-radius
:
16
rpx
;
transition
:
all
1s
;
background
:
#ffffff
;
&::after
{
box-shadow
:
0
0
16
rpx
0
#99999933
;
content
:
''
;
position
:
absolute
;
position
:
absolute
;
top
:
122
rpx
;
left
:
50%
;
left
:
50%
;
width
:
8
rpx
;
height
:
8
rpx
;
background
:
#333333
;
border-radius
:
100%
;
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
animation
:
show-dot
0.15s
forwards
;
padding
:
12
rpx
0
;
}
.type-item
{
@keyframes
show-dot
{
padding
:
0
24
rpx
;
0
%
{
margin-bottom
:
8
rpx
;
bottom
:
16
rpx
;
height
:
56
rpx
;
color
:
#292d33
;
font-size
:
28
rpx
;
&:last-child
{
margin-bottom
:
0
;
}
}
100
%
{
&
.active
{
b
ottom
:
-16
rpx
;
b
ackground-color
:
#ecf1ff
;
}
}
}
}
}
}
...
...
pages/boutique/index.vue
View file @
da0bd62
This diff is collapsed.
Click to expand it.
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