// packageC/mycomponent/grouplist/grouplist.js Component({ /** * 组件的属性列表 */ properties: { grouplist: { type: null }, store_id: { type: null }, }, /** * 组件的初始数据 */ data: { language: '', list: [] }, /** * 组件的方法列表 */ methods: { goGroup(e) { let id = e.target.dataset.id || e.currentTarget.dataset.id; console.log(e, id, '参数'); wx.navigateTo({ url: '/packageA/detail_v2/detail_v2?id=' + id +'/'+this.data.store_id+ '&name=group' }); } }, lifetimes: { // 生命周期函数,可以为函数,或一个在methods段中定义的方法名 attached() { let language = wx.getStorageSync('langIndex'); this.setData({ 'language': language.en}); }, moved() {}, detached() {} }, });