| | |
| | | // components/buoyClient/index.js |
| | | import { getCrmAuthUrl } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | |
| | | showPurpose: { |
| | | type: String, |
| | | value: '0' |
| | | } |
| | | }, |
| | | |
| | | attached() { |
| | | const enjoyList = wx.getStorageSync('enjoyList') || [] |
| | | this.setData({ enjoyList }) |
| | | }, |
| | | /** |
| | | * 组件的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | enjoyList: [] |
| | | }, |
| | | |
| | | /** |
| | |
| | | jumpPage(e) { |
| | | const urls = [ '/pages/kefu/fond', '/pages/store/staff' ] |
| | | const i = e.currentTarget.dataset.i |
| | | if(i == 2){ |
| | | getCrmAuthUrl({type:1}).then(res => { |
| | | this.setData({ url: res.data }) |
| | | let link = res.data |
| | | wx.navigateTo({ |
| | | url: '/pages/webView/index', |
| | | success: function(res) { |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | console.log(link) |
| | | res.eventChannel.emit('data',{link:link} ); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | console.log('i', i); |
| | | wx.navigateTo({ |
| | | url: urls[i], |