Commit 0235bd4a by chenwq

点击事件,添加搜索条件

1 parent 481a4da4
...@@ -110,7 +110,6 @@ Page({ ...@@ -110,7 +110,6 @@ Page({
}, },
setCurActivity() { setCurActivity() {
// console.log('setCurActivity---')
this.setData({ this.setData({
activityList: JSON.parse(JSON.stringify(this.data.sceneActivityObj['scene' + this.findSceneIdx()])), activityList: JSON.parse(JSON.stringify(this.data.sceneActivityObj['scene' + this.findSceneIdx()])),
// productStatus:0未申请;1申请中;2已开通;3:已结束 // productStatus:0未申请;1申请中;2已开通;3:已结束
...@@ -138,7 +137,6 @@ Page({ ...@@ -138,7 +137,6 @@ Page({
}, },
handleJump(e) { handleJump(e) {
// console.log(this.data.activityList[this.data.activityActive])
var params = { var params = {
merchantInfo: this.data.merchantInfo, merchantInfo: this.data.merchantInfo,
sceneCodeActive: this.data.sceneCodeActive, sceneCodeActive: this.data.sceneCodeActive,
...@@ -212,10 +210,6 @@ Page({ ...@@ -212,10 +210,6 @@ Page({
sceneData: res, sceneData: res,
sceneInfo: this.data.sceneInfo, sceneInfo: this.data.sceneInfo,
sceneActivityObj: sceneActivityObj sceneActivityObj: sceneActivityObj
// ['sceneActivityObj.scene0']: data[0].productList,
// ['sceneActivityObj.scene1']: data[1].productList,
// ['sceneActivityObj.scene2']: data[2].productList,
// ['sceneActivityObj.scene3']: data[3].productList
}) })
// 首次进入,默认定位至SC004场景;需要调获取SC002和SC003场景的接口,以计算这两个场景的总额 // 首次进入,默认定位至SC004场景;需要调获取SC002和SC003场景的接口,以计算这两个场景的总额
if (isFirst) { if (isFirst) {
...@@ -230,7 +224,6 @@ Page({ ...@@ -230,7 +224,6 @@ Page({
this.getActivityRevenue(isFirst) this.getActivityRevenue(isFirst)
} }
} }
// console.log(this.data.sceneCodeActive == defaultSceneCode)
if (['SC002', 'SC003'].includes(this.data.sceneCodeActive)) { if (['SC002', 'SC003'].includes(this.data.sceneCodeActive)) {
this.getCustomerDetail() this.getCustomerDetail()
} else if (this.data.sceneCodeActive == 'SC001') { } else if (this.data.sceneCodeActive == 'SC001') {
...@@ -408,7 +401,6 @@ Page({ ...@@ -408,7 +401,6 @@ Page({
} }
var mockActivityList = this.data.mockObj?.crowdObj[obj.pIdx].merchantList[obj.idx].activityList var mockActivityList = this.data.mockObj?.crowdObj[obj.pIdx].merchantList[obj.idx].activityList
var actIds = mockActivityList.map(item => item.activityId) var actIds = mockActivityList.map(item => item.activityId)
// console.log(mockActivityList, 'mockActivityList')
data.activityList.forEach(item => { data.activityList.forEach(item => {
let idx = actIds.findIndex(k => k == item.activityId) let idx = actIds.findIndex(k => k == item.activityId)
if (idx != -1) { if (idx != -1) {
...@@ -421,13 +413,11 @@ Page({ ...@@ -421,13 +413,11 @@ Page({
/** 查询场景4的产值 */ /** 查询场景4的产值 */
getActivityRevenue(isFirst = false) { getActivityRevenue(isFirst = false) {
console.log(this.data.isMock, 'SC004--mock---')
wx.showLoading() wx.showLoading()
var params = this.dealSearchStatus() var params = this.dealSearchStatus()
outputApi outputApi
.getActivityRevenue({ merchantId: this.data.merchantInfo.merchantId, ...params }) .getActivityRevenue({ merchantId: this.data.merchantInfo.merchantId, ...params })
.then(res => { .then(res => {
// console.log(this.data.sceneActivityObj, '++++++')
var actList = this.data.sceneActivityObj['scene' + (isFirst ? this.findSceneIdx('SC004') : this.findSceneIdx())] var actList = this.data.sceneActivityObj['scene' + (isFirst ? this.findSceneIdx('SC004') : this.findSceneIdx())]
var total = 0 var total = 0
res.forEach(item => { res.forEach(item => {
...@@ -562,7 +552,6 @@ Page({ ...@@ -562,7 +552,6 @@ Page({
}, },
/**长按海报 */ /**长按海报 */
async longtouch(e) { async longtouch(e) {
// console.log('长按海报', e)
let { activityId } = e.detail let { activityId } = e.detail
const res = await outputApi.reportPosterTrack({ const res = await outputApi.reportPosterTrack({
activityId activityId
...@@ -621,7 +610,6 @@ Page({ ...@@ -621,7 +610,6 @@ Page({
let pList = this.data.mockObj.crowdObj.map(item => item.pMerchantId) let pList = this.data.mockObj.crowdObj.map(item => item.pMerchantId)
for (let i = 0; i < this.data.mockObj.crowdObj.length; i++) { for (let i = 0; i < this.data.mockObj.crowdObj.length; i++) {
let item = this.data.mockObj.crowdObj[i] let item = this.data.mockObj.crowdObj[i]
console.log(item, 'item---')
let cList = item.merchantList.map(k => k.merhantId) let cList = item.merchantList.map(k => k.merhantId)
if (cList.includes((id || this.data.merchantInfo.merchantId) + '') && pList.includes((pId || this.data.merchantInfo.pMerchantId) + '')) { if (cList.includes((id || this.data.merchantInfo.merchantId) + '') && pList.includes((pId || this.data.merchantInfo.pMerchantId) + '')) {
res = { res = {
...@@ -638,15 +626,12 @@ Page({ ...@@ -638,15 +626,12 @@ Page({
// 判断是否Mock数据写死 // 判断是否Mock数据写死
judgeAccount() { judgeAccount() {
console.log(this.data.merchantInfo, 'this.data.merchantInfo')
console.log(this.data.mockObj, 'this.data.mockObj')
// 精品升级-SC002 // 精品升级-SC002
// 售后众筹-SC004 // 售后众筹-SC004
this.setData({ this.setData({
['isMock.SC002']: this.judgeUpgrade().flag, ['isMock.SC002']: this.judgeUpgrade().flag,
['isMock.SC004']: this.judgeCrowd().flag ['isMock.SC004']: this.judgeCrowd().flag
}) })
console.log(this.data.isMock, 'isMock---')
}, },
async getMockInfo(userInfo) { async getMockInfo(userInfo) {
...@@ -655,7 +640,6 @@ Page({ ...@@ -655,7 +640,6 @@ Page({
mockObj: res, mockObj: res,
isShowService: res.serviceMerchatList.includes(userInfo.merchantId + '') isShowService: res.serviceMerchatList.includes(userInfo.merchantId + '')
}) })
console.log(this.data.isShowService, 'isShowService------')
}, },
// 二维码自动登录 // 二维码自动登录
...@@ -687,7 +671,8 @@ Page({ ...@@ -687,7 +671,8 @@ Page({
}) })
if(obj.fixSceneCode) { if(obj.fixSceneCode) {
this.setData({ this.setData({
sceneCodeActive: obj.fixSceneCode sceneCodeActive: obj.fixSceneCode,
fixScenceCode: obj.fixSceneCode
}) })
} }
......
// pages/tab/output/components/StaffSort/StaffSort.js // pages/tab/output/components/StaffSort/StaffSort.js
import { scenceList } from '~/pages/tab/index/constant/data' import { scenceList } from '~/pages/tab/index/constant/data'
const busiOptSceneCode = ['-1', 'SC001', 'SC002'] const busiOptSceneCode = ['-1', 'SC001', 'SC002', 'SC003']
import mineApi from '~/api/mineApi/index' import mineApi from '~/api/mineApi/index'
import { getNowMonth } from '~/utils/format' import { getNowMonth } from '~/utils/format'
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!