diff --git a/core/cless_jx3.py b/core/cless_jx3.py index 2c4dfbb..d502427 100644 --- a/core/cless_jx3.py +++ b/core/cless_jx3.py @@ -253,7 +253,6 @@ class JX3Function: return_data["code"] = 200 return return_data - async def wujia(self,Name: str = "秃盒"): return_data = { "code": 0, diff --git a/templates/temp_test.html b/templates/temp_test.html index e69de29..9292365 100644 --- a/templates/temp_test.html +++ b/templates/temp_test.html @@ -0,0 +1,212 @@ + + + + + 剑网3交易行价格查询 + + + +
+ +
+

剑网3交易行价格查询

+
服务器: {{ server }}
+
+ + +
+
共找到 {{ items|length }} 件物品
+
数据更新时间: {{ update_time }}
+
+ + +
+ + + + + + + + + + + {% for item in items %} + + + + + + + {% endfor %} + +
物品名称低价数量数据更新时间
+ icon + {{ item.Name }} + {{ item.AvgPrice }}{{ item.SampleSize }}{{ item.Date }}
+
+ + +
+

金价走势(wbl 数据)

+ + {% set width = 1100 %} + {% set height = 360 %} + {% set margin = 40 %} + {% set inner_w = width - margin*2 %} + {% set inner_h = height - margin*2 %} + + {% if not wbl_dates or not wbl_prices %} +
无 wbl 数据可显示
+ {% else %} + {% set n = wbl_prices | length %} + {% set min_price = wbl_min if wbl_min is defined else (wbl_prices | min) %} + {% set max_price = wbl_max if wbl_max is defined else (wbl_prices | max) %} + {% if min_price == max_price %} + {% set min_price = min_price - 1 %} + {% set max_price = max_price + 1 %} + {% endif %} + + {% set points = [] %} + {% for i in range(n) %} + {% set x = margin + (inner_w * i) / (n - 1 if n>1 else 1) %} + {% set norm = (wbl_prices[i] - min_price) / (max_price - min_price) %} + {% set y = margin + (inner_h * (1 - norm)) %} + {% set _ = points.append("%0.2f,%0.2f" % (x, y)) %} + {% endfor %} + + + + + + + {% set grid_lines = 5 %} + {% for gi in range(grid_lines) %} + {% set gy = margin + (inner_h * gi) / (grid_lines - 1 if grid_lines>1 else 1) %} + + {% set price_label = max_price - ( (max_price - min_price) * gi / (grid_lines - 1 if grid_lines>1 else 1) ) %} + {{ "%0.0f"|format(price_label) }} + {% endfor %} + + + {% set label_step = (n // 8) if n > 8 else 1 %} + {% for i in range(n) %} + {% set x = margin + (inner_w * i) / (n - 1 if n>1 else 1) %} + {% if i % label_step == 0 or i == n-1 %} + + {{ wbl_dates[i] }} + + {% endif %} + {% endfor %} + + + + + + + + + + + + + + + + + {% for p in points %} + {% set coords = p.split(',') %} + + {% endfor %} + + {% endif %} +
+ + + + +
+ +