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

截屏时通知前端

上级 edb300f7
此差异已折叠。
......@@ -45,6 +45,7 @@
</template>
<script>
import Logo from "@/components/annual-summary/logo";
let _this = null;
export default {
components: {
Logo
......@@ -54,7 +55,45 @@ export default {
type: Number | String,
default: 1 // 1: 站内; 2: 站外
}
}
},
data() {
return {
isHide: true,
}
},
created() {
_this = this;
// 截屏时通知前端
window.__screenCaptureEvent = function() {
console.log('in screenCaptureEvent');
_this.$sendBuriedData({
component_tag: '557#557002'
});
}
// 保存图片的回调
window.__savePage2Picture = function(param) {
this.isHide = true;
console.log("__savePage2Picture", param);
}
},
methods: {
// 保存图片
savePage2Picture() {
this.isHide = false;
this.$forceUpdate()
this.$nextTick( () => {
rocNative.savePage2Picture({
__funcName: "__savePage2Picture"
});
})
},
},
};
</script>
<style lang="less" scoped>
......
<template>
<div class="logo-wrapper">
<img @click="back" class="back" v-show="imgType == 1" src="~@/images/annual/back-1.png" alt="">
<img @click="back" class="back" v-show="imgType == 2" src="~@/images/annual/back-2.png" alt="">
<img @click="back" class="back" v-show="!isWeb && imgType == 1" src="~@/images/annual/back-1.png" alt="">
<img @click="back" class="back" v-show="!isWeb && imgType == 2" src="~@/images/annual/back-2.png" alt="">
<img class="logo" v-show="imgType == 1" src="~@/images/annual/logo-1.png" alt />
<img class="logo" v-show="imgType == 2" src="~@/images/annual/logo-2.png" alt />
</div>
......
......@@ -13,8 +13,12 @@ import Vant from 'vant';
import 'vant/lib/index.css';
import clipboard from 'clipboard';
import { querystring } from '@/utils';
import 'swiper/swiper-bundle.css';
import VueAwesomeSwiper from 'vue-awesome-swiper'
// import 'swiper/css/swiper.css'
// import 'swiper/swiper-bundle.css';
//注册到vue原型上
Vue.use(VueAwesomeSwiper);
Vue.prototype.clipboard = clipboard;
const envList = ['dev', 'test'];
......
......@@ -92,15 +92,7 @@ export default {
speed: 300,
slidesPerView: 1,
// slidesPerGroup : 5,
// loop: true,
// 如果需要分页器
// pagination: ".swiper-pagination",
// // 如果需要前进后退按钮
// nextButton: ".swiper-button-next",
// prevButton: ".swiper-button-prev",
// 如果需要滚动条
// scrollbar: ".swiper-scrollbar"
});
},
......@@ -117,7 +109,6 @@ export default {
// this.GET(`portal/titleTest/user/getBrushTitleInfo/${this.secondSubjectId}`, param).then(res => {
// if (res.code == "000000") {
// this.showLoading = false;
// } else {
// this.$toast(res.message);
// }
......
<template>
<div class="as-share-wrapper">
<Card6 type=2></Card6>
<Card6 type="2"></Card6>
</div>
</template>
<script>
import Card6 from "@/components/annual-summary/card-6";
import {
getWebPageUrl
} from "@/utils"
export default {
components: {
Card6
},
methods: {
data() {
return {
uuid: '',
shareUrl: '',
}
},
}
created() {
let href = location.href;
let uuidIndex = href.indexOf("uuid") || 0;
if (uuidIndex > 0) {
this.uuid = href.substr(uuidIndex + 5, 32);
} else {
this.uuid = "07F9625472D6444EBAE4BF7D2EF83BC4";
}
this.shareUrl = location.href;
if (href.indexOf("singlemessage") >= 0 || href.indexOf("wx_code") >= 0) {
this.shareUrl = getWebPageUrl(`profexam/#/sharecoop?uuid=${this.uuid}`);
location.replace(this.shareUrl);
}
// 设置二次分享
this.secondShare();
},
methods: {
secondShare() {
this.wechatShare(
{
link: this.shareUrl,
title: "云鹊医2020年度个人学习报告",
friendtitle: "云鹊医2020年度个人学习报告",
desc: "点击查看我的专属学习报告",
imgUrl: "https://file.yunqueyi.com/logo.png"
},
() => {
console.log("share success...");
}
);
}
}
};
</script>
<style lang="less" scoped>
.as-share-wrapper {
}
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册