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 15ead3de
authored
Apr 08, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
s上传
1 parent
04832f27
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
10 deletions
api/module/common.js
mixin/click.js
utils/utils.js
api/module/common.js
View file @
15ead3d
...
@@ -11,19 +11,29 @@ module.exports = {
...
@@ -11,19 +11,29 @@ module.exports = {
// 查询接待素材
// 查询接待素材
findSoureList
()
{
findSoureList
()
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.recepiton.soure.findSoureList'
,
method
:
"dj.api.smartcarlife.recepiton.soure.findSoureList"
,
sessionId
:
"b5e0a471-a2cd-4020-a522-72bcd68d6da7"
,
sessionId
:
"b5e0a471-a2cd-4020-a522-72bcd68d6da7"
,
projectName
:
"boutique"
,
projectName
:
"boutique"
,
})
})
;
},
},
// 查询门店支付配置
// 查询门店支付配置
findPayInfo
(
data
)
{
findPayInfo
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId'
,
method
:
"dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId"
,
sessionId
:
"b5e0a471-a2cd-4020-a522-72bcd68d6da7"
,
projectName
:
"boutique"
,
...
data
,
});
},
// 查询门店支付配置
saveRecCustomer
(
data
)
{
return
http
.
post
({
method
:
"dj.api.smartcarlife.recepiton.customer.saveRecCustomer"
,
sessionId
:
"b5e0a471-a2cd-4020-a522-72bcd68d6da7"
,
sessionId
:
"b5e0a471-a2cd-4020-a522-72bcd68d6da7"
,
projectName
:
"boutique"
,
projectName
:
"boutique"
,
...
data
...
data
,
})
})
;
},
},
getToken
(
data
)
{
getToken
(
data
)
{
return
http
.
post
({
return
http
.
post
({
...
...
mixin/click.js
View file @
15ead3d
...
@@ -2,12 +2,16 @@
...
@@ -2,12 +2,16 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-08 1
6:38:43
* @LastEditTime: 2024-04-08 1
7:19:52
* @FilePath: \gl_tape\mixin\click.js
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
const
recorderManager
=
uni
.
getRecorderManager
();
const
recorderManager
=
uni
.
getRecorderManager
();
let
recording
=
false
,
receptionStartTime
,
receptionEndTime
;
//是否录音中
import
upload
from
"@/utils/ossUploadFile/uploadFile.js"
;
import
upload
from
"@/utils/ossUploadFile/uploadFile.js"
;
import
utils
from
"@/utils/utils"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -29,22 +33,38 @@ export default {
...
@@ -29,22 +33,38 @@ export default {
this
.
initTime
();
this
.
initTime
();
this
.
checkVoice
();
this
.
checkVoice
();
recorderManager
.
onStop
((
res
)
=>
{
recorderManager
.
onStop
((
res
)
=>
{
recording
=
false
;
receptionEndTime
=
utils
.
convertDateTimeFormat
(
new
Date
());
uni
.
$storage
.
set
(
"storageFile"
,
res
.
tempFilePath
);
uni
.
$storage
.
set
(
"storageFile"
,
res
.
tempFilePath
);
this
.
uploadVoice
(
res
.
tempFilePath
);
this
.
uploadVoice
(
res
.
tempFilePath
);
});
});
recorderManager
.
onStart
(()
=>
{
recording
=
true
;
receptionStartTime
=
utils
.
convertDateTimeFormat
(
new
Date
());
});
},
},
methods
:
{
methods
:
{
checkVoice
()
{
checkVoice
()
{
const
file
=
uni
.
$storage
.
get
(
"storageFile"
);
const
file
=
uni
.
$storage
.
get
(
"storageFile"
);
if
(
file
)
this
.
uploadVoice
(
file
);
if
(
file
)
this
.
uploadVoice
(
file
);
},
},
uploadVoice
(
tempFilePath
)
{
async
uploadVoice
(
tempFilePath
)
{
upload
(
tempFilePath
).
then
((
res
)
=>
{
const
result
=
await
upload
(
tempFilePath
);
uni
.
$storage
.
set
(
"storageFile"
,
""
);
uni
.
$api
.
commonApi
({
carPurchaseInvoice
:
result
,
receptionStartTime
,
receptionEndTime
,
merchantId
:
uni
.
$storage
.
get
(
"merchantId"
),
})
.
then
((
res
)
=>
{
console
.
log
(
res
);
});
});
uni
.
$storage
.
set
(
"storageFile"
,
""
);
},
},
//开始录音
//开始录音
start
()
{
startAudio
()
{
if
(
recording
)
true
;
recorderManager
.
start
();
recorderManager
.
start
();
},
},
//结束录音
//结束录音
...
...
utils/utils.js
0 → 100644
View file @
15ead3d
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 17:16:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-08 17:18:40
* @FilePath: \gl_tape\utils\utils.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
function
convertDateTimeFormat
(
dateTimeStr
,
separator
=
"-"
)
{
const
date
=
new
Date
(
dateTimeStr
);
const
year
=
date
.
getFullYear
();
const
month
=
(
"0"
+
(
date
.
getMonth
()
+
1
)).
slice
(
-
2
);
// 月份是从0开始的
const
day
=
(
"0"
+
date
.
getDate
()).
slice
(
-
2
);
const
hours
=
(
"0"
+
date
.
getHours
()).
slice
(
-
2
);
const
minutes
=
(
"0"
+
date
.
getMinutes
()).
slice
(
-
2
);
const
seconds
=
(
"0"
+
date
.
getSeconds
()).
slice
(
-
2
);
return
`
${
month
}${
separator
}${
day
}${
separator
}${
year
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
}
export
default
{
convertDateTimeFormat
,
};
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