From 35e6a1acca43839d528b33b706b68c735063a271 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 26 Oct 2025 13:40:11 +0800 Subject: [PATCH] bugfix --- wwwroot/newest/channel_show.ui | 63 ++++++++++++++++++++++++++++++++++ wwwroot/newest/index.ui | 49 +++----------------------- 2 files changed, 68 insertions(+), 44 deletions(-) create mode 100644 wwwroot/newest/channel_show.ui diff --git a/wwwroot/newest/channel_show.ui b/wwwroot/newest/channel_show.ui new file mode 100644 index 0000000..60f7d1a --- /dev/null +++ b/wwwroot/newest/channel_show.ui @@ -0,0 +1,63 @@ +{% set c = get_channel_by_id(params_kw.id) %} +{% if c %} +{ + "widgettype":"HBox", + "options":{ +{% if int(params_kw._is_mobile) == 1 %} + "width": "49.5%" +{% else %} + "cwidth":22, +{% endif %} + "cheight":5 + }, + "subwidgets":[ + { + "widgettype":"Image", + "options":{ + "cwidth":1.5, + "cheight":1.5, + "url":"${logo_url}", + "default_url":"/imgs/tv.png" + } + }, + { + "widgettype":"Text", + "options":{ + "text":"${tv_name}", + "wrap": true, + "halign":"left" + } + } + ], + "binds":[ + { + "wid":"self", + "event":"click", + "actiontype":"urlwidget", + "target":"PopupWindow", + "popup_options":{ + "width":"80%", + "height":"80%", + "title":"${tv_name}" + }, + "options":{ + "params":{ + "tv_name": "${tv_name}", + "url":"${url}", + "id":"${id}" + }, + "method": "POST", + "url":"/play.ui" + } + } + ] +} +{% else %} +{ + "widgettype": "Text", + "options":{ + "i18n":true, + "otext": "channel not exists" + } +} +{% endif %} diff --git a/wwwroot/newest/index.ui b/wwwroot/newest/index.ui index 14201a1..48ff210 100644 --- a/wwwroot/newest/index.ui +++ b/wwwroot/newest/index.ui @@ -10,52 +10,13 @@ "data_method":"POST", "col_cwidth":22, "record_view":{ - "widgettype":"HBox", + "widgettype": "urlwidget", "options":{ - "cwidth":22, - "cheight":5 - }, - "subwidgets":[ - { - "widgettype":"Image", - "options":{ - "cwidth":1.5, - "cheight":1.5, - "url":"${logo_url}", - "default_url":"/imgs/tv.png" - } - }, - { - "widgettype":"Title6", - "options":{ - "text":"${tv_name}", - "wrap": true, - "halign":"left" - } + "url": "{{entire_url('channel_show.ui')}}", + "params": { + "id": "${id}" } - ], - "binds":[ - { - "wid":"self", - "event":"click", - "actiontype":"urlwidget", - "target":"PopupWindow", - "popup_options":{ - "width":"80%", - "height":"80%", - "title":"${tv_name}" - }, - "options":{ - "params":{ - "tv_name": "${tv_name}", - "url":"${url}", - "id":"${id}" - }, - "method": "POST", - "url":"/play.ui" - } - } - ] + } } } }