|
@@ -547,12 +547,17 @@
|
|
|
|
|
|
// 获取企业微信的参数
|
|
|
agentConfig() {
|
|
|
+ var isCorpWX = true
|
|
|
+ var ua = navigator.userAgent.toLowerCase();
|
|
|
+ if (ua.indexOf("wxwork") > 0) {
|
|
|
+ isCorpWX = false;
|
|
|
+ }
|
|
|
var curUrl = location.href.split("#")[0];
|
|
|
this.http.post("/wxcorp/getCorpWXConfig", {url: curUrl, token: this.user.id}, (res) => {
|
|
|
if (res.code == "ok") {
|
|
|
wx.config({
|
|
|
beta: true,
|
|
|
- debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
+ debug: isCorpWX, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
appId: res.data.appid, // 必填,公众号的唯一标识
|
|
|
timestamp: res.data.timestamp, // 必填,生成签名的时间戳
|
|
|
nonceStr: res.data.noncestr, // 必填,生成签名的随机串
|