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
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
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
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
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
def drawtest(): tno = request.json.get('tno') jwac = request.json.get('jwac') jwac = retoken(jwac) result16 = draw(tno, jwac) return result16
def searchentry0(): entry = request.json.get('entry') jwac = request.json.get('jwac') jwac = retoken(jwac) result15 = searchentry(entry) return result15
def historytasktest(): jwac = request.json.get('jwac') jwac = retoken(jwac) result13 = historytask(jwac) return result13
def searchtasktest(): jwac = request.json.get('jwac') jwac = retoken(jwac) result11 = searchtask(jwac) return result11
def taskreceviedtest(): jwac = request.json.get('jwac') tno = request.json.get('tno') jwac = retoken(jwac) result11 = taskreceived(jwac, tno) return result11
def findtaskhistory(): jwac = request.json.get('jwac') jwac = retoken(jwac) result9 = taskhistory(jwac) return result9
def prepositiontest(): jwac = request.json.get('jwac') tno = request.json.get('tno') jwac = retoken(jwac) result6 = prepos(jwac, tno) return result6
def finddatatest(): jwac = request.json.get('jwaccount') jwac = retoken(jwac) text = finddata(jwac) return text