Browse Source

优化代码

master
453530270@qq.com 2 years ago
parent
commit
01e2e67cd2
  1. 20
      pages/index/index.vue

20
pages/index/index.vue

@ -180,7 +180,7 @@
.then(res=>{
//
const newList = app.initList(res.data)
console.log(newList,"newlist")
// console.log(newList,"newlist")
app.gdlist.data = getMoreListData(newList, app.gdlist, pageNo)
resolve(newList)
})
@ -212,10 +212,6 @@
initList(newList) {
newList.data.forEach(item => {
item.gdimg = pako.inflateRaw(base64ToUint8Array(item.goods_image), {to: 'string'})
// console.log(bytarr)
// item.gdimg = "data:image/png;base64,"+decompress(bytarr)
//item.gdimg="ss"
//item.username = item.user.name
})
return newList
},
@ -223,18 +219,20 @@
//
onRefreshList() {
this.gdlist = getEmptyPaginateObj()
setTimeout(() => {
this.mescroll.resetUpScroll()
}, 120)
},
/**
* 跳转商品详情页
*/
onTargetGoods(gislicode) {
this.$navTo(`pages/goods/detail`, { gislicode })
}
},
// moune
}
</script>

Loading…
Cancel
Save