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
eb30f599
Commit
eb30f599
authored
Jan 17, 2023
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程分享链接修改
parent
243bf075
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
index.html
+1
-1
pages/courseDetail/courseDetail.vue
+27
-3
No files found.
index.html
View file @
eb30f599
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<script
src=
"https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<script
src=
"https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<!-- 移动端调试 -->
<!-- 移动端调试 -->
<script
type=
"text/javascript"
src=
"//cdn.jsdelivr.net/npm/eruda"
></script>
<script
type=
"text/javascript"
src=
"//cdn.jsdelivr.net/npm/eruda"
></script>
<
script>
eruda
.
init
();
</script
>
<
!-- <script>eruda.init();</script> --
>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
...
...
pages/courseDetail/courseDetail.vue
View file @
eb30f599
...
@@ -288,10 +288,10 @@
...
@@ -288,10 +288,10 @@
},
},
// 打开微信分享啊
// 打开微信分享啊
reinvite
()
{
reinvite
()
{
//app分享
// #ifdef APP-PLUS
const
shareCode
=
nanoid
()
+
this
.
userId
const
shareCode
=
nanoid
()
+
this
.
userId
const
jumptime
=
Date
.
parse
(
new
Date
())
/
1000
const
jumptime
=
Date
.
parse
(
new
Date
())
/
1000
//app分享
// #ifdef APP-PLUS
let
dataWXform
=
{
let
dataWXform
=
{
href
:
"https://"
+
window
.
location
.
host
+
"/cffp/pages/courseDetail/courseDetail?fileId="
+
this
.
fileId
+
href
:
"https://"
+
window
.
location
.
host
+
"/cffp/pages/courseDetail/courseDetail?fileId="
+
this
.
fileId
+
'&coursesharing=1'
+
'&serialsNo='
+
nanoid
()
+
'&shareCode='
+
shareCode
+
'&shareUserId='
+
'&coursesharing=1'
+
'&serialsNo='
+
nanoid
()
+
'&shareCode='
+
shareCode
+
'&shareUserId='
+
...
@@ -307,7 +307,7 @@
...
@@ -307,7 +307,7 @@
//#ifdef H5
//#ifdef H5
this
.
shareTipsFlag
=
true
;
this
.
shareTipsFlag
=
true
;
this
.
getshareData
(
)
this
.
getshareData
2
(
shareCode
,
jumptime
)
// #endif
// #endif
},
},
shareToggle
()
{
shareToggle
()
{
...
@@ -612,6 +612,30 @@
...
@@ -612,6 +612,30 @@
}
}
})
})
},
},
getshareData2
(
shareCode
,
jumptime
)
{
let
data
=
{
title
:
this
.
courseInfo
.
fileTitle
,
desc
:
'加入我们开启学习之旅'
,
link
:
"https://"
+
window
.
location
.
host
+
"/cffp/pages/courseDetail/courseDetail?fileId="
+
this
.
fileId
+
'&coursesharing=1'
+
'&serialsNo='
+
nanoid
()
+
'&shareCode='
+
shareCode
+
'&shareUserId='
+
this
.
userId
+
'&jumpUrl='
+
jumptime
+
"&"
,
//分享链接
imgUrl
:
this
.
courseInfo
.
displayImage
,
//图片
}
//安卓机型获取当前页面路径
let
url
=
window
.
location
.
href
.
split
(
'#'
)[
0
];
//ios机型获取当前页面路径
let
ua
=
navigator
.
userAgent
.
toLowerCase
();
let
isWeixin
=
ua
.
indexOf
(
'micromessenger'
)
!==
-
1
;
if
(
isWeixin
)
{
let
isiOS
=
/
(
iPhone|iPad|iPod|iOS
)
/i
.
test
(
navigator
.
userAgent
);
//ios终端
if
(
isiOS
&&
window
.
sessionStorage
.
getItem
(
'firstEntryUrl'
))
{
url
=
window
.
sessionStorage
.
getItem
(
'firstEntryUrl'
).
split
(
'#'
)[
0
];
}
}
// let url = window.location.href.split('#')[0]
hshare
(
data
,
url
)
},
// H5 自定义分享
// H5 自定义分享
getshareData
()
{
getshareData
()
{
let
data
=
{
let
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