Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
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
Chao Sun
CFFP-HB
Commits
69649f08
Commit
69649f08
authored
Nov 06, 2026
by
jianan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test_zjn' into test
parents
c6432ef6
9cd08123
Show whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
356 additions
and
92 deletions
+356
-92
environments/environment.ts
+11
-3
myPackageA/applyFranchise/applyFranchise.vue
+7
-7
myPackageA/commission/withdrawalRecord.vue
+1
-1
myPackageA/myTeam/myTeam.vue
+1
-1
myPackageA/poster/poster.vue
+1
-1
myPackageA/product-list/commission-detail.vue
+1
-1
myPackageA/product-list/product-commission.vue
+1
-1
myPackageA/product-list/product-list.vue
+1
-1
myPackageA/ruleAndContract/cancelProtocol.vue
+1
-1
myPackageA/ruleAndContract/clause.vue
+1
-1
myPackageA/ruleAndContract/taxRules.vue
+1
-1
myPackageA/salary/salaryList.vue
+1
-1
myPackageA/setting/logOff.vue
+1
-1
pages.json
+8
-0
pages/afterSaleDetail/afterSaleDetail.vue
+1
-1
pages/afterSales/afterSales.vue
+1
-1
pages/applyDropClass/applyDropClass.vue
+1
-1
pages/commonDetail/commonDetail.vue
+1
-1
pages/courseDetail/courseDetail.vue
+2
-2
pages/courselist/courselist.vue
+2
-2
pages/inviteJoin/inviteJoin.vue
+1
-1
pages/lanch/index.vue
+45
-34
pages/myShare/myShare.vue
+1
-1
pages/orderConfirm/orderConfirm.vue
+1
-1
pages/orderDetail/orderDetail.vue
+1
-1
pages/orderStatus/orderStatus.vue
+1
-1
pages/personalCenter/accountoperation/aboutcffp.vue
+1
-1
pages/personalCenter/detail.vue
+1
-1
pages/personalCenter/helpCenter.vue
+1
-1
pages/personalCenter/myTeam.vue
+1
-1
pages/personalCenter/myTeamIncubate.vue
+1
-1
pages/personalCenter/personalCenter.vue
+59
-1
pages/personalCenter/system/accontsetting.vue
+1
-1
pages/personalCenter/system/menulist.vue
+1
-1
pages/personalCenter/system/settings.vue
+22
-1
pages/personalCenter/user-information.vue
+1
-1
pages/pointsExchange/pointsExchange.vue
+1
-1
pages/product/product.vue
+1
-1
pages/saleCourseLists/saleCourseLists.vue
+1
-1
pages/systemMsg/system_msg.vue
+1
-1
pages/systemMsg/system_msg_detail.vue
+1
-1
pages/taxRules/taxRules.vue
+1
-1
pages/withdrawal/withdrawal.vue
+1
-1
sfp/childEdu/childEdu.vue
+1
-1
sfp/dataImport/data-import.vue
+1
-1
sfp/housePurchase/housePurchase.vue
+1
-1
sfp/housePurchase/loanBalance.vue
+1
-1
sfp/housePurchase/planningParameters.vue
+1
-1
sfp/index/index.vue
+1
-1
util/interceptor.ts
+34
-1
util/sso.ts
+125
-0
No files found.
environments/environment.ts
View file @
69649f08
...
@@ -11,6 +11,8 @@ const dev = {
...
@@ -11,6 +11,8 @@ const dev = {
scrm_url
:
'https://mdev.zuihuibi.cn'
,
scrm_url
:
'https://mdev.zuihuibi.cn'
,
file_query_url
:
'https://mdev.zuihuibi.cn'
,
file_query_url
:
'https://mdev.zuihuibi.cn'
,
csf_url
:
'http://139.224.145.34:9002'
,
csf_url
:
'http://139.224.145.34:9002'
,
// 港险转介人工作台 H5(独立系统,整屏跳转,不嵌 iframe)
workbench_url
:
'https://center.zuihuibi.cn/'
,
}
}
const
stage
=
{
const
stage
=
{
base_url
:
'https://mstage.zuihuibi.cn'
,
base_url
:
'https://mstage.zuihuibi.cn'
,
...
@@ -19,8 +21,9 @@ const stage = {
...
@@ -19,8 +21,9 @@ const stage = {
share_url
:
'https://mstage.zuihuibi.cn/appYdhomeoffice'
,
share_url
:
'https://mstage.zuihuibi.cn/appYdhomeoffice'
,
sfp_url
:
'https://mstage.zuihuibi.cn/sfpApi'
,
sfp_url
:
'https://mstage.zuihuibi.cn/sfpApi'
,
scrm_url
:
'https://mstage.zuihuibi.cn'
,
scrm_url
:
'https://mstage.zuihuibi.cn'
,
file_query_url
:
'https://mstage.zuihuibi.cn'
file_query_url
:
'https://mstage.zuihuibi.cn'
,
// 港险转介人工作台 H5(独立系统,整屏跳转,不嵌 iframe)
workbench_url
:
'https://center.zuihuibi.cn/'
,
}
}
const
prod
=
{
const
prod
=
{
base_url
:
'https://app.ydhomeoffice.cn'
,
base_url
:
'https://app.ydhomeoffice.cn'
,
...
@@ -32,6 +35,8 @@ const prod = {
...
@@ -32,6 +35,8 @@ const prod = {
scrm_url
:
'https://m.zuihuibi.cn'
,
scrm_url
:
'https://m.zuihuibi.cn'
,
file_query_url
:
'https://m.zuihuibi.cn'
,
file_query_url
:
'https://m.zuihuibi.cn'
,
csf_url
:
'https://web.csf.hk'
,
csf_url
:
'https://web.csf.hk'
,
// 港险转介人工作台 H5(独立系统,整屏跳转,不嵌 iframe)
workbench_url
:
'https://center.supguard.cn/'
,
}
}
// companyType: '1', cffp
// companyType: '1', cffp
// companyType: '2', appYdhomeoffice
// companyType: '2', appYdhomeoffice
...
@@ -66,6 +71,7 @@ let imgUrl = config[env].img_url;
...
@@ -66,6 +71,7 @@ let imgUrl = config[env].img_url;
let
scrmUrl
=
config
[
env
].
scrm_url
;
let
scrmUrl
=
config
[
env
].
scrm_url
;
let
fileQueryErl
=
config
[
env
].
file_query_url
;
let
fileQueryErl
=
config
[
env
].
file_query_url
;
let
csfUrl
=
config
[
env
].
csf_url
;
let
csfUrl
=
config
[
env
].
csf_url
;
let
workbenchUrl
=
config
[
env
].
workbench_url
;
export
{
export
{
baseURL
,
baseURL
,
...
@@ -78,5 +84,6 @@ export{
...
@@ -78,5 +84,6 @@ export{
imgUrl
,
imgUrl
,
scrmUrl
,
scrmUrl
,
fileQueryErl
,
fileQueryErl
,
csfUrl
csfUrl
,
workbenchUrl
}
}
\ No newline at end of file
myPackageA/applyFranchise/applyFranchise.vue
View file @
69649f08
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</view>
</view>
</view>
</view>
<view
class=
"btnBox"
@
click=
"gotoApply"
>
<view
class=
"btnBox"
@
click=
"gotoApply"
>
{{
loginType
==
'codelogin
'
?
'确认加盟'
:
'注册并加盟'
}}
{{
loginType
!=
'visitor
'
?
'确认加盟'
:
'注册并加盟'
}}
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -164,17 +164,17 @@
...
@@ -164,17 +164,17 @@
this
.
checkToken
()
this
.
checkToken
()
}
}
// 非邀请状态
// 非邀请状态
if
(
!
this
.
shareId
&&
this
.
loginType
==
'codelogin
'
&&
this
.
userInfo
.
mobile
)
{
if
(
!
this
.
shareId
&&
this
.
loginType
!=
'visitor
'
&&
this
.
userInfo
.
mobile
)
{
this
.
form
.
mobile
=
this
.
userInfo
.
mobile
this
.
form
.
mobile
=
this
.
userInfo
.
mobile
this
.
editMobile
=
true
this
.
editMobile
=
true
this
.
showVerificationCode
=
false
this
.
showVerificationCode
=
false
}
}
// 非邀请状态
// 非邀请状态
if
(
!
this
.
shareId
&&
this
.
loginType
==
'codelogin
'
&&
!
this
.
form
.
nickName
)
{
if
(
!
this
.
shareId
&&
this
.
loginType
!=
'visitor
'
&&
!
this
.
form
.
nickName
)
{
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// 登录状态 非邀请
// 登录状态 非邀请
if
(
this
.
loginType
==
'codelogin
'
&&
!
this
.
shareId
)
{
if
(
this
.
loginType
!=
'visitor
'
&&
!
this
.
shareId
)
{
// #ifdef H5
// #ifdef H5
initJssdkShare
(()
=>
{
initJssdkShare
(()
=>
{
setWechatShare
();
setWechatShare
();
...
@@ -233,7 +233,7 @@
...
@@ -233,7 +233,7 @@
this
.
loginType
=
'visitor'
this
.
loginType
=
'visitor'
return
return
}
}
if
(
res
.
data
.
data
.
isPartner
&&
this
.
loginType
==
'codelogin
'
)
{
if
(
res
.
data
.
data
.
isPartner
&&
this
.
loginType
!=
'visitor
'
)
{
this
.
$refs
.
successJoinPopup
.
open
()
this
.
$refs
.
successJoinPopup
.
open
()
}
}
})
})
...
@@ -306,7 +306,7 @@
...
@@ -306,7 +306,7 @@
}
}
console
.
log
(
'this.sharePosterObj'
,
this
.
sharePosterObj
)
console
.
log
(
'this.sharePosterObj'
,
this
.
sharePosterObj
)
// 登录并且是禁用状态
// 登录并且是禁用状态
if
(
this
.
loginType
==
'codelogin
'
&&
this
.
userInfo
.
userIsActive
==
2
)
{
if
(
this
.
loginType
!=
'visitor
'
&&
this
.
userInfo
.
userIsActive
==
2
)
{
this
.
showCode
=
true
this
.
showCode
=
true
this
.
$refs
.
restrictedOrCanelTip
.
open
(
'您的账号处在不可用状态,请扫码添加客服咨询情况'
)
this
.
$refs
.
restrictedOrCanelTip
.
open
(
'您的账号处在不可用状态,请扫码添加客服咨询情况'
)
return
return
...
@@ -347,7 +347,7 @@
...
@@ -347,7 +347,7 @@
...
this
.
form
,
...
this
.
form
,
visitorUuid
:
uni
.
getStorageSync
(
'visitorUuid'
)?
uni
.
getStorageSync
(
'visitorUuid'
):
dataHandling
.
uuid
()
visitorUuid
:
uni
.
getStorageSync
(
'visitorUuid'
)?
uni
.
getStorageSync
(
'visitorUuid'
):
dataHandling
.
uuid
()
}
}
if
(
this
.
loginType
==
'codelogin
'
)
{
if
(
this
.
loginType
!=
'visitor
'
)
{
this
.
getApply
()
this
.
getApply
()
uni
.
hideLoading
()
uni
.
hideLoading
()
return
return
...
...
myPackageA/commission/withdrawalRecord.vue
View file @
69649f08
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
onLoad
(
options
){
onLoad
(
options
){
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
myPackageA/myTeam/myTeam.vue
View file @
69649f08
...
@@ -418,7 +418,7 @@
...
@@ -418,7 +418,7 @@
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
myPackageA/poster/poster.vue
View file @
69649f08
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
}
}
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
...
...
myPackageA/product-list/commission-detail.vue
View file @
69649f08
...
@@ -221,7 +221,7 @@ const queryInfo = () => {
...
@@ -221,7 +221,7 @@ const queryInfo = () => {
});
});
};
};
onShow
(()
=>
{
onShow
(()
=>
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
queryInfo
()
queryInfo
()
}
}
})
})
...
...
myPackageA/product-list/product-commission.vue
View file @
69649f08
...
@@ -145,7 +145,7 @@ const fetchProducts = async (type=0) => {
...
@@ -145,7 +145,7 @@ const fetchProducts = async (type=0) => {
}
}
}
}
onShow
(()
=>
{
onShow
(()
=>
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
queryInfo
()
queryInfo
()
}
}
})
})
...
...
myPackageA/product-list/product-list.vue
View file @
69649f08
...
@@ -335,7 +335,7 @@ const queryInfo = () => {
...
@@ -335,7 +335,7 @@ const queryInfo = () => {
});
});
};
};
onShow
(()
=>
{
onShow
(()
=>
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
queryInfo
()
queryInfo
()
}
}
})
})
...
...
myPackageA/ruleAndContract/cancelProtocol.vue
View file @
69649f08
...
@@ -151,7 +151,7 @@ export default {
...
@@ -151,7 +151,7 @@ export default {
},
},
},
},
onShow
(){
onShow
(){
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
myPackageA/ruleAndContract/clause.vue
View file @
69649f08
...
@@ -306,7 +306,7 @@
...
@@ -306,7 +306,7 @@
this
.
isBack
=
options
.
isBack
this
.
isBack
=
options
.
isBack
},
},
onShow
(){
onShow
(){
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
myPackageA/ruleAndContract/taxRules.vue
View file @
69649f08
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
},
},
components
:{
restrictedTip
,},
components
:{
restrictedTip
,},
onShow
(){
onShow
(){
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
myPackageA/salary/salaryList.vue
View file @
69649f08
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
}
}
this
.
getSalaryData
()
this
.
getSalaryData
()
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
myPackageA/setting/logOff.vue
View file @
69649f08
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
},
},
onShow
(){
onShow
(){
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
let
dataForm
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
let
dataForm
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
...
...
pages.json
View file @
69649f08
...
@@ -645,6 +645,14 @@
...
@@ -645,6 +645,14 @@
"meta"
:
{
"moduleCode"
:
"launch"
,
"moduleName"
:
"启动页"
}
"meta"
:
{
"moduleCode"
:
"launch"
,
"moduleName"
:
"启动页"
}
},
},
"lazyLoad"
:
true
"lazyLoad"
:
true
},
{
"path"
:
"pages/auth/ticket"
,
"style"
:
{
"topWindow"
:
false
,
"navigationBarTitleText"
:
"登录中"
},
"lazyLoad"
:
true
}
}
],
],
"subPackages"
:
[
"subPackages"
:
[
...
...
pages/afterSaleDetail/afterSaleDetail.vue
View file @
69649f08
...
@@ -179,7 +179,7 @@
...
@@ -179,7 +179,7 @@
this
.
userAfterSalesDtl
()
this
.
userAfterSalesDtl
()
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/afterSales/afterSales.vue
View file @
69649f08
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
this
.
userAfterSales
()
this
.
userAfterSales
()
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/applyDropClass/applyDropClass.vue
View file @
69649f08
...
@@ -257,7 +257,7 @@
...
@@ -257,7 +257,7 @@
this
.
dropOptionsQuery
()
this
.
dropOptionsQuery
()
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
this
.
userRefundCourseDtl
();
this
.
userRefundCourseDtl
();
...
...
pages/commonDetail/commonDetail.vue
View file @
69649f08
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
this
.
queryDate
=
option
.
queryDate
;
this
.
queryDate
=
option
.
queryDate
;
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/courseDetail/courseDetail.vue
View file @
69649f08
...
@@ -864,7 +864,7 @@
...
@@ -864,7 +864,7 @@
isSaveShare
:
'1'
,
//是否存贮分享便于统计分享数据
isSaveShare
:
'1'
,
//是否存贮分享便于统计分享数据
fileId
:
this
.
fileId
,
fileId
:
this
.
fileId
,
}
}
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
)
{
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
)
{
shareInfo
.
userId
=
this
.
userId
shareInfo
.
userId
=
this
.
userId
newLink
=
newLink
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
fileId
}
&coursesharing=1&serialsNo=
${
nanoid
()}
&shareCode=
${
shareCode
}
&shareUserId=
${
this
.
userId
}
&jumpUrl=
${
jumptime
}
&landingPage=courseDetail&miniShare=1`
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
fileId
}
&coursesharing=1&serialsNo=
${
nanoid
()}
&shareCode=
${
shareCode
}
&shareUserId=
${
this
.
userId
}
&jumpUrl=
${
jumptime
}
&landingPage=courseDetail&miniShare=1`
...
@@ -1508,7 +1508,7 @@
...
@@ -1508,7 +1508,7 @@
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
}
}
this
.
userId
=
uni
.
getStorageSync
(
'cffp_userId'
)
this
.
userId
=
uni
.
getStorageSync
(
'cffp_userId'
)
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/courselist/courselist.vue
View file @
69649f08
...
@@ -244,7 +244,7 @@
...
@@ -244,7 +244,7 @@
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
}
}
this
.
userId
=
uni
.
getStorageSync
(
'cffp_userId'
)
this
.
userId
=
uni
.
getStorageSync
(
'cffp_userId'
)
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
@@ -305,7 +305,7 @@
...
@@ -305,7 +305,7 @@
this
.
shareItem
=
JSON
.
parse
(
JSON
.
stringify
(
item
))
this
.
shareItem
=
JSON
.
parse
(
JSON
.
stringify
(
item
))
// return
// return
// 未登录去登录
// 未登录去登录
if
(
uni
.
getStorageSync
(
'loginType'
)
!==
'codelogin
'
)
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'visitor
'
)
{
dataHandling
.
pocessTracking
(
dataHandling
.
pocessTracking
(
'点击'
,
'点击'
,
`用户在产品中心未登录时点击产品分享按钮`
,
`用户在产品中心未登录时点击产品分享按钮`
,
...
...
pages/inviteJoin/inviteJoin.vue
View file @
69649f08
...
@@ -200,7 +200,7 @@
...
@@ -200,7 +200,7 @@
this
.
isLoading
=
false
this
.
isLoading
=
false
this
.
posterImg
=
''
this
.
posterImg
=
''
this
.
generatedImage
=
''
this
.
generatedImage
=
''
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/lanch/index.vue
View file @
69649f08
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
import
*
as
environment
from
'@/environments/environment'
import
*
as
environment
from
'@/environments/environment'
import
dataHandling
from
"@/util/dataHandling"
;
import
dataHandling
from
"@/util/dataHandling"
;
import
wx
from
'weixin-js-sdk'
import
wx
from
'weixin-js-sdk'
import
*
as
sso
from
'@/util/sso'
import
restrictedTip
from
'@/components/commonPopup/restrictedTip.vue'
;
import
restrictedTip
from
'@/components/commonPopup/restrictedTip.vue'
;
let
jumpInfo
=
ref
({})
let
jumpInfo
=
ref
({})
let
dataToken
=
ref
()
let
dataToken
=
ref
()
...
@@ -30,6 +31,11 @@
...
@@ -30,6 +31,11 @@
if
(
options
.
backFlag
){
if
(
options
.
backFlag
){
uni
.
setStorageSync
(
'backFlag'
,
options
.
backFlag
)
uni
.
setStorageSync
(
'backFlag'
,
options
.
backFlag
)
}
}
// Casdoor 票据通道:登录态已在内存,按 landingPage 直达,不换 code、不建 HS 会话
if
(
sso
.
isSsoMode
()
&&
sso
.
getSsoToken
())
{
gotoLandingPage
(
options
.
landingPage
||
'index'
)
return
}
// 参数带token了重新登录
// 参数带token了重新登录
if
(
options
.
dataToken
)
{
if
(
options
.
dataToken
)
{
console
.
log
(
'jumpInfo.value'
,
jumpInfo
.
value
);
console
.
log
(
'jumpInfo.value'
,
jumpInfo
.
value
);
...
@@ -86,38 +92,8 @@
...
@@ -86,38 +92,8 @@
})
})
const
reLogin
=
(
landingPage
)
=>
{
// 按 landingPage 锚点跳转:reLogin(HS code 登录)与 sso(Casdoor 票据)共用
uni
.
showLoading
({
const
gotoLandingPage
=
(
landingPage
)
=>
{
title
:
'加载中...'
});
// 添加iOS平台检测
const
isIOS
=
navigator
.
platform
.
match
(
/
(
iPhone|iPod|iPad
)
/i
);
const
params
=
{
loginType
:
'5'
,
code
:
dataToken
.
value
,
visitorUuid
:
uni
.
getStorageSync
(
'visitorUuid'
)?
uni
.
getStorageSync
(
'visitorUuid'
):
dataHandling
.
uuid
()
}
api
.
loginVerification
(
params
).
then
((
res
)
=>
{
uni
.
hideLoading
()
// uni.showModal({
// content:`${JSON.stringify(res)}`
// })
if
(
res
[
'success'
])
{
// 账号禁用用户
if
(
res
.
data
.
userIsActive
&&
res
.
data
.
userIsActive
==
2
){
restrictedTipRef
.
value
.
open
()
uni
.
setStorageSync
(
'userIsActive'
,
res
.
data
.
userIsActive
)
return
}
if
(
res
.
data
.
userIsActive
&&
res
.
data
.
userIsActive
!=
2
){
restrictedTipRef
.
value
.
close
()
uni
.
removeStorageSync
(
'userIsActive'
)
}
uni
.
setStorageSync
(
'isLogin'
,
'1'
);
uni
.
setStorageSync
(
'loginType'
,
'codelogin'
);
uni
.
setStorageSync
(
'cffp_userId'
,
res
.
data
.
userId
);
uni
.
setStorageSync
(
'uni-token'
,
res
.
data
[
'token'
]);
uni
.
setStorageSync
(
'visitorUuid'
,
res
.
data
[
'visitorUuid'
]);
if
(
landingPage
==
'sfpHousePurchase'
)
{
if
(
landingPage
==
'sfpHousePurchase'
)
{
uni
.
reLaunch
({
url
:
`/sfp/housePurchase/housePurchase`
})
uni
.
reLaunch
({
url
:
`/sfp/housePurchase/housePurchase`
})
...
@@ -132,7 +108,6 @@
...
@@ -132,7 +108,6 @@
}
else
{
}
else
{
uni
.
reLaunch
({
url
:
`/pages/courseDetail/courseDetail?fileId=
${
jumpInfo
.
value
.
fileId
}
&miniShare=1`
})
uni
.
reLaunch
({
url
:
`/pages/courseDetail/courseDetail?fileId=
${
jumpInfo
.
value
.
fileId
}
&miniShare=1`
})
}
}
// uni.reLaunch({ url: `/pages/courseDetail/courseDetail?fileId=${jumpInfo.value.fileId}&coursesharing=1&serialsNo=${jumpInfo.value.serialsNo}&shareCode=${jumpInfo.value.shareCode}&shareUserId=${jumpInfo.value.shareUserId}&jumpUrl=${jumpInfo.value.jumpUrl}&miniShare=1` })
}
}
return
return
}
else
if
(
landingPage
==
'businessCard'
)
{
}
else
if
(
landingPage
==
'businessCard'
)
{
...
@@ -160,10 +135,46 @@
...
@@ -160,10 +135,46 @@
url
:
'/pages/personalCenter/personalCenter'
url
:
'/pages/personalCenter/personalCenter'
})
})
}
else
if
(
landingPage
==
'orderStatus'
){
}
else
if
(
landingPage
==
'orderStatus'
){
const
userId
=
jumpInfo
.
value
.
userId
||
uni
.
getStorageSync
(
'cffp_userId'
)
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
`/pages/orderStatus/orderStatus?orderId=
${
jumpInfo
.
value
.
orderId
}
&fileId=
${
jumpInfo
.
value
.
fileId
}
&orderStatus=2&userId=
${
res
.
data
.
userId
}
&backMySelf=1`
url
:
`/pages/orderStatus/orderStatus?orderId=
${
jumpInfo
.
value
.
orderId
}
&fileId=
${
jumpInfo
.
value
.
fileId
}
&orderStatus=2&userId=
${
userId
}
&backMySelf=1`
})
})
}
}
}
const
reLogin
=
(
landingPage
)
=>
{
uni
.
showLoading
({
title
:
'加载中...'
});
// 添加iOS平台检测
const
isIOS
=
navigator
.
platform
.
match
(
/
(
iPhone|iPod|iPad
)
/i
);
const
params
=
{
loginType
:
'5'
,
code
:
dataToken
.
value
,
visitorUuid
:
uni
.
getStorageSync
(
'visitorUuid'
)?
uni
.
getStorageSync
(
'visitorUuid'
):
dataHandling
.
uuid
()
}
api
.
loginVerification
(
params
).
then
((
res
)
=>
{
uni
.
hideLoading
()
// uni.showModal({
// content:`${JSON.stringify(res)}`
// })
if
(
res
[
'success'
])
{
// 账号禁用用户
if
(
res
.
data
.
userIsActive
&&
res
.
data
.
userIsActive
==
2
){
restrictedTipRef
.
value
.
open
()
uni
.
setStorageSync
(
'userIsActive'
,
res
.
data
.
userIsActive
)
return
}
if
(
res
.
data
.
userIsActive
&&
res
.
data
.
userIsActive
!=
2
){
restrictedTipRef
.
value
.
close
()
uni
.
removeStorageSync
(
'userIsActive'
)
}
uni
.
setStorageSync
(
'isLogin'
,
'1'
);
uni
.
setStorageSync
(
'loginType'
,
'codelogin'
);
uni
.
setStorageSync
(
'cffp_userId'
,
res
.
data
.
userId
);
uni
.
setStorageSync
(
'uni-token'
,
res
.
data
[
'token'
]);
uni
.
setStorageSync
(
'visitorUuid'
,
res
.
data
[
'visitorUuid'
]);
gotoLandingPage
(
landingPage
)
}
else
{
}
else
{
//内嵌带的code失效了,用户需要重新登录
//内嵌带的code失效了,用户需要重新登录
if
(
res
.
data
.
commonResult
&&
res
.
data
.
commonResult
.
errorCode
==
'1101'
){
if
(
res
.
data
.
commonResult
&&
res
.
data
.
commonResult
.
errorCode
==
'1101'
){
...
...
pages/myShare/myShare.vue
View file @
69649f08
...
@@ -265,7 +265,7 @@
...
@@ -265,7 +265,7 @@
this
.
userShareQuery
();
this
.
userShareQuery
();
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/orderConfirm/orderConfirm.vue
View file @
69649f08
...
@@ -668,7 +668,7 @@
...
@@ -668,7 +668,7 @@
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
)
{
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
)
{
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/orderDetail/orderDetail.vue
View file @
69649f08
...
@@ -267,7 +267,7 @@
...
@@ -267,7 +267,7 @@
this
.
commissionType
=
option
.
commissionType
;
this
.
commissionType
=
option
.
commissionType
;
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/orderStatus/orderStatus.vue
View file @
69649f08
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
};
};
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/personalCenter/accountoperation/aboutcffp.vue
View file @
69649f08
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
}
}
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
if
(
this
.
companyType
==
'1'
){
if
(
this
.
companyType
==
'1'
){
...
...
pages/personalCenter/detail.vue
View file @
69649f08
...
@@ -355,7 +355,7 @@
...
@@ -355,7 +355,7 @@
queryUserInfoAndPermission
();
queryUserInfoAndPermission
();
});
});
onShow
(()
=>
{
onShow
(()
=>
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
queryInfo
()
queryInfo
()
}
}
})
})
...
...
pages/personalCenter/helpCenter.vue
View file @
69649f08
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
}
}
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/personalCenter/myTeam.vue
View file @
69649f08
...
@@ -285,7 +285,7 @@
...
@@ -285,7 +285,7 @@
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/personalCenter/myTeamIncubate.vue
View file @
69649f08
...
@@ -212,7 +212,7 @@
...
@@ -212,7 +212,7 @@
this
.
getqueryTeamAchievement
()
this
.
getqueryTeamAchievement
()
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/personalCenter/personalCenter.vue
View file @
69649f08
...
@@ -175,11 +175,12 @@
...
@@ -175,11 +175,12 @@
import
common
from
"../../common/common"
;
import
common
from
"../../common/common"
;
import
tabBar
from
'../../components/tabBar/tabBar.vue'
;
import
tabBar
from
'../../components/tabBar/tabBar.vue'
;
import
api
from
"@/api/api"
;
import
api
from
"@/api/api"
;
import
{
companyInfo
,
shareURL
}
from
"@/environments/environment"
;
import
{
companyInfo
,
shareURL
,
workbenchUrl
}
from
"@/environments/environment"
;
import
FloatingButton
from
'@/components/FloatingButton/FloatingButton.vue'
;
import
FloatingButton
from
'@/components/FloatingButton/FloatingButton.vue'
;
import
JoinPopup
from
'@/components/commonPopup/JoinPopup.vue'
;
import
JoinPopup
from
'@/components/commonPopup/JoinPopup.vue'
;
import
PartnerTipPopup
from
"@/components/commonPopup/PartnerTipPopup.vue"
;
import
PartnerTipPopup
from
"@/components/commonPopup/PartnerTipPopup.vue"
;
import
{
initJssdkShare
,
setWechatShare
}
from
'@/util/fiveshare'
;
import
{
initJssdkShare
,
setWechatShare
}
from
'@/util/fiveshare'
;
import
{
getSsoToken
,
issueWorkbenchTicket
}
from
"@/util/sso"
;
import
restrictedTip
from
'@/components/commonPopup/restrictedTip.vue'
;
import
restrictedTip
from
'@/components/commonPopup/restrictedTip.vue'
;
import
wx
from
'weixin-js-sdk'
import
wx
from
'weixin-js-sdk'
export
default
{
export
default
{
...
@@ -337,6 +338,15 @@
...
@@ -337,6 +338,15 @@
id
:
'04'
,
id
:
'04'
,
categoryName
:
'海外资产配置'
,
categoryName
:
'海外资产配置'
,
children
:
[{
children
:
[{
// 港险转介人工作台:独立 H5,点击后整屏跳转(见 goDetail 的 workbench 分支)
title
:
'港险工作台'
,
icon
:
'icon-shield'
,
link
:
''
,
isOpen
:
true
,
isShow
:
true
,
workbench
:
true
},
{
title
:
'积分明细'
,
title
:
'积分明细'
,
icon
:
'icon-yongjin'
,
icon
:
'icon-yongjin'
,
link
:
'/myPackageA/salary/salaryList'
,
link
:
'/myPackageA/salary/salaryList'
,
...
@@ -725,6 +735,14 @@
...
@@ -725,6 +735,14 @@
return
return
}
}
// 港险转介人工作台是独立 H5(Casdoor OIDC 自管登录态):
// 整屏顶层跳转,不做 iframe(避免第三方 cookie / 微信内核限制)。
// 走到这里已过上面的 CFFP 登录拦截,满足"先登录 CFFP 再进工作台"。
if
(
item
.
workbench
)
{
this
.
openWorkbench
()
return
}
if
(
item
.
isShow
&&
item
.
isOpen
)
{
if
(
item
.
isShow
&&
item
.
isOpen
)
{
if
(
item
.
title
===
'我的邀请码'
)
{
if
(
item
.
title
===
'我的邀请码'
)
{
this
.
$refs
.
popup1
.
open
(
'bottom'
);
this
.
$refs
.
popup1
.
open
(
'bottom'
);
...
@@ -735,6 +753,46 @@
...
@@ -735,6 +753,46 @@
common
.
errorDialog
(
2
,
'该模块正在开发中,敬请期待!'
,
'提示'
);
common
.
errorDialog
(
2
,
'该模块正在开发中,敬请期待!'
,
'提示'
);
}
}
},
},
// 整屏打开港险转介人工作台(独立 H5,不嵌 iframe)
openWorkbench
()
{
const
url
=
workbenchUrl
;
if
(
!
url
)
{
common
.
errorDialog
(
2
,
'港险工作台暂未开放,敬请期待!'
,
'提示'
);
return
;
}
dataHandling
.
pocessTracking
(
'港险工作台'
,
`用户从我的页进入港险工作台`
,
'点击'
,
2
,
'我的'
,
'pages/personalCenter/personalCenter'
)
// D11 票桥接力:已持 Casdoor token(经 cffp 票桥免登进来)时,先向工作台后端
// (与 workbench_url 同源的 /csf/api)换一次性票据,落 /auth/ticket 建会话——
// 全程不再经过 Casdoor 登录页;无 token 或换票失败则回落直连(工作台自身 OIDC 登录照旧)。
const
navigate
=
(
target
)
=>
{
// #ifdef APP-PLUS
// APP 内复用通用 web-view 整屏页
uni
.
navigateTo
({
url
:
'/components/webview?url='
+
encodeURIComponent
(
target
)
});
// #endif
// #ifndef APP-PLUS
// H5(含微信小程序 web-view 内、普通浏览器):replace 顶层跳转、不压历史栈,
// 避免微信内核脏历史快照恢复后「我的」页菜单入口丢失
window
.
location
.
replace
(
target
);
// #endif
}
if
(
getSsoToken
())
{
const
csfApiBase
=
url
.
replace
(
/
\/
+$/
,
''
)
+
'/csf/api'
issueWorkbenchTicket
(
csfApiBase
)
.
then
((
ticket
)
=>
navigate
(
url
+
'auth/ticket?ticket='
+
encodeURIComponent
(
ticket
)
+
'&redirect='
+
encodeURIComponent
(
'/'
)))
.
catch
(()
=>
navigate
(
url
))
}
else
{
navigate
(
url
)
}
},
ckidentity
(
item
)
{
ckidentity
(
item
)
{
if
(
item
.
identity
==
true
&&
this
.
customerBasicInfo
.
partnerType
==
null
)
{
if
(
item
.
identity
==
true
&&
this
.
customerBasicInfo
.
partnerType
==
null
)
{
dataHandling
.
pocessTracking
(
dataHandling
.
pocessTracking
(
...
...
pages/personalCenter/system/accontsetting.vue
View file @
69649f08
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
}
}
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
...
...
pages/personalCenter/system/menulist.vue
View file @
69649f08
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
return
{}
return
{}
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/personalCenter/system/settings.vue
View file @
69649f08
...
@@ -26,6 +26,10 @@
...
@@ -26,6 +26,10 @@
import
{
initJssdkShare
,
setWechatShare
}
from
'@/util/fiveshare'
;
import
{
initJssdkShare
,
setWechatShare
}
from
'@/util/fiveshare'
;
import
api
from
"@/api/api"
;
import
api
from
"@/api/api"
;
import
restrictedTip
from
'@/components/commonPopup/restrictedTip.vue'
;
import
restrictedTip
from
'@/components/commonPopup/restrictedTip.vue'
;
// #ifdef H5
import
wx
from
'weixin-js-sdk'
import
*
as
sso
from
'@/util/sso'
// #endif
export
default
{
export
default
{
components
:{
MenuList
,
restrictedTip
,
},
components
:{
MenuList
,
restrictedTip
,
},
data
()
{
data
()
{
...
@@ -59,7 +63,7 @@
...
@@ -59,7 +63,7 @@
}
}
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
@@ -115,6 +119,23 @@
...
@@ -115,6 +119,23 @@
});
});
},
},
outLing
(){
outLing
(){
// #ifdef H5
// SSO(小程序票据)会话:销毁 web-view 回小程序原生;
// IdP(unionid)会话在原生侧,H5 登录页在小程序内不可用
if
(
sso
.
isSsoMode
())
{
uni
.
showModal
({
title
:
'退出登录'
,
content
:
'确定退出工作台吗?'
,
showCancel
:
true
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
wx
.
miniProgram
.
reLaunch
({
url
:
'/pages/index/mySelf'
})
}
}
})
return
}
// #endif
uni
.
showModal
({
uni
.
showModal
({
title
:
'退出登录'
,
title
:
'退出登录'
,
content
:
'确定要退出登录吗?'
,
content
:
'确定要退出登录吗?'
,
...
...
pages/personalCenter/user-information.vue
View file @
69649f08
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
// this.optionForm = this.tempInfo.optionForm = JSON.parse(options.customerBasicInfo)
// this.optionForm = this.tempInfo.optionForm = JSON.parse(options.customerBasicInfo)
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/pointsExchange/pointsExchange.vue
View file @
69649f08
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
this
.
queryByUserIdFortuneStatistic
();
this
.
queryByUserIdFortuneStatistic
();
this
.
getCommissionType
()
this
.
getCommissionType
()
this
.
getDetail
()
this
.
getDetail
()
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/product/product.vue
View file @
69649f08
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
restrictedTip
restrictedTip
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/saleCourseLists/saleCourseLists.vue
View file @
69649f08
...
@@ -297,7 +297,7 @@
...
@@ -297,7 +297,7 @@
let
app22
=
getCurrentPages
().
length
let
app22
=
getCurrentPages
().
length
this
.
userCourseCount
()
this
.
userCourseCount
()
this
.
userCourseList
()
this
.
userCourseList
()
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/systemMsg/system_msg.vue
View file @
69649f08
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
this
.
querySystemMessage
();
this
.
querySystemMessage
();
},
},
onShow
(){
onShow
(){
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
this
.
querySystemMessage
();
this
.
querySystemMessage
();
...
...
pages/systemMsg/system_msg_detail.vue
View file @
69649f08
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
this
.
getSystemMsgDetail
();
this
.
getSystemMsgDetail
();
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/taxRules/taxRules.vue
View file @
69649f08
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
}
}
},
},
onShow
(){
onShow
(){
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
pages/withdrawal/withdrawal.vue
View file @
69649f08
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
this
.
goFortuneWithdrawal
()
this
.
goFortuneWithdrawal
()
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
sfp/childEdu/childEdu.vue
View file @
69649f08
...
@@ -229,7 +229,7 @@
...
@@ -229,7 +229,7 @@
}
}
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
sfp/dataImport/data-import.vue
View file @
69649f08
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
this
.
calcuteData
=
uni
.
getStorageSync
(
'calcuteData'
)
?
JSON
.
parse
(
uni
.
getStorageSync
(
'calcuteData'
))
:
null
;
this
.
calcuteData
=
uni
.
getStorageSync
(
'calcuteData'
)
?
JSON
.
parse
(
uni
.
getStorageSync
(
'calcuteData'
))
:
null
;
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
sfp/housePurchase/housePurchase.vue
View file @
69649f08
...
@@ -377,7 +377,7 @@
...
@@ -377,7 +377,7 @@
this
.
provCityQry
();
this
.
provCityQry
();
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
sfp/housePurchase/loanBalance.vue
View file @
69649f08
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
restrictedTip
,
restrictedTip
,
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
sfp/housePurchase/planningParameters.vue
View file @
69649f08
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
restrictedTip
,
restrictedTip
,
},
},
onShow
(){
onShow
(){
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
// #ifdef H5
// #ifdef H5
...
...
sfp/index/index.vue
View file @
69649f08
...
@@ -664,7 +664,7 @@
...
@@ -664,7 +664,7 @@
},
},
},
},
onShow
()
{
onShow
()
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin
'
){
if
(
uni
.
getStorageSync
(
'loginType'
)
!=
'visitor
'
){
this
.
queryInfo
()
this
.
queryInfo
()
}
}
if
(
uni
.
getStorageSync
(
'resIrrAndSimpleResInfos'
)){
if
(
uni
.
getStorageSync
(
'resIrrAndSimpleResInfos'
)){
...
...
util/interceptor.ts
View file @
69649f08
...
@@ -99,6 +99,7 @@
...
@@ -99,6 +99,7 @@
// 旧版的拦截器
// 旧版的拦截器
import
{
apiURL
,
cffpURL
,
sfpUrl
}
from
"../environments/environment"
;
import
{
apiURL
,
cffpURL
,
sfpUrl
}
from
"../environments/environment"
;
import
api
from
"@/api/api"
;
import
api
from
"@/api/api"
;
import
*
as
sso
from
"@/util/sso"
;
// 白名单,不需要携带token就允许被访问的接口
// 白名单,不需要携带token就允许被访问的接口
const
whiteApiList
=
[
`
${
apiURL
}
/authorize/obtainToken`
,
const
whiteApiList
=
[
`
${
apiURL
}
/authorize/obtainToken`
,
`
${
apiURL
}
/authorize/checkToken`
,
`
${
apiURL
}
/authorize/checkToken`
,
...
@@ -110,12 +111,34 @@ const whiteApiList = [`${apiURL}/authorize/obtainToken`,
...
@@ -110,12 +111,34 @@ const whiteApiList = [`${apiURL}/authorize/obtainToken`,
`
${
apiURL
}
/verificationCode`
,
`
${
apiURL
}
/verificationCode`
,
`
${
sfpUrl
}
/sfp/sfpMain/pocessTracking`
,
`
${
sfpUrl
}
/sfp/sfpMain/pocessTracking`
,
`
${
cffpURL
}
/partner/queryById`
,
`
${
cffpURL
}
/partner/queryById`
,
`
${
apiURL
}
/sso/ticket/consume`
,
// Casdoor 票据消费:匿名,唯一凭据是 ticket
];
];
export
const
interceptor
=
()
=>
{
export
const
interceptor
=
()
=>
{
uni
.
addInterceptor
(
'request'
,
{
uni
.
addInterceptor
(
'request'
,
{
// 请求拦截器
// 请求拦截器
invoke
(
args
)
{
invoke
(
args
)
{
// alert(JSON.stringify(args))
// alert(JSON.stringify(args))
// Casdoor SSO 匿名端点(票据消费带 query,精确白名单匹配不上,按前缀放行)
if
(
typeof
args
.
url
===
'string'
&&
args
.
url
.
indexOf
(
'/sso/'
)
!==
-
1
)
{
args
.
header
=
{
'content-type'
:
args
.
method
===
'POST'
?
'application/json'
:
'application/x-www-form-urlencoded'
,
}
return
}
// Casdoor 票据通道(小程序 web-view):令牌只在内存,绝不走 obtainToken 游客降级
if
(
sso
.
isSsoMode
())
{
const
ssoToken
=
sso
.
getSsoToken
()
if
(
!
ssoToken
)
{
// 会话应在但内存令牌丢失(web-view 被系统回收后重载业务页):交原生重走票据,拦掉本次无令牌请求
sso
.
reloginViaMiniprogram
()
return
}
args
.
header
=
{
'content-type'
:
args
.
method
===
'POST'
?
'application/json'
:
'application/x-www-form-urlencoded'
,
'X-Authorization'
:
ssoToken
,
}
return
}
// 当本地没有token,并且接口地址没在白名单内,需要重新获取token
// 当本地没有token,并且接口地址没在白名单内,需要重新获取token
if
(
!
uni
.
getStorageSync
(
'uni-token'
)
&&
!
whiteApiList
.
includes
(
args
.
url
))
{
if
(
!
uni
.
getStorageSync
(
'uni-token'
)
&&
!
whiteApiList
.
includes
(
args
.
url
))
{
...
@@ -153,7 +176,17 @@ export const interceptor = () => {
...
@@ -153,7 +176,17 @@ export const interceptor = () => {
},
},
// 响应拦截器,可以对数据进行预处理
// 响应拦截器,可以对数据进行预处理
success
(
args
)
{
success
(
args
)
{
if
(
args
&&
args
.
data
&&
args
.
data
.
errorCode
&&
"T001"
==
args
.
data
.
errorCode
){
const
bodyT001
=
args
&&
args
.
data
&&
args
.
data
.
errorCode
&&
"T001"
==
args
.
data
.
errorCode
// Casdoor 分支失败:sso 模式接受纯 HTTP 401;非 sso 模式严格维持老条件(仅 body T001),行为不变
const
unauthorized
=
sso
.
isSsoMode
()
?
(
bodyT001
||
args
.
statusCode
===
401
)
:
bodyT001
if
(
unauthorized
){
if
(
sso
.
isSsoMode
())
{
// 不回 H5 首页/登录页:销毁 web-view,原生强制重走 wx.login→票据
sso
.
reloginViaMiniprogram
()
return
}
uni
.
removeStorageSync
(
'isLogin'
);
uni
.
removeStorageSync
(
'isLogin'
);
uni
.
removeStorageSync
(
'uni-token'
);
uni
.
removeStorageSync
(
'uni-token'
);
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
...
...
util/sso.ts
0 → 100644
View file @
69649f08
/**
* Casdoor 统一身份·CFFP/SFP H5 侧(design D3):
* - /pages/auth/ticket 落地页用一次性票据换 Casdoor JWT,仅存内存(不落 localStorage)
* - sso 模式标志与业务 userId 存持久 storage(不含令牌、非敏感):web-view 被系统回收后
* 重载业务页时,内存令牌已丢而登录态「应在」,据此交原生重走票据,绝不静默降级 obtainToken
* - 401/T001:销毁 web-view,由原生 reLaunch 重走 wx.login→票据闭环
* 普通浏览器直连票据 URL 也可消费;但无 wx.miniProgram 可回时降级跳 H5 登录页。
*/
import
wx
from
'weixin-js-sdk'
import
{
apiURL
}
from
'@/environments/environment'
import
dataHandling
from
'@/util/dataHandling'
const
MODE_KEY
=
'cffp_sso_mode'
let
casdoorToken
:
string
|
null
=
null
let
relogining
=
false
/**
* 建立 SSO 会话:令牌只进内存;非敏感登录态(模式标志、isLogin、业务 userId)
* 落持久 storage——web-view 被系统回收重载后内存令牌丢失,据此识别「登录态应在」,
* 拦掉无令牌请求并交原生重走票据,绝不静默降级 obtainToken 游客链路。
* loginType 写 'sso':作为第三种登录方式(codelogin/visitor/sso),让全局登录态
* UI 与「已登录才拉 queryInfo」门禁天然识别;code 登录专属链路仍显式比对 codelogin。
*/
export
const
setSsoToken
=
(
token
:
string
,
userId
:
number
|
string
)
=>
{
casdoorToken
=
token
uni
.
setStorageSync
(
MODE_KEY
,
'1'
)
uni
.
setStorageSync
(
'isLogin'
,
'1'
)
uni
.
setStorageSync
(
'loginType'
,
'sso'
)
uni
.
setStorageSync
(
'cffp_userId'
,
userId
)
}
export
const
getSsoToken
=
():
string
|
null
=>
casdoorToken
/**
* 票桥接力(referrer-portal-api design D11):用内存中的 Casdoor token 向工作台后端
* (csf-api,与 workbench_url 同源)换一次性票据,使「CFFP → 工作台」免 Casdoor 登录页。
* 跨域携带 Authorization,服务端按 referrer.ticket.allowed-origins 白名单放行本 H5 来源。
* 失败仅 reject 不跳转——调用方降级为直连工作台(照旧走工作台自身 OIDC 登录)。
* 注意响应是 csf 的 Result 形态 {code:200,msg,data:{ticket}}(区别于 cffp 票桥的 success 字段)。
*/
export
const
issueWorkbenchTicket
=
(
csfApiBase
:
string
):
Promise
<
string
>
=>
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
casdoorToken
)
{
reject
(
new
Error
(
'无 Casdoor 令牌,无法签发工作台票据'
))
return
}
uni
.
request
({
url
:
`
${
csfApiBase
}
/c/sso/ticket/issue`
,
method
:
'POST'
,
data
:
{},
header
:
{
'Content-Type'
:
'application/json'
,
'Authorization'
:
`Bearer
${
casdoorToken
}
`
},
success
:
(
res
:
any
)
=>
{
const
data
=
res
.
data
&&
res
.
data
.
code
===
200
?
res
.
data
.
data
:
null
const
ticket
=
data
&&
data
.
ticket
ticket
?
resolve
(
ticket
)
:
reject
(
new
Error
(
'工作台票据签发失败: '
+
(
res
.
data
&&
res
.
data
.
msg
)))
},
fail
:
()
=>
reject
(
new
Error
(
'工作台票据签发网络失败'
))
})
})
export
const
isSsoMode
=
():
boolean
=>
uni
.
getStorageSync
(
MODE_KEY
)
===
'1'
export
const
clearSso
=
()
=>
{
casdoorToken
=
null
uni
.
removeStorageSync
(
MODE_KEY
)
uni
.
removeStorageSync
(
'isLogin'
)
uni
.
removeStorageSync
(
'cffp_userId'
)
// 回到 H5 老链路的游客语义
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
}
export
const
isMiniprogram
=
():
boolean
=>
{
// #ifdef H5
return
dataHandling
.
h5RuntimeEnv
()
===
'wechat-miniprogram'
// #endif
// #ifndef H5
return
false
// #endif
}
/** 一次性票据换 Casdoor 令牌与业务 userId(匿名接口,唯一凭据是票据本身) */
export
const
consumeTicket
=
(
ticket
:
string
):
Promise
<
{
token
:
string
,
userId
:
number
|
string
}
>
=>
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
request
({
url
:
`
${
apiURL
}
/sso/ticket/consume?ticket=
${
encodeURIComponent
(
ticket
)}
`
,
method
:
'GET'
,
success
:
(
res
:
any
)
=>
{
const
data
=
res
.
data
&&
res
.
data
.
success
?
res
.
data
.
data
:
null
data
&&
data
.
token
&&
data
.
userId
!=
null
?
resolve
({
token
:
data
.
token
,
userId
:
data
.
userId
})
:
reject
(
new
Error
(
'票据无效、已过期或已使用'
))
},
fail
:
()
=>
reject
(
new
Error
(
'票据消费网络失败'
))
})
})
/** 当前应用内路径(剥 history base),供原生重走票据后精确回跳 */
export
const
currentAppPath
=
():
string
=>
{
const
path
=
window
.
location
.
pathname
+
window
.
location
.
search
const
m
=
path
.
match
(
/
\/((?:
pages|myPackageA|myPackageB|sfp
)\/
.*
)
/
)
return
m
?
'/'
+
m
[
1
]
:
'/pages/index/index'
}
/**
* 通知原生销毁 web-view 重走票据(design D3 重登闭环)。
* 非小程序环境无法回原生:清理 sso 态并降级 H5 登录页。
*/
export
const
reloginViaMiniprogram
=
(
appPath
?:
string
)
=>
{
if
(
relogining
)
return
const
redirect
=
appPath
||
currentAppPath
()
// #ifdef H5
if
(
isMiniprogram
())
{
relogining
=
true
wx
.
miniProgram
.
reLaunch
({
url
:
`/pages/launch/index?ssoRelogin=1&cffpRedirect=
${
encodeURIComponent
(
redirect
)}
`
})
return
}
// #endif
clearSso
()
uni
.
reLaunch
({
url
:
'/myPackageA/login/login'
})
}
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