Administrator 5 роки тому
батько
коміт
d85905fb38

+ 1 - 1
components/cm-module/listTemplate/secondHand.vue

@@ -55,7 +55,7 @@
 		<view class="product-container" v-else >
 			<view :class="tabIndex"  :style="{paddingTop:searchStatus?'160rpx':''}">
 				<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="listData.length > 0">
-					<view v-for="(item,index) in listData" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.pid)"  >
+					<view v-for="(item,index) in listData" :key="index" :id="item.id" :productid="item.productID" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productID)"  >
 					    <image mode='widthFix' :src="item.mainImage"  class="list-img" alt="list-img"></image>
 						<view class="list-details-info">
 							<view class="list-details-title"> 

+ 4 - 2
components/cm-module/productDetails/recommend.vue

@@ -51,13 +51,15 @@
 			}
 		},
 		created() {
+				
 			this.productID = this.queryProductid
 			this.infoRecommend(this.queryProductid)
 		},
 		methods:{
 			infoRecommend(id){
-				queryRelevant({productID:id}).then(response =>{
-					// console.log(response)
+				
+				this.SellerService.ProductRecommend({productId:5232}).then(response =>{
+					console.log(response)
 					if( response.data && response.data.length > 0){
 						this.isEmpty = false
 						for (var i = 0, j = response.data.length; i < j; i += this.pageSize) {

+ 19 - 13
components/cm-module/productDetails/second-attributes.vue

@@ -3,20 +3,20 @@
 	<view class="cm-attributes">
 		<view class="wrap-info">
 			<view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''">
-				<view class="info-viewL tui-skeleton-fillet">分类:<text>{{product.brandName == null? '其他' : product.brandName}}</text></view>
-				<view class="info-viewR tui-skeleton-fillet">数量:<text>{{product.unit}}</text></view>		
+				<view class="info-viewL tui-skeleton-fillet">品牌:<text>{{product.brandName}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet">分类:<text>{{product.typeStr}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet">出厂日期:<text>{{product.fixedYears}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet">商品成色:<text>{{product.productQuality}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet">联系人:<text>{{product.contactName}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet">联系方式:<text>{{product.contactMobile}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet">商品类型:<text v-if="product.productType==1">医美</text><text v-else>非医美</text></view>
+				<view class="info-viewL tui-skeleton-fillet">所在地:<text>{{product.provinceCityDistrict}}</text></view>
 			</view>
-			<view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''" v-if="product.productCode!=''&&product.productCode!=null">
-				<view class="info-viewL tui-skeleton-fillet">商品成色:<text>{{product.productCode}}</text></view>
-				<view class="info-viewR tui-skeleton-fillet">出厂日期:<text>{{product.stock}}</text></view>
-			</view>
-			<view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''" v-if="product.productCode!=''&&product.productCode!=null">
-				<view class="info-viewL tui-skeleton-fillet">商品类型:<text>{{product.productCode}}</text></view>
-				<view class="info-viewR tui-skeleton-fillet">所在地:<text>{{product.stock}}</text></view>
-			</view>
-			<view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''" v-if="product.productCode!=''&&product.productCode!=null">
-				<view class="info-viewL tui-skeleton-fillet">联系人:<text>{{product.productCode}}</text></view>
-				<view class="info-viewR tui-skeleton-fillet">联系方式:<text>{{product.stock}}</text></view>
+			<view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''" v-if="product.secondHandType==2">
+				<view class="info-viewL tui-skeleton-fillet">市场价:<text>{{product.normalPriceStr}}</text></view>	
+			    <view class="info-viewL tui-skeleton-fillet">采购价/原价:<text>{{product.originalPriceStr}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet">产品到期日:<text>{{product.maturityYears}}</text></view>	
+				<view class="info-viewL tui-skeleton-fillet">库存:<text>{{product.stock}}</text></view>	
 			</view>
 		</view>
 	</view>
@@ -56,6 +56,12 @@
 	padding: 20rpx 24rpx 0 24rpx;
 	border-bottom: 1px solid #F8F8F8	
 	}
+	.tui-skeleton-fillet{
+	color:#999999 ;
+	}
+	.tui-skeleton-fillet text{
+	color: #333333;
+	}
 </style>
 
 

+ 1 - 1
components/cm-module/productDetails/second-price.vue

@@ -5,7 +5,7 @@
 			<view class="wrap-main-price">
 				<view class="p-price tui-skeleton-fillet">
 					<text class="txt sm">¥</text>
-					<text class="txt big">{{retailPrice}}</text>
+					<text class="txt big">{{product.price1Str}}</text>
 					<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
 				</view>
 			</view>	

+ 8 - 0
components/cm-module/productDetails/secondDeatail.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 7 - 10
pages/goods/secondProduct.vue

@@ -180,10 +180,11 @@
 		},
 		methods:{
 			initData(){// 初始化商品详情查询
-				queryProductDetils({userId:this.userID,productID:this.productID}).then(response =>{	
+			this.SellerService.ProductDetail({productId:this.productID}).then(response =>{	
+					console.log(response)
 					this.skeletonShow = false
-					this.productImage=[];
-					this.shop = response.data.shop
+					this.productImage = response.data.imageList
+					this.shop = response.data
 					this.product = response.data
 					this.ladderPriceFlag = this.product.ladderPriceFlag;
 					this.html = this.product.productDetail == null ? this.html : this.$api.adaptRichTextImg(this.product.productDetail.detailInfo)
@@ -191,10 +192,6 @@
 					this.buyRetailPriceStep = this.product.step
 					this.number = this.product.minBuyNumber
 					this.minBuyNumber = this.product.minBuyNumber
-					//处理商品图片列表
-					this.product.imageList.forEach(item =>{
-						this.productImage.push(item.image);
-					})
 					//购物车数量
 					this.goodsData.cartCount = this.product.productCount
 					//处理阶梯价格
@@ -259,13 +256,13 @@
 			tabClick(index) {//商品详情&&供应商信息tab切换
 				this.tabCurrentIndex = index;
 				switch(this.tabCurrentIndex){
-					case 1:
+					case 0:
 						this.isRarameter = true
 						break;
-					case 2:
+					case 1:
 						this.isService = true
 						break;
-					case 3:
+					case 2:
 						this.isRecommend = true
 						break;
 				}

+ 6 - 0
services/sellse.service.js

@@ -25,4 +25,10 @@ export default class SellerService {
 	GetSettlementBySencondProduct (data = {}) {
 		return this.AjaxService.post({ url:'/seller/settlementBySencondProduct', data, isLoading: true })
 	}
+	ProductDetail (data={}){//商品详情
+		return this.AjaxService.get({ url:'/product/getSecondHandProductDetail', data, isLoading: true })
+	}
+	ProductRecommend (data={}){//相关推荐
+		return this.AjaxService.get({ url:'/product/getSecondHandProductRecommend', data, isLoading: true })
+	}
 }