# -*- encoding=utf8 -*-
from common.fileUtls import FileUtils

__author__ = "xiaohesheng"

"""
case_tag:api,mdm-web,b17供货目录申请_客户类型_医院_企业账号登录,id2255,id2255-17,sit,on
主数据平台:b17供货目录申请_客户类型_医院_企业账号登录 
"""

from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
module = "a4_mdm3_cm"
def e_login():
    module = "a4_mdm3_cm"
    info = FileUtils().r_info("a4_mdm3_cm", "供货关系申请")
    print(info)
    e_corpId = info['e_corpId']
    h_corpId = info['h_corpId']
    e_username = info['e_username']
    h_name = info['h_name']
    """
     场景:b17供货目录申请_客户类型_医院_企业账号登录
     用例名称：b17供货目录申请_客户类型_医院_企业账号登录
     输入：用户名，密码
     输出："rtn_msg": token,projectCode,uxid,corpId,h_name
    """
    # module = "mdm3_cm"
    #
    username = e_username
    # print('医院名称',username)
    password = commonFuc().get_business_data(module, "password")
    # print(username, password)
    # 获取token和projectCode
    token,projectCode,uxid,corpId,info= login_system(username, password).get_token()
    return token,projectCode,uxid,corpId,h_name
e_login()

