From 23aea8245c0f9f1fb9d06d22c8dd2dafbaf1a0e7 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Thu, 11 Jan 2024 14:08:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=98=E5=B7=A5=E8=AF=A6=E6=83=85=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E5=AF=86=E7=A0=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/components/frame/resetStaffPwd/resetStaffPwd.js | 6 +++--- public/pages/staff/staffDetail/staffDetail.js | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/components/frame/resetStaffPwd/resetStaffPwd.js b/public/components/frame/resetStaffPwd/resetStaffPwd.js index 24124c11b..62cd3f144 100644 --- a/public/components/frame/resetStaffPwd/resetStaffPwd.js +++ b/public/components/frame/resetStaffPwd/resetStaffPwd.js @@ -5,7 +5,7 @@ }, _initEvent: function () { vc.on('resetStaffPwd', 'openResetStaffPwd', function (_staffInfo) { - vc.component.resetStaffPwdInfo = _staffInfo; + $that.resetStaffPwdInfo = _staffInfo; $('#resetStaffPwdModel').modal('show'); }); }, @@ -16,7 +16,7 @@ resetStaffPwd: function () { var _dataObj = { communityId: vc.getCurrentCommunity().communityId, - staffId: vc.component.resetStaffPwdInfo.userId + staffId: $that.resetStaffPwdInfo.userId }; vc.http.apiPost( '/user.resetStaffPwd', @@ -37,7 +37,7 @@ }, function (errInfo, error) { console.log('请求失败处理'); - vc.component.resetStaffPwdInfo.errorInfo = errInfo; + $that.resetStaffPwdInfo.errorInfo = errInfo; } ); } diff --git a/public/pages/staff/staffDetail/staffDetail.js b/public/pages/staff/staffDetail/staffDetail.js index 68273cf13..7264ac0a0 100644 --- a/public/pages/staff/staffDetail/staffDetail.js +++ b/public/pages/staff/staffDetail/staffDetail.js @@ -24,12 +24,12 @@ if (!vc.notNull($that.staffDetailInfo.staffId)) { return; } - vc.component._loadStaffInfo(); + $that._loadStaffInfo(); $that.changeTab($that.staffDetailInfo._currentTab); }, _initEvent: function () { vc.on('staffDetail', 'listStaffData', function (_info) { - vc.component._loadStaffInfo(); + $that._loadStaffInfo(); $that.changeTab($that.staffDetailInfo._currentTab); }); }, @@ -69,14 +69,16 @@ $that.staffDetailInfo.photo = $that.staffDetailInfo.url; }, errorLoadImg: function () { - vc.component.staffDetailInfo.photo = "/img/noPhoto.jpg"; + $that.staffDetailInfo.photo = "/img/noPhoto.jpg"; }, _openEditStaffModel: function () { $that.staffDetailInfo.name = $that.staffDetailInfo.userName; $that.staffDetailInfo.userId = $that.staffDetailInfo.staffId; - vc.component.$emit('edit_staff_event', $that.staffDetailInfo); + $that.$emit('edit_staff_event', $that.staffDetailInfo); }, _resetStaffPwd: function (_staff) { + $that.staffDetailInfo.name = $that.staffDetailInfo.userName; + $that.staffDetailInfo.userId = $that.staffDetailInfo.staffId; vc.emit('resetStaffPwd', 'openResetStaffPwd', $that.staffDetailInfo); }, }