This commit is contained in:
hubingliang
2018-03-27 13:32:32 +08:00
parent b1c3b1c7df
commit c42e41c5fc
2 changed files with 14 additions and 7 deletions
+5 -3
View File
@@ -57,8 +57,8 @@ $.config = {router: false}
<script>
document.addEventListener('plusready', onPlusReady, false);
var shareUrl = BASE_PATH+"/news/newDetail?newsId=";
var sharehrefTitle = "我是一个超级无敌大帅哥";
var sharehrefDes = "不信你自己来看看啊!";
var sharehrefTitle = "停车坐爱枫林晚,霜叶红于二月花";
var sharehrefDes = "客观里面请!";
var shareId='';
function onPlusReady() {
@@ -71,7 +71,7 @@ function onPlusReady() {
url : BASE_PATH + "/rest/news/detail",
data:{newsId:id},
dataType:'json',
async:true,
async:false,
success:function(result){
if(result.code==200){
data = result.data
@@ -83,6 +83,8 @@ function onPlusReady() {
var dateStr = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
$("#create_time").text(dateStr)
$("#content").html(data.content)
sharehrefTitle = data.title
sharehrefDes = data.introduction
}
},
error:function(){