商城首页接口

This commit is contained in:
2020-07-02 15:39:25 +08:00
parent 583afe370f
commit 5a99dfc2c9
2 changed files with 30 additions and 3 deletions

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>