コード例 #1
0
def appget(request):
    print '收到App的Get请求'
    cusObj = request.GET["sign"]
    cusObjDic = requesthander.handjsontodict(cusObj)
    print(cusObjDic['lingda'])
    data = {'msg': 'Get成功_success'}
    return requesthander.handdictojson(data)
コード例 #2
0
def applogin(request):
    print '收到App登录请求'
    cusObj = request.POST["sign"]
    cusObjDic = requesthander.handjsontodict(cusObj)
    count = cusObjDic['parameters']['count']
    password = cusObjDic['parameters']['password']
    if count == 'zengjiangjun' and password == '168':
        data = {'msg': '登录成功_success'}
        return requesthander.handdictojson(data)
    else:
        print '登录失败'
        return ''
コード例 #3
0
def test(request):
    print '收到测试url'
    data = {'name': '我是三目童子', 'address': '太阳上面', 'money': '100000000'}
    return requesthander.handdictojson(data)
コード例 #4
0
def testtitle(request):
    print '收到测试url'
    title = request.GET["title"]
    data = {'title': title}
    return requesthander.handdictojson(data)
コード例 #5
0
def webget(request):
    print '收到web的get请求'
    cusObj = request.GET['sign']
    print(cusObj)
    data = {'msg': 'get请求成功_success'}
    return requesthander.handdictojson(data)
コード例 #6
0
def webpost(request):
    print '收到web的post请求'
    cusObj = request.POST['sign']
    print(cusObj)
    data = {'msg': 'post请求成功_success'}
    return requesthander.handdictojson(data)
コード例 #7
0
def webuploadpic(request):
    print "收到web传来的数据"
    requesthander.handuploadimage(request)
    data = {'msg': '上传照片成功_success'}
    return requesthander.handdictojson(data)
コード例 #8
0
def appuploadpic(request):
    print "收到App上传照片的请求"
    requesthander.handuploadimage(request)
    data = {'msg': '传照片成功_success'}
    return requesthander.handdictojson(data)