Browse Source

检索店铺后的列表

master
453530270@qq.com 3 years ago
parent
commit
570690bcc5
  1. 55
      pages/goods/list.vue

55
pages/goods/list.vue

@ -36,12 +36,12 @@
<view class="goods-item" v-for="(item, index) in list.data" :key="index" @click="onTargetDetail(item.goods_id)">
<!-- 单列显示 -->
<view v-if="showView" class="dis-flex">
<!-- 商品图片 -->
<!-- 图片 -->
<view class="goods-item_left">
<image class="image" :src="item.goods_image"></image>
</view>
<view class="goods-item_right">
<!-- 商品名称 -->
<!-- 名称 -->
<view class="goods-name">
<text class="twoline-hide">{{ item.goods_name }}</text>
</view>
@ -50,33 +50,31 @@
<view class="desc-selling_point dis-flex">
<text class="oneline-hide">{{ item.selling_point }}</text>
</view>
<!-- 商品销量 -->
<!-- 销量 -->
<view class="desc-goods_sales dis-flex">
<text>已售{{ item.goods_sales }}</text>
<text>已售{{ item.sale_count }}</text>
</view>
<!-- 商品价格 -->
<!-- 价格 -->
<view class="desc_footer">
<text class="price_x">¥{{ item.goods_price_min }}</text>
<text class="price_y col-9" v-if="item.line_price_min > 0">¥{{ item.line_price_min }}</text>
<text class="price_x">¥{{ item.price }}</text>
</view>
</view>
</view>
</view>
<!-- 多列显示 -->
<view v-else class="">
<!-- 商品图片 -->
<!-- 图片 -->
<view class="goods-image">
<image class="image" mode="aspectFill" :src="item.goods_image"></image>
</view>
<view class="detail">
<!-- 商品标题 -->
<!-- 标题 -->
<view class="goods-name">
<text class="twoline-hide">{{ item.goods_name }}</text>
</view>
<!-- 商品价格 -->
<!-- 价格 -->
<view class="detail-price oneline-hide">
<text class="goods-price f-30 col-m">{{ item.goods_price_min }}</text>
<text v-if="item.line_price_min > 0" class="line-price col-9 f-24">{{ item.line_price_min }}</text>
<text class="goods-price f-30 col-m">{{ item.price }}</text>
</view>
</view>
</view>
@ -163,25 +161,21 @@
*/
getGoodsList(pageNo = 1) {
const app = this
// console.log(app.options)
// {"authorization":"","record_type":"","entrust_name":"",
// "entrust_user_name":"","source_type":"","order_type":"createtime",
// "order":"desc","goods_status":1,"page":1,"limit":8}
const param = {
"pay_type":2,"goods_status":1,"page":1,"limit":6
// order: 'desc',
// order_type: 'createtime',
// entrust_user_name: app.options.k,
// goods_status: '1',
// page: pageNo,
// limit: 4
// "pay_type":2,"goods_status":1,"page":1,"limit":6
order: 'desc',
order_type: 'createtime',
entrust_user_name: app.options.k,
goods_status: '1',
page: pageNo,
limit: pageSize
}
return new Promise((resolve, reject) => {
GoodsApi.soglist(param)
//GoodsApi.list(param)
.then(result => {
//
const newList = result.data.list
const newList = result.data
app.list.data = getMoreListData(newList, app.list, pageNo)
resolve(newList)
})
@ -240,19 +234,6 @@
title: "全部分类",
path: "/pages/category/index?" + this.$getShareUrlParams()
}
},
/**
* 分享到朋友圈
* 本接口为 Beta 版本暂只在 Android 平台支持详见分享到朋友圈 (Beta)
* https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share-timeline.html
*/
onShareTimeline() {
//
return {
title: "全部分类",
path: "/pages/category/index?" + this.$getShareUrlParams()
}
}
}

Loading…
Cancel
Save