Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-professional-exam
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Culm
pica-professional-exam
提交
d2e1a256
提交
d2e1a256
编写于
8月 26, 2020
作者:
guofeng.chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改分享
上级
bf4013ec
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
14 行增加
和
4 行删除
+14
-4
wxShare.js
src/utils/wxShare.js
+13
-2
course-detail.vue
src/views/course-detail.vue
+1
-2
未找到文件。
src/utils/wxShare.js
浏览文件 @
d2e1a256
...
...
@@ -3,6 +3,7 @@ import Vue from 'vue'
import
request
from
'@/utils/fetch'
;
import
wx
from
'weixin-js-sdk'
import
{
getBaseUrl
}
from
"@/utils/index"
;
import
weixinJsSdk
from
'weixin-js-sdk'
;
/** 注入配置信息 */
export
const
wxConfig
=
(
link
)
=>
{
// const params = { resetURI: true, url: encodeURIComponent(location.href) };
...
...
@@ -73,6 +74,12 @@ export const wxShare = (option = {}, successCB = () => {}) => {
});
};
function
wxHideMenu
()
{
wx
.
ready
(()
=>
{
WeixinJSBridge
.
call
(
'hideOptionMenu'
);
});
}
export
const
wxDisabledShare
=
()
=>
{
wx
.
ready
(()
=>
{
wx
.
hideMenuItems
({
...
...
@@ -95,7 +102,7 @@ export const wxDisabledShare = () => {
* @param source
* @param option
*/
export
const
wechatShare
=
async
(
option
=
{},
successCB
=
()
=>
{}
)
=>
{
export
const
wechatShare
=
(
option
=
{},
successCB
=
()
=>
{},
hideMenu
)
=>
{
const
shareOption
=
{
link
:
location
.
href
,
title
:
`云鹊医!`
,
...
...
@@ -106,7 +113,11 @@ export const wechatShare = async (option = {}, successCB = () => {}) => {
...
option
};
wxConfig
(
shareOption
.
link
);
wxShare
(
shareOption
,
successCB
);
if
(
hideMenu
)
{
wxHideMenu
()
}
else
{
wxShare
(
shareOption
,
successCB
);
}
};
Vue
.
prototype
.
wechatShare
=
wechatShare
;
...
...
src/views/course-detail.vue
浏览文件 @
d2e1a256
...
...
@@ -91,7 +91,6 @@ import CourseComment from '@/components/course/course-comment';
import
Loading
from
"@/components/common/common-loading"
;
import
DownloadButton
from
"@/components/course/download-button"
;
import
{
getPdfFileUrl
,
formatLeftTimeObj
,
deepCopy
}
from
'@/utils'
;
import
{
wxDisabledShare
}
from
'@/utils/wxShare'
;
export
default
{
components
:
{
...
...
@@ -161,7 +160,7 @@ export default {
const
{
width
}
=
this
.
$el
.
querySelector
(
'.tab-item'
).
getBoundingClientRect
();
this
.
videoH
=
height
;
this
.
tabW
=
width
;
wxDisabledShare
(
);
this
.
wechatShare
(
undefined
,
undefined
,
true
);
},
methods
:
{
getCourseInfo
()
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录