This commit is contained in:
2026-04-23 14:57:35 +08:00
parent c77780fa0e
commit 739e08157b
97 changed files with 6120 additions and 14939 deletions

View File

@@ -84,9 +84,13 @@ function selectProductType(reportTypeValue) {
}
function onConfirmType(e) {
const nextValue = e?.value?.[0] ?? e?.selectedOptions?.[0]?.value
if (nextValue)
selectProductType(nextValue)
// 单列 wd-picker 的 e.value 为标量;多列时为数组。不能用 e.value[0] 取标量,否则字符串会变成首字符。
const raw = e?.value
const nextValue = Array.isArray(raw) ? raw[0] : raw
const fromItem = e?.selectedItems
const resolved = nextValue ?? (Array.isArray(fromItem) ? fromItem[0]?.value : fromItem?.value)
if (resolved != null && resolved !== '')
selectProductType(resolved)
}
function onPriceChange(price) {
@@ -108,7 +112,7 @@ function openPricePicker() {
async function getPromoteConfig() {
loadingConfig.value = true
try {
const { data, error } = await useApiFetch('/agent/product_config').get().json()
const { data, error } = await useApiFetch('/agent/product_config', { silent: true }).get().json()
if (data.value && !error.value && data.value.code === 200) {
const list = data.value.data.AgentProductConfig || []
productConfig.value = list