Commit e1796328 by 杨明

产值

1 parent 8be8e62a
Component({ Component({
properties: { properties: {
data: { data: {
type: Object, type: Object,
value: {}, value: {},
observer(v) { observer(v) {
if(!v)return if (!v) return
let s = v.statics let s = v
if (s) { if (s) {
v.numList = [ v.numList = [
{title: '浏览量', num: s.browseCount}, { title: '浏览量(次)', num: s.browsCount },
{title: '访客量', num: s.fansCount}, { title: '访客量(人)', num: s.visitCount },
{title: '订单量', num: s.orderCount} { title: '订单量(单)', num: s.orderCount }
] ]
v.sortList = [ v.sortList = [
{title: '访客率', sort: s.fansRate}, { title: '访客率', sort: Number(s.fansRate).toFixed(2) },
{title: '转化率', sort: s.conversionRate} { title: '转化率', sort: Number(s.conversionRate).toFixed(2) }
] ]
}
this.setData({ data: v })
}
} }
this.setData({data: v}) },
}
}
},
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
} }
}) })
/* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */ /* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */
.title { .title {
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
color: #1B233D; color: #1B233D;
line-height: 48rpx; line-height: 48rpx;
} }
.funnel-box { .funnel-box {
padding: 32rpx 0; padding: 40rpx 0;
position: relative; position: relative;
.funnel-bg { .funnel-bg {
position: absolute; position: absolute;
top: 40rpx; top: 40rpx;
left: 50%; left: 50%;
transform: translate(-50%); transform: translate(-50%);
// width: 458.18rpx; // width: 406rpx;
// height: 298rpx; // height: 288rpx;
width: 686rpx;
height: 408rpx;
image {
width: 686rpx; width: 686rpx;
height: 408rpx; height: 408rpx;
// width: 458.18rpx;
// height: 298rpx; image {
width: 686rpx;
height: 408rpx;
// width: 406rpx;
// height: 288rpx;
}
} }
}
.funnel-content {
.funnel-content {
display: flex;
justify-content: center;
height: 408rpx;
width: 100%;
padding-top: 40rpx;
.left,
.right {
display: flex; display: flex;
} justify-content: center;
height: 320rpx;
.left { width: 100%;
flex: 0 0 406rpx; padding-top: 40rpx;
flex-flow: column;
justify-content: space-around; .left,
align-items: flex-end; .right {
// align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20rpx;
view {
display: flex; display: flex;
align-items: center;
margin-right: 28rpx;
text {
font-size: 28rpx;
font-weight: bold;
margin-left: 4rpx;
}
} }
}
.left {
.right { flex: 0 0 380rpx;
flex: 1; flex-flow: column;
flex-flow: column; justify-content: space-around;
align-items: flex-start; align-items: flex-end;
margin-left: 130rpx; height: 360rpx;
color: #4466F0; // align-items: center;
padding-top: 20rpx; z-index: 1;
font-size: 24rpx; font-size: 22rpx;
position: relative; color: #2D2D33;
box-sizing: border-box;
.sort-box:last-child { padding-right: 33rpx;
position: absolute; .labelText:last-child{
left: -46rpx; .num{
top: 50%; color: #FFFFFF;
}
}
.item-0{
margin-top: 20rpx;
}
.item-1{
margin-top: 20rpx;
}
.item-2{
margin-top: 23rpx;
}
view {
box-sizing: border-box;
display: flex;
align-items: center;
margin-right: 28rpx;
justify-content: space-between;
width: 100%;
padding-left: 40rpx;
.num {
font-size: 28rpx;
font-weight: 700;
// margin-left: 4rpx;
color: #3666FE;
}
.lable {
font-weight: 400;
font-size: 24rpx;
color: #323436;
}
}
} }
.sort { .right {
font-size: 40rpx; flex: 1;
font-weight: bold; flex-flow: column;
margin-top: 4rpx; align-items: flex-start;
margin-left: 130rpx;
// color: #4466F0;
color: #3666FE;
padding-top: 85rpx;
font-size: 24rpx;
position: relative;
.sort-box {
font-weight: 400;
font-size: 24rpx;
color: #323436;
.sort {
font-weight: 700;
font-size: 28rpx;
color: #3666FE;
}
}
.sort-box:last-child {
position: absolute;
left: 0rpx;
top: 64%;
}
.sort {
font-size: 40rpx;
font-weight: bold;
margin-top: 4rpx;
}
} }
} }
}
}
\ No newline at end of file \ No newline at end of file
}
\ No newline at end of file \ No newline at end of file
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
</view> </view>
<view class="funnel-content"> <view class="funnel-content">
<view class="left"> <view class="left">
<view wx:for="{{data.numList}}" wx:key="index">{{item.title}}<text>{{item.num}}</text></view> <view class="labelText item-{{index}}" wx:for="{{data.numList}}" wx:key="index"><text class="label ">{{item.title}}</text><text class="num">{{item.num||0}}</text></view>
</view> </view>
<view class="right"> <view class="right">
<view class="sort-box" wx:for="{{data.sortList}}" wx:key="index"> <view class="sort-box" wx:for="{{data.sortList}}" wx:key="index">
<view>{{item.title}}</view> <view class="label">{{item.title}}</view>
<view class="sort">{{item.sort}}%</view> <view class="sort">{{item.sort}}%</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
...@@ -80,6 +80,10 @@ Component({ ...@@ -80,6 +80,10 @@ Component({
scene1TotalSign: (item.curMonthTotalData.scene1Total - item.lastMonthTotalData.scene1Total) > 0, scene1TotalSign: (item.curMonthTotalData.scene1Total - item.lastMonthTotalData.scene1Total) > 0,
scene3Total: Math.abs(item.curMonthTotalData.scene3Total - item.lastMonthTotalData.scene3Total), scene3Total: Math.abs(item.curMonthTotalData.scene3Total - item.lastMonthTotalData.scene3Total),
scene3TotalSign: (item.curMonthTotalData.scene3Total - item.lastMonthTotalData.scene3Total) > 0, scene3TotalSign: (item.curMonthTotalData.scene3Total - item.lastMonthTotalData.scene3Total) > 0,
scene1SolarFilmTotal:Math.abs(item.curMonthTotalData.scene1SolarFilmTotal - item.lastMonthTotalData.scene1SolarFilmTotal),
scene1SolarFilmTotalSign:(item.curMonthTotalData.scene1SolarFilmTotal - item.lastMonthTotalData.scene1SolarFilmTotal)>0,
scene1BoutiqueTotal:Math.abs(item.curMonthTotalData.scene1BoutiqueTotal - item.lastMonthTotalData.scene1BoutiqueTotal),
scene1BoutiqueTotalSign:(item.curMonthTotalData.scene1BoutiqueTotal - item.lastMonthTotalData.scene1BoutiqueTotal)>0
}) })
}) })
this.setData({ this.setData({
......
...@@ -19,16 +19,20 @@ ...@@ -19,16 +19,20 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.scene-item { .scene-item {
border-top: 0.3rpx solid #E4E6EE; border-top: 0.3rpx solid #E4E6EE;
padding-top: 4rpx; padding-top: 4rpx;
.list { .list {
border-top: none; border-top: none;
&:nth-child(2) { &:nth-child(2) {
border-top: none; border-top: none;
} }
} }
} }
.scene-item-b { .scene-item-b {
margin-bottom: 26rpx; margin-bottom: 26rpx;
font-size: 24rpx; font-size: 24rpx;
...@@ -39,6 +43,7 @@ ...@@ -39,6 +43,7 @@
text-align: center; text-align: center;
background-image: linear-gradient(270deg, #FFECEC 0%, #DCEEFF 100%); background-image: linear-gradient(270deg, #FFECEC 0%, #DCEEFF 100%);
border-radius: 0 8rpx 8rpx 0; border-radius: 0 8rpx 8rpx 0;
&.long-scene { &.long-scene {
width: 204rpx; width: 204rpx;
} }
...@@ -64,6 +69,19 @@ ...@@ -64,6 +69,19 @@
font-weight: 700; font-weight: 700;
font-size: 36rpx; font-size: 36rpx;
color: #4772FC; color: #4772FC;
&.text-right {
text-align: right;
}
}
.contrast-wrap {
display: flex;
.contrast-text {
font-size: 22rpx;
color: #B6B7B7;
margin-right: 6rpx;
}
} }
.num-grey { .num-grey {
......
...@@ -40,9 +40,10 @@ ...@@ -40,9 +40,10 @@
<text class="tips-store">{{subItem.scene}}</text> <text class="tips-store">{{subItem.scene}}</text>
</view> </view>
<view> <view>
<view class="num-blue"><text class="f-24">¥</text>{{filter.money_three_for_two_thousands(item.curMonthTotalData[subItem.name] || 0)}} <view class="num-blue text-right"><text class="f-24">¥</text>{{filter.money_three_for_two_thousands(item.curMonthTotalData[subItem.name] || 0)}}
</view> </view>
<view wx:if="{{switchChecked}}"> <view wx:if="{{switchChecked}}" class="contrast-wrap">
<view class="contrast-text">较上月</view>
<view class="num-grey" wx:if="{{compareList[index][subItem.name] == 0 || compareList[index][subItem.name] < 1}}">0</view> <view class="num-grey" wx:if="{{compareList[index][subItem.name] == 0 || compareList[index][subItem.name] < 1}}">0</view>
<view wx:else class="{{compareList[index][subItem.name + 'Sign'] ? 'num-red' : 'num-green'}}"><text>{{compareList[index][subItem.name + 'Sign'] ? '+' : '-'}}</text>¥{{filter.money_three_for_two_thousands(compareList[index][subItem.name])}}</view> <view wx:else class="{{compareList[index][subItem.name + 'Sign'] ? 'num-red' : 'num-green'}}"><text>{{compareList[index][subItem.name + 'Sign'] ? '+' : '-'}}</text>¥{{filter.money_three_for_two_thousands(compareList[index][subItem.name])}}</view>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!