Commit a381978b by 前端

录音截取

1 parent 82b6921f
const target = ['ip', 'dev', 'uat', 'prod', 'beta'] const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 1 const index = 2
/** /**
* *
0本地 0本地
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
"name" : "展业助手", "name" : "展业助手",
"appid" : "__UNI__D3BD3DF", "appid" : "__UNI__D3BD3DF",
"description" : "", "description" : "",
"versionName" : "2.6.0", "versionName" : "2.7.0",
"versionCode" : "260", "versionCode" : "260",
"transformPx" : false, "transformPx" : false,
"sassImplementationName": "node-sass", "sassImplementationName" : "node-sass",
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {
"cache" : false, "cache" : false,
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
"ignoreVersion" : true "ignoreVersion" : true
}, },
"screenOrientation" : "landscape", "screenOrientation" : "landscape",
"splashscreen" : { "splashscreen" : {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender" : true,
"waiting" : true, "waiting" : true,
......
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
} }
storageApi.removeRecords('preRecordList') storageApi.removeRecords('preRecordList')
} catch (error) { } catch (error) {
uni.$logger.error(`【合并异常】 ${JSON.stringify(error)}`) uni.$logger.error(`【合并异常】 ${JSON.stringify(error?.message)}`)
} }
} }
} }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: 1.0.0 * @version: 1.0.0
* @Author: limin * @Author: limin
* @Date: 2025-01-02 18:49:17 * @Date: 2025-01-02 18:49:17
* @LastEditors: limin * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-20 18:15:46 * @LastEditTime: 2025-04-11 15:59:20
* @FilePath: \gl_tape\utils\recordManager\TempRecord.js * @FilePath: \gl_tape\utils\recordManager\TempRecord.js
*/ */
import utils from '../utils' import utils from '../utils'
...@@ -58,7 +58,24 @@ class TempRecord { ...@@ -58,7 +58,24 @@ class TempRecord {
this.clearLoopTimer() this.clearLoopTimer()
await this.saveTempFile(record) await this.saveTempFile(record)
const { recordUrlList, tempFilePath, ...__record } = record const { recordUrlList, tempFilePath, ...__record } = record
__record.recordUrlList = await this.__analysisUrlList(recordUrlList) const recordLongList = await this.__analysisUrlList(recordUrlList)
const { maxUploadNum = 10 } = uni.$storage.get('mock_data')
if (recordLongList.length > maxUploadNum) {
const userInfo = uni.$storage.get('userInfo')
const { customerName, phoneNumber, carModel, salesName } = record || {}
const { name } = userInfo || {}
uni.$logger.error({
msg: `员工: ${name}, 客户: ${customerName}`,
extra: {
'手机号: ': phoneNumber,
'姓名: ': customerName,
'销售: ': salesName,
'车型: ': carModel,
'原因: ': '录音文件过长,数量' + recordLongList.length
}
})
}
__record.recordUrlList = recordLongList.slice(0, maxUploadNum)
uni.$logger.local.info('〖接待记录Record〗 == 更新文件,保存记录!') uni.$logger.local.info('〖接待记录Record〗 == 更新文件,保存记录!')
await this.dbManager.addRecord(__record) await this.dbManager.addRecord(__record)
await this.clearLocalRecord(record) await this.clearLocalRecord(record)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!