Commit 559db3b8 by 张立顺

Merge branch 'dev_v3.1' of 192.168.3.233:saas_plus/business-assistant into dev_v3.1

2 parents 0cee31a0 12e4e0cd
...@@ -105,8 +105,8 @@ Component({ ...@@ -105,8 +105,8 @@ Component({
var list = this.data.orderObj var list = this.data.orderObj
list && list &&
list.activityList?.forEach(item => { list.activityList?.forEach(item => {
// 0-未开始;1-活动中;2-已结束 // 1-未开始;2-活动中;3-已结束
let sliceNum = item.actStatus == 2 ? 3 : 10 let sliceNum = item.activityStatus == 3 ? 3 : 10
item.showStaffList = item.staffList.length > sliceNum ? item.staffList.slice(0, sliceNum) : item.staffList item.showStaffList = item.staffList.length > sliceNum ? item.staffList.slice(0, sliceNum) : item.staffList
item.staffList = item.staffList.length > sliceNum ? item.staffList.slice(sliceNum) : [] item.staffList = item.staffList.length > sliceNum ? item.staffList.slice(sliceNum) : []
}) })
......
...@@ -155,19 +155,6 @@ Page({ ...@@ -155,19 +155,6 @@ Page({
'lastFormData.flow': flow 'lastFormData.flow': flow
}) })
const _this = this const _this = this
// this.data.tabList.forEach((item, index) => {
// item.productList.forEach((i, lastIndex) => {
// if (i.profit) {
// let name = `tabList[${index}].productList[${lastIndex}].profit`;
// let profit = _this.formula(i.productType, sales, flow);
// console.log(name, profit);
// this.setData({
// [name]: profit,
// });
// }
// });
// });
this.data.senceData.forEach((item, index) => { this.data.senceData.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => { item.productList.forEach((i, lastIndex) => {
if (i.profit) { if (i.profit) {
...@@ -380,137 +367,6 @@ Page({ ...@@ -380,137 +367,6 @@ Page({
}); });
}, },
// showToast: function (e) {
// wx.$storage.set('disLikeRecordFlag', false)
// let disLikeRecordFlag = wx.$storage.get('disLikeRecordFlag')
// this.setData({
// disLikeFlag: false,
// disLikeRecordFlag
// })
// let { type, item } = e.currentTarget.dataset
// console.log('type,item: ', type, item)
// let tipObj = {}
// if (item.starTag == 1) {
// tipObj = {
// type: 'fail',
// title: '取消标记为意向客户'
// }
// } else {
// tipObj = {
// type: 'success',
// title: '成功标记为意向客户'
// }
// }
// this.prompt.showToast({
// type: tipObj.type,
// title: tipObj.title,
// duration: 1000,
// compelete: function () {
// console.log('toast框隐藏之后,会调用该函数')
// //例如:跳转页面wx.navigateTo({ url: 'xxx' });
// }
// })
// //切换收藏标记
// let index = e.currentTarget.dataset.outidx
// let completeStatus = `clueList[${index}].like`
// this.setData({
// [completeStatus]: !this.data.clueList[index].like
// })
// //发请求
// let { sessionId } = wx.$storage.get()
// let params = {
// clueId: item.clueId,
// sessionId
// }
// this.getTagApi(params)
// },
// //看线索重置
// resetCluelist() {
// let { typeList } = this.data
// typeList.forEach(item => {
// item.selectIndex = 2
// })
// this.setData({
// typeList,
// clueParams: {}
// })
// //重置数据
// this.clearclueData()
// this.getPageApi()
// },
// filterTypeFn(e) {
// let { typeList } = this.data
// let index = e.currentTarget.dataset.index
// // 重置筛选
// if (index == 3) {
// return this.resetCluelist()
// }
// let itemList = Object.values(typeList[index]).slice(0, 2)
// itemList.push('全部')
// let _this = this
// wx.pro.showActionSheet({
// itemList,
// success(res) {
// //重置数据
// _this.clearclueData()
// // 选中全部
// let selectIndex = res.tapIndex
// // console.log('selectIndex: ', selectIndex);
// typeList[index].selectIndex = selectIndex
// let params = typeList.reduce((obj, item, index) => {
// console.log(' item: ', item)
// if (item['key']) {
// let itemIndx = item.selectIndex
// // key: 'clueSource'
// if (item['key'] == 'clueSource') {
// // itemIndx += 1
// obj[item['key']] = itemIndx == 2 ? '' : itemIndx + 1
// } else {
// obj[item['key']] = itemIndx == 2 ? '' : itemIndx
// }
// }
// return obj
// }, {})
// console.log(params)
// // 清空数据
// _this.setData({ typeList, clueParams: params })
// _this.getPageApi(params)
// },
// fail(res) {
// console.log(res.errMsg)
// }
// })
// },
// //重置数据
// clearclueData() {
// this.setData({
// clueList: [],
// clueCurrentPage: 1
// // hasPhone: '',
// // starTag: '',
// // clueSource: '',
// })
// },
// // 打电话
// phoneCallFn(e) {
// let { phone } = e.currentTarget.dataset
// console.log('phone: ', phone)
// wx.$api.phoneCall(phone)
// },
// // 复制号码
// setCopyDataFn(e) {
// let { phone } = e.currentTarget.dataset
// wx.$api.setCopyData(phone)
// },
// getClueInit(param) {
// // console.log(22222)
// this.getUnreadApi(param)
// this.getPageApi(param)
// },
//未读消息 //未读消息
async getUnreadApi(param) { async getUnreadApi(param) {
let { code, data } = await unreadApi(param) let { code, data } = await unreadApi(param)
...@@ -520,54 +376,6 @@ Page({ ...@@ -520,54 +376,6 @@ Page({
}) })
} }
}, },
// //获取浏览线索数据列表
// async getPageApi(param) {
// let { cluePageSize, clueCurrentPage, clueList } = this.data
// let params = {
// pageSize: cluePageSize,
// currentPage: clueCurrentPage,
// ...param
// }
// let { code, data } = await pageApi(params)
// if (code == 0) {
// let arr = data.list.map(item => {
// if (item.visitList.length > 5) {
// item.getMoreFlag = true
// }
// return item
// })
// //添加分页数据
// // let concatArr = []
// // if(arr.length > 0) {
// // concatArr = clueList.concat(arr)
// // }
// this.setData({
// clueList: arr
// })
// let arrinx = arr.findIndex(e => e.clueType == 1 && e.starTag == 0)
// this.setData({
// disLikeFlagIdx: arrinx,
// triggered: false
// })
// }
// },
// //喜欢收藏功能
// async getTagApi(param) {
// let { clueParams } = this.data
// let res = await tagApi(param)
// console.log('res: ', res)
// if (res.code == 0) {
// let clueListPamas = {
// ...param,
// ...clueParams
// }
// this.getPageApi(clueListPamas)
// }
// },
onReachBottom() { onReachBottom() {
console.log('滑到底部了') console.log('滑到底部了')
}, },
...@@ -634,35 +442,6 @@ Page({ ...@@ -634,35 +442,6 @@ Page({
}, 300) }, 300)
} }
})(), })(),
// // 上拉刷新
// scrolltolowerFn() {
// console.log('scrolltolowerFn: ')
// let { clueCurrentPage, clueParams } = this.data
// console.log('clueCurrentPage: ', clueCurrentPage)
// let params = {
// ...clueParams,
// clueCurrentPage: clueCurrentPage++
// }
// this.setData({
// clueCurrentPage
// })
// this.getPageApi(params)
// },
// // 下拉刷新
// refreshList() {
// // console.log('onPullDownRefresh: ');
// let { clueParams } = this.data
// this.getClueInit(clueParams)
// // this.resetCluelist()
// // this.onLoad()
// wx.pro.showToast({
// title: '刷新成功',
// icon: 'loading',
// duration: 1500
// })
// },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!