Browse Source

统计标签

zhengjinyi 2 years ago
parent
commit
d9f9a9109e

+ 0 - 65
src/main/resources/static/js/encyclopedia/detail.js

@@ -28,71 +28,6 @@ function directory(container, flag = true) {
         }
     })
 }
-/相关阅读
-var articleRelated = new Vue({
-    el: "#articleRelated",
-    mixins: [cmSysVitaMixins],
-    data: {
-        infoId: $("#articleId").val()?$("#articleId").val()*1:0,
-        articleLabels: $("#articleLabels").val()?$("#articleLabels").val():"",
-        related: {},
-        relatedLabels:''
-    },
-    methods: {
-        // getRelatedList: function () {
-        //     var _self = this;
-        //     if(this.infoId ===0){return;}
-        //     $.getJSON("/article/related",{
-        //         id: this.infoId,
-        //         labels: this.articleLabels
-        //     }).done(function (r) {
-        //         if (r.code === 0 && r.data) {
-        //             _self.related = r.data;
-        //         }
-        //     });
-        // },
-
-    },
-    created: function () {
-        const pageLabelArray = []
-        this.cmSysParams.pageType = 11;
-        this.infoId = this.handlearticleId = $("#articleId").val() ? $("#articleId").val()*1 : 0;
-        this.articleLabels = $("#articleLabels").val()?$("#articleLabels").val():"";
-        this.relatedLabels = $("#relatedLabels").val()?$("#relatedLabels").val():"";
-        console.log('relatedLabels',this.relatedLabels)
-        if(this.relatedLabels){
-            this.cmSysParams.pageLabel =  this.relatedLabels
-        }else{
-            $('.dea-tag-li').each(function(){
-                pageLabelArray.push($(this).find('a').text());
-            })
-            this.cmSysParams.pageLabel =  pageLabelArray.join('/');
-        }
-        console.log('pageLabel', this.cmSysParams.pageLabel)
-        // 获取相关阅读
-        // this.getRelatedList();
-    },
-    mounted: function () {
-        var _self = this;
-        var thisUri = window.location.href;
-        $('#qrcode').qrcode({
-            "render": "canvas",
-            "width": '120',
-            "height": '120',
-            "color": "#3a3",
-            "text": thisUri
-        });
-        // 文章浏览量+1
-        $.get("/article/pv", {id: this.infoId}, function(res){
-            if(res.code === 0){
-                // 更新文章索引
-                $.post(coreServer + "/commodity/search/index/update/article", {articleId: _self.infoId}, function(res){
-                    console.log(res.msg);
-                });
-            }
-        });
-    }
-});
 $(function () {
     directory('#bk-directory-pc', true)
     directory('#bk-directory-mobile', false)

+ 0 - 1
src/main/resources/templates/article/detail.html

@@ -19,7 +19,6 @@
     <!--<div class="tip">提示:产品详情请到采美商城搜索</div>-->
     <!--面包屑-->
     <div class="bar">
-        <p th:text="${relatedLabels}">31231231231</p>
         <a href="/" target="_blank">首页</a> &gt; <a  th:each="type: *{articleType}" th:if="${typeId}==${type.id}" th:text="${type.name}" href="javascript:void(0);" class="title newTitle"></a>&gt; 正文
     </div>
 </div>

+ 1 - 0
src/main/resources/templates/encyclopedia/components/footer.html

@@ -17,6 +17,7 @@
 <script charset="utf-8" type="text/javascript" src="/lib/jquery-confirm.min.js"></script>
 <script charset="utf-8" type="text/javascript" src="/lib/vue2.6.12.min.js"></script>
 <script th:src="@{/js/common/ajax.service.js(v=${version})}" xmlns:th="https://www.thymeleaf.org"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/utils.service.js(v=${version})}"></script>
 <script th:src="@{/js/common/serviceapi/user.service.js(v=${version})}" xmlns:th="https://www.thymeleaf.org"></script>
 <script th:src="@{/js/utils.js(v=${version})}" xmlns:th="https://www.thymeleaf.org"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/mixins/router.config.js(v=${version})}"></script>

+ 1 - 0
src/main/resources/templates/encyclopedia/components/header.html

@@ -41,4 +41,5 @@
             <li><a href="/encyclopedia/about.html">走进百科</a></li>
         </ul>
     </div>
+    <input type="hidden" th:value="${coreServer}" id="coreServer">
 </header>