Browse Source

企业返回地址

v4
蟑螂恶霸 3 months ago
parent
commit
539f3337b4
  1. 24
      src/common/globalExpandRouter.js
  2. 2
      src/views/Home.vue
  3. 10
      src/views/enforceHome.vue

24
src/common/globalExpandRouter.js

@ -50,21 +50,33 @@ const getBusKey = (name, path, data) => {
// 添加扩展方法 // 添加扩展方法
const $globalExpandRouter = (router, routes) => { const $globalExpandRouter = (router, routes) => {
// 扩展push方法 // 扩展push方法
const routerPush = router.push; const routerPush = router.push.bind(router);
router.push = (location) => { router.push = (location) => {
const { name = "", path = "" } = location; const name = typeof location === "object" && location ? location.name || "" : "";
const path =
typeof location === "object" && location
? location.path || ""
: typeof location === "string"
? location
: "";
const subMsgKey = getBusKey(name, path, routes); const subMsgKey = getBusKey(name, path, routes);
return routerPush.call(this, location).then(() => { return routerPush(location).then(() => {
subMsgKey && $globalEventBus.emit(subMsgKey); subMsgKey && $globalEventBus.emit(subMsgKey);
}); });
}; };
// 扩展replace方法 // 扩展replace方法
const routerReplace = router.replace; const routerReplace = router.replace.bind(router);
router.replace = (location) => { router.replace = (location) => {
const { name = "", path = "" } = location; const name = typeof location === "object" && location ? location.name || "" : "";
const path =
typeof location === "object" && location
? location.path || ""
: typeof location === "string"
? location
: "";
const subMsgKey = getBusKey(name, path, routes); const subMsgKey = getBusKey(name, path, routes);
return routerReplace.call(this, location).then(() => { return routerReplace(location).then(() => {
subMsgKey && $globalEventBus.emit(subMsgKey); subMsgKey && $globalEventBus.emit(subMsgKey);
}); });
}; };

2
src/views/Home.vue

@ -223,7 +223,7 @@
getSiqLoginAuth({code: res.result.result.code}, success => { getSiqLoginAuth({code: res.result.result.code}, success => {
// todo 测试时指定账号去2.0版本 start. // todo 测试时指定账号去2.0版本 start.
if(success.data.userId=="17608629742"||success.data.userId=="2064275054386966530"||success.data.userId=="2064274295779979265"){ if(success.data.userId=="17608645550" && (success.data.area || "").includes("宝安区")){
window.location.href="http://jdm.szssfj.cn/efcode20-ent-app/enterprise/enterpriseHome"; window.location.href="http://jdm.szssfj.cn/efcode20-ent-app/enterprise/enterpriseHome";
return; return;
} }

10
src/views/enforceHome.vue

@ -291,8 +291,14 @@ onMounted(() => {
getSzyptLoginAuth( getSzyptLoginAuth(
code, code,
(success) => { (success) => {
// todo 测试时指定账号去2.0版本 start. // todo 测试时指定账号去2.0版本 start. <宝安>
if(success.data.userId==17608417058 || success.data.userId==7897){ if(success.data.userId==17608417317 && success.data.area=="20210922211905159-EE09-09D606CFB"){
// if(success.data.userId==17608417058){
// window.location.href="http://jdm.szssfj.cn/efcode20-enf-app/enforcement/loginByV1System?loginUserId=d76453e3-6945-4b02-9943-efbd0e8aee9e";
window.location.href="https://weixin-hlht.sz.gov.cn:30443/connect/oauth2/authorize?appid=wwf62d6d16d1182b4f&redirect_uri=http://jdm.szssfj.cn/efcode20-enf-app/enforcement/enforcementHome&response_type=code&scope=SCOPE&agentid=1000015&state=STATE#wechat_redirect";
return;
}
if(success.data.userId==7897){
// if(success.data.userId==17608417058){ // if(success.data.userId==17608417058){
// window.location.href="http://jdm.szssfj.cn/efcode20-enf-app/enforcement/loginByV1System?loginUserId=d76453e3-6945-4b02-9943-efbd0e8aee9e"; // window.location.href="http://jdm.szssfj.cn/efcode20-enf-app/enforcement/loginByV1System?loginUserId=d76453e3-6945-4b02-9943-efbd0e8aee9e";
window.location.href="https://weixin-hlht.sz.gov.cn:30443/connect/oauth2/authorize?appid=wwf62d6d16d1182b4f&redirect_uri=http://jdm.szssfj.cn/efcode20-enf-app/enforcement/enforcementHome&response_type=code&scope=SCOPE&agentid=1000015&state=STATE#wechat_redirect"; window.location.href="https://weixin-hlht.sz.gov.cn:30443/connect/oauth2/authorize?appid=wwf62d6d16d1182b4f&redirect_uri=http://jdm.szssfj.cn/efcode20-enf-app/enforcement/enforcementHome&response_type=code&scope=SCOPE&agentid=1000015&state=STATE#wechat_redirect";

Loading…
Cancel
Save