lilei 9 ay önce
ebeveyn
işleme
cefe0c8cf1

+ 30 - 25
pages/index/productItem.vue

@@ -16,11 +16,20 @@
 				<view class="product-name ellipsis-two">{{item.productName}}</view>
 				<view class="product-guige" v-if="!!item.productOrigCode"><text class="ellipsis-two" max-lines="2" overflow="ellipsis">{{item.productOrigCode}}</text></view>
 				<view class="product-button">
-					<view class="price-txt flex align_center">
-						¥<text>{{isLogin&&sysUserFlag == '1' ? item.price : '***'}}</text>
+					<view class="price-txt" v-if="isLogin&&sysUserFlag == '1'">
+						¥<text>{{Number(item.price).toFixed(2).toString().split('.')[0]}}</text>.{{Number(item.price).toFixed(2).toString().split('.')[1]}}
 					</view>
-					<view>
-						 
+					<view class="price-txt" v-else>
+						¥***
+					</view>
+					<view class="flex align_center rebate-tag" v-if="index==1">
+						返<text>5</text>元
+					</view>
+					<view class="flex align_center rebate-tag" v-if="index==2">
+						买3赠2
+					</view>
+					<view class="flex align_center tejia-tag" v-if="index==3">
+						特价<text>¥20</text>
 					</view>
 				</view>
 			</view>
