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
fbba4b23
Commit
fbba4b23
authored
Apr 13, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-20260203-解决外部跳转页面登录问题' into 'dev'
修复分享产品,分享数据没数据 See merge request
!107
parents
14704ba0
54bb458d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
58 deletions
+24
-58
components/commonTimePicker/commonTimePicker.vue
+3
-2
pages/courseDetail/courseDetail.vue
+16
-51
pages/courselist/courselist.vue
+5
-5
No files found.
components/commonTimePicker/commonTimePicker.vue
View file @
fbba4b23
...
...
@@ -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 @
fbba4b23
...
...
@@ -491,7 +491,11 @@
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
commonId
:
shareCode
,
userId
:
this
.
userId
,
fileId
:
this
.
fileId
,
shareCode
:
shareCode
,
isSaveShare
:
'1'
,
//是否存贮分享便于统计分享数据
}
wx
.
miniProgram
.
postMessage
({
data
:{
...
...
@@ -835,22 +839,24 @@
const
jumptime
=
Date
.
parse
(
new
Date
())
/
1000
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, //分享链接
imgUrl
:
this
.
courseInfo
.
displayImage
,
//图片
sharePage
:
'courseDetail'
,
//分享的哪个页面
commonId
:
shareCode
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'
,
...
...
@@ -1369,48 +1375,7 @@
// 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
()
{
// 先清除可能存在的旧定时器
...
...
pages/courselist/courselist.vue
View file @
fbba4b23
...
...
@@ -392,13 +392,13 @@
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
:
{
...
...
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