From c9635ae13e45cdb3af46ad45f62ba54463cd774b Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 04 十二月 2019 16:37:57 +0800
Subject: [PATCH] fix argname
---
userApi.go | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/userApi.go b/userApi.go
index 104783d..1fb3666 100644
--- a/userApi.go
+++ b/userApi.go
@@ -87,4 +87,23 @@
return false,nil
}
return res.Success,res.Data
+}
+
+func (api UserApi) UpdatePwd(userId string, oldPwd string, newPwd string) (bool,interface{}) {
+ url := api.getBasicUrl() + DATA_URL_PREFIX + "/user/updatePwd"
+ client := NewClient()
+ paramBody := map[string]interface{}{
+ "userId": userId,
+ "oldPwd": oldPwd,
+ "newPwd": newPwd,
+ }
+ respBody, err := client.DoPostRequest(url, CONTENT_TYPE_FORM, paramBody,nil, nil)
+ if err != nil {
+ return false,nil
+ }
+ var res Result
+ if err = json.Unmarshal(respBody, &res); err != nil {
+ return false,nil
+ }
+ return res.Success,res.Data
}
\ No newline at end of file
--
Gitblit v1.8.0