|
@@ -174,10 +174,11 @@
|
|
|
</p>
|
|
|
</template>
|
|
|
</van-field>
|
|
|
- <div class="footer">
|
|
|
- <p>
|
|
|
+ <div class="footer"
|
|
|
+ @click="$router.push({name: 'loanRecommend'})">
|
|
|
+ <p v-if="recommendedProduct.length">
|
|
|
<span>妥妥可帮您节省利息</span>
|
|
|
- <span>23,847.84</span>
|
|
|
+ <span>{{ recommendedProduct[0].lixi }}</span>
|
|
|
<span>元</span>
|
|
|
</p>
|
|
|
<a href="javascript:;">点击查看详情></a>
|
|
@@ -493,13 +494,13 @@ export default {
|
|
|
fetchRecommendProduct (moneyRate) {
|
|
|
let totalMoney = 0
|
|
|
let productMmaxYear = 0
|
|
|
- if (loanType.value === 1) {
|
|
|
+ if (this.loanType.value === 1) {
|
|
|
totalMoney = parseFloat(this.sdjine) * 10000
|
|
|
productMmaxYear = this.sdnianxian.value
|
|
|
- } else if (loanType.value === 2) {
|
|
|
+ } else if (this.loanType.value === 2) {
|
|
|
totalMoney = parseFloat(this.gjjjine) * 10000
|
|
|
productMmaxYear = this.gjjnianxian.value
|
|
|
- } else if (loanType.value === 3) {
|
|
|
+ } else if (this.loanType.value === 3) {
|
|
|
totalMoney = parseFloat(this.gjjjine) * 10000 + parseFloat(this.sdjine) * 10000
|
|
|
productMmaxYear = this.gjjnianxian.value + this.sdnianxian.value
|
|
|
}
|
|
@@ -511,7 +512,12 @@ export default {
|
|
|
}
|
|
|
getRecommendProduct(postData).then(res => {
|
|
|
if (res.status) {
|
|
|
- this.recommendedProduct = res.data
|
|
|
+ if (Object.prototype.toString.call(res.data) === '[object Array]') {
|
|
|
+ // 查找最大优惠值
|
|
|
+ this.recommendedProduct = JSON.parse(JSON.stringify(res.data)).sort((a, b) => {
|
|
|
+ return b.lixi - a.lixi
|
|
|
+ })
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
Toast(res.msg)
|