Commit 5dfc6255 by 张立顺

bug fix

2 parents b797b972 79abc4b9
...@@ -57,8 +57,9 @@ Component({ ...@@ -57,8 +57,9 @@ Component({
activeNavIdx:this.data.wrapactiveNavIdx activeNavIdx:this.data.wrapactiveNavIdx
}) })
} }
console.log('outshowVideo', this.data.outshowVideo)
if(!this.data.outshowVideo){ if(!this.data.outshowVideo){
console.log('outshowVideo', this.data.outshowVideo)
this.setData({ this.setData({
showVideo:false showVideo:false
}) })
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
</view> </view>
<view class="prod-info"> <view class="prod-info">
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text> <text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].changeSale || senceData[actNum]['productList'][activeNavIdx].sale}}</text> <!-- senceData[actNum]['productList'][activeNavIdx].changeSale || -->
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].varType == 1? senceData[actNum]['productList'][activeNavIdx].flow : senceData[actNum]['productList'][activeNavIdx].sale}}</text>
</text> </text>
<text class="earnings" decode="{{true}}">预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text> <text class="earnings" decode="{{true}}">预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text> </text>
......
...@@ -22,6 +22,7 @@ var senceData = [ ...@@ -22,6 +22,7 @@ var senceData = [
path: 'equity', path: 'equity',
sale:100 ,//销量 sale:100 ,//销量
varType: 0, varType: 0,
flow:10000,
"productCode":"PC001", "productCode":"PC001",
"productName":"数字无忧权益卡", "productName":"数字无忧权益卡",
"category":"服务类", "category":"服务类",
...@@ -70,6 +71,7 @@ var senceData = [ ...@@ -70,6 +71,7 @@ var senceData = [
path: 'solarFilm', path: 'solarFilm',
sale:100, //销量 sale:100, //销量
varType: 0, varType: 0,
flow:10000,
"productCode":"PC002", "productCode":"PC002",
"productName":"汽车太阳膜", "productName":"汽车太阳膜",
"category":"膜类", "category":"膜类",
...@@ -103,6 +105,7 @@ var senceData = [ ...@@ -103,6 +105,7 @@ var senceData = [
path: 'paintProtect', path: 'paintProtect',
sale:100, //销量 sale:100, //销量
varType: 1, varType: 1,
flow:10000,
"productCode":"PC003", "productCode":"PC003",
"productName":"漆面保护膜(车衣)", "productName":"漆面保护膜(车衣)",
"category":"膜类", "category":"膜类",
...@@ -117,6 +120,7 @@ var senceData = [ ...@@ -117,6 +120,7 @@ var senceData = [
path: 'changingFilm', path: 'changingFilm',
sale:100, //销量 sale:100, //销量
varType: 1, varType: 1,
flow:10000,
"productCode":"PC004", "productCode":"PC004",
"productName":"改色膜", "productName":"改色膜",
"category":"膜类", "category":"膜类",
...@@ -143,6 +147,7 @@ var senceData = [ ...@@ -143,6 +147,7 @@ var senceData = [
path: 'carBeauty', path: 'carBeauty',
sale:100, //销量 sale:100, //销量
varType: 0, varType: 0,
flow:10000,
"productCode":"PC005", "productCode":"PC005",
"productName":"数字化美容", "productName":"数字化美容",
"category":"美容类", "category":"美容类",
...@@ -157,6 +162,7 @@ var senceData = [ ...@@ -157,6 +162,7 @@ var senceData = [
path: 'seatVentilate', path: 'seatVentilate',
sale:10000, //销量 sale:10000, //销量
varType: 1, varType: 1,
flow:10000,
"productCode":"PC006", "productCode":"PC006",
"productName":"座椅通风", "productName":"座椅通风",
"category":"轻改类", "category":"轻改类",
...@@ -171,6 +177,7 @@ var senceData = [ ...@@ -171,6 +177,7 @@ var senceData = [
path: 'arNavigation', path: 'arNavigation',
sale:10000, //销量 sale:10000, //销量
varType: 1, varType: 1,
flow:10000,
"productCode":"PC007", "productCode":"PC007",
"productName":"AR导航", "productName":"AR导航",
"category":"轻改类", "category":"轻改类",
...@@ -185,6 +192,7 @@ var senceData = [ ...@@ -185,6 +192,7 @@ var senceData = [
path: 'ambientLighting', path: 'ambientLighting',
sale:10000, //销量 sale:10000, //销量
varType: 1, varType: 1,
flow:10000,
"productCode":"PC008", "productCode":"PC008",
"productName":"氛围灯", "productName":"氛围灯",
"category":"轻改类", "category":"轻改类",
...@@ -199,6 +207,7 @@ var senceData = [ ...@@ -199,6 +207,7 @@ var senceData = [
path: 'navigationArround', path: 'navigationArround',
sale:10000, //销量 sale:10000, //销量
varType: 1, varType: 1,
flow:10000,
"productCode":"PC009", "productCode":"PC009",
"productName":"360全景导航", "productName":"360全景导航",
"category":"轻改类", "category":"轻改类",
......
...@@ -213,11 +213,20 @@ Page({ ...@@ -213,11 +213,20 @@ Page({
}, },
// 提交测算 // 提交测算
submit(e) { submit(e) {
<<<<<<< HEAD
console.log(e) console.log(e)
let sales = e ? +e.detail.value.sales : this.data.formData.sales let sales = e ? +e.detail.value.sales : this.data.formData.sales
let flow = e ? +e.detail.value.flow : this.data.formData.flow let flow = e ? +e.detail.value.flow : this.data.formData.flow
const reg = /^[1-9]\d*$/ const reg = /^[1-9]\d*$/
console.log(reg.test(sales), flow, '---') console.log(reg.test(sales), flow, '---')
=======
console.log(e);
let sales = e ? +e.detail.value.sales : this.data.formData.sales;
let flow = e ? +e.detail.value.flow : this.data.formData.flow;
console.log('flow',sales,flow)
const reg = /^[1-9]\d*$/;
console.log(reg.test(sales), flow, "---");
>>>>>>> 79abc4b9c737b04214efde25436bd78cadbc6b51
if (!reg.test(sales)) { if (!reg.test(sales)) {
wx.showToast({ wx.showToast({
title: '门店月平均新车销量应为正整数', title: '门店月平均新车销量应为正整数',
...@@ -255,6 +264,7 @@ Page({ ...@@ -255,6 +264,7 @@ Page({
this.data.senceData.forEach((item, index) => { this.data.senceData.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => { item.productList.forEach((i, lastIndex) => {
if (i.profit) { if (i.profit) {
<<<<<<< HEAD
let sale = `senceData[${index}].productList[${lastIndex}].sale` let sale = `senceData[${index}].productList[${lastIndex}].sale`
let name = `senceData[${index}].productList[${lastIndex}].profit` let name = `senceData[${index}].productList[${lastIndex}].profit`
let profit = _this.formula(i.productType, sales, flow) let profit = _this.formula(i.productType, sales, flow)
...@@ -263,6 +273,18 @@ Page({ ...@@ -263,6 +273,18 @@ Page({
[name]: profit, [name]: profit,
[sale]: sales [sale]: sales
}) })
=======
let sale = `senceData[${index}].productList[${lastIndex}].sale`;
let name = `senceData[${index}].productList[${lastIndex}].profit`;
let flowKey = `senceData[${index}].productList[${lastIndex}].flow`;
let profit = _this.formula(i.productType, sales, flow);
console.log(name, profit);
this.setData({
[name]: profit,
[sale]: sales,
[flowKey]: flow,
});
>>>>>>> 79abc4b9c737b04214efde25436bd78cadbc6b51
} }
}) })
}) })
......
...@@ -366,6 +366,7 @@ page { ...@@ -366,6 +366,7 @@ page {
padding: 0; padding: 0;
font-weight: 500; font-weight: 500;
color: #5850FF; color: #5850FF;
width:auto;
} }
.btn-primary::after { .btn-primary::after {
border: none; border: none;
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
<!-- 在线客服 --> <!-- 在线客服 -->
<image class="chat" src="{{IMG_URL}}index/contact.png" bindtap="goConsult" /> <image class="chat" src="{{IMG_URL}}index/contact.png" bindtap="goConsult" />
<!-- 预估产值 --> <!-- 预估产值 -->
<image class="output-value" bindtap="showCalculate" src="{{IMG_URL}}index/valuation.png" /> <image class="output-value" bindtap="showCalculate" src="{{IMG_URL}}index/valuation.png" wx:if="{{tabIndx == 1}}" />
<!-- 预估产值弹框 --> <!-- 预估产值弹框 -->
<view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}"> <view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}">
<view class="dialog-box"> <view class="dialog-box">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!