Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sfp-program
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
sfp-program
Commits
c21a0be6
Commit
c21a0be6
authored
Sep 29, 2022
by
Chao Sun
Browse files
Options
Browse Files
Download
Plain Diff
购房能力测算结果显示调整
parents
f6b4c609
f5dd8b1c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
40 deletions
+146
-40
package-lock.json
+50
-2
pages/housePurchase/housePurchase.vue
+75
-21
pages/housePurchase/planningParameters.vue
+19
-15
pages/index/index.vue
+2
-2
No files found.
package-lock.json
View file @
c21a0be6
{
{
"name"
:
"sfp-program"
,
"lockfileVersion"
:
2
,
"requires"
:
true
,
"requires"
:
true
,
"lockfileVersion"
:
1
,
"packages"
:
{
""
:
{
"dependencies"
:
{
"echarts"
:
"^5.3.3"
,
"jweixin-module"
:
"^1.6.0"
,
"nanoid"
:
"^4.0.0"
}
},
"node_modules/echarts"
:
{
"version"
:
"5.3.3"
,
"resolved"
:
"https://registry.npmmirror.com/echarts/-/echarts-5.3.3.tgz"
,
"integrity"
:
"sha512-BRw2serInRwO5SIwRviZ6Xgm5Lb7irgz+sLiFMmy/HOaf4SQ+7oYqxKzRHAKp4xHQ05AuHw1xvoQWJjDQq/FGw=="
,
"dependencies"
:
{
"tslib"
:
"2.3.0"
,
"zrender"
:
"5.3.2"
}
},
"node_modules/jweixin-module"
:
{
"version"
:
"1.6.0"
,
"resolved"
:
"https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz"
,
"integrity"
:
"sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"node_modules/nanoid"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz"
,
"integrity"
:
"sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg=="
,
"bin"
:
{
"nanoid"
:
"bin/nanoid.js"
},
"engines"
:
{
"node"
:
"^14 || ^16 || >=18"
}
},
"node_modules/tslib"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz"
,
"integrity"
:
"sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"node_modules/zrender"
:
{
"version"
:
"5.3.2"
,
"resolved"
:
"https://registry.npmmirror.com/zrender/-/zrender-5.3.2.tgz"
,
"integrity"
:
"sha512-8IiYdfwHj2rx0UeIGZGGU4WEVSDEdeVCaIg/fomejg1Xu6OifAL1GVzIPHg2D+MyUkbNgPWji90t0a8IDk+39w=="
,
"dependencies"
:
{
"tslib"
:
"2.3.0"
}
}
},
"dependencies"
:
{
"dependencies"
:
{
"echarts"
:
{
"echarts"
:
{
"version"
:
"5.3.3"
,
"version"
:
"5.3.3"
,
...
@@ -18,7 +66,7 @@
...
@@ -18,7 +66,7 @@
},
},
"nanoid"
:
{
"nanoid"
:
{
"version"
:
"4.0.0"
,
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npm
mirror.com
/nanoid/-/nanoid-4.0.0.tgz"
,
"resolved"
:
"https://registry.npm
js.org
/nanoid/-/nanoid-4.0.0.tgz"
,
"integrity"
:
"sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg=="
"integrity"
:
"sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg=="
},
},
"tslib"
:
{
"tslib"
:
{
...
...
pages/housePurchase/housePurchase.vue
View file @
c21a0be6
<
template
>
<
template
>
<follow
:redirectUrl=
"'sfp/pages/housePurchase/housePurchase'"
@
getFollowData=
"getFollowData"
></follow>
<follow
:redirectUrl=
"'sfp/pages/housePurchase/housePurchase'"
@
getFollowData=
"getFollowData"
v-show=
"isNeedOfficialAccountQrcode"
></follow>
<view
class=
"wrapper"
v-show=
"!isNeedOfficialAccountQrcode"
>
<view
class=
"wrapper"
v-show=
"!isNeedOfficialAccountQrcode"
>
<view
class=
"banner"
>
<view
class=
"banner"
>
<!--头部技术支持组件-->
<!--头部技术支持组件-->
...
@@ -33,7 +34,7 @@
...
@@ -33,7 +34,7 @@
<text>
预购面积:
</text>
<text>
预购面积:
</text>
<view
class=
"inputContent"
>
<view
class=
"inputContent"
>
<input
class=
"uni-input"
type=
"number"
placeholder=
"请输入"
<input
class=
"uni-input"
type=
"number"
placeholder=
"请输入"
v-model=
"housePurchaseInfo.preOrderSize"
v-model=
"housePurchaseInfo.preOrderSize"
@
blur=
"queryCommercialHousingPrice()"
/><label
for=
""
>
m²
</label>
/><label
for=
""
>
m²
</label>
</view>
</view>
</view>
</view>
...
@@ -124,7 +125,7 @@
...
@@ -124,7 +125,7 @@
<view>
<view>
规划参数
规划参数
</view>
</view>
<view
class=
"view"
@
click=
"
paramsSelected=dialogIsShow=true;isLoanSelected = false;
"
>
<view
class=
"view"
@
click=
"
viewPlanningParams()
"
>
查看
查看
</view>
</view>
</view>
</view>
...
@@ -139,7 +140,7 @@
...
@@ -139,7 +140,7 @@
</view>
</view>
</form>
</form>
<!--测算结果-- v-show="resultFlag"-->
<!--测算结果-- v-show="resultFlag"-->
<view
class=
"result_wrapper"
>
<view
class=
"result_wrapper"
v-if=
"resultFlag"
>
<view
class=
"suggestInfo"
>
<view
class=
"suggestInfo"
>
<view
class=
"title"
>
<view
class=
"title"
>
<view>
<view>
...
@@ -147,21 +148,21 @@
...
@@ -147,21 +148,21 @@
</view>
</view>
</view>
</view>
<view
id=
"myEcharts"
style=
"height: 500rpx;"
></view>
<view
id=
"myEcharts"
style=
"height: 500rpx;"
></view>
<view>
<view
style=
"text-align: center;margin-bottom: 30rpx;color: #c3c1c1;font-size: 22rpx;"
>
差额 = 你想要的-可实现的
差额 = 你想要的-可实现的
</view>
</view>
<view
v-show=
"resultInfos.code == 'A001' || resultInfos.code =='A002'"
>
<view
v-show=
"resultInfos.code == 'A001' || resultInfos.code =='A002'"
>
1.如您想实现
{{
resultInfos
.
nyear
}}
年后在
{{
resultInfos
.
provinceName
}}
{{
resultInfos
.
cityName
}}
地区购买
{{
resultInfos
.
preOrderSize
}}
㎡的房产,那么您还需要提高首付款到
{{
resultInfos
.
pvDownPayment
}}
元,或您需提高每年预备还房贷资金总额到
{{
resultInfos
.
houseSpecialPurpose
}}
元。
1.如您想实现
{{
resultInfos
.
nyear
}}
年后在
{{
resultInfos
.
provinceName
}}
{{
resultInfos
.
cityName
}}
地区购买
{{
resultInfos
.
preOrderSize
}}
㎡的房产,那么您还需要提高首付款到
{{
resultInfos
.
pvDownPayment
}}
元,或您需提高每年预备还房贷资金总额到
{{
resultInfos
.
houseSpecialPurpose
}}
元。
</view>
</view>
<view>
<view>
{{
resultInfos
.
code
==
'A001'
||
resultInfos
.
code
==
'A002'
?
'
1'
:
'2
'
}}
.
{{
resultInfos
.
code
==
'A001'
||
resultInfos
.
code
==
'A002'
?
'
2'
:
'1
'
}}
.
根据您的已备首付款和每年预备还房贷资金总额,您在
{{
resultInfos
.
nyear
}}
年后可实现购买房屋单价为
{{
tipsPrice
}}
元/㎡,总价为
{{
tipsTotalPrice
}}
元的房产。
根据您的已备首付款和每年预备还房贷资金总额,您在
{{
resultInfos
.
nyear
}}
年后可实现购买房屋单价为
{{
tipsPrice
}}
元/㎡,总价为
{{
tipsTotalPrice
}}
元的房产。
</view>
</view>
</view>
</view>
<view
class=
"line"
v-for=
"houseItem in housePurchasePrices"
>
<view
class=
"line"
v-for=
"houseItem in housePurchasePrices"
>
<view
class=
"line_title"
>
{{
getResultTitle
(
houseItem
.
priceType
)
}}
<view
class=
"line_title"
>
{{
getResultTitle
(
houseItem
.
priceType
)
}}
<img
src=
"../../static/images/can.png"
alt=
""
v-show=
"houseItem.fvDifference
>
= 0"
>
<img
src=
"../../static/images/can.png"
alt=
""
v-show=
"houseItem.fvDifference
<
=
0
"
>
<img
src=
"../../static/images/cannot.png"
alt=
""
v-show=
"houseItem.fvDifference
<
0
"
>
<img
src=
"../../static/images/cannot.png"
alt=
""
v-show=
"houseItem.fvDifference
>
0"
>
</view>
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"left"
>
<view
class=
"left"
>
...
@@ -180,12 +181,12 @@
...
@@ -180,12 +181,12 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"line_bottom"
v-show=
"houseItem.fvDifference
>
0"
>
<view
class=
"line_bottom"
v-show=
"houseItem.fvDifference
<
=
0
"
>
<text
style=
"font-size: 36rpx;"
>
恭喜您
</text>
!经过测算,您已超出目标值
XXXX,N
年后可以达成您的目标.
<text
style=
"font-size: 36rpx;"
>
恭喜您
</text>
!经过测算,您已超出目标值
{{
numberConverter
(
Math
.
abs
(
houseItem
.
fvDifference
))
}}
,
{{
resultInfos
.
nyear
}}
年后可以达成您的目标.
</view>
</view>
<view
class=
"line_bottom fail"
v-show=
"houseItem.fvDifference
<
0
"
>
<view
class=
"line_bottom fail"
v-show=
"houseItem.fvDifference
>
0"
>
<text
style=
"font-size: 36rpx;"
>
很遗憾!
</text>
<text
style=
"font-size: 36rpx;"
>
很遗憾!
</text>
经过测算,距离实现您的目标还差
XXX
。您可以参考我们给出的建议进行调整。
经过测算,距离实现您的目标还差
{{
numberConverter
(
Math
.
abs
(
houseItem
.
fvDifference
))
}}
。您可以参考我们给出的建议进行调整。
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -202,7 +203,7 @@
...
@@ -202,7 +203,7 @@
<!--旧房贷款余额组件-->
<!--旧房贷款余额组件-->
<loanBalance
v-if=
"isLoanSelected"
:a=
"accumulationFundParams"
:b=
"commercialLoansParams"
:loanType=
"1"
@
getData=
"getData"
></loanBalance>
<loanBalance
v-if=
"isLoanSelected"
:a=
"accumulationFundParams"
:b=
"commercialLoansParams"
:loanType=
"1"
@
getData=
"getData"
></loanBalance>
<!--规划参数组件-->
<!--规划参数组件-->
<planningParameters
v-if=
"paramsSelected"
@
getData=
"getPlanParams"
></planningParameters>
<planningParameters
v-if=
"paramsSelected"
:cityInfo=
"cityInfo"
@
getData=
"getPlanParams"
></planningParameters>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -224,6 +225,7 @@
...
@@ -224,6 +225,7 @@
return
{
return
{
tipsPrice
:
null
,
tipsPrice
:
null
,
tipsTotalPrice
:
null
,
tipsTotalPrice
:
null
,
cityInfo
:{},
isEditFlag
:
false
,
isEditFlag
:
false
,
dataLists
:
null
,
dataLists
:
null
,
dialogIsShow
:
false
,
//弹窗显示与隐藏
dialogIsShow
:
false
,
//弹窗显示与隐藏
...
@@ -263,6 +265,7 @@
...
@@ -263,6 +265,7 @@
},
},
housePurchasePrices
:[],
housePurchasePrices
:[],
resultFlag
:
false
,
resultFlag
:
false
,
planningParams
:{}
}
}
},
},
components
:{
components
:{
...
@@ -276,12 +279,26 @@
...
@@ -276,12 +279,26 @@
this
.
provCityQry
();
this
.
provCityQry
();
},
},
methods
:{
methods
:{
viewPlanningParams
(){
// 查看规划参数
this
.
paramsSelected
=
this
.
dialogIsShow
=
true
;
this
.
isLoanSelected
=
false
;
this
.
cityInfo
[
'isNew'
]
=
'1'
;
if
(
this
.
housePurchaseInfo
.
preOrderSize
<=
90
){
this
.
cityInfo
[
'area'
]
=
'1'
}
else
if
(
this
.
housePurchaseInfo
.
preOrderSize
<=
144
){
this
.
cityInfo
[
'area'
]
=
'2'
}
else
{
this
.
cityInfo
[
'area'
]
=
'3'
}
},
getFollowData
(
e
){
getFollowData
(
e
){
this
.
isNeedOfficialAccountQrcode
=
ref
(
e
);
this
.
isNeedOfficialAccountQrcode
=
ref
(
e
);
console
.
log
(
'父组件拿到值了'
,
e
);
console
.
log
(
'父组件拿到值了'
,
e
);
},
},
getPlanParams
(
e
){
getPlanParams
(
e
){
console
.
log
(
e
)
console
.
log
(
'规划参数子组件传过来的===='
,
e
)
this
.
planningParams
=
e
;
// 从规划参数弹窗获取数据
// 从规划参数弹窗获取数据
this
.
closeBtn
()
this
.
closeBtn
()
},
},
...
@@ -300,9 +317,15 @@
...
@@ -300,9 +317,15 @@
console
.
log
(
this
.
houseLoanOldList
)
console
.
log
(
this
.
houseLoanOldList
)
},
},
onchange
(
e
)
{
onchange
(
e
)
{
const
value
=
e
.
detail
.
value
const
value
=
e
.
detail
.
value
;
this
.
queryCommercialHousingPrice
();
},
onnodeclick
(
node
)
{
this
.
cityInfo
=
{
cityId
:
node
.
value
,
provinceId
:
node
.
parent_value
?
node
.
parent_value
:
null
,
}
},
},
onnodeclick
(
node
)
{},
drawLine
()
{
drawLine
()
{
this
.
downPaymentList
=
this
.
totalLoanList
=
[];
this
.
downPaymentList
=
this
.
totalLoanList
=
[];
// 基于准备好的dom,初始化echarts实例
// 基于准备好的dom,初始化echarts实例
...
@@ -312,11 +335,11 @@
...
@@ -312,11 +335,11 @@
const
list1
=
this
.
housePurchasePrices
.
filter
((
item
)
=>
{
const
list1
=
this
.
housePurchasePrices
.
filter
((
item
)
=>
{
return
item
.
priceType
==
3
return
item
.
priceType
==
3
})[
0
];
})[
0
];
this
.
downPaymentList
=
this
.
downPaymentList
.
concat
(
list1
.
pvPriceRealization
,
list1
.
pvPriceDesired
,
list1
.
pvDifference
)
this
.
downPaymentList
=
[]
.
concat
(
list1
.
pvPriceRealization
,
list1
.
pvPriceDesired
,
list1
.
pvDifference
)
const
list2
=
this
.
housePurchasePrices
.
filter
((
item
)
=>
{
const
list2
=
this
.
housePurchasePrices
.
filter
((
item
)
=>
{
return
item
.
priceType
==
4
return
item
.
priceType
==
4
})[
0
];
})[
0
];
this
.
totalLoanList
=
this
.
totalLoanList
.
concat
(
list2
.
fvPriceRealization
,
list2
.
fvPriceDesired
,
list2
.
fvDifference
)
this
.
totalLoanList
=
[]
.
concat
(
list2
.
fvPriceRealization
,
list2
.
fvPriceDesired
,
list2
.
fvDifference
)
}
}
this
.
myChart
.
setOption
({
this
.
myChart
.
setOption
({
legend
:
{
legend
:
{
...
@@ -405,8 +428,21 @@
...
@@ -405,8 +428,21 @@
common
.
errorDialog
(
1
,
'请填写年预备还房贷资金总额'
)
common
.
errorDialog
(
1
,
'请填写年预备还房贷资金总额'
)
return
false
;
return
false
;
}
}
// 规划参数默认值
const
palnningParamsDefault
=
{
acceptableLossRate
:
0.1
,
downPaymentMin
:
30
,
houseDepreciationRate
:
0.02
,
housePriceGrowthRate
:
0.0625
,
incomeRate
:
0.03
,
interestRate
:
0.049
,
tnvestmentRate
:
0.0374
}
const
param
=
{
const
param
=
{
...
palnningParamsDefault
,
...
this
.
housePurchaseInfo
,
...
this
.
housePurchaseInfo
,
...
this
.
planningParams
,
interestRate
:
this
.
housePurchaseInfo
.
interestRate
/
100
,
houseLoanOldList
:
this
.
houseLoanOldList
,
houseLoanOldList
:
this
.
houseLoanOldList
,
// businessNo: uni.getStorageSync('businessNo'),
// businessNo: uni.getStorageSync('businessNo'),
businessNo
:
'businessNo20220829000000001'
,
businessNo
:
'businessNo20220829000000001'
,
...
@@ -425,8 +461,7 @@
...
@@ -425,8 +461,7 @@
return
item
.
priceType
==
1
;
return
item
.
priceType
==
1
;
})[
0
][
'fvPriceDesired'
];
})[
0
][
'fvPriceDesired'
];
}
}
setTimeout
(()
=>
{
this
.
drawLine
()});
this
.
drawLine
();
}
else
{
}
else
{
common
.
errorDialog
(
2
,
res
[
'message'
])
common
.
errorDialog
(
2
,
res
[
'message'
])
}
}
...
@@ -468,9 +503,28 @@
...
@@ -468,9 +503,28 @@
numberConverter
(
val
){
numberConverter
(
val
){
return
dataHandling
.
numberConverter
(
val
)
return
dataHandling
.
numberConverter
(
val
)
},
},
// 获取房价增长率
queryCommercialHousingPrice
(){
if
(
this
.
housePurchaseInfo
.
preOrderSize
<=
90
){
this
.
cityInfo
[
'area'
]
=
'1'
}
else
if
(
this
.
housePurchaseInfo
.
preOrderSize
<=
144
){
this
.
cityInfo
[
'area'
]
=
'2'
}
else
{
this
.
cityInfo
[
'area'
]
=
'3'
}
this
.
cityInfo
=
{
...
this
.
cityInfo
,
isNew
:
1
,
}
api
.
queryCommercialHousingPrice
(
this
.
cityInfo
).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
planningParams
.
housePriceGrowthRate
=
res
[
'data'
][
'priceInfo'
][
'rateB'
]
/
100
;
}
})
}
},
},
mounted
(){
mounted
(){
this
.
drawLine
();
//
this.drawLine();
}
}
}
}
</
script
>
</
script
>
...
...
pages/housePurchase/planningParameters.vue
View file @
c21a0be6
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<div
class=
"dataSelect"
>
<div
class=
"dataSelect"
>
<div
v-if=
"item.type==='data-picker'"
>
<div
v-if=
"item.type==='data-picker'"
>
<view>
<view>
<uni-data-picker
:localdata=
"provinceList"
popup-title=
"请选择城市"
@
change=
"onchange"
@
nodeclick=
"onnodeclick"
></uni-data-picker>
<uni-data-picker
v-model=
"cityId"
:localdata=
"provinceList"
popup-title=
"请选择城市"
@
change=
"onchange"
@
nodeclick=
"onnodeclick"
></uni-data-picker>
</view>
</view>
</div>
</div>
</div>
</div>
...
@@ -28,9 +28,11 @@
...
@@ -28,9 +28,11 @@
import
api
from
'../../api/api'
;
import
api
from
'../../api/api'
;
import
common
from
'../../common/common'
import
common
from
'../../common/common'
export
default
{
export
default
{
props
:[
'cityInfo'
],
emits
:[
'getData'
],
emits
:[
'getData'
],
data
(){
data
(){
return
{
return
{
cityId
:
null
,
paramsLists
:[
paramsLists
:[
{
id
:
'01'
,
name
:
'房价增长率'
,
value
:
6.25
,
type
:
'data-picker'
,
remark
:
''
,
alias
:
'housePriceGrowthRate'
},
{
id
:
'01'
,
name
:
'房价增长率'
,
value
:
6.25
,
type
:
'data-picker'
,
remark
:
''
,
alias
:
'housePriceGrowthRate'
},
{
id
:
'02'
,
name
:
'房屋折旧率'
,
value
:
2
,
type
:
'number'
,
remark
:
''
,
alias
:
'houseDepreciationRate'
},
{
id
:
'02'
,
name
:
'房屋折旧率'
,
value
:
2
,
type
:
'number'
,
remark
:
''
,
alias
:
'houseDepreciationRate'
},
...
@@ -42,7 +44,6 @@
...
@@ -42,7 +44,6 @@
],
],
editParamLists
:[],
editParamLists
:[],
provinceList
:[],
provinceList
:[],
cityInfo
:
null
}
}
},
},
...
@@ -54,10 +55,11 @@
...
@@ -54,10 +55,11 @@
},
},
setup
(
props
,
content
){
setup
(
props
,
content
){
const
cityInfo
=
props
.
cityInfo
?
props
.
cityInfo
:
null
;
const
sendData
=
(
e
)
=>
{
const
sendData
=
(
e
)
=>
{
content
.
emit
(
'getData'
,
e
);
content
.
emit
(
'getData'
,
e
);
}
}
return
{
sendData
}
return
{
sendData
,
cityInfo
}
},
},
methods
:{
methods
:{
onchange
(
e
)
{
onchange
(
e
)
{
...
@@ -66,12 +68,11 @@
...
@@ -66,12 +68,11 @@
onnodeclick
(
node
)
{
onnodeclick
(
node
)
{
// console.log(node);
// console.log(node);
this
.
cityInfo
=
{
this
.
cityInfo
=
{
provinceId
:
node
.
value
,
...
this
.
cityInfo
,
cityId
:
node
.
parent_value
?
node
.
parent_value
:
null
,
cityId
:
node
.
value
,
area
:
1
,
provinceId
:
node
.
parent_value
?
node
.
parent_value
:
null
,
isNew
:
1
}
}
this
.
queryCommercialHousingPrice
(
this
.
cityInfo
)
this
.
queryCommercialHousingPrice
()
},
},
resetParams
(){
resetParams
(){
this
.
editParamLists
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
paramsLists
))
this
.
editParamLists
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
paramsLists
))
...
@@ -85,18 +86,19 @@
...
@@ -85,18 +86,19 @@
},
},
confirmParams
(){
confirmParams
(){
const
params
=
{
const
params
=
{
housePriceGrowthRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'housePriceGrowthRate'
)[
0
].
value
,
//房价增长率
housePriceGrowthRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'housePriceGrowthRate'
)[
0
].
value
/
100
,
//房价增长率
houseDepreciationRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'houseDepreciationRate'
)[
0
].
value
,
//房屋折旧率
houseDepreciationRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'houseDepreciationRate'
)[
0
].
value
/
100
,
//房屋折旧率
downPaymentMin
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'downPaymentMin'
)[
0
].
value
,
//首付款最低成数(百分位)
downPaymentMin
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'downPaymentMin'
)[
0
].
value
,
//首付款最低成数(百分位)
interestRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'interestRate'
)[
0
].
value
,
//贷款年利率
interestRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'interestRate'
)[
0
].
value
/
100
,
//贷款年利率
tnvestmentRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'tnvestmentRate'
)[
0
].
value
,
//投资回报率
tnvestmentRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'tnvestmentRate'
)[
0
].
value
/
100
,
//投资回报率
incomeRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'incomeRate'
)[
0
].
value
,
//收入增长率
incomeRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'incomeRate'
)[
0
].
value
/
100
,
//收入增长率
acceptableLossRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'acceptableLossRate'
)[
0
].
value
,
//可接受本金损失率
acceptableLossRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'acceptableLossRate'
)[
0
].
value
/
100
,
//可接受本金损失率
}
}
this
.
sendData
(
params
)
this
.
sendData
(
params
)
},
},
// 获取房价增长率
// 获取房价增长率
queryCommercialHousingPrice
(
provinceId
,
cityId
){
queryCommercialHousingPrice
(){
console
.
log
(
this
.
cityInfo
)
api
.
queryCommercialHousingPrice
(
this
.
cityInfo
).
then
(
res
=>
{
api
.
queryCommercialHousingPrice
(
this
.
cityInfo
).
then
(
res
=>
{
if
(
res
[
'success'
]){
if
(
res
[
'success'
]){
this
.
editParamLists
.
find
(
item
=>
item
.
alias
===
'housePriceGrowthRate'
)[
'value'
]
=
res
[
'data'
][
'priceInfo'
][
'rateB'
];
this
.
editParamLists
.
find
(
item
=>
item
.
alias
===
'housePriceGrowthRate'
)[
'value'
]
=
res
[
'data'
][
'priceInfo'
][
'rateB'
];
...
@@ -107,6 +109,8 @@
...
@@ -107,6 +109,8 @@
mounted
()
{
mounted
()
{
this
.
editParamLists
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
paramsLists
));
this
.
editParamLists
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
paramsLists
));
this
.
provCityQry
();
this
.
provCityQry
();
this
.
cityId
=
this
.
cityInfo
.
cityId
;
this
.
queryCommercialHousingPrice
()
}
}
}
}
</
script
>
</
script
>
...
...
pages/index/index.vue
View file @
c21a0be6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<img
src=
"../../static/images/qrcodeBg_1.png"
alt=
""
srcset=
""
>
<img
src=
"../../static/images/qrcodeBg_1.png"
alt=
""
srcset=
""
>
</view>
</view>
</view>
-->
</view>
-->
<follow
:redirectUrl=
"'sfp/pages/index/index'"
@
getFollowData=
"getFollowData"
></follow>
<follow
:redirectUrl=
"'sfp/pages/index/index'"
@
getFollowData=
"getFollowData"
v-show=
"isNeedOfficialAccountQrcode"
></follow>
<!-- 已关注公众号用户 -->
<!-- 已关注公众号用户 -->
<view
class=
"content"
v-show=
"!isNeedOfficialAccountQrcode"
>
<view
class=
"content"
v-show=
"!isNeedOfficialAccountQrcode"
>
<view
class=
"banner"
>
<view
class=
"banner"
>
...
@@ -431,7 +431,7 @@
...
@@ -431,7 +431,7 @@
allFirstPayment
:
this
.
irrAndSimpleCalcuteParam
.
allFirstPayment
,
allFirstPayment
:
this
.
irrAndSimpleCalcuteParam
.
allFirstPayment
,
yearWithdrawalInfos
:
this
.
yearWithdrawalInfos
,
yearWithdrawalInfos
:
this
.
yearWithdrawalInfos
,
calcuteType
:
this
.
calcuteType
,
calcuteType
:
this
.
calcuteType
,
businessNo
:
this
.
businessNo
,
businessNo
:
uni
.
getStorageSync
(
'businessNo'
)
,
businessType
:
this
.
businessType
,
businessType
:
this
.
businessType
,
withdrawalType
:
this
.
withdrawalType
withdrawalType
:
this
.
withdrawalType
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment