def get_data(self): resource_type_list = () account_id = self.request.session.get("")[""] #account_id="5689sfshfhsdhiojfdsjofi" title_list = [{"": "", "url": "//"}] request_url = "" return_info = billing_req(request_url + account_id)["xxx"] return_info[""] = title_list return_info[""] = billing_req("...")["xxx"] return_info[""] = resource_type_list return return_info
def get_data(self): resource_type_list=( ) account_id=self.request.session.get("")[""] #account_id="5689sfshfhsdhiojfdsjofi" title_list=[{"":"","url":"//"}] request_url="" return_info=billing_req(request_url+account_id)["xxx"] return_info[""]=title_list return_info[""]=billing_req("...")["xxx"] return_info[""]=resource_type_list return return_info
def get_data(self): account_id=self.request.session.get("account")["account_id"] account_info={} for key,value in billing_req("///"+account_id)["account"].items(): if key =="" or key=="" or key=="": account_info[key]=string.atof(value) account_info[""]=account_info[""] if account_info[""]>0 else account_info[""]+account_info[""] account_info[""]=account_id title_list=[] return {"":account_info,'':account_info['']+account_info[''],"":title_list}
def insteadRecharge(request): ''' 近期消费记录 ''' recharge_data=json.loads(request.POST["recharge"]) request_url="" response=billing_req(request_url,data=json.dumps(recharge_data),method="POST") if response['success']=="success": return_data="success" else: return_data="fail" return HttpResponse(return_data)
def consumption_data(request): account_id=request.session.get("")[""] pageSize=int(request.GET['']) pageNo=int((float(request.GET[''])+1)/float(request.GET[''])+1) product_type=request.GET[''] region=request.GET[''] period=request.GET[''] request_url="" result = billing_req(request_url)[''] return_data={} return_data["rows"]=result.pop('consumptions') return_data["total"]=result.pop('total') return HttpResponse(json.dumps(return_data))
def giftRecharge(request,*args,**kwargs): ''' 近期消费记录 ''' account_id=kwargs["account_id"] recharge_data=json.loads(request.POST["recharge"]) request_url=""+account_id response=billing_req(request_url,data=json.dumps(recharge_data),method="POST") if response['success']=="success": return_data="success" else: return_data="fail" return HttpResponse(return_data)
def consumption_data(request): account_id = request.session.get("")[""] pageSize = int(request.GET['']) pageNo = int((float(request.GET['']) + 1) / float(request.GET['']) + 1) product_type = request.GET[''] region = request.GET[''] period = request.GET[''] request_url = "" result = billing_req(request_url)[''] return_data = {} return_data["rows"] = result.pop('consumptions') return_data["total"] = result.pop('total') return HttpResponse(json.dumps(return_data))
def cost_forecast(request): account_id=request.session.get("")[""] #account_id="5689sfshfhsdhiojfdsjofi" return_list=billing_req("///"+account_id)[""] return HttpResponse(json.dumps(return_list))