// components/toast/type/join/index.ts var mixinsBehavior = require('../toast/toast_behavior') Component({ behaviors: [mixinsBehavior], options: { styleIsolation: 'apply-shared' }, /** * 组件的属性列表 */ properties: { // g_cdn:String }, /** * 组件的初始数据 */ data: { background: [{ id: '0', txt: '游戏开始前,将随机指定3个地标为任务目标,在地图中找到这些目标吧!' }, { id: '1', txt: '找到任务目标,在点击弹出窗口中,进行答题任务挑战。' }, { id: '2', txt: '完成全部3个任务挑战,即视为通关完成,耗时越短,积分越高!' }], indicatorDots: false, vertical: false, autoplay: false, interval: 2000, duration: 500, currentIdx: 0, current: { id: '0', txt: '游戏开始前,将随机指定3个地标为任务目标,在地图中找到这些目标吧!' } }, /** * 组件的方法列表 */ methods: { tapclose() { let item = this.data.background.find(ii => ii.id === '0') this.triggerEvent('close') setTimeout(() => { this.setData({ currentIdx: 0, current: item }) }, 500); }, swiperChange(e: any) { console.log(e.detail.current); let item = this.data.background.find(ii => ii.id == e.detail.current) if (e.detail.source == 'touch') { this.setData({ current: item, }) } }, } })