| | |
| | | import { getSectionByAllList } from "@/api/chat"; |
| | | |
| | | |
| | | const app = getApp(); |
| | | // pages/scene.ts |
| | | Component({ |
| | | |
| | |
| | | data: { |
| | | sectionList: [], |
| | | iconList: ['bengzhan1', 'sanweiditu', 'jiankong'] |
| | | }, |
| | | methods:{ |
| | | sectionBClick(e){ |
| | | const item = e.currentTarget.dataset.item; |
| | | console.log('this.data.sectionList',this.data.sectionList); |
| | | const foundA = this.data.sectionList.find(sectionItem=>sectionItem.childrenChunkList?.some(childrenItem=>childrenItem.some(subItem=>subItem.section_id===item.section_id)) ); |
| | | if(!foundA ) return; |
| | | // 前一个页面传递参数 |
| | | const jumpUrl = '/pages/question/question'; |
| | | wx.switchTab({ |
| | | url: jumpUrl, |
| | | }); |
| | | app.globalData.sectionAId = foundA.section_id; |
| | | app.globalData.sectionB = item; |
| | | } |
| | | }, |
| | | lifetimes: { |
| | | |
| | |
| | | return item; |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | detached(){ |
| | | app.globalData.sectionAId = ''; |
| | | } |
| | | }, |
| | | pageLifetimes: { |