Browse Source

处理搜索

master
453530270@qq.com 2 years ago
parent
commit
7f05af1fe2
  1. 12
      pages/goods/list.vue

12
pages/goods/list.vue

@ -75,7 +75,7 @@
// //
import pako from '@/core/pako' import pako from '@/core/pako'
import { base64ToUint8Array} from '@/utils/util' import { base64ToUint8Array,numberWithCommas} from '@/utils/util'
const pageSize = 15 const pageSize = 15
const showViewKey = 'GoodsList-ShowView'; const showViewKey = 'GoodsList-ShowView';
@ -172,6 +172,16 @@
}) })
}, },
//
initList(newList) {
newList.data.forEach(item => {
//
item.price = numberWithCommas(item.price)
item.gdimg = pako.inflateRaw(base64ToUint8Array(item.goods_image), {to: 'string'})
})
return newList
},
// //
handleSortType(newSortType) { handleSortType(newSortType) {
const app = this const app = this

Loading…
Cancel
Save