fix
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user