完善动态API变量 #97

Open
opened 2025-05-20 17:33:36 +08:00 by liangyuanpeng · 1 comment

目前 STS__CONDITION_RENDER://smartoilets.net/openapi/api/wc/info/wcStatus?siteName={{siteName}}%26wcName={{wcName}}%26roomType={{roomType}}:data.isRepair:true 这样的做法已经满足不了需求了,需要更灵活的方式。

SVG 内添加一个 <smt></properties></smt> 标签

<smt>
 <properties>
    <smtval key="isRepair" value="/wc/info/wcStatus?siteName={{siteName}}%26wcName={{wcName}}%26roomType={{roomType}}:data.isRepair" />
  </properties>
</smt>

<div render="smtval:isRepair==true" />
目前 `STS__CONDITION_RENDER://smartoilets.net/openapi/api/wc/info/wcStatus?siteName={{siteName}}%26wcName={{wcName}}%26roomType={{roomType}}:data.isRepair:true` 这样的做法已经满足不了需求了,需要更灵活的方式。 SVG 内添加一个 `<smt></properties></smt>` 标签 ```html <smt> <properties> <smtval key="isRepair" value="/wc/info/wcStatus?siteName={{siteName}}%26wcName={{wcName}}%26roomType={{roomType}}:data.isRepair" /> </properties> </smt> <div render="smtval:isRepair==true" /> ```
liangyuanpeng added the
page/simplepage
label 2025-06-13 14:13:20 +08:00
Author
Owner

https://smartoilets.net/simplepage/KWH/GF

或者是这样的格式:

<smt>
 <properties>
    <wcstatus>/wc/info/wcStatus?siteName={{siteName}}%26wcName={{wcName}}%26roomType={{roomType}}:data.status" </wcstatus>
    <hk_news_url>https://smartoilets.net/weather/rthk/news/rss/c_expressnews_clocal.xml</hk_news_url>  
    <hk_news_refresh_duration>30m</hk_news_refresh_duration>
  </properties>
</smt>

<div render="smtval:wcstatus==true" />

hk_news_url: 香港新闻RSS地址
hk_news_refresh_duration: 香港新闻RSS 定时更新间隔

https://smartoilets.net/simplepage/KWH/GF 或者是这样的格式: ```xml <smt> <properties> <wcstatus>/wc/info/wcStatus?siteName={{siteName}}%26wcName={{wcName}}%26roomType={{roomType}}:data.status" </wcstatus> <hk_news_url>https://smartoilets.net/weather/rthk/news/rss/c_expressnews_clocal.xml</hk_news_url> <hk_news_refresh_duration>30m</hk_news_refresh_duration> </properties> </smt> <div render="smtval:wcstatus==true" /> ``` hk_news_url: 香港新闻RSS地址 hk_news_refresh_duration: 香港新闻RSS 定时更新间隔
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: smartoilets-front/projects#97
No description provided.