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 e9054968
authored
Sep 13, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 提交
1 parent
596529b8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
143 additions
and
59 deletions
pages/boutique/case.vue
pages/boutique/components/Picture.vue
pages/boutique/components/Reception.vue
pages/boutique/components/SkuBox.vue
pages/boutique/detail.vue
pages/boutique/index.vue
pages/boutique/preview.vue
store/modules/user.js
pages/boutique/case.vue
View file @
e905496
...
...
@@ -109,17 +109,12 @@
></video>
</view>
</view>
<preview
ref=
"preview"
isComponents
:show=
"showPreview"
/>
</view>
</template>
<
script
type=
"text/ecmascript-6"
>
import
preview
from
'./preview.vue'
export
default
{
components
:
{
preview
},
name
:
'case'
,
data
()
{
return
{
...
...
@@ -129,7 +124,6 @@ export default {
popupShow
:
false
,
isSearch
:
false
,
videoSrc
:
''
,
showPreview
:
false
,
isSelect
:
false
,
selectIndex
:
'全部'
,
selectList
:
[
...
...
@@ -168,12 +162,7 @@ export default {
},
methods
:
{
playVideo
(
item
)
{
const
{
tabName
,
sourceType
,
detailUrl
}
=
item
console
.
log
(
this
.
$refs
.
preview
)
// this.showPreview = true
// uni.navigateTo({
// url: `/pages/boutique/preview?tabName=${tabName}&sourceType=${sourceType}&detailUrl=${detailUrl}`
// })
this
.
$emit
(
'preview'
,
item
)
},
focus
()
{
this
.
isSearch
=
true
...
...
pages/boutique/components/Picture.vue
View file @
e905496
...
...
@@ -40,7 +40,7 @@ export default {
position
:
absolute
;
top
:
0
;
width
:
100%
;
z-index
:
99
;
z-index
:
99
8
;
min-height
:
100vh
;
background-color
:
#fff
;
}
...
...
pages/boutique/components/Reception.vue
View file @
e905496
...
...
@@ -19,7 +19,7 @@
<view
class=
"sprite-icon icon-info_shield"
></view>
</view>
<view
class=
"content-box flex"
>
<
template
v-if=
"currentItem.modelDisplayPicurl"
>
<
template
v-if=
"currentItem
&& currentItem
.modelDisplayPicurl"
>
<view
class=
"left-content"
:key=
"updateViewKey"
...
...
@@ -69,7 +69,6 @@
@
reception=
"reception"
:show=
"show"
/>
<picture-box
:imgUrl=
"currentImgUrl"
/>
<risk-informed-box
ref=
"riskInformedPop"
:popupImg=
"popupImg"
...
...
@@ -81,14 +80,13 @@
import
SkuBox
from
'./SkuBox.vue'
import
CarBrands
from
'@/components/CarBrands.vue'
import
CouponPop
from
'./CouponPop.vue'
import
PictureBox
from
'./Picture.vue'
import
RiskInformedBox
from
'./RiskInformedBox.vue'
const
m5
=
require
(
"@/assets/images/boutique/index/m5.webp"
)
const
m7
=
require
(
"@/assets/images/boutique/index/m7.webp"
)
const
m9
=
require
(
"@/assets/images/boutique/index/m9.webp"
)
export
default
{
name
:
'Reception'
,
components
:
{
SkuBox
,
CarBrands
,
CouponPop
,
PictureBox
,
RiskInformedBox
},
components
:
{
SkuBox
,
CarBrands
,
CouponPop
,
RiskInformedBox
},
props
:
{
customerType
:
Number
,
show
:
Boolean
,
...
...
@@ -105,7 +103,7 @@ export default {
updateViewKey
:
Date
.
now
(),
carInfo
:
{},
currentImgUrl
:
''
,
currentItem
:
{}
currentItem
:
null
}
},
watch
:
{
...
...
@@ -132,9 +130,18 @@ export default {
if
(
this
.
show
&&
newval
&&
!
this
.
isPreview
&&
this
.
customerType
==
1
)
this
.
$refs
.
carBrandRef
.
autoSelect
(
this
.
carList
.
findIndex
(
e
=>
e
==
newval
))
}
},
watchStatus
:
{
immediate
:
true
,
handler
(
newval
)
{
this
.
currentItem
=
null
}
}
},
computed
:
{
watchStatus
()
{
return
this
.
$store
.
state
.
user
.
historyStatus
;
},
watchCustomerInfo
()
{
return
this
.
$store
.
state
.
user
.
customerInfo
},
...
...
@@ -166,8 +173,28 @@ export default {
this
.
updateViewKey
=
Date
.
now
()
},
changePreView
(
e
)
{
let
{
currentItem
}
=
this
,
{
id
,
carModelName
,
name
}
=
e
,
key
=
`
${
carModelName
}
_
${
id
}
`
,
value
=
this
.
receptionTrack
[
key
]
if
(
currentItem
)
this
.
previewLeave
(
currentItem
)
this
.
currentItem
=
e
this
.
updateViewKey
=
Date
.
now
()
if
(
this
.
isPreview
)
return
if
(
value
)
{
value
.
openCount
+=
1
value
.
entryTime
=
Date
.
now
()
}
else
{
value
=
{
openCount
:
1
,
materialName
:
name
,
materialId
:
id
,
stayDuration
:
0
,
entryTime
:
Date
.
now
()
}
}
this
.
$store
.
dispatch
(
"setReceptionTrack"
,
{
key
,
value
})
},
handleSelect
(
item
)
{
this
.
customerInfo
.
carModel
=
item
.
name
...
...
@@ -175,26 +202,8 @@ export default {
this
.
carInfo
=
item
},
showPicture
(
off
=
true
)
{
let
{
detailPicurl
,
id
,
carModelName
,
name
}
=
this
.
currentItem
,
key
=
`
${
carModelName
}
_
${
id
}
`
,
value
=
this
.
receptionTrack
[
key
]
let
{
detailPicurl
}
=
this
.
currentItem
this
.
currentImgUrl
=
off
?
detailPicurl
:
''
if
(
!
detailPicurl
||
this
.
isPreview
)
return
if
(
off
)
{
if
(
value
)
{
value
.
openCount
+=
1
value
.
entryTime
=
Date
.
now
()
}
else
{
value
=
{
openCount
:
1
,
materialName
:
name
,
materialId
:
id
,
stayDuration
:
0
,
entryTime
:
Date
.
now
()
}
}
}
else
value
.
stayDuration
+=
Number
(
Date
.
now
()
-
value
.
entryTime
)
this
.
$store
.
dispatch
(
"setReceptionTrack"
,
{
key
,
value
})
},
reception
(
e
)
{
this
.
clearCustomerReceivedTimer
()
...
...
@@ -205,6 +214,17 @@ export default {
clearInterval
(
this
.
couponPopupRef
.
pageParams
.
qrTimer
)
this
.
couponPopupRef
.
pageParams
.
qrTimer
=
null
}
},
closeAllPopup
()
{
this
.
$refs
.
riskInformedPop
.
close
()
this
.
$refs
.
couponPopup
.
close
()
},
previewLeave
(
currentItem
)
{
if
(
this
.
isPreview
)
return
let
key
=
`
${
currentItem
.
carModelName
}
_
${
currentItem
.
id
}
`
,
value
=
this
.
receptionTrack
[
key
]
value
.
stayDuration
+=
Number
(
Date
.
now
()
-
value
.
entryTime
)
this
.
$store
.
dispatch
(
"setReceptionTrack"
,
{
key
,
value
})
}
}
}
...
...
pages/boutique/components/SkuBox.vue
View file @
e905496
...
...
@@ -116,7 +116,6 @@ export default {
defaultTabId
:
{
immediate
:
true
,
handler
(
newval
)
{
console
.
log
(
newval
)
if
(
this
.
show
)
this
.
tabId
=
newval
}
},
...
...
@@ -208,7 +207,8 @@ export default {
this
.
thirdlyIndex
=
index
this
.
getGoodsList
()
},
changeGoods
(
item
,
index
)
{
changeGoods
(
item
,
index
,
filter
=
true
)
{
if
(
filter
&&
this
.
goodsIndex
==
index
)
return
this
.
goodsIndex
=
index
this
.
currentItem
=
item
this
.
changePreView
()
...
...
@@ -228,7 +228,7 @@ export default {
this
.
flagObject
.
goodsFlag
=
true
this
.
flagObject
.
scrollTop
=
1
this
.
setScrollHeight
()
this
.
changeGoods
(
goodsList
[
0
],
0
)
this
.
changeGoods
(
goodsList
[
0
],
0
,
false
)
})
},
changePreView
()
{
...
...
@@ -376,9 +376,10 @@ export default {
font-size
:
28
rpx
;
color
:
#333333
;
line-height
:
44
rpx
;
margin-bottom
:
8
rpx
;
}
.goods-description
{
margin-top
:
8
rpx
;
font-size
:
24
rpx
;
color
:
#666666
;
line-height
:
36
rpx
;
...
...
pages/boutique/detail.vue
View file @
e905496
...
...
@@ -18,7 +18,10 @@
color=
"#000"
></uni-icons>
</view>
<view
class=
"title"
v-if=
"id != 1"
>
{{
title
}}
</view>
<view
class=
"title"
v-if=
"id != 1"
>
{{
title
}}
</view>
</view>
<template
v-for=
"(item, index) in media"
>
<view
...
...
@@ -39,6 +42,7 @@
:currentCar=
"currentCar"
:type=
"type"
:popupImg=
"item.popupImg"
@
preview=
"onPreview"
/>
</view>
</
template
>
...
...
@@ -60,6 +64,14 @@
:customerType=
"customerType"
@
back=
"backInvitation"
/>
<picture-box
:imgUrl=
"currentImgUrl($refs.media1)"
/>
<preview
ref=
"preview"
isComponents
:show
.
sync=
"showPreview"
:mediaObject=
"mediaObject"
@
previewBack=
"onPreviewBack"
/>
</view>
</template>
<
script
>
...
...
@@ -72,6 +84,8 @@ import invitation from "./invitation.vue";
import
Case
from
"./case.vue"
;
import
history
from
"./history.vue"
;
import
{
receptionTrackMixin
}
from
'@/mixin/index.js'
import
PictureBox
from
'./components/Picture.vue'
import
preview
from
'./preview.vue'
export
default
{
components
:
{
ToolBox
,
...
...
@@ -80,7 +94,9 @@ export default {
Reception
,
invitation
,
Case
,
history
history
,
PictureBox
,
preview
},
props
:
{
id
:
[
String
,
Number
],
...
...
@@ -97,6 +113,8 @@ export default {
mixins
:
[
receptionTrackMixin
],
data
()
{
return
{
showPreview
:
false
,
mediaObject
:
null
};
},
watch
:
{
...
...
@@ -110,8 +128,12 @@ export default {
watchStatus
()
{
return
this
.
$store
.
state
.
user
.
historyStatus
;
},
receptionTrack
()
{
return
this
.
$store
.
state
.
user
.
receptionTrack
}
},
mounted
()
{
},
mounted
()
{
},
methods
:
{
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
open
()
{
...
...
@@ -131,18 +153,16 @@ export default {
},
back
()
{
this
.
$refs
?.
toolRef
?.
hide
();
// this.$emit("back");
if
(
this
.
id
==
1
)
{
let
[
reception
]
=
this
.
$refs
.
media1
if
(
reception
.
currentImgUrl
)
reception
.
showPicture
(
false
)
else
this
.
$emit
(
"back"
);
}
else
this
.
$emit
(
"back"
);
let
[
receptionRef
]
=
this
.
$refs
.
media1
if
(
this
.
id
==
1
&&
receptionRef
.
currentImgUrl
)
receptionRef
.
showPicture
(
false
)
else
this
.
$emit
(
"back"
);
},
done
(
e
)
{
this
.
$refs
.
toolRef
.
hide
();
this
.
$refs
.
stepRef
.
close
();
this
.
receptionTrackLeave
()
this
.
$emit
(
"done"
,
e
);
this
.
clearCustomerReceivedTimer
()
},
jumpPage
({
id
})
{
this
.
$emit
(
"update:id"
,
Number
(
id
));
...
...
@@ -179,6 +199,47 @@ export default {
})
},
1
e3
)
},
clearCustomerReceivedTimer
()
{
this
.
$refs
.
media1
[
0
].
clearCustomerReceivedTimer
()
},
currentImgUrl
(
receptionRef
)
{
return
receptionRef
?
receptionRef
[
0
].
currentImgUrl
:
''
},
onPreview
(
item
)
{
const
{
materialUrl
,
materialFormat
,
name
,
id
}
=
item
this
.
mediaObject
=
{
...
item
,
tabName
:
name
,
sourceType
:
materialFormat
==
1
?
2
:
1
,
detailUrl
:
materialUrl
}
this
.
showPreview
=
true
if
(
this
.
type
==
'preview'
)
return
let
key
=
`case-
${
materialFormat
}
-
${
id
}
`
,
value
=
this
.
receptionTrack
[
key
]
if
(
value
)
{
value
.
openCount
+=
1
value
.
entryTime
=
Date
.
now
()
}
else
{
value
=
{
openCount
:
1
,
materialName
:
name
,
materialId
:
`case-
${
id
}
`
,
stayDuration
:
0
,
entryTime
:
Date
.
now
()
}
}
this
.
$store
.
dispatch
(
"setReceptionTrack"
,
{
key
,
value
})
},
onPreviewBack
()
{
this
.
showPreview
=
false
if
(
this
.
type
==
'preview'
)
return
const
{
materialFormat
,
id
}
=
this
.
mediaObject
,
key
=
`case-
${
materialFormat
}
-
${
id
}
`
,
value
=
this
.
receptionTrack
[
key
]
value
.
stayDuration
+=
Number
(
Date
.
now
()
-
value
.
entryTime
)
this
.
$store
.
dispatch
(
"setReceptionTrack"
,
{
key
,
value
})
}
},
};
</
script
>
...
...
@@ -192,7 +253,7 @@ export default {
height
:
96
rpx
;
left
:
0
;
top
:
48
rpx
;
z-index
:
9
;
z-index
:
9
99
;
pointer-events
:
none
;
.back
{
height
:
100%
;
...
...
pages/boutique/index.vue
View file @
e905496
...
...
@@ -295,6 +295,7 @@ export default {
backHome
()
{
if
(
this
.
recording
)
this
.
$refs
.
home
.
stopAudio
(
true
);
this
.
$refs
.
home
.
finishRef
.
close
();
this
.
$refs
.
detail
.
clearCustomerReceivedTimer
()
this
.
id
=
""
;
this
.
type
=
""
;
this
.
currentCar
=
''
...
...
pages/boutique/preview.vue
View file @
e905496
...
...
@@ -41,7 +41,8 @@ import report from "@/mixin/report.js";
export
default
{
props
:
{
isComponents
:
Boolean
,
show
:
Boolean
show
:
Boolean
,
mediaObject
:
Object
},
data
()
{
return
{
...
...
@@ -51,12 +52,23 @@ export default {
detailUrl
:
''
}
},
watch
:{
show
:{
immediate
:
true
,
handler
(
n
)
{
if
(
n
)
{
console
.
log
(
this
.
mediaObject
)
this
.
init
(
this
.
mediaObject
)
}
}
}
},
computed
:
{
popupShow
()
{
let
status
=
true
if
(
this
.
isComponents
)
status
=
this
.
show
return
status
}
}
,
},
mixins
:
[
report
],
onLoad
(
options
)
{
...
...
@@ -83,9 +95,9 @@ export default {
});
},
back
()
{
if
(
this
.
isComponents
)
this
.
$emit
(
'
update:show'
,
false
)
if
(
this
.
isComponents
)
this
.
$emit
(
'
previewBack'
)
else
uni
.
navigateBack
()
}
}
,
}
}
</
script
>
...
...
@@ -98,7 +110,7 @@ export default {
height
:
100vh
;
background
:
#000
;
padding
:
60
rpx
0
rpx
;
z-index
:
100
;
z-index
:
999
;
.nav-bar
{
width
:
100%
;
height
:
96
rpx
;
...
...
store/modules/user.js
View file @
e905496
...
...
@@ -79,8 +79,8 @@ export default {
state
.
employeeList
=
value
;
},
setReceptionTrack
({
state
},
{
key
,
value
})
{
console
.
log
(
value
,
'触发埋点'
)
state
.
receptionTrack
[
key
]
=
value
console
.
log
(
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