modified: amazon/__pycache__/approve.cpython-39.pyc

new file:   amazon/__pycache__/asin_status.cpython-39.pyc
	modified:   amazon/__pycache__/main.cpython-39.pyc
	modified:   amazon/__pycache__/match_action.cpython-39.pyc
	modified:   amazon/__pycache__/price_match.cpython-39.pyc
	modified:   amazon/approve.py
	modified:   amazon/asin_status.py
	modified:   amazon/main.py
	modified:   amazon/match_action.py
	modified:   amazon/price_match.py
	modified:   web_source/brand.html
	modified:   web_source/templates_backup/brand.html
This commit is contained in:
铭坤
2026-04-24 23:00:59 +08:00
parent 03e697f5d3
commit d272afae1c
12 changed files with 1632 additions and 1384 deletions

View File

@@ -14,126 +14,126 @@
height: 100vh;
font-weight: bold;
}
.top-bar {
min-height: 88px;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 20px;
padding: 10px 24px 12px;
border-bottom: 1px solid #2a2a2a;
}
.logo-area {
display: flex;
align-items: center;
gap: 16px;
min-width: 0;
padding-top: 10px;
}
.top-bar .app-name { font-size: 18px; font-weight: 600; color: #fff; }
.btn-home {
font-size: 13px;
color: #d2d2d2;
text-decoration: none;
white-space: nowrap;
}
.btn-home:hover { color: #fff; }
.nav-tabs {
flex: 1;
min-width: 0;
display: flex;
align-items: stretch;
justify-content: center;
}
.nav-tab-group {
display: flex;
align-items: stretch;
justify-content: center;
flex: 1;
gap: 0;
}
.nav-section {
flex: 1;
min-width: 0;
padding: 0 18px;
position: relative;
}
body.nav-permissions-loading .nav-section[data-column-key] {
display: none;
}
.nav-section + .nav-section::before {
content: '';
position: absolute;
left: 0;
top: 14px;
bottom: 8px;
width: 1px;
background: rgba(255, 255, 255, 0.14);
}
.nav-section-title {
margin-bottom: 10px;
text-align: center;
color: #e8dfcf;
font-size: 16px;
font-weight: 800;
letter-spacing: 0.08em;
}
.nav-section-items {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: center;
padding: 10px 14px;
border-radius: 14px;
background: linear-gradient(180deg, rgba(83, 74, 67, 0.92) 0%, rgba(72, 65, 59, 0.96) 100%);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-item {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 28px;
padding: 0 2px;
color: #f3eee4;
font-size: 14px;
font-weight: 700;
text-decoration: none;
border-bottom: 2px solid transparent;
transition: color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
background: transparent;
border-left: none;
border-right: none;
border-top: none;
cursor: pointer;
}
.nav-item:hover {
color: #fff;
border-bottom-color: rgba(255, 255, 255, 0.68);
}
.nav-item.active {
color: #fff;
border-bottom-color: #8dc4ff;
}
.nav-item.disabled {
color: rgba(255, 255, 255, 0.78);
opacity: 0.82;
cursor: default;
}
.top-right {
width: 60px;
flex-shrink: 0;
}
.top-bar {
min-height: 88px;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 20px;
padding: 10px 24px 12px;
border-bottom: 1px solid #2a2a2a;
}
.logo-area {
display: flex;
align-items: center;
gap: 16px;
min-width: 0;
padding-top: 10px;
}
.top-bar .app-name { font-size: 18px; font-weight: 600; color: #fff; }
.btn-home {
font-size: 13px;
color: #d2d2d2;
text-decoration: none;
white-space: nowrap;
}
.btn-home:hover { color: #fff; }
.nav-tabs {
flex: 1;
min-width: 0;
display: flex;
align-items: stretch;
justify-content: center;
}
.nav-tab-group {
display: flex;
align-items: stretch;
justify-content: center;
flex: 1;
gap: 0;
}
.nav-section {
flex: 1;
min-width: 0;
padding: 0 18px;
position: relative;
}
body.nav-permissions-loading .nav-section[data-column-key] {
display: none;
}
.nav-section + .nav-section::before {
content: '';
position: absolute;
left: 0;
top: 14px;
bottom: 8px;
width: 1px;
background: rgba(255, 255, 255, 0.14);
}
.nav-section-title {
margin-bottom: 10px;
text-align: center;
color: #e8dfcf;
font-size: 16px;
font-weight: 800;
letter-spacing: 0.08em;
}
.nav-section-items {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: center;
padding: 10px 14px;
border-radius: 14px;
background: linear-gradient(180deg, rgba(83, 74, 67, 0.92) 0%, rgba(72, 65, 59, 0.96) 100%);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-item {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 28px;
padding: 0 2px;
color: #f3eee4;
font-size: 14px;
font-weight: 700;
text-decoration: none;
border-bottom: 2px solid transparent;
transition: color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
background: transparent;
border-left: none;
border-right: none;
border-top: none;
cursor: pointer;
}
.nav-item:hover {
color: #fff;
border-bottom-color: rgba(255, 255, 255, 0.68);
}
.nav-item.active {
color: #fff;
border-bottom-color: #8dc4ff;
}
.nav-item.disabled {
color: rgba(255, 255, 255, 0.78);
opacity: 0.82;
cursor: default;
}
.top-right {
width: 60px;
flex-shrink: 0;
}
.main-content {
display: flex;
@@ -387,47 +387,47 @@
.toast.show { opacity: 1; }
</style>
</head>
<body data-user-id="{{ user_id or '' }}" class="nav-permissions-loading">
<body data-user-id="{{ user_id or '' }}" class="nav-permissions-loading">
<header class="top-bar">
<div class="logo-area">
<span class="app-name">数富AI-亚马逊</span>
<a href="/home" class="btn-home">返回首页</a>
</div>
<nav class="nav-tabs">
<div class="nav-tab-group">
<div class="nav-section" data-column-key="brand_front_tools">
<div class="nav-section-title">前端工具</div>
<div class="nav-section-items">
<span class="nav-item disabled">采集数据</span>
<span class="nav-item disabled">变体分析</span>
<button type="button" class="nav-item active" data-panel="brandCheck">品牌检测</button>
<a class="nav-item" href="/new_web_source/dedupe.html">数据去重</a>
<a class="nav-item" href="/new_web_source/split.html">数据拆分</a>
<a class="nav-item" href="/new_web_source/convert.html">格式转换</a>
</div>
</div>
<div class="nav-section" data-column-key="brand_operation_tools">
<div class="nav-section-title">运营工具</div>
<div class="nav-section-items">
<a class="nav-item" href="/new_web_source/delete-brand.html">删除ASIN</a>
<a class="nav-item" href="/new_web_source/product-risk.html">商品风险解决</a>
<a class="nav-item" href="/new_web_source/shop-match.html">定时匹配</a>
<a class="nav-item" href="/new_web_source/price-track.html">跟价</a>
<a class="nav-item" href="/new_web_source/patrol-delete.html">巡店删除</a>
<a class="nav-item" href="/new_web_source/query-asin.html">查询ASIN</a>
<span class="nav-item disabled">取款</span>
<span class="nav-item disabled">店铺状态查询</span>
</div>
</div>
<div class="nav-section" data-column-key="brand_logistics_tools">
<div class="nav-section-title">后勤工具</div>
<div class="nav-section-items">
<span class="nav-item disabled">采购</span>
<span class="nav-item disabled">ERP</span>
</div>
</div>
</div>
</nav>
<nav class="nav-tabs">
<div class="nav-tab-group">
<div class="nav-section" data-column-key="brand_front_tools">
<div class="nav-section-title">前端工具</div>
<div class="nav-section-items">
<span class="nav-item disabled">采集数据</span>
<span class="nav-item disabled">变体分析</span>
<button type="button" class="nav-item active" data-panel="brandCheck">品牌检测</button>
<a class="nav-item" href="/new_web_source/dedupe.html">数据去重</a>
<a class="nav-item" href="/new_web_source/split.html">数据拆分</a>
<a class="nav-item" href="/new_web_source/convert.html">格式转换</a>
</div>
</div>
<div class="nav-section" data-column-key="brand_operation_tools">
<div class="nav-section-title">运营工具</div>
<div class="nav-section-items">
<a class="nav-item" href="/new_web_source/delete-brand.html">删除ASIN</a>
<a class="nav-item" href="/new_web_source/product-risk.html">商品风险解决</a>
<a class="nav-item" href="/new_web_source/shop-match.html">定时匹配</a>
<a class="nav-item" href="/new_web_source/price-track.html">跟价</a>
<span class="nav-item disabled">巡店删除</span>
<a class="nav-item" href="/new_web_source/query-asin.html">查询ASIN</a>
<span class="nav-item disabled">取款</span>
<span class="nav-item disabled">店铺状态查询</span>
</div>
</div>
<div class="nav-section" data-column-key="brand_logistics_tools">
<div class="nav-section-title">后勤工具</div>
<div class="nav-section-items">
<span class="nav-item disabled">采购</span>
<span class="nav-item disabled">ERP</span>
</div>
</div>
</div>
</nav>
<div class="top-right"></div>
</header>
@@ -540,13 +540,13 @@
<script>
(function() {
var selectedPaths = [];
var cachedTasks = [];
var api = window.pywebview && window.pywebview.api;
function getAppPermissionCacheKey(uid) {
return 'app_column_permissions:' + String(uid || '');
}
var selectedPaths = [];
var cachedTasks = [];
var api = window.pywebview && window.pywebview.api;
function getAppPermissionCacheKey(uid) {
return 'app_column_permissions:' + String(uid || '');
}
function getUid() {
return localStorage.getItem('uid') || '';
@@ -559,80 +559,80 @@
}
// 顶部栏目切换:点击当前页菜单项时显示对应 data-panel 的 tab-panel
document.querySelectorAll('.nav-item[data-panel]').forEach(function(tab) {
tab.addEventListener('click', function() {
var panelId = this.getAttribute('data-panel');
document.querySelectorAll('.nav-item[data-panel]').forEach(function(tab) {
tab.addEventListener('click', function() {
var panelId = this.getAttribute('data-panel');
if (!panelId) return;
document.querySelectorAll('.nav-item[data-panel]').forEach(function(t) { t.classList.remove('active'); });
document.querySelectorAll('.tab-panel').forEach(function(p) {
p.classList.toggle('active', p.getAttribute('data-panel') === panelId);
});
this.classList.add('active');
});
});
(function applyNavSectionPermissions() {
function finishNavPermissionLoading() {
document.body.classList.remove('nav-permissions-loading');
}
function showAllNavSections() {
document.querySelectorAll('.nav-section[data-column-key]').forEach(function(section) {
section.style.display = '';
});
}
var uid = document.body.getAttribute('data-user-id');
if (!uid) {
showAllNavSections();
finishNavPermissionLoading();
return;
}
localStorage.setItem('uid', uid);
var cacheKey = getAppPermissionCacheKey(uid);
try {
var cachedItems = JSON.parse(localStorage.getItem(cacheKey) || 'null');
if (Array.isArray(cachedItems)) {
showAllNavSections();
var cachedKeys = cachedItems.map(function(item) {
return (item.column_key || '').toLowerCase();
});
document.querySelectorAll('.nav-section[data-column-key]').forEach(function(section) {
var key = (section.getAttribute('data-column-key') || '').toLowerCase();
section.style.display = cachedKeys.indexOf(key) >= 0 ? '' : 'none';
});
finishNavPermissionLoading();
return;
}
} catch (e) {}
fetch('/api/admin/user/' + uid + '/column-permissions?menu_type=app', { credentials: 'same-origin' })
.then(function(r) { return r.json(); })
.then(function(res) {
showAllNavSections();
if (!res || !res.success || !Array.isArray(res.items)) {
finishNavPermissionLoading();
return;
}
try {
localStorage.setItem(cacheKey, JSON.stringify(res.items));
} catch (e) {}
var allowedKeys = res.items.map(function(item) {
return (item.column_key || '').toLowerCase();
});
document.querySelectorAll('.nav-section[data-column-key]').forEach(function(section) {
var key = (section.getAttribute('data-column-key') || '').toLowerCase();
section.style.display = allowedKeys.indexOf(key) >= 0 ? '' : 'none';
});
finishNavPermissionLoading();
})
.catch(function() {
showAllNavSections();
finishNavPermissionLoading();
});
})();
function showToast(msg) {
var el = document.getElementById('toast');
this.classList.add('active');
});
});
(function applyNavSectionPermissions() {
function finishNavPermissionLoading() {
document.body.classList.remove('nav-permissions-loading');
}
function showAllNavSections() {
document.querySelectorAll('.nav-section[data-column-key]').forEach(function(section) {
section.style.display = '';
});
}
var uid = document.body.getAttribute('data-user-id');
if (!uid) {
showAllNavSections();
finishNavPermissionLoading();
return;
}
localStorage.setItem('uid', uid);
var cacheKey = getAppPermissionCacheKey(uid);
try {
var cachedItems = JSON.parse(localStorage.getItem(cacheKey) || 'null');
if (Array.isArray(cachedItems)) {
showAllNavSections();
var cachedKeys = cachedItems.map(function(item) {
return (item.column_key || '').toLowerCase();
});
document.querySelectorAll('.nav-section[data-column-key]').forEach(function(section) {
var key = (section.getAttribute('data-column-key') || '').toLowerCase();
section.style.display = cachedKeys.indexOf(key) >= 0 ? '' : 'none';
});
finishNavPermissionLoading();
return;
}
} catch (e) {}
fetch('/api/admin/user/' + uid + '/column-permissions?menu_type=app', { credentials: 'same-origin' })
.then(function(r) { return r.json(); })
.then(function(res) {
showAllNavSections();
if (!res || !res.success || !Array.isArray(res.items)) {
finishNavPermissionLoading();
return;
}
try {
localStorage.setItem(cacheKey, JSON.stringify(res.items));
} catch (e) {}
var allowedKeys = res.items.map(function(item) {
return (item.column_key || '').toLowerCase();
});
document.querySelectorAll('.nav-section[data-column-key]').forEach(function(section) {
var key = (section.getAttribute('data-column-key') || '').toLowerCase();
section.style.display = allowedKeys.indexOf(key) >= 0 ? '' : 'none';
});
finishNavPermissionLoading();
})
.catch(function() {
showAllNavSections();
finishNavPermissionLoading();
});
})();
function showToast(msg) {
var el = document.getElementById('toast');
el.textContent = msg;
el.classList.add('show');
setTimeout(function() { el.classList.remove('show'); }, 2500);

File diff suppressed because it is too large Load Diff