Commit 22659fdb by Sweet Zhang

使用说明增加外链,参数设定对接

parent 2ebf9aa4
...@@ -22,6 +22,11 @@ export default { ...@@ -22,6 +22,11 @@ export default {
//购房能力测算 //购房能力测算
housePurchasePlanAnalysis(params){ housePurchasePlanAnalysis(params){
return request(`${baseURL}/api/sfp/calcuteUtil/housePurchasePlanAnalysis`, "POST", params) return request(`${baseURL}/api/sfp/calcuteUtil/housePurchasePlanAnalysis`, "POST", params)
},
// 各城市商品住宅销售价格查询接口
queryCommercialHousingPrice(params){
return request(`${baseURL}/api/sfp/calcuteConfig/queryCommercialHousingPrice`, "POST", params)
} }
} }
...@@ -35,16 +35,17 @@ ...@@ -35,16 +35,17 @@
data(){ data(){
return { return {
paramsLists:[ paramsLists:[
{id:'01',name:'房价增长率',value:6.25,type:'data-picker',remark:''}, {id:'01',name:'房价增长率',value:6.25,type:'data-picker',remark:'',alias:'housePriceGrowthRate' },
{id:'02',name:'房屋折旧率',value:2,type:'number',remark:''}, {id:'02',name:'房屋折旧率',value:2,type:'number',remark:'',alias:'houseDepreciationRate'},
{id:'03',name:'首付款最低成数',value:30,type:'number',remark:''}, {id:'03',name:'首付款最低成数',value:30,type:'number',remark:'',alias:'downPaymentMin'},
{id:'04',name:'新房贷款年利率',value:4.9,type:'number',remark:''}, {id:'04',name:'贷款年利率',value:4.9,type:'number',remark:'',alias:'interestRate'},
{id:'05',name:'资产投资回报率',value:3.74,type:'number',remark:''}, {id:'05',name:'资产投资回报率',value:3.74,type:'number',remark:'',alias:'tnvestmentRate'},
{id:'06',name:'收入增长率',value:3,type:'number',remark:'国家统计局2022年第二季度数据显示全国居民人均可支配收入增长率为3.0%'}, {id:'06',name:'收入增长率',value:3,type:'number',remark:'国家统计局2022年第二季度数据显示全国居民人均可支配收入增长率为3.0%',alias:'incomeRate'},
{id:'07',name:'可接受本金损失',value:10,type:'number',remark:''} {id:'07',name:'可接受本金损失',value:10,type:'number',remark:'',alias:'acceptableLossRate'}
], ],
editParamLists:[], editParamLists:[],
provinceList:[] provinceList:[],
cityInfo:null
} }
}, },
...@@ -57,25 +58,39 @@ ...@@ -57,25 +58,39 @@
}, },
methods:{ methods:{
onchange(e) { onchange(e) {
const value = e.detail.value // const value = e.detail.value;
console.log(e)
}, },
onnodeclick(node) { onnodeclick(node) {
console.log(node) // console.log(node);
this.cityInfo = {
provinceId: node.value,
cityId:node.parent_value ? node.parent_value : null,
area:1,
isNew:1
}
this.queryCommercialHousingPrice(this.cityInfo)
}, },
resetParams(){ resetParams(){
this.editParamLists = JSON.parse(JSON.stringify(this.paramsLists)) this.editParamLists = JSON.parse(JSON.stringify(this.paramsLists))
console.log(this.editParamLists)
}, },
provCityQry(){ provCityQry(){
api.provCityQry({insurerId:888}).then((res)=>{ api.provCityQry({insurerId:888}).then((res)=>{
console.log(res)
if(res['success']){ if(res['success']){
this.provinceList = common.action(res['data']['provinces']); this.provinceList = common.action(res['data']['provinces']);
console.log(this.provinceList)
} }
}) })
}, },
confirmParams(){
},
// 获取房价增长率
queryCommercialHousingPrice(provinceId,cityId){
api.queryCommercialHousingPrice(this.cityInfo).then(res=>{
if(res['success']){
this.editParamLists.find(item=>item.alias==='housePriceGrowthRate')['value'] = res['data']['priceInfo']['rateB'];
}
})
}
}, },
mounted() { mounted() {
this.editParamLists = JSON.parse(JSON.stringify(this.paramsLists)); this.editParamLists = JSON.parse(JSON.stringify(this.paramsLists));
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<view class="banner"> <view class="banner">
<img src="/static/images/policyIrrBanner.png" alt="" srcset=""> <img src="/static/images/policyIrrBanner.png" alt="" srcset="">
<!-- 使用说明 --> <!-- 使用说明 -->
<text @click="instructionForUse()">使用说明</text>
<head></head> <head></head>
</view> </view>
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer"> <scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer">
...@@ -298,7 +299,7 @@ ...@@ -298,7 +299,7 @@
methods: { methods: {
// 使用说明跳转 // 使用说明跳转
instructionForUse(){ instructionForUse(){
window.location.href = 'https://mp.weixin.qq.com/s/V8RtUN9I2hECv2UiefF1HA'; window.location.href = 'https://mp.weixin.qq.com/s/ZmlFZv51Pr0qpKeFiebI3Q';
}, },
// 数字千分位处理 // 数字千分位处理
numberConverter(val){ numberConverter(val){
......
...@@ -49,7 +49,7 @@ export const interceptor = () => { ...@@ -49,7 +49,7 @@ export const interceptor = () => {
// 响应拦截器,可以对数据进行预处理 // 响应拦截器,可以对数据进行预处理
success(args) { success(args) {
uni.hideLoading() uni.hideLoading()
console.log(args); // console.log(args);
}, },
fail(err) { fail(err) {
console.log('interceptor-fail', err) console.log('interceptor-fail', err)
......
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