Explorar o código

Merge remote-tracking branch 'remotes/origin/developer' into developerB

zhengjinyi %!s(int64=4) %!d(string=hai) anos
pai
achega
2d858d9e59

+ 3 - 4
components/cm-module/listTemplate/secondHand.vue

@@ -26,7 +26,6 @@
 						  @click="changeTabsFirst(1)">{{tabIndexSelectText}}
 						  <text class="iconfont icon-xiangxia1" :class="isTabIndexSelect ? 'reto': '' "></text>
 					</view>
-					<view class="tabs-item" :class="{ active: tabIndex === 2 }" @click="changeTabs(2)">临期产品</view>
 					<view class="tabs-item" :class="{ active: tabIndex === 3 }" @click="changeTabs(3)">其他</view>
 				</view>
 				<view class="tabs-item-first clearfix" v-if="isTabIndexSelect">
@@ -143,7 +142,7 @@
 				ladderPriceList:[],//是否 阶梯,
 				goodsList:[],
 				isShow: false,
-				screenTabs:['二手仪器','轻光电','重光电','耗材配件'],
+				screenTabs:['二手仪器','美容仪器'],
 				tabIndex:1,
 				screenTab:0,
 				isTabIndexSelect:false,
@@ -273,7 +272,7 @@
 				this.tabIndex = index
 				this.secondHandType = index
 				this.isTabIndexSelect = false
