f
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user