12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <template>
- <view class="content">
- <u-swiper height="200" :list="imageTopList"></u-swiper>
- <!-- 商品 -->
- <view class="goods">
- <u-section title="人气零食" v-if="goodsList.length" :show-line="false" sub-title="更多"></u-section>
- <view class="goods-list" v-if="goodsList.length">
- <uni-coods v-for="item in goodsList" :key="item.id" :data="item"></uni-coods>
- </view>
- <u-section title="居家生活" v-if="goodsList.length" :show-line="false" sub-title="更多"></u-section>
- <view class="goods-list" v-if="goodsList.length">
- <uni-coods v-for="item in goodsList" :key="item.id" :data="item"></uni-coods>
- </view>
- </view>
- <!-- 购物车 -->
- <uni-cart-fix :count="15"></uni-cart-fix>
- </view>
- </template>
- <script>
- import {
- checkLogin
- } from '@/api/login.js'
- import {
- getMapStoreList
- } from '@/api/store.js'
- import {
- getLookUpDatas
- } from '@/api/data.js'
- import {
- getUnFinishedOrder
- } from '@/api/order.js'
- export default {
- components: {
- },
- data() {
- return {
- imageTopList:[
- {image:'https://cdn.uviewui.com/uview/example/fade.jpg'},
- {image:'https://cdn.uviewui.com/uview/example/fade.jpg'}
- ],
- goodsList:[
- {
- id: 21312312321,
- name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
- src: 'https://cdn.uviewui.com/uview/example/fade.jpg',
- price: 50,
- status: 0
- },
- {
- id: 6465465465,
- name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
- src: 'https://cdn.uviewui.com/uview/example/fade.jpg',
- price: 50,
- status: 1
- },
- {
- id: 234324,
- name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
- src: 'https://cdn.uviewui.com/uview/example/fade.jpg',
- price: 50,
- status: 0
- },
- {
- id: 4453455,
- name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
- src: 'https://cdn.uviewui.com/uview/example/fade.jpg',
- price: 50,
- status: 0
- }
- ]
- }
- },
- onReady() {
- },
- onShow() {
- },
- onLoad() {
- },
- methods: {
- }
- }
- </script>
- <style lang="scss" scoped>
- .content {
- .goods{
- padding: 20upx 0;
- }
- .goods-list{
- padding: 20upx 0;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- }
- }
- </style>
|