init
This commit is contained in:
24
pages/subpages/collectionLog/collectionLog.js
Normal file
24
pages/subpages/collectionLog/collectionLog.js
Normal file
@@ -0,0 +1,24 @@
|
||||
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
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user