12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import {
- getBannerList
- } from '~/api/global'
- Component({
- properties: {
- classify: {
- type: Number,
- value: 1
- }
- },
- data: {
- bannerList: []
- },
- lifetimes: {
- attached() {
- this.getBannerList()
- },
- },
-
- methods: {
- async getBannerList() {
- let bannerList = await getBannerList(this.properties.classify)
- this.setData({
- bannerList
- })
- },
- bannelEvent({
- currentTarget
- }) {
-
- let {
- type,
- id
- } = currentTarget.dataset
- if ([2, 3, 4].includes(type)) {
- wx.navigateTo({
- url: `/pages/ranking/index?id=${id}&type=${type}`,
- })
- }
- if (type == 5) {
- wx.navigateTo({
- url: '/pages/match/index',
- })
- }
- },
- }
- })
|