|
@@ -33,17 +33,18 @@ export default (props) => {
|
33
|
33
|
|
34
|
34
|
//分类标签
|
35
|
35
|
const tabs = [{ title: '附近' }].concat(typeList.map(x => ({ ...x, title: x.typeName })))
|
36
|
|
- //切换上面的标签
|
37
|
|
- const handleTabChange = (e) => {
|
38
|
|
- const { index } = e.detail
|
|
36
|
+ const details=(index,tab)=>{
|
39
|
37
|
setActiveTab(index)
|
40
|
|
- const tab = tabs[index].typeId || ''
|
41
|
|
-
|
42
|
38
|
setQueryParams({
|
43
|
39
|
...queryParams,
|
44
|
40
|
typeId: tab
|
45
|
41
|
})
|
46
|
42
|
}
|
|
43
|
+ //切换上面的标签
|
|
44
|
+ const handleTabChange = (e) => {
|
|
45
|
+ const { index } = e.detail
|
|
46
|
+ details(index,tabs[index].typeId||'')
|
|
47
|
+ }
|
47
|
48
|
|
48
|
49
|
const handleDataChange = (value, e) => {
|
49
|
50
|
if (e.paramsChanged) {
|
|
@@ -62,6 +63,8 @@ export default (props) => {
|
62
|
63
|
//查询分类标签表
|
63
|
64
|
getIndexType({ pageSize: 20 }).then((res) => {
|
64
|
65
|
setTypeList(res.records || [])
|
|
66
|
+ details(1,res.records[1].typeId)
|
|
67
|
+
|
65
|
68
|
})
|
66
|
69
|
}, [])
|
67
|
70
|
|