Commit 9c87985d by 胡悦

录音链接分享。添加短链接口

1 parent cd0da2fb
// packageEquity/pages/receptionDetail/receptionDetail.js
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
import { getRecordDetailList } from "../../receptionRecordsApi"
import { getRecordDetailList, getShortUrl } from "../../receptionRecordsApi"
Page({
behaviors: [reportPageTrackMixin],
......@@ -21,6 +21,7 @@ Page({
currentTime: '00:00', //当前音频的播放位置
isOperate: true,
track_event_code: 'reception_detail', //埋点动作类型
receptionStartTime: ''
},
/**
......@@ -33,6 +34,9 @@ Page({
// 调用接口获取详情,默认取第一条
const time = new Date(+options.receptionStartTime).format('yyyy-MM-dd')
console.log(time)
this.setData({
receptionStartTime: options.receptionStartTime
})
const params = {
batchId: options.batchId,
merchantNo: options.merchantNo,
......@@ -272,7 +276,7 @@ Page({
qualityRef() {
return this.selectComponent('#quality')
},
share(e) {
async share(e) {
let userInfo = wx.$util.getUserInfo() || {}
const {
record
......@@ -285,14 +289,26 @@ Page({
endTime,
totalDuration,
fileUrl,
startTime
startTime,
merchantNo,
batchId,
// receptionStartTime
} = record
// 门店 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址
let text = [record.merchantName, wx.$util.tsFormatTime(startTime, 'Y年M月D日 h:m:s'), wx.$util.tsFormatTime(endTime, 'Y年M月D日 h:m:s'), this.format(totalDuration), receptionStatus, fileUrl].join(' - ')
wx.$util.setCopyData(text)
this.setTrackData('copy_content', {
context: text,
})
console.log(record, 'record')
// 获取短链地址
const {receptionStartTime} = this
const res = await getShortUrl({merchantNo, batchId, receptionStartTime})
console.log(res, 'res')
if (res.code == '0') {
// 门店 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址(更换成短链)
let text = [record.merchantName, wx.$util.tsFormatTime(startTime, 'Y年M月D日 h:m:s'), wx.$util.tsFormatTime(endTime, 'Y年M月D日 h:m:s'), this.format(totalDuration), receptionStatus, res.data].join(' - ')
wx.$util.setCopyData(text)
this.setTrackData('copy_content', {
context: text,
})
} else {
wx.$util.showToast('获取短链失败')
}
// wx.$util.showToast('复制成功')
},
format(seconds) {
......
......@@ -11,5 +11,10 @@ module.exports = {
// 分页查询接待列表
getRecordDetailList(data) {
return api.post("dj.api.smartcarlife.reception.findReceptionByConditionPage", data)
},
// 获取短链地址
getShortUrl(data) {
return api.post("dj.api.car.boutique.inspection.batch.file.short.url", data)
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!