| | |
| | | import { getCustomerList, getCrmAuthUrl } from '../../api/index' |
| | | import { getCustomerList, getCrmAuthUrl, batchAddLike } from '../../api/index' |
| | | const { HYEventBus } = require('hy-event-store') |
| | | const eventBus = new HYEventBus() |
| | | Page({ |
| | |
| | | |
| | | keyWords: '', |
| | | dataList: [], |
| | | customer: {}, |
| | | total: 0, |
| | | flag: 0, |
| | | page: 1, |
| | |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.getList() |
| | | }, |
| | | |
| | | }, |
| | | handleSub() { |
| | | const { customer } = this.data |
| | | const enjoyList = wx.getStorageSync('enjoyList') || [] |
| | | if(!customer.userId) return wx.showToast({ |
| | | title: '请先选择要关联的客户', icon: 'none' |
| | | }) |
| | | batchAddLike({ |
| | | articleIds: enjoyList.filter(i => i.checked).map(i => i.id).join(','), |
| | | customerId: customer.userId |
| | | }) |
| | | }, |
| | | tabsClick(e) { |
| | | const flag = e.currentTarget.dataset.tab |
| | | this.setData({flag}) |
| | | this.setData({total: 0,dataList: [], page: 1}) |
| | | this.getList() |
| | | }, |
| | | itemCheck(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | this.setData({ customer: item }) |
| | | }, |
| | | reloadList() { |
| | | this.setData({total: 0,dataList: [], page: 1}) |
| | |
| | | url: '/pages/webView/index?link=' + res.data, |
| | | }) |
| | | }) |
| | | }, |
| | | handleSub() { |
| | | console.log('点击饿了'); |
| | | wx.canvasToTempFilePath({ |
| | | x: 100, |
| | | y: 200, |
| | | width: 50, |
| | | height: 50, |
| | | destWidth: 100, |
| | | destHeight: 100, |
| | | canvasId: 'myCanvas', |
| | | success(res) { |
| | | console.log(res.tempFilePath) |
| | | } |
| | | }) |
| | | }, |
| | | onReady() { |
| | | |