Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sfp-program
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
sfp-program
Commits
5c2e967c
Commit
5c2e967c
authored
Sep 29, 2022
by
kyle
Browse files
Options
Browse Files
Download
Plain Diff
代码合并冲突
parents
0bd7a13a
db5f4d68
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
148 additions
and
42 deletions
+148
-42
pages/follow/follow.vue
+86
-0
pages/housePurchase/housePurchase.vue
+18
-3
pages/index/index.vue
+44
-39
No files found.
pages/follow/follow.vue
0 → 100644
View file @
5c2e967c
<
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
>
pages/housePurchase/housePurchase.vue
View file @
5c2e967c
<
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'
));
// 绘制图表
// 绘制图表
...
...
pages/index/index.vue
View file @
5c2e967c
<
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'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment