文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 749c922e by wyy

获取文本内容bug修改

parent 7c722993
......@@ -190,7 +190,10 @@ def getFileContent():
return json.dumps(return_dict, ensure_ascii=False)
url = result.get('textUrl')
fileStr = open(os.path.join(basedir, UPLOAD_FOLDER, url), 'r', encoding='UTF-8').read()
try:
fileStr = open(os.path.join(basedir, UPLOAD_FOLDER, url), 'r', encoding='UTF-8').read()
except Exception as e:
fileStr = open(os.path.join(basedir, UPLOAD_FOLDER, url), 'r', encoding='cp936').read()
# 后端传给前端 return_dict = {'return_code': '200', 'return_info': '处理成功', 'result': fileStr}
return_dict['result'] = fileStr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment