feat: 轮播图配置
This commit is contained in:
2
dist/pages/home/index.js
vendored
2
dist/pages/home/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -57,16 +57,33 @@ const Home = () => {
|
||||
});
|
||||
|
||||
|
||||
getdetails() //获取活动详情
|
||||
getsystemConfig() //获取系统配置
|
||||
}, []);
|
||||
|
||||
const getdetails=()=>{
|
||||
let objParams = {
|
||||
tableName: "details",
|
||||
// id: "80516fb66370bcf300b8f43c5f4dd52b",
|
||||
okFun: (res) => {
|
||||
okFun: (res:any) => {
|
||||
console.log("details--", res);
|
||||
setdetails(res?.data??[])
|
||||
},
|
||||
};
|
||||
getTable(objParams);
|
||||
}, []);
|
||||
}
|
||||
|
||||
const getsystemConfig=()=>{
|
||||
let objParams = {
|
||||
tableName: "systemConfig",
|
||||
// id: "80516fb66370bcf300b8f43c5f4dd52b",
|
||||
okFun: (res:any) => {
|
||||
console.log("systemConfig--", res);
|
||||
setsystemConfig(res?.data??[])
|
||||
},
|
||||
};
|
||||
getTable(objParams);
|
||||
}
|
||||
|
||||
const uploadTaro = (tempFilePaths: any) => {
|
||||
// 云开发存储文件 [/自动创建文件路径]
|
||||
@@ -229,7 +246,7 @@ const Home = () => {
|
||||
paginationVisible
|
||||
onChange={onChange}
|
||||
>
|
||||
{(systemConfig?.imagesArr??[]).map((item:any, index:any) => (
|
||||
{(systemConfig?.[0]?.imagesArr??[]).map((item:any, index:any) => (
|
||||
<SwiperItem key={`swiper#demo1${index}`}>
|
||||
<Image src={item?.url} fit="cover" width="100%" height="200px" />
|
||||
</SwiperItem>
|
||||
|
||||
Reference in New Issue
Block a user