123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- // components/My_BannerSwiper/index.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- swiperBannerList: {
- type: Array
- },
- type: {
- type: String,
- value: "banner" //advertising
- },
- marTop: {
- type: Number,
- value: 0
- },
- marBot: {
- type: Number,
- value: 0
- },
- },
- /**
- * 组件的初始数据
- */
- data: {
- },
- /**
- * 组件的方法列表
- */
- methods: {
- /* 轮播跳转 */
- clickToPage(e) {
- const {
- index
- } = e.target.dataset;
- const bannerData = this.data.swiperBannerList[index];
- if (bannerData.flinktype == 'URL') {
- //url类型内部跳转
- wx.navigateTo({
- url: bannerData.fhyperlink,
- })
- } else if (bannerData.flinktype == 'DATA' && bannerData.fdatatable == "tactivity") {
- //活动类型跳转展会
- wx.navigateTo({
- url: '/pages/tradeShow/index?id=' + bannerData.fdataid,
- })
- }
- }
- }
- })
|