Commit 5c2e967c by kyle

代码合并冲突

parents 0bd7a13a db5f4d68
<template>
<!-- 没有关注公众号须先关注公众号才可以使用 -->
<view class="qrcodeContainer" v-show="isNeedOfficialAccountQrcode">
<view class="qrcodeContent">
<img src="../../static/images/qrcodeBg_1.png" alt="" srcset="">
</view>
</view>
</template>
<script>
import dataHandling from "../../util/dataHandling";
import api from "../../api/api";
import { ref,toRefs } from "vue";
export default {
name:'follow',
props: ['redirectUrl'],
data() {
return {
businessNo:null,
isNeedOfficialAccountQrcode:true,
};
},
setup(props,content) {
const redirectUrl = ref(props.redirectUrl);
const sendFollowData = (e) =>{
content.emit('getFollowData',e)
}
return {redirectUrl,sendFollowData}
},
onLoad(){
},
mounted(){
if(!uni.getStorageSync('businessNo')){
uni.setStorageSync('businessNo', nanoid().replace(/\_/g,""));
}else{
this.businessNo = uni.getStorageSync('businessNo');
}
if(dataHandling.getQueryString('subscribe')==0){
this.isNeedOfficialAccountQrcode = true;
return false;
}else{
this.isNeedOfficialAccountQrcode = false;
}
this.sendFollowData(this.isNeedOfficialAccountQrcode)
if(dataHandling.getQueryString('openId')) {
uni.setStorageSync('openId',dataHandling.getQueryString('openId'))
}else if(!dataHandling.getQueryString('openId') && dataHandling.getQueryString('isBack') != 1){
api.getWxUserInfo({userApplyType:1,businessNo:uni.getStorageSync('businessNo'),redirectUrl:this.redirectUrl}).then(res=>{
if(res['success']){
window.location.href = res.data.paymentForm.action;
}
})
}
if(
sessionStorage.getItem('shareTipsFlag')!='1' &&
!this.isNeedOfficialAccountQrcode &&
dataHandling.getQueryString('subscribe')=='1'){
uni.showModal({
title: '',
content: '好东西就要分享,您的分享,是我们持续提供好工具的动力',
showCancel:false,
confirmText:'确定',
success: function (res) {
if (res.confirm) {
sessionStorage.setItem('shareTipsFlag','1')
}
}
});
}
}
}
</script>
<style lang="scss">
.qrcodeContainer{
width: 100%;
height: 100vh;
overflow: hidden;
img{
max-width: 100%;
}
}
</style>
<template> <template>
<view class="wrapper"> <follow :redirectUrl="'sfp/pages/housePurchase/housePurchase'" @getFollowData="getFollowData"></follow>
<view class="wrapper" v-show="!isNeedOfficialAccountQrcode">
<view class="banner"> <view class="banner">
<!--头部技术支持组件--> <!--头部技术支持组件-->
<commonHead></commonHead> <commonHead></commonHead>
...@@ -203,7 +204,7 @@ ...@@ -203,7 +204,7 @@
</template> </template>
<script> <script>
import {toRefs} from "vue"; import {toRefs,ref} from "vue";
import loanBalance from './loanBalance.vue'; import loanBalance from './loanBalance.vue';
import planningParameters from './planningParameters.vue'; import planningParameters from './planningParameters.vue';
import commonHead from '../header/header.vue'; import commonHead from '../header/header.vue';
...@@ -212,6 +213,7 @@ ...@@ -212,6 +213,7 @@
import api from '../../api/api'; import api from '../../api/api';
import common from '../../common/common'; import common from '../../common/common';
import dataHandling from "../../util/dataHandling"; import dataHandling from "../../util/dataHandling";
import follow from '../follow/follow.vue';
export default{ export default{
data(){ data(){
...@@ -259,11 +261,19 @@ ...@@ -259,11 +261,19 @@
planningParams:{} planningParams:{}
} }
}, },
setup() {
//父传子实现 1.定义要传递的属性的属性值
const userApplyType=ref("userApplyType");
return {
userApplyType,
};
},
components:{ components:{
loanBalance, loanBalance,
planningParameters, planningParameters,
foot,
follow,
commonHead, commonHead,
foot
}, },
onLoad(){ onLoad(){
this.provCityQry(); this.provCityQry();
...@@ -282,6 +292,10 @@ ...@@ -282,6 +292,10 @@
this.cityInfo['area'] = '3' this.cityInfo['area'] = '3'
} }
}, },
getFollowData(e){
this.isNeedOfficialAccountQrcode= ref(e);
console.log('父组件拿到值了',e);
},
getPlanParams(e){ getPlanParams(e){
console.log('规划参数子组件传过来的====',e) console.log('规划参数子组件传过来的====',e)
this.planningParams = e; this.planningParams = e;
...@@ -312,6 +326,7 @@ ...@@ -312,6 +326,7 @@
} }
}, },
drawLine() { drawLine() {
this.downPaymentList = this.totalLoanList = [];
// 基于准备好的dom,初始化echarts实例 // 基于准备好的dom,初始化echarts实例
this.myChart = echarts.init(document.getElementById('myEcharts')); this.myChart = echarts.init(document.getElementById('myEcharts'));
// 绘制图表 // 绘制图表
......
<template> <template>
<!-- <view v-show="irrFlag == false" > --> <!-- <view v-show="irrFlag == false" > -->
<!-- 没有关注公众号须先关注公众号才可以使用 --> <!-- 没有关注公众号须先关注公众号才可以使用 -->
<view class="qrcodeContainer" v-show="isNeedOfficialAccountQrcode"> <!-- <view class="qrcodeContainer" >
<view class="qrcodeContent"> <view class="qrcodeContent">
<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>
<!-- 已关注公众号用户 --> <!-- 已关注公众号用户 -->
<view class="content" v-show="!isNeedOfficialAccountQrcode"> <view class="content" v-show="!isNeedOfficialAccountQrcode">
<view class="banner"> <view class="banner">
...@@ -205,9 +206,13 @@ ...@@ -205,9 +206,13 @@
import dataImport from "../dataImport/data-import.vue"; import dataImport from "../dataImport/data-import.vue";
import { inject } from "vue"; import { inject } from "vue";
import foot from '../footer/footer.vue'; import foot from '../footer/footer.vue';
import follow from '../follow/follow.vue';
import { toRefs, ref } from 'vue';
import commonHead from '../header/header.vue'; import commonHead from '../header/header.vue';
export default { export default {
data() { data() {
return { return {
isNeedOfficialAccountQrcode:true, isNeedOfficialAccountQrcode:true,
...@@ -232,20 +237,16 @@ ...@@ -232,20 +237,16 @@
irrAndSimpleInfos:[], irrAndSimpleInfos:[],
irrAndSimpleResInfos:[] ,// 计算结果 irrAndSimpleResInfos:[] ,// 计算结果
resIrrAndSimpleResInfos:[], resIrrAndSimpleResInfos:[],
irrFlag:Boolean = false irrFlag:Boolean = false,
} }
}, },
components:{ components:{
dataImport, dataImport,
foot, foot,
follow,
commonHead commonHead
}, },
onLoad() { onLoad() {
if(!uni.getStorageSync('businessNo')){
uni.setStorageSync('businessNo', nanoid().replace(/\_/g,""));
}else{
this.businessNo = uni.getStorageSync('businessNo');
}
if(dataHandling.getQueryString('isBack') == 1){ if(dataHandling.getQueryString('isBack') == 1){
const calcuteData = uni.getStorageSync('calcuteData') ? JSON.parse(uni.getStorageSync('calcuteData')) : null; const calcuteData = uni.getStorageSync('calcuteData') ? JSON.parse(uni.getStorageSync('calcuteData')) : null;
if(calcuteData){ if(calcuteData){
...@@ -261,42 +262,46 @@ ...@@ -261,42 +262,46 @@
//初始化删除上次批量计算结果 //初始化删除上次批量计算结果
uni.removeStorageSync('resIrrAndSimpleResInfos'); uni.removeStorageSync('resIrrAndSimpleResInfos');
} }
if(dataHandling.getQueryString('subscribe')==0){ // if(dataHandling.getQueryString('subscribe')==0){
this.isNeedOfficialAccountQrcode = true; // this.isNeedOfficialAccountQrcode = true;
return false; // return false;
}else{ // }else{
this.isNeedOfficialAccountQrcode = false; // this.isNeedOfficialAccountQrcode = false;
} // }
if(dataHandling.getQueryString('openId')) { // if(dataHandling.getQueryString('openId')) {
uni.setStorageSync('openId',dataHandling.getQueryString('openId')) // uni.setStorageSync('openId',dataHandling.getQueryString('openId'))
}else if(!dataHandling.getQueryString('openId') && dataHandling.getQueryString('isBack') != 1){ // }else if(!dataHandling.getQueryString('openId') && dataHandling.getQueryString('isBack') != 1){
api.getWxUserInfo({userApplyType:'1',businessNo:uni.getStorageSync('businessNo')}).then(res=>{ // api.getWxUserInfo({userApplyType:'1',businessNo:uni.getStorageSync('businessNo')}).then(res=>{
if(res['success']){ // if(res['success']){
window.location.href = res.data.paymentForm.action; // window.location.href = res.data.paymentForm.action;
} // }
}) // })
} // }
if( // if(
sessionStorage.getItem('shareTipsFlag')!='1' && // sessionStorage.getItem('shareTipsFlag')!='1' &&
!this.isNeedOfficialAccountQrcode && // !this.isNeedOfficialAccountQrcode &&
dataHandling.getQueryString('subscribe')=='1'){ // dataHandling.getQueryString('subscribe')=='1'){
uni.showModal({ // uni.showModal({
title: '', // title: '',
content: '好东西就要分享,您的分享,是我们持续提供好工具的动力', // content: '好东西就要分享,您的分享,是我们持续提供好工具的动力',
showCancel:false, // showCancel:false,
confirmText:'确定', // confirmText:'确定',
success: function (res) { // success: function (res) {
if (res.confirm) { // if (res.confirm) {
sessionStorage.setItem('shareTipsFlag','1') // sessionStorage.setItem('shareTipsFlag','1')
} // }
} // }
}); // });
} // }
if(this.yearWithdrawal.length>0){ if(this.yearWithdrawal.length>0){
this.yearWithdrawalInfos.push({...this.yearWithdrawal,withdrawalType:this.withdrawalType?'1':'2'}) this.yearWithdrawalInfos.push({...this.yearWithdrawal,withdrawalType:this.withdrawalType?'1':'2'})
} }
}, },
methods: { methods: {
getFollowData(e){
this.isNeedOfficialAccountQrcode= ref(e);
console.log('父组件拿到值了',e);
},
// 使用说明跳转 // 使用说明跳转
instructionForUse(){ instructionForUse(){
window.location.href = 'https://mp.weixin.qq.com/s/ZmlFZv51Pr0qpKeFiebI3Q'; window.location.href = 'https://mp.weixin.qq.com/s/ZmlFZv51Pr0qpKeFiebI3Q';
......
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