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
8e8ed1c5
Commit
8e8ed1c5
authored
Apr 15, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!109
parents
19cf257f
4c80f4cf
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
44 deletions
+48
-44
components/commonTimePicker/commonTimePicker.vue
+3
-2
pages/courseDetail/courseDetail.vue
+0
-0
pages/courselist/courselist.vue
+9
-8
pages/index/index.vue
+1
-0
pages/lanch/index.vue
+1
-1
pages/orderStatus/orderStatus.vue
+3
-0
util/router.js
+31
-33
No files found.
components/commonTimePicker/commonTimePicker.vue
View file @
8e8ed1c5
...
...
@@ -16,8 +16,8 @@
<uni-popup
ref=
"timePopup"
type=
"bottom"
:maskClick=
"false"
>
<view
class=
"timeBox"
>
<view
class=
"titleBox"
>
<view
@
click=
"cancel"
style=
"color:#333;"
>
取消
</view>
<view
style=
"color:#20279b;"
@
click=
"confirm"
>
确定
</view>
<view
@
click
.
stop
=
"cancel"
style=
"color:#333;"
>
取消
</view>
<view
style=
"color:#20279b;"
@
click
.
stop
=
"confirm"
>
确定
</view>
</view>
<picker-view
:indicator-style=
"indicatorStyle"
:value=
"value"
@
change=
"bindChange"
class=
"picker-view"
>
<picker-view-column
v-if=
"showYear"
>
...
...
@@ -178,6 +178,7 @@ export default {
immediate
:
true
,
handler
(
newVal
)
{
if
(
newVal
&&
(
newVal
.
year
||
newVal
.
month
||
newVal
.
day
))
{
this
.
updateSelectedDate
(
newVal
);
}
else
{
// 没有传入有效日期时,清空显示
...
...
pages/courseDetail/courseDetail.vue
View file @
8e8ed1c5
This diff is collapsed.
Click to expand it.
pages/courselist/courselist.vue
View file @
8e8ed1c5
...
...
@@ -231,6 +231,7 @@
}
},
onShow
()
{
this
.
isLoading
=
false
this
.
generatedImage
=
''
...
...
@@ -308,8 +309,6 @@
'产品中心'
,
'pages/courselist/courselist'
)
console
.
log
(
'env'
,
dataHandling
.
h5RuntimeEnv
()
==
'wechat-miniprogram'
);
if
(
dataHandling
.
h5RuntimeEnv
()
==
'wechat-miniprogram'
)
{
this
.
jumpMplogin
()
return
...
...
@@ -392,21 +391,23 @@
title
:
this
.
shareItem
.
fileTitle
,
desc
:
this
.
shareItem
.
fileSynopsis
,
link
:
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
shareItem
.
fileId
}
&coursesharing=1&serialsNo=
${
nanoid
()}
&shareCode=
${
shareCode
}
&shareUserId=
${
this
.
userId
}
&jumpUrl=
${
jumptime
}
&landingPage=courseDetail&miniShare=1`
,
// link: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.shareItem.fileId +
// '&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode +
// '&shareUserId=' +
// this.userId + '&jumpUrl=' + jumptime + "&", //分享链接
imgUrl
:
this
.
shareItem
.
displayImage
,
//图片
commonId
:
this
.
shareItem
.
fileId
,
sharePage
:
'courseDetail'
//分享出去得页面
sharePage
:
'courseDetail'
,
//分享出去得页面
userId
:
this
.
userId
,
fileId
:
this
.
shareItem
.
fileId
,
shareCode
:
shareCode
,
isSaveShare
:
'1'
,
//是否存贮分享便于统计分享数据
}
wx
.
miniProgram
.
postMessage
({
data
:
{
type
:
'share'
,
shareData
:
JSON
.
stringify
(
shareInfo
)
shareData
:
JSON
.
stringify
(
shareInfo
),
messageId
:
nanoid
()
// 唯一消息ID
}
})
return
}
this
.
getshareData2
(
shareCode
,
jumptime
,
this
.
shareItem
)
...
...
pages/index/index.vue
View file @
8e8ed1c5
...
...
@@ -341,6 +341,7 @@
this
.
dataToken
=
''
// 清除事件监听
uni
.
$off
(
'loginUpdate'
,
this
.
queryAreaCenterInfo
);
},
methods
:
{
// 初始化首页分享 注意sdk时序问题。传递的url一定要是当前页面的url window.location.href.split('#')[0]
...
...
pages/lanch/index.vue
View file @
8e8ed1c5
...
...
@@ -123,7 +123,7 @@
})
}
else
if
(
landingPage
==
'orderStatus'
){
uni
.
reLaunch
({
url
:
`/pages/orderStatus/orderStatus?orderId=
${
jumpInfo
.
value
.
orderId
}
&fileId=
${
jumpInfo
.
value
.
fileId
}
&orderStatus=2&userId=
${
res
.
data
.
userId
}
`
url
:
`/pages/orderStatus/orderStatus?orderId=
${
jumpInfo
.
value
.
orderId
}
&fileId=
${
jumpInfo
.
value
.
fileId
}
&orderStatus=2&userId=
${
res
.
data
.
userId
}
&backMySelf=1
`
})
}
}
else
{
...
...
pages/orderStatus/orderStatus.vue
View file @
8e8ed1c5
...
...
@@ -57,6 +57,8 @@
import
courseItem
from
"@/components/courseItem/courseItem.vue"
;
import
tabBar
from
'../../components/tabBar/tabBar.vue'
;
import
{
initJssdkShare
,
setWechatShare
}
from
'@/util/fiveshare'
;
import
dataHandling
from
"@/util/dataHandling"
;
import
wx
from
'weixin-js-sdk'
export
default
{
components
:{
tabBar
,
courseItem
},
data
()
{
...
...
@@ -155,6 +157,7 @@
this
.
orderId
=
options
.
orderId
;
this
.
orderStatus
=
options
.
orderStatus
;
this
.
fileId
=
options
.
fileId
;
// 没有oldToken代表支付订单人和提供订单人不是同一个人
if
(
options
.
userId
&&
options
.
userId
!=
"undefined"
&&!
uni
.
getStorageSync
(
'oldToken'
)){
this
.
userId
=
options
.
userId
;
...
...
util/router.js
View file @
8e8ed1c5
import
api
from
"@/api/api"
;
import
dataHandling
from
'./dataHandling'
import
{
initJssdkShare
,
setWechatShare
}
from
'@/util/fiveshare'
;
...
...
@@ -30,28 +25,28 @@ let shareCustomPageList = [
'/pages/courselist/courselist'
,
'/myPackageA/businessCard/businessCard'
,
]
export
default
function
initApp
(){
export
default
function
initApp
()
{
let
date
=
Date
.
now
()
uni
.
addInterceptor
(
'navigateTo'
,
{
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke
(
e
)
{
invoke
(
e
)
{
let
userInfo
=
{}
if
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
{
if
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
{
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
}
let
pages
=
getCurrentPages
()
let
pagesLength
=
pages
.
length
if
(
shareCustomPageList
.
indexOf
(
e
.
url
)
==-
1
)
{
if
(
shareCustomPageList
.
indexOf
(
e
.
url
)
==
-
1
)
{
if
(
dataHandling
.
h5RuntimeEnv
()
==
'wechat-miniprogram'
)
{
let
shareInfo
=
{
title
:
'成为银盾合伙人,分享商品赚不停'
,
desc
:
`资源+伙伴,共赢未来!`
,
link
:
`
${
shareURL
}
/pages/index/index?miniShare=1`
,
//分享链接
imgUrl
:
`
${
shareURL
}
/myPackageA/static/images/logo3.png`
,
//图片
commonId
:
uni
.
getStorageSync
(
'cffp_userId'
),
sharePage
:
'index'
//分享出去得页面
commonId
:
uni
.
getStorageSync
(
'cffp_userId'
),
sharePage
:
'index'
//分享出去得页面
}
wx
.
miniProgram
.
postMessage
({
data
:
{
...
...
@@ -63,17 +58,18 @@ export default function initApp(){
return
}
}
if
(
whiteList
.
indexOf
(
e
.
url
)
==-
1
&&!
uni
.
getStorageSync
(
'loginType'
)){
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
if
(
whiteList
.
indexOf
(
e
.
url
)
==
-
1
&&
!
uni
.
getStorageSync
(
'loginType'
))
{
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
uni
.
navigateTo
({
url
:
'/myPackageA/login/login'
})
}
if
(
uni
.
getStorageSync
(
'cffp_userId'
))
{
api
.
queryInfo
({
userId
:
uni
.
getStorageSync
(
'cffp_userId'
)}).
then
(
res
=>
{
if
(
!
res
[
'success'
])
{
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
if
(
uni
.
getStorageSync
(
'cffp_userId'
))
{
api
.
queryInfo
({
userId
:
uni
.
getStorageSync
(
'cffp_userId'
)
}).
then
(
res
=>
{
if
(
!
res
[
'success'
])
{
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
uni
.
navigateTo
({
url
:
'/myPackageA/login/login'
})
...
...
@@ -90,14 +86,14 @@ export default function initApp(){
})
}
if
(
userInfo
.
userIsActive
==
2
&&
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin'
)
{
if
(
userInfo
.
userIsActive
==
2
&&
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin'
)
{
// 显示禁用用户弹窗
const
currentPage
=
getCurrentPages
()[
getCurrentPages
().
length
-
1
];
currentPage
.
$refs
.
restrictedTip
.
open
()
return
false
;
// 返回对象而不是布尔值
}
let
whiteArr
=
[
'index'
,
'personalCenter'
,
'courselist'
,
'product'
]
let
whiteArr
=
[
'index'
,
'personalCenter'
,
'courselist'
,
'product'
]
// 1. 解析 URL 中的 from 参数
const
getQueryParam
=
(
url
,
key
)
=>
{
const
queryString
=
url
.
split
(
'?'
)[
1
];
...
...
@@ -107,13 +103,13 @@ export default function initApp(){
};
const
fromParam
=
getQueryParam
(
e
.
url
,
'from'
);
if
(
!
hasPermission
(
e
.
url
))
{
if
(
!
hasPermission
(
e
.
url
))
{
// 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页
if
(
fromParam
&&
whiteArr
.
includes
(
fromParam
))
{
uni
.
redirectTo
({
url
:
`/myPackageA/login/login?from=
${
fromParam
}
`
})
}
else
{
}
else
{
uni
.
redirectTo
({
url
:
'/myPackageA/login/login'
})
...
...
@@ -141,21 +137,21 @@ export default function initApp(){
}
return
true
},
success
(
e
)
{}
success
(
e
)
{}
})
uni
.
addInterceptor
(
'switchTab'
,
{
// tabbar页面跳转前进行拦截
invoke
(
e
)
{
if
(
shareCustomPageList
.
indexOf
(
e
.
url
)
==-
1
)
{
if
(
shareCustomPageList
.
indexOf
(
e
.
url
)
==
-
1
)
{
if
(
dataHandling
.
h5RuntimeEnv
()
==
'wechat-miniprogram'
)
{
let
shareInfo
=
{
title
:
'成为银盾合伙人,分享商品赚不停'
,
desc
:
`资源+伙伴,共赢未来!`
,
link
:
`
${
shareURL
}
/pages/index/index?miniShare=1`
,
//分享链接
imgUrl
:
`
${
shareURL
}
/myPackageA/static/images/logo3.png`
,
//图片
commonId
:
uni
.
getStorageSync
(
'cffp_userId'
),
sharePage
:
'index'
//分享出去得页面
commonId
:
uni
.
getStorageSync
(
'cffp_userId'
),
sharePage
:
'index'
//分享出去得页面
}
wx
.
miniProgram
.
postMessage
({
data
:
{
...
...
@@ -167,8 +163,9 @@ export default function initApp(){
return
}
}
if
(
uni
.
getStorageSync
(
'cffp_userId'
)){
api
.
queryInfo
({
userId
:
uni
.
getStorageSync
(
'cffp_userId'
)}).
then
(
res
=>
{
if
(
uni
.
getStorageSync
(
'cffp_userId'
))
{
api
.
queryInfo
({
userId
:
uni
.
getStorageSync
(
'cffp_userId'
)
}).
then
(
res
=>
{
// if(!res['success']){
// uni.setStorageSync('loginType','visitor')
// uni.navigateTo({
...
...
@@ -204,15 +201,15 @@ export default function initApp(){
uni
.
addInterceptor
(
'reLaunch'
,
{
//页面跳转前拦截
invoke
(
e
)
{
if
(
shareCustomPageList
.
indexOf
(
e
.
url
)
==-
1
)
{
if
(
shareCustomPageList
.
indexOf
(
e
.
url
)
==
-
1
)
{
if
(
dataHandling
.
h5RuntimeEnv
()
==
'wechat-miniprogram'
)
{
let
shareInfo
=
{
title
:
'成为银盾合伙人,分享商品赚不停'
,
desc
:
`资源+伙伴,共赢未来!`
,
link
:
`
${
shareURL
}
/pages/index/index?miniShare=1`
,
//分享链接
imgUrl
:
`
${
shareURL
}
/myPackageA/static/images/logo3.png`
,
//图片
commonId
:
uni
.
getStorageSync
(
'cffp_userId'
),
sharePage
:
'index'
//分享出去得页面
commonId
:
uni
.
getStorageSync
(
'cffp_userId'
),
sharePage
:
'index'
//分享出去得页面
}
wx
.
miniProgram
.
postMessage
({
data
:
{
...
...
@@ -240,12 +237,13 @@ export default function initApp(){
success
(
e
)
{}
})
}
function
hasPermission
(
url
)
{
let
islogin
=
uni
.
getStorageSync
(
"isLogin"
);
//在这可以使用token、vuex
function
hasPermission
(
url
)
{
let
islogin
=
uni
.
getStorageSync
(
"isLogin"
);
//在这可以使用token、vuex
// islogin = Boolean(Number(islogin));//返回布尔值
// 在白名单中或有登录判断条件可以直接跳转
if
(
whiteList
.
indexOf
(
url
.
slice
(
0
,
url
.
indexOf
(
'?'
)))
!==
-
1
||
islogin
)
{
if
(
whiteList
.
indexOf
(
url
.
slice
(
0
,
url
.
indexOf
(
'?'
)))
!==
-
1
||
islogin
)
{
return
true
}
return
false
...
...
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