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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
330 additions
and
344 deletions
+330
-344
components/commonTimePicker/commonTimePicker.vue
+3
-2
pages/courseDetail/courseDetail.vue
+282
-300
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
...
...
@@ -2,7 +2,7 @@
<view
class=
"container"
>
<!-- 禁用弹窗 -->
<restrictedTip
ref=
"restrictedTip"
/>
<restrictedTip
ref=
"restrictedTip"
/>
<view
v-if=
"!mpCffp"
>
<view
class=
"shareheader"
style=
""
v-if=
"coursesharing != 1 || deviceType==3"
>
<!-- #ifdef APP -->
...
...
@@ -10,7 +10,7 @@
<!-- #endif -->
<view
class=
"share-entrance"
>
<view
class=
"share-entrance"
>
<view
style=
"z-index: 99999;"
>
<uni-popup
ref=
"share"
type=
"top"
safeArea
backgroundColor=
"#F4F2F3"
:maskClick=
'true'
@
change=
"maskClick"
>
...
...
@@ -21,10 +21,12 @@
<!-- v-if="isWxH5" -->
<view
v-if=
"isWxH5"
style=
"width: 40rpx;height: 40rpx;padding-right: 20rpx;"
>
<image
class=
"image"
@
click=
"reinvite"
src=
"../../static/fastentry/Slice122.png"
mode=
""
></image>
<image
class=
"image"
@
click=
"reinvite"
src=
"../../static/fastentry/Slice122.png"
mode=
""
>
</image>
</view>
<view
class=
""
style=
"width: 40rpx;height: 40rpx; "
>
<image
class=
"image"
@
click=
"shareToggle"
src=
"../../static/fastentry/Slice12.png"
mode=
""
></image>
<image
class=
"image"
@
click=
"shareToggle"
src=
"../../static/fastentry/Slice12.png"
mode=
""
>
</image>
</view>
...
...
@@ -37,22 +39,23 @@
<view
class=
"courseBannerBox"
v-if=
"!sliceshare && bannerViewType == '1'"
>
<video
v-if=
"isRenderVideo"
id=
"myVideo"
:src=
"courseInfo.filePathOss"
:initial-time=
"viewTime"
object-fit=
"contain"
class=
"videoBox"
:poster=
"courseInfo.fileFirstImage"
:title=
"courseInfo.fileTitle"
@
play=
"playVideo"
@
pause=
"pause"
@
timeupdate=
"timeupdate"
style=
"width: 100vw;height: 312.5rpx;"
></video>
@
play=
"playVideo"
@
pause=
"pause"
@
timeupdate=
"timeupdate"
style=
"width: 100vw;height: 312.5rpx;"
></video>
</view>
<view
class=
"swiperBox"
v-if=
"bannerViewType == '2'"
>
<uni-swiper-dot
:dots-styles=
"
{
<uni-swiper-dot
:dots-styles=
"
{
backgroundColor: 'rgba(145, 151, 201, .5)',
selectedBackgroundColor: 'rgba(255, 255, 255, 1)',
bottom:100,
selectedBorder: '10rpx rgba(255, 255, 255, 1) solid',
width:8
}" :info="swiperList" :current="current" mode="default">
<swiper
autoplay
:indicator-dots=
"true"
:interval=
"3000"
circular
class=
"swiper-box"
@
change=
"changeSwiper"
>
<swiper
autoplay
:indicator-dots=
"true"
:interval=
"3000"
circular
class=
"swiper-box"
@
change=
"changeSwiper"
>
<swiper-item
v-for=
"(item,index) in swiperList"
:key=
"index"
class=
"swiper-item-no-gap"
>
<view
class=
"swiper-item"
>
<image
style=
"height: 100%;width: 100%;display: block;"
:src=
"item['filePath']"
mode=
"aspectFill"
></image>
<image
style=
"height: 100%;width: 100%;display: block;"
:src=
"item['filePath']"
mode=
"aspectFill"
></image>
</view>
</swiper-item>
</swiper>
...
...
@@ -69,7 +72,8 @@
</view>
<view
class=
"dataBox"
>
<strong
v-if=
"(courseInfo.status==1 || courseInfo.status==2 )&& courseInfo.coursePrice !== 0"
>
¥
{{
Number
(
courseInfo
.
coursePrice
).
toFixed
(
2
)
}}
</strong>
<strong
v-if=
"(courseInfo.status==1 || courseInfo.status==2 )&& courseInfo.coursePrice !== 0"
>
¥
{{
Number
(
courseInfo
.
coursePrice
).
toFixed
(
2
)
}}
</strong>
<text
v-if=
"courseInfo.coursePrice != 0"
>
{{
courseInfo
.
salesNumber
}}
人
{{
showName
}}
</text>
...
...
@@ -125,7 +129,8 @@
<view>
<p><text
class=
"lecturerName"
>
{{
lecturerInfo
.
lecturerName
}}
</text></p>
<template
v-if=
"lecturerInfo?.lecturerRankNames"
>
<p
v-for=
"(item,index) in lecturerInfo.lecturerRankNames.split(',')"
:key=
"index"
class=
"lecturerTitle"
>
<p
v-for=
"(item,index) in lecturerInfo.lecturerRankNames.split(',')"
:key=
"index"
class=
"lecturerTitle"
>
<text>
{{
item
}}
</text>
</p>
</
template
>
...
...
@@ -137,24 +142,19 @@
<view
v-html=
"lecturerInfo?.lecturerIntroduce"
class=
"lecturerText richTextContent"
></view>
</view>
<view
v-if=
"!mpCffp"
>
<view
class=
"buyBox"
@
click=
"saveOrder()"
v-if=
"(courseInfo.status == 1 || courseInfo.status == 2) && courseInfo.coursePrice != 0"
>
<view
class=
"buyBox"
@
click=
"saveOrder()"
v-if=
"(courseInfo.status == 1 || courseInfo.status == 2) && courseInfo.coursePrice != 0"
>
<text>
{{showName}}
</text>
</view>
</view>
<view
v-if=
"mpCffp"
class=
"shareBuyBox"
>
<view
class=
"rightShare"
@
click=
"reinvite"
>
<loadingIcon
:loading=
"isLoading"
v-if=
"isLoading"
loadColor=
"#20269B"
/>
<loadingIcon
:loading=
"isLoading"
v-if=
"isLoading"
loadColor=
"#20269B"
/>
<text
style=
"margin-left: 5rpx;"
>
分享
</text>
</view>
<view
class=
"leftBuy"
@
click=
"saveOrder()"
v-if=
"(courseInfo.status == 1 || courseInfo.status == 2) && courseInfo.coursePrice != 0"
>
<loadingIcon
:loading=
"isOrderLoading"
v-if=
"isOrderLoading"
/>
<view
class=
"leftBuy"
@
click=
"saveOrder()"
v-if=
"(courseInfo.status == 1 || courseInfo.status == 2) && courseInfo.coursePrice != 0"
>
<loadingIcon
:loading=
"isOrderLoading"
v-if=
"isOrderLoading"
/>
<text
style=
"margin-left: 5rpx;"
>
{{showName}}
</text>
</view>
...
...
@@ -162,13 +162,7 @@
</view>
</view>
<boot-page
loginSource=
"产品详情"
v-if=
"sharelogin"
:wayType=
"wayType"
ref=
"sharelogin"
@
close=
"close"
></boot-page>
<boot-page
loginSource=
"产品详情"
v-if=
"sharelogin"
:wayType=
"wayType"
ref=
"sharelogin"
@
close=
"close"
></boot-page>
<uni-share-wx
ref=
"sharewx"
></uni-share-wx>
<!-- <view class="markBox" @click="shareTipsFlag=false" v-if="shareTipsFlag">
<view class="guideImgBox">
...
...
@@ -182,12 +176,15 @@
<!-- 分享得向导图 -->
<ShareGuide
:show
.
sync=
"shareTipsFlag"
@
close=
"shareTipsFlag=false"
></ShareGuide>
<login-popup
ref=
"loginPopupCom"
@
confirm=
"c_confirmLoginPopup"
@
canle=
"canleLogin"
></login-popup>
<verify-popup
ref=
"verifyPopupCom"
title=
"温馨提示"
content=
"请问您确认预约本课程吗?"
@
confirm=
"c_confirmVerifyPopup"
@
canle=
"canleVerify"
>
<login-popup
ref=
"loginPopupCom"
@
confirm=
"c_confirmLoginPopup"
@
canle=
"canleLogin"
></login-popup>
<verify-popup
ref=
"verifyPopupCom"
title=
"温馨提示"
content=
"请问您确认预约本课程吗?"
@
confirm=
"c_confirmVerifyPopup"
@
canle=
"canleVerify"
>
</verify-popup>
<uni-popup
ref=
"subscribeSuccessPopup"
:mask-click=
"false"
>
<view
class=
"loginPopupBox"
style=
"text-align: center;width: 630rpx;padding-top: 35rpx;letter-spacing: 1rpx;"
>
<view
style=
"display: flex;align-items: center;;justify-content: center;font-size: 32rpx;font-weight: bold;color: #20269B;margin:40rpx 0 60rpx 0;"
>
<view
class=
"loginPopupBox"
style=
"text-align: center;width: 630rpx;padding-top: 35rpx;letter-spacing: 1rpx;"
>
<view
style=
"display: flex;align-items: center;;justify-content: center;font-size: 32rpx;font-weight: bold;color: #20269B;margin:40rpx 0 60rpx 0;"
>
<view
style=
"width: 6%;margin-right: 10rpx;margin-bottom: -10rpx;"
>
<image
src=
"../../static/images/correct.png"
mode=
"widthFix"
></image>
</view>
...
...
@@ -199,37 +196,22 @@
{{successMessage}}
</view>
<view
style=
"margin-top: 10rpx;"
>
<view
@
click=
"c_closeSubscribeSuccessPopup"
><button
class=
"popup_replenish_button2"
size=
"mini"
>
关闭
</button>
<view
@
click=
"c_closeSubscribeSuccessPopup"
><button
class=
"popup_replenish_button2"
size=
"mini"
>
关闭
</button>
</view>
</view>
</view>
</uni-popup>
<partner-tip-popup
ref=
"partnerTipPopup"
@
join=
"gotoJoinPartner"
@
continue=
"continueShare"
/>
<partner-tip-popup
ref=
"partnerTipPopup"
@
join=
"gotoJoinPartner"
@
continue=
"continueShare"
/>
<!-- 海报弹窗 -->
<sharePosterPop
ref=
"sharePosterPop"
:generatedImage=
"generatedImage"
@
closePoster=
"closePoster"
:shareTxt=
"posterShareTxt"
:imgType=
"posterImgType"
></sharePosterPop>
<sharePosterPop
ref=
"sharePosterPop"
:generatedImage=
"generatedImage"
@
closePoster=
"closePoster"
:shareTxt=
"posterShareTxt"
:imgType=
"posterImgType"
></sharePosterPop>
<!-- #ifdef H5 -->
<view
class=
"generateImageBox"
ref=
"captureElement"
v-if=
"!generatedImage"
>
<view
class=
"imgBox"
>
<img
v-if=
"showImg"
class=
"posterImg"
@
load=
"handleBgImageLoad"
@
error=
"handleBgImageError"
style=
"display: block;"
:src=
"shareItem.fileFirstImage+'?t='+Math.random()"
crossorigin=
"anonymous"
alt=
"防缓存图片"
/>
<img
v-if=
"showImg"
class=
"posterImg"
@
load=
"handleBgImageLoad"
@
error=
"handleBgImageError"
style=
"display: block;"
:src=
"shareItem.fileFirstImage+'?t='+Math.random()"
crossorigin=
"anonymous"
alt=
"防缓存图片"
/>
</view>
<view
class=
"txtBox"
>
<view
class=
"descriptionTxt"
>
...
...
@@ -242,10 +224,7 @@
<view
class=
"left"
>
<view
class=
"top"
>
<view
style=
"width: 100rpx;"
>
<image
:src=
"companyLogo"
mode=
"widthFix"
></image>
<image
:src=
"companyLogo"
mode=
"widthFix"
></image>
</view>
<view
class=
"companyName"
>
银盾家办
</view>
...
...
@@ -256,11 +235,8 @@
</view>
<!-- 二维码容器 -->
<view
class=
"qrcode-container"
>
<canvas
canvas-id=
"qrcode"
class=
"qrcode-canvas"
:style=
"{width: qrCodeSize + 'px', height: qrCodeSize + 'px'}"
></canvas>
<canvas
canvas-id=
"qrcode"
class=
"qrcode-canvas"
:style=
"{width: qrCodeSize + 'px', height: qrCodeSize + 'px'}"
></canvas>
</view>
</view>
</view>
...
...
@@ -279,10 +255,10 @@
import
VerifyPopup
from
"@/components/unipopup/verifyPopup.vue"
;
import
UniShareWx
from
"@/uni_modules/uni-share-wx/index.vue"
;
import
dataHandling
from
"@/util/dataHandling"
;
import
{
hshare
,
setWechatShare
,
initJssdkShare
}
from
'@/util/fiveshare'
;
import
{
nanoid
}
from
'nanoid'
;
import
{
hshare
,
setWechatShare
,
initJssdkShare
}
from
'@/util/fiveshare'
;
import
{
nanoid
}
from
'nanoid'
;
import
common
from
'../../common/common'
;
import
{
baseURL
,
apiURL
,
cffpURL
,
companyInfo
,
shareURL
}
from
"@/environments/environment"
;
import
{
baseURL
,
apiURL
,
cffpURL
,
companyInfo
,
shareURL
}
from
"@/environments/environment"
;
import
sharePosterPop
from
'@/components/commonPopup/sharePosterPop.vue'
;
import
UQRCode
from
'uqrcodejs'
;
import
{
elementToImage
}
from
'@/util/htmlToImage'
;
...
...
@@ -303,21 +279,21 @@
},
data
()
{
return
{
pollingTimer
:
null
,
// 轮询定时器
miniShareInfo
:{},
//通过小程序分享出去的信息
sharePosterObj
:{},
pollingTimer
:
null
,
// 轮询定时器
miniShareInfo
:
{},
//通过小程序分享出去的信息
sharePosterObj
:
{},
userInfo
:
{},
wayType
:
'1'
,
//登陆的类型
partnerType
:
''
,
//是否是合伙人
addSystemType
:
''
,
//因为会从其他公众号跳转过来所以接受一下公众号的类型
systemType
:
companyInfo
.
systemType
,
showName
:
'购买'
,
successMessage
:
''
,
show
:
false
,
isWxH5
:
false
,
wayType
:
'1'
,
//登陆的类型
partnerType
:
''
,
//是否是合伙人
addSystemType
:
''
,
//因为会从其他公众号跳转过来所以接受一下公众号的类型
systemType
:
companyInfo
.
systemType
,
showName
:
'购买'
,
successMessage
:
''
,
show
:
false
,
isWxH5
:
false
,
bannerViewType
:
'1'
,
swiperList
:
[],
current
:
0
,
current
:
0
,
isWeixin
:
false
,
isRenderVideo
:
false
,
fileId
:
null
,
...
...
@@ -354,8 +330,8 @@
ios
:
'https://apps.apple.com/cn/app/%E6%98%AF%E5%A5%BD/id1457958161'
,
scheme
:
'com.qdxxzy.user://'
},
deviceType
:
null
,
shareTipsFlag
:
false
,
deviceType
:
null
,
shareTipsFlag
:
false
,
src
:
''
,
danmuList
:
[{
text
:
'第 1s 出现的弹幕'
,
...
...
@@ -369,23 +345,23 @@
}
],
danmuValue
:
''
,
qrCodeUrl
:
'https://example.com'
,
//二维码的链接地址
qrCodeSize
:
100
,
//二维码的尺寸
companyLogo
:
'../../static/suplogo.png'
,
generatedImage
:
''
,
//生成的海报图片,
shareItem
:
{
fileFirstImage
:
''
},
showImg
:
false
,
mpCffp
:
''
,
qrCodeUrl
:
'https://example.com'
,
//二维码的链接地址
qrCodeSize
:
100
,
//二维码的尺寸
companyLogo
:
'../../static/suplogo.png'
,
generatedImage
:
''
,
//生成的海报图片,
shareItem
:
{
fileFirstImage
:
''
},
showImg
:
false
,
mpCffp
:
''
,
isLoading
:
false
,
posterDesTxt
:
''
,
isOrderLoading
:
false
,
posterShareTxt
:
'长按图片分享给朋友'
,
orderCodeUrl
:
''
,
posterImgType
:
'sharePoster'
posterDesTxt
:
''
,
isOrderLoading
:
false
,
posterShareTxt
:
'长按图片分享给朋友'
,
orderCodeUrl
:
''
,
posterImgType
:
'sharePoster'
};
},
methods
:
{
gotoJoinPartner
(){
gotoJoinPartner
()
{
dataHandling
.
pocessTracking
(
'加盟'
,
`用户在产品详情未加盟时点击了加盟按钮`
,
...
...
@@ -402,12 +378,12 @@
// 打开微信分享啊
reinvite
()
{
//小程序没登录进入到系统,要回到小程序去登录
if
(
uni
.
getStorageSync
(
'mpCffp'
)
&&!
uni
.
getStorageSync
(
'dataToken'
))
{
if
(
uni
.
getStorageSync
(
'mpCffp'
)
&&
!
uni
.
getStorageSync
(
'dataToken'
))
{
this
.
jumpMplogin
()
return
}
// 未登录去登录
if
(
!
uni
.
getStorageSync
(
'loginType'
)
||
uni
.
getStorageSync
(
'loginType'
)
==
'visitor'
)
{
if
(
!
uni
.
getStorageSync
(
'loginType'
)
||
uni
.
getStorageSync
(
'loginType'
)
==
'visitor'
)
{
dataHandling
.
pocessTracking
(
'分享'
,
`用户在产品详情未登录时点击产品分享按钮`
,
...
...
@@ -421,7 +397,7 @@
return
}
// 已登录,未成为合伙人
if
(
this
.
userInfo
&&
!
this
.
userInfo
[
'partnerType'
])
{
if
(
this
.
userInfo
&&
!
this
.
userInfo
[
'partnerType'
])
{
dataHandling
.
pocessTracking
(
'分享'
,
`用户在产品详情未加盟时点击产品分享按钮`
,
...
...
@@ -435,7 +411,7 @@
}
this
.
continueShare
()
},
continueShare
(){
continueShare
()
{
this
.
userId
=
uni
.
getStorageSync
(
'cffp_userId'
)
const
shareCode
=
nanoid
()
+
this
.
userId
const
jumptime
=
Date
.
parse
(
new
Date
())
/
1000
...
...
@@ -483,40 +459,44 @@
//#ifdef H5
this
.
shareTipsFlag
=
true
;
if
(
dataHandling
.
h5RuntimeEnv
()
==
'wechat-miniprogram'
)
{
if
(
dataHandling
.
h5RuntimeEnv
()
==
'wechat-miniprogram'
)
{
let
shareInfo
=
{
title
:
this
.
courseInfo
.
fileTitle
,
// desc: '加入我们开启学习之旅',
desc
:
this
.
courseInfo
.
fileSynopsis
,
desc
:
this
.
courseInfo
.
fileSynopsis
,
link
:
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
fileId
}
&coursesharing=1&serialsNo=
${
nanoid
()}
&shareCode=
${
shareCode
}
&shareUserId=
${
this
.
userId
}
&jumpUrl=
${
jumptime
}
&landingPage=courseDetail&miniShare=1`
,
imgUrl
:
this
.
courseInfo
.
displayImage
,
//图片
sharePage
:
'courseDetail'
,
//分享的哪个页面
commonId
:
shareCode
sharePage
:
'courseDetail'
,
//分享的哪个页面
commonId
:
shareCode
,
userId
:
this
.
userId
,
fileId
:
this
.
fileId
,
shareCode
:
shareCode
,
isSaveShare
:
'1'
,
//是否存贮分享便于统计分享数据
}
wx
.
miniProgram
.
postMessage
({
data
:
{
type
:
'share'
,
shareData
:
JSON
.
stringify
(
shareInfo
)
data
:
{
type
:
'share'
,
shareData
:
JSON
.
stringify
(
shareInfo
)
}
})
return
}
this
.
getshareData2
(
shareCode
,
jumptime
)
this
.
getshareData2
(
shareCode
,
jumptime
)
// #endif
this
.
$refs
.
partnerTipPopup
.
close
()
this
.
wayType
=
'1'
},
canleLogin
(){
this
.
show
=
false
;
canleLogin
()
{
this
.
show
=
false
;
},
canleVerify
(){
this
.
show
=
false
;
canleVerify
()
{
this
.
show
=
false
;
},
//关闭预约成功弹窗
c_closeSubscribeSuccessPopup
()
{
this
.
show
=
false
;
this
.
show
=
false
;
this
.
$refs
.
subscribeSuccessPopup
.
close
();
},
//预约成功组件点击确认后的回调函数
...
...
@@ -527,8 +507,8 @@
}).
then
((
res
)
=>
{
if
(
res
[
'success'
])
{
this
.
$refs
.
verifyPopupCom
.
canle
();
this
.
show
=
true
;
this
.
successMessage
=
res
[
'message'
];
this
.
show
=
true
;
this
.
successMessage
=
res
[
'message'
];
this
.
$refs
.
subscribeSuccessPopup
.
open
();
}
else
{
...
...
@@ -546,9 +526,9 @@
this
.
$refs
.
verifyPopupCom
.
open
();
},
//关闭登录
close
(
val
,
loginTypeSync
,
type
)
{
close
(
val
,
loginTypeSync
,
type
)
{
// 直接点击了关闭登录的叉号
if
(
type
)
{
if
(
type
)
{
this
.
sharelogin
=
false
return
}
...
...
@@ -558,25 +538,25 @@
this
.
loginType
=
loginTypeSync
;
uni
.
setStorageSync
(
'cffp_userId'
,
this
.
userId
);
this
.
courseDetail
();
if
(
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
)))
{
if
(
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
)))
{
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
}
if
(
this
.
wayType
==
'2'
&&
!
this
.
userInfo
[
'partnerType'
])
{
if
(
this
.
wayType
==
'2'
&&
!
this
.
userInfo
[
'partnerType'
])
{
this
.
$refs
.
partnerTipPopup
.
open
()
return
}
if
(
this
.
wayType
==
'2'
&&
this
.
userInfo
[
'partnerType'
])
{
if
(
this
.
wayType
==
'2'
&&
this
.
userInfo
[
'partnerType'
])
{
this
.
continueShare
()
return
}
if
(
loginTypeSync
==
'codelogin'
&&
this
.
wayType
==
'1'
)
{
if
(
loginTypeSync
==
'codelogin'
&&
this
.
wayType
==
'1'
)
{
setTimeout
(()
=>
{
if
(
this
.
courseInfo
.
status
==
1
)
{
if
(
this
.
courseInfo
.
status
==
1
)
{
this
.
jumppurchase
();
}
},
500
)
}
else
{
}
else
{
this
.
startTime
=
Date
.
parse
(
new
Date
())
/
1000
;
uni
.
setStorageSync
(
'h5_startTime'
,
this
.
startTime
)
setTimeout
(()
=>
{
...
...
@@ -589,16 +569,16 @@
}
},
isWx_Miniprogram
(){
isWx_Miniprogram
()
{
// 判断是否在微信内
// #ifdef APP-PLUS
this
.
isWxH5
=
true
;
// #endif
// #ifndef APP-PLUS
if
(
this
.
isWeiXin
())
{
if
(
this
.
isWeiXin
())
{
this
.
isWxH5
=
true
;
}
else
{
}
else
{
this
.
isWxH5
=
false
;
}
// #endif
...
...
@@ -608,7 +588,8 @@
* 兼容ios
* */
isWeiXin
()
{
return
/micromessenger/i
.
test
(
navigator
.
userAgent
.
toLowerCase
())
||
typeof
navigator
.
wxuserAgent
!==
'undefined'
return
/micromessenger/i
.
test
(
navigator
.
userAgent
.
toLowerCase
())
||
typeof
navigator
.
wxuserAgent
!==
'undefined'
},
goBack
()
{
...
...
@@ -626,12 +607,12 @@
this
.
$refs
.
share
.
open
()
},
sharechange
(
val
)
{
if
(
val
.
tabbar
)
{
if
(
val
.
tabbar
)
{
uni
.
switchTab
({
url
:
val
.
link
})
return
}
else
{
}
else
{
uni
.
navigateTo
({
url
:
val
.
link
})
...
...
@@ -640,27 +621,27 @@
// 订单保存
saveOrder
()
{
//小程序没登录进入到系统,要回到小程序去登录
if
(
uni
.
getStorageSync
(
'mpCffp'
)
&&!
uni
.
getStorageSync
(
'dataToken'
))
{
if
(
uni
.
getStorageSync
(
'mpCffp'
)
&&
!
uni
.
getStorageSync
(
'dataToken'
))
{
this
.
jumpMplogin
()
return
}
this
.
loginType
=
uni
.
getStorageSync
(
'loginType'
);
if
(
this
.
loginType
===
'visitor'
)
{
this
.
wayType
=
'1'
if
(
this
.
systemType
==
'IOS'
)
{
if
(
this
.
systemType
==
'IOS'
)
{
this
.
$refs
.
loginPopupCom
.
open
();
this
.
show
=
true
;
}
else
{
this
.
show
=
true
;
}
else
{
this
.
sharelogin
=
true
;
}
}
else
{
if
(
this
.
coursesharing
==
'1'
)
{
this
.
h5jump
()
}
else
{
if
(
this
.
systemType
==
'IOS'
)
{
if
(
this
.
systemType
==
'IOS'
)
{
this
.
$refs
.
verifyPopupCom
.
open
();
this
.
show
=
true
;
}
else
{
this
.
show
=
true
;
}
else
{
this
.
jumppurchase
();
}
}
...
...
@@ -669,27 +650,27 @@
h5jump
()
{
let
h5userId
=
uni
.
getStorageSync
(
'cffp_userId'
);
if
(
h5userId
)
{
if
(
this
.
systemType
==
'IOS'
)
{
this
.
show
=
true
;
if
(
this
.
systemType
==
'IOS'
)
{
this
.
show
=
true
;
this
.
$refs
.
verifyPopupCom
.
open
();
}
else
{
}
else
{
this
.
jumppurchase
();
}
}
else
{
if
(
this
.
systemType
==
'IOS'
)
{
this
.
show
=
true
;
if
(
this
.
systemType
==
'IOS'
)
{
this
.
show
=
true
;
this
.
$refs
.
loginPopupCom
.
open
();
}
else
{
}
else
{
this
.
sharelogin
=
true
;
}
}
},
jumppurchase
()
{
if
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
{
if
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
{
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
}
// 登录并且是禁用状态
if
(
this
.
userInfo
.
userIsActive
==
2
)
{
if
(
this
.
userInfo
.
userIsActive
==
2
)
{
this
.
$refs
.
restrictedTip
.
open
()
return
}
...
...
@@ -697,26 +678,26 @@
let
orderPlatform
=
''
// 不同得公司主题不同得购买平台
// #ifdef APP
if
(
companyInfo
.
companyType
==
'1'
)
{
if
(
companyInfo
.
companyType
==
'1'
)
{
orderPlatform
=
'JS-FX-APP'
}
if
(
companyInfo
.
companyType
==
'2'
)
{
if
(
companyInfo
.
companyType
==
'2'
)
{
orderPlatform
=
'YDFO-FX-APP'
}
// #endif
// #ifdef H5
if
(
companyInfo
.
companyType
==
'1'
)
{
if
(
companyInfo
.
companyType
==
'1'
)
{
orderPlatform
=
'JS-FX-H5'
}
if
(
companyInfo
.
companyType
==
'2'
)
{
if
(
companyInfo
.
companyType
==
'2'
)
{
orderPlatform
=
'YDFO-FX-H5'
}
// #endif
// #ifdef MP-WEIXIN
if
(
companyInfo
.
companyType
==
'1'
)
{
if
(
companyInfo
.
companyType
==
'1'
)
{
orderPlatform
=
'JS-FX-MP'
}
if
(
companyInfo
.
companyType
==
'2'
)
{
if
(
companyInfo
.
companyType
==
'2'
)
{
orderPlatform
=
'YDFO-FX-MP'
}
// #endif
...
...
@@ -725,7 +706,7 @@
productType
:
'1'
,
productId
:
this
.
courseInfo
.
fileId
,
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
shareUserId
:
this
.
shareUserId
,
shareUserId
:
this
.
shareUserId
,
shareReadId
:
this
.
shareReadId
,
shareCode
:
this
.
shareCode
,
dataSource
:
this
.
coursesharing
==
1
?
'2'
:
this
.
dataSource
...
...
@@ -813,7 +794,7 @@
}).
then
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
courseInfo
=
this
.
shareItem
=
res
[
'data'
][
'data'
];
if
(
this
.
courseInfo
.
filePathOss
!=
null
&&
Number
(
this
.
courseInfo
.
filePathOss
))
{
if
(
this
.
courseInfo
.
filePathOss
!=
null
&&
Number
(
this
.
courseInfo
.
filePathOss
))
{
this
.
bannerViewType
=
"2"
;
this
.
getBanner
(
Number
(
this
.
courseInfo
.
filePathOss
));
}
...
...
@@ -833,34 +814,38 @@
// #ifdef H5
const
shareCode
=
nanoid
()
+
this
.
userId
const
jumptime
=
Date
.
parse
(
new
Date
())
/
1000
if
(
dataHandling
.
h5RuntimeEnv
()
==
'wechat-miniprogram'
)
{
if
(
dataHandling
.
h5RuntimeEnv
()
==
'wechat-miniprogram'
)
{
let
newLink
=
''
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin'
){
newLink
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
fileId
}
&coursesharing=1&serialsNo=
${
nanoid
()}
&shareCode=
${
shareCode
}
&shareUserId=
${
this
.
userId
}
&jumpUrl=
${
jumptime
}
&landingPage=courseDetail&miniShare=1`
}
else
{
newLink
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
fileId
}
&landingPage=courseDetail&miniShare=1`
}
let
shareInfo
=
{
title
:
this
.
courseInfo
.
fileTitle
,
// desc: '加入我们开启学习之旅',
desc
:
this
.
courseInfo
.
fileSynopsis
,
// link: `${shareURL}/pages/lanch/index?fileId=${this.fileId}&coursesharing=1&serialsNo=${nanoid()}&shareCode=${shareCode}&shareUserId=${this.userId}&jumpUrl=${jumptime}&landingPage=courseDetail&miniShare=1`,
link
:
newLink
,
// link: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.fileId, //分享链接
desc
:
this
.
courseInfo
.
fileSynopsis
,
imgUrl
:
this
.
courseInfo
.
displayImage
,
//图片
sharePage
:
'courseDetail'
,
//分享的哪个页面
commonId
:
shareCode
sharePage
:
'courseDetail'
,
//分享的哪个页面
commonId
:
shareCode
,
shareCode
:
shareCode
,
isSaveShare
:
'1'
,
//是否存贮分享便于统计分享数据
fileId
:
this
.
fileId
,
}
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin'
)
{
shareInfo
.
userId
=
this
.
userId
newLink
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
fileId
}
&coursesharing=1&serialsNo=
${
nanoid
()}
&shareCode=
${
shareCode
}
&shareUserId=
${
this
.
userId
}
&jumpUrl=
${
jumptime
}
&landingPage=courseDetail&miniShare=1`
}
else
{
newLink
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
fileId
}
&landingPage=courseDetail&miniShare=1`
}
shareInfo
.
link
=
newLink
wx
.
miniProgram
.
postMessage
({
data
:
{
type
:
'share'
,
shareData
:
JSON
.
stringify
(
shareInfo
)
data
:
{
type
:
'share'
,
shareData
:
JSON
.
stringify
(
shareInfo
)
}
})
return
}
this
.
getshareData2
(
shareCode
,
jumptime
,
0
)
this
.
getshareData2
(
shareCode
,
jumptime
,
0
)
// #endif
}
})
...
...
@@ -874,7 +859,7 @@
packFileId
:
this
.
courseInfo
.
packFileId
}).
then
(
res
=>
{
if
(
res
[
'success'
])
{
if
(
res
[
'data'
]
&&
res
[
'data'
][
'data'
])
{
if
(
res
[
'data'
]
&&
res
[
'data'
][
'data'
])
{
this
.
relatedCoursesLists
=
res
[
'data'
][
'data'
][
'relatedCourseList'
];
this
.
nonRequiredCount
=
res
[
'data'
][
'data'
][
'nonRequiredCount'
];
this
.
requiredCount
=
res
[
'data'
][
'data'
][
'requiredCount'
];
...
...
@@ -1038,9 +1023,7 @@
content
:
'购买之后才可继续播放哦~'
,
showCancel
:
false
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
}
else
if
(
res
.
cancel
)
{
}
if
(
res
.
confirm
)
{}
else
if
(
res
.
cancel
)
{}
}
});
this
.
videoContext
.
seek
(
0
);
...
...
@@ -1064,20 +1047,20 @@
}
})
},
getshareData2
(
shareCode
,
jumptime
,
type
=
1
)
{
let
newLink
=
type
==
1
?
shareURL
+
"/pages/courseDetail/courseDetail?fileId="
+
this
.
fileId
+
getshareData2
(
shareCode
,
jumptime
,
type
=
1
)
{
let
newLink
=
type
==
1
?
shareURL
+
"/pages/courseDetail/courseDetail?fileId="
+
this
.
fileId
+
'&coursesharing=1'
+
'&serialsNo='
+
nanoid
()
+
'&shareCode='
+
shareCode
+
'&shareUserId='
+
this
.
userId
+
'&jumpUrl='
+
jumptime
+
"&"
:
shareURL
+
"/pages/courseDetail/courseDetail?fileId="
+
this
.
fileId
this
.
userId
+
'&jumpUrl='
+
jumptime
+
"&"
:
shareURL
+
"/pages/courseDetail/courseDetail?fileId="
+
this
.
fileId
let
data
=
{
title
:
this
.
courseInfo
.
fileTitle
,
// desc: '加入我们开启学习之旅',
desc
:
this
.
courseInfo
.
fileSynopsis
,
desc
:
this
.
courseInfo
.
fileSynopsis
,
link
:
newLink
,
//分享链接
imgUrl
:
this
.
courseInfo
.
displayImage
,
//图片
}
console
.
log
(
'data'
,
data
);
console
.
log
(
'data'
,
data
);
//安卓机型获取当前页面路径
let
url
=
window
.
location
.
href
.
split
(
'#'
)[
0
];
...
...
@@ -1091,10 +1074,10 @@
}
}
hshare
(
data
,
url
)
if
(
type
==
1
)
{
this
.
submitsuessc
(
shareCode
,
jumptime
)
if
(
type
==
1
)
{
this
.
submitsuessc
(
shareCode
,
jumptime
)
}
if
(
type
==
1
)
{
if
(
type
==
1
)
{
dataHandling
.
pocessTracking
(
'点击'
,
`用户在产品中心点击分享按钮,分享
${
this
.
courseInfo
.
fileTitle
}
`
,
...
...
@@ -1111,18 +1094,19 @@
let
data
=
{
title
:
this
.
courseInfo
.
fileTitle
,
// desc: '加入我们开启学习之旅',
desc
:
this
.
courseInfo
.
fileSynopsis
,
desc
:
this
.
courseInfo
.
fileSynopsis
,
link
:
window
.
location
.
href
,
//分享链接
imgUrl
:
this
.
courseInfo
.
displayImage
,
//图片
}
var
url
=
window
.
location
.
href
.
split
(
'#'
)[
0
]
hshare
(
data
,
url
)
},
// 唤醒app 测试
JsApiTicketApi
()
{
let
WxConfigRequestVO
=
{
url
:
window
.
location
.
href
.
split
(
'#'
)[
0
],
systemType
:
this
.
addSystemType
?
this
.
addSystemType
:
'1'
systemType
:
this
.
addSystemType
?
this
.
addSystemType
:
'1'
}
api
.
Wxshare
(
WxConfigRequestVO
).
then
(
res
=>
{
jWeixin
.
config
({
...
...
@@ -1142,10 +1126,10 @@
});
})
},
submitsuessc
(
shareCode
,
jumptime
)
{
submitsuessc
(
shareCode
,
jumptime
)
{
let
platform
=
uni
.
getSystemInfoSync
().
platform
let
UserShareRequestVO
=
{
systemType
:
platform
==
'ios'
?
'1'
:
'0'
,
systemType
:
platform
==
'ios'
?
'1'
:
'0'
,
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
businessType
:
'1'
,
// 分享类型
businessId
:
this
.
fileId
,
// 课程Id
...
...
@@ -1167,7 +1151,7 @@
},
getBanner
(
itemType
)
{
//加载轮播图
api
.
getBanner
({
fileCategory
:
7
,
itemType
:
itemType
}).
then
(
res
=>
{
api
.
getBanner
({
fileCategory
:
7
,
itemType
:
itemType
}).
then
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
swiperList
=
res
[
'data'
][
'homeItemList'
]
}
...
...
@@ -1178,9 +1162,9 @@
this
.
current
=
e
.
detail
.
current
}
},
queryInfo
(){
api
.
queryInfo
({
userId
:
uni
.
getStorageSync
(
'cffp_userId'
)}).
then
(
res
=>
{
if
(
res
[
'success'
])
{
queryInfo
()
{
api
.
queryInfo
({
userId
:
uni
.
getStorageSync
(
'cffp_userId'
)
}).
then
(
res
=>
{
if
(
res
[
'success'
])
{
delete
res
.
data
.
commonResult
const
cffp_userInfo
=
{
...
res
.
data
...
...
@@ -1192,7 +1176,7 @@
})
},
init
()
{
if
(
!
uni
.
getStorageSync
(
'loginType'
)
&&
uni
.
getStorageSync
(
'loginType'
)
==
'visitor'
)
{
if
(
!
uni
.
getStorageSync
(
'loginType'
)
&&
uni
.
getStorageSync
(
'loginType'
)
==
'visitor'
)
{
api
.
loginVerification
({
"loginType"
:
1
,
...
...
@@ -1312,7 +1296,7 @@
const
element
=
this
.
$refs
.
captureElement
.
$el
;
// 调用工具函数生成图片
const
imageData
=
await
elementToImage
(
element
);
this
.
generatedImage
=
imageData
this
.
generatedImage
=
imageData
this
.
isLoading
=
false
this
.
isOrderLoading
=
false
this
.
$refs
.
sharePosterPop
.
toggleDropdown
()
...
...
@@ -1362,55 +1346,14 @@
});
},
// 关闭海报弹窗
closePoster
(){
closePoster
()
{
this
.
showImg
=
false
this
.
generatedImage
=
''
// this.shareItem = {
// fileFirstImage:''
// }
},
sendMessageToMiniProgram
()
{
// 确保wx对象已存在
if
(
typeof
wx
===
'undefined'
)
{
console
.
error
(
'微信JS-SDK未加载'
);
return
false
;
}
// 构建要传递的数据
const
messageData
=
{
type
:
'showOrderPopup'
,
action
:
'purchase'
,
orderCodeUrl
:
this
.
orderCodeUrl
,
title
:
this
.
courseInfo
.
fileTitle
,
price
:
this
.
courseInfo
.
coursePrice
,
fileId
:
this
.
fileId
,
timestamp
:
Date
.
now
()
};
console
.
log
(
'准备发送消息到小程序:'
,
messageData
);
try
{
if
(
wx
.
miniProgram
)
{
wx
.
miniProgram
.
postMessage
({
data
:
messageData
});
// 2. 然后触发导航(让消息被接收)这种方法不行
wx
.
miniProgram
.
navigateBack
({
delta
:
0
// 后退0层,相当于刷新当前页
});
console
.
log
(
'消息发送并触发接收成功'
);
}
else
{
console
.
error
(
'wx.miniProgram不存在'
);
return
false
;
}
return
true
;
}
catch
(
error
)
{
console
.
error
(
'发送消息失败:'
,
error
);
return
false
;
}
},
startPolling
()
{
// 先清除可能存在的旧定时器
...
...
@@ -1426,47 +1369,49 @@
this
.
pollingTimer
=
setInterval
(()
=>
{
count
++
uni
.
showModal
({
content
:
count
content
:
count
})
},
1000
)
// 3秒轮询一次
},
// 新增:停止轮询
stopPolling
()
{
stopPolling
()
{
if
(
this
.
pollingTimer
)
{
clearInterval
(
this
.
pollingTimer
)
this
.
pollingTimer
=
null
}
},
// 跳转到小程序登录
jumpMplogin
(){
jumpMplogin
()
{
let
currentUrl
=
``
;
if
(
this
.
miniShareInfo
.
miniShare
){
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin'
){
currentUrl
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
miniShareInfo
.
fileId
}
&coursesharing=1&serialsNo=
${
this
.
miniShareInfo
.
serialsNo
}
&shareCode=
${
this
.
miniShareInfo
.
shareCode
}
&shareUserId=
${
this
.
miniShareInfo
.
shareUserId
}
&jumpUrl=
${
this
.
miniShareInfo
.
jumpUrl
}
&landingPage=courseDetail&miniShare=1`
}
else
{
currentUrl
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
miniShareInfo
.
fileId
}
&landingPage=courseDetail&miniShare=1`
if
(
this
.
miniShareInfo
.
miniShare
)
{
if
(
uni
.
getStorageSync
(
'loginType'
)
==
'codelogin'
)
{
currentUrl
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
miniShareInfo
.
fileId
}
&coursesharing=1&serialsNo=
${
this
.
miniShareInfo
.
serialsNo
}
&shareCode=
${
this
.
miniShareInfo
.
shareCode
}
&shareUserId=
${
this
.
miniShareInfo
.
shareUserId
}
&jumpUrl=
${
this
.
miniShareInfo
.
jumpUrl
}
&landingPage=courseDetail&miniShare=1`
}
else
{
currentUrl
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
miniShareInfo
.
fileId
}
&landingPage=courseDetail&miniShare=1`
}
}
else
{
}
else
{
currentUrl
=
`
${
shareURL
}
/pages/lanch/index?fileId=
${
this
.
fileId
}
&landingPage=courseDetail&noShare=1`
}
let
data
=
{
type
:
'login'
,
h5SystemType
:
'cffp'
,
type
:
'login'
,
h5SystemType
:
'cffp'
,
link
:
encodeURIComponent
(
currentUrl
),
miniShare
:
this
.
miniShareInfo
.
miniShare
?
this
.
miniShareInfo
.
miniShare
:
''
//是否从小程序的分享卡片进入的
miniShare
:
this
.
miniShareInfo
.
miniShare
?
this
.
miniShareInfo
.
miniShare
:
''
//是否从小程序的分享卡片进入的
}
wx
.
miniProgram
.
postMessage
({
data
:{
type
:
'login'
,
shareData
:
JSON
.
stringify
(
data
)
data
:
{
type
:
'login'
,
shareData
:
JSON
.
stringify
(
data
)
}
})
wx
.
miniProgram
.
navigateBack
({
delta
:
1
delta
:
1
})
}
},
...
...
@@ -1474,22 +1419,22 @@
// 通过小程序的分享卡片进来的,保存分享参数
if
(
option
.
miniShare
)
{
if
(
option
.
miniShare
)
{
this
.
miniShareInfo
=
option
}
this
.
sharePosterObj
=
uni
.
getStorageSync
(
'sharePosterObj'
)
||
{};
// console.log('sharePosterObj======',this.sharePosterObj);
// 如果通过海报分享进入系统,海报分享人为合伙人且普通客户完成购买了,那么海报分享人可以获得销售佣金
this
.
shareUserId
=
this
.
sharePosterObj
.
inviteUserId
||
''
;
if
(
companyInfo
.
companyType
==
'1'
)
{
this
.
companyLogo
=
'../../static/myteam/Group1633.png'
;
}
else
if
(
this
.
companyType
==
'2'
)
{
this
.
companyLogo
=
'../../static/suplogo.png'
;
if
(
companyInfo
.
companyType
==
'1'
)
{
this
.
companyLogo
=
'../../static/myteam/Group1633.png'
;
}
else
if
(
this
.
companyType
==
'2'
)
{
this
.
companyLogo
=
'../../static/suplogo.png'
;
}
if
(
option
.
addSystemType
)
{
if
(
option
.
addSystemType
)
{
this
.
addSystemType
=
option
.
addSystemType
}
if
(
this
.
systemType
==
'IOS'
)
{
if
(
this
.
systemType
==
'IOS'
)
{
this
.
showName
=
'预约'
;
this
.
show
=
false
;
}
...
...
@@ -1514,7 +1459,7 @@
}
let
dataForm
=
JSON
.
parse
(
JSON
.
stringify
(
uni
.
getStorageSync
(
'cffp_userInfo'
)))
this
.
realName
=
dataForm
.
realName
;
if
(
!
this
.
realName
)
{
if
(
!
this
.
realName
)
{
this
.
queryInfo
();
}
...
...
@@ -1522,20 +1467,20 @@
},
onShow
()
{
this
.
isLoading
=
false
if
(
uni
.
getStorageSync
(
'mpCffp'
))
{
if
(
uni
.
getStorageSync
(
'mpCffp'
))
{
this
.
mpCffp
=
uni
.
getStorageSync
(
'mpCffp'
)
}
this
.
showImg
=
false
this
.
generatedImage
=
''
this
.
shareItem
=
{
fileFirstImage
:
''
},
this
.
shareItem
=
{
fileFirstImage
:
''
},
this
.
loginType
=
uni
.
getStorageSync
(
'loginType'
)
this
.
init
();
this
.
isWx_Miniprogram
();
this
.
tabType
=
1
;
this
.
wayType
=
'1'
this
.
courseDetail
();
uni
.
setStorageSync
(
'entryUrl'
,
window
.
location
.
href
.
split
(
'#'
)[
0
])
if
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
{
uni
.
setStorageSync
(
'entryUrl'
,
window
.
location
.
href
.
split
(
'#'
)[
0
])
if
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
{
this
.
userInfo
=
JSON
.
parse
(
uni
.
getStorageSync
(
'cffp_userInfo'
))
}
this
.
userId
=
uni
.
getStorageSync
(
'cffp_userId'
)
...
...
@@ -1565,7 +1510,7 @@
// #endif
},
onHide
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
sharePosterPop
.
closeDropdown
()
})
}
...
...
@@ -1573,77 +1518,89 @@
</
script
>
<
style
lang=
"scss"
scoped
>
.container
{
.container
{
width
:
100%
;
height
:
auto
;
box-sizing
:
border-box
;
position
:
relative
;
.generateImageBox{
.generateImageBox
{
position
:
absolute
;
top
:
-100%
;
top
:
-100%
;
z-index
:
-1
;
border-radius
:
20
rpx
;
width
:
100%
;
box-sizing
:
border-box
;
background-color
:
#fff
;
.imgBox{
.imgBox
{
box-sizing
:
border-box
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
padding
:
20
rpx
;
.posterImg{
.posterImg
{
width
:
900
rpx
;
height
:
900
rpx
;
}
}
.txtBox
{
.txtBox
{
padding
:
20
rpx
;
.descriptionTxt{
.descriptionTxt
{
font-size
:
45
rpx
;
}
.productNum
{
.productNum
{
font-size
:
45
rpx
;
font-weight
:
500
;
margin
:
10
rpx
0
;
color
:
rgba
(
255
,
74
,
50
,
1
);
}
.generateImageBottom
{
.generateImageBottom
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.left{
.left
{
min-width
:
500
rpx
;
.top{
.top
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
image{
image
{
width
:
100%
;
}
.companyName
{
.companyName
{
min-width
:
300
rpx
;
color
:
#333
;
font-size
:
35
rpx
;
}
}
.bottom
{
.bottom
{
font-size
:
30
rpx
;
color
:
#999
;
margin-top
:
10
rpx
;
font-weight
:
500
;
}
}
.qrcode-container
{
background
:
#fff
;
padding
:
10
rpx
;
border-radius
:
10
rpx
;
box-shadow
:
0
0
10
rpx
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
0
0
10
rpx
rgba
(
0
,
0
,
0
,
0.1
);
.qrcode-canvas
{
display
:
block
;
...
...
@@ -1654,15 +1611,18 @@
}
}
page
{
padding
:
0
;
}
.loginPopupBox
{
margin-top
:
8vh
;
padding
:
20
rpx
30
rpx
;
border-radius
:
20
rpx
;
font-size
:
30
rpx
;
background
:
#fff
;
.popup_replenish_button2
{
color
:
rgba
(
9
,
44
,
171
,
1
);
background-color
:
#fff
;
...
...
@@ -1672,12 +1632,15 @@
font-size
:
30
rpx
;
}
}
.swiperBox
{
height
:
930
rpx
;
}
.swiper-box
{
height
:
930
rpx
;
}
.swiper-item
{
/* #ifndef APP-NVUE */
display
:
flex
;
...
...
@@ -1710,6 +1673,7 @@
justify-content
:
space-between
;
margin-bottom
:
16
rpx
;
box-sizing
:
border-box
;
h4
{
font-size
:
40
rpx
;
}
...
...
@@ -1788,6 +1752,7 @@
background-color
:
#fff
;
color
:
#666
;
font-size
:
32
rpx
;
text.actived
{
border-bottom
:
2px
solid
#20269B
;
color
:
#333
;
...
...
@@ -1882,6 +1847,7 @@
font-size
:
16
rpx
;
margin-left
:
10
rpx
;
}
.totalCourseCount
{
color
:
#20269B
;
font-size
:
24
rpx
;
...
...
@@ -1932,7 +1898,8 @@
align-items
:
center
;
justify-content
:
center
;
}
.shareBuyBox
{
.shareBuyBox
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
...
...
@@ -1947,7 +1914,8 @@
justify-content
:
space-between
;
background-color
:
#fff
;
box-sizing
:
border-box
;
.leftBuy{
.leftBuy
{
color
:
#fff
;
background-color
:
#20269B
;
padding
:
20
rpx
100
rpx
;
...
...
@@ -1958,7 +1926,8 @@
align-items
:
center
;
justify-content
:
center
;
}
.rightShare
{
.rightShare
{
margin-right
:
30
rpx
;
width
:
30%
;
color
:
#20269B
;
...
...
@@ -1973,6 +1942,7 @@
}
}
}
.markBox
{
position
:
fixed
;
left
:
0
;
...
...
@@ -1986,8 +1956,10 @@
justify-content
:
flex-end
;
z-index
:
100000
;
background
:
rgba
(
0
,
0
,
0
,
0.8
);
.guideImgBox
{
margin
:
20px
auto
;
uni-image
{
width
:
25%
!important
;
position
:
absolute
;
...
...
@@ -2000,29 +1972,32 @@
margin-top
:
30%
;
padding
:
0
30px
;
}
/* iPad横屏特定适配 */
@media
only
screen
and
(
min-device-width
:
768px
)
and
(
max-device-width
:
1024px
)
and
(
orientation
:
landscape
)
{
@media
only
screen
and
(
min-device-width
:
768px
)
and
(
max-device-width
:
1024px
)
and
(
orientation
:
landscape
)
{
.container
{
.generateImageBox
{
.generateImageBox
{
max-width
:
950
rpx
!important
;
.descriptionTxt{
.descriptionTxt
{
font-size
:
33
rpx
!important
;
}
.txtBox
{
.generateImageBottom{
.left{
.txtBox
{
.generateImageBottom
{
.left
{
width
:
60%
!important
;
.top{
.top
{
width
:
100%
;
.companyName{
.companyName
{
min-width
:
200
rpx
!important
;
font-size
:
30
rpx
!important
;
}
}
.bottom
{
.bottom
{
font-size
:
28
rpx
!important
;
}
}
...
...
@@ -2031,26 +2006,33 @@
}
}
}
/* 所有iPad竖屏 */
@media
only
screen
and
(
min-device-width
:
768px
)
and
(
max-device-width
:
1024px
)
and
(
orientation
:
portrait
)
{
/* 竖屏样式 */
.generateImageBox
{
.generateImageBox
{
max-width
:
950
rpx
!important
;
.descriptionTxt{
.descriptionTxt
{
font-size
:
33
rpx
!important
;
}
.txtBox
{
.generateImageBottom{
.left{
.txtBox
{
.generateImageBottom
{
.left
{
width
:
60%
!important
;
.top{
.top
{
width
:
100%
;
.companyName{
.companyName
{
min-width
:
200
rpx
!important
;
font-size
:
30
rpx
!important
;
}
}
.bottom
{
.bottom
{
font-size
:
28
rpx
!important
;
}
}
...
...
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