From 7ffc2a903466fedcc4ac8875cac0eedce0e5adbf Mon Sep 17 00:00:00 2001 From: pengyuthon Date: Mon, 19 Jan 2026 14:12:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=91=8A=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_notice/controllers/main.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/yuthon_notice/controllers/main.py b/yuthon_notice/controllers/main.py index f51d54d85..8862ab958 100644 --- a/yuthon_notice/controllers/main.py +++ b/yuthon_notice/controllers/main.py @@ -11,7 +11,6 @@ class YuthonNotice(http.Controller): @http.route('/yuthon/yuthon/notice', methods=['POST'], type='http', auth='none', csrf=False) def index(self, **kwargs): id = kwargs.get('id') - data = request.env['yuthon.notice'].sudo().search([("id", "=", int(id))]) documents = [] for document in data.documents_ids: @@ -31,10 +30,18 @@ class YuthonNotice(http.Controller): 'title': data.name, 'code': data.code, 'create_date1': fields.Date.to_string(data.create_date1), - 'notice_text': data.notice_text, + 'notice_text': data.notice_text1, 'documents':documents, 'user_name':data.users_id.name, 'read_number': data.read_number, + 'file_list': [{ + 'file_url': 'https://view.officeapps.live.com/op/view.aspx?src=https%3A//oa.thtzjt.com/web/content/office_preview/13672', + 'file_name': 'excel', + }, + { + 'file_url': 'https://oa.thtzjt.com/web/content/preview/13673', + 'file_name': 'pdf', + }] } return json.dumps({ 'data':result,