Commit e3b7a92f by chenwq

看产值-我的门店

1 parent b0a92bf4
......@@ -34,20 +34,20 @@ Component({
openedIcon: `${IMG_URL}/output/openedIcon.png`,
custSceneList: [
{
title: '新车洽谈场景',
subTitle: '1.0新车权益升级'
title: '膜升级驻点',
// subTitle: '1.0新车权益升级'
},
{
title: '新车交付场景',
subTitle: '1.1新车精品升级'
title: '次新车二次转化',
// subTitle: '1.1新车精品升级'
},
{
title: '0-6个月',
subTitle: '1.2次新车膨胀金活动'
title: '售后众筹',
// subTitle: '1.2次新车膨胀金活动'
},
{
title: '6个月以上',
subTitle: '1.3售后直播众筹活动'
title: '车险损升级',
// subTitle: '1.3售后直播众筹活动'
}
]
},
......
......@@ -104,7 +104,7 @@
.total-price {
height: 40rpx;
line-height: 40rpx;
margin-top: 22rpx;
margin-top: 36rpx;
font-size: 24rpx;
color: #3666FE;
/* font-weight: 600; */
......
......@@ -221,10 +221,13 @@ Component({
obj.totalOrder = dataList[index]?.totalOrder || 0
obj.merchantName = dataList[index]?.merchantName
obj.merchantId = item
obj.startInd =
let topObj = dataList[index]?.sceneList.shift()
dataList[index]?.sceneList.push(topObj)
const startInd =
dataList[index]?.sceneList.findIndex(item => {
return item != null
}) || -1
})
obj.startInd = typeof startInd === 'number'?startInd:-1
obj.showNothingSceneCon = item.startInd == -1
obj.showList = dataList[index]?.sceneList || []
// obj.norList = type?obj.
......@@ -242,10 +245,9 @@ Component({
let index = list[current].startInd
// console.log(index)
// 动态计算swiper 高度
if ([0, -1].includes(index)) {
if ([3, -1].includes(index)) {
swiperHeight = 483
} else if ([1, 2].includes(index)) {
console.log(list[current])
} else if ([0, 1].includes(index)) {
if (list[current]['showList'][index]['diagnoseList']) {
swiperHeight = 600
} else {
......@@ -275,18 +277,14 @@ Component({
console.log(e)
let { list } = this.data
let { index, item } = e.currentTarget.dataset
console.log(item)
let { sceneIdx } = e.detail
sceneIdx = sceneIdx - 1
console.log(sceneIdx)
console.log(index)
let swiperHeight
// 动态计算swiper 高度
console.log(item.startInd)
// 最后要判断 sceneIdx 为空也能切换的兼容问题
if (sceneIdx == 0 || item.startInd == -1 || item['showList'][sceneIdx] == null) {
swiperHeight = 483
} else if ([1, 2].includes(sceneIdx)) {
} else if ([0, 1].includes(sceneIdx)) {
// console.log(item['diagnoseList'])
// item['showList'][index]['diagnoseList']
if (item['showList'][sceneIdx]?.diagnoseList) {
......@@ -325,20 +323,20 @@ Component({
})
},
setMerchantObj(index, item, selectName, oldItem) {
console.log(item)
item = item[0]
let obj = {}
obj.selectName = selectName || oldItem.selectName
obj.selectName = selectName || oldItem?.selectName
obj.totalMoney = setPrice(item?.totalMoney || 0)
obj.totalOrder = item?.totalOrder || 0
obj.merchantName = item?.merchantName
// obj.merchantId = item
obj.startInd =
oldItem?.startInd ||
item?.sceneList.findIndex(item => {
return item != null
}) ||
-1
let topObj = item?.sceneList.shift()
item?.sceneList.push(topObj)
const startInd =
dataList[index]?.sceneList.findIndex(item => {
return item != null
})
obj.startInd = typeof startInd === 'number' ?startInd:-1
obj.showNothingSceneCon = obj.startInd == -1
obj.showList = item?.sceneList || []
// obj.norList = type?obj.
......@@ -347,9 +345,7 @@ Component({
let { list } = this.data
// item.list[index] = list[index]
// console.log('listObj', listObj)
console.log(obj.selectName)
let listObj = `list[${index}]`
console.log('sceneIndx', obj.startInd)
this.setData({
[listObj]: Object.assign(list[index], obj)
})
......@@ -358,12 +354,11 @@ Component({
console.log(e)
let { list, userInfo } = this.data
let { current } = e.detail
console.log(list[current].startInd)
let swiperHeight
// 动态计算swiper 高度
if (list[current].startInd == 0 || list[current].startInd == -1) {
if (list[current].startInd == 3 || list[current].startInd == -1) {
swiperHeight = 483
} else if ([1, 2].includes(list[current].startInd)) {
} else if ([0, 1].includes(list[current].startInd)) {
let subscript = list[current]['startInd']
let item = list[current]['showList']
if (item[subscript]?.diagnoseList) {
......@@ -374,7 +369,6 @@ Component({
} else {
swiperHeight = 485
}
// console.log(swiperHeight)
this.setData({
totalMoney: list[current].totalMoney || 0,
totalOrder: list[current].totalOrder || 0,
......@@ -385,7 +379,6 @@ Component({
// list[current].startInd == 0? ''
// 692
console.log('swiper', list[current].startInd)
// list
if (current >= 1 && list[current + 1] && list[current + 1].startInd == -1) {
// 请求
......
......@@ -38,9 +38,9 @@
<view class="title">产值图</view>
<view class="swiperCon" wx:if="{{item['showList']}}">
<view class="swiper-item ">
<view class="fluuelCon {{item.startInd!=3?'longHeight':'shortHeight'}}">
<image class="bg-image " src="{{item.startInd!=3?IMAGES.funnelNew :IMAGES.funnelNewSm}}" />
<block wx:for="{{item.startInd!=3? funnelList['start']: funnelList['end']}}" wx:key="*this" wx:for-index="ind" wx:for-item="funneItem">
<view class="fluuelCon {{item.startInd!=2?'longHeight':'shortHeight'}}">
<image class="bg-image " src="{{item.startInd!=2?IMAGES.funnelNew :IMAGES.funnelNewSm}}" />
<block wx:for="{{item.startInd!=2? funnelList['start']: funnelList['end']}}" wx:key="*this" wx:for-index="ind" wx:for-item="funneItem">
<view class="funneItem">
<view class="label">{{funneItem['label']}}</view>
<view class="num font-number">
......@@ -50,7 +50,7 @@
</block>
</view>
<!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" -->
<view class="statisticsCon" hidden="{{item.startInd ==3}}">
<view class="statisticsCon" hidden="{{item.startInd ==2}}">
<!-- 统计 -->
<view class="merchantCount">
<view class="turnover">
......@@ -86,7 +86,7 @@
查看订单详情
</navigator>
</view>
<view class="statisticsCon" hidden="{{item.startInd !=3}}">
<view class="statisticsCon" hidden="{{item.startInd !=2}}">
<!-- 统计 -->
<view class="merchantCount crowdFundingTotal">
<view class="turnover">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!