Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5dfc6255
authored
Oct 22, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
bug fix
2 parents
b797b972
79abc4b9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
3 deletions
pages/tab/index/components/product/product.js
pages/tab/index/components/product/product.wxml
pages/tab/index/constant/data.js
pages/tab/index/index.js
pages/tab/index/index.scss
pages/tab/index/index.wxml
pages/tab/index/components/product/product.js
View file @
5dfc625
...
...
@@ -57,8 +57,9 @@ Component({
activeNavIdx
:
this
.
data
.
wrapactiveNavIdx
})
}
console
.
log
(
'outshowVideo'
,
this
.
data
.
outshowVideo
)
if
(
!
this
.
data
.
outshowVideo
){
console
.
log
(
'outshowVideo'
,
this
.
data
.
outshowVideo
)
this
.
setData
({
showVideo
:
false
})
...
...
pages/tab/index/components/product/product.wxml
View file @
5dfc625
...
...
@@ -15,7 +15,8 @@
</view>
<view class="prod-info">
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}} <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 ? '三年售后存量数':'新车销量'}} <text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].varType == 1? senceData[actNum]['productList'][activeNavIdx].flow : senceData[actNum]['productList'][activeNavIdx].sale}}</text>
</text>
<text class="earnings" decode="{{true}}">预估收益 <text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text>
...
...
pages/tab/index/constant/data.js
View file @
5dfc625
...
...
@@ -22,6 +22,7 @@ var senceData = [
path
:
'equity'
,
sale
:
100
,
//销量
varType
:
0
,
flow
:
10000
,
"productCode"
:
"PC001"
,
"productName"
:
"数字无忧权益卡"
,
"category"
:
"服务类"
,
...
...
@@ -70,6 +71,7 @@ var senceData = [
path
:
'solarFilm'
,
sale
:
100
,
//销量
varType
:
0
,
flow
:
10000
,
"productCode"
:
"PC002"
,
"productName"
:
"汽车太阳膜"
,
"category"
:
"膜类"
,
...
...
@@ -103,6 +105,7 @@ var senceData = [
path
:
'paintProtect'
,
sale
:
100
,
//销量
varType
:
1
,
flow
:
10000
,
"productCode"
:
"PC003"
,
"productName"
:
"漆面保护膜(车衣)"
,
"category"
:
"膜类"
,
...
...
@@ -117,6 +120,7 @@ var senceData = [
path
:
'changingFilm'
,
sale
:
100
,
//销量
varType
:
1
,
flow
:
10000
,
"productCode"
:
"PC004"
,
"productName"
:
"改色膜"
,
"category"
:
"膜类"
,
...
...
@@ -143,6 +147,7 @@ var senceData = [
path
:
'carBeauty'
,
sale
:
100
,
//销量
varType
:
0
,
flow
:
10000
,
"productCode"
:
"PC005"
,
"productName"
:
"数字化美容"
,
"category"
:
"美容类"
,
...
...
@@ -157,6 +162,7 @@ var senceData = [
path
:
'seatVentilate'
,
sale
:
10000
,
//销量
varType
:
1
,
flow
:
10000
,
"productCode"
:
"PC006"
,
"productName"
:
"座椅通风"
,
"category"
:
"轻改类"
,
...
...
@@ -171,6 +177,7 @@ var senceData = [
path
:
'arNavigation'
,
sale
:
10000
,
//销量
varType
:
1
,
flow
:
10000
,
"productCode"
:
"PC007"
,
"productName"
:
"AR导航"
,
"category"
:
"轻改类"
,
...
...
@@ -185,6 +192,7 @@ var senceData = [
path
:
'ambientLighting'
,
sale
:
10000
,
//销量
varType
:
1
,
flow
:
10000
,
"productCode"
:
"PC008"
,
"productName"
:
"氛围灯"
,
"category"
:
"轻改类"
,
...
...
@@ -199,6 +207,7 @@ var senceData = [
path
:
'navigationArround'
,
sale
:
10000
,
//销量
varType
:
1
,
flow
:
10000
,
"productCode"
:
"PC009"
,
"productName"
:
"360全景导航"
,
"category"
:
"轻改类"
,
...
...
pages/tab/index/index.js
View file @
5dfc625
...
...
@@ -213,11 +213,20 @@ Page({
},
// 提交测算
submit
(
e
)
{
<<<<<<<
HEAD
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
const
reg
=
/^
[
1-9
]\d
*$/
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
,
"---"
);
>>>>>>>
79
abc4b9c737b04214efde25436bd78cadbc6b51
if
(
!
reg
.
test
(
sales
))
{
wx
.
showToast
({
title
:
'门店月平均新车销量应为正整数'
,
...
...
@@ -255,6 +264,7 @@ Page({
this
.
data
.
senceData
.
forEach
((
item
,
index
)
=>
{
item
.
productList
.
forEach
((
i
,
lastIndex
)
=>
{
if
(
i
.
profit
)
{
<<<<<<<
HEAD
let
sale
=
`senceData[
${
index
}
].productList[
${
lastIndex
}
].sale`
let
name
=
`senceData[
${
index
}
].productList[
${
lastIndex
}
].profit`
let
profit
=
_this
.
formula
(
i
.
productType
,
sales
,
flow
)
...
...
@@ -263,6 +273,18 @@ Page({
[
name
]:
profit
,
[
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
,
});
>>>>>>>
79
abc4b9c737b04214efde25436bd78cadbc6b51
}
})
})
...
...
pages/tab/index/index.scss
View file @
5dfc625
...
...
@@ -366,6 +366,7 @@ page {
padding
:
0
;
font-weight
:
500
;
color
:
#5850FF
;
width
:auto
;
}
.
btn-primary
:
:
after
{
border
:
none
;
...
...
pages/tab/index/index.wxml
View file @
5dfc625
...
...
@@ -125,7 +125,7 @@
<!-- 在线客服 -->
<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-box">
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment