Fix(千县名品):千县名品店铺—资讯置顶未生效
This commit is contained in:
@@ -705,7 +705,7 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
const { data } = res
|
const { data } = res
|
||||||
_this.loading = false
|
_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, "/")
|
var pt = info.createTime.replace(/-/g, "/")
|
||||||
info.year = formatDateTime(pt, 'yyyy')
|
info.year = formatDateTime(pt, 'yyyy')
|
||||||
info.monthDay = formatDateTime(pt, 'MM/dd')
|
info.monthDay = formatDateTime(pt, 'MM/dd')
|
||||||
@@ -713,12 +713,18 @@ export default {
|
|||||||
info.showMore = false
|
info.showMore = false
|
||||||
return info
|
return info
|
||||||
}))
|
}))
|
||||||
|
// console.log(this.toTop(_this.infoArray));
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
_this.loading = false
|
_this.loading = false
|
||||||
_this.isLoadInfoListSuccess = true
|
_this.isLoadInfoListSuccess = true
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
toTop(arr) {
|
||||||
|
return arr.sort((a, b) => {
|
||||||
|
return b.isTop - a.isTop
|
||||||
|
})
|
||||||
|
},
|
||||||
// 攻略
|
// 攻略
|
||||||
getGuideReq() {
|
getGuideReq() {
|
||||||
const _this = this
|
const _this = this
|
||||||
|
|||||||
Reference in New Issue
Block a user