Commit 4df11457 by Sweet Zhang
parents 22659fdb c6f3f133
......@@ -10,13 +10,29 @@ export default {
const model = { // 把后端返回过来的数据里面的键给替换成我想要的键
source: x,
text: x.provinceName ? x.provinceName : x.cityName,
value: x.cityId ? x.cityId: x.provinceId ,
value: x.provinceId ? x.provinceId : x.cityId,
};
const children = this.action(x.citys); // 子级数据
if(children){ // 一直往下循环查找有没有children这个键,如果有就直接添加一个子级字段名,这个字段名就是存子级数据
model.children = children;
}
return model; // 返回这个数据
return model; // 返回这个数据
});
},
// 封装报错弹窗
errorDialog(type,content){
// type 1 必填项校验 2 规则校验
uni.showModal({
title: type===1 ? '必填项校验' : '规则校验',
content:content,
showCancel:false,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
\ No newline at end of file
<template>
<div class="mortgageCalculatorContainer">
<!-- 关闭按钮 -->
<div class="closeBtn">
<div class="closeBtn" @click="closeBlan()">
<svg t="1663922894848" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2545" width="26" height="26"><path d="M557.311759 513.248864l265.280473-263.904314c12.54369-12.480043 12.607338-32.704421 0.127295-45.248112-12.512727-12.576374-32.704421-12.607338-45.248112-0.127295L512.127295 467.904421 249.088241 204.063755c-12.447359-12.480043-32.704421-12.54369-45.248112-0.063647-12.512727 12.480043-12.54369 32.735385-0.063647 45.280796l262.975407 263.775299-265.151458 263.744335c-12.54369 12.480043-12.607338 32.704421-0.127295 45.248112 6.239161 6.271845 14.463432 9.440452 22.687703 9.440452 8.160624 0 16.319527-3.103239 22.560409-9.311437l265.216826-263.807983 265.440452 266.240344c6.239161 6.271845 14.432469 9.407768 22.65674 9.407768 8.191587 0 16.352211-3.135923 22.591372-9.34412 12.512727-12.480043 12.54369-32.704421 0.063647-45.248112L557.311759 513.248864z" p-id="2546"></path></svg>
</div>
<view class="tabTitle">
......@@ -52,6 +52,7 @@
<script>
export default{
props: ['getChildLoanInfo'],
data(){
return{
accumulationFundParams:[
......@@ -239,8 +240,12 @@
// 旧房贷款信息集合
console.log(this.houseLoanOldList)
this.getChildLoanInfo(this.houseLoanOldList);
},
closeBlan(){
//向父组件发送关闭弹窗
this.$emit('closeLoan')
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment