Commit 8fa8ca0c by Jaxon

feat(质检记录): 添加录音进度条显示控制功能

- 在 record-item 组件中增加 showRecordProgress 属性,用于控制时间轴进度条的显示
- 在 receptionDetail 页面中默认显示进度条,但在 caseDetail 页面跳转时隐藏
- 修复 newReceptionRecords 页面中 audio 对象可能未初始化的错误
1 parent 1520db7a
......@@ -24,7 +24,6 @@ Page({
* 生命周期函数--监听页面加载
*/
async onLoad(options) {
console.log(options, "onload");
if (Object.keys(options).length) {
// 调用接口获取详情,默认取第一条
let { receptionStartTime } = options;
......@@ -286,7 +285,9 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide() {
this.qualityAudio.stop();
if (this.qualityAudio) {
this.qualityAudio.stop();
}
this.onPageHide();
},
......@@ -294,7 +295,9 @@ Page({
* 生命周期函数--监听页面卸载
*/
onUnload() {
this.qualityAudio.stop();
if (this.qualityAudio) {
this.qualityAudio.stop();
}
this.onPageHide();
},
......
......@@ -18,6 +18,7 @@ Page({
isOperate: true,
track_event_code: "reception_detail", //埋点动作类型
receptionStartTime: "",
showRecordProgress: true,
},
/**
......@@ -188,6 +189,12 @@ Page({
onRoute(options) {
console.log(options, "===");
if (Object.keys(options).length) {
if (typeof options.showRecordProgress === "boolean") {
this.setData({
showRecordProgress: options.showRecordProgress,
});
}
options.staticDate = new Date(options.staticDate).format("MM月dd日");
this.track_businessParam = {
batchId: options.batchId,
......
/* packageEquity/pages/receptionDetail/receptionDetail.wxss */
page {
background-color: #FAFAFA !important;
overflow: hidden;
background-color: #fafafa !important;
overflow: hidden;
}
.navigation-title {
font-weight: 500;
font-size: var(--fontSize30);
color: #282829;
line-height: var(--fontSize44);
width: var(--fontSize360);
text-align: center;
font-weight: 500;
font-size: var(--fontSize30);
color: #282829;
line-height: var(--fontSize44);
width: var(--fontSize360);
text-align: center;
}
.bg {
width: 100%;
height: var(--fontSize800);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/reception-nav--bg.png') no-repeat;
background-size: 100% var(--fontSize800);
position: fixed;
left: 0;
top: 0;
z-index: -1;
width: 100%;
height: var(--fontSize800);
background: url("https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/reception-nav--bg.png") no-repeat;
background-size: 100% var(--fontSize800);
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.reception-wrap {
padding: 0 var(--fontSize28);
.reception-info {
width: 100%;
height: var(--fontSize322);
background: #FFFFFF;
border-radius: var(--fontSize28);
margin: var(--fontSize12) 0 var(--fontSize28) 0;
}
.reception-nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0 var(--fontSize16) 0;
}
.reception-types {
display: flex;
align-items: center;
.type {
width: var(--fontSize144);
line-height: var(--fontSize40);
padding: var(--fontSize10) 0;
background: #FFFFFF;
border-radius: var(--fontSize8);
margin-right: var(--fontSize16);
font-size: var(--fontSize28);
color: #5A5E66;
font-weight: 400;
text-align: center;
.avg {
font-size: var(--fontSize20);
font-family: 'numberNor';
}
}
.active {
font-weight: 600;
color: #347BFF;
background: #347bff1a;
}
}
.reception-operate {
display: flex;
align-items: center;
.img {
width: var(--fontSize52);
height: var(--fontSize52);
}
.share {
margin-right: var(--fontSize12)
}
.audio-wrap {
width: var(--fontSize140);
height: var(--fontSize60);
display: flex;
align-items: center;
background: #FFFFFF;
padding: var(--fontSize4);
border-radius: var(--fontSize28);
box-sizing: border-box;
.time {
font-weight: 400;
font-size: var(--fontSize26);
color: #757980;
margin-left: var(--fontSize4);
}
}
}
padding: 0 var(--fontSize28);
.reception-info {
width: 100%;
background: #ffffff;
border-radius: var(--fontSize28);
margin: var(--fontSize12) 0 var(--fontSize28) 0;
}
.reception-nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0 var(--fontSize16) 0;
}
.reception-types {
display: flex;
align-items: center;
.type {
width: var(--fontSize144);
line-height: var(--fontSize40);
padding: var(--fontSize10) 0;
background: #ffffff;
border-radius: var(--fontSize8);
margin-right: var(--fontSize16);
font-size: var(--fontSize28);
color: #5a5e66;
font-weight: 400;
text-align: center;
.avg {
font-size: var(--fontSize20);
font-family: "numberNor";
}
}
.active {
font-weight: 600;
color: #347bff;
background: #347bff1a;
}
}
.reception-operate {
display: flex;
align-items: center;
.img {
width: var(--fontSize52);
height: var(--fontSize52);
}
.share {
margin-right: var(--fontSize12);
}
.audio-wrap {
width: var(--fontSize140);
height: var(--fontSize60);
display: flex;
align-items: center;
background: #ffffff;
padding: var(--fontSize4);
border-radius: var(--fontSize28);
box-sizing: border-box;
.time {
font-weight: 400;
font-size: var(--fontSize26);
color: #757980;
margin-left: var(--fontSize4);
}
}
}
}
.type-wrap {
padding: 0 var(--fontSize28);
padding: 0 var(--fontSize28);
}
.violation-btn-box {
padding: 40rpx 64rpx;
.violation-btn {
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
height: 88rpx;
border-radius: 12rpx;
background: #347bff;
line-height: 88rpx;
text-align: center;
}
}
\ No newline at end of file
padding: 40rpx 64rpx;
.violation-btn {
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
height: 88rpx;
border-radius: 12rpx;
background: #347bff;
line-height: 88rpx;
text-align: center;
}
}
......@@ -16,6 +16,7 @@
style="padding-top:{{ navBarHeight }}px;position: relative;">
<view class="reception-info" wx:if="{{ record }}">
<record-item record="{{ record }}"
showRecordProgress="{{ showRecordProgress }}"
hideScore="{{ record.hideScore }}"
showReason="{{ record.violationReason }}"></record-item>
</view>
......
......@@ -32,6 +32,8 @@ Page({
batchId: item.id,
merchantNo: item.merchantId,
totalDuration: item.durationTime,
//
showRecordProgress: false,
};
if (item.checkHistoryFlag == 0) {
......@@ -41,6 +43,8 @@ Page({
wx.$router.go("packageEquity.receptionDetail", {
...receptionData,
hideScore: false,
// 显示录音进度条
showRecordProgress: false,
});
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!