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

二次分享代码等

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