From 4222528c498ea97cfe9a9b50d041090b0cf82408 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Sat, 20 Nov 2021 16:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=94=80=E5=95=86=E7=BC=96=E8=BE=91/?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/api.js | 4 + src/pages/distributor/list/list.js | 34 +++++++-- src/pages/distributor/list/modifydispwd.js | 88 ++++++++++++++++++++++ 3 files changed, 120 insertions(+), 6 deletions(-) create mode 100644 src/pages/distributor/list/modifydispwd.js diff --git a/src/assets/api.js b/src/assets/api.js index 460f6396..033a8f13 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -215,6 +215,10 @@ export const getReseller = (id) => { export const putResellerInfo = (id,data) => { return req('put', baseurl + "/reseller/"+id,data) } +//重置分销商密码 +export const putResellerPwd = (id,data) => { + return req('put', baseurl + "/reseller/password/"+id,data) +} // 账号管理 diff --git a/src/pages/distributor/list/list.js b/src/pages/distributor/list/list.js index eb7bf86f..c9c50338 100644 --- a/src/pages/distributor/list/list.js +++ b/src/pages/distributor/list/list.js @@ -10,6 +10,7 @@ import Ipt from "../../../components/input/main" import Grid from "../../../components/gird/main.js" import TabPage from "../../../components/tabPage/main.js" import Filterbar from "../../../components/filterbar/main.js" +import Modifydispwd from "./modifydispwd.js" const Column = [ { title: '编号', @@ -98,6 +99,8 @@ export default class acclist extends React.Component{ this.state={ tabList:[{title:"分销商列表"}], logVisible:false, + pwdVisible:false, + resellid:null, key_word:'', limit:10, page:1, @@ -203,12 +206,21 @@ export default class acclist extends React.Component{ pageChange(){ } - onMenuItemClick(e,row){ - this.setState({logVisible:true}) + onMenuItemClick(e,key,row){ + if(key==1){ + //重置密码 + this.setState({pwdVisible:true,resellid:row.id}) + }else if(key==2){ + this.setState({logVisible:true}) + } } setLogVisible(e){ this.setState({logVisible:false}) } + //重置密码 + setVisible(e){ + this.setState({pwdVisible:false}); + } //page pageChange(e){ this.setState({page:e}); @@ -306,9 +318,9 @@ componentDidUpdate(prevProps,prevState){