Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/app.config.ts
#	src/pages/brand/info/info.tsx
v2
xing 1 year ago
commit 3794aca0a7
  1. 1
      src/api/index.ts
  2. 3
      src/app.config.ts
  3. 57
      src/pages/brand/info/info.tsx

@ -7,3 +7,4 @@ export * from './manage'
export * from './course' export * from './course'
export * from './brand' export * from './brand'
export * from './home' export * from './home'
export * from './brand'

@ -86,8 +86,9 @@ export default defineAppConfig({
'profession/profession', 'profession/profession',
'health/health', // 健康 'health/health', // 健康
'videoFull/videoFull', // 资源id 视频全屏 'videoFull/videoFull', // 资源id 视频全屏
'illness/sort/sort',
'illness/list/list',
'illness/article/article', 'illness/article/article',
'illness/sort/sort'
] ]
}, },
], ],

@ -1,57 +0,0 @@
import {FC, useEffect, useState} from "react";
import {Image, Swiper, SwiperItem, View} from "@tarojs/components";
import {brandApi, BrandRecord} from "@/api";
import Taro, {useRouter} from "@tarojs/taro";
type Params = {
id: number
}
const MeetingsConfig: FC = () => {
const {id} = useRouter().params as unknown as Params
const [brandInfo, setBrandInfo] = useState<BrandRecord>()
useEffect(() => {
getData()
}, [id])
const getData = async () => {
try {
const data = await brandApi.info(id)
Taro.setNavigationBarTitle({title:data.name})
setBrandInfo(data)
} catch (e) {
}
}
return (
<View className='p-2'>
{
// brands.length ? brands.map((d) =>
// <View onClick={() => jumpInfo(d.id)} className={styles.box} key={d.id}>
// <Image src={d.brand_album?.[0]} mode='aspectFill' className={styles.image}/>
// <View className={styles.rightBox}>
// <View className='font-weight mb-2 font-28'>{d.name}</View>
// <View className={styles.desc}>{d.graphic_introduction.repeat(30)}</View>
// </View>
// </View>)
// : <Empty name='空空如也'/>
<Swiper
className='test-h'
indicatorColor='#999'
indicatorActiveColor='#333'
indicatorDots
>
{ brandInfo?.brand_album?.length
&& brandInfo?.brand_album?.map((d) =>
<SwiperItem>
<Image src={d}></Image>
</SwiperItem>)
}
</Swiper>
}
</View>
);
}
export default MeetingsConfig
Loading…
Cancel
Save