Commit efa2150e authored by xinzhedeai's avatar xinzhedeai

fix: 安全常识富文本显示处理,home跳转页rev添加。

parent ba1ce7ce
...@@ -82,6 +82,7 @@ window.onload = function() { ...@@ -82,6 +82,7 @@ window.onload = function() {
merId: this.userInfo.merId || '', merId: this.userInfo.merId || '',
unitName: this.userInfo.unitName, unitName: this.userInfo.unitName,
smallPlaceTypeName: this.userInfo.smallPlaceTypeName, smallPlaceTypeName: this.userInfo.smallPlaceTypeName,
rev: (+new Date())
} }
if (gemhoUtil.isShop()) { if (gemhoUtil.isShop()) {
param = { param = {
...@@ -108,7 +109,8 @@ window.onload = function() { ...@@ -108,7 +109,8 @@ window.onload = function() {
const strUrl = new URL(data); const strUrl = new URL(data);
const param = { const param = {
merId: strUrl.searchParams.get('merId'), merId: strUrl.searchParams.get('merId'),
accessType: strUrl.searchParams.get('accessType') accessType: strUrl.searchParams.get('accessType'),
rev: (+new Date())
}; };
if (param.merId == null || param.merId == '') { if (param.merId == null || param.merId == '') {
alert('请扫描正确的商家二维码') alert('请扫描正确的商家二维码')
......
This diff is collapsed.
This diff is collapsed.
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewport-fit:cover"> <meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewport-fit:cover">
<title>安全常识</title> <title>安全常识</title>
<script src="../sdk/pdf.js"></script> <script src="../sdk/pdf.js"></script>
<script type="text/javascript" src="../sdk/includeHead.js"></script> <script type="text/javascript" src="../sdk/includeHead.js"></script>
<link href="../sdk/quilljs/quill.snow.css" rel="stylesheet">
<script src="../sdk/quilljs/quill.js"></script>
</head> </head>
<body> <body>
<div id="app"> <div id="app">
...@@ -17,7 +20,7 @@ ...@@ -17,7 +20,7 @@
<h3 class="video-title">{{detailInfo.name}}</h3> <h3 class="video-title">{{detailInfo.name}}</h3>
<p class="video-date">日期:{{detailInfo.uploadsDate}}</p> <p class="video-date">日期:{{detailInfo.uploadsDate}}</p>
</div> </div>
</div> </div>
<!-- 新增:附件链接区域 --> <!-- 新增:附件链接区域 -->
...@@ -29,10 +32,8 @@ ...@@ -29,10 +32,8 @@
</div> </div>
</div> </div>
</div> </div>
<div>
<!-- 两列图文列表 --> <div id="editor-container"></div>
<div style="padding: .2rem .3rem;" v-html="detailInfo.content">
收快递费了时代峰峻
</div> </div>
</div> </div>
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
<div class="control-btn" onclick="nextPage()">下一页</div> <div class="control-btn" onclick="nextPage()">下一页</div>
<!-- 新增缩放按钮 --> <!-- 新增缩放按钮 -->
<!-- <div class="control-btn" onclick="zoomIn()">放大</div> <!-- <div class="control-btn" onclick="zoomIn()">放大</div>
<div class="control-btn" onclick="zoomOut()">缩小</div> <div class="control-btn" onclick="zoomOut()">缩小</div>
<span>缩放:<span id="currentScale">120%</span></span> --> <span>缩放:<span id="currentScale">120%</span></span> -->
......
...@@ -85,12 +85,13 @@ function closePreview() { ...@@ -85,12 +85,13 @@ function closePreview() {
currentPageNum = 1; currentPageNum = 1;
} }
var VUE = null var VUE = null
var quill = null
window.addEventListener("load", function () { window.addEventListener("load", function () {
VUE = new Vue({ VUE = new Vue({
el: '#app', el: '#app',
data() { data() {
return { return {
detailInfo:{} detailInfo: {}
} }
}, },
created() { created() {
...@@ -114,7 +115,7 @@ window.addEventListener("load", function () { ...@@ -114,7 +115,7 @@ window.addEventListener("load", function () {
interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"], interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"],
reqParams: { reqParams: {
sign: 17, // 隐患详情 sign: 17, // 隐患详情
safetyId: gemhoUtil.getParameter('id'), safetyId: gemhoUtil.getParameter('id'),
} }
}, (res) => { }, (res) => {
if (!res) { // 中台返回为undefined 重新请求 if (!res) { // 中台返回为undefined 重新请求
...@@ -132,11 +133,16 @@ window.addEventListener("load", function () { ...@@ -132,11 +133,16 @@ window.addEventListener("load", function () {
}) })
}, 0); }, 0);
this.detailInfo = JSON.parse(res).data this.detailInfo = JSON.parse(res).data
if(this.detailInfo.file){ if (this.detailInfo.file) {
this.detailInfo.fileName = this.detailInfo.file.split('/')[this.detailInfo.file.split('/').length-1] this.detailInfo.fileName = this.detailInfo.file.split('/')[this.detailInfo.file.split('/').length - 1]
} }
console.log(this.detailInfo,'sssss') // 初始化编辑器
quill = new Quill('#editor-container', {
theme: 'snow', readOnly: true, modules: {
toolbar: false // 关键配置:禁用工具栏
},
});
quill.root.innerHTML = this.detailInfo.content || ''
} }
}) })
...@@ -170,8 +176,8 @@ window.addEventListener("load", function () { ...@@ -170,8 +176,8 @@ window.addEventListener("load", function () {
vant.Toast.clear() vant.Toast.clear()
} }
}, },
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment