|
@@ -96,8 +96,14 @@ export function getTicketFun(jsApiList = ['getLocation'], configType = 'config')
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
// 当前页面
|
|
// 当前页面
|
|
|
let url = window.location.href;
|
|
let url = window.location.href;
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ url: url,
|
|
|
|
|
+ };
|
|
|
|
|
+ if (configType == 'agentConfig') {
|
|
|
|
|
+ params.agent = 1;
|
|
|
|
|
+ }
|
|
|
// 获取签名
|
|
// 获取签名
|
|
|
- getTicket({ url: url }).then((response) => {
|
|
|
|
|
|
|
+ getTicket(paramss).then((response) => {
|
|
|
console.log(response);
|
|
console.log(response);
|
|
|
toastLoading().clear();
|
|
toastLoading().clear();
|
|
|
if (response.code == 200) {
|
|
if (response.code == 200) {
|
|
@@ -117,7 +123,7 @@ export function getTicketFun(jsApiList = ['getLocation'], configType = 'config')
|
|
|
} else if (configType == 'agentConfig') {
|
|
} else if (configType == 'agentConfig') {
|
|
|
wx.agentConfig({
|
|
wx.agentConfig({
|
|
|
corpid: qiyeData.appId, // 必填,企业微信的corpid,必须与当前登录的企业一致
|
|
corpid: qiyeData.appId, // 必填,企业微信的corpid,必须与当前登录的企业一致
|
|
|
- agentid: '1000089', // 必填,企业微信的应用id (e.g. 1000247)
|
|
|
|
|
|
|
+ agentid: qiyeData.agentId, // 必填,企业微信的应用id (e.g. 1000247)
|
|
|
timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
|
|
timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
|
|
|
nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
|
|
nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
|
|
|
signature: qiyeData.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
|
|
signature: qiyeData.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
|