@@ -142,7 +151,7 @@
 		&:last-child{
 			position: relative;
 			flex-grow: 1;
-			padding: 10px 10px 40px;
+			padding: 10px 10px 35px;
 			.product-name{
 				font-size: 28rpx;
 				color: #333;
@@ -159,28 +168,24 @@
 			width: 90%;
 			padding: 5px 0 10px;
 			display: flex;
-			justify-content: space-between;
 			align-items: center;
-			button{
-				display: flex;
-				align-items: center;
-				text-align: center;
-				justify-content: center;
-				min-width:50rpx;
-				height: 50rpx;
-				font-size: 28rpx;
-				border-radius: 25rpx;
-				padding: 0 10rpx;
-				color: #fff;
-				&:active{
-					background: #2abcff;
-				}
+			.rebate-tag{
+				background: #ffe7df;
+				color: #E91E63;
+				padding: 2px 5px;
+				font-size: 10px;
+				border-radius: 3px;
+				margin-left: 6px;
 			}
-			.bg-0{
-				background: #066cff;
-			}
-			.bg-1{
-				background: #34aa0a;
+			.tejia-tag{
+				color: #E91E63;
+				margin-left: 6px;
+				font-size: 12px;
+				text{
+					font-size: 12px;
+					color: #999;
+					margin-left: 5px;
+				}
 			}
 		}
 	}

+ 34 - 57
pagesB/components/chooseProductItemSkline.vue

@@ -1,16 +1,16 @@
 <template>
 	<block>
 		<view class="choose-product-item"
-		v-for="(item, dix) in list"
+		v-for="(item, index) in list"
 		:key="item.id" 
 		@click="toDetail(item)"
 		>
 			 <view style="flex-grow: 1;">
 				 <view class="choose-product-item-img">
 					<image mode="aspectFit" :src="item.productImage ? item.productImage+'?x-oss-process=image/resize,p_30':'/static/def_imgs.png'" style="width: 100%;height: 100%;"></image>
-					<view class="back-price fantext" v-if="item.promoRuleValue&&!isView">返<text>{{item.promoRuleValue}}</text>元</view>
-					<view class="back-price xiajia" v-if="isView&&item.status==0">下架</view>
-					<view class="back-price xiajia" v-else-if="isView&&item.dealerScopeFlag==0">售罄</view>
+					<view class="back-price fantext" v-if="item.promoRuleValue">返<text>{{item.promoRuleValue}}</text>元</view>
+					<view class="back-price xiajia" v-if="item.status==0">下架</view>
+					<view class="back-price xiajia" v-else-if="item.dealerScopeFlag==0">售罄</view>
 					<view class="choose-product-item-left-info-code ">
 						<text :max-lines="1" overflow="ellipsis">{{item.productCode}}</text>
 					</view>
@@ -23,21 +23,23 @@
 						<text :max-lines="2" overflow="ellipsis">{{item.productOrigCode}}</text>
 					</view>
 					<view class="choose-product-item-left-info-price">
-						<view class="price-txt" v-if="isLogin">¥<text>{{isView ? item.price : item.cost}}</text></view>
-						<view class="price-txt" v-else>¥<text>***</text></view>
-						<view v-if="!isView">
-							<view :style="{opacity:!edit?1:0,width:!edit?'auto':0}">
-								<uni-number-box v-model="item.qty" :min="1" :max="999999" @change="v=>{changeQty(v,item.id)}"></uni-number-box>
-							</view>
-							<view v-if="edit" class="edit-qty">
-								X <text>{{item.qty}}</text>
-								<uni-icons style="margin-left: 15px;" type="minus-filled" size="22" color="#dd0000" @click="remove(item.id)"></uni-icons>
-							</view>
+						<view class="price-txt" v-if="isLogin">
+							¥<text>{{Number(item.price).toFixed(2).toString().split('.')[0]}}</text>.{{Number(item.price).toFixed(2).toString().split('.')[1]}}
+						</view>
+						<view class="price-txt" v-else>¥***</view>
+						<view class="flex align_center rebate-tag" v-if="index==1">
+							返<text>5</text>元
+						</view>
+						<view class="flex align_center rebate-tag" v-if="index==2">
+							买3赠2
+						</view>
+						<view class="flex align_center tejia-tag" v-if="index==3">
+							特价<text>¥20</text>
 						</view>
 					</view>
 				 </view>
 			 </view>
-			 <view class="flex align_center justify_center" v-if="isView">
+			 <view class="flex align_center justify_center">
 			 	<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
 			 </view>
 		</view>
@@ -60,10 +62,6 @@
 				type: Boolean,
 				default: false
 			},
-			isView: {
-				type: Boolean,
-				default: false
-			},
 			isLogin:{
 				type: Boolean,
 				default: false
@@ -74,12 +72,6 @@
 			}
 		},
 		methods: {
-			changeQty(e, id) {
-				this.$emit('changeQty', e, id)
-			},
-			remove(id){
-				this.$emit('remove',id)
-			},
 			toDetail(item){
 				this.$emit('toDetail',item)
 			}
@@ -98,7 +90,8 @@
 		.price-txt{
 			color: red;
 			display: flex;
-			align-items: center;
+			align-items: baseline;
+			font-size: 12px;
 			text{
 				font-size: 36rpx;
 			}
@@ -118,21 +111,8 @@
 			position: relative;
 			overflow: hidden;
 			border: 1px solid #f8f8f8;
-			border-radius: 6px;
+			border-radius: 5px;
 			padding: 10rpx;
-			.no-txt{
-				position: absolute;
-				top: 10rpx;
-				left: 10rpx;
-				height: 30rpx;
-				min-width: 30rpx;
-				background: #9E9E9E;
-				color: #fff;
-				text-align: center;
-				line-height: 30rpx;
-				border-radius: 5rpx;
-				z-index: 100;
-			}
 			.back-price{
 				zoom: calc(0.8);
 				padding: 6rpx 65rpx;
@@ -176,25 +156,22 @@
 			.choose-product-item-left-info-price{
 				display: flex;
 				align-items:center;
-				justify-content: space-between;
-				>view{
-					&:last-child{
-						display: flex;
-						align-items:center;
-					}
+				.rebate-tag{
+					background: #ffe7df;
+					color: #E91E63;
+					padding: 2px 5px;
+					font-size: 10px;
+					border-radius: 3px;
+					margin-left: 6px;
 				}
-				.edit-qty{
-					display: flex;
-					align-items:center;
-					justify-content: space-between;
-					color: #999;
+				.tejia-tag{
+					color: #E91E63;
+					margin-left: 6px;
 					font-size: 12px;
-					> text{
-						color: #666;
-						font-size: 14px;
-					}
-					image{
-						margin-left: 20px;
+					text{
+						font-size: 12px;
+						color: #999;
+						margin-left: 5px;
 					}
 				}
 			}

+ 41 - 7
pagesB/shopiing/productDetail.vue

@@ -20,11 +20,25 @@
 					<view class="product-info-text-title">
 						{{detail.productName}} 
 						<view class="copyText" @click="copy(detail.productName)">复制</view>
+						<uni-tag style="margin-left: 10px;" size="mini" :circle="true" v-if="detail.status==0 || detail.dealerScopeFlag==0" :text="detail.status==0?'已下架':'已售罄'"></uni-tag>
 					</view>
 					<view class="product-info-text-attr">
-						<view class="product-info-price flex align_center">
-							¥<text class="price-red">{{hasLogin ? detail.price : '***'}}</text>
-							<uni-tag style="margin-left: 10px;" size="mini" :circle="true" v-if="detail.status==0 || detail.dealerScopeFlag==0" :text="detail.status==0?'已下架':'已售罄'"></uni-tag>
+						<view class="product-info-price flex align_center" v-if="!hasLogin">
+							¥***
+						</view>
+						<view class="flex align_center" v-else>
+							<view class="product-info-price">
+								¥<text>{{Number(detail.price).toFixed(2).toString().split('.')[0]}}</text>.{{Number(detail.price).toFixed(2).toString().split('.')[1]}}
+							</view>
+							<view class="flex align_center rebate-tag" v-if="detail.price==30">
+								返<text>5</text>元
+							</view>
+							<view class="flex align_center rebate-tag" v-if="detail.price==24">
+								买3赠2
+							</view>
+							<view class="flex align_center tejia-tag" v-if="detail.price==21">
+								特价<text>¥20</text>
+							</view>
 						</view>
 						<view class="product-info-nums">
 							<view class="share">
@@ -425,10 +439,30 @@
 							align-items: center;
 							justify-content: space-between;
 							.product-info-price{
-								font-size: 14px;
-								color: #FF0000;
-								.price-red{
-									font-size: 24px;
+								color: red;
+								display: flex;
+								align-items: baseline;
+								font-size: 12px;
+								text{
+									font-size: 38rpx;
+								}
+							}
+							.rebate-tag{
+								background: #ffe7df;
+								color: #E91E63;
+								padding: 2px 5px;
+								font-size: 10px;
+								border-radius: 3px;
+								margin-left: 6px;
+							}
+							.tejia-tag{
+								color: #E91E63;
+								margin-left: 6px;
+								font-size: 12px;
+								text{
+									font-size: 12px;
+									color: #999;
+									margin-left: 5px;
 								}
 							}
 							.product-info-nums{

+ 1 - 2
pagesB/shopiing/searchProduct.vue

@@ -32,7 +32,6 @@
 			:key="item.id"  
 			:index="index"
 			:list="item" 
-			:isView="true"
 			:isLogin="hasLogin"
 			@toDetail="viewDetail"
 			>
@@ -316,7 +315,7 @@
 		/deep/ .choose-product-item{
 			background-color: #FFFFFF;
 			margin: 6px 10px;
-			border-radius: 10px;
+			border-radius: 6px;
 		}
 		.loading-bar{
 			text-align: center;

+ 1 - 2
pagesB/shopiing/shopProduct.vue

@@ -54,7 +54,6 @@
 					:key="item.id"  
 					:index="index"
 					:list="item" 
-					:isView="true"
 					:isLogin="hasLogin"
 					@toDetail="viewDetail"
 					>
@@ -368,7 +367,7 @@
 				/deep/ .choose-product-item{
 					background-color: #FFFFFF;
 					margin: 6px 10px;
-					border-radius: 10px;
+					border-radius: 6px;
 				}
 				.loading-bar{
 					text-align: center;