예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
 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}
예제 #4
0
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)
예제 #5
0
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))
예제 #6
0
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)
예제 #7
0
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))
예제 #8
0
def cost_forecast(request):
    account_id=request.session.get("")[""]
    #account_id="5689sfshfhsdhiojfdsjofi"
    return_list=billing_req("///"+account_id)[""]
    return HttpResponse(json.dumps(return_list))