| | |
| | | data: { |
| | | bottomLift: 0, |
| | | checkAll: false, |
| | | enjoyList: [] |
| | | enjoyList: [], |
| | | leftIcon: '<<', |
| | | rightIcon: '>>', |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | onShow(options) { |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | | bottomLift: app.bottomLift |
| | |
| | | url: '/pages/kefu/select', |
| | | }) |
| | | }, |
| | | handleShare() { |
| | | const { enjoyList } = this.data |
| | | let info = {} |
| | | enjoyList.forEach(item => { |
| | | item.list.forEach(ite => { |
| | | if(ite.checked){ |
| | | info = ite |
| | | } |
| | | }) |
| | | }) |
| | | let map = [ |
| | | '/pages/detailDis/product', |
| | | '/pages/detailDis/case', |
| | | '/pages/detailDis/realpic' |
| | | ] |
| | | console.log(info.id) |
| | | wx.navigateToMiniProgram({ |
| | | appId: 'wx208dd1edc0be24ee', |
| | | path: `${map[info.joinType]}?origin=b&id=${info.id}&userId=${wx.getStorageSync('member').id}`, |
| | | envVersion: 'release' |
| | | }) |
| | | }, |
| | | handleDown() { |
| | | const { enjoyList } = this.data |
| | | let obj = {} |
| | |
| | | console.log('obj', obj); |
| | | let that = this |
| | | getContentShareImg({ |
| | | articleId: obj.id + '&' + obj.joinType, |
| | | articleId: obj.id + '_' + obj.joinType, |
| | | type: '0', |
| | | // pageUrl: path, |
| | | imgurl: obj.coverImage, |
| | |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | batchDown() { |
| | | setTimeout(() => { |
| | | eventBus.emit('batchDown', [1,2,3]) |
| | | }, 800) |
| | | wx.navigateTo({ |
| | | url: '/pages/download/index', |
| | | }) |
| | | }, |
| | | closeCard() { |
| | |
| | | |
| | | }, |
| | | checkAll() { |
| | | this.setData({checkAll:!this.data.checkAll}) |
| | | let enjoyList = wx.getStorageSync('enjoyList') || [] |
| | | enjoyList.forEach(item => { |
| | | item.checked = !item.checked |
| | | item.checked = this.data.checkAll |
| | | }) |
| | | wx.setStorageSync('enjoyList', enjoyList) |
| | | |