import json

import requests


# url = 'http://test.dvema.com'
base_url = 'http://test.dvema.com/'
username='13800138001'
password='ansjer999999'
login_url = base_url + 'account/login'

data = {
    'userName': username,
    'userPwd': password
}
res = requests.post(url=login_url, data=data)
res = res.json()
print(res)

if res['result_code'] == 0:
    statistics_url = base_url + 'statistcs/pushMonth'
    data = {
        'token': res['result']['access_token']
    }
    res = requests.post(url=statistics_url, data=data)
    print(res.json())

