|
|
@@ -4,7 +4,7 @@
|
|
|
* @Author: dream
|
|
|
* @Date: 2021-03-25 15:55:15
|
|
|
* @LastEditors: dream
|
|
|
- * @LastEditTime: 2021-03-28 01:15:27
|
|
|
+ * @LastEditTime: 2021-03-28 15:42:14
|
|
|
-->
|
|
|
<template>
|
|
|
<view class="goods-main">
|
|
|
@@ -19,21 +19,65 @@
|
|
|
:show-action="false"
|
|
|
></u-search>
|
|
|
</view>
|
|
|
- <view :style="{ height: `${mainHeight}px` }">
|
|
|
- <iph-left-mune/>
|
|
|
+ <view class="main u-flex u-col-top" :style="{ height: `${mainHeight}px` }">
|
|
|
+ <view class="main-left">
|
|
|
+ <iph-left-mune v-model="currentCateVal" :list="cateList" />
|
|
|
+ </view>
|
|
|
+ <scroll-view class="main-right u-flex-1" scroll-y>
|
|
|
+ <block v-for="(item, index) in goodList" :key="index">
|
|
|
+ <view class="u-p-b-48">
|
|
|
+ <iph-good-card
|
|
|
+ :value="item"
|
|
|
+ :isShowEmpty="!item.stock"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ <iph-empty :show="!goodList.length" :type="1" />
|
|
|
+ </scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import iphHeader from '@/components/iphHeader.vue'
|
|
|
+import IphHeader from '@/components/iphHeader.vue'
|
|
|
import IphLeftMune from '@/components/iphLeftMenu.vue'
|
|
|
+import IphGoodCard from '@/components/iphGoodCard.vue'
|
|
|
+import IphEmpty from '@/components/iphEmpty.vue'
|
|
|
+
|
|
|
export default {
|
|
|
- components: { iphHeader, IphLeftMune },
|
|
|
+ components: { IphHeader, IphLeftMune, IphGoodCard, IphEmpty },
|
|
|
name: 'goods',
|
|
|
data () {
|
|
|
return {
|
|
|
-
|
|
|
+ currentCateVal: 1,
|
|
|
+ cateList: [{
|
|
|
+ value: 1,
|
|
|
+ label: '包材'
|
|
|
+ }, {
|
|
|
+ value: 2,
|
|
|
+ label: '调料'
|
|
|
+ }, {
|
|
|
+ value: 3,
|
|
|
+ label: '面粉'
|
|
|
+ }],
|
|
|
+ goodList: [{
|
|
|
+ img: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=288400877,2749955263&fm=26&gp=0.jpg',
|
|
|
+ astrict: '1件起订',
|
|
|
+ name: '华硕天选',
|
|
|
+ spce: '一件',
|
|
|
+ warehouse: '云东仓',
|
|
|
+ salesPrice: 468,
|
|
|
+ originalPrice: 480,
|
|
|
+ stock: 400
|
|
|
+ }, {
|
|
|
+ img: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=288400877,2749955263&fm=26&gp=0.jpg',
|
|
|
+ astrict: '1件起订',
|
|
|
+ name: '两行文案两行文案两行文案两行文案两行文案两行文案两行文案两',
|
|
|
+ spce: '一件',
|
|
|
+ warehouse: '云东仓',
|
|
|
+ salesPrice: 468,
|
|
|
+ stock: 0
|
|
|
+ }]
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -43,9 +87,7 @@ export default {
|
|
|
return height
|
|
|
}
|
|
|
},
|
|
|
- methods: {
|
|
|
-
|
|
|
- }
|
|
|
+ methods: {}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
@@ -55,5 +97,16 @@ export default {
|
|
|
padding: 16px 24px 36px;
|
|
|
background-color: $iph-standby-bg;
|
|
|
}
|
|
|
+ .main {
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 100%;
|
|
|
+ .main-left {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ .main-right {
|
|
|
+ @extend .main-left;
|
|
|
+ background-color: $iph-standby-bg;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|