优化代码

This commit is contained in:
aixianling
2024-10-31 14:37:30 +08:00
parent 8c56cf808b
commit 35894eefe4

View File

@@ -6,6 +6,7 @@ import axios from './common/axios';
import utils from 'library/common/util';
import * as qs from "query-string";
import customConfig from "./common/config.json"
Vue.use(ui)
//初始化接口工具类
Vue.config.productionTip = false;
@@ -19,8 +20,9 @@ const app = new Vue({
...App
})
const getSdk = c => {
if (window?.jWeixin || window?.wx) {
wx = window?.jWeixin || wx
const {jWeixin, wx} = window
if (jWeixin || wx) {
window.wx = jWeixin || wx
app.$mount();
} else if (c < 10) {
setTimeout(() => {
@@ -30,7 +32,7 @@ const getSdk = c => {
}
const {corpId: cid, suiteId: sid} = store.state.wxwork.config,
{query: {corpId = cid, suiteId = sid}} = qs.parseUrl(location.href)
{query: {corpId = cid, suiteId = sid}} = qs.parseUrl(location.href)
if (corpId && suiteId) {
store.dispatch("agentSign", {corpId, suiteId}).then(() => getSdk())
} else if (customConfig.customLogin) {