Refactor billing options retrieval to include data permissions and add effective date handling for product imports
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ref } from 'vue'
|
||||
import { listProduct } from '@/api/price/product'
|
||||
import { listProductOptions } from '@/api/price/product'
|
||||
|
||||
/**
|
||||
* 产品列表模块级共享缓存:全应用只拉取一次
|
||||
@@ -37,9 +37,9 @@ export function useProducts() {
|
||||
function ensureProducts(force = false) {
|
||||
if (!force && loadingPromise) return loadingPromise
|
||||
if (!force && productList.value.length) return Promise.resolve(productList.value)
|
||||
loadingPromise = listProduct({ pageNum: 1, pageSize: 1000 })
|
||||
loadingPromise = listProductOptions({})
|
||||
.then(res => {
|
||||
productList.value = res.rows || []
|
||||
productList.value = res.data || []
|
||||
return productList.value
|
||||
})
|
||||
.finally(() => {
|
||||
|
||||
Reference in New Issue
Block a user