xbx #40

Merged
theluyuan merged 6 commits from xbx into master 2020-07-03 01:10:59 +00:00
2 changed files with 30 additions and 3 deletions
Showing only changes of commit 5a99dfc2c9 - Show all commits

View File

@ -109,6 +109,12 @@ export default {
goods_id: id
});
},
getStoreGoodsList({ id, page = 0}){
return vm.$u.post('Store/getStoreGoodsList', {
id: id,
page:page
});
}
}
}

View File

@ -40,8 +40,8 @@
<view class="classify" v-if="cur==0">
111
</view>
<view class="list" v-if="cur==1">
222
<view class="item" v-if="cur==1">
<item v-for="item in list" :key="item.gc_id" :info="item" class="item"></item>
</view>
</view>
<view class="tabbar">
@ -65,13 +65,18 @@
</view>
</template>
<script>
import item from "@/components/shop/list/item"
export default {
data() {
return {
show: false,
cur: 0
cur: 0,
list:[]
}
},
components:{
item
},
methods: {
toDetailsPage() {
uni.navigateTo({
@ -79,6 +84,12 @@ export default {
});
}
},
onLoad(){
this.$u.api.getStoreGoodsList({id:1}).then((res)=>{
console.log(res.data)
this.list= res.data.list
})
}
};
</script>
<style lang="scss" scoped>
@ -191,6 +202,9 @@ export default {
}
}
}
.main{
padding-bottom: 98rpx;
}
.tabbar {
border-top: 1rpx #DBDADA solid;
width: 100%;
@ -218,5 +232,12 @@ export default {
}
}
}
.item{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
// margin-top: 20rpx;
padding:25rpx;
}
}
</style>