|
@@ -7,6 +7,7 @@ import { useModel } from '@/store'
|
7
|
7
|
import useUserMounted from '@/utils/hooks/useUserMounted'
|
8
|
8
|
import Taro from '@tarojs/taro'
|
9
|
9
|
import Page from '@/layouts'
|
|
10
|
+import nav2detail from '@/utils/nav2detail'
|
10
|
11
|
import '@/assets/css/reset.less'
|
11
|
12
|
import '@/assets/css/iconfont.less'
|
12
|
13
|
import './index.less'
|
|
@@ -58,7 +59,7 @@ export default function Index (props) {
|
58
|
59
|
|
59
|
60
|
const GetBanner = (done = () => { }) => { // 获取轮播图
|
60
|
61
|
setBannerList([])
|
61
|
|
- request({ ...apis.getBanner, params: { contentType: `activity`, pageNum: 1, pageSize: 5 } }).then((res) => {
|
|
62
|
+ request({ ...apis.getBanner, params: { showType: 'banner', showPosition: 'index', pageNum: 1, pageSize: 5 } }).then((res) => {
|
62
|
63
|
setBannerList([...(res || [])])
|
63
|
64
|
done()
|
64
|
65
|
}).catch(() => {
|
|
@@ -151,7 +152,7 @@ export default function Index (props) {
|
151
|
152
|
{
|
152
|
153
|
BannerList.map((item, index) => (
|
153
|
154
|
<SwiperItem className='SwiperItem' key={`Banner-${index}`}>
|
154
|
|
- <view className='BannerItem' onClick={() => { Taro.navigateTo({ url: `/pages/HuoDong/HuoDongDetail/index?id=${item.targetId}` }) }}>
|
|
155
|
+ <view className='BannerItem' onClick={() => nav2detail({type: item.contentType, id: item.targetId})}>
|
155
|
156
|
<image mode='aspectFill' src={item.image}></image>
|
156
|
157
|
</view>
|
157
|
158
|
</SwiperItem>
|