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

截屏时通知前端

上级 edb300f7
此差异已折叠。
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
"vant": "^2.2.15", "vant": "^2.2.15",
"vconsole": "^3.3.4", "vconsole": "^3.3.4",
"vue": "^2.1.0", "vue": "^2.1.0",
"vue-awesome-swiper": "^4.1.1",
"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",
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
</template> </template>
<script> <script>
import Logo from "@/components/annual-summary/logo"; import Logo from "@/components/annual-summary/logo";
let _this = null;
export default { export default {
components: { components: {
Logo Logo
...@@ -54,7 +55,45 @@ export default { ...@@ -54,7 +55,45 @@ export default {
type: Number | String, type: Number | String,
default: 1 // 1: 站内; 2: 站外 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
<template> <template>
<div class="logo-wrapper"> <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="!isWeb && 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 == 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 == 1" src="~@/images/annual/logo-1.png" alt />
<img class="logo" v-show="imgType == 2" src="~@/images/annual/logo-2.png" alt /> <img class="logo" v-show="imgType == 2" src="~@/images/annual/logo-2.png" alt />
</div> </div>
......
...@@ -13,8 +13,12 @@ import Vant from 'vant'; ...@@ -13,8 +13,12 @@ import Vant from 'vant';
import 'vant/lib/index.css'; import 'vant/lib/index.css';
import clipboard from 'clipboard'; import clipboard from 'clipboard';
import { querystring } from '@/utils'; 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原型上
Vue.use(VueAwesomeSwiper);
Vue.prototype.clipboard = clipboard; Vue.prototype.clipboard = clipboard;
const envList = ['dev', 'test']; const envList = ['dev', 'test'];
......
...@@ -93,14 +93,6 @@ export default { ...@@ -93,14 +93,6 @@ export default {
slidesPerView: 1, slidesPerView: 1,
// slidesPerGroup : 5, // slidesPerGroup : 5,
// loop: true,
// 如果需要分页器
// pagination: ".swiper-pagination",
// // 如果需要前进后退按钮
// nextButton: ".swiper-button-next",
// prevButton: ".swiper-button-prev",
// 如果需要滚动条
// scrollbar: ".swiper-scrollbar"
}); });
}, },
...@@ -117,7 +109,6 @@ export default { ...@@ -117,7 +109,6 @@ export default {
// this.GET(`portal/titleTest/user/getBrushTitleInfo/${this.secondSubjectId}`, param).then(res => { // this.GET(`portal/titleTest/user/getBrushTitleInfo/${this.secondSubjectId}`, param).then(res => {
// if (res.code == "000000") { // if (res.code == "000000") {
// this.showLoading = false; // this.showLoading = false;
// } else { // } else {
// this.$toast(res.message); // this.$toast(res.message);
// } // }
......
<template> <template>
<div class="as-share-wrapper"> <div class="as-share-wrapper">
<Card6 type=2></Card6> <Card6 type="2"></Card6>
</div> </div>
</template> </template>
<script> <script>
import Card6 from "@/components/annual-summary/card-6"; import Card6 from "@/components/annual-summary/card-6";
import {
getWebPageUrl
} from "@/utils"
export default { export default {
components: { components: {
Card6 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
.as-share-wrapper { .as-share-wrapper {
} }
</style> </style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册