提交 27d791f0 编写于 作者: guangjun.yang's avatar guangjun.yang

二次分享代码等

上级 06b1ea57
......@@ -33,7 +33,8 @@
"vue": "^2.1.0",
"vue-router": "^2.1.1",
"vuex": "^2.0.0",
"web-buried-point": "^2.1.0"
"web-buried-point": "^2.1.0",
"weixin-js-sdk": "^1.4.0-test"
},
"devDependencies": {
"autoprefixer": "^6.4.0",
......
......@@ -67,8 +67,7 @@ export default {
const tcPlayer = new TcPlayer(this.id, options);
tcPlayer.video.on('timeupdate', (event) => {
let ct = tcPlayer.currentTime();
console.log('视频播放时长S => ', ct);
// console.log('视频播放时长S => ', ct);
if (options.trySeeTime && ct >= options.trySeeTime) {
tcPlayer.currentTime(0);
tcPlayer.pause();
......
......@@ -13,6 +13,7 @@ import BuriedPoint,{ sendBuriedData} from 'web-buried-point';
import Vant from 'vant';
import 'vant/lib/index.css';
import clipboard from 'clipboard';
import "@/utils/wxShare"
//注册到vue原型上
Vue.prototype.clipboard = clipboard;
......
/* eslint-disable */
import Vue from 'vue'
import request from '@/service/api';
import request from '@/utils/fetch';
import wx from 'weixin-js-sdk'
import { getBaseUrl } from "@/utils/index";
/** 注入配置信息 */
export const wxConfig = (link) => {
console.log("#####1111link: ", link)
// const params = { resetURI: true, url: encodeURIComponent(location.href) };
// 上线前是需要把域名改为线上的sc
let baseUrl = getBaseUrl();
let baseUrl = getBaseUrl("");
// request({ url: `https://sc.yunqueyi.com/wechats/signs?url=${encodeURIComponent(link)}` }).then(res => {
request({ url: `${baseUrl}/wechats/signs?url=${encodeURIComponent(link)}` }).then(res => {
let configs = res.data.signMap;
......@@ -103,7 +104,8 @@ export const wechatShare = async (option = {}, successCB = () => {}) => {
...option
};
wxConfig(link);
console.log("#####2222link: ", shareOption.link)
wxConfig(shareOption.link);
wxShare(shareOption, successCB);
};
......
......@@ -36,7 +36,7 @@
/>
<CommonAdertImg :advertInfoList="advertInfoList" position="0" />
<!-- 步骤条 -->
<!-- <div v-if="project.cmeType != 2">
<div v-if="project.cmeType != 2">
<CmeStep
:currentProgress="project.currentProgress"
:studyProgress="project.studyProgress"
......@@ -48,7 +48,7 @@
:certificateId="project.certificateId"
@applicationCredit="applicationCredit"
/>
</div> -->
</div>
<!-- 简介和目录 -->
<div class="intro-catalogue-container">
<div
......@@ -255,7 +255,7 @@ export default {
inScope: 0, // 是否在范围内判断
projectCredit: "", // 学分
certificateId: "0",
cmeType: 1, // 1: 自营项目; 2: 中华医学会二类
cmeType: 2, // 1: 自营项目; 2: 中华医学会二类
examBtnUrl: "", // 考试按钮跳转连接
firstIntoExam: false, // true弹框,是否首次进入考试,用于首次跳转弹框提示,只跟项目和人员有关
jumpToContents: false, // 是否跳转到目录
......@@ -358,9 +358,9 @@ export default {
_this.getProjectParticularsV2();
// 打开页面埋点
this.$sendBuriedData({
component_tag: `211#0#${this.projectId}#0`
});
// this.$sendBuriedData({
// component_tag: `211#0#${this.projectId}#0`
// });
// 调用广告位接口
this.getAdvertInfoList();
......@@ -437,9 +437,9 @@ export default {
// 点击“参与考试”
beforeJumpToExam() {
this.$sendBuriedData({
component_tag: `882#8824`
});
// this.$sendBuriedData({
// component_tag: `882#8824`
// });
// 如果是首次,则弹出弹框
if (this.project.firstIntoExam) {
this.isShowEJDialog = true;
......@@ -450,9 +450,9 @@ export default {
// 第一次跳转弹框,点击时调用相应接口
handlerEJAction() {
this.$sendBuriedData({
component_tag: `883#8831`
});
// this.$sendBuriedData({
// component_tag: `883#8831`
// });
this.isShowEJDialog = false;
this.jumpToCardList();
this.firstIntoExamAction();
......@@ -460,9 +460,9 @@ export default {
// 跳转II类学习详情页面(中华医学会项目详情页面)
jumpToCardList() {
this.$sendBuriedData({
component_tag: `885#8851`
});
// this.$sendBuriedData({
// component_tag: `885#8851`
// });
this.showLoading = false;
// 复制卡密
this.$refs.copyLinkBtn.click();
......@@ -493,9 +493,9 @@ export default {
// 跳转到原生的购买页面
// TODO 没有购买逻辑了,直接跳转到下载页面
confirm() {
this.$sendBuriedData({
component_tag: `882#88203`
});
// this.$sendBuriedData({
// component_tag: `882#88203`
// });
this.$refs.tcPlayerRef && this.$refs.tcPlayerRef.pause();
window.location.href =
"https://a.app.qq.com/o/simple.jsp?pkgname=com.picahealth.yunque";
......@@ -622,7 +622,7 @@ export default {
}
if (window.__isWeb) {
h = intorOffsetTop - 75;
h = intorOffsetTop - 88;
} else if (window.__isIOS) {
h = intorOffsetTop - 140;
}
......@@ -659,9 +659,9 @@ export default {
window.scrollTo(0, h);
this.isBlack = true;
this.bgColor = "#fff";
this.$sendBuriedData({
component_tag: `211#211007#${this.projectId}`
});
// this.$sendBuriedData({
// component_tag: `211#211007#${this.projectId}`
// });
},
// 锚点到目录
......@@ -681,9 +681,9 @@ export default {
window.scrollTo(0, h);
this.isBlack = true;
this.bgColor = "#fff";
this.$sendBuriedData({
component_tag: `211#211008#${this.projectId}`
});
// this.$sendBuriedData({
// component_tag: `211#211008#${this.projectId}`
// });
},
// 获取项目详情
......@@ -733,7 +733,6 @@ export default {
console.log('location', location);
console.log('_this.videoOptions.mp4, trySeeTime, autoplay', _this.videoOptions.mp4, _this.videoOptions.trySeeTime, _this.videoOptions.autoplay);
// 如果绑定了卡,则提示学习下一节
_this.project = res.data;
if (_this.project.projectIntro) {
......@@ -800,7 +799,7 @@ export default {
_this.preJumper();
}
let shareUrl = location.href;
let shareUrl = encodeURIComponent(location.href);
this.wechatShare(
{
link: shareUrl,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册