Fix(千县名品):千县名品店铺—资讯置顶未生效
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user