-				if(this.tabIndex == 2 || this.tabIndex ==3){
+				if(this.tabIndex == 3){
 					this.instrumentType = ''
 					this.getProductAgainInfo()
 				}
@@ -543,7 +542,7 @@
 			}
 			.tabs-item-first{
 				position: absolute;
-				bottom: -308rpx;
+				bottom: -160rpx;
 				left: -24rpx;
 				height: auto;
 				width: 702rpx;

+ 6 - 2
search/pages/search/search-second.vue

@@ -70,7 +70,7 @@
 		data() {
 			return {
 				shopId:0,
-				userID:0,
+				userId:0,
 				themeClass: 'block',
 				show:false,
 				userIdentity:'',	
@@ -100,7 +100,10 @@
 			}
 		},
 		created() {
-			this.getListFromServer()
+			this.$api.getStorage().then((resolve) => {
+				this.userId = resolve.userId ? resolve.userId : '';
+				this.getListFromServer()
+			})
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
@@ -130,6 +133,7 @@
 					this.pageNum += 1;
 				}
 				let params = {
+						userId:this.userId,
 						secondHandType:1,
 						instrumentType:0,
 						name:this.name,

+ 3 - 5
second/pages/form/form-seller.vue

@@ -305,13 +305,11 @@
 				   {name:'其他',value:'3'},
 				],
 				radioList:[
-				   {name:'轻光电',value:'1',isChecked:false},
-				   {name:'重光电',value:'2',isChecked:false},
-				   {name:'耗材配件',value:'3',isChecked:false},
+					{name:'美容仪器',value:'1',isChecked:false}
 				],
 				beauty:[
-				   {name:'医美',value:'1'},
-				   {name:'非医美',value:'2'},
+					{name:'医美',value:'1'},
+					{name:'非医美',value:'2'},
 				],
 				BrandList:[],
 				isShow:false,

+ 1 - 3
second/pages/form/form.vue

@@ -305,9 +305,7 @@
 				   {name:'其他',value:'3'},
 				],
 				radioList:[
-				   {name:'轻光电',value:'1',isChecked:false},
-				   {name:'重光电',value:'2',isChecked:false},
-				   {name:'耗材配件',value:'3',isChecked:false},
+				   {name:'美容仪器',value:'1',isChecked:false}
 				],
 				beauty:[
 				   {name:'医美',value:'1'},

+ 107 - 100
second/pages/product/product-details.vue

@@ -34,110 +34,109 @@
 			</view>	
 		</view>
 		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
-		<view class="container-product tui-skeleton">
-			<view class="container-product-main">
-				<view class="product-top">
-					<view class="banner-section">
-						<uni-swiper-dot :info="productImage" :current="current" field="content" :mode="mode" >
-							<swiper class="banner tui-banner tui-skeleton-rect"  @change="swiperChange" :duration='800' :autoplay="false" :circular="true" >
-								<swiper-item v-for="(item, index) in product.imageList" :key="index" class="banner-item"> 
-									<image :src="item" @click="previewImg(index)" class="product-img" />
-								</swiper-item>
-							</swiper>
-							<view class="swiper__dots-box">
-								<tui-tag padding="12rpx 24rpx" type="translucent" shape="circleLeft" size="32rpx" :scaleMultiple="0.82" originRight>{{ current + 1 }}/{{ product.imageList.length }}</tui-tag>
-							</view>
-						</uni-swiper-dot>
-					</view>
-					<view class="product-wrap clearfix">
-						<view class="wrap-top" >
-							<view class="wrap-top-price">  
-								<second-price :product="product"></second-price>
-							</view>
-							<view class="p-title tui-skeleton-fillet">
-								<view class="p-title-name">
-									{{product.name == undefined ? '' : product.name}}
+		<template v-else>
+			<view class="cart-content empty" v-if="isInvalid">
+				<view  class="empty-container">
+					<image class="empty-container-image" :src="productNoneImage" mode="aspectFit"></image>
+					<text class="error-text">暂无权限查看该商品</text>
+					<view class="login-btn"  @click="goIndex">去商城</view>
+				</view>
+			</view>
+			<view class="container-product tui-skeleton" v-else>
+				<view class="container-product-main">
+					<view class="product-top">
+						<view class="banner-section">
+							<uni-swiper-dot :info="productImage" :current="current" field="content" :mode="mode" >
+								<swiper class="banner tui-banner tui-skeleton-rect"  @change="swiperChange" :duration='800' :autoplay="false" :circular="true" >
+									<swiper-item v-for="(item, index) in product.imageList" :key="index" class="banner-item">
+										<image :src="item" @click="previewImg(index)" class="product-img" />
+									</swiper-item>
+								</swiper>
+								<view class="swiper__dots-box">
+									<tui-tag padding="12rpx 24rpx" type="translucent" shape="circleLeft" size="32rpx" :scaleMultiple="0.82" originRight>{{ current + 1 }}/{{ product.imageList.length }}</tui-tag>
+								</view>
+							</uni-swiper-dot>
+						</view>
+						<view class="product-wrap clearfix">
+							<view class="wrap-top" >
+								<view class="wrap-top-price">
+									<second-price :product="product"></second-price>
+								</view>
+								<view class="p-title tui-skeleton-fillet">
+									<view class="p-title-name">{{product.name == undefined ? '' : product.name}}</view>
+									<button open-type="share" class="p-title-share tui-share-position" @tap="onShare">
+										<view class=""><text class="iconfont icon-fenxiang1"></text></view>
+										<view class="">分享</view>
+									</button>
+								</view>
+								<view class="productRemarks"  v-if="product.productRemarks!=''&&product.productRemarks!=null">
+									<text class="text">{{product.productRemarks}}</text>
+								</view>
+								<view class="wrap-label" v-if="product.tagsList.length>0">
+									<view class="label-a tui-skeleton-fillet" v-for="(label,index) in  product.tagsList" :key="index">{{label}}</view>
+								</view>
+								<view class="product-seve" v-if="hasLogin">
+									<text class="iconfont icon-wuyoutuihuo tui-skeleton-rect"><text class="text">无忧退货</text></text>
+									<text class="iconfont icon-wuyoutuihuoi tui-skeleton-rect"><text class="text">快速退款</text></text>
+									<text class="iconfont icon-wuyoutuihuo tui-skeleton-rect"><text class="text">正品保证</text></text>
 								</view>
-								<button open-type="share" class="p-title-share tui-share-position" @tap="onShare">
-									<view class=""><text class="iconfont icon-fenxiang1"></text></view>
-									<view class="">分享</view>
-								</button>
-							</view>
-							<view class="productRemarks"  v-if="product.productRemarks!=''&&product.productRemarks!=null">
-								<text class="text">{{product.productRemarks}}</text>
-							</view>
-							<view class="wrap-label" v-if="product.tagsList.length>0">
-								<view class="label-a tui-skeleton-fillet" v-for="(label,index) in  product.tagsList" :key="index">{{label}}</view>
 							</view>
 						</view>
-					</view>	
-						<view class="product-seve" v-if="hasLogin">
-							<text class="iconfont icon-wuyoutuihuo tui-skeleton-rect"><text class="text">无忧退货</text></text>
-							<text class="iconfont icon-wuyoutuihuoi tui-skeleton-rect"><text class="text">快速退款</text></text>
-							<text class="iconfont icon-wuyoutuihuo tui-skeleton-rect"><text class="text">正品保证</text></text>
+						<view class="product-parameter" @click="showPopup">
+							<text class="title">参数:</text>
+							<text class="name">品牌  参数  分类...</text>
+							<text class="iconfont icon-xiayibu"></text>
 						</view>
-				</view>
-				
-				<view class="product-parameter" @click="showPopup">
-					<text class="title">参数:</text>
-					<text class="name">品牌  参数  分类...</text>
-					<text class="iconfont icon-xiayibu"></text>
-				</view>
-			</view>
-			<view class="product-details productDetails0">
-				<!-- 商品详情 -->
-				<view class="title">
-					<view class="title-tab">商品详情</view>
-				</view>
-				<view class="Disclaimer" v-if="hasLogin">
-					<span >免责声明</span>
-					<text class="text">
-						鉴于本商城提供的二手版块信息包括但不限于公司名称,商品的简介、性能、描述与说明,相关图片、视频等均由卖家自行提供,由卖家对其提供的信息承担相应法律责任。买家应自行甄别商品信息并查验商品性状。本商城对二手版块中买卖双方的交易不提供任何形式的担保与保证,特此声明!
-					</text>
-				</view>
-				<view class="content tui-banner product-rich-text tui-skeleton-rect">
-					<view class="contentHtml">
-						<view class="detailsText" v-if="product.productDetails!=''||product.productDetails!=null"  >{{product.productDetails}}</view>
-						   <view class="imgList" v-for="(item, index) in product.imageList" :key="index" :data-src="item">
-							   <img :src="item"/>
-						   </view>
 					</view>
 				</view>
-			</view>	
-			<view class="product-details secondBrand productDetails1" v-if="product.brandInfo!=''&&product.brandInfo!=null">
-				<!-- 品牌信息 -->
-				<view class="title">
-					<view class="title-tab">品牌信息</view>
-				</view>
-				<text class="brandinfo">
-					{{product.brandInfo}}
-				</text>
-			</view>
-			<view class="product-details recommend productDetails2">
-				<!-- 相关推荐 -->
-				<view class="title">
-					<view class="title-tab">相关推荐</view>
-				</view>
-				<view class="content hot">
-					<recommend :query-productid="product.productID" v-if="isRequest" ></recommend>
-				</view>
-			</view>	
-				</view> 
-			<!-- 商品参数 -->
-			<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
-				<view class="tui-popup-box clearfix">
-					<view class="title">商品参数</view>
-				    <cm-parameter :product="product" :goodsData="goodsData" ></cm-parameter>
-					<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
-						<view class="tui-flex-1">
-							<view class="tui-button" @click="hidePopup()">收起</view>
+				<view class="product-details productDetails0">
+					<!-- 商品详情 -->
+					<view class="title">
+						<view class="title-tab">商品详情</view>
+					</view>
+					<view class="Disclaimer" v-if="hasLogin">
+						<span >免责声明</span>
+						<text class="text">
+							鉴于本商城提供的二手版块信息包括但不限于公司名称,商品的简介、性能、描述与说明,相关图片、视频等均由卖家自行提供,由卖家对其提供的信息承担相应法律责任。买家应自行甄别商品信息并查验商品性状。本商城对二手版块中买卖双方的交易不提供任何形式的担保与保证,特此声明!
+						</text>
+					</view>
+					<view class="content tui-banner product-rich-text tui-skeleton-rect">
+						<view class="contentHtml">
+							<view class="detailsText" v-if="product.productDetails!=''||product.productDetails!=null"  >{{product.productDetails}}</view>
+							   <view class="imgList" v-for="(item, index) in product.imageList" :key="index" :data-src="item">
+								   <img :src="item"/>
+							   </view>
 						</view>
 					</view>
-				</view>	
-			</tui-bottom-popup>	
-			<!-- 侧边 -->
-			<scroll-top :isScrollTop="isScrollTop" :bottom="200"></scroll-top>
+					<view class="product-details secondBrand productDetails1" v-if="product.brandInfo!=''&&product.brandInfo!=null">
+						<!-- 品牌信息 -->
+						<view class="title"><view class="title-tab">品牌信息</view></view>
+						<text class="brandinfo">{{product.brandInfo}}</text>
+					</view>
+					<view class="product-details recommend productDetails2">
+						<!-- 相关推荐 -->
+						<view class="title"><view class="title-tab">相关推荐</view></view>
+						<view class="content hot">
+							<recommend :query-productid="product.productID" v-if="isRequest" ></recommend>
+						</view>
+					</view>
+					<!-- 商品参数 -->
+					<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
+						<view class="tui-popup-box clearfix">
+							<view class="title">商品参数</view>
+						    <cm-parameter :product="product" :goodsData="goodsData" ></cm-parameter>
+							<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
+								<view class="tui-flex-1">
+									<view class="tui-button" @click="hidePopup()">收起</view>
+								</view>
+							</view>
+						</view>
+					</tui-bottom-popup>
+					<!-- 侧边 -->
+					<scroll-top :isScrollTop="isScrollTop" :bottom="200"></scroll-top>
+				</view>
 			</view>
+		</template>
 	</view>
 </template>
 
@@ -164,6 +163,7 @@
 		},
 		data(){
 			return{		
+				productNoneImage:'https://static.caimei365.com/app/img/icon/icon-pnone.png',
 				clickPath:'/search/pages/search/search-second',
 				disabledTabNavList:[{name:'相关推荐'}],
 				mode:'round',
@@ -174,6 +174,7 @@
 				isScrollTop:false,
 				current:0,
 				isShareType:'',
+				isInvalid:false,
 				isHeaderPoduct:false,
 				isNavbarFiexd:false,
 				navbarFiexd:'none',
@@ -184,7 +185,7 @@
 				disabled:false,
 				isNoneDisabled:false,
 				tabCurrentIndex:0,
-				userID:'',
+				userId:'',
 				productID:0,
 				userIdentity:'',//用户类型
 				goodsData:{},//自定义数据
@@ -228,7 +229,7 @@
 		},
 		methods:{
 			initData(){// 初始化商品详情查询
-				this.SecondService.ProductDetail({productId:this.productID}).then(response =>{	
+				this.SecondService.ProductDetail({productId:this.productID,userId:this.userId}).then(response =>{
 					this.skeletonShow = false
 					this.productImage=[];
 					this.shop = response.data.shop
@@ -242,7 +243,9 @@
 					},2000)
 					this.isRequest = true
 				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					console.log(error)
+					this.skeletonShow = false
+					this.isInvalid = true
 				})
 			},
 			swiperChange(e) {//顶部商品图片切换
@@ -364,7 +367,11 @@
 			getWinHeight() {
 				this.winHeight = wx.getSystemInfoSync().windowHeight;
 			},
-			
+			goIndex(){//商城首页
+				uni.switchTab({
+				    url: '/pages/tabBar/home/index'
+				});
+			}
 		},
 		onPullDownRefresh() {
 			setTimeout(() => {
@@ -412,7 +419,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) => {
-				this.userID = resolve.userId ? resolve.userId : '';	
+				this.userId = resolve.userId ? resolve.userId : '';
 				this.userIdentity = resolve.userIdentity ? resolve.userIdentity : 3
 				if (isPreviewImg) {
 					isPreviewImg = false;

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

@@ -100,6 +100,7 @@
 		},
 		data(){
 			return{
+				userId:0,
 				isIphoneX:this.$store.state.isIphoneX,
 				clickPath:'/search/pages/search/search-second',
 				isShowClose:false,
@@ -118,9 +119,7 @@
 						   ],
 			    tabList : [
 							{value:'0',name:'全部'},
-							{value:'1',name:'轻光电'},
-							{value:'2',name:'重光电'},
-							{value:'3',name:'耗材配件'},
+							{value:'1',name:'美容仪器'}
 				   ],
 				pageNum:1,
 				pageSize:10,
@@ -142,8 +141,11 @@
 			}
 		},
 		created() {
-			 this.setScrollHeight();		
-			 this.gettabList();
+			 this.setScrollHeight();	
+			this.$api.getStorage().then((resolve) => {
+				this.userId = resolve.userId ? resolve.userId : '';
+				this.gettabList();
+			})	
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo','isWxAuthorize','identity'])
@@ -206,6 +208,7 @@
 				this.isShowEmpty = false;				
 				if(loadMore) {this.pageNum += 1;}
 				let params = {
+						userId:this.userId,
 						secondHandType:this.currentId,
 						instrumentType:this.currentID2,
 						name:this.name,
@@ -282,7 +285,7 @@
 			}
 		},	
 		onShow() {
-
+				
 		}
 	}
 </script>