Commit e1796328 by 杨明

产值

1 parent 8be8e62a
Component({
properties: {
data: {
type: Object,
value: {},
observer(v) {
if(!v)return
let s = v.statics
if (s) {
v.numList = [
{title: '浏览量', num: s.browseCount},
{title: '访客量', num: s.fansCount},
{title: '订单量', num: s.orderCount}
]
v.sortList = [
{title: '访客率', sort: s.fansRate},
{title: '转化率', sort: s.conversionRate}
]
properties: {
data: {
type: Object,
value: {},
observer(v) {
if (!v) return
let s = v
if (s) {
v.numList = [
{ title: '浏览量(次)', num: s.browsCount },
{ title: '访客量(人)', num: s.visitCount },
{ title: '订单量(单)', num: s.orderCount }
]
v.sortList = [
{ title: '访客率', sort: Number(s.fansRate).toFixed(2) },
{ 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 */
.title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
}
.funnel-box {
padding: 32rpx 0;
position: relative;
.funnel-bg {
position: absolute;
top: 40rpx;
left: 50%;
transform: translate(-50%);
// width: 458.18rpx;
// height: 298rpx;
width: 686rpx;
height: 408rpx;
image {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
}
.funnel-box {
padding: 40rpx 0;
position: relative;
.funnel-bg {
position: absolute;
top: 40rpx;
left: 50%;
transform: translate(-50%);
// width: 406rpx;
// height: 288rpx;
width: 686rpx;
height: 408rpx;
// width: 458.18rpx;
// height: 298rpx;
image {
width: 686rpx;
height: 408rpx;
// width: 406rpx;
// height: 288rpx;
}
}
}
.funnel-content {
display: flex;
justify-content: center;
height: 408rpx;
width: 100%;
padding-top: 40rpx;
.left,
.right {
.funnel-content {
display: flex;
}
.left {
flex: 0 0 406rpx;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
// align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20rpx;
view {
justify-content: center;
height: 320rpx;
width: 100%;
padding-top: 40rpx;
.left,
.right {
display: flex;
align-items: center;
margin-right: 28rpx;
text {
font-size: 28rpx;
font-weight: bold;
margin-left: 4rpx;
}
}
}
.right {
flex: 1;
flex-flow: column;
align-items: flex-start;
margin-left: 130rpx;
color: #4466F0;
padding-top: 20rpx;
font-size: 24rpx;
position: relative;
.sort-box:last-child {
position: absolute;
left: -46rpx;
top: 50%;
.left {
flex: 0 0 380rpx;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
height: 360rpx;
// align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
box-sizing: border-box;
padding-right: 33rpx;
.labelText:last-child{
.num{
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 {
font-size: 40rpx;
font-weight: bold;
margin-top: 4rpx;
.right {
flex: 1;
flex-flow: column;
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
......@@ -4,13 +4,14 @@
</view>
<view class="funnel-content">
<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 class="right">
<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>
</view>
</view>
</view>
</view>
......@@ -80,6 +80,10 @@ Component({
scene1TotalSign: (item.curMonthTotalData.scene1Total - item.lastMonthTotalData.scene1Total) > 0,
scene3Total: Math.abs(item.curMonthTotalData.scene3Total - item.lastMonthTotalData.scene3Total),
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({
......
......@@ -19,16 +19,20 @@
display: flex;
align-items: center;
}
.scene-item {
border-top: 0.3rpx solid #E4E6EE;
padding-top: 4rpx;
.list {
border-top: none;
&:nth-child(2) {
border-top: none;
}
}
}
.scene-item-b {
margin-bottom: 26rpx;
font-size: 24rpx;
......@@ -39,6 +43,7 @@
text-align: center;
background-image: linear-gradient(270deg, #FFECEC 0%, #DCEEFF 100%);
border-radius: 0 8rpx 8rpx 0;
&.long-scene {
width: 204rpx;
}
......@@ -64,6 +69,19 @@
font-weight: 700;
font-size: 36rpx;
color: #4772FC;
&.text-right {
text-align: right;
}
}
.contrast-wrap {
display: flex;
.contrast-text {
font-size: 22rpx;
color: #B6B7B7;
margin-right: 6rpx;
}
}
.num-grey {
......
......@@ -40,9 +40,10 @@
<text class="tips-store">{{subItem.scene}}</text>
</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 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 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>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!