Przeglądaj źródła

commit -m 二手发布

zhengjinyi 9 miesięcy temu
rodzic
commit
2a3b4e2df9

+ 37 - 6
pages/second/form/form.vue

@@ -29,7 +29,28 @@
 					</picker>
 				</view>
 				<text class="iconfont icon-xiayibu"></text>
-			</view> -->
+			</view> -->
+            <view class="row">
+            	<view class="label"><text class="red">*</text>发布方选择:</view>
+            	<view class="select spacing">
+            		<picker
+            			@change="bindPickerRouls($event)"
+            			:value="index"
+            			:range="roulsActions"
+            			range-key="name"
+            		>
+            			<input
+            				class="input"
+            				type="text"
+            				disabled="true"
+            				v-model="roulsText"
+            				placeholder="请选择发布方"
+            				placeholder-class="placeholder"
+            			/>
+            		</picker>
+            	</view>
+            	<text class="iconfont icon-xiayibu"></text>
+            </view>
 			<view class="row">
 				 <view class="label"><text class="red">*</text>联系人:</view>
 				 <view class="spacing">
@@ -298,10 +319,15 @@
 				isIphoneX: this.$store.state.isIphoneX,
 				popupShow:true,
 				userIdentity:0,
-				publisherText:'个人身份',
+				publisherText:'个人身份',
+                roulsText:'我是卖方',
 				organizationTypeText:'请选择二手分类',
 				organizationTypeText1:'请选择商品类型',
 				brandActions:[],
+				roulsActions:[
+					{name:'我是卖方',value:1},
+					{name:'我是买方',value:2},
+				],
 				publisherActions:[
 					{name:'个人身份',value:1},
 					{name:'公司身份',value:2},
@@ -351,7 +377,8 @@
 					productDetails:'',//商品详细信息
 					announType:2,//发布类型 1.二手预成交商品 2.二手估价商品
 					source:2,//二手发布来源.1:WWW,2:小程序,3:后台,4:协销
-                    userId:0
+                    userId:0,
+                    buyFlag:1 //发布者是买方或者卖方
 				 },
 				 addressData:{
 					address:'请选择所在地区',
@@ -390,9 +417,13 @@
 				this.addressData.provinceID = e.provinceCode
 				this.secondParams.townId = this.addressData.townID
 			},
