import request from "../util/request";
import {baseURL,apiURL,sfpURL} from "../environments/environment";

export default {
	//查看token是否已经失效
	checkToken(){
		const params = {
			token:uni.getStorageSync('uni-token'),
			ticket:'uni-app'
		}
		return request(`${baseURL}/api/authorize/checkToken`, "POST", params)
	},
	// 获取token
	obtainToken(){
		const params = {
			ticket:'uni-app'
		}
		return request(`${baseURL}/api/authorize/obtainToken`, "POST", params)
	},
	// 保单单利复利计算
	irrAndSimpleCalcute(params) {
		return request(`${baseURL}/api/sfp/calcuteUtil/irrAndSimpleCalcute`, "POST", params)
	},
	// 获取unionId
	getWxUserInfo(params){
		return request(`${baseURL}/api/getWxUserInfo`, "POST", params)
	},
	//增额寿和年金(单利复利)计算结果查询接口
	queryIrrAndSimple(params){
		return request(`${baseURL}/api/sfp/calcuteUtil/queryIrrAndSimple`, "POST", params)
	},
	//获取城市
	provCityQry(params){
		return request(`${baseURL}/api/metadata/provCityQry`, "POST", params)
	},
	
	//购房能力测算
	housePurchasePlanAnalysis(params){
		return request(`${baseURL}/api/sfp/calcuteUtil/housePurchasePlanAnalysis`, "POST", params)
	},
	
	// 各城市商品住宅销售价格查询接口
	queryCommercialHousingPrice(params){
		return request(`${baseURL}/api/sfp/calcuteConfig/queryCommercialHousingPrice`, "POST", params)
	},
	// 子女教育测算
	educationEstimate(params){
		return request(`${baseURL}/api/sfp/calcuteUtil/educationEstimate`, "POST", params)
	}
	
}
