This commit is contained in:
Olu Amey
2020-09-13 01:22:19 -04:00
parent 6a8e2358bd
commit f6725e6941
-47
View File
@@ -30,52 +30,5 @@ export class BlogPage implements OnInit {
}
// ----
userPointData: {
sessionid: string
member_id: number
limit: number
}
refreshBlog() {
this.userPointData = {
sessionid: "",
member_id: 1,
limit: 10,
}
try {
this.floatServiceProvider
.genericService('pointsdetail', this.userPointData)
.subscribe((pointsDetailData) => {
// console.log("getslidecarddata:");
if (
pointsDetailData.hasOwnProperty('result_list') &&
Array.isArray(pointsDetailData['result_list'])
) {
this.pointsDetailData = pointsDetailData['result_list']
for (const i in this.pointsDetailData) {
if (this.pointsDetailData.hasOwnProperty(i)) {
// model the date string to be parsable by the browser
let strDate = this.pointsDetailData[i]['added'].replace(
/-/g,
'/'
)
strDate = strDate.split(' ')[0]
const dateObj = new Date(strDate)
this.pointsDetailData[i]['formated_date'] = this.formatDate(
dateObj
)
}
}
// console.log("points detail data: ", this.pointsDetailData);
}
})
} catch (e) {
console.log(e)
}
}
}