28 lines
909 B
JavaScript
Executable File
28 lines
909 B
JavaScript
Executable File
mui.plusReady(function() {
|
||
var self = plus.webview.currentWebview();
|
||
var msgId = self.data_articleId;
|
||
mui.ajax(chengUrl('app/Articles/showArticle/'), {
|
||
|
||
data: {
|
||
articleId: msgId
|
||
},
|
||
dataType: 'json', //服务器返回json格式数据
|
||
type: 'post', //HTTP请求类型
|
||
timeout: 10000, //超时时间设置为10秒;
|
||
success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
||
var data = toJson(data,1);
|
||
|
||
if(data.status == 1) {
|
||
data = data.data;
|
||
var html = '<div class="time">'+ data.articleTitle +'</div><div class="con_">'+ data.articleContent +'</div>';
|
||
$('.con').html(html)
|
||
} else {
|
||
console.log(data.status)
|
||
}
|
||
},
|
||
error: function(xhr, type, errorThrown) { //异常处理;
|
||
// alert(type);
|
||
}
|
||
});
|
||
|
||
}) |