Commit e7dd0f6a by maolipeng

Merge branch 'master' into feature/zhujian/0726/qwLiving

parents 00fadb3a e53a1374
...@@ -36,24 +36,27 @@ export default class WechatApi { ...@@ -36,24 +36,27 @@ export default class WechatApi {
url: params.url, url: params.url,
}).then((result2) => { }).then((result2) => {
const res2 = result2.result; const res2 = result2.result;
this.agentConfig({ setTimeout(() => {
corpid: res2.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致 this.agentConfig({
agentid: res2.agentid, // 必填,企业微信的应用id (e.g. 1000247) corpid: res2.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
timestamp: res2.timestamp, // 必填,生成签名的时间戳 agentid: res2.agentid, // 必填,企业微信的应用id (e.g. 1000247)
nonceStr: res2.nonceStr, // 必填,生成签名的随机串 timestamp: res2.timestamp, // 必填,生成签名的时间戳
signature: res2.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法 nonceStr: res2.nonceStr, // 必填,生成签名的随机串
jsApiList: ['selectExternalContact', 'getCurExternalContact', 'getContext', 'shareToExternalContact', 'sendChatMessage', 'shareToExternalChat'], signature: res2.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
success: (res) => { jsApiList: ['selectExternalContact', 'getCurExternalContact', 'getContext', 'shareToExternalContact', 'sendChatMessage', 'shareToExternalChat', 'startLiving', 'replayLiving'],
console.log(res, 'res-agentconfig'); success: (res) => {
console.info('window.WWOpenData', window.WWOpenData); console.log(res, 'res-agentconfig');
resolve(res); console.info('window.WWOpenData', window.WWOpenData);
}, resolve(res);
fail: (err) => { },
console.log(1213545344545) fail: (err) => {
console.log(err, 'err-agentconfig'); console.log(1213545344545)
reject(err); console.log(err, 'err-agentconfig');
}, reject(err);
}); },
});
}, 500)
}); });
}) })
...@@ -93,7 +96,7 @@ export default class WechatApi { ...@@ -93,7 +96,7 @@ export default class WechatApi {
}); });
} }
} }
} }
static async config(config) { static async config(config) {
...@@ -150,13 +153,13 @@ export default class WechatApi { ...@@ -150,13 +153,13 @@ export default class WechatApi {
wx.ready(() => { wx.ready(() => {
wx.invoke('startLiving', { wx.invoke('startLiving', {
"livingId": id, "livingId": id,
}, function(res) { }, function (res) {
if (res.err_msg === "startLiving:ok") { if (res.err_msg === "startLiving:ok") {
resolve(true) resolve(true)
} else { } else {
reject(res.err_msg); //错误处理 reject(res.err_msg); //错误处理
} }
}); });
}); });
}) })
} }
...@@ -165,7 +168,7 @@ export default class WechatApi { ...@@ -165,7 +168,7 @@ export default class WechatApi {
wx.ready(() => { wx.ready(() => {
wx.invoke('replayLiving', { wx.invoke('replayLiving', {
"livingId": id, "livingId": id,
}, function(res) { }, function (res) {
if (res.err_msg === "replayLiving:ok") { if (res.err_msg === "replayLiving:ok") {
resolve(true) resolve(true)
} else { } else {
...@@ -189,7 +192,7 @@ export default class WechatApi { ...@@ -189,7 +192,7 @@ export default class WechatApi {
} }
reject(err); //错误处理 reject(err); //错误处理
} }
}); });
}); });
}) })
} }
......
/* /*
* @Author: 陈剑宇 * @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01 * @Date: 2020-05-07 14:43:01
* @LastEditTime: 2021-06-22 16:49:06 * @LastEditTime: 2021-08-11 22:52:04
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: * @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts * @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-20 09:21:40 * @Date: 2020-08-20 09:21:40
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-11 15:17:56 * @LastEditTime: 2021-08-11 22:50:48
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
......
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