|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<view class="container note-and-viewpoint" v-if="detailDataForm.HasPermission == 1">
|
|
|
+ <zmm-watermark :watermark="watermarkText"></zmm-watermark>
|
|
|
<view class="content-item">
|
|
|
<view class="author-name">
|
|
|
<view class="author-box">
|
|
@@ -128,6 +129,8 @@
|
|
|
|
|
|
<script>
|
|
|
import { purchaserApi, User } from "@/config/api";
|
|
|
+import zmmWatermark from "@/components/zmm-watermark/zmm-watermark.vue";
|
|
|
+let app = getApp();
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -135,8 +138,10 @@ export default {
|
|
|
detailId: 0,
|
|
|
readTiem: 0,
|
|
|
setIntervalTiem: null,
|
|
|
+ watermarkText:''
|
|
|
};
|
|
|
},
|
|
|
+ components:{zmmWatermark},
|
|
|
methods: {
|
|
|
previewImageMediahandler(key) {
|
|
|
uni.previewImage({
|
|
@@ -150,6 +155,9 @@ export default {
|
|
|
});
|
|
|
if (res.Ret === 200) {
|
|
|
this.detailDataForm = res.Data;
|
|
|
+ this.detailDataForm.HasPermission == 1 && this.setDisableCapture();
|
|
|
+ this.watermarkText = `${this.$db.get("mobile")}`;
|
|
|
+ console.log( this.watermarkText,'this.detailDataForm');
|
|
|
let str = this.detailDataForm.Type == 1 ? "笔记" : "观点";
|
|
|
wx.setNavigationBarTitle({
|
|
|
title: `${str}详情`,
|
|
@@ -271,6 +279,20 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ setDisableCapture() {
|
|
|
+ wx.setVisualEffectOnCapture({
|
|
|
+ visualEffect: "hidden",
|
|
|
+ complete: (res) => {
|
|
|
+ console.log(res);
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ closeDisableCapture() {
|
|
|
+ wx.setVisualEffectOnCapture({
|
|
|
+ visualEffect: "none",
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.detailId = Number(options.id) || 0;
|
|
@@ -293,6 +315,7 @@ export default {
|
|
|
})
|
|
|
.then((res) => {});
|
|
|
}
|
|
|
+ this.closeDisableCapture()
|
|
|
},
|
|
|
onUnload() {
|
|
|
if (this.detailId && this.detailId > 0 && this.detailDataForm.HasPermission == 1) {
|
|
@@ -305,6 +328,7 @@ export default {
|
|
|
})
|
|
|
.then((res) => {});
|
|
|
}
|
|
|
+ this.closeDisableCapture()
|
|
|
},
|
|
|
/** 用户点击分享 */
|
|
|
onShareAppMessage: function (res) {
|
|
@@ -318,6 +342,7 @@ export default {
|
|
|
|
|
|
<style lang="scss" scope>
|
|
|
.note-and-viewpoint {
|
|
|
+ position: relative;
|
|
|
padding: 30rpx;
|
|
|
background: $uni-bg-color;
|
|
|
.content-item {
|