Forráskód Böngészése

commit -m 二手商品价格显示控制

zhengjinyi 3 éve
szülő
commit
e04168a160

+ 12 - 7
components/cm-module/productDetails/secondPrice.vue

@@ -4,11 +4,11 @@
 		<template v-if="!hasLogin">
 			<view class="p-login grade tui-skeleton-fillet">
 				<view class="floor-item-btn" v-if="product.detailTalkFlag !=2">
-					<view class="btn" @click.stop="loginClick">登录查看价格</view>
+					<view class="btn" @click.stop="loginClick">{{  product.sold == 1 ? '已售二手商品不公开价格' : '登录查看价格' }}</view>
 				</view>
 				<template  v-else>
-					<text class="p-no">¥</text>
-					<text class="txt big" >详聊</text>
+					<text v-if="product.sold == 1">已售二手商品不公开价格</text>
+					<text v-else><text class="txt sm">¥</text>价格详聊</text>
 				</template>
 			</view>
 		</template>
@@ -16,14 +16,19 @@
 			<view class="wrap-main-item" v-if="identity == 1">
 				<view class="p-price tui-skeleton-fillet">
 					<text class="txt sm">¥</text>
-					<text class="txt big" v-if="product.detailTalkFlag==2">详聊</text>
-					<text class="txt big" v-else>{{product.price | NumFormat}}</text>
+					<text class="txt big">{{product.price | NumFormat}}</text>
 				</view>
 			</view>
 			<view class="wrap-main-item" v-else>
 				<view class="p-price tui-skeleton-fillet">
-					<text class="txt sm">¥</text>
-					<text class="txt big">{{product.price | NumFormat}}</text>
+					<text class="txt big" v-if="product.detailTalkFlag==2">
+						<text v-if="product.sold == 1">已售二手商品不公开价格</text>
+						<text v-else><text class="txt sm">¥</text>价格详聊</text>
+					</text>
+					<text class="txt big" v-else>
+						<text v-if="product.sold == 1">已售二手商品不公开价格</text>
+						<text v-else><text class="txt sm">¥</text>{{product.price | NumFormat}}</text>
+					</text>
 				</view>
 			</view>
 		</template>

+ 21 - 6
pages/second/product/product-list.vue

@@ -27,7 +27,13 @@
 			</ul>
 		</view>
 		<view class="mainTab" v-if="mainflag" v-show="searchHide">
-			 <view class="li" v-for="(item,index) in tabList" @click='handleChild(item)' :key="index" :class="currentID2 ==index?'addstyle':' '">{{item.name}}</view>
+			 <view  class="li" 
+					v-for="(item,index) in tabList" 
+				    @click='handleChild(item)' 
+					:key="index" 
+					:class="currentID2 ==index?'addstyle':' '">
+					{{item.name}}
+			 </view>
 		</view>
 		<view class="shopList" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
 			<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="tabchildList.length > 0">
@@ -43,11 +49,20 @@
 		                        {{item.name}}
 		                    </view>
 		                    <view class="targetprice">
-		                        <text v-if="item.detailTalkFlag ==2 && hasLogin==false">¥详聊</text>
-		                        <text v-else-if="!hasLogin" class="priceparam" @click.stop="NavigatorLogin(item)">登录查看价格></text>
-		                        <text v-else-if="hasLogin && item.detailTalkFlag==2">¥详聊</text>
-		                        <text v-else>¥{{ item.price | NumFormat}}</text>
-		                    </view>
+								<text v-if="item.detailTalkFlag ==2 && !hasLogin">¥价格详聊</text>
+								<text v-else-if="!hasLogin" class="priceparam" @click.stop="NavigatorLogin(item)">
+									<text v-if="item.sold==1">已售二手商品不公开价格></text>								
+									<text v-else>登录查看价格></text>								
+								</text>
+								<text v-else-if="hasLogin && item.detailTalkFlag==2">
+									<text v-if="item.sold == 1">已售二手商品不公开价格</text>
+									<text v-else>¥价格详聊</text>
+								</text>
+								<text v-else>
+									<text v-if="item.sold == 1">已售二手商品不公开价格</text>
+									<text v-else>¥{{ item.price | NumFormat}}</text>
+								</text>
+							</view>
 							<view class="shijian">
 								<text class="iconfont  icon-shijian"></text> {{item.onLineDateStr}}
 							</view>