lilei vor 4 Jahren
Ursprung
Commit
d8c68f689b
3 geänderte Dateien mit 28 neuen und 15 gelöschten Zeilen
  1. 16 11
      components/uni-coods/uni-coods.vue
  2. 9 1
      pages/index/index.vue
  3. 3 3
      pages/store/store.vue

+ 16 - 11
components/uni-coods/uni-coods.vue

@@ -1,18 +1,20 @@
 <template>
 	<view class="goods-list">
 		<view class="goods-item" v-for="item in list" :key="item.id">
-			<view class="goods-imgs"  @click="toDetail(item)">
-				<view v-if="item.inventoryQty == 0&&item.state == 1" class="goods-staus">已售罄</view>
-				<view v-if="item.state == 0" class="goods-staus">已下架</view>
-				<u-lazy-load 
-				img-mode="scaleToFill" 
-				:height="imgHeight" 
-				:image="item.homeImage+'?x-oss-process=image/resize,m_pad,h_252,w_325,color_ffffff'" 
-				:loading-img="loadingImg" 
-				:error-img="errorImg">
-				</u-lazy-load>
+			<view>
+				<view class="goods-imgs"  @click="toDetail(item)">
+					<view v-if="item.inventoryQty == 0&&item.state == 1" class="goods-staus">已售罄</view>
+					<view v-if="item.state == 0" class="goods-staus">已下架</view>
+					<u-lazy-load 
+					img-mode="scaleToFill" 
+					:height="imgHeight" 
+					:image="item.homeImage+'?x-oss-process=image/resize,m_pad,h_252,w_325,color_ffffff'" 
+					:loading-img="loadingImg" 
+					:error-img="errorImg">
+					</u-lazy-load>
+				</view>
+				<view class="name ellipsis-two" @click="toDetail(item)">{{item.name}}</view>
 			</view>
-			<view class="name ellipsis-two" @click="toDetail(item)">{{item.name}}</view>
 			<view class="price">
 				<view>
 					<text>{{item.sellGold}}</text>
@@ -122,6 +124,9 @@
 		background: #FFFFFF;
 		width: 48%;
 		margin-bottom: 20upx;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
 		.goods-imgs{
 			position: relative;
 			border-radius: 28upx 28upx 0 0;

+ 9 - 1
pages/index/index.vue

@@ -34,7 +34,7 @@
 			 		<view class="item-con">
 			 			<image src="/static/dz-icon.png" class="item-icon"></image>
 			 			<view class="s-address item-main">
-			 				<view>{{ item.provinceName }}{{ item.cityName }}{{ item.districtName }}{{ item.address }}</view>
+			 				<view>{{ item.provinceName||'' }}{{ item.cityName||'' }}{{ item.districtName||'' }}{{ item.address||'' }}</view>
 			 				<view>
 			 					<u-icon name="map-fill" color="#01c9b2" size="30"></u-icon>
 			 					{{ item.distanct.distance ? (item.distanct.distance / 1000).toFixed(1) : 0 }}KM
@@ -368,6 +368,14 @@
 							display: flex;
 							align-items: center;
 							justify-content: space-between;
+							>view{
+								&:last-child{
+									width: 30%;
+									display: flex;
+									align-items: center;
+									justify-content: flex-end;
+								}
+							}
 						}
 					}
 				}

+ 3 - 3
pages/store/store.vue

@@ -16,7 +16,7 @@
 				<image src="/static/md-big-pic.png" class="store-pic"></image>
 				<view class="store-info">
 					<view>{{ stationData.name }}</view>
-					<view>{{ stationData.provinceName }}{{ stationData.cityName }}{{ stationData.districtName }}{{ stationData.address }}</view>
+					<view>{{ stationData.provinceName||'' }}{{ stationData.cityName||'' }}{{ stationData.districtName||'' }}{{ stationData.address||'' }}</view>
 					<view>
 						营业时间:
 						<text v-for="(tItem, tInd) in stationData.deliveryTimeRuleItemList" :key="tInd">
@@ -136,8 +136,8 @@
 			box-shadow: 0upx 3upx 6upx #eee;
 			margin-bottom: 20upx;
 			.store-pic{
-				width: 130rpx;
-				height:130rpx;
+				width: 120rpx;
+				height:120rpx;
 				margin-right: 20rpx;
 			}
 			.store-info{