Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
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 47af1d89
authored
Sep 22, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
xiugai
1 parent
abc61b09
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
pages/addValue/addValue/addValue.js
pages/addValue/addValue/addValue.wxml
pages/addValue/constant/data.js
project.private.config.json
pages/addValue/addValue/addValue.js
View file @
47af1d8
...
...
@@ -34,9 +34,7 @@ Page({
productList
:
[],
isReset
:
false
,
hasPhoneNumber
:
false
,
userInfo
:
{
phone
:
''
}
userInfo
:
{}
},
// tab切换
...
...
@@ -52,14 +50,15 @@ Page({
// 提交测算
submit
(
e
)
{
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
;
let
sales
=
e
?
+
e
.
detail
.
value
.
sales
:
this
.
data
.
formData
.
sales
let
flow
=
e
?
+
e
.
detail
.
value
.
flow
:
this
.
data
.
formData
.
flow
const
_this
=
this
;
this
.
data
.
tabList
.
forEach
((
item
,
index
)
=>
{
item
.
productList
.
forEach
((
i
,
lastIndex
)
=>
{
if
(
i
.
profit
)
{
let
name
=
`tabList[
${
index
}
].productList[
${
lastIndex
}
].profit`
;
let
profit
=
_this
.
formula
(
i
.
productType
,
sales
,
flow
);
console
.
log
(
name
,
profit
)
this
.
setData
({
[
name
]:
profit
,
});
...
...
@@ -67,8 +66,9 @@ Page({
});
});
this
.
setData
({
visible
:
false
,
visible
:
false
});
this
.
showCase
()
},
// 计算公式,参数:productType
formula
(
productType
,
sales
,
flow
)
{
...
...
@@ -112,13 +112,12 @@ Page({
break
;
}
console
.
log
(
profit
.
length
);
console
.
log
(
productType
,
sales
,
flow
,
profit
);
if
(
profit
.
length
>
8
)
{
return
(
profit
/
10000
).
toFixed
(
0
)
+
"万"
;
}
else
{
return
profit
;
}
console
.
log
(
productType
,
sales
,
flow
,
profit
);
return
profit
;
},
reset
()
{
this
.
setData
({
...
...
@@ -167,6 +166,7 @@ Page({
this
.
showCase
()
},
showCase
()
{
console
.
log
(
this
.
data
.
userInfo
)
if
(
this
.
data
.
userInfo
&&
this
.
data
.
userInfo
.
phone
)
{
this
.
setData
({
hasPhoneNumber
:
true
,
...
...
pages/addValue/addValue/addValue.wxml
View file @
47af1d8
...
...
@@ -20,7 +20,7 @@
<!-- 特色产品 -->
<view class="product-box">
<view class="product-title">特色产品</view>
<view class="product-tips">预估收益根据您的
新车销量 {{formData.sales}}台
测算所得</view>
<view class="product-tips">预估收益根据您的
输入的门店情况
测算所得</view>
<view class="product-list">
<block wx:for="{{productList}}" wx:key="ind">
<view class="product-item" bindtap="goDetail" data-item="{{item.path}}">
...
...
pages/addValue/constant/data.js
View file @
47af1d8
...
...
@@ -27,8 +27,8 @@ var tabList = [
],
videoList
:
[
{
videoUrl
:
'di
f
ital_card_30s'
,
posterUrl
:
'di
f
ital_card_30s_bitmap'
,
videoUrl
:
'di
g
ital_card_30s'
,
posterUrl
:
'di
g
ital_card_30s_bitmap'
,
name
:
'数字无忧卡服务30秒'
},
{
...
...
project.private.config.json
View file @
47af1d8
...
...
@@ -50,7 +50,7 @@
{
"name"
:
""
,
"pathName"
:
"pages/addValue/addValue/addValue"
,
"query"
:
""
,
"query"
:
"
scene=sceneId%3D3102
"
,
"launchMode"
:
"default"
,
"scene"
:
null
},
...
...
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