Beispiel #1
0
def editorData():
    # 获取图片文件 name = upload
    img = request.files.get('upload')
    jwac = request.form.get('jwac')
    type = request.form.get('type')
    jwac = retoken(jwac)
    # 定义一个图片存放的位置 存放在static下面

    path = sys.path[0] + '/img/'

    # 图片名称

    imgName0 = img.filename
    #print(imgName)
    num = 15
    tt = ''.join(random.sample(string.ascii_letters + string.digits,
                               num))  #随机生成15位
    imgName = tt + imgName0
    # 图片path和名称组成图片的保存路径
    imgName = imgName.replace(' ', '')  # 取出所有空格
    file_path = path + imgName

    # 保存图片

    img.save(file_path)

    # url是图片的路径

    url = 'missionhelp.club:8080/images/' + imgName
    result14 = upload_img(url, jwac, type)
    return result14
Beispiel #2
0
def passwd():
    jwac = request.json.get('jwac')
    passwd = request.json.get('passwd')
    newpasswd = request.json.get('newpasswd')
    jwac = retoken(jwac)
    result17 = revisepasswd(jwac, passwd, newpasswd)
    return result17
Beispiel #3
0
def managetasktest():
    jwac = request.json.get('jwac')
    tno = request.json.get('tno')
    type = request.json.get('type')
    jwac = retoken(jwac)
    result12 = managetask(jwac, tno, type)
    return result12
Beispiel #4
0
def datatest():
    accountname = request.json.get('accountname')
    room = request.json.get('room')
    qq = request.json.get('qq')
    weixin = request.json.get('weixin')
    tele = request.json.get('tele')
    jwac = request.json.get('jwac')
    jwac = retoken(jwac)
    result3 = redata(accountname, room, qq, weixin, tele, jwac)
    return result3
Beispiel #5
0
def puttasktest():
    jwac = request.json.get('jwac')
    tno = request.json.get('tno')  #创建或查找tno默认为空
    title = request.json.get('title')
    label = request.json.get('label')
    content = request.json.get('content')
    method = str(request.json.get('method'))
    cost = request.json.get('cost')
    num = request.json.get('num')
    date = request.json.get('date')
    flag = request.json.get('flag')
    jwac = retoken(jwac)
    result4 = puttask(jwac, tno, title, label, content, method, cost, num,
                      date, flag)
    return result4
Beispiel #6
0
def drawtest():
    tno = request.json.get('tno')
    jwac = request.json.get('jwac')
    jwac = retoken(jwac)
    result16 = draw(tno, jwac)
    return result16
Beispiel #7
0
def searchentry0():
    entry = request.json.get('entry')
    jwac = request.json.get('jwac')
    jwac = retoken(jwac)
    result15 = searchentry(entry)
    return result15
Beispiel #8
0
def historytasktest():
    jwac = request.json.get('jwac')
    jwac = retoken(jwac)
    result13 = historytask(jwac)
    return result13
Beispiel #9
0
def searchtasktest():
    jwac = request.json.get('jwac')
    jwac = retoken(jwac)
    result11 = searchtask(jwac)
    return result11
Beispiel #10
0
def taskreceviedtest():
    jwac = request.json.get('jwac')
    tno = request.json.get('tno')
    jwac = retoken(jwac)
    result11 = taskreceived(jwac, tno)
    return result11
Beispiel #11
0
def findtaskhistory():
    jwac = request.json.get('jwac')
    jwac = retoken(jwac)
    result9 = taskhistory(jwac)
    return result9
Beispiel #12
0
def prepositiontest():
    jwac = request.json.get('jwac')
    tno = request.json.get('tno')
    jwac = retoken(jwac)
    result6 = prepos(jwac, tno)
    return result6
Beispiel #13
0
def finddatatest():
    jwac = request.json.get('jwaccount')
    jwac = retoken(jwac)
    text = finddata(jwac)
    return text