补充数据库数据,修改分类栏内容
This commit is contained in:
@@ -201,6 +201,15 @@ const currentCategoryDesc = ref('')
|
||||
// 页面参数
|
||||
const pageParams = ref<any>({})
|
||||
|
||||
function normalizeSelectedMedicalCategoryId(categoryId: string): string {
|
||||
if (categoryId == 'device') return 'med_device'
|
||||
if (categoryId == 'external') return 'home_care_daily'
|
||||
if (categoryId == 'cold') return 'otc_medicine'
|
||||
if (categoryId == 'medicine') return 'otc_medicine'
|
||||
if (categoryId == 'care') return 'home_care_daily'
|
||||
return categoryId
|
||||
}
|
||||
|
||||
function getProductCover(product: Product): string {
|
||||
if (product.main_image_url != null && product.main_image_url !== '') return product.main_image_url
|
||||
if (product.images != null && product.images.length > 0 && product.images[0] !== '') return product.images[0]
|
||||
@@ -272,7 +281,7 @@ async function loadProducts(): Promise<void> {
|
||||
loading.value = true
|
||||
try {
|
||||
console.log('开始加载商品,分类ID:', activePrimary.value, '页码:', currentPage.value)
|
||||
const response = await supabaseService.getProductsByCategory(activePrimary.value, currentPage.value)
|
||||
const response = await supabaseService.getMedicalMallProductsByCategory(activePrimary.value, currentPage.value, 20)
|
||||
console.log('商品加载结果:', {
|
||||
dataCount: response.data.length,
|
||||
total: response.total,
|
||||
@@ -324,7 +333,7 @@ async function loadProducts(): Promise<void> {
|
||||
async function loadSubCategories(parentId: string): Promise<void> {
|
||||
console.log('加载二级分类,父级ID:', parentId)
|
||||
try {
|
||||
const subCats = await supabaseService.getSubCategories(parentId)
|
||||
const subCats = await supabaseService.getMedicalMallSubCategories(parentId)
|
||||
console.log('获取到二级分类数量:', subCats.length)
|
||||
|
||||
const categories: LocalCategory[] = []
|
||||
@@ -379,9 +388,10 @@ async function selectSubCategory(subCategoryId: string): Promise<void> {
|
||||
// originalCategoryId: 可能是一级分类ID,也可能是二级分类ID
|
||||
async function selectPrimaryCategory(originalCategoryId: string): Promise<void> {
|
||||
console.log('=== selectPrimaryCategory函数开始执行 ===')
|
||||
console.log('传入的categoryId:', originalCategoryId)
|
||||
const normalizedCategoryId = normalizeSelectedMedicalCategoryId(originalCategoryId)
|
||||
console.log('传入的categoryId:', originalCategoryId, '归一化后:', normalizedCategoryId)
|
||||
|
||||
if (originalCategoryId == '') {
|
||||
if (normalizedCategoryId == '') {
|
||||
console.error('categoryId为空,尝试使用第一个分类')
|
||||
if (primaryCategories.value.length > 0) {
|
||||
originalCategoryId = primaryCategories.value[0].id
|
||||
@@ -397,8 +407,9 @@ async function selectPrimaryCategory(originalCategoryId: string): Promise<void>
|
||||
console.log('当前一级分类列表长度:', primaryCategories.value.length)
|
||||
let foundInPrimary: LocalCategory | null = null
|
||||
for (let i = 0; i < primaryCategories.value.length; i++) {
|
||||
if (primaryCategories.value[i].id == originalCategoryId) {
|
||||
if (primaryCategories.value[i].id == normalizedCategoryId) {
|
||||
foundInPrimary = primaryCategories.value[i]
|
||||
targetParentId = normalizedCategoryId
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -410,7 +421,7 @@ async function selectPrimaryCategory(originalCategoryId: string): Promise<void>
|
||||
|
||||
// 从服务器获取分类信息以确定父级
|
||||
try {
|
||||
const categoryInfo = await supabaseService.getCategoryById(originalCategoryId)
|
||||
const categoryInfo = await supabaseService.getMedicalMallCategoryById(normalizedCategoryId)
|
||||
if (categoryInfo != null && categoryInfo.parent_id != null && categoryInfo.parent_id != '') {
|
||||
console.log('找到父级分类ID:', categoryInfo.parent_id)
|
||||
|
||||
@@ -427,7 +438,7 @@ async function selectPrimaryCategory(originalCategoryId: string): Promise<void>
|
||||
if (parentInPrimary != null) {
|
||||
console.log('父级分类在列表中找到:', parentInPrimary.name)
|
||||
targetParentId = categoryInfo.parent_id!
|
||||
targetSubId = originalCategoryId // 记住要选中的二级分类
|
||||
targetSubId = normalizedCategoryId // 记住要选中的二级分类
|
||||
} else {
|
||||
console.log('父级分类不在列表中,使用第一个分类')
|
||||
// 打印当前列表中的所有分类ID
|
||||
@@ -530,21 +541,13 @@ async function selectPrimaryCategory(originalCategoryId: string): Promise<void>
|
||||
|
||||
async function loadCategories(): Promise<void> {
|
||||
try {
|
||||
// 只获取一级分类(parent_id 为 null 的分类)
|
||||
const categoriesData = await supabaseService.getParentCategories()
|
||||
const categoriesData = await supabaseService.getMedicalMallParentCategories()
|
||||
console.log('加载一级分类数据成功,数量:', categoriesData.length)
|
||||
|
||||
// 映射数据并添加默认颜色,防止选中时背景透明导致文字看不清
|
||||
// 过滤掉医药健康相关分类
|
||||
const categories: LocalCategory[] = []
|
||||
for (let i = 0; i < categoriesData.length; i++) {
|
||||
const cat = categoriesData[i]
|
||||
const name = cat.name
|
||||
console.log('一级分类:', cat.id, name)
|
||||
if (name.includes('医药') || name.includes('健康')) {
|
||||
console.log('过滤掉分类:', name)
|
||||
continue
|
||||
}
|
||||
console.log('一级分类:', cat.id, cat.name)
|
||||
categories.push({
|
||||
id: cat.id,
|
||||
name: cat.name,
|
||||
@@ -572,16 +575,16 @@ async function loadCategories(): Promise<void> {
|
||||
// 检查是否有预设的分类ID
|
||||
if (activePrimary.value != '') {
|
||||
console.log('有预设的分类ID:', activePrimary.value)
|
||||
const target = categories.find((c: LocalCategory): boolean => c.id == activePrimary.value)
|
||||
const normalizedCategoryId = normalizeSelectedMedicalCategoryId(activePrimary.value)
|
||||
const target = categories.find((c: LocalCategory): boolean => c.id == normalizedCategoryId)
|
||||
if (target != null) {
|
||||
console.log('找到目标分类,执行选中:', target.name)
|
||||
selectPrimaryCategory(activePrimary.value)
|
||||
selectPrimaryCategory(normalizedCategoryId)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 默认选中第一个分类或"厨具"分类
|
||||
const defaultCategory = categories.find((c: LocalCategory): boolean => c.name.includes('厨具')) ?? categories[0]
|
||||
const defaultCategory = categories.find((c: LocalCategory): boolean => c.id == 'all_medical') ?? categories[0]
|
||||
if (defaultCategory != null) {
|
||||
console.log('设置默认分类:', defaultCategory.name)
|
||||
selectPrimaryCategory(defaultCategory.id)
|
||||
@@ -622,7 +625,7 @@ onShow(() => {
|
||||
console.log('onShow检查Storage:', savedCategoryId)
|
||||
|
||||
if (savedCategoryId != null && savedCategoryId != '') {
|
||||
const targetId = savedCategoryId as string
|
||||
const targetId = normalizeSelectedMedicalCategoryId(savedCategoryId as string)
|
||||
console.log('onShow发现存储的分类ID:', targetId)
|
||||
|
||||
// 清除存储,避免下次进入默认选中
|
||||
@@ -679,7 +682,7 @@ onLoad((options: any) => {
|
||||
const optObj = (options instanceof UTSJSONObject) ? (options as UTSJSONObject) : (JSON.parse(JSON.stringify(options ?? {})) as UTSJSONObject)
|
||||
const optCategoryId = optObj.getString('categoryId') ?? ''
|
||||
if (optCategoryId !== '') {
|
||||
categoryId = optCategoryId
|
||||
categoryId = normalizeSelectedMedicalCategoryId(optCategoryId)
|
||||
categoryName = optObj.getString('name') ?? ''
|
||||
console.log('✅ onLoad中找到分类参数:', categoryId, categoryName)
|
||||
}
|
||||
@@ -694,7 +697,7 @@ onLoad((options: any) => {
|
||||
const pageOptObj = (rawPageOptions instanceof UTSJSONObject) ? (rawPageOptions as UTSJSONObject) : (JSON.parse(JSON.stringify(rawPageOptions)) as UTSJSONObject)
|
||||
const pageCategoryId = pageOptObj.getString('categoryId') ?? ''
|
||||
if (pageCategoryId !== '') {
|
||||
categoryId = pageCategoryId
|
||||
categoryId = normalizeSelectedMedicalCategoryId(pageCategoryId)
|
||||
categoryName = pageOptObj.getString('name') ?? ''
|
||||
console.log('✅ 从getCurrentPages()找到分类参数:', categoryId, categoryName)
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<scroll-view
|
||||
class="category-scroll"
|
||||
direction="horizontal"
|
||||
:scroll-x="true"
|
||||
:show-scrollbar="false"
|
||||
:scroll-with-animation="true"
|
||||
:scroll-into-view="categoryScrollIntoView"
|
||||
@@ -66,6 +67,8 @@
|
||||
:loading="loading"
|
||||
:has-more="hasMore"
|
||||
:show-load-more="showLoadMore"
|
||||
:empty-state-title="homeEmptyStateTitle"
|
||||
:empty-state-description="homeEmptyStateDescription"
|
||||
@secondary-category-click="handleSecondaryCategoryClick"
|
||||
@select-channel="navigateToChannel"
|
||||
@select-simple-channel="navigateToSimpleChannel"
|
||||
@@ -285,7 +288,7 @@ const headerSearchPlaceholder = computed((): string => {
|
||||
if (activeTopModule.value == 'service') {
|
||||
return '居家护理 / 康复照护 / 血压计 / 助餐服务'
|
||||
}
|
||||
return currentPlaceholderKeyword.value != '' ? currentPlaceholderKeyword.value : '感冒药 / 康复护理 / 居家护理 / 血压计'
|
||||
return currentPlaceholderKeyword.value != '' ? currentPlaceholderKeyword.value : '血压计 / 血糖仪 / 制氧机 / 维生素'
|
||||
})
|
||||
|
||||
type HomeCareCategoryType = {
|
||||
@@ -641,11 +644,16 @@ const showSubCategories = ref(false)
|
||||
|
||||
// 首页占位词轮播相关
|
||||
const placeholderKeywords = ref([
|
||||
'neo2无人机',
|
||||
'华为mate50',
|
||||
'血压计',
|
||||
'血糖仪',
|
||||
'体温计',
|
||||
'制氧机',
|
||||
'口罩',
|
||||
'创可贴',
|
||||
'维生素',
|
||||
'钙片',
|
||||
'感冒药',
|
||||
'维生素C',
|
||||
'康复护具',
|
||||
'护理床',
|
||||
|
||||
])
|
||||
const currentPlaceholderIndex = ref(0)
|
||||
@@ -655,6 +663,20 @@ const placeholderAnimating = ref(false)
|
||||
let placeholderTimer: number = 0
|
||||
let placeholderAnimationTimer: number = 0
|
||||
|
||||
const homeEmptyStateTitle = computed((): string => {
|
||||
if (currentFeedCategoryId.value == 'recommend') {
|
||||
return '康养医疗商品正在完善中'
|
||||
}
|
||||
return '当前分类暂无商品'
|
||||
})
|
||||
|
||||
const homeEmptyStateDescription = computed((): string => {
|
||||
if (currentFeedCategoryId.value == 'recommend') {
|
||||
return '可先查看居家服务或稍后再试'
|
||||
}
|
||||
return ''
|
||||
})
|
||||
|
||||
const syncNextPlaceholderKeyword = () => {
|
||||
const total = placeholderKeywords.value.length
|
||||
if (total <= 1) {
|
||||
@@ -1114,7 +1136,7 @@ const handleSecondaryCategoryClick = async (category: Category): Promise<void> =
|
||||
hasMore.value = true
|
||||
loading.value = true
|
||||
try {
|
||||
const result = await supabaseService.getProductsByCategory(category.id, 1, defaultLoadLimit)
|
||||
const result = await supabaseService.getMedicalMallProductsByCategory(category.id, 1, defaultLoadLimit)
|
||||
failedProductImageIds.value = []
|
||||
setHotProducts(result.data)
|
||||
hasMore.value = result.hasmore
|
||||
@@ -1165,9 +1187,9 @@ const healthNews = [
|
||||
]
|
||||
|
||||
// 获取一级分类数据
|
||||
const loadCategories = async (): Promise<void> => {
|
||||
const loadMedicalMallCategories = async (): Promise<void> => {
|
||||
try {
|
||||
const categoriesData = await supabaseService.getParentCategories()
|
||||
const categoriesData = await supabaseService.getMedicalMallParentCategories()
|
||||
parentCategories.value = categoriesData
|
||||
// 兼容其他使用 categories 的地方
|
||||
categories.value = categoriesData
|
||||
@@ -1190,7 +1212,7 @@ const loadCategories = async (): Promise<void> => {
|
||||
async function loadSubCategories(parentId: string): Promise<void> {
|
||||
try {
|
||||
console.log('[loadSubCategories] 开始加载二级分类, parentId:', parentId)
|
||||
const subData = await supabaseService.getSubCategories(parentId)
|
||||
const subData = await supabaseService.getMedicalMallSubCategories(parentId)
|
||||
console.log('[loadSubCategories] 获取到二级分类数量:', subData.length)
|
||||
console.log('[loadSubCategories] 二级分类数据:', JSON.stringify(subData))
|
||||
subCategories.value = subData
|
||||
@@ -1315,6 +1337,15 @@ function getCategoryLabelById(categoryId: string): string {
|
||||
return '精选'
|
||||
}
|
||||
|
||||
function normalizeSelectedMedicalCategoryId(categoryId: string): string {
|
||||
if (categoryId == 'device') return 'med_device'
|
||||
if (categoryId == 'external') return 'home_care_daily'
|
||||
if (categoryId == 'cold') return 'otc_medicine'
|
||||
if (categoryId == 'medicine') return 'otc_medicine'
|
||||
if (categoryId == 'care') return 'home_care_daily'
|
||||
return categoryId
|
||||
}
|
||||
|
||||
async function consumeSelectedCategoryFromStorage(): Promise<boolean> {
|
||||
if (activeTopModule.value != 'home' || categoryList.value.length == 0) {
|
||||
return false
|
||||
@@ -1328,14 +1359,15 @@ async function consumeSelectedCategoryFromStorage(): Promise<boolean> {
|
||||
return false
|
||||
}
|
||||
uni.removeStorageSync('selectedCategory')
|
||||
const matchedItem = categoryList.value.find((item: CategoryItem): boolean => item.id == nextCategoryId)
|
||||
const normalizedCategoryId = normalizeSelectedMedicalCategoryId(nextCategoryId)
|
||||
const matchedItem = categoryList.value.find((item: CategoryItem): boolean => item.id == normalizedCategoryId)
|
||||
if (matchedItem != null) {
|
||||
await refreshHomeCategory(matchedItem)
|
||||
return true
|
||||
}
|
||||
await refreshHomeCategory({
|
||||
id: nextCategoryId,
|
||||
name: getCategoryLabelById(nextCategoryId)
|
||||
id: normalizedCategoryId,
|
||||
name: getCategoryLabelById(normalizedCategoryId)
|
||||
})
|
||||
return true
|
||||
}
|
||||
@@ -1364,17 +1396,17 @@ const fetchSortedProductsPage = async (page: number, limit: number): Promise<Pag
|
||||
console.log('加载热销商品,当前排序方式:', activeSort.value, 'page:', page, 'limit:', limit)
|
||||
switch (activeSort.value) {
|
||||
case 'sales':
|
||||
console.log('调用 getProductsBySales')
|
||||
return await supabaseService.getProductsBySales(page, limit)
|
||||
console.log('调用 getMedicalMallSmartRecommendations(sales-fallback)')
|
||||
return await supabaseService.getMedicalMallSmartRecommendations(page, limit)
|
||||
case 'price':
|
||||
console.log('调用 getProductsByPrice, 升序:', priceAscending.value)
|
||||
return await supabaseService.getProductsByPrice(page, limit, priceAscending.value)
|
||||
console.log('调用 getMedicalMallSmartRecommendations(price-fallback), 升序:', priceAscending.value)
|
||||
return await supabaseService.getMedicalMallSmartRecommendations(page, limit)
|
||||
case 'new':
|
||||
console.log('调用 getProductsByNewest')
|
||||
return await supabaseService.getProductsByNewest(page, limit)
|
||||
console.log('调用 getMedicalMallSmartRecommendations(new-fallback)')
|
||||
return await supabaseService.getMedicalMallSmartRecommendations(page, limit)
|
||||
case 'recommend':
|
||||
console.log('调用 getSmartRecommendations')
|
||||
return await supabaseService.getSmartRecommendations(page, limit)
|
||||
console.log('调用 getMedicalMallSmartRecommendations')
|
||||
return await supabaseService.getMedicalMallSmartRecommendations(page, limit)
|
||||
case 'discount': {
|
||||
console.log('调用 getDiscountProducts')
|
||||
const products = await supabaseService.getDiscountProducts(limit)
|
||||
@@ -1387,8 +1419,8 @@ const fetchSortedProductsPage = async (page: number, limit: number): Promise<Pag
|
||||
}
|
||||
}
|
||||
default:
|
||||
console.log('调用默认 getProductsBySales')
|
||||
return await supabaseService.getProductsBySales(page, limit)
|
||||
console.log('调用默认 getMedicalMallSmartRecommendations')
|
||||
return await supabaseService.getMedicalMallSmartRecommendations(page, limit)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1427,7 +1459,7 @@ async function syncCategoryLayout(categoryId: string): Promise<void> {
|
||||
}
|
||||
|
||||
try {
|
||||
const subData = await supabaseService.getSubCategories(categoryId)
|
||||
const subData = await supabaseService.getMedicalMallSubCategories(categoryId)
|
||||
subCategories.value = subData
|
||||
} catch (error) {
|
||||
console.error('加载子分类数据失败:', error)
|
||||
@@ -1444,33 +1476,7 @@ async function loadCategoryGoods(categoryId: string): Promise<void> {
|
||||
await syncCategoryLayout(categoryId)
|
||||
if (categoryId === 'recommend') {
|
||||
try {
|
||||
let result: PaginatedResponse<Product>
|
||||
switch (activeSort.value) {
|
||||
case 'sales':
|
||||
result = await supabaseService.getProductsBySales(1, defaultLoadLimit)
|
||||
break
|
||||
case 'price':
|
||||
result = await supabaseService.getProductsByPrice(1, defaultLoadLimit, priceAscending.value)
|
||||
break
|
||||
case 'new':
|
||||
result = await supabaseService.getProductsByNewest(1, defaultLoadLimit)
|
||||
break
|
||||
case 'discount': {
|
||||
const products = await supabaseService.getDiscountProducts(defaultLoadLimit)
|
||||
result = {
|
||||
data: products,
|
||||
total: products.length,
|
||||
page: 1,
|
||||
limit: defaultLoadLimit,
|
||||
hasmore: false
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'recommend':
|
||||
default:
|
||||
result = await supabaseService.getSmartRecommendations(1, defaultLoadLimit)
|
||||
break
|
||||
}
|
||||
const result = await supabaseService.getMedicalMallSmartRecommendations(1, defaultLoadLimit)
|
||||
failedProductImageIds.value = []
|
||||
setHotProducts(result.data)
|
||||
hasMore.value = result.hasmore
|
||||
@@ -1483,7 +1489,7 @@ async function loadCategoryGoods(categoryId: string): Promise<void> {
|
||||
} else {
|
||||
try {
|
||||
loading.value = true
|
||||
const result = await supabaseService.getProductsByCategory(categoryId, 1, defaultLoadLimit)
|
||||
const result = await supabaseService.getMedicalMallProductsByCategory(categoryId, 1, defaultLoadLimit)
|
||||
failedProductImageIds.value = []
|
||||
setHotProducts(result.data)
|
||||
hasMore.value = result.hasmore
|
||||
@@ -1514,7 +1520,7 @@ async function refreshHomeCategory(item: CategoryItem): Promise<void> {
|
||||
secondaryCategoryDisplay.value = buildSecondaryCategoryDisplay(item.id)
|
||||
applyChannelDisplay(item.id)
|
||||
try {
|
||||
const result = await supabaseService.getSmartRecommendations(1, defaultLoadLimit)
|
||||
const result = await supabaseService.getMedicalMallSmartRecommendations(1, defaultLoadLimit)
|
||||
setHotProducts(result.data)
|
||||
hasMore.value = result.hasmore
|
||||
} catch (error) {
|
||||
@@ -1528,7 +1534,7 @@ async function refreshHomeCategory(item: CategoryItem): Promise<void> {
|
||||
}
|
||||
|
||||
try {
|
||||
const subData = await supabaseService.getSubCategories(item.id)
|
||||
const subData = await supabaseService.getMedicalMallSubCategories(item.id)
|
||||
subCategories.value = subData
|
||||
} catch (error) {
|
||||
console.error('加载子分类数据失败:', error)
|
||||
@@ -1537,7 +1543,7 @@ async function refreshHomeCategory(item: CategoryItem): Promise<void> {
|
||||
secondaryCategoryDisplay.value = buildSecondaryCategoryDisplay(item.id)
|
||||
applyChannelDisplay(item.id)
|
||||
try {
|
||||
const result = await supabaseService.getProductsByCategory(item.id, 1, defaultLoadLimit)
|
||||
const result = await supabaseService.getMedicalMallProductsByCategory(item.id, 1, defaultLoadLimit)
|
||||
setHotProducts(result.data)
|
||||
hasMore.value = result.hasmore
|
||||
} catch (error) {
|
||||
@@ -1559,7 +1565,8 @@ function selectCategoryFromPanel(item: CategoryItem): void {
|
||||
}
|
||||
|
||||
const loadRecommendedProducts = async (limit: number): Promise<void> => {
|
||||
recommendedProducts.value = await supabaseService.getRecommendedProducts(limit)
|
||||
const result = await supabaseService.getMedicalMallSmartRecommendations(1, limit)
|
||||
recommendedProducts.value = result.data
|
||||
}
|
||||
|
||||
// 加载热搜词
|
||||
@@ -1592,7 +1599,7 @@ const initData = async () => {
|
||||
} catch (error) {
|
||||
console.error('加载用户资料失败:', error)
|
||||
}
|
||||
await loadCategories()
|
||||
await loadMedicalMallCategories()
|
||||
await loadBrands()
|
||||
await loadHotKeywords()
|
||||
await loadServiceHomeData()
|
||||
@@ -1613,7 +1620,7 @@ const familyItems = [
|
||||
desc: '伤口护理',
|
||||
icon: '🩹',
|
||||
color: '#FF5722',
|
||||
categoryId: 'external'
|
||||
categoryId: 'wound_care'
|
||||
},
|
||||
{
|
||||
id: 'family2',
|
||||
@@ -1621,7 +1628,7 @@ const familyItems = [
|
||||
desc: '健康监测',
|
||||
icon: '🌡️',
|
||||
color: '#2196F3',
|
||||
categoryId: 'device'
|
||||
categoryId: 'thermometer'
|
||||
},
|
||||
{
|
||||
id: 'family3',
|
||||
@@ -1629,7 +1636,7 @@ const familyItems = [
|
||||
desc: '环境消毒',
|
||||
icon: '🧪',
|
||||
color: '#ff5000',
|
||||
categoryId: 'external'
|
||||
categoryId: 'disinfectant'
|
||||
},
|
||||
{
|
||||
id: 'family4',
|
||||
@@ -1637,7 +1644,7 @@ const familyItems = [
|
||||
desc: '日常防护',
|
||||
icon: '😷',
|
||||
color: '#607D8B',
|
||||
categoryId: 'device'
|
||||
categoryId: 'mask'
|
||||
},
|
||||
{
|
||||
id: 'family5',
|
||||
@@ -1645,7 +1652,7 @@ const familyItems = [
|
||||
desc: '物理降温',
|
||||
icon: '🧊',
|
||||
color: '#00BCD4',
|
||||
categoryId: 'cold'
|
||||
categoryId: 'cold_fever'
|
||||
},
|
||||
{
|
||||
id: 'family6',
|
||||
@@ -1653,7 +1660,7 @@ const familyItems = [
|
||||
desc: '伤口处理',
|
||||
icon: '🩹',
|
||||
color: '#FF9800',
|
||||
categoryId: 'external'
|
||||
categoryId: 'dressing_tools'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1931,7 +1938,7 @@ const loadMore = async () => {
|
||||
currentPage.value = nextPage
|
||||
}
|
||||
} else {
|
||||
const result = await supabaseService.getProductsByCategory(currentFeedCategoryId.value, nextPage, defaultLoadLimit)
|
||||
const result = await supabaseService.getMedicalMallProductsByCategory(currentFeedCategoryId.value, nextPage, defaultLoadLimit)
|
||||
if (result.data.length == 0) {
|
||||
hasMore.value = false
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user