-			bindPickerChangePublisher(e) {// 选择发布者身份
-				this.publisherText = this.publisherActions[e.target.value].name
-				this.secondParams.publishIdentity = this.publisherActions[e.target.value].value
+			bindPickerChangePublisher(e) {// 选择发布者身份
+                this.publisherText = this.publisherActions[e.target.value].name
+                this.secondParams.publishIdentity = this.publisherActions[e.target.value].value
+			},
+			bindPickerRouls(e) {// 选择发布者身份
+				this.roulsText = this.roulsActions[e.target.value].name
+				this.secondParams.buyFlag = this.roulsActions[e.target.value].value
 			},
 			bindPickerChange(e) {// 选择二手分类
 				this.secondParams.secondHandType = this.categoryActions[e.target.value].value

+ 5 - 2
pages/second/product/components/secondPrice.vue

@@ -28,7 +28,10 @@
 					</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 v-else>
+                            <text class="txt sm" v-if="product.price > 0">¥{{ product.price | NumFormat }}</text>
+                            <text class="txt sm" v-else>¥议价</text>
+                        </text>
 					</text>
 				</view>
 			</view>
@@ -52,7 +55,7 @@
 		},
 		filters: {
 			NumFormat:function(text) {//处理金额
-				return Number(text).toFixed(2);
+				return Number(text).toFixed(2)
 			},
 		},
 		created() {

+ 21 - 1
pages/second/product/product-details.vue

@@ -63,11 +63,13 @@
                                         originRight>{{ current + 1 }}/{{ currentTotal }}</tui-tag>
                                 </view>
                             </uni-swiper-dot>
+                            <view class="infotag mai" v-if="product.buyFlag === 1">卖</view>
+                            <view class="infotag buy" v-else>买</view>    
                         </view>
                         <view class="product-wrap clearfix">
                             <view class="wrap-top">
                                 <view class="wrap-top-price">
-                                    <!-- <second-price :product="product" /> -->
+                                    <second-price :product="product" />
                                 </view>
                                 <view class="p-title tui-skeleton-fillet">
                                     <view class="p-title-name">{{product.name == undefined ? '' : product.name}}</view>
@@ -575,6 +577,24 @@
         width: 100%;
         height: 750rpx;
         position: relative;
+        .infotag {
+            font-size: 30rpx;
+            color: #FFFFFF;
+            width: 70rpx;
+            height: 70rpx;
+            text-align: center;
+            line-height: 70rpx;
+            border-radius: 50%;
+            position: absolute;
+            left: 10rpx;
+            top: 10rpx;
+            &.buy{
+                background: #31d29d;
+            }
+            &.mai{
+                background: #efb336;
+            }
+        }
     }
 
     .banner {

+ 49 - 9
pages/second/product/product-list.vue

@@ -36,6 +36,9 @@
         </view>
         <view class="shopList"
             :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
+            <view class="shopList-tips">
+                <text>说明:仅限采美会员可查看价格及联系方式</text>
+            </view>
             <scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y
                 v-if="tabchildList.length > 0">
                 <view class="Listitem" v-if="isShow" v-for="(item, index) in tabchildList" :key="index"
@@ -45,15 +48,18 @@
                         <image :src="item.imageList[0]" class="bigImg"></image>
                         <image src="https://static.caimei365.com/app/img/icon/yishou.png" class="yishou_bg"
                             v-if="item.sold==1&&item.newAdded==1||item.sold==1&&item.newAdded==0"></image>
+                        <view class="infotag news" v-if="item.sold==0&&item.newAdded==1">新</view>    
                     </view>
                     <view class="ItemInfo">
-                        <text class="infotag news" v-if="item.sold==0&&item.newAdded==1">新</text>
+                        <text class="infotag mai" v-if="item.buyFlag === 1">卖</text>    
+                        <text class="infotag buy" v-else>买</text>    
                         <view class="productname" href=""
-                            :style="item.sold==0&&item.newAdded==1?'text-indent:60rpx':''">
+                            style="text-indent:55rpx;">
                             {{item.name}}
                         </view>
                         <view class="targetprice">
-<!--                            <text v-if="item.detailTalkFlag ==2 && !hasLogin">¥价格详聊</text>
+                            
+                            <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>								
@@ -64,8 +70,11 @@
                             </text>
                             <text v-else>
                                 <text v-if="item.sold == 1"></text>
-                                <text v-else>¥{{ item.price | NumFormat}}</text>
-                            </text> -->
+                                <template v-else>
+                                    <text v-if="item.price > 0">¥{{ item.price | NumFormat }}</text>
+                                    <text v-else>¥议价</text>
+                                </template>
+                            </text>
                         </view>
                         <view class="shijian">
                             <text class="iconfont  icon-shijian"></text> {{item.onLineDateStr}}
@@ -470,7 +479,14 @@
         font-size: 24rpx;
         color: #b2b2b2;
     }
-
+    .shopList-tips{
+        width: 100%;
+        height: 40rpx;
+        box-sizing: border-box;
+        padding: 0 24rpx;
+        font-size: 24rpx;
+        color: #999999;
+    }
     .Listitem {
         height: 202rpx;
         padding: 30rpx 20rpx;
@@ -483,7 +499,16 @@
         float: left;
         background: #000;
         position: relative;
-
+        .infotag {
+            font-size: 20rpx;
+            padding: 4rpx 16rpx;
+            background: #f94b4b;
+            color: #fff;
+            position: absolute;
+            border-radius: 0 16rpx 0 16rpx;
+            top: 0;
+            left: 0;
+        }
         .bigImg {
             width: 100%;
             height: 100%;
@@ -497,7 +522,22 @@
     .ItemInfo {
         float: right;
         width: 500rpx;
-
+        .infotag {
+            font-size: 22rpx;
+            color: #FFFFFF;
+            padding: 0;
+            border-radius: 18rpx;
+            line-height: 40rpx;
+            width: 40rpx;
+            height: 40rpx;
+            text-align: center;
+            &.buy{
+                background: #31d29d;
+            }
+            &.mai{
+                background: #efb336;
+            }
+        }
         .dizhi {
             font-size: 24rpx;
             color: #999999;
@@ -537,7 +577,7 @@
 
     .targetprice {
         font-size: 26rpx;
-        height: 20rpx;
+        height: auto;
         color: #f94b4b;
         margin: 15rpx 0;
     }

+ 2 - 2
services/config.env.js

@@ -2,8 +2,8 @@ let URL_CONFIG = ''
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
     // URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
-    URL_CONFIG = 'https://core-b.caimei365.com' 
-    // URL_CONFIG = 'https://core.caimei365.com'    
+    // URL_CONFIG = 'https://core-b.caimei365.com' 
+    URL_CONFIG = 'https://core.caimei365.com'    
 }else{
     // 生产环境
     URL_CONFIG = 'https://core.caimei365.com'