Esempio n. 1
0
def main(req):
    """
    <table>
        <tr>
            <td>本次招募</td><td><img src=''></td>
        </tr>
    </table>
    """
    """
    josn:
    [
        {"img":""},
        {"img":""}
    ]
    """
    resultList = indexService.getNextIndex()
    jsonList = []
    page = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><table><tr>'
    for person in resultList:
        jsonList.append(JsonUtil.object2Dict(person))
        if '招募' in person.img:
            page+='<td>本次招募</td>'
        else:
            page+='<td><img src='+person.img+'></td>'
    page+='</tr><tr>'
    for person in resultList:
        if '招募' in person.img:
            page+='<td>技能</td>'
        else:
            page+='<td>'+person.skill+'</td>'
    page+='</tr></table>'
    page+='</br>json:'+ json.dumps(jsonList).decode("unicode-escape") 
    return HttpResponse(page)
Esempio n. 2
0
def getScroe(req):
    resultList = scroeLineService.getScroe()
    jsonList = []
    for person in resultList:
        jsonList.append(JsonUtil.object2Dict(person))
    return HttpResponse(json.dumps(jsonList).decode("unicode-escape"))
Esempio n. 3
0
def getEventList(req):
    eventList = eventService.getEventList()
    jsonList = []
    for event in eventList:
        jsonList.append(JsonUtil.object2Dict(event))
    return HttpResponse(json.dumps(jsonList).decode("unicode-escape"))
Esempio n. 4
0
def getNextRecruit(req):
    resultList = indexService.getNextIndex()
    jsonList = []
    for person in resultList:
        jsonList.append(JsonUtil.object2Dict(person))
    return HttpResponse(json.dumps(jsonList).decode("unicode-escape"))