From a9817d6b7baa0643281e230d4e42263abf10fca1 Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Wed, 29 Mar 2023 16:00:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?3.29=20=E6=9B=B4=E6=8D=A2=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E4=BF=AE=E6=94=B9=E8=B4=9F=E8=B4=A3=E4=BA=BA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=B4=9F=E8=B4=A3=E4=BA=BA=E6=95=B0=E6=8D=AE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/SupplierList/service.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/utils/SupplierList/service.ts b/src/utils/SupplierList/service.ts index d39aeef..ca366e0 100644 --- a/src/utils/SupplierList/service.ts +++ b/src/utils/SupplierList/service.ts @@ -4,13 +4,13 @@ export async function getSupplierList(params: any) { /* * http://gysxxk.cn1.utools.club/serviceEshopProviderMdm/findPageProvider {   -    "pageNum": 1, -    "pageSize": 10 + "pageNum": 1, + "pageSize": 10 } * */ - return request('/api/api/core-service-supplierbase/outer/v1.0/serviceEshopProviderMdm/findPageProvider',{ - method:'post', - data:{ + return request('/api/api/core-service-supplierbase/outer/v1.0/serviceEshopProviderMdm/findPageProvider', { + method: 'post', + data: { ...params } }) @@ -22,9 +22,9 @@ export async function getSupplierUser(params: any) { /* *暂无url * */ - return request('/api/api/core-service-supplierbase/outer/v1.0/serviceEshopProviderEmpMdm/findUserCountListBySupplierCodePage',{ - method:'post', - data:{ + return request('/api/core-service-ebtp-userinfo/v1/userinfo/findUserCountListBySupplierCodePage', { + method: 'post', + data: { ...params } }) From 670826db870a88d7c633d516717b390a742018bc Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Thu, 30 Mar 2023 17:00:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?3.30=20=E6=B8=97=E9=80=8F=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=93=E5=AE=B6=E4=BF=AE=E6=94=B9=E5=AF=86?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/userformal/login/index.tsx | 74 +++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 12 deletions(-) diff --git a/src/pages/userformal/login/index.tsx b/src/pages/userformal/login/index.tsx index d20c59d..6f4ed66 100644 --- a/src/pages/userformal/login/index.tsx +++ b/src/pages/userformal/login/index.tsx @@ -12,6 +12,7 @@ import FrameFaceLogin from '../faceLogin/FrameFaceLogin'; import LivingNotIE from './living.min.js'; import { _KJUR } from './jsrsasign-latest-all-min'; import { time } from 'echarts'; +import request from '@/utils/request'; const layout = { labelCol: { span: 7 }, @@ -28,6 +29,7 @@ const Index: React.FC<{}> = () => { const [form2] = Form.useForm(); const [imgUrl, setImgUrl] = useState(''); const [tmpToken, setTmpToken] = useState(''); + const [imgUrlEdit, setImgUrlEdit] = useState(''); const remainingTime = 3 //刷新token的剩余时间,单位小时 const [changeForm] = Form.useForm(); const [isModalVisible, setIsModalVisible] = useState(false) @@ -43,6 +45,7 @@ const Index: React.FC<{}> = () => { const [itemShow, setItemShow] = useState(false); const [action, setAction] = useState(1); const [timer, setTimer] = useState(10000); + const urlRef = useRef(""); /** * 设置活体检测token */ @@ -192,6 +195,32 @@ const Index: React.FC<{}> = () => { setTmpToken(tmpToken); setImgUrl(url); }; + const changeCaptchaEdit = async () => {//修改密码-获取验证码 + let tmpToken = genRandomString(16); + + // 获取window的URL对像 并做好浏览器兼容性处理 + const windowUrl = window.URL || window.webkitURL + windowUrl.revokeObjectURL(urlRef.current); + // 开始ajax请求 + const xhr = new XMLHttpRequest() + // 验证码请求地址 + const url = '/api/api/mall-expe/v1/expebaseinfo/getCaptcha?token=' + tmpToken + xhr.open('POST', url, true) + // 设置响应数据的类型 blod是将响应数据转换成二进制数据的Blob对象 + xhr.responseType = 'blob' + xhr.onload = function () { + if (this.status === 200) { + const blob = this.response + // 将响应数据转换成url对象 赋值给src变量 传递给img + const blob_url = windowUrl.createObjectURL(blob); + urlRef.current = blob_url; + changeForm.setFieldsValue({ token: tmpToken }); + setImgUrlEdit(blob_url); + } + }; + + xhr.send(); + } //登录刷新Token方法 const refreshToken = async (data: any) => { @@ -314,21 +343,14 @@ const Index: React.FC<{}> = () => { message.warn('两次密码输入不一致,请重新输入') } else { setSping(true); - const date = { - identityCard: changeForm.getFieldValue("identityCard"), - oldPassword: changeForm.getFieldValue("oldPassword"), - newPassword: changeForm.getFieldValue("newPassword"), - }; + const date = changeForm.getFieldsValue(); changePass({ ...date }).then(res => { if (res.success) { - setSping(false); - setIsModalVisible(false) + setIsModalVisible(false); message.success('修改密码成功'); - changeForm.resetFields() - } else { - setSping(false); } }).finally(() => { + changeCaptchaEdit(); setSping(false); }); } @@ -485,13 +507,20 @@ const Index: React.FC<{}> = () => { } }, []); + useEffect(() => { + if (isModalVisible) { + changeForm.resetFields() + changeCaptchaEdit(); + } + }, [isModalVisible]); + return (

中国联通智慧供应链平台 | 招标采购中心

- +
@@ -614,7 +643,7 @@ const Index: React.FC<{}> = () => { visible={isModalVisible} onCancel={() => setIsModalVisible(false)} footer={[ - , + , ]} width={600} @@ -726,6 +755,27 @@ const Index: React.FC<{}> = () => { > + + + + + + + changeCaptchaEdit()} src={imgUrlEdit} style={{ width: "40%" }} /> + +