24 lines
410 B
JavaScript
24 lines
410 B
JavaScript
|
|
import userArticleApi from "../../../api/userArticleApi"
|
||
|
|
|
||
|
|
|
||
|
|
Page({
|
||
|
|
data: {
|
||
|
|
articles: []
|
||
|
|
},
|
||
|
|
goback(){
|
||
|
|
wx.navigateBack(1)
|
||
|
|
},
|
||
|
|
|
||
|
|
onLoad(){
|
||
|
|
userArticleApi.getUserCollectionArticleList().then(res=>{
|
||
|
|
if (res.data.length>0) {
|
||
|
|
res.data.forEach(item=>{
|
||
|
|
item.tags = JSON.parse(item.tags)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
this.setData({
|
||
|
|
articles: res.data
|
||
|
|
})
|
||
|
|
})
|
||
|
|
}
|
||
|
|
})
|