main
liudan 1 year ago
parent 25ed58f3d4
commit afdbbee042
  1. 9
      pages/index/components/sh-hot-goods.vue
  2. 1
      pages/index/index.vue

@ -76,7 +76,7 @@ export default {
data() {
return {
listParams: {
page: 1
page: 1,
}, //
lastPage: 1, //
total: 0, //
@ -100,6 +100,12 @@ export default {
detail: {
type: Object,
default: () => {}
},
per_page:{
type:Number,
default:()=>{
return 10
}
}
},
created() {
@ -155,6 +161,7 @@ export default {
//
getGoodsList() {
let that = this;
this.listParams.per_page = this.per_page
that.$http('goods.lists', this.listParams).then(res => {
if (res.code === 1) {
this.lastPage = res.data.last_page;

@ -53,6 +53,7 @@
<!-- 推荐商品 -->
<sh-hot-goods
:per_page="100"
v-if="item.type === 'goods-list' || item.type === 'goods-group'"
:detail="item.content"
></sh-hot-goods>

Loading…
Cancel
Save