1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title></title>
- <!--<link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />-->
- <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
- <link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
- <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
- <link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
- <style type="text/css">
- .article-content{
- padding-bottom: 60px;
- background-color: #fff;
- padding-left: 10px;
- padding-right: 10px;
- }
- .article-content img{
- width: 100%;
- }
- [v-cloak]{display: none;}
- </style>
- </head>
- <body style="height: auto;padding: 0 20px;">
- <div id="app" v-cloak>
- <h1 id="articleTitle" class="c-f16 c-bold c-t-center mtb20 mb12">{{it.articleTitle}}</h1>
- <div class="c-f12 c-909090 mb10">
- <span>{{it.updateTime | formatDate}}</span>
- <span class="fr">{{it.browseNumber}}人浏览</span>
- </div>
- <div id="articleContent" class="article-content c-f14 c-333" style="width: 100%; word-wrap:break-word" v-html="content"></div>
- </div>
- <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
- <script src="../../../js/jquery-2.2.4.js"></script>
- <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
- <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
- <script src="../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript" src="../../../api/jbsc-api.js" ></script>
- <script type="application/javascript" src="../../../api/rehabilitation-api.js"></script>
- <script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
- <script src="../../../plugins/toastr/toastr.min.js"></script>
- <!--<script src="../../../plugins/layer/layer.min.js"></script>-->
- <script type="text/javascript">
- var httpData=GetRequest();
- new Vue({
- el: "#app",
- data:{
- articleId: httpData['articleId'],
- content:'',
- it:{}
- },
- mounted: function(){
- this.initPage();
- },
- methods: {
- initPage:function() {
- var vm=this;
- params = { articleId: vm.articleId, userType: 1 };
- jbscAPI.getArticle(params).then(function(res) {
- if(res.status == 200) {
- var content = res.data.articleContent;
- //修改图片路径,处理图片服务防盗链的问题
- var domain = httpRequest.server+"/image/getRemoteByURL?imageURL=";
- var strRegex = /((https|http):\/\/)/g;
- content = content.replace(strRegex , domain + "$1");
- var reg=/group1\//g;
- vm.content = content.replace(reg,httpRequest.imgServer+ 'group1/');
- vm.it=res.data
- console.log(vm.content)
- // $("#xiangqing-content").html(html);
- // //禁止超链接执行默认行为
- // $("#xiangqing-content a").attr("onclick","return false");
- }
- });
- }
- },
- filters:{
- formatDate:function(str){
- if(str){
- return str.substr(0,19)
- }else{
- return "";
- }
- }
- }
- })
- </script>
- </body>
- </html>
|