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 a9382c62
authored
Oct 31, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
日志
1 parent
77fb9c50
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
55 additions
and
64 deletions
App.vue
assets/css/sprite.scss
assets/images/sprite.png
components/HomeFrame/components/RecordList.vue
mixin/click.js
pages/common/components/AccountList.vue
pages/common/components/MerchantList.vue
pages/common/components/Scene.vue
pages/common/login.vue
pages/equity/index.vue
utils/cache/storageApi.js
App.vue
View file @
a9382c6
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-07 17:09:53
* @LastEditors:
limi
n
* @LastEditTime: 2024-
09-26 18:22:57
* @LastEditors:
前端 qianduan01@didihu.com.c
n
* @LastEditTime: 2024-
10-31 11:01:19
* @FilePath: \gl_tape\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -103,6 +103,7 @@ export default {
},
onShow
:
async
function
()
{
uni
.
$logger
.
local
.
info
(
'切回app'
)
this
.
handleCheck
()
// const systemInfo = await uni.$api.systemApi.getMockData();
// if (systemInfo.isCheckedUpdate) {
...
...
@@ -114,7 +115,9 @@ export default {
// this.$store.dispatch("openUpdateModal");
// });
},
onHide
:
function
()
{},
onHide
:
function
()
{
uni
.
$logger
.
local
.
info
(
'切出app'
)
},
onError
:
function
(
e
)
{
try
{
uni
.
$logger
?.
error
({
msg
:
e
.
message
||
'捕获全局异常'
,
extra
:
{
error
:
typeof
e
==
'string'
?
e
:
JSON
.
stringify
(
e
)
}
})
...
...
assets/css/sprite.scss
View file @
a9382c6
This diff is collapsed.
Click to expand it.
assets/images/sprite.png
View file @
a9382c6
1.19 MB
|
W:
|
H:
1.2 MB
|
W:
|
H:
2-up
Swipe
Onion skin
components/HomeFrame/components/RecordList.vue
View file @
a9382c6
...
...
@@ -100,7 +100,7 @@ import dayjs from 'dayjs'
const
dayImgUrl
=
require
(
'@/assets/images/common/day.webp'
)
const
weekImgUrl
=
require
(
'@/assets/images/common/week.webp'
)
const
monthImgUrl
=
require
(
'@/assets/images/common/month.webp'
)
import
{
STORAGE_OBJECT
k
EY
}
from
'@/utils/cache/constantData'
import
{
STORAGE_OBJECT
K
EY
}
from
'@/utils/cache/constantData'
import
interruptRecord
from
'@/utils/recordManager/interruptRecord'
import
saveRecord
from
'./saveRecord.vue'
export
default
{
...
...
@@ -245,7 +245,7 @@ export default {
}
,
getPreRecordNum
()
{
const
preRecordList
=
uni
.
$storage
.
get
(
STORAGE_OBJECT
k
EY
.
preRecordList
)
||
[]
const
preRecordList
=
uni
.
$storage
.
get
(
STORAGE_OBJECT
K
EY
.
preRecordList
)
||
[]
console
.
log
(
preRecordList
)
this
.
preRecordFailList
=
preRecordList
.
reverse
()
}
,
...
...
mixin/click.js
View file @
a9382c6
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-
29 13:33:37
* @LastEditTime: 2024-10-
31 15:00:45
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -161,12 +161,14 @@ export default {
//开始录音
startAudio
:
utils
.
throttle
(
async
function
()
{
if
(
this
.
audioInfo
.
audioStatus
==
AUDIO_STATUS
.
START
)
return
uni
.
$logger
.
local
.
info
(
'开始接待'
)
this
.
setBooks
([])
this
.
$store
.
dispatch
(
'clearCustomerInfo'
)
this
.
setReceptionStatus
(
''
)
this
.
initTime
()
this
.
setAudioInfo
({
audioList
:
[],
audioStatus
:
AUDIO_STATUS
.
START
})
recorderManager
.
onStart
(()
=>
{
uni
.
$logger
.
local
.
info
(
'开始录音'
)
//开始录音保持记录,1s延时是因为第一段录音结束时间的文件修改时间等于第二段开始的文件修改时间,加上1s延时,就不会这个问题
setTimeout
(()
=>
{
const
params
=
this
.
getParams
(
this
.
$store
.
state
.
user
.
customerInfo
,
this
.
booksList
,
this
.
receptionStatus
)
...
...
@@ -179,6 +181,7 @@ export default {
numberOfChannels
:
1
})
recorderManager
.
onStop
(
async
res
=>
{
uni
.
$logger
.
local
.
info
(
'结束录音'
)
//第一段录音结束,还在接待中,则开启第二段录音
if
(
this
.
audioInfo
.
audioStatus
==
AUDIO_STATUS
.
START
)
{
uni
.
getRecorderManager
().
start
({
...
...
@@ -200,6 +203,7 @@ export default {
const
records
=
interruptRecord
.
getPreRecord
()
console
.
log
(
records
,
'records'
)
if
(
!
records
)
return
uni
.
$logger
.
local
.
info
(
`
${
isNormal
?
'正常'
:
'异常'
}
保存记录`
)
if
(
isNormal
)
{
Object
.
assign
(
records
,
this
.
getParams
(
this
.
$store
.
state
.
user
.
customerInfo
,
this
.
booksList
,
this
.
receptionStatus
))
}
...
...
@@ -222,7 +226,7 @@ export default {
this
.
RenameFile
(
oldFilePath
,
newFileName
)
}
}
catch
(
error
)
{
this
.
$sendSentry
(
`
上传保存失败:
${
JSON
.
stringify
(
error
)}
`
)
uni
.
$logger
.
local
.
error
(
`
${
phone
}
上传保存失败:
${
JSON
.
stringify
(
error
)}
`
)
}
delete
records
.
audioPath
let
saveRecords
=
Object
.
assign
(
records
,
{
recordUrlList
})
...
...
@@ -259,7 +263,7 @@ export default {
* @returns {void}
*/
stopAudio
:
utils
.
throttle
(
async
function
(
status
)
{
console
.
log
(
'结束
'
)
uni
.
$logger
.
local
.
info
(
'结束接待
'
)
// const result = await this.$permision.requestAndroidPermission(
// "android.permission.RECORD_AUDIO"
// );
...
...
@@ -300,6 +304,7 @@ export default {
clearInterval
(
this
.
timer
)
this
.
timer
=
null
if
(
status
)
{
uni
.
$logger
.
local
.
info
(
'退出接待'
)
this
.
removeRecords
()
}
recorderManager
.
stop
()
...
...
pages/common/components/AccountList.vue
View file @
a9382c6
<
template
>
<view
class=
"box"
:key=
"selectedUuid"
v-if=
"flag"
>
<view
class=
"box"
:key=
"selectedUuid"
v-if=
"flag"
>
<template
v-if=
"loginUserInfoList.length"
>
<template
v-for=
"(item,index) in loginUserInfoList"
>
<view
:key=
"index"
:class=
"['items', `$
{item.active ? 'active' : ''}` ]"
@click="chooseAccount(item)"
>
<template
v-for=
"(item, index) in loginUserInfoList"
>
<view
:key=
"index"
:class=
"['items', `$
{item.active ? 'active' : ''}`]" @click="chooseAccount(item)">
<view
class=
"right"
>
<view
:class=
"['midle', midle(item)]"
>
{{
item
.
isSuper
==
true
?
'超管'
:
item
.
userType
==
1
?
'商户'
:(
item
.
loginRole
==
3
?
'督导'
:
item
.
loginRole
==
4
?
'驻店'
:
'员工'
)
}}
{{
item
.
isSuper
==
true
?
'超管'
:
item
.
userType
==
1
?
'商户'
:
item
.
loginRole
==
3
?
'督导'
:
item
.
loginRole
==
4
?
'驻店'
:
'员工'
}}
</view>
</view>
<view
class=
"left"
>
<view
class=
"name"
>
{{
item
.
merchantName
}}
</view>
<view
class=
"shop_no"
>
商户号:
{{
item
.
merchantId
}}
{{
item
.
merchantName
}}
</view>
<view
class=
"shop_no"
>
商户号:
{{
item
.
merchantId
}}
</view>
</view>
</view>
</
template
>
...
...
@@ -33,7 +23,7 @@
</view>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
{
loginMixin
}
from
'@/mixin/index'
import
NoData
from
'./NoData.vue'
export
default
{
...
...
@@ -117,6 +107,7 @@ export default {
this
.
selectAccountLogin
(
id
)
},
selectAccountLogin
(
id
)
{
uni
.
$logger
.
local
.
info
(
`选择账号登录`
)
uni
.
showLoading
({
mask
:
true
})
...
...
@@ -151,7 +142,7 @@ export default {
}
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.box
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -239,4 +230,4 @@ export default {
border
:
4
rpx
solid
#347bff
;
}
}
</
style
>
\ No newline at end of file
</
style
>
pages/common/components/MerchantList.vue
View file @
a9382c6
<
template
>
<view
class=
"box"
:key=
"selectMerchantId"
>
<view
class=
"box"
:key=
"selectMerchantId"
>
<template
v-if=
"flag"
>
<template
v-if=
"loginUserInfoList.length"
>
<template
v-for=
"(item,index) in loginUserInfoList"
>
<view
:key=
"index"
:class=
"['items' ,
{active:item.active}]"
@click="chooseAccount(item)"
>
<template
v-for=
"(item, index) in loginUserInfoList"
>
<view
:key=
"index"
:class=
"['items',
{ active: item.active }]" @click="chooseAccount(item)">
<view
class=
"right"
>
<view
class=
"sprite-icon icon-store"
></view>
</view>
<view
class=
"left"
>
<view
class=
"text_box"
>
<view
class=
"name"
>
{{
item
.
merchantName
}}
</view>
<view
class=
"text_no"
>
商户号:
{{
item
.
merchantId
}}
</view>
<view
class=
"name"
>
{{
item
.
merchantName
}}
</view>
<view
class=
"text_no"
>
商户号:
{{
item
.
merchantId
}}
</view>
</view>
</view>
</view>
</
template
>
</template>
...
...
@@ -31,7 +23,7 @@
</view>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
NoData
from
'./NoData.vue'
export
default
{
...
...
@@ -95,6 +87,7 @@ export default {
})
},
chooseAccount
(
item
)
{
uni
.
$logger
.
info
(
`选择4s店`
)
uni
.
showLoading
({
mask
:
true
})
...
...
@@ -158,7 +151,7 @@ export default {
}
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.box
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -197,4 +190,4 @@ export default {
border
:
4
rpx
solid
#347bff
;
}
}
</
style
>
\ No newline at end of file
</
style
>
pages/common/components/Scene.vue
View file @
a9382c6
<
template
>
<view
class=
"box"
>
<template
v-for=
"(item,index) in sceneList"
>
<view
:key=
"index"
:class=
"['items', `$
{item.actived ? 'active' : ''}` ]"
@click="selectScene(item,index)"
>
<template
v-for=
"(item, index) in sceneList"
>
<view
:key=
"index"
:class=
"['items', `$
{item.actived ? 'active' : ''}`]" @click="selectScene(item, index)">
<view
class=
"left"
>
<view
:class=
"['sprite-icon', `icon-scene-$
{item.sceneType}`]">
</view>
</view>
<view
class=
"right"
>
<view
class=
"name"
>
{{
item
.
sceneName
}}
{{
item
.
sceneName
}}
</view>
<view
class=
"shop_no"
>
{{
item
.
sceneDesc
}}
{{
item
.
sceneDesc
}}
</view>
</view>
</view>
...
...
@@ -22,7 +18,7 @@
</view>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
name
:
''
,
data
()
{
...
...
@@ -72,6 +68,7 @@ export default {
},
// 选择场景
async
selectScene
({
sceneType
},
index
)
{
uni
.
$logger
.
local
.
info
(
`选择场景`
)
let
{
sceneList
,
openSceneArr
,
userInfo
}
=
this
try
{
if
(
!
openSceneArr
.
includes
(
sceneType
)
&&
!
userInfo
?.
isSuper
)
return
uni
.
showToast
({
...
...
@@ -94,18 +91,17 @@ export default {
})
if
(
data
)
this
.
jump
(
userInfo
,
data
)
else
{
this
.
$sendSentry
(
`选择场景异常:merchantId:
${
userInfo
.
shopMerchantId
}
,merchantName:
${
userInfo
.
shopMerchantName
}
,sceneType:
${
sceneType
}
,接口返回:
${
JSON
.
stringify
(
data
||
''
)}
`
)
uni
.
$logger
.
local
.
error
(
`选择场景异常:merchantId:
${
userInfo
.
shopMerchantId
}
,merchantName:
${
userInfo
.
shopMerchantName
}
,sceneType:
${
sceneType
}
,接口返回:
${
JSON
.
stringify
(
data
||
''
)}
`
)
}
}
}
catch
(
error
)
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
typeof
error
==
"string"
?
error
:
error
.
toString
(),
icon
:
'none'
})
console
.
log
(
error
)
this
.
$sendSentry
(
`选择场景异常:merchantId:
${
userInfo
?.
shopMerchantId
},
merchantName
:
$
{
userInfo
?.
shopMerchantName
},
sceneType
:
$
{
sceneType
}
,失败原因:
${
typeof
error
==
"string"
?
error
:
error
.
toString
()}
`
)
uni
.
$logger
.
local
.
error
(
`选择场景异常:merchantId:
${
userInfo
?.
shopMerchantId
},
merchantName
:
$
{
userInfo
?.
shopMerchantName
},
sceneType
:
$
{
sceneType
}
,失败原因:
${
typeof
error
==
"string"
?
error
:
error
.
toString
()}
`
)
}
},
async
jump
(
userInfo
,
data
)
{
...
...
@@ -132,7 +128,7 @@ export default {
url
})
}
catch
(
error
)
{
this
.
$sendSentry
(
`选择场景后跳转异常:
${
error
}
`
)
uni
.
$logger
.
local
.
error
(
`选择场景后跳转异常:
${
error
}
`
)
uni
.
hideLoading
()
uni
.
showToast
({
title
:
error
,
...
...
@@ -144,7 +140,7 @@ export default {
}
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.box
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -183,4 +179,4 @@ export default {
border
:
4
rpx
solid
#347bff
;
}
}
</
style
>
\ No newline at end of file
</
style
>
pages/common/login.vue
View file @
a9382c6
...
...
@@ -141,7 +141,10 @@ export default {
const
{
code
,
data
,
message
}
=
await
uni
.
$api
.
userApi
.
smsLogin
(
params
);
console
.
log
(
code
,
data
,
message
);
uni
.
hideLoading
();
if
(
code
==
0
)
this
.
jump
(
data
,
noSignIn
)
if
(
code
==
0
)
{
this
.
jump
(
data
,
noSignIn
);
uni
.
$logger
.
local
.
info
(
`
${
mobile
}
登录`
)
}
else
uni
.
showModal
({
title
:
'温馨提示'
,
...
...
pages/equity/index.vue
View file @
a9382c6
This diff is collapsed.
Click to expand it.
utils/cache/storageApi.js
View file @
a9382c6
...
...
@@ -2,11 +2,11 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-16 09:55:40
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-
16 13:51:15
* @LastEditTime: 2024-10-
31 11:09:20
* @FilePath: \gl-tape\utils\cache\storageApi.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
{
STORAGE_OBJECT
k
EY
}
from
'./constantData'
import
{
STORAGE_OBJECT
K
EY
}
from
'./constantData'
// console.log(storage)
/** */
// 实例化对象存储
...
...
@@ -68,13 +68,13 @@ export function setSystem_info(that) {
}
export
function
getRecords
(
record
=
'recordList'
)
{
return
storage
.
get
(
STORAGE_OBJECT
k
EY
[
record
])
return
storage
.
get
(
STORAGE_OBJECT
K
EY
[
record
])
}
export
function
setRecords
(
data
,
record
=
'recordList'
)
{
storage
.
set
(
STORAGE_OBJECT
k
EY
[
record
],
data
)
storage
.
set
(
STORAGE_OBJECT
K
EY
[
record
],
data
)
}
export
function
removeRecords
(
record
=
'recordList'
)
{
storage
.
rm
(
STORAGE_OBJECT
k
EY
[
record
])
storage
.
rm
(
STORAGE_OBJECT
K
EY
[
record
])
}
export
default
{
getSessionId
,
...
...
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