Browse Source

好多杂七杂八的提交

dev-v1.0.2
蟑螂恶霸 5 months ago
parent
commit
e2bd90e3b8
  1. 4
      zdxt-common/zdxt-common-encrypt/src/main/java/org/dromara/common/encrypt/config/jasypt/JasyptUtils.java
  2. 2
      zdxt-web-client/zdxt-admin-plus-ui/.env.development
  3. 8
      zdxt-web-client/zdxt-admin-plus-ui/package.json
  4. 10
      zdxt-web-client/zdxt-efcode-enforcement-app/package.json
  5. 11
      zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-dev
  6. 1
      zdxt-web-client/zdxt-efcode-enterprise-app/package.json
  7. 2
      zdxt-web-client/zdxt-efcode-enterprise-app/src/common/globalRouter.js
  8. 2
      zdxt-web-client/zdxt-efcode-enterprise-app/src/router/enterprise-app/ent-main-router.js
  9. 3
      zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/home/enterpriseHome.vue
  10. 69
      zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/home/enterpriseHomeV2.vue
  11. 2
      zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev
  12. 2
      zdxt-web-client/zdxt-efcode-supervision-app/package.json
  13. 4
      zdxt-web-client/zdxt-efcode-supervision-app/src/common/globalRouter.js
  14. 8
      zdxt-web-server/zdxt-admin-web-server/src/main/resources/application-dev.yml
  15. 4
      zdxt-web-server/zdxt-admin-web-server/src/main/resources/application.yml

4
zdxt-common/zdxt-common-encrypt/src/main/java/org/dromara/common/encrypt/config/jasypt/JasyptUtils.java

@ -52,9 +52,9 @@ public final class JasyptUtils {
//加密
// String s = encryptWithMD5("jdbc:mysql://10.76.108.1:15144/zfjd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8", "ATPfOhpnAVp6yBas7RU");
// System.out.println(s);
// String channelcs1 = decryptWithMD5("d4ohneeRrbUb1DsUxGfVs5K7/ZGrnDmSVMQOxx0GIcb0ZWzyCq9aC7CH4aBfwlq3T9G8BLy7cDfTO+IE4uPcstIfQmdHtOlqKxTbBAVxJOUArE3FykMxHzb/NGQ7k4ahHIt+QzH0HPagJACm5B3Wgz8oUZXwq9pZlHmmAG8994JaPIgMhIsA2Lxdnaw/LHBiGkq+FpE7j5TIcItow1HcGw==", "ATPfOhpnAVp6yBas7RU");
String channelcs1 = encryptWithMD5("a06qY2lYeURkNFo4dU5NWD==", "ATPfOhpnAVp6yBas7RU");
// String channelcs2 = decryptWithMD5("jGDVr5PtJpE/xa9FyHzmV2PhFrtctWjETGP5lrUlOyZ68APa81+jbQYA9RNKMI/dldAm7xxTQian8370eQqlYSAyoQV9EYlhsK3MgJkn4+OmnfBNmg227+/hizsmt1swxyW2uQbdlhzw6QaXYJ175Rjtlq1yVx+NOiamEoeSO4hzHWqxKTJT/y19fHg6QTuQc3r+PEsAFQp503HsvC5lgA==", "ATPfOhpnAVp6yBas7RU");
// System.out.println(channelcs1);
System.out.println(channelcs1);
System.out.println(decryptWithMD5("zTr/tj2VgFxQyunI4eIL7NyRWDPSMPSB0VlwTYeHTdsEWyu1H96xWw==","ATPfOhpnAVp6yBas7RU"));
}
}

2
zdxt-web-client/zdxt-admin-plus-ui/.env.development

@ -9,7 +9,7 @@ VITE_APP_ENV = 'development'
VITE_APP_BASE_API = '/dev-api'
# API 代理目标地址
VITE_APP_PROXY_TARGET = 'http://139.186.148.21:8080'
VITE_APP_PROXY_TARGET = 'http://localhost:8080'
# 应用访问路径 例如使用前缀 /admin/
VITE_APP_CONTEXT_PATH = '/'

