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 ee58da18
authored
Jun 26, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
"优化对话组件音频初始化逻辑及样式圆角处理"
1 parent
3a610ccf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
65 deletions
packageEquity/pages/newReceptionRecords/components/dialogue/dialogue.sass
packageEquity/pages/receptionDetail/components/dialogue/dialogue.js
packageEquity/pages/receptionDetail/receptionDetail.js
packageEquity/pages/newReceptionRecords/components/dialogue/dialogue.sass
View file @
ee58da1
/* packageEquity/pages/receptionDetail/components/dialogue/dialogue.wxss */
/* packageEquity/pages/receptionDetail/components/dialogue/dialogue.wxss */
/* pages/test.wxss */
/* pages/test.wxss */
.flex
{
.flex
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.view
{
.view
{
width
:
calc
(
100%
-
56rpx
)
;
width
:
calc
(
100%
-
56rpx
)
;
left
:
28rpx
;
left
:
28rpx
;
position
:
relative
;
position
:
relative
;
height
:
100%
;
height
:
100%
;
background
:
#f5f8fc
;
background
:
#f5f8fc
;
border-radius
:
16rpx
16rpx
0
0
;
.scroll-view
{
.scroll-view
{
height
:
100%
;
height
:
100%
;
background-color
:
#fff
;
background-color
:
#fff
;
animation
:
show-view
.75s
forwards
;
animation
:
show-view
.75s
forwards
;
border-radius
:
16rpx
16rpx
0
0
;
}
}
@keyframes
show-view
{
@keyframes
show-view
{
...
@@ -104,6 +106,7 @@
...
@@ -104,6 +106,7 @@
.color-2
{
.color-2
{
color
:
#FF6053
;
color
:
#FF6053
;
.violation-text
{
.violation-text
{
border-color
:
#ff6053
1a
;
border-color
:
#ff6053
1a
;
background
:
#fff4f2
;
background
:
#fff4f2
;
...
@@ -112,6 +115,7 @@
...
@@ -112,6 +115,7 @@
.color-1
{
.color-1
{
color
:
#7F80FE
;
color
:
#7F80FE
;
.violation-text
{
.violation-text
{
border-color
:
#7f80fe
1a
;
border-color
:
#7f80fe
1a
;
background
:
#f2f2fe
;
background
:
#f2f2fe
;
...
@@ -159,6 +163,7 @@
...
@@ -159,6 +163,7 @@
background
:
#f5f8fc
;
background
:
#f5f8fc
;
overflow
:
hidden
;
overflow
:
hidden
;
opacity
:
0
;
opacity
:
0
;
.content-box
{
.content-box
{
transform
:
translateY
(
-100%
)
;
transform
:
translateY
(
-100%
)
;
}
}
...
@@ -317,7 +322,8 @@
...
@@ -317,7 +322,8 @@
.up
{
.up
{
height
:
auto
;
height
:
auto
;
opacity
:
1
;
opacity
:
1
;
.arrow
{
.arrow
{
transform
:
rotate
(
90deg
)
;
transform
:
rotate
(
90deg
)
;
}
}
...
@@ -456,12 +462,14 @@
...
@@ -456,12 +462,14 @@
border-radius
:
100%
;
border-radius
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.default-axis-dot
{
.default-axis-dot
{
width
:
var
(
--
fontSize36
)
;
width
:
var
(
--
fontSize36
)
;
height
:
var
(
--
fontSize36
)
;
height
:
var
(
--
fontSize36
)
;
border
:
var
(
--
fontSize6
)
solid
#347BFF
;
border
:
var
(
--
fontSize6
)
solid
#347BFF
;
z-index
:
9
;
z-index
:
9
;
}
}
.axis-text
{
.axis-text
{
position
:
absolute
;
position
:
absolute
;
right
:
var
(
--
fontSize20
)
;
right
:
var
(
--
fontSize20
)
;
...
@@ -474,7 +482,7 @@
...
@@ -474,7 +482,7 @@
padding
:
0
var
(
--
fontSize22
)
0
var
(
--
fontSize12
)
;
padding
:
0
var
(
--
fontSize22
)
0
var
(
--
fontSize12
)
;
transform
:
translateY
(
-50%
)
;
transform
:
translateY
(
-50%
)
;
white-space
:
nowrap
;
white-space
:
nowrap
;
background
:
#347bff
1a
;
background
:
#347bff
1a
;
/* 防止文本换行 */
/* 防止文本换行 */
}
}
...
@@ -489,6 +497,7 @@
...
@@ -489,6 +497,7 @@
border
:
none
;
border
:
none
;
box-shadow
:
0
var
(
--
fontSize4
)
var
(
--
fontSize16
)
0
#7a7a7a
33
;
box-shadow
:
0
var
(
--
fontSize4
)
var
(
--
fontSize16
)
0
#7a7a7a
33
;
border-radius
:
0
100%
100%
0
;
border-radius
:
0
100%
100%
0
;
&
:
:
after
{
&
:
:
after
{
position
:
absolute
;
position
:
absolute
;
content
:
''
;
content
:
''
;
...
@@ -551,16 +560,18 @@
...
@@ -551,16 +560,18 @@
text-align
:
center
;
text-align
:
center
;
color
:
#8A8C90
;
color
:
#8A8C90
;
}
}
.nothing
{
width
:
100%
;
height
:
100%
;
flex-direction
:
column
;
justify-content
:
center
;
color
:
#999ea8
;
font-size
:
24rpx
;
background
:
#fff
;
.icon
{
width
:
172rpx
;
height
:
172rpx
;
}
}
\ No newline at end of file
\ No newline at end of file
.nothing
{
width
:
100%
;
height
:
100%
;
flex-direction
:
column
;
justify-content
:
center
;
color
:
#999ea8
;
font-size
:
24rpx
;
background
:
#fff
;
.icon
{
width
:
172rpx
;
height
:
172rpx
;
}
}
\ No newline at end of file
\ No newline at end of file
packageEquity/pages/receptionDetail/components/dialogue/dialogue.js
View file @
ee58da1
...
@@ -11,36 +11,36 @@ Component({
...
@@ -11,36 +11,36 @@ Component({
recordData
:
Object
,
recordData
:
Object
,
batchId
:
{
batchId
:
{
type
:
Number
,
type
:
Number
,
observer
:
function
(
n
)
{
observer
:
function
(
n
)
{
console
.
log
(
n
,
'====123456'
)
console
.
log
(
n
,
'====123456'
)
thisPage
=
wx
.
$router
.
getPageInstance
()
//
thisPage = wx.$router.getPageInstance()
this
.
innerAudioContext
=
thisPage
.
qualityAudio
//
this.innerAudioContext = thisPage.qualityAudio
const
data
=
{
const
data
=
{
batchId
:
n
,
batchId
:
n
,
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
999999
,
pageSize
:
999999
,
};
};
this
.
findConversationDetailByBatchId
(
data
)
this
.
findConversationDetailByBatchId
(
data
)
this
.
findCbByBatchId
(
data
)
this
.
findCbByBatchId
(
data
)
}
}
},
},
autoPlayConfig
:
Object
autoPlayConfig
:
Object
},
},
lifetimes
:
{
lifetimes
:
{
ready
()
{
ready
()
{
thisPage
=
wx
.
$router
.
getPageInstance
()
//
thisPage = wx.$router.getPageInstance()
this
.
innerAudioContext
=
thisPage
.
qualityAudio
//
this.innerAudioContext = thisPage.qualityAudio
const
{
//
const {
batchId
//
batchId
}
=
this
.
data
//
} = this.data
const
data
=
{
//
const data = {
batchId
,
//
batchId,
currentPage
:
1
,
//
currentPage: 1,
pageSize
:
999999
,
//
pageSize: 999999,
};
//
};
// this.innerAudioContext.onCanplay(() => {
//
//
this.innerAudioContext.onCanplay(() => {
this
.
findConversationDetailByBatchId
(
data
)
//
this.findConversationDetailByBatchId(data)
this
.
findCbByBatchId
(
data
)
//
this.findCbByBatchId(data)
},
},
detached
()
{
detached
()
{
this
.
IntersectionObserver
?.
disconnect
()
this
.
IntersectionObserver
?.
disconnect
()
...
@@ -179,6 +179,13 @@ Component({
...
@@ -179,6 +179,13 @@ Component({
}
}
})
})
},
},
getAudioObject
()
{
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
thisPage
.
qualityAudio
)
this
.
innerAudioContext
=
thisPage
.
qualityAudio
else
setTimeout
(()
=>
{
this
.
getAudioObject
()
},
100
)
},
/**对话列表 */
/**对话列表 */
async
findConversationDetailByBatchId
(
params
)
{
async
findConversationDetailByBatchId
(
params
)
{
function
numberToChinese
(
num
)
{
function
numberToChinese
(
num
)
{
...
@@ -189,6 +196,7 @@ Component({
...
@@ -189,6 +196,7 @@ Component({
throw
new
Error
(
'Number must be between 1 and 10'
);
throw
new
Error
(
'Number must be between 1 and 10'
);
}
}
}
}
this
.
getAudioObject
()
const
{
const
{
data
:
dialogueList
data
:
dialogueList
}
=
await
api
.
post
(
"dj.api.smartcarlife.recepiton.findConversationDetailByBatchId"
,
params
),
{
}
=
await
api
.
post
(
"dj.api.smartcarlife.recepiton.findConversationDetailByBatchId"
,
params
),
{
...
@@ -244,7 +252,7 @@ Component({
...
@@ -244,7 +252,7 @@ Component({
e
.
appealClass
=
e
.
conversationDetailAppealId
?
'appeal-disabled'
:
''
e
.
appealClass
=
e
.
conversationDetailAppealId
?
'appeal-disabled'
:
''
}
}
}
}
if
(
autoPlayConfig
.
auto
&&
e
.
violationFlag
==
1
&&
!
this
.
autoPlayItem
)
this
.
autoPlayItem
=
e
if
(
autoPlayConfig
.
auto
&&
e
.
violationFlag
==
1
&&
!
this
.
autoPlayItem
)
this
.
autoPlayItem
=
e
})
})
this
.
setData
({
this
.
setData
({
flag
:
true
,
flag
:
true
,
...
...
packageEquity/pages/receptionDetail/receptionDetail.js
View file @
ee58da1
...
@@ -74,6 +74,7 @@ Page({
...
@@ -74,6 +74,7 @@ Page({
showViolationBtn
,
showViolationBtn
,
autoPlayConfig
autoPlayConfig
},
()
=>
{
},
()
=>
{
this
.
setWarpHeight
()
this
.
setAudio
()
this
.
setAudio
()
})
})
}
}
...
@@ -82,7 +83,11 @@ Page({
...
@@ -82,7 +83,11 @@ Page({
},
},
back
()
{
back
()
{
if
(
this
.
qualityAudio
)
this
.
qualityAudio
.
pause
()
if
(
this
.
qualityAudio
)
this
.
qualityAudio
.
pause
()
wx
.
$router
.
back
()
wx
.
navigateBack
().
catch
(()
=>
{
wx
.
reLaunch
({
url
:
'/pages/loading/loading'
,
})
})
},
},
onHandle
(
e
)
{
onHandle
(
e
)
{
let
{
let
{
...
@@ -220,17 +225,40 @@ Page({
...
@@ -220,17 +225,40 @@ Page({
auto
:
true
auto
:
true
}
}
}
}
console
.
log
(
options
)
this
.
setData
({
this
.
setData
({
record
:
options
,
record
:
options
,
typeLists
:
options
.
hideScore
?
typeLists
.
splice
(
0
,
1
)
:
typeLists
,
typeLists
:
options
.
hideScore
?
typeLists
.
splice
(
0
,
1
)
:
typeLists
,
showViolationBtn
,
showViolationBtn
,
autoPlayConfig
autoPlayConfig
},
()
=>
{
},
()
=>
{
this
.
setWarpHeight
()
this
.
setAudio
()
this
.
setAudio
()
})
})
}
}
},
},
setWarpHeight
()
{
wx
.
$util
.
getViewInfo
(
'.reception-wrap'
,
({
height
})
=>
{
let
{
showViolationBtn
,
userInfo
}
=
this
.
data
if
(
showViolationBtn
&&
(
userInfo
.
isSuper
||
userInfo
.
loginRole
==
3
||
userInfo
.
loginRole
==
6
))
{
wx
.
$util
.
getViewInfo
(
'.violation-btn-box'
,
({
height
:
btnHeight
})
=>
{
this
.
setData
({
receptionWrapHeight
:
`
${(
height
+
btnHeight
)
*
2
}
rpx`
})
})
}
else
this
.
setData
({
receptionWrapHeight
:
`
${
height
*
2
}
rpx`
})
})
},
changeType
(
e
)
{
changeType
(
e
)
{
let
{
let
{
index
index
...
@@ -254,25 +282,6 @@ Page({
...
@@ -254,25 +282,6 @@ Page({
this
.
setData
({
this
.
setData
({
navBarHeight
,
navBarHeight
,
});
});
wx
.
$util
.
getViewInfo
(
'.reception-wrap'
,
({
height
})
=>
{
let
{
showViolationBtn
,
userInfo
}
=
this
.
data
if
(
showViolationBtn
&&
(
userInfo
.
isSuper
||
userInfo
.
loginRole
==
3
||
userInfo
.
loginRole
==
6
))
{
wx
.
$util
.
getViewInfo
(
'.violation-btn-box'
,
({
height
:
btnHeight
})
=>
{
this
.
setData
({
receptionWrapHeight
:
`
${(
height
+
btnHeight
)
*
2
}
rpx`
})
})
}
else
this
.
setData
({
receptionWrapHeight
:
`
${
height
*
2
}
rpx`
})
})
},
},
dialogueRef
()
{
dialogueRef
()
{
return
this
.
selectComponent
(
'#dialogue'
)
return
this
.
selectComponent
(
'#dialogue'
)
...
@@ -361,7 +370,7 @@ Page({
...
@@ -361,7 +370,7 @@ Page({
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{
onHide
()
{
if
(
this
.
options
.
new
)
return
if
(
this
.
options
.
new
)
return
this
.
qualityAudio
.
stop
()
this
.
qualityAudio
.
stop
()
this
.
onPageHide
()
this
.
onPageHide
()
},
},
...
@@ -370,7 +379,7 @@ Page({
...
@@ -370,7 +379,7 @@ Page({
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{
onUnload
()
{
if
(
this
.
options
.
new
)
return
if
(
this
.
options
.
new
)
return
this
.
qualityAudio
?.
stop
()
this
.
qualityAudio
?.
stop
()
this
.
onPageHide
()
this
.
onPageHide
()
},
},
...
...
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