|
@@ -125,7 +125,7 @@
|
|
}, 1000);
|
|
}, 1000);
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(['hasLogin', 'userInfo'])
|
|
|
|
|
|
+ ...mapState(['hasLogin', 'userInfo']),
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
@@ -209,55 +209,15 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getIndexSaleData() {
|
|
getIndexSaleData() {
|
|
- // const that = this
|
|
|
|
- // var pages = that.pages
|
|
|
|
- // var limit = that.limit
|
|
|
|
- // uni.showLoading({
|
|
|
|
- // title: '正在加载'
|
|
|
|
- // })
|
|
|
|
- // that.$api.request('integral', 'getIndexSaleData', {
|
|
|
|
- // page: pages,
|
|
|
|
- // limit: limit
|
|
|
|
- // }, failres => {
|
|
|
|
- // that.$api.msg(failres.errmsg)
|
|
|
|
- // that.isLoadMore = false
|
|
|
|
- // that.loadStatus = 'nomore'
|
|
|
|
- // if (that.pages > 1) {
|
|
|
|
- // that.pages -= 1
|
|
|
|
- // }
|
|
|
|
- // uni.hideLoading()
|
|
|
|
- // }).then(res => {
|
|
|
|
- // let data = res.data
|
|
|
|
- // //销售信息
|
|
|
|
- // if (data.saleInfo.length > 0 ) {
|
|
|
|
- // that.saleInfo = that.saleInfo.concat(data.saleInfo)
|
|
|
|
- // that.isLoadMore = false
|
|
|
|
- // } else {
|
|
|
|
- // if (that.pages > 1) {
|
|
|
|
- // that.pages -= 1
|
|
|
|
- // }
|
|
|
|
- // that.isLoadMore = true
|
|
|
|
- // that.loadStatus = 'nomore'
|
|
|
|
- // }
|
|
|
|
- // if(data.saleInfo.length < that.limit){
|
|
|
|
- // if (that.pages > 1) {
|
|
|
|
- // that.pages -= 1
|
|
|
|
- // }
|
|
|
|
- // that.isLoadMore = true
|
|
|
|
- // that.loadStatus = 'nomore'
|
|
|
|
- // }
|
|
|
|
- // uni.hideLoading()
|
|
|
|
- // })
|
|
|
|
const that = this
|
|
const that = this
|
|
var pages=that.pages
|
|
var pages=that.pages
|
|
var limit=that.limit
|
|
var limit=that.limit
|
|
|
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
- title: '正在加载',
|
|
|
|
- mask:true
|
|
|
|
|
|
+ title: '正在加载'
|
|
})
|
|
})
|
|
that.$api.request('news', 'getNewsInfo', {
|
|
that.$api.request('news', 'getNewsInfo', {
|
|
- category:this.category,
|
|
|
|
|
|
+ category:2,
|
|
page: pages,
|
|
page: pages,
|
|
limit:limit
|
|
limit:limit
|
|
},failres => {
|
|
},failres => {
|
|
@@ -270,7 +230,9 @@
|
|
let data = res.data
|
|
let data = res.data
|
|
if(data.length > 0){
|
|
if(data.length > 0){
|
|
for(var k =0;k<data.length;k++){
|
|
for(var k =0;k<data.length;k++){
|
|
- data[k].gmtUpdate=formatDate(Date.parse(data[k].gmtUpdate))
|
|
|
|
|
|
+ if(data[k].title.length > 20){
|
|
|
|
+ data[k].title = data[k].title.substring(0,20) + "..."
|
|
|
|
+ }
|
|
}
|
|
}
|
|
that.newsInfo = that.newsInfo.concat(data)
|
|
that.newsInfo = that.newsInfo.concat(data)
|
|
that.isLoadMore=false
|
|
that.isLoadMore=false
|