Commit efa2150e authored by xinzhedeai's avatar xinzhedeai

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

parent ba1ce7ce
......@@ -82,6 +82,7 @@ window.onload = function() {
merId: this.userInfo.merId || '',
unitName: this.userInfo.unitName,
smallPlaceTypeName: this.userInfo.smallPlaceTypeName,
rev: (+new Date())
}
if (gemhoUtil.isShop()) {
param = {
......@@ -108,7 +109,8 @@ window.onload = function() {
const strUrl = new URL(data);
const param = {
merId: strUrl.searchParams.get('merId'),
accessType: strUrl.searchParams.get('accessType')
accessType: strUrl.searchParams.get('accessType'),
rev: (+new Date())
};
if (param.merId == null || param.merId == '') {
alert('请扫描正确的商家二维码')
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,10 +3,13 @@
<head>
<meta charset="UTF-8">
<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>
<script src="../sdk/pdf.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>
<body>
<div id="app">
......@@ -17,7 +20,7 @@
<h3 class="video-title">{{detailInfo.name}}</h3>
<p class="video-date">日期:{{detailInfo.uploadsDate}}</p>
</div>
</div>
<!-- 新增:附件链接区域 -->
......@@ -29,10 +32,8 @@
</div>
</div>
</div>
<!-- 两列图文列表 -->
<div style="padding: .2rem .3rem;" v-html="detailInfo.content">
收快递费了时代峰峻
<div>
<div id="editor-container"></div>
</div>
</div>
......@@ -47,7 +48,7 @@
<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>
<span>缩放:<span id="currentScale">120%</span></span> -->
......
......@@ -85,12 +85,13 @@ function closePreview() {
currentPageNum = 1;
}
var VUE = null
var quill = null
window.addEventListener("load", function () {
VUE = new Vue({
el: '#app',
data() {
return {
detailInfo:{}
detailInfo: {}
}
},
created() {
......@@ -114,7 +115,7 @@ window.addEventListener("load", function () {
interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"],
reqParams: {
sign: 17, // 隐患详情
safetyId: gemhoUtil.getParameter('id'),
safetyId: gemhoUtil.getParameter('id'),
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
......@@ -132,11 +133,16 @@ window.addEventListener("load", function () {
})
}, 0);
this.detailInfo = JSON.parse(res).data
if(this.detailInfo.file){
this.detailInfo.fileName = this.detailInfo.file.split('/')[this.detailInfo.file.split('/').length-1]
if (this.detailInfo.file) {
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 () {
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