|
|
@ -23,6 +23,7 @@ Page({ |
|
|
|
disable: true, |
|
|
|
readNum: 0, |
|
|
|
collectNum: 0, |
|
|
|
flag:5 |
|
|
|
}, |
|
|
|
onClickCollect () { |
|
|
|
// 收藏功能
|
|
|
@ -83,6 +84,12 @@ Page({ |
|
|
|
wx.setNavigationBarTitle({ |
|
|
|
title: data.title, |
|
|
|
}) |
|
|
|
|
|
|
|
if(data.flag == 0 || data.flag == 1){ |
|
|
|
var disable = false; |
|
|
|
}else{ |
|
|
|
var disable = true; |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
nodes: data.content, |
|
|
|
title: data.title, |
|
|
@ -90,10 +97,11 @@ Page({ |
|
|
|
image: data.titlePic, |
|
|
|
origin: data.source, |
|
|
|
isStar: data.isCollection ? true : false, |
|
|
|
showBtn: data.typeFlag >= 2 ? true : false, |
|
|
|
disable: data.typeFlag == 3 ? true : false, |
|
|
|
// showBtn: data.typeFlag >= 2 ? true : false,
|
|
|
|
disable: disable, |
|
|
|
readNum: data.readNum, |
|
|
|
collectNum: data.collectNum, |
|
|
|
flag:data.flag |
|
|
|
}, () => { |
|
|
|
wx.hideLoading() |
|
|
|
}) |
|
|
@ -115,7 +123,6 @@ Page({ |
|
|
|
}, |
|
|
|
onlineSignApi () { |
|
|
|
artice.onlineSign(this.data.aId, res => { |
|
|
|
console.log(res) |
|
|
|
if(res.code == 200){ |
|
|
|
console.log(res.code); |
|
|
|
wx.showToast({ |
|
|
@ -124,7 +131,7 @@ Page({ |
|
|
|
}) |
|
|
|
} |
|
|
|
if(res.code != 200){ |
|
|
|
console.log(res.code); |
|
|
|
// console.log(res.code);
|
|
|
|
this.setData({ |
|
|
|
disable: false |
|
|
|
}) |
|
|
@ -133,8 +140,38 @@ Page({ |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
// this.fetchArticeApi()
|
|
|
|
this.fetchArticeApi() |
|
|
|
}) |
|
|
|
}, |
|
|
|
cancelSignApi () { |
|
|
|
this.setData({ |
|
|
|
disable: true |
|
|
|
}) |
|
|
|
if (store.hasBindUserInfo()) { |
|
|
|
artice.cancelOnlineSign(this.data.aId, res => { |
|
|
|
if(res.code == 200){ |
|
|
|
wx.showToast({ |
|
|
|
title: res.message, |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.setData({ |
|
|
|
disable: false |
|
|
|
}) |
|
|
|
wx.showToast({ |
|
|
|
title: res.message, |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.fetchArticeApi() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
wx.redirectTo({ |
|
|
|
url: '/pages/weChatAuth/index', |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |