Fix(千县名品):千县名品店铺—资讯置顶未生效

This commit is contained in:
linxi
2024-08-27 09:52:41 +08:00
parent b092e8c9c5
commit 6ad3ba0fd6
+7 -1
View File
@@ -705,7 +705,7 @@ export default {
}).then(res => {
const { data } = res
_this.loading = false
_this.infoArray.push.apply(_this.infoArray, data.records.map((info) => {
_this.infoArray.push.apply(_this.infoArray, _this.toTop(data.records).map((info) => {
var pt = info.createTime.replace(/-/g, "/")
info.year = formatDateTime(pt, 'yyyy')
info.monthDay = formatDateTime(pt, 'MM/dd')
@@ -713,12 +713,18 @@ export default {
info.showMore = false
return info
}))
// console.log(this.toTop(_this.infoArray));
}).finally(() => {
_this.loading = false
_this.isLoadInfoListSuccess = true
uni.stopPullDownRefresh()
})
},
toTop(arr) {
return arr.sort((a, b) => {
return b.isTop - a.isTop
})
},
// 攻略
getGuideReq() {
const _this = this