Commit b38d8c79 by 程默

fix 客服

parent 745ba835
// 微信解密 // 微信解密
export function wx_decode(appId,sessionKey,encryptedData,iv) { export function wx_decode(appId, sessionKey, encryptedData, iv) {
var WXBizDataCrypt = require('./WXBizDataCrypt'); var WXBizDataCrypt = require('./WXBizDataCrypt');
var pc = new WXBizDataCrypt(appId, sessionKey); var pc = new WXBizDataCrypt(appId, sessionKey);
var data = pc.decryptData(encryptedData, iv); var data = pc.decryptData(encryptedData, iv);
return data; 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment