Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
b38d8c79
Commit
b38d8c79
authored
Jul 13, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 客服
parent
745ba835
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
+14
-1
src/utils/wxIndex.js
+14
-1
No files found.
src/utils/wxIndex.js
View file @
b38d8c79
// 微信解密
export
function
wx_decode
(
appId
,
sessionKey
,
encryptedData
,
iv
)
{
export
function
wx_decode
(
appId
,
sessionKey
,
encryptedData
,
iv
)
{
var
WXBizDataCrypt
=
require
(
'./WXBizDataCrypt'
);
var
pc
=
new
WXBizDataCrypt
(
appId
,
sessionKey
);
var
data
=
pc
.
decryptData
(
encryptedData
,
iv
);
return
data
;
}
// 定位方法
export
function
getUserLocation
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
getLocation
({
type
:
'gcj02'
,
// type有两中类型,gcj02 是腾讯地图所能解析的
success
:
res
=>
{
resolve
(
res
)
}
})
})
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment