提交暂存

This commit is contained in:
super
2026-04-28 16:57:05 +08:00
parent e316adca1f
commit 8711b205cf
8 changed files with 35 additions and 29 deletions

View File

@@ -13,8 +13,9 @@ client_name=ShuFuAI
# java_api_base=http://47.111.163.154:18080 # java_api_base=http://47.111.163.154:18080
java_api_base=http://127.0.0.1:18080 java_api_base=http://127.0.0.1:18080
# java_api_base=http://8.136.19.173:18080 # java_api_base=http://8.136.19.173:18080
# java_api_base=http://121.196.149.225:18080 # java_api_base=http://121.196.149.225:18080
debug=true

View File

@@ -1332,30 +1332,35 @@ class PriceTask:
url = f"{DELETE_BRAND_API_BASE}/api/price-track/tasks/{task_id}/result" url = f"{DELETE_BRAND_API_BASE}/api/price-track/tasks/{task_id}/result"
country_aliases = {name: code for code, name in self.country_info.items()}
country_key = country_aliases.get(str(country_code).strip(), str(country_code).strip())
countries = {}
if asin or status:
countries[country_key] = [
{
"shopMallName": shopMallName,
"asin": asin,
"price": status.get("currentPrice") if status.get("currentPrice") else "",
"recommendedPrice": status.get("recommendedPrice") if status.get("recommendedPrice") else "",
"minimumPrice": status.get("minimumPrice") if status.get("minimumPrice") else "",
"firstPlace": status.get("firstPlace") if status.get("firstPlace") else "",
"secondPlace": status.get("secondPlace") if status.get("secondPlace") else "",
"cartShopName": status.get("cartShopName") if status.get("cartShopName") else "",
"priceChangeStatus": "UPDATED",
"deleteSkipAsin": status.get("deleteSkipAsin", False),
"removeAsin": status.get("removeAsin") if status.get("removeAsin") else "",
# "modifyCount": "2",
"shippingFee": status.get("shippingFee") if status.get("shippingFee") else "",
"status": status.get("statu")
}
]
payload = { payload = {
"shops": [ "shops": [
{ {
"shopName": shop_name, "shopName": shop_name,
"countries": { "countries": countries,
"additionalProperties1": [
{
"shopMallName": shopMallName,
"asin": asin,
"price": status.get("currentPrice") if status.get("currentPrice") else "",
"recommendedPrice": status.get("recommendedPrice") if status.get("recommendedPrice") else "",
"minimumPrice": status.get("minimumPrice") if status.get("minimumPrice") else "",
"firstPlace": status.get("firstPlace") if status.get("firstPlace") else "",
"secondPlace": status.get("secondPlace") if status.get("secondPlace") else "",
"cartShopName": status.get("cartShopName") if status.get("cartShopName") else "",
"priceChangeStatus": "UPDATED",
"deleteSkipAsin": status.get("deleteSkipAsin",False),
"removeAsin": status.get("removeAsin") if status.get("removeAsin") else "",
# "modifyCount": "2",
"shippingFee" : status.get("shippingFee") if status.get("shippingFee") else "",
"status": status.get("statu")
}
]
},
"error": "" "error": ""
} }
] ]
@@ -1442,4 +1447,4 @@ if __name__ == '__main__':
front_end_data, current_Price, current_shop_name, front_end_data, current_Price, current_shop_name,
recommended_price, recommended_shipping recommended_price, recommended_shipping
) )
print(res) print(res)

View File

@@ -51,7 +51,7 @@ os.environ['OSS_ACCESS_KEY_SECRET'] = accessKeySecret
os.environ['SECRET_KEY'] = "ddffc7c1d02121d9554d7b080b2511b6" os.environ['SECRET_KEY'] = "ddffc7c1d02121d9554d7b080b2511b6"
debug = False debug = os.getenv("debug", "false").strip().lower() in ("1", "true", "yes", "on")
version = "1.0.56" version = "1.0.56"
APP_UPDATE_URL = f"{_base_url}/api/version/latest" # 检测更新接口地址,返回 { "file_url": "...", "version": "x.x.x" } APP_UPDATE_URL = f"{_base_url}/api/version/latest" # 检测更新接口地址,返回 { "file_url": "...", "version": "x.x.x" }
os.environ['APP_VERSION'] = version os.environ['APP_VERSION'] = version

View File

@@ -50,8 +50,8 @@ class WindowAPI:
def __init__(self, window): def __init__(self, window):
self._window = window self._window = window
self._is_maximized = False self._is_maximized = False
window.events.maximized += lambda _: setattr(self, '_is_maximized', True) window.events.maximized += lambda *args: setattr(self, '_is_maximized', True)
window.events.restored += lambda _: setattr(self, '_is_maximized', False) window.events.restored += lambda *args: setattr(self, '_is_maximized', False)
def close(self): def close(self):
"""关闭窗口,异步执行清理逻辑""" """关闭窗口,异步执行清理逻辑"""