Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 04a83106
authored
Aug 14, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.55.1' into V4.56.0
2 parents
bdb0a9e2
83bfc005
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
74 additions
and
51 deletions
components/HomeFrame/index.vue
components/SwiperComponent.vue
mixin/record/recorder.js
pages/boutique/case.vue
pages/boutique/history.vue
pages/boutique/index.vue
pages/equity/index.vue
utils/recordManager/TempRecord.js
components/HomeFrame/index.vue
View file @
04a8310
...
...
@@ -229,7 +229,6 @@ export default {
mounted
()
{
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
||
{}
this
.
userInfo
=
userInfo
this
.
checkVersion
()
permision
.
requestAndroidPermission
(
'android.permission.RECORD_AUDIO'
)
// 进入界面时检查权限
},
provide
()
{
...
...
@@ -397,6 +396,10 @@ export default {
})
this
.
$emit
(
'start'
)
},
async
updateApp
(
requested
=
false
)
{
if
(
!
requested
)
await
uni
.
$api
.
systemApi
.
getMockData
(
true
)
this
.
checkVersion
()
},
async
entranceClick
(
item
)
{
// if (item.name != 'DailyReport' && (await this.checkDailyReport() || await this.inspectionOfProhibitionBill())) return
uni
.
navigateTo
({
...
...
components/SwiperComponent.vue
View file @
04a8310
...
...
@@ -258,6 +258,7 @@ export default {
let
{
blockX
,
ismove
}
=
this
let
pageX
=
e
.
changedTouches
[
0
].
pageX
let
nums
=
ismove
-
pageX
if
(
nums
==
0
)
return
if
(
!
(
nums
>
50
||
blockX
<
-
30
)
||
!
(
nums
<
-
50
||
blockX
>
30
))
{
this
.
viewX
=
-
10
setTimeout
(()
=>
{
...
...
mixin/record/recorder.js
View file @
04a8310
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-26 10:03:54
* @LastEditors:
yangming@didihu.com.cn yangming@didihu.com.c
n
* @LastEditTime: 2025-0
4-15 17:59:20
* @LastEditors:
limi
n
* @LastEditTime: 2025-0
8-12 10:32:25
* @FilePath: \gl_tape\mixin\record\recorder.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -12,12 +12,12 @@ import utils from '@/utils/utils.js'
import
{
storageApi
}
from
'@/utils/cache'
import
permision
from
'@/js_sdk/wa-permission/permission.js'
export
default
{
provide
()
{
provide
()
{
return
{
getRecorder
:
()
=>
this
.
record
}
},
async
mounted
()
{
async
mounted
()
{
this
.
audioManager
=
new
AudioManager
(
this
.
onAudioStart
,
this
.
onAudioStop
,
this
.
onError
)
this
.
initDto
()
this
.
record
=
new
TempRecord
(
this
.
tempRecord
,
this
.
triggleTempNumber
)
...
...
@@ -35,23 +35,23 @@ export default {
// deep: true
// },
customerKey
:
{
handler
()
{
handler
()
{
this
.
handler
(
this
.
customerInfo
,
this
.
updateCustomerInfo
)
},
deep
:
true
},
booksList
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
handler
(
val
,
this
.
updateBookList
)
}
},
receptionStatus
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
handler
(
val
,
this
.
updateReceptionStatus
)
}
},
receptionKey
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
handler
(
this
.
receptionTrack
,
this
.
updateMaterialPointList
)
}
}
...
...
@@ -64,28 +64,28 @@ export default {
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
,
'setBooks'
,
'setPerRecordNumber'
]),
...
mapMutations
([
'clearCustomerInfo'
]),
//开始录音
startAudio
:
utils
.
throttle
(
async
function
()
{
startAudio
:
utils
.
throttle
(
async
function
(
isInitData
=
true
)
{
const
isPermission
=
await
this
.
checkBeforeStart
()
if
(
!
isPermission
)
return
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 开始接待 '
)
this
.
initReception
()
isInitData
&&
this
.
initReception
()
this
.
initTime
()
this
.
audioManager
.
start
()
},
300
),
initReception
()
{
initReception
()
{
this
.
setBooks
([])
this
.
clearCustomerInfo
()
this
.
setReceptionStatus
(
''
)
this
.
initTime
()
},
async
onAudioStart
()
{
async
onAudioStart
()
{
if
(
this
.
audioManager
.
counter
===
0
)
{
await
this
.
record
.
add
()
}
else
{
this
.
record
.
addAudio
()
}
},
async
onAudioStop
()
{
async
onAudioStop
()
{
if
(
this
.
audioManager
.
isRecording
)
{
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 接待中,再次开启录音! '
)
this
.
audioManager
.
start
()
...
...
@@ -93,7 +93,7 @@ export default {
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 断开录音! '
)
}
},
onAudioError
(
error
)
{
onAudioError
(
error
)
{
const
message
=
error
.
message
this
.
reportError
(
`录音异常: error:
${
message
}
`
,
message
)
},
...
...
@@ -102,38 +102,40 @@ export default {
* @params {boolean} status true 不保存记录/AUDIO_STATUS.ABNORMAL 只要断开录音
* @returns {void}
*/
async
stopAudio
(
isNotSave
=
false
)
{
async
stopAudio
(
isNotSave
=
false
)
{
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 结束接待! '
)
this
.
stop
()
await
this
.
saveAndClearRecord
(
isNotSave
)
},
async
saveAndClearRecord
(
isNotSave
=
false
)
{
async
saveAndClearRecord
(
isNotSave
=
false
)
{
if
(
isNotSave
)
{
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 不保存记录! '
)
return
this
.
record
.
clearLocalRecord
()
this
.
record
.
clearSavedFiles
()
this
.
record
.
clearLocalRecord
()
return
}
this
.
record
.
setReceptionEndTime
()
//设置接待结束时间
//如果不需要保存记录
await
this
.
record
.
save
()
},
stop
()
{
stop
()
{
this
.
endWatchClick
()
this
.
record
.
clearLoopTimer
()
if
(
this
.
audioManager
.
isRecording
)
{
this
.
audioManager
.
stop
()
}
},
handler
(
params
,
fn
)
{
handler
(
params
,
fn
)
{
if
(
this
.
audioManager
.
isRecording
||
this
.
record
?.
currentRecord
?.
endReasonType
==
1
)
{
fn
.
call
(
this
,
params
)
}
},
reset
()
{
reset
()
{
this
.
audioManager
=
null
this
.
record
=
null
this
.
tempRecord
=
null
},
initDto
()
{
initDto
()
{
const
{
shopMerchantId
,
phone
,
sceneType
,
uuid
,
name
,
merchantId
,
channelType
,
merchantName
}
=
storageApi
.
getUserInfo
()
const
{
deviceId
:
appCode
}
=
uni
.
getDeviceInfo
()
const
dto
=
new
RecordDto
({
...
...
@@ -146,12 +148,12 @@ export default {
merchantId
:
shopMerchantId
,
merchantName
,
bussinessType
:
sceneType
==
0
?
1
:
2
,
// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType
:
channelType
||
1
,
//1问界 2 比亚迪 3 其他
channelType
:
channelType
||
1
//1问界 2 比亚迪 3 其他
})
this
.
sceneType
=
sceneType
this
.
tempRecord
=
dto
},
updateCustomerInfo
(
customerInfo
=
{})
{
updateCustomerInfo
(
customerInfo
=
{})
{
const
{
customerName
,
phoneNumber
,
salesUuid
,
carModel
,
staffName
:
salesName
,
carBrand
,
carBrandId
,
oneCarBrand
,
oneCarBrandId
}
=
customerInfo
this
.
record
.
updatePreRecords
({
customerName
,
...
...
@@ -165,7 +167,7 @@ export default {
oneCarBrandId
})
},
updateBookList
(
booksList
)
{
updateBookList
(
booksList
)
{
const
receptionCustomerPaySourceList
=
booksList
.
map
(
item
=>
{
return
{
id
:
item
.
id
,
...
...
@@ -175,7 +177,7 @@ export default {
})
this
.
record
.
updatePreRecords
({
receptionCustomerPaySourceList
})
},
updateMaterialPointList
(
receptionTrack
)
{
updateMaterialPointList
(
receptionTrack
)
{
const
{
merchantId
,
staffUuid
,
staffName
}
=
this
.
tempRecord
let
receptionCustomerMaterialPointList
=
[]
Object
.
keys
(
receptionTrack
).
map
(
key
=>
{
...
...
@@ -189,17 +191,17 @@ export default {
})
this
.
record
.
updatePreRecords
({
receptionCustomerMaterialPointList
})
},
updateReceptionStatus
(
status
)
{
updateReceptionStatus
(
status
)
{
this
.
record
.
updatePreRecords
({
receptionStatus
:
status
})
},
getRecorder
()
{
getRecorder
()
{
return
this
.
record
},
async
triggleTempNumber
()
{
async
triggleTempNumber
()
{
const
_records
=
await
this
.
record
.
getRecords
()
this
.
setPerRecordNumber
(
_records
.
length
)
},
async
isPermission
(
hintText
=
'为了记录语音通话,请打开录音权限'
)
{
async
isPermission
(
hintText
=
'为了记录语音通话,请打开录音权限'
)
{
const
result
=
await
permision
.
requestAndroidPermission
(
'android.permission.RECORD_AUDIO'
)
await
helpler
.
sleep
(
0
)
if
(
result
!==
1
)
{
...
...
@@ -210,13 +212,13 @@ export default {
}
return
result
===
1
},
async
checkBeforeStart
()
{
async
checkBeforeStart
()
{
const
isPermission
=
await
this
.
isPermission
()
const
isRecording
=
this
.
audioManager
.
isRecording
return
isPermission
&&
!
isRecording
}
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
stop
()
this
.
reset
()
}
...
...
pages/boutique/case.vue
View file @
04a8310
This diff is collapsed.
Click to expand it.
pages/boutique/history.vue
View file @
04a8310
...
...
@@ -58,7 +58,7 @@
?
item
.
goodsList
[
0
].
goodsName
:
"-"
}}
</view>
X
{{
item
.
goodsList
.
length
}}
件
x
{{
item
.
goodsList
.
length
}}
件
<image
class=
"image-look"
src=
"../../assets/images/boutique/look.png"
...
...
@@ -70,7 +70,7 @@
:key=
"ind"
>
<view
class=
"label"
>
{{
k
.
label
}}
</view>
<view
:class=
"
{ value: true, bold: k.isBold }
">
{{
<view
:class=
"
['value text-hide',
{bold: k.isBold}]
">
{{
k
.
format
?
formatTime
(
item
[
k
.
key
])
:
item
[
k
.
key
]
||
"-"
...
...
@@ -83,7 +83,7 @@
<image
class=
"image-pay"
:src=
"
require(`@/assets/images/boutique/pay_${item.payType}.png`)
require(`@/assets/images/boutique/pay_${item.payType
> 5 ? 5 : item.payType
}.png`)
"
/>
</view>
...
...
@@ -465,6 +465,7 @@ export default {
color
:
#999ea8
;
.label
{
width
:
toRpx
(
160
);
flex-shrink
:
0
;
}
.value
{
margin-left
:
toRpx
(
20
);
...
...
pages/boutique/index.vue
View file @
04a8310
...
...
@@ -102,7 +102,8 @@ export default {
icon
:
'icon-customer-2'
}
]),
loadComplete
:
false
loadComplete
:
false
,
requested
:
false
}
},
onBackPress
(
options
)
{
...
...
@@ -115,11 +116,13 @@ export default {
// 其他情况允许正常返回
return
false
;
},
onLoad
()
{
async
onLoad
()
{
await
uni
.
$api
.
systemApi
.
getMockData
(
true
)
//获取APP配置信息
this
.
init
();
uni
.
$api
.
systemApi
.
getMockData
(
true
)
this
.
requested
=
true
this
.
$refs
.
home
.
updateApp
(
true
)
},
onShow
()
{
async
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
uni
.
$storage
.
rm
(
"userInfo"
);
...
...
@@ -129,6 +132,7 @@ export default {
});
return
;
}
if
(
this
.
requested
&&
!
this
.
id
)
this
.
$refs
.
home
.
updateApp
()
},
computed
:
{
},
...
...
@@ -208,7 +212,6 @@ export default {
this
.
$store
.
state
.
user
.
boutiqueMediaConfig
=
boutiqueMediaConfig
this
.
$store
.
state
.
user
.
boutiqueCarList
=
boutiqueCarList
}).
catch
(
error
=>
{
console
.
log
(
error
)
uni
.
hideLoading
()
uni
.
showToast
({
title
:
error
,
...
...
@@ -239,8 +242,6 @@ export default {
this
.
id
=
id
;
this
.
tabId
=
tabId
this
.
currentCarId
=
this
.
carBannerList
[
this
.
currentIndex
].
carModelId
console
.
log
(
id
)
},
back
()
{
if
(
!
this
.
id
)
return
uni
.
navigateBack
();
...
...
@@ -266,13 +267,14 @@ export default {
this
.
clearHistory
();
this
.
recording
=
false
this
.
$refs
.
home
.
$refs
.
leftBox
.
getMessageInfo
()
if
(
this
.
requested
)
this
.
$refs
.
home
.
updateApp
()
},
async
start
(
before
=
true
)
{
const
isPermision
=
await
this
.
$refs
.
home
.
isPermission
()
if
(
!
isPermision
)
return
false
uni
.
$logger
.
local
.
info
(
'〖接待管理Recorder〗 == 开始接待 '
)
if
(
before
)
this
.
clearHistory
();
this
.
$refs
.
home
.
audioManager
.
start
(
)
this
.
$refs
.
home
.
startAudio
(
false
)
this
.
recording
=
true
return
true
},
...
...
pages/equity/index.vue
View file @
04a8310
...
...
@@ -53,7 +53,8 @@ export default {
recording
:
false
,
aitoCarModelIds
:
[],
mediaId
:
''
,
loadComplete
:
false
loadComplete
:
false
,
requested
:
false
}
},
computed
:
{
...
...
@@ -82,14 +83,15 @@ export default {
},
async
onLoad
()
{
const
mockdata
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
)
//获取APP配置信息
if
(
this
.
channelType
==
1
&&
mockdata
.
boutiqueDefaultCarBrandId
)
{
if
(
this
.
channelType
==
1
&&
mockdata
.
boutiqueDefaultCarBrandId
)
{
this
.
$store
.
state
.
user
.
boutiqueDefaultCarBrandId
=
mockdata
.
boutiqueDefaultCarBrandId
//默认车辆品牌
if
(
mockdata
.
defaultCarId
)
this
.
$store
.
state
.
user
.
defaultCarId
=
mockdata
.
defaultCarId
//默认车系
if
(
mockdata
.
defaultCarId
)
this
.
$store
.
state
.
user
.
defaultCarId
=
mockdata
.
defaultCarId
//默认车系
}
this
.
get_Vehicle_Sales_Data
()
this
.
requested
=
true
this
.
$refs
.
home
.
updateApp
(
true
)
},
onShow
()
{
async
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
uni
.
$storage
.
rm
(
'userInfo'
)
...
...
@@ -105,6 +107,7 @@ export default {
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
]),
init
()
{
this
.
findPayInfo
()
if
(
this
.
requested
&&
!
this
.
id
)
this
.
$refs
.
home
.
updateApp
()
},
/**获取车型&销售数据 */
get_Vehicle_Sales_Data
()
{
...
...
utils/recordManager/TempRecord.js
View file @
04a8310
...
...
@@ -3,8 +3,8 @@
* @version: 1.0.0
* @Author: limin
* @Date: 2025-01-02 18:49:17
* @LastEditors:
前端 qianduan01@didihu.com.c
n
* @LastEditTime: 2025-0
4-11 15:59:20
* @LastEditors:
limi
n
* @LastEditTime: 2025-0
8-12 10:23:15
* @FilePath: \gl_tape\utils\recordManager\TempRecord.js
*/
import
utils
from
'../utils'
...
...
@@ -91,6 +91,17 @@ class TempRecord {
record
=
null
uni
.
$logger
.
local
.
info
(
'〖接待记录Record〗 == 置空接待记录'
)
}
/**
* 清除已保存的录音文件
* @param {Object} options - 配置参数
* @param {Array} options.recordUrlList - 录音文件列表,默认为当前记录的recordUrlList
*/
clearSavedFiles
({
recordUrlList
=
[]
}
=
this
.
record
)
{
// 遍历录音文件列表并删除每个文件
recordUrlList
.
forEach
(
item
=>
{
this
.
removeFile
(
item
.
file
)
})
}
async
__analysisUrlList
(
recordUrlList
)
{
if
(
!
recordUrlList
?.
length
)
return
[]
try
{
...
...
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