Commit f752a9df by chenwq

增值转化

1 parent 72c07264
......@@ -8,11 +8,11 @@ Page({
data: {
editForm: {
sales: 100,
count: 1
userNum: 10000
},
actualForm: {
sales: 100,
count: 1
userNum: 10000
},
IMGURL: wx.$imgUrl,
height: 'calc(100vh - 100rpx)',
......@@ -131,7 +131,6 @@ Page({
},
handleConfirm() {
console.log('提交---')
this.setData({
actualForm: this.data.editForm
})
......
......@@ -5,12 +5,12 @@
<view class="form-row flex">
<text class="form-label">门店月平均新车销量</text>
<input class="form-input" placeholder="请输入" type="number" value="{{editForm.sales}}" bindinput="handleInput" data-attr="editForm.sales" />
<text class="suffix">台</text>
<!-- <text class="suffix">台</text> -->
</view>
<view class="form-row flex">
<text class="form-label">门店总数</text>
<input class="form-input" placeholder="请输入" type="number" value="{{editForm.count}}" bindinput="handleInput" data-attr="editForm.count" />
<text class="suffix">家</text>
<text class="form-label">3年售后存量用户数</text>
<input class="form-input" placeholder="请输入" type="number" value="{{editForm.userNum}}" bindinput="handleInput" data-attr="editForm.userNum" />
<!-- <text class="suffix">家</text> -->
</view>
<button class="submit-btn" bindtap="handleConfirm">提交测算</button>
</view>
......@@ -19,7 +19,7 @@
<view class="layout">
<view class="head">我们的产品和服务</view>
<add-tab-view tabList="{{tabList}}" tagIndex="{{tagIndex}}" height="{{height}}" bindclick="handleTabClick">
<view wx:if="{{cardList.length}}">
<view class="tab-content-box" wx:if="{{cardList.length}}">
<view class="pos-relative" bindtap="handleIntroduceClick">
<view class="card-introduce">
<image class="introduce-img" src="{{IMGURL}}{{introduceObj.imgUrl}}?v={{img_version}}" />
......@@ -31,7 +31,7 @@
</view>
<view class="card-title-box">
<view>阶段产品</view>
<view class="tips">预估收益根据您的新车销量 {{ editForm.sales }}台 测算所得</view>
<view class="tips">预估收益根据您的新车销量 {{ editForm.sales || 0 }}台 测算所得</view>
</view>
<view wx:for="{{cardList}}" wx:key="index">
<card cardForm="{{item}}" actualForm="{{actualForm}}" sales="{{sales}}" bindclick="handleCardClick"></card>
......@@ -40,29 +40,31 @@
</add-tab-view>
</view>
<!-- 玩法介绍 -->
<view class="model" catchtouchmove="noScroll" bindtap="handleIntroduceClose" wx:if="{{introduceVisible}}">
<view>
<view class="model-box">
<image class="model-img" src="{{IMGURL}}addTransform/card/deliver/model-introduce.png?v={{img_version}}" />
<view class="model-block">
<view class="model-head">
<view class="head-title">{{introduceList[tagIndex].title}}</view>
<view>{{introduceList[tagIndex].subTitle}}</view>
</view>
<view class="model-content">
<view class="content-block" wx:for="{{introduceList[tagIndex].contentList}}" wx:key="index">
<image class="content-icon" src="{{IMGURL}}addTransform/card/deliver/model-{{item.icon}}.png?v={{img_version}}" />
<view>
<view class="content-title">{{item.title}}</view>
<view class="content-row" wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex">
<view class="content-txt" wx:if="{{subItem.name}}">{{subItem.name}}</view>
<view class="content-tip">{{subItem.tip}}</view>
<view class="pos-relative">
<view class="{{introduceVisible ? 'model' : 'model-hidden'}}" catchtouchmove="noScroll" bindtap="handleIntroduceClose">
<view>
<view class="model-box">
<image class="model-img" src="{{IMGURL}}addTransform/card/deliver/model-introduce.png?v={{img_version}}" />
<view class="model-block">
<view class="model-head">
<view class="head-title">{{introduceList[tagIndex].title}}</view>
<view>{{introduceList[tagIndex].subTitle}}</view>
</view>
<view class="model-content">
<view class="content-block" wx:for="{{introduceList[tagIndex].contentList}}" wx:key="index">
<image class="content-icon" src="{{IMGURL}}addTransform/card/deliver/model-{{item.icon}}.png?v={{img_version}}" />
<view>
<view class="content-title">{{item.title}}</view>
<view class="content-row" wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex">
<view class="content-txt" wx:if="{{subItem.name}}">{{subItem.name}}</view>
<view class="content-tip">{{subItem.tip}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="model-btn">知道了</view>
</view>
<view class="model-btn">知道了</view>
</view>
</view>
\ No newline at end of file
......@@ -76,6 +76,10 @@ page {
color: #FFFFFF;
}
.tab-content-box {
margin: 16rpx 16rpx;
}
.pos-relative {
position: relative;
z-index: 1;
......@@ -131,6 +135,12 @@ page {
margin-top: 8rpx;
}
.model-hidden {
position: fixed;
left: -1000000;
top: -100000;
}
.model {
display: flex;
justify-content: center;
......
......@@ -13,7 +13,14 @@
width: 78.66%;
height: 100%;
position: relative;
padding: 16rpx 32rpx;
padding: 0px 16rpx;
}
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
.tab-item {
......
......@@ -62,12 +62,37 @@ Component({
},
calcProfit() {
var targetItem = this.data.cardForm
let sales = +this.data.actualForm.sales
let sales = +this.data.actualForm.sales || 0
let userNum = +this.data.actualForm.userNum || 0
let defaultPrice = +targetItem.priceList[0].value
if(targetItem.detailAttrName) {
switch(targetItem.detailAttrName) {
case 'digitRight':
targetItem.profit = sales * 0.5 * defaultPrice * 12
targetItem.profit = (sales * 0.5 * defaultPrice * 12).toFixed(0) + ''
break
case 'sunMembrane':
targetItem.profit = (sales * 0.8 * 0.7 * defaultPrice * 12).toFixed(0) + ''
break
case 'paintMembrane':
targetItem.profit = (userNum * 0.15 * defaultPrice * 12).toFixed(0) + ''
break
case 'colorMembrane':
targetItem.profit = (userNum * 0.05 * defaultPrice * 12).toFixed(0) + ''
break
case 'digitBeauty':
targetItem.profit = (sales * 0.2 * defaultPrice * 12).toFixed(0) + ''
break
case 'chair':
targetItem.profit = (userNum * defaultPrice * 0.9 * 0.01).toFixed(0) + ''
break
case 'ar':
targetItem.profit = (userNum * defaultPrice * 0.9 * 0.15).toFixed(0) + ''
break
case 'lamp':
targetItem.profit = (userNum * defaultPrice * 0.9 * 0.15).toFixed(0) + ''
break
case 'navigation':
targetItem.profit = (userNum * defaultPrice * 0.9 * 0.15).toFixed(0) + ''
break
default:
break
......
......@@ -26,7 +26,7 @@ var tabList = [{
name: '豪华品牌',
value: '2000'
}],
profit: '1260'
profit: '10080000'
}]
}, {
name: ['新车', '磨合期'],
......@@ -41,9 +41,9 @@ var tabList = [{
type: 'membrane',
priceList: [{
name: '均客单价',
value: '13000'
value: '12000'
}],
profit: '880'
profit: '2160000'
}, {
proName: '改色膜',
detailAttrName: 'colorMembrane',
......@@ -53,7 +53,7 @@ var tabList = [{
name: '均客单价',
value: '5000'
}],
profit: '880'
profit: '300000'
}]
}, {
name: ['用车', '热络期'],
......@@ -68,9 +68,9 @@ var tabList = [{
type: 'beauty',
priceList: [{
name: '均客单价',
value: '350'
value: '300'
}],
profit: '880'
profit: '72000'
}, {
proName: '座椅通风',
detailAttrName: 'chair',
......@@ -78,7 +78,7 @@ var tabList = [{
type: 'light',
priceList: [{
name: '均客单价',
value: '500'
value: '2580'
}],
profit: '880'
}, {
......@@ -88,7 +88,7 @@ var tabList = [{
type: 'light',
priceList: [{
name: '均客单价',
value: '1600'
value: '1680'
}],
profit: '880'
}, {
......@@ -98,7 +98,7 @@ var tabList = [{
type: 'light',
priceList: [{
name: '均客单价',
value: '2000'
value: '2680'
}],
profit: '880'
}, {
......@@ -108,7 +108,7 @@ var tabList = [{
type: 'light',
priceList: [{
name: '均客单价',
value: '2500'
value: '2880'
}],
profit: '880'
}]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!