123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <template>
- <view class="content">
- <u-swiper height="250" :list="imageTopList"></u-swiper>
- <view class="t1">
- <u-image height="36" src="/static/t1.png"></u-image>
- </view>
- <!-- 商品 -->
- <view class="goods">
- <view v-if="goodsList.length">
- <u-section title="人气零食" v-if="goodsList.length" line-color="#01c9b2" sub-title="更多" @click="toGoods(1)"></u-section>
- <view class="goods-list">
- <uni-coods v-for="item in goodsList" :key="item.id" :data="item"></uni-coods>
- </view>
- </view>
- <view v-if="goodsList.length">
- <u-section title="居家生活" v-if="goodsList.length" line-color="#01c9b2" sub-title="更多" @click="toGoods(2)"></u-section>
- <view class="goods-list">
- <uni-coods v-for="item in goodsList" :key="item.id" :data="item"></uni-coods>
- </view>
- </view>
- </view>
- <!-- 购物车 -->
- <uni-cart-fix></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:'/static/banner.png'},
- {image:'/static/banner1.png'}
- ],
- goodsList:[
- {
- id: 21312312321,
- name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
- src: '/static/goods.png',
- price: 300,
- status: 0
- },
- {
- id: 6465465465,
- name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
- src: '/static/goods.png',
- price: 50,
- status: 1
- },
- ]
- }
- },
- onReady() {
- },
- onShow() {
- },
- onLoad() {
- },
- methods: {
- // 更多商品
- toGoods(clsId){
- uni.navigateTo({
- url:"/pages/goods/goods?id="+clsId
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .content {
- background: url(../../static/topBg.png) no-repeat top center;
- background-size: 100%;
- .goods{
- >view{
- padding: 20upx 20upx 10upx;
- background: #FFFFFF;
- border-radius: 15upx;
- box-shadow: 0upx 6upx 10upx #eee;
- margin-bottom: 20upx;
- }
- }
- .goods-list{
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- padding-top: 20upx;
- }
- .t1{
- padding: 20upx 0;
- }
- }
- </style>
|