Commit 8fa8ca0c by Jaxon

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

- 在 record-item 组件中增加 showRecordProgress 属性,用于控制时间轴进度条的显示
- 在 receptionDetail 页面中默认显示进度条,但在 caseDetail 页面跳转时隐藏
- 修复 newReceptionRecords 页面中 audio 对象可能未初始化的错误
1 parent 1520db7a
...@@ -24,7 +24,6 @@ Page({ ...@@ -24,7 +24,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
async onLoad(options) { async onLoad(options) {
console.log(options, "onload");
if (Object.keys(options).length) { if (Object.keys(options).length) {
// 调用接口获取详情,默认取第一条 // 调用接口获取详情,默认取第一条
let { receptionStartTime } = options; let { receptionStartTime } = options;
...@@ -286,7 +285,9 @@ Page({ ...@@ -286,7 +285,9 @@ Page({
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
if (this.qualityAudio) {
this.qualityAudio.stop(); this.qualityAudio.stop();
}
this.onPageHide(); this.onPageHide();
}, },
...@@ -294,7 +295,9 @@ Page({ ...@@ -294,7 +295,9 @@ Page({
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
if (this.qualityAudio) {
this.qualityAudio.stop(); this.qualityAudio.stop();
}
this.onPageHide(); this.onPageHide();
}, },
......
...@@ -18,6 +18,7 @@ Page({ ...@@ -18,6 +18,7 @@ Page({
isOperate: true, isOperate: true,
track_event_code: "reception_detail", //埋点动作类型 track_event_code: "reception_detail", //埋点动作类型
receptionStartTime: "", receptionStartTime: "",
showRecordProgress: true,
}, },
/** /**
...@@ -188,6 +189,12 @@ Page({ ...@@ -188,6 +189,12 @@ Page({
onRoute(options) { onRoute(options) {
console.log(options, "==="); console.log(options, "===");
if (Object.keys(options).length) { if (Object.keys(options).length) {
if (typeof options.showRecordProgress === "boolean") {
this.setData({
showRecordProgress: options.showRecordProgress,
});
}
options.staticDate = new Date(options.staticDate).format("MM月dd日"); options.staticDate = new Date(options.staticDate).format("MM月dd日");
this.track_businessParam = { this.track_businessParam = {
batchId: options.batchId, batchId: options.batchId,
......
/* packageEquity/pages/receptionDetail/receptionDetail.wxss */ /* packageEquity/pages/receptionDetail/receptionDetail.wxss */
page { page {
background-color: #FAFAFA !important; background-color: #fafafa !important;
overflow: hidden; overflow: hidden;
} }
...@@ -16,7 +16,7 @@ page { ...@@ -16,7 +16,7 @@ page {
.bg { .bg {
width: 100%; width: 100%;
height: var(--fontSize800); height: var(--fontSize800);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/reception-nav--bg.png') no-repeat; 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); background-size: 100% var(--fontSize800);
position: fixed; position: fixed;
left: 0; left: 0;
...@@ -27,11 +27,9 @@ page { ...@@ -27,11 +27,9 @@ page {
.reception-wrap { .reception-wrap {
padding: 0 var(--fontSize28); padding: 0 var(--fontSize28);
.reception-info { .reception-info {
width: 100%; width: 100%;
height: var(--fontSize322); background: #ffffff;
background: #FFFFFF;
border-radius: var(--fontSize28); border-radius: var(--fontSize28);
margin: var(--fontSize12) 0 var(--fontSize28) 0; margin: var(--fontSize12) 0 var(--fontSize28) 0;
} }
...@@ -51,23 +49,23 @@ page { ...@@ -51,23 +49,23 @@ page {
width: var(--fontSize144); width: var(--fontSize144);
line-height: var(--fontSize40); line-height: var(--fontSize40);
padding: var(--fontSize10) 0; padding: var(--fontSize10) 0;
background: #FFFFFF; background: #ffffff;
border-radius: var(--fontSize8); border-radius: var(--fontSize8);
margin-right: var(--fontSize16); margin-right: var(--fontSize16);
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #5A5E66; color: #5a5e66;
font-weight: 400; font-weight: 400;
text-align: center; text-align: center;
.avg { .avg {
font-size: var(--fontSize20); font-size: var(--fontSize20);
font-family: 'numberNor'; font-family: "numberNor";
} }
} }
.active { .active {
font-weight: 600; font-weight: 600;
color: #347BFF; color: #347bff;
background: #347bff1a; background: #347bff1a;
} }
} }
...@@ -82,7 +80,7 @@ page { ...@@ -82,7 +80,7 @@ page {
} }
.share { .share {
margin-right: var(--fontSize12) margin-right: var(--fontSize12);
} }
.audio-wrap { .audio-wrap {
...@@ -90,7 +88,7 @@ page { ...@@ -90,7 +88,7 @@ page {
height: var(--fontSize60); height: var(--fontSize60);
display: flex; display: flex;
align-items: center; align-items: center;
background: #FFFFFF; background: #ffffff;
padding: var(--fontSize4); padding: var(--fontSize4);
border-radius: var(--fontSize28); border-radius: var(--fontSize28);
box-sizing: border-box; box-sizing: border-box;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
style="padding-top:{{ navBarHeight }}px;position: relative;"> style="padding-top:{{ navBarHeight }}px;position: relative;">
<view class="reception-info" wx:if="{{ record }}"> <view class="reception-info" wx:if="{{ record }}">
<record-item record="{{ record }}" <record-item record="{{ record }}"
showRecordProgress="{{ showRecordProgress }}"
hideScore="{{ record.hideScore }}" hideScore="{{ record.hideScore }}"
showReason="{{ record.violationReason }}"></record-item> showReason="{{ record.violationReason }}"></record-item>
</view> </view>
......
...@@ -32,6 +32,8 @@ Page({ ...@@ -32,6 +32,8 @@ Page({
batchId: item.id, batchId: item.id,
merchantNo: item.merchantId, merchantNo: item.merchantId,
totalDuration: item.durationTime, totalDuration: item.durationTime,
//
showRecordProgress: false,
}; };
if (item.checkHistoryFlag == 0) { if (item.checkHistoryFlag == 0) {
...@@ -41,6 +43,8 @@ Page({ ...@@ -41,6 +43,8 @@ Page({
wx.$router.go("packageEquity.receptionDetail", { wx.$router.go("packageEquity.receptionDetail", {
...receptionData, ...receptionData,
hideScore: false, 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!