|
@ -247,6 +247,7 @@ mui.plusReady(function() {
|
247
|
247
|
beforeSend: function() {},
|
248
|
248
|
success: function(data, textState) {
|
249
|
249
|
if(data.success) {
|
|
250
|
plus.nativeUI.toast("收藏成功", toastStyle);
|
250
|
251
|
document.getElementById("collect").setAttribute("collectFlag","1");
|
251
|
252
|
document.getElementById("yesExpert").style.display="none";
|
252
|
253
|
document.getElementById("noExpert").style.display="block";
|
|
@ -289,6 +290,38 @@ mui.plusReady(function() {
|
289
|
290
|
}
|
290
|
291
|
collect();
|
291
|
292
|
})
|
|
293
|
/*进入文章浏览页面判断是否收藏文章*/
|
|
294
|
attentionArticle();
|
|
295
|
function attentionArticle(){
|
|
296
|
if(!userid){
|
|
297
|
return;
|
|
298
|
}
|
|
299
|
mui.ajax(baseUrl + "/ajax/watch/hasWatch", {
|
|
300
|
type: "GET",
|
|
301
|
timeout: 10000,
|
|
302
|
dataType: "json",
|
|
303
|
data: {
|
|
304
|
"professorId": userid,
|
|
305
|
"watchObject": proId
|
|
306
|
},
|
|
307
|
success: function(data) {
|
|
308
|
if(data.success) {
|
|
309
|
if(data.data==null){
|
|
310
|
document.getElementById("collect").setAttribute("collectFlag","0");
|
|
311
|
document.getElementById("yesExpert").style.display="block";
|
|
312
|
document.getElementById("noExpert").style.display="none";
|
|
313
|
}else{
|
|
314
|
document.getElementById("collect").setAttribute("collectFlag","1");
|
|
315
|
document.getElementById("yesExpert").style.display="none";
|
|
316
|
document.getElementById("noExpert").style.display="block";
|
|
317
|
}
|
|
318
|
}
|
|
319
|
},
|
|
320
|
error: function(XMLHttpRequest, textStats, errorThrown) {
|
|
321
|
console.log(JSON.stringify(XMLHttpRequest));
|
|
322
|
}
|
|
323
|
})
|
|
324
|
}
|
292
|
325
|
/*微信及微信朋友圈分享专家*/
|
293
|
326
|
var auths, shares;
|
294
|
327
|
document.getElementById("shareBtn").addEventListener("tap", function() {
|