Browse Source

完善搜索

master
453530270@qq.com 2 years ago
parent
commit
18c3bec4fa
  1. 53
      pages/goods/list.vue

53
pages/goods/list.vue

@ -10,27 +10,6 @@
</view>
</view>
<!-- 排序标签 -->
<!-- <view class="store-sort">
<view class="sort-item" :class="{ active: sortType === 'all' }" @click="handleSortType('all')">
<text>综合</text>
</view>
<view class="sort-item" :class="{ active: sortType === 'sales' }" @click="handleSortType('sales')">
<text>销量</text>
</view>
<view class="sort-item sort-item-price" :class="{ active: sortType === 'price' }" @click="handleSortType('price')">
<text>价格</text>
<view class="price-arrow">
<view class="icon up" :class="{ active: sortType === 'price' && !sortPrice }">
<text class="iconfont icon-arrow-up"></text>
</view>
<view class="icon down" :class="{ active: sortType === 'price' && sortPrice }">
<text class="iconfont icon-arrow-down"></text>
</view>
</view>
</view>
</view> -->
<!-- 标的列表 -->
<view class="goods-list clearfix" :class="['column-' + (showView ? '1' : '2')]">
<view class="goods-item" v-for="(item, index) in list.data" :key="index" @click="onTargetDetail(item.goods_id)">
@ -69,7 +48,7 @@
<view v-else class="">
<!-- 图片 -->
<view class="goods-image">
<image class="image" mode="aspectFill" :src="item.goods_image"></image>
<image class="image" mode="aspectFill" :src="item.goods_image|gdimg"></image>
</view>
<view class="detail">
<!-- 标题 -->
@ -94,6 +73,10 @@
import { getEmptyPaginateObj, getMoreListData } from '@/core/app'
import Search from '@/components/search'
//
import pako from '@/core/pako'
import { base64ToUint8Array} from '@/utils/util'
const pageSize = 15
const showViewKey = 'GoodsList-ShowView';
@ -168,14 +151,16 @@
const param = {
// "pay_type":2,"goods_status":1,"page":1,"limit":6
order: 'desc',
order_type: 'createtime',
entrust_user_name: app.options.k,
order_type: 'id',
//entrust_user_name: app.options.k,
goods_name:app.options.search,
goods_status: '1',
page: pageNo,
limit: pageSize
}
return new Promise((resolve, reject) => {
GoodsApi.soglist(param)
GoodsApi.nbgoods(param)
//GoodsApi.soglist(param)
//GoodsApi.list(param)
.then(result => {
//
@ -227,18 +212,12 @@
}
},
/**
* 设置分享内容
*/
onShareAppMessage() {
//
return {
title: "全部分类",
path: "/pages/category/index?" + this.$getShareUrlParams()
}
}
filters:{
//
gdimg:function(value){
return pako.inflateRaw(base64ToUint8Array(value), {to: 'string'})
}
}
}
</script>

Loading…
Cancel
Save