|
|
@@ -173,7 +173,7 @@
|
|
|
<svg class="arr"><use href="#i-right"/></svg>
|
|
|
</div>
|
|
|
<div
|
|
|
- v-if="[44584,45488].includes(useUserInfoStore.userInfo.brand_company_id)"
|
|
|
+ v-if="isLiningCompany"
|
|
|
class="trow"
|
|
|
@click="handleWhiteBgUploadClick"
|
|
|
v-log="{ describe: { action: '点击白底图批量上传', service: '白底图批量上传' } }"
|
|
|
@@ -450,6 +450,33 @@ const launchExternalTool = async (pagePath: string, successMessage: string) => {
|
|
|
|
|
|
const handleWhiteBgExportClick = () => launchExternalTool('/copy_800_tool', '白底图批量导出工具已启动')
|
|
|
const handleWhiteBgUploadClick = () => launchExternalTool('/upload_800_tool', '白底图批量上传工具已启动')
|
|
|
+
|
|
|
+// 李宁企业名单来自 /api/auth/user 的 lining_company_ids,命中则走白底图批量上传
|
|
|
+const isLiningCompany = computed(() => {
|
|
|
+ const info = useUserInfoStore.userInfo as any
|
|
|
+ const brandId = info?.brand_company_id
|
|
|
+ const rawIds = info?.lining_company_ids
|
|
|
+ if (brandId == null || rawIds == null || rawIds === '') return false
|
|
|
+
|
|
|
+ let ids: unknown[] = []
|
|
|
+ if (Array.isArray(rawIds)) {
|
|
|
+ ids = rawIds
|
|
|
+ } else if (typeof rawIds === 'string') {
|
|
|
+ const text = rawIds.trim()
|
|
|
+ if (!text) return false
|
|
|
+ if (text.startsWith('[')) {
|
|
|
+ try {
|
|
|
+ const parsed = JSON.parse(text)
|
|
|
+ ids = Array.isArray(parsed) ? parsed : []
|
|
|
+ } catch {
|
|
|
+ ids = text.split(',')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ids = text.split(',')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ids.some((id) => String(id).trim() === String(brandId))
|
|
|
+})
|
|
|
const handleProductAlbumClick = () => launchExternalTool('/product_list', '产品图册生成工具已启动')
|
|
|
|
|
|
// 货号选择弹窗相关状态
|