operatePwd.py
1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#coding=utf-8
# @Time : 2021/6/11 14:29
# @Author : Ljq
# @File : operatePwd.py
# @Software: PyCharm
"""
修改密码,重置密码业务相关接口封装
"""
import requests
import json
import re
import time
from commons.scripts import dealContentType as dCT
def getSimpleInfo(gatewayHost=None,clientHeaders=None,cardNo=None):
"""获取卡片信息"""
url = gatewayHost+f"/account-service/api/account/simpleInfo?cardNo={cardNo}"
clientHeaders=dCT.jsonCT(clientHeaders)
res = requests.get(url=url,headers=clientHeaders)
return res
def modifyLoginPwd(gatewayHost=None,clientHeaders=None,**kwargs):
"""获取卡片信息"""
url = gatewayHost+r"/card-web/card/modifyLoginPwd.action"
data={"oldLoginPwd":"111111","loginPwd":"111111","secondLoginPwd":"111111","cardNo":"888810032426","accountId":105339,"customerId":131136}
data = dict(data,**kwargs)
clientHeaders=dCT.jsonCT(clientHeaders)
res = requests.post(url=url,headers=clientHeaders,data=json.dumps(data))
return res
def resetLoginPwd(gatewayHost=None,clientHeaders=None,**kwargs):
"""获取卡片信息"""
url = gatewayHost+r"/card-web/card/resetLoginPwd.action"
data={"loginPwd":"111111","secondLoginPwd":"111111","cardNo":"888810032426","accountId":105339,"customerId":131136}
data = dict(data,**kwargs)
clientHeaders=dCT.jsonCT(clientHeaders)
res = requests.post(url=url,headers=clientHeaders,data=json.dumps(data))
return res