def httpProductGreenHand(self): """ 活动推荐 :return: """ self.url = "/hjlc-api/product/greenHand" return HttpMethod(self.uri, self.url).http_get()
def httpProductDirectDetail(self, id): """ 直投出借详情 :param id:产品id :return: """ self.url = "/hjlc-api/product/direct/detail?id=%s" % id return HttpMethod(self.uri, self.url).http_get()
def httpJhjSmsFindLoginPasswordJson(self, mobile): """ 找回密码发送验证码 :return: """ self.url = "/jhj/sms/findLoginPassword.json" self.data = {"mobile": mobile, "sign": ""} return HttpMethod(self.uri, self.url, self.data).http_post()
def httpProductDetailWithAccount(self, id, userId): """ 授权出借 :param id:产品id :param userId: 账号的userId :return: """ self.url = "/hjlc-api/product/detailWithAccount?id=%s&userId%s=" % ( id, userId) return HttpMethod(self.uri, self.url).http_get()
def httpProductInvestList(self, id): """ 投资记录 :param id: 产品id :return: """ page = 1 pageSize = 100 self.url = "/hjlc-api/product/invest/list?id=%s&page=%s&pageSize=%s" % ( id, page, pageSize) return HttpMethod(self.uri, self.url).http_get()
def httpJhjLoginByCodeJson(self, mobile): """ 验证码登录 :param mobile: :return: """ self.httpJhjSmsRegisterJson(mobile) code = self.message.message(mobile) self.url = "/jhj/loginByCode.json" self.data = {"sign": "", "mobile": mobile, "code": code, "mac": ""} return HttpMethod(self.uri, self.url, self.data).http_post()
def httpIndexProductList(self, category): """ 智慧投和直投产品 :param category:智慧投产品:1 直投产品:2 :return: """ pageSize = 100 category = category page = 1 self.url = "/hjlc-api/index/product/list?pageSize=%s&category=%s&page=%s" % ( pageSize, category, page) return HttpMethod(self.uri, self.url).http_get()
def httpJhjSmsRegisterJson(self, mobile): """ 发送验证码 :return: """ self.url = "/jhj/sms/register.json" self.data = { "sign": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtb2JpbGUiOiIxNzc3MDAwMDMwMiJ9.1NQ2mf39ICLYk80XHPZdHKH9fF4sfpMTyzqZsLmd-sU", "mobile": mobile } return HttpMethod(self.uri, self.url, self.data).http_post()
def httpJhjLoginJson(self, mobile, password): """ 账号密码登录 :param mobile: :param password: :return: """ self.url = "/jhj/login.json" self.data = { "sign": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNzd29yZCI6IjY1NjVlNDJhNjQzMWNkMTY1NWRlMDBiYWZjYmM0MmZmIiwibW9iaWxlIjoiMTc3NzAwMDAzMDIiLCJtYWMiOiI5MGQwMmFjZDJhMGY0MWQ4In0.a5jXWZUK1kSE5Vs7arBCJlgBX_9l_Q42NqLD2oU8pFc", "mobile": mobile, "password": self.md5.md5(password), "mac": "90d02acd2a0f41d8" } return HttpMethod(self.uri, self.url, self.data).http_post()
def httpJhjRegisterJson(self, mobile, password): """ 注册 :return: """ self.httpJhjSmsRegisterJson(mobile) code = self.message.message(mobile) self.url = "/jhj/register.json" self.data = { "password": self.md5.md5(password), "sign": "", "code": code, "mobile": mobile, "mac": "" } return HttpMethod(self.uri, self.url, self.data).http_post()
def httpJhjUserPasswordFindPasswordJson(self, mobile, setpassword): """ 找回密码登录 :param mobile: :param setpassword: :return: """ self.httpJhjSmsFindLoginPasswordJson(mobile) code = self.message.message(mobile) self.url = "/jhj/user/password/findPassword.json" self.data = { "loginPwd": self.md5.md5(setpassword), "code": code, "mobile": mobile, "sign": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblB3ZCI6IjY1NjVlNDJhNjQzMWNkMTY1NWRlMDBiYWZjYmM0MmZmIiwibW9iaWxlIjoiMTc3NzAwMDAzMDIiLCJjb2RlIjoiMzk2OTE2In0.O0hQoLkTDdeiAT0oZMKCXKHyVjBbT41h01COvoB6JfE" } return HttpMethod(self.uri, self.url, self.data).http_post()