From eab8959710d4466fc02ca8fcfd8027d027783c51 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 13 十二月 2019 19:54:25 +0800
Subject: [PATCH] add resourceConfig

---
 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