fix: 接口读值
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: RenXiaoDong
|
||||||
|
* @Date: 2025-06-23 21:11:42
|
||||||
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="m-auto mt-24px max-w-1000px">
|
<div class="m-auto mt-24px max-w-1000px">
|
||||||
<Container title="推荐产品" class="body">
|
<Container title="推荐产品" class="body">
|
||||||
@ -34,16 +38,17 @@ onMounted(() => {
|
|||||||
getSuccessCaseList();
|
getSuccessCaseList();
|
||||||
});
|
});
|
||||||
const getProductList = async () => {
|
const getProductList = async () => {
|
||||||
const res = await fetchProductList();
|
const { code, data } = await fetchProductList();
|
||||||
if (res.code === 200) {
|
if (code === 200) {
|
||||||
products.value = res.data;
|
products.value = data;
|
||||||
}
|
}
|
||||||
// products.value = await fetchProductList();
|
|
||||||
// console.log('++++++', products.value);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getSuccessCaseList = async () => {
|
const getSuccessCaseList = async () => {
|
||||||
cases.value = await fetchSuccessCaseList();
|
const { code, data } = await fetchSuccessCaseList();
|
||||||
|
if (code === 200) {
|
||||||
|
cases.value = data;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user