8
zdxt-web-client/zdxt-admin-plus-ui/package.json

@ -7,10 +7,10 @@
"license": "MIT",
"type": "module",
"scripts": {
"vite-server-web-supervision-dev": "vite serve --mode development",
"vite-server-web-supervision-dev-zrb": "vite serve --mode development-zrb-cust",
"build-zdxt-admin-plus-ui:prod": "vite build --mode production --outDir dist/prod",
"build-zdxt-admin-plus-ui:dev": "vite build --mode development --outDir dist/dev",
"dev": "vite serve --mode development",
"dev-zrb": "vite serve --mode development-zrb-cust",
"build:prod": "vite build --mode production --outDir dist/prod",
"build:dev": "vite build --mode development --outDir dist/dev",
"zdxt-admin-plus-ui-preview": "vite preview --outDir dist/prod",
"zdxt-admin-plus-ui-lint:eslint": "eslint",
"zdxt-admin-plus-ui-lint:eslint:fix": "eslint --fix",

10
zdxt-web-client/zdxt-efcode-enforcement-app/package.json

@ -4,12 +4,10 @@
"private": true,
"type": "module",
"scripts": {
"vite": "vite --mode enforcement-dev",
"vite-server-app:enforcement-dev": "vite --mode enforcement-dev",
"vite-test": "vite --mode enforcement-test",
"build-app:enforcement-dev": "vite build --mode enforcement-dev --outDir dist/enforcement-dev",
"build-app:enforcement-test": "vite build --mode enforcement-test --outDir dist/enforcement-test",
"build-app:enforcement-prod": "vite build --mode enforcement-prod --outDir dist/enforcement-prod"
"dev": "vite --mode enforcement-dev",
"test": "vite --mode enforcement-test",
"build:dev": "vite build --mode enforcement-dev --outDir dist/enforcement-dev",
"build:test": "vite build --mode enforcement-test --outDir dist/enforcement-test"
},
"dependencies": {
"axios": "^1.15.0",

11
zdxt-web-client/zdxt-efcode-enforcement-app/vite-env/.env.enforcement-dev

@ -1,6 +1,9 @@
# 执法端开发环境
# 执法端测试环境
VITE_PORT = 12002
VITE_BASE_URL = '/api/enf-ep'
VITE_PROXY_TARGET = 'http://localhost:17000'
VITE_DEFAULT_LOGIN = '/enforcement/loginByPassword'
VITE_BASE_URL = '/api'
#VITE_API_URL = 'http://139.186.148.21:8080'
#VITE_PROXY_TARGET = 'http://139.186.148.21:8080'
VITE_API_URL = 'http://localhost:8080'
VITE_PROXY_TARGET = 'http://localhost:8080'
VITE_DEFAULT_LOGIN = '/enforcement/login'
VITE_APP_ENV = 'dev'

1
zdxt-web-client/zdxt-efcode-enterprise-app/package.json

@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite --mode enterprise-dev",
"test": "vite --mode enterprise-test",
"vite-server-app:enterprise-dev-zrb": "vite --mode enterprise-dev-zrb",
"build:dev": "vite build --mode enterprise-dev --outDir dist/enterprise-dev",
"build:prod": "vite build --mode enterprise-prod --outDir dist/enterprise-prod"

2
zdxt-web-client/zdxt-efcode-enterprise-app/src/common/globalRouter.js

@ -4,7 +4,7 @@ let routes = [
{
path: "/",
// 根据环境变量决定默认登录页(enterprise-dev → /enterprise/login,enforcement-dev → /enforce/login)
redirect: import.meta.env.VITE_DEFAULT_LOGIN || "/login",
redirect: import.meta.env.VITE_DEFAULT_LOGIN || "/enterprisetest",
name: "App",
},
{

2
zdxt-web-client/zdxt-efcode-enterprise-app/src/router/enterprise-app/ent-main-router.js

@ -1,7 +1,7 @@
const routes = [
// 企业端根路径重定向
{
path: "/enterprise",
path: "/",
redirect: "/enterprise/enterpriseHome",
name: "enterpriseRoot",
},

3
zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/home/enterpriseHome.vue

@ -47,6 +47,7 @@ import * as w6s from 'szient-js-sdk';
import sha1 from 'crypto-js/sha1';
import {getEnterpriseMerchantAuthorization, getSiqLoginAuth, siqCode} from '../../../api/enterprise';
import 'vant/es/toast/style';
import Vconsolefrom from 'vconsole';
const {useCommon} = $globalStore;
const router = useRouter();
@ -136,6 +137,8 @@ const applyLoginResult = (data) => {
}
onMounted(() => {
console.log("企业端 Home onMounted");
new Vconsolefrom();
console.log(useCommon.firstLoad);
isLoading.value = useCommon.firstLoad;

69
zdxt-web-client/zdxt-efcode-enterprise-app/src/views/enterprise/home/enterpriseHomeV2.vue

@ -75,6 +75,7 @@ import * as w6s from 'szient-js-sdk';
import sha1 from 'crypto-js/sha1';
import { getEnterpriseMerchantAuthorization, getSiqLoginAuth, getSiqLoginAuthMock, siqCode, getCarouselBannerList, getSystemNoticeList } from '../../../api/enterprise';
import 'vant/es/toast/style';
import Vconsolefrom from 'vconsole';
const { useCommon } = $globalStore;
const router = useRouter();
@ -202,6 +203,8 @@ const hasUserInfo = () => {
};
onMounted(() => {
console.log("企业端 Home onMounted");
new Vconsolefrom();
//debugger;
console.log(useCommon.firstLoad);
console.log(useCommon);
@ -229,6 +232,8 @@ onMounted(() => {
access_secret = success.data.accessSecret;
}
console.log("获取深i企认证信息成功", { access_key, access_secret });
const nonce = generateRandomNumber();
const timestamp = `${Date.now()}`;
@ -243,73 +248,23 @@ onMounted(() => {
console.log("获取深i企认证信息错误!", "access_key 或 access_secret 为空");
}
// ========== 模拟深i企登录:使用 w6s.init mock 模式 ==========
const route = router.currentRoute.value;
const mockLogin = route.query.mockLogin;
const mockLoginFrom = route.query.mockLoginFrom;
if (mockLogin === 'true' && mockLoginFrom === 'siq') {
const userInfoStr = decodeURIComponent(route.query.userInfo || '');
const userInfo = JSON.parse(userInfoStr);
console.log("模拟深i企登录, 用户信息:", userInfo);
// 使用 w6s SDK 内置的 mock 机制,设置 mockData 模拟 config 鉴权和 getAuthCode 认证
w6s.init({
mock: true,
debug: true,
mockData: {
config: {
config: () => ({ success: true })
},
szient: {
getAuthCode: () => ({
result: { result: { code: 'MOCK_SIQ_' + userInfo.userId } }
})
}
}
});
// mock 模式下 w6s API 仅通过 Promise 返回(不触发 success 回调),使用 then 链处理
w6s.config({})
.then((res) => {
console.log("模拟鉴权成功", res);
return w6s.szient.getAuthCode({});
})
.then((res) => {
console.log("模拟认证成功, code:", res.result.result.code);
return new Promise((resolve, reject) => {
getSiqLoginAuthMock({ userId: userInfo.userId }, resolve, reject);
});
})
.then((success) => {
useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString());
useCommon.SET_USER_ID(success.data.userId);
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber);
useCommon.SET_TOKEN(success.data.token);
console.log("模拟深i企登录成功", success.data);
isLoading.value = false;
useCommon.SET_IS_FIRST_LOAD(false);
getEnterpriseMerchant(success.data.enterpriseNumber.toString(), success.data.phonenumber.toString());
})
.catch((err) => {
console.error("模拟深i企登录失败:", err);
isLoading.value = false;
});
return;
}
console.log("生成鉴权参数", { nonce, timestamp, signature });
// ========== 深i企登录:生产环境模式 ==========
console.log("开始w6s鉴权,参数:", { access_key, nonce, timestamp, signature });
w6s.config({
access_key: access_key,
nonce: nonce,
timestamp: timestamp,
signature: signature,
}).then((res) => {
console.log("鉴权", res);
console.log("鉴权成功", res);
}).catch((err) => {
console.log("鉴权", err);
console.log("鉴权失败", err);
});
w6s.ready(() => {
console.log("w6s ready");
w6s.header.setTitle('深圳市行政执法监督码');
w6s.szient.getAuthCode({
success: function (res) {
@ -334,12 +289,12 @@ onMounted(() => {
isLoading.value = false;
}
}, error => {
console.log("error : " + error)
console.log("认证失败", error)
})
},
fail: function (err) {
console.log(err)
console.log("认证", err);
console.log("认证失败", err);
},
});
});

2
zdxt-web-client/zdxt-efcode-enterprise-app/vite-env/.env.enterprise-dev

@ -5,5 +5,5 @@ VITE_PROXY_TARGET = 'http://139.186.148.21:8080'
VITE_BASE_URL = 'http://139.186.148.21:8080'
# 附件/图片等静态资源的后端地址(直接访问,不走 /api 代理)
VITE_FILE_URL = 'http://139.186.148.21:8080'
VITE_DEFAULT_LOGIN = '/enterprise/login'
VITE_DEFAULT_LOGIN = '/enterprise/enterpriseHome'
VITE_APP_ENV = 'dev'

2
zdxt-web-client/zdxt-efcode-supervision-app/package.json

@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"vite-server-app:supervision-dev": "vite --mode supervision-dev",
"dev": "vite --mode supervision-dev",
"build-app:supervision-dev": "vite build --mode supervision-dev --outDir dist/supervision-dev",
"build-app:supervision-prod": "vite build --mode supervision-prod --outDir dist/supervision-prod"
},

4
zdxt-web-client/zdxt-efcode-supervision-app/src/common/globalRouter.js

@ -18,9 +18,9 @@ routes = $globalRouterModules(routes); // 加载模块路由
const $globalRouter = createRouter({
// 企业端u
// history: createWebHashHistory(),
history: createWebHashHistory(),
// 执法端
history: createWebHistory(),
// history: createWebHistory(),
routes,
});

8
zdxt-web-server/zdxt-admin-web-server/src/main/resources/application-dev.yml

@ -1,7 +1,7 @@
zdxt:
file:
# Windows/Linux 本地开发均可用;生产环境在 application-prod.yml 覆盖
# upload-path: ${user.home}/zdxt-upload
# upload-path: D:\zfjdm\uploadPath
upload-path: /usr/local/uploadPath
# upload-path: /Users/vincent/uploadPath
url-prefix: /profile
@ -297,11 +297,11 @@ siq:
# secretKey: SXRpWEhVN3RHM3ZFbzRQcQ==
#测试
siqUrl: http://egbpub.siqhz.com/egb/api/thirdauth
code: zfjdm
secretKey: ENC(zTr/tj2VgFxQyunI4eIL7NyRWDPSMPSB0VlwTYeHTdsEWyu1H96xWw==)
code: TEST
secretKey: ENC(amY2xX5mjlyBg8wGGqaZoZv1vWCHnsj/l5a7gsGimead7xTC773KyQ==)
# 模拟数据开关(true=使用模拟数据,false=调用真实接口)
mock:
enabled: true
enabled: false
#民生诉求工单接口 测试环境
mssq:

4
zdxt-web-server/zdxt-admin-web-server/src/main/resources/application.yml

@ -134,7 +134,9 @@ security:
# 执法端-深政易登录接口(免鉴权)
- /app-enf/login/szyptLogin/**
# 企业端-深i企登录相关接口(免鉴权)
- /app-ent/thirdLogin/**
- /app-ent/enterprise/login/getSiqCode
- /app-ent/enterprise/login/siqLogin
- /app-ent/enterprise/login/siqLoginMock
# 多租户配置
tenant:

Loading…
Cancel
Save