|
@@ -61,6 +61,7 @@ import { routingInfos } from "@utility/generalVariables.js";
|
|
import Footer from "@components/page/footer.vue";
|
|
import Footer from "@components/page/footer.vue";
|
|
import Workbench from "./component/workbench.vue";
|
|
import Workbench from "./component/workbench.vue";
|
|
import DataAnalysis from "./component/dataAnalysis.vue";
|
|
import DataAnalysis from "./component/dataAnalysis.vue";
|
|
|
|
+import requests from "@common/requests"
|
|
|
|
|
|
|
|
|
|
const userInfo = useInfoStore()
|
|
const userInfo = useInfoStore()
|
|
@@ -88,8 +89,11 @@ function returnImageAddress(rows) {
|
|
|
|
|
|
function obtainEnterpriseWeChatParameters(data = {}) {
|
|
function obtainEnterpriseWeChatParameters(data = {}) {
|
|
const token = data.id
|
|
const token = data.id
|
|
- const curUrl = window.location.href.split('#')[0]
|
|
|
|
|
|
+ // const curUrl = window.location.href.split('home')[0]
|
|
|
|
+ const curUrl = window.location.href
|
|
console.log(wx, '开始调用接口')
|
|
console.log(wx, '开始调用接口')
|
|
|
|
+ console.log(token, curUrl)
|
|
|
|
+ console.log(requests, '<==== requests')
|
|
requests.post('/wxcorp/getCorpWXConfig', { url: curUrl, token }).then((res) => {
|
|
requests.post('/wxcorp/getCorpWXConfig', { url: curUrl, token }).then((res) => {
|
|
console.log(res, '<====== 返回的参数 /wxcorp/getCorpWXConfig')
|
|
console.log(res, '<====== 返回的参数 /wxcorp/getCorpWXConfig')
|
|
wx.config({
|
|
wx.config({
|
|
@@ -136,7 +140,8 @@ function obtainEnterpriseWeChatParameters(data = {}) {
|
|
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
|
|
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
|
|
// alert('wxConfig发生异常:'+JSON.stringify(res));
|
|
// alert('wxConfig发生异常:'+JSON.stringify(res));
|
|
// 企业第一次授权安装进入后会报not in reliable domain的错误,刷新后正常
|
|
// 企业第一次授权安装进入后会报not in reliable domain的错误,刷新后正常
|
|
- location.reload();
|
|
|
|
|
|
+ // location.reload();
|
|
|
|
+ console.log(res, '<===== 失败3')
|
|
});
|
|
});
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
alert(err);
|
|
alert(err);
|