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 eea79865
authored
May 29, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
替换vuex
1 parent
52ce49ee
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
28 deletions
App.vue
main.js
mixin/click.js
store/modules/user.js
utils/cache/constantData.js
utils/sentryConfig/sentryInit.js
App.vue
View file @
eea7986
...
...
@@ -9,7 +9,7 @@
<
script
>
import
checkUpdate
from
"@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js"
;
import
{
mapState
}
from
"vuex"
;
import
*
as
sentry
from
"@/utils/sentryConfig/sentry-miniapp"
;
export
default
{
computed
:
{
...
mapState
(
"audio"
,
[
"isEnd"
,
"isStart"
]),
...
...
@@ -44,7 +44,7 @@ export default {
},
onHide
:
function
()
{},
onError
:
function
(
e
)
{
//
sentry.captureException(e);
sentry
.
captureException
(
e
);
},
};
</
script
>
...
...
main.js
View file @
eea7986
...
...
@@ -39,6 +39,8 @@ import permision from "@/js_sdk/wa-permission/permission.js";
Vue
.
prototype
.
$permision
=
permision
;
import
sentryInit
from
"@/utils/sentryConfig/sentryInit"
;
sentryInit
();
const
app
=
new
Vue
({
store
,
...
App
,
...
...
mixin/click.js
View file @
eea7986
...
...
@@ -108,7 +108,13 @@ export default {
receptionCustomerPaySourceList
,
//1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
merchantId
:
shopMerchantId
,
};
console
.
log
(
customerName
,
phoneNumber
,
salesUuid
,
carModel
);
console
.
log
(
customerName
,
phoneNumber
,
salesUuid
,
carModel
,
tempFilePath
);
if
(
customerName
&&
phoneNumber
&&
salesUuid
&&
carModel
)
uni
.
$api
.
commonApi
.
saveRecCustomer
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
,
params
);
...
...
@@ -132,12 +138,16 @@ export default {
this
.
initTime
();
recorderManager
.
start
({
duration
:
600000
,
sampleRate
:
16000
,
numberOfChannels
:
1
,
});
recorderManager
.
onStop
(
async
(
res
)
=>
{
console
.
log
(
"结束录音"
);
if
(
!
this
.
isEnd
)
{
uni
.
getRecorderManager
().
start
({
duration
:
600000
,
sampleRate
:
16000
,
numberOfChannels
:
1
,
});
}
const
result
=
await
upload
(
res
.
tempFilePath
);
...
...
store/modules/user.js
View file @
eea7986
...
...
@@ -8,11 +8,11 @@
// import { setToken, getToken, removeToken } from '@/utils/token';;
export
default
{
state
()
{
state
()
{
return
{
customerInfo
:
{
customerName
:
""
,
carBrand
:
''
,
carBrand
:
""
,
carModel
:
""
,
phoneNumber
:
""
,
salesUuid
:
""
,
...
...
@@ -21,48 +21,53 @@ export default {
historyStatus
:
Date
.
now
(),
carBrands
:
[],
employeeList
:
[],
paymentType
:
[]
paymentType
:
[]
,
};
},
mutations
:
{
getCustomerInfo
(
state
)
{
getCustomerInfo
(
state
)
{
return
state
.
customerInfo
;
},
setCustomerInfo
(
state
,
data
)
{
state
.
customerInfo
=
data
;
setCustomerInfo
(
state
,
data
)
{
// state.customerInfo = data;
uni
.
$storage
.
set
(
"customerInfo"
,
JSON
.
stringify
(
data
));
state
.
customerInfo
=
JSON
.
parse
(
uni
.
$storage
.
get
(
"customerInfo"
)
||
"{}"
);
},
clearCustomerInfo
(
state
)
{
state
.
customerI
nfo
=
{
clearCustomerInfo
(
state
)
{
const
i
nfo
=
{
customerName
:
""
,
carBrand
:
""
,
carModel
:
""
,
phoneNumber
:
""
,
salesUuid
:
""
,
staffName
:
""
,
};
uni
.
$storage
.
set
(
"customerInfo"
,
JSON
.
stringify
(
info
));
state
.
customerInfo
=
JSON
.
parse
(
uni
.
$storage
.
get
(
"customerInfo"
)
||
"{}"
);
},
},
actions
:
{
// 获取用户详情
getCustomerInfo
({
state
})
{
getCustomerInfo
({
state
})
{
return
state
.
customerInfo
;
},
setCustomerInfo
({
commit
},
value
)
{
setCustomerInfo
({
commit
},
value
)
{
commit
(
"setCustomerInfo"
,
value
);
},
clearCustomerInfo
({
commit
})
{
clearCustomerInfo
({
commit
})
{
commit
(
"clearCustomerInfo"
);
},
clearHistory
({
state
})
{
state
.
historyStatus
=
Date
.
now
()
clearHistory
({
state
})
{
state
.
historyStatus
=
Date
.
now
()
;
},
setPaymentType
({
state
},
value
)
{
state
.
paymentType
=
value
setPaymentType
({
state
},
value
)
{
state
.
paymentType
=
value
;
},
setCarBrandsList
({
state
},
value
)
{
state
.
carBrands
=
value
setCarBrandsList
({
state
},
value
)
{
state
.
carBrands
=
value
;
},
setEmployeeList
({
state
},
value
)
{
state
.
employeeList
=
value
;
},
setEmployeeList
({
state
},
value
)
{
state
.
employeeList
=
value
}
},
};
utils/cache/constantData.js
View file @
eea7986
...
...
@@ -11,10 +11,11 @@ export const STORAGE_OBJECTkEY = {
DEFAULT_GET_STORAGEKEY
,
mock_data
:
"mock_data"
,
storageFile
:
"storageFile"
,
userInfo
:
'userInfo'
,
noSignInUuid
:
'noSignInUuid'
,
noviceGuideStatus
:
'noviceGuideStatus'
,
accountLength
:
'accountLength'
userInfo
:
"userInfo"
,
customerInfo
:
"customerInfo"
,
noSignInUuid
:
"noSignInUuid"
,
noviceGuideStatus
:
"noviceGuideStatus"
,
accountLength
:
"accountLength"
,
};
// export const IMG_VERSION = async () => {
...
...
utils/sentryConfig/sentryInit.js
View file @
eea7986
...
...
@@ -4,5 +4,5 @@ export default function sentryInit() {
Sentry
.
init
({
// dsn: 'http://ebcf31c417cc4ce185782f046e4a87a2@sentry.glsx.com.cn/5'
dsn
:
"https://cce6491788ff4b8899d8f912e6982a96@sentry.glsx.com.cn/42"
,
});
})
}
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