var t = getApp(), o = t.globalData.setting; Component({ properties: { // 这里定义了innerText属性,属性值可以在组件使用时指定 object: { type: Object, value: null, }, }, data: { // 这里是一些组件内部数据 imghost: o.imghost, someData: {}, mleft:600, timer: null, width:0, }, ready: function() { var th=this; }, detached() { }, methods: { go_url:function (e) { var url=e.currentTarget.dataset.url; getApp().goto(url); }, } })