feat: 增加视频水印和防盗录
This commit is contained in:
@@ -20,8 +20,7 @@
|
||||
:course="{courseTitle:options.navTitle, chapterTitle: curriculumData.title, catalogueId: curriculumData.catalogueId || '', courseId: curriculumData.courseId || options.courseId || ''}"
|
||||
:cover="options.curriculumImgUrl || ''"
|
||||
:http="$http"
|
||||
:user-id="watermarkUserId"
|
||||
:mobile="watermarkMobile"
|
||||
:user-info="userInfo"
|
||||
/>
|
||||
|
||||
<view class="" style="border-top: 2px solid #2979ff;">
|
||||
@@ -173,6 +172,7 @@
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
courseDescription, //课程说明
|
||||
@@ -332,7 +332,6 @@
|
||||
},
|
||||
onHide() {
|
||||
console.log('回去了 .....................');
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh();
|
||||
@@ -344,12 +343,6 @@
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
watermarkUserId() {
|
||||
return this.userInfo.id || this.userInfo.userId || this.userInfo.uid || ''
|
||||
},
|
||||
watermarkMobile() {
|
||||
return this.userInfo.phone || this.userInfo.tel || this.userInfo.mobile || ''
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
editorIput(e){
|
||||
|
||||
79
pages/test/test.vue
Normal file
79
pages/test/test.vue
Normal file
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="btn" @click="onAntiScreenshot"><text>开启防截屏</text></view>
|
||||
<view class="btn" @click="onAntiScreenshot2"><text>开启防截屏</text></view>
|
||||
<view class="btn" @click="offAntiScreenshot"><text>关闭防截屏</text></view>
|
||||
<view class="btn" @click="offAntiScreenshot2"><text>关闭防截屏</text></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onAntiScreenshot() {
|
||||
console.log('点击了开启按钮')
|
||||
// screenshot.onAntiScreenshot()
|
||||
// screenGuard.onAntiScreenshot()
|
||||
uni.setUserCaptureScreen({
|
||||
enable: false,
|
||||
success() {
|
||||
console.log('截屏录屏功能已禁用');
|
||||
},
|
||||
fail(err) {
|
||||
console.error('禁用截屏录屏功能失败', err);
|
||||
}
|
||||
});
|
||||
},
|
||||
offAntiScreenshot() {
|
||||
console.log('点击了关闭按钮')
|
||||
// screenshot.offAntiScreenshot()
|
||||
// screenGuard.offAntiScreenshot()
|
||||
uni.setUserCaptureScreen({
|
||||
enable: true,
|
||||
success() {
|
||||
console.log('截屏录屏功能已启用');
|
||||
},
|
||||
fail(err) {
|
||||
console.error('启用截屏录屏功能失败', err);
|
||||
}
|
||||
})
|
||||
},
|
||||
onAntiScreenshot2() {
|
||||
console.log('点击了开启按钮')
|
||||
// screenshot.onAntiScreenshot()
|
||||
screenGuard.onAntiScreenshot()
|
||||
},
|
||||
offAntiScreenshot2() {
|
||||
console.log('点击了关闭按钮')
|
||||
// screenshot.offAntiScreenshot()
|
||||
|
||||
screenGuard.offAntiScreenshot()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: antiquewhite;
|
||||
border-radius: 8rpx;
|
||||
width: 690rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user