Commit f752a9df by chenwq

增值转化

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