Bladeren bron

新品橱窗、 二手发布

zhengjinyi 3 jaren geleden
bovenliggende
commit
713ad34ce3

+ 1 - 1
components/cm-module/homeIndex/hotFloor.vue

@@ -40,7 +40,7 @@ export default {
 		}
 	},
 	created() {
-		console.log('this.list',this.list)
+		
 	},
 	watch: {
 		list: {

+ 23 - 27
components/cm-module/pageTemplate/templateL.vue

@@ -13,43 +13,46 @@
 				<swiper-item v-for="(product, index) in productList" :key="index">
 					<view
 						class="floor-item ad_04 clearfix"
-						v-for="(pros, idx) in product"
+						v-for="(item, idx) in product"
 						:key="idx"
-						@click.stop="navToDetailPage(pros)"
+						@click.stop="navToDetailPage(item)"
 					>
-						<image class="item-img tui-skeleton-fillet" :src="pros.mainImage" mode="aspectFill"></image>
-						<template-Type :product="pros"></template-Type>
+						<image class="item-img tui-skeleton-fillet" :src="item.image" mode="aspectFill"></image>
+						<template-Type :product="item.product"></template-Type>
+						<view class="floor-item_tag" v-if="item.listType == 2">
+							<text>{{ item.label }}</text>
+						</view>
 						<view class="floor-item-content">
 							<view class="title tui-skeleton-rect">
-								<text class="mclap-tag" v-if="pros.beautyActFlag == '1'">美博会</text>
-								<text class="mclap" :class="pros.beautyActFlag == '1' ? 'indent' : ''"
-									>{{ pros.name }}
+								<text class="mclap-tag" v-if="item.product.beautyActFlag == '1'">美博会</text>
+								<text class="mclap" :class="item.product.beautyActFlag == '1' ? 'indent' : ''"
+									>{{ item.name }}
 								</text>
 							</view>
-							<view class="floor-item-price">
+							<view class="floor-item-price" v-if="item.listType == 1">
 								<template>
-									<template-Tags :product="pros"></template-Tags>
+									<template-Tags :product="item.product"></template-Tags>
 								</template>
 								<view v-if="hasLogin">
-									<template v-if="pros.productCategory == 1">
-										<template-Price  :product="pros"></template-Price>
+									<template v-if="item.product.productCategory == 1">
+										<template-Price  :product="item.product"></template-Price>
 									</template>
 									<template v-else>
-										<view class="price tui-skeleton-rect" v-if="pros.detailTalkFlag == '2'">
+										<view class="price tui-skeleton-rect" v-if="item.product.detailTalkFlag == '2'">
 											<text class="p sm">¥</text> <text class="p big">价格详聊</text>
 										</view>
 										<view class="price tui-skeleton-rect" v-else>
 											<text class="p sm">¥</text>
-											<text class="p big">{{ pros.price | NumFormat }}</text>
+											<text class="p big">{{ item.product.price | NumFormat }}</text>
 										</view>
 									</template>
 								</view>
 								<view v-else class="no-price">
-									<template v-if="pros.productCategory == 1">
+									<template v-if="item.product.productCategory == 1">
 										<view class="p-stars">
 											<text class="p-no">¥</text>
 											<uni-grader
-												:grade="Number(pros.priceGrade)"
+												:grade="Number(item.product.priceGrade)"
 												:margin="14"
 											></uni-grader>
 										</view>
@@ -100,12 +103,6 @@ export default {
 			type: Number
 		}
 	},
-	data() {
-		return {
-			shopId: 0,
-			floorData: {}
-		}
-	},
 	data() {
 		return {
 			shopId: 0,
@@ -123,7 +120,6 @@ export default {
 		}
 	},
 	created() {
-		console.log('this.pageData',this.pageData)
 		this.initData(this.pageData)
 	},
 	computed: {
@@ -146,14 +142,13 @@ export default {
 		async initData(data) {
 			const userInfo = await this.$api.getStorage()
 			this.shopId = userInfo.shopId ? userInfo.shopId : 0
-			this.productCount = data.newfloorlist.length
+			this.productCount = data.floorImageList.length
 			if (this.productCount > 0) {
 				this.productList.splice(0, this.productList.length)
-				for (var i = 0, j = data.newfloorlist.length; i < j; i += this.pageSize) {
-					this.productList.push(data.newfloorlist.slice(i, i + this.pageSize))
+				for (var i = 0, j = data.floorImageList.length; i < j; i += this.pageSize) {
+					this.productList.push(data.floorImageList.slice(i, i + this.pageSize))
 				}
 			}
-			console.log('this.productList',this.productList)
 		},
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理
@@ -349,9 +344,10 @@ export default {
 					display: flex;
 					box-sizing: border-box;
 					.p-no {
+						line-height: 54rpx;
 						font-size: $font-size-28;
 						color: $text-color;
-						display: block;
+						display: inline-block;
 						float: left;
 					}
 					.p-stars {

+ 134 - 68
pages/goods/good-hot.vue

@@ -5,7 +5,7 @@
 			<view class="container-topcontent">
 				<view class="topcontent-image" :style="{ paddingTop: StatusBar + 'px' }">
 					<view class="topcontent-title">
-						采美新品橱窗 <view class="topcontent-title-icon"> <text class="iconfont icon-fanhui"></text> </view>
+						采美新品橱窗 <view class="topcontent-title-icon" @click="haveBack"> <text class="iconfont icon-fanhui"></text> </view>
 					</view>
 				</view>
 				<view class="topcontent-swiper" :style="{ top: StatusBar + 40 + 'px' }">
@@ -22,9 +22,9 @@
 								<swiper-item
 									v-for="(item, index) in topGoodList"
 									:key="index"
-									@click.stop="NavToDetailPage(item)"
+									@click.stop="navToDetailPage(item.productId)"
 								>
-									<view class="swiper-goods-image"> <image :src="item.image" mode="scaleToFill" /> </view>
+									<view class="swiper-goods-image"> <image :src="item.mainImage" mode="scaleToFill" /> </view>
 									<view class="swiper-goods-info">
 										<view class="swiper-goods-name"> {{ item.name }} </view>
 										<view class="swiper-goods-btn"> <view class="btn"> 立即购买 </view> </view>
@@ -79,13 +79,6 @@
 					<!-- </uni-transition> -->
 				</view>
 			</view>
-			<tui-skeleton
-				v-if="skeletonShow"
-				backgroundColor="#fafafa"
-				borderRadius="10rpx"
-				:isLoading="true"
-				:loadingType="5"
-			></tui-skeleton>
 			<!-- 楼层 -->
 			<view class="container-section tui-skeleton">
 				<view class="floor-item-banner ad_01" v-if="appletsBanner">
@@ -124,50 +117,105 @@
 										</view>
 									</template>
 								</view>
-								<view>
-									<template v-if="userIdentity === 4 && vipFlag != 1">
-										<view class="title-none" v-if="pros.priceFlag === 1">
-											<text class="p big">¥未公开价格</text>
-										</view>
-										<view class="title-none" v-if="pros.priceFlag === 2">
-											<text class="p big">¥价格仅会员可见</text>
-										</view>
-										<view
-											class="price tui-skeleton-rect"
-											v-if="pros.priceFlag === 0"
-											:class="PromotionsFormat(pros.promotions) ? 'none' : ''"
+								<view v-if="hasLogin" class="list-price">
+									<template v-if="userIdentity == 1">
+										<text
+											class="price-larger"
+											:class="
+												PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+													? 'none'
+													: ''
+											"
 										>
-											<text class="p sm">¥</text>
-											<text class="p big">
-												{{
-													(PromotionsFormat(pros.promotions) ? pros.originalPrice : pros.price)
-														| NumFormat
-												}}
-											</text>
-										</view>
+											¥{{
+												(PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+													? pros.originalPrice
+													: pros.price) | NumFormat
+											}}
+										</text>
 									</template>
-									<template v-else>
-										<view class="title-none" v-if="pros.priceFlag === 1">
-											<text class="p big">¥未公开价格</text>
+									<template v-if="userIdentity == 4 && vipFlag != 1">
+										<view class="price-larger" v-if="pros.priceFlag == 1">
+											<text class="txt">¥未公开价格</text>
+										</view>
+										<view class="price-larger" v-if="pros.priceFlag == 2">
+											<text class="txt">¥价格仅会员可见</text>
+										</view>
+										<view class="price-larger" v-else-if="pros.priceFlag == 3">
+											<text class="txt">¥仅医美机构可见</text>
 										</view>
-										<view
-											class="price tui-skeleton-rect"
+										<text
 											v-else
+											class="price-larger"
 											:class="
-												PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1 ? 'none' : ''
+												PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+													? 'none'
+													: ''
 											"
 										>
-											<text class="p sm">¥</text>
-											<text class="p big">
-												{{
+											¥{{
+												(PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+													? pros.originalPrice
+													: pros.price) | NumFormat
+											}}
+										</text>
+									</template>
+									<template v-if="userIdentity == 3">
+										<template v-if="pros.shopId === shopId">
+											<view class="price-larger" v-if="pros.priceFlag == 1">
+												<text class="txt">¥未公开价格</text>
+											</view>
+											<text
+												v-else
+												class="price-larger"
+												:class="
+													PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+														? 'none'
+														: ''
+												"
+											>
+												¥{{
 													(PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
 														? pros.originalPrice
 														: pros.price) | NumFormat
 												}}
 											</text>
+										</template>
+										<template v-else>
+											<view class="list-login-now">
+												<text class="p-no">¥</text>
+												<uni-grader :grade="Number(pros.priceGrade)"></uni-grader>
+											</view>
+										</template>
+									</template>
+									<template v-if="userIdentity == 2 || (userIdentity == 4 && vipFlag == 1)">
+										<view class="price-larger" v-if="pros.priceFlag == 1">
+											<text class="txt">¥未公开价格</text>
 										</view>
+										<view class="price-larger" v-if="pros.priceFlag == 3 && (firstClubType!=1)">
+											<text class="txt">¥仅医美机构可见</text>
+										</view>
+										<text
+											v-else
+											class="price-larger"
+											:class="
+												PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+													? 'none'
+													: ''
+											"
+										>
+											¥{{
+												(PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+													? pros.originalPrice
+													: pros.price) | NumFormat
+											}}
+										</text>
 									</template>
 								</view>
+								<view v-else class="list-login-now">
+									<text class="p-no">¥</text>
+									<uni-grader :grade="Number(pros.priceGrade)"></uni-grader>
+								</view>
 							</view>
 						</view>
 					</view>
@@ -183,7 +231,11 @@
 
 <script>
 import { mapState, mapMutations } from 'vuex'
+import uniGrader from '@/components/uni-grade/uni-grade.vue'
 export default {
+	components: {
+		uniGrader
+	},
 	data() {
 		return {
 			StatusBar: this.StatusBar,
@@ -199,7 +251,8 @@ export default {
 			current: 0,
 			appletsBanner: '',
 			listQuery: {
-				userId: 0,
+				userId:0,
+				brandID:'',
 				pageSize: 10,
 				pageNum: 1
 			},
@@ -212,7 +265,6 @@ export default {
 		}
 	},
 	onLoad(option) {
-		this.listQuery.couponId = option.couponId
 		this.initGetStotage()
 	},
 	filters: {
@@ -341,13 +393,13 @@ export default {
 			this.isAllcheckedBrand = false
 			this.checkedBrandLength = this.checkedBrandList.length
 			console.log('checkedBrandList', this.checkedBrandList)
-			this.listQuery.brandIds = this.checkedBrandList.join(',')
-			console.log('this.listQuery.brandIds', this.listQuery.brandIds)
+			this.listQuery.brandID = this.checkedBrandList.join(',')
+			console.log('this.listQuery.brandID', this.listQuery.brandID)
 		},
 		choiceBrandAll() {
 			// 点击选择全部品牌
 			this.isAllcheckedBrand = true
-			this.listQuery.brandIds = ''
+			this.listQuery.brandID = ''
 			this.brandList.forEach(el => {
 				el.isChecked = false
 			})
@@ -355,22 +407,17 @@ export default {
 		showDropShow() {
 			this.dropShow = !this.dropShow
 		},
-		reset() {
-			let arr = this.proDropData
-			for (let item of arr) {
-				item.selected = false
-			}
-			this.proDropData = arr
-		},
 		btnCloseDrop() {
-			this.scrollTop = 1
-			this.$nextTick(() => {
-				this.scrollTop = 0
-			})
 			this.dropShow = false
-			this.proDropIndex = -1
-			this.reset()
-		}
+			this.productList = []
+			this.listQuery.pageNum = 1
+			this.GetHomeNewFloorList()
+		},
+		haveBack(){
+			uni.navigateBack({
+				delta: 1
+			})
+		},
 	},
 	onPullDownRefresh() {
 		setTimeout(() => {
@@ -842,18 +889,37 @@ page {
 				top: 0;
 			}
 		}
-		.price {
+		.list-price {
 			color: #ff2a2a;
-			line-height: 54rpx;
-			&.none {
-				text-decoration: line-through;
-				color: #999999;
-			}
-			.sm {
-				font-size: $font-size-24;
+			height: 44rpx;
+			float: left;
+			.list-login-now{
+				line-height: 44rpx;
+				.p-no{
+					height: 44rpx;
+					line-height: 44rpx;
+					display: inline-block;
+					float: left;
+				}
 			}
-			.big {
-				font-size: $font-size-28;
+			.price-larger {
+				width: 100%;
+				height: 44rpx;
+				font-size: 32rpx;
+				&.none {
+					text-decoration: line-through;
+					color: #999999;
+				}
+				&.small {
+					font-size: $font-size-24;
+				}
+				.txt {
+					font-size: $font-size-24;
+					display: inline-block;
+					line-height: 44rpx;
+					text-align: left;
+					float: left;
+				}
 			}
 		}
 	}

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

@@ -315,7 +315,7 @@
 					{name:'医美',value:1},
 					{name:'非医美',value:3},
 				],
-				GoodsImagesList:['https://img.caimei365.com/group1/M00/04/0A/rB-lGGJ0lfeAYI29AAFbP2cQhCY71.jpeg'],
+				GoodsImagesList:[],
 				secondParams:{
 					publishIdentity:1, // 发布者身份 1 个人身份 2 公司身份
 					secondHandType:'',//一级分类

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

@@ -315,7 +315,7 @@
 					{name:'医美',value:1},
 					{name:'非医美',value:3},
 				],
-				GoodsImagesList:['https://img.caimei365.com/group1/M00/04/0A/rB-lGGJ0lfeAYI29AAFbP2cQhCY71.jpeg'],
+				GoodsImagesList:[],
 				secondParams:{
 					publishIdentity:1, // 发布者身份 1 个人身份 2 公司身份
 					secondHandType:'',//一级分类

+ 32 - 3
pages/supplier/user/my-product.vue

@@ -38,7 +38,7 @@
 											<view class="tui-goods-price">¥{{item.price | NumFormat}}</view>
 										</view>
 										<view class="tui-goods-pip">市场价:¥{{item.normalPrice | NumFormat}}</view>
-										<view class="tui-goods-pip">新品展示:¥{{item.normalPrice | NumFormat}}</view>
+										<view class="tui-goods-pip">新品展示: <text class="red">{{ item.newvalidFlag | newvalidFlagFilters }}</text>	</view>
 										<view class="tui-goods-pip">分类:{{ item.typeName ? item.typeName : '无' }}</view>
 									</view>
 									<view class="tui-goods-status">
@@ -112,7 +112,7 @@
 				<view class="d-label">新品展示:</view>
 				<view class="d-input">
 					<picker @change="bindPickerChange(6,$event)" :value="index" :range="newFlagActions" range-key="name">
-						<input class="input" type="text" disabled="false" v-model="validFlagText" value="" placeholder="请选择"/>
+						<input class="input" type="text" disabled="false" v-model="newvalidFlagText" value="" placeholder="请选择"/>
 						<text class="iconfont icon-xiangyou"></text>
 					</picker>
 				</view>
@@ -146,6 +146,7 @@
 			productCode:'',//货号
 			name:'',//商品名称
 			validFlag:'',//状态
+			newvalidFlag:'',//新品展示状态
 			featuredFlag:'',//是否主推
 			commodityType:'',//商品属性
 			bigTypeId:0,//一级
@@ -164,13 +165,21 @@
 				isProductChecked:false,
 				validFlagText:'',
 				featuredFlagText:'',
+				newvalidFlagText:'',
 				commodityTypeText:'产品',//预览商品属性
 				firstClassificationText:'',
 				twoClassificationText:'',
 				threeClassificationText:'',
 				recommendActions: [{name:'是',value:1},{name: '否',value:0}],
 				commodityTypeActons: [{name:'产品',value:1},{name: '仪器',value:2}],
-				newFlagActions: [{name:'全部',value:''},{name:'参与',value:1},{name: '不参与',value:2}],
+				newFlagActions: [
+					{name:'全部',value:''},
+					{name:'参与',value:0},
+					{name: '已展示',value:1},
+					{name: '未参与',value:2},
+					{name: '审核未通过',value:3},
+					{name: '已下线',value:4}
+				],
 				statusActions: [
 					{name:'全部',value:''},
 					{name: '未审核',value:1},
@@ -253,6 +262,17 @@
 				})
 				return stateText
 			},
+			newvalidFlagFilters(value) {
+				//新品展示状态
+				const map = {
+					0: '参与',
+					1: '已展示',
+					2: '未参与',
+					3: '审核未通过',
+					4: '已下线'
+				}
+				return map[value]
+			}
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
@@ -348,6 +368,7 @@
 				this.listQuery.shopId = this.shopId
 				this.validFlagText=''
 				this.featuredFlagText=''
+				this.newvalidFlagText=''
 				this.commodityTypeText=''
 				this.firstClassificationText=''
 				this.twoClassificationText=''
@@ -525,6 +546,11 @@
 						this.threeClassificationText = this.classificationThreeList[e.target.value].name
 						this.listQuery.tinyTypeId = this.classificationThreeList[e.target.value].value
 						break
+					case 6:
+						this.newvalidFlagText = this.newFlagActions[e.target.value].name
+						this.listQuery.newvalidFlag = this.newFlagActions[e.target.value].value
+						break
+						
 				}
 			},
 			GetPrimaryClassification(value){//获取筛选条件一级分类
@@ -1078,6 +1104,9 @@
 		font-size: 24rpx;
 		color: #999;
 		line-height: 44rpx;
+		.red{
+			color: #FF201F;
+		}
 	}
 	.tui-goods-ediet{
 		width: 60rpx;