Commit b075f12b by Chao Sun

关注二维码

parent c3d5f62e
<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>
<view class="wrapper">
<follow :redirectUrl="'/pages/housePurchase/housePurchase'" @getFollowData="getFollowData"></follow>
<view class="wrapper" v-show="!isNeedOfficialAccountQrcode">
<view class="banner">
<!--头部技术支持组件-->
<head></head>
......@@ -200,7 +201,7 @@
</template>
<script>
import {toRefs} from "vue";
import {toRefs,ref} from "vue";
import loanBalance from './loanBalance.vue';
import planningParameters from './planningParameters.vue';
import head from '../header/header.vue';
......@@ -209,6 +210,7 @@
import api from '../../api/api';
import common from '../../common/common';
import dataHandling from "../../util/dataHandling";
import follow from '../follow/follow.vue';
export default{
data(){
......@@ -253,16 +255,28 @@
resultFlag:false,
}
},
setup() {
//父传子实现 1.定义要传递的属性的属性值
const userApplyType=ref("userApplyType");
return {
userApplyType,
};
},
components:{
loanBalance,
planningParameters,
head,
foot
foot,
follow
},
onLoad(){
this.provCityQry();
},
methods:{
getFollowData(e){
this.isNeedOfficialAccountQrcode= ref(e);
console.log('父组件拿到值了',e);
},
getData(e){
this.dataLists = toRefs(e);
this.accumulationFundParams = this.dataLists.a;
......@@ -279,6 +293,7 @@
},
onnodeclick(node) {},
drawLine() {
this.downPaymentList = this.totalLoanList = [];
// 基于准备好的dom,初始化echarts实例
this.myChart = echarts.init(document.getElementById('myEcharts'));
// 绘制图表
......
<template>
<!-- <view v-show="irrFlag == false" > -->
<!-- 没有关注公众号须先关注公众号才可以使用 -->
<view class="qrcodeContainer" v-show="isNeedOfficialAccountQrcode">
<!-- <view class="qrcodeContainer" >
<view class="qrcodeContent">
<img src="../../static/images/qrcodeBg_1.png" alt="" srcset="">
</view>
</view>
</view> -->
<follow :redirectUrl="'/pages/index/index'" @getFollowData="getFollowData"></follow>
<!-- 已关注公众号用户 -->
<view class="content" v-show="!isNeedOfficialAccountQrcode">
<view class="banner">
......@@ -206,8 +207,11 @@
import { inject } from "vue";
import foot from '../footer/footer.vue';
import head from '../header/header.vue';
import follow from '../follow/follow.vue';
import { toRefs, ref } from 'vue';
export default {
data() {
return {
isNeedOfficialAccountQrcode:true,
......@@ -232,20 +236,16 @@
irrAndSimpleInfos:[],
irrAndSimpleResInfos:[] ,// 计算结果
resIrrAndSimpleResInfos:[],
irrFlag:Boolean = false
irrFlag:Boolean = false,
}
},
components:{
dataImport,
foot,
head
head,
follow
},
onLoad() {
if(!uni.getStorageSync('businessNo')){
uni.setStorageSync('businessNo', nanoid().replace(/\_/g,""));
}else{
this.businessNo = uni.getStorageSync('businessNo');
}
if(dataHandling.getQueryString('isBack') == 1){
const calcuteData = uni.getStorageSync('calcuteData') ? JSON.parse(uni.getStorageSync('calcuteData')) : null;
if(calcuteData){
......@@ -261,42 +261,46 @@
//初始化删除上次批量计算结果
uni.removeStorageSync('resIrrAndSimpleResInfos');
}
if(dataHandling.getQueryString('subscribe')==0){
this.isNeedOfficialAccountQrcode = true;
return false;
}else{
this.isNeedOfficialAccountQrcode = false;
}
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')}).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')
}
}
});
}
// if(dataHandling.getQueryString('subscribe')==0){
// this.isNeedOfficialAccountQrcode = true;
// return false;
// }else{
// this.isNeedOfficialAccountQrcode = false;
// }
// 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')}).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')
// }
// }
// });
// }
if(this.yearWithdrawal.length>0){
this.yearWithdrawalInfos.push({...this.yearWithdrawal,withdrawalType:this.withdrawalType?'1':'2'})
}
},
methods: {
getFollowData(e){
this.isNeedOfficialAccountQrcode= ref(e);
console.log('父组件拿到值了',e);
},
// 使用说明跳转
instructionForUse(){
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