operatePwd.py 1.44 KB
#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