ZZ 1 ヶ月 前
コミット
338353344a

+ 24 - 0
mer_uniapp/api/discover.js

@@ -114,6 +114,14 @@ export function noteAddApi(data){
 }
 
 /**
+ * 创建二手交易内容
+ * 
+*/
+export function secondHandAddApi(data){
+  return request.post(`secondHand/add`, data);
+}
+
+/**
  * 编辑逛逛内容
  * 
 */
@@ -122,6 +130,14 @@ export function noteUpdateApi(data){
 }
 
 /**
+ * 编辑二手交易内容
+ * 
+*/
+export function secondHandUpdateApi(data){
+  return request.post(`secondHand/update`, data);
+}
+
+/**
  * 逛逛关注/取关作者
  * 
 */
@@ -162,6 +178,14 @@ export function myNoteApi(data){
 }
 
 /**
+ * 二手交易我的列表
+ * 
+*/
+export function mySecondHandListApi(data){
+  return request.get(`secondHand/my/list`,data);
+}
+
+/**
  * 逛逛内容作者列表
  * 
 */

+ 10 - 0
mer_uniapp/api/product.js

@@ -100,6 +100,16 @@ export function getProductHot(params) {
 		noAuth: true
 	});
 }
+
+/**
+ * 获取二手交易推荐产品
+ * 
+ */
+export function getSecondHandHot(params) {
+	return request.get("secondHand/recommend/list", params, {
+		noAuth: true
+	});
+}
 /**
  * 购物车移入收藏
  * 

+ 10 - 2
mer_uniapp/components/WaterfallsFlow/WaterfallsFlow.vue

@@ -15,7 +15,7 @@
 			<view id="left" v-if="leftList.length">
 				<view v-for="(item,index) in leftList" :key="index" class="wf-item">
 					<discoverFlowItem :items="item" v-if="fromType==1" :fromTo="fromTo" @changeLikeToggle="(item)=>changeLikeToggle(false, index, item)" ></discoverFlowItem>
-					<WaterfallsFlowItem v-else :item="item" :isStore="isStore" :type="type"/>
+					<WaterfallsFlowItem v-else :item="item" :isStore="isStore" :type="type" :isDynamics="isDynamics"  :userFair="userFair"/>
 				</view>
 			</view>
 		</view>
@@ -24,7 +24,7 @@
 			<view id="right" v-if="rightList.length">
 				<view v-for="(item,index) in rightList" :key="index" class="wf-item">
 					<discoverFlowItem :items="item" v-if="fromType==1" :fromTo="fromTo" @changeLikeToggle="(item)=>changeLikeToggle(true, index, item)" ></discoverFlowItem>
-					<WaterfallsFlowItem v-else :item="item" :isStore="isStore" :type="type"/>
+					<WaterfallsFlowItem v-else :item="item" :isStore="isStore" :type="type" :isDynamics="isDynamics"  :userFair="userFair"/>
 				</view>
 			</view>
 		</view>
@@ -91,6 +91,14 @@
 			column: {
 				type: Boolean,
 				default: false
+			},
+			isDynamics: {
+				type: Boolean,
+				default: false
+			},
+			userFair: {
+				type: Boolean,
+				default: false
 			}
 		},
 		data() {

+ 28 - 16
mer_uniapp/components/WaterfallsFlowItem/WaterfallsFlowItem.vue

@@ -1,27 +1,23 @@
 <template>
 	<view class='list acea-row row-between-wrapper' :data-theme="theme">
 		<view class='item' hover-class='none' @click="goDetail(item)">
-			<view class='pictrue'>
+			<view :class="isDynamics ? 'pictruesss' : 'pictrue'">
 				<view v-show="item.stock===0" class="sellOut">已售罄</view>
-				<easy-loadimage :image-src="item.image"></easy-loadimage>
-				<view v-if="item.activityStyle" :style="{ backgroundImage: `url(${item.activityStyle})` }"
-					class="border-picture"></view>
+				<easy-loadimage :image-src="!userFair ? item.image : item.cover" mode="widthFix"></easy-loadimage>
+				<view v-if="item.activityStyle" :style="{ backgroundImage: `url(${item.activityStyle})` }" class="border-picture"></view>
 			</view>
 			<view class='texts'>
 				<view class='names box-line2'>
-					<text v-if="item.productTags && item.productTags.locationLeftTitle.length"
-						class="font-bg-red mr10 bg-color merType">{{item.productTags.locationLeftTitle[0].tagName}}</text>
-					{{item.name}}
+					<text v-if="item.productTags && item.productTags.locationLeftTitle.length" class="font-bg-red mr10 bg-color merType">{{item.productTags.locationLeftTitle[0].tagName}}</text>
+					{{!userFair ? item.name : item.content}}
 				</view>
 				<view class='money mt-10'>
-					<svip-price :svipIconStyle="svipIconStyle" :productPrice="item"
-						:svipPriceStyle="svipPriceStyle"></svip-price>
+					<svip-price :svipIconStyle="svipIconStyle" :productPrice="item" :svipPriceStyle="svipPriceStyle"></svip-price>
 					<view v-if="item.productTags && item.productTags.locationUnderTitle.length">
-						<text
-							v-for="items in item.productTags.locationUnderTitle.length>3?item.productTags.locationUnderTitle.slice(0,3):item.productTags.locationUnderTitle"
-							:key="items.id" class="mr10 tagSolid">{{items.tagName}}</text>
+						<text v-for="items in item.productTags.locationUnderTitle.length>3?item.productTags.locationUnderTitle.slice(0,3):item.productTags.locationUnderTitle"
+						 :key="items.id" class="mr10 tagSolid">{{items.tagName}}</text>
 					</view>
-					<view class="sold mt-8">已售 {{ item.sales }} {{item.unitName}}
+					<view class="sold mt-8" v-if="!userFair">已售 {{ item.sales }} {{item.unitName}}
 					</view>
 				</view>
 				<view class="company mt-4" v-if="item.merName" @click.stop="goStore(item.merId)">
@@ -73,6 +69,14 @@
 			isLogin: {
 				type: Boolean,
 				require: false
+			},
+			isDynamics: {
+				type: Boolean,
+				default: false
+			},
+			userFair: {
+				type: Boolean,
+				default: false
 			}
 		},
 		data() {
@@ -114,7 +118,7 @@
 		methods: {
 			// 去详情页
 			goDetail(item) {
-				goProductDetail(item.id, 0, '');
+				goProductDetail(item.id, 0, '', this.userFair ? JSON.stringify(item) : null);
 			},
 			goStore(id) {
 				uni.navigateTo({
@@ -245,9 +249,17 @@
 
 		margin: 0 !important;
 	}
+
 	.box-line2 {
 		overflow: hidden;
 		height: 80rpx;
-    line-height: 40rpx;
+		line-height: 40rpx;
+	}
+
+	.pictruesss {
+		max-height: 580rpx;
+		overflow-y: hidden;
+		border-radius: 16rpx;
+		position: relative;
 	}
-</style>
+</style>

+ 22 - 5
mer_uniapp/components/base/recommend.vue

@@ -3,7 +3,7 @@
 		<block v-if="tempArr.length">
 			<title-box v-if="isShowTitle" title="热门推荐"></title-box>
 			<view class='recommendList borderPad' :class="isShowTitle?'':'mt30'">
-				<WaterfallsFlow :wfList='tempArr' :type="1" :isStore="1">
+				<WaterfallsFlow :isDynamics="dynamics" :wfList='tempArr' :type="1" :isStore="1">
 					<template slot-scope="{item}">{{item.name}}
 						<WaterfallsFlowItem :item="item" :type="1" :isStore="1"/>
 					</template>
@@ -34,7 +34,8 @@
 	} from "vuex";
 	import animationType from '@/utils/animationType.js'
 	import {
-		getProductHot
+		getProductHot,
+		getSecondHandHot
 	} from '@/api/product.js';
 	import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue';
 	import WaterfallsFlowItem from '@/components/WaterfallsFlowItem/WaterfallsFlowItem.vue';
@@ -74,6 +75,14 @@
 				default: function() {
 					return [];
 				}
+			},
+			dynamics: {
+				type: Boolean,
+				default: false
+			},
+			tabActive: {
+				type: Number,
+				default: 1
 			}
 		},
 		data() {
@@ -118,9 +127,17 @@
 				if (this.goodScroll) return;
 				this.loading = true
 				this.params.cid = this.categoryId;
-				getProductHot(
-					this.params
-				).then((res) => {
+				console.log(this.params, '推荐')
+				if (this.tabActive == 0 && this.dynamics) {
+					this.params.range = 'school'
+				} else if (this.tabActive == 1 && this.dynamics) {
+					this.params.range = 'city'
+					this.params.city = uni.getStorageSync('cityName')
+				} else if (this.tabActive == 2 && this.dynamics) {
+					this.params.range = 'all'
+				}
+				let api = this.dynamics ? getSecondHandHot : getProductHot;
+				api(this.params).then((res) => {
 					this.$set(this.params, 'page', this.params.page + 1);
 					this.goodScroll = this.params.page > res.data.totalPage;
 					this.tempArr = this.tempArr.concat(res.data.list || []);

+ 3 - 3
mer_uniapp/libs/order.js

@@ -41,18 +41,18 @@ export function goOrderDetail(orderNo) {
 /**
  * 去商品详情
  */
-export function goProductDetail(id, marketingType, params) {
+export function goProductDetail(id, marketingType, params, data) {
 	return new Promise(resolve => {
 		// #ifdef MP
 		uni.navigateTo({
-			url: `/pages/goods/goods_details/index?id=${id}&mt=${marketingType}${params}`
+			url: `/pages/goods/goods_details/index?id=${id}&mt=${marketingType}${params}&dataItem=${data}`
 		})
 		// #endif
 		// #ifndef MP
 		uni.navigateTo({
 			animationType: animationType.type,
 			animationDuration: animationType.duration,
-			url: `/pages/goods/goods_details/index?id=${id}&mt=${marketingType}${params}`
+			url: `/pages/goods/goods_details/index?id=${id}&mt=${marketingType}${params}&dataItem=${data}`
 		})
 		// #endif
 	});

+ 28 - 15
mer_uniapp/pages/discover/discover_release/index.vue

@@ -41,7 +41,7 @@
 								<view class="text">添加图片</view>
 							</view>
 
-							<view v-if="image.length === 0 && !formData.video && !fair" class="pictrue acea-row row-center-wrapper row-column add"
+							<view v-if="image.length === 0 && !formData.video" class="pictrue acea-row row-center-wrapper row-column add"
 							 @click="upload('video',1)">
 								<view><text class='iconfont icon-tianjiashipin'></text></view>
 								<view class="text">添加视频</view>
@@ -154,8 +154,11 @@
 	import {
 		noteDetailApi,
 		communityCategoryListApi,
+		getSecondHandInfo,
 		noteUpdateApi,
 		noteAddApi,
+		secondHandAddApi,
+		secondHandUpdateApi,
 		replyPlatformSwitchApi
 	} from '@/api/discover.js';
 	import {
@@ -279,8 +282,9 @@
 			},
 			//分类列表
 			getCommunityCategoryList() {
-				communityCategoryListApi().then(res => {
-					this.categoryList = res.data;
+				let categoryApi = this.fair ? getSecondHandInfo() : communityCategoryListApi();
+				categoryApi.then(res => {
+					this.categoryList = this.fair ? res.data.navigatList : res.data;
 				})
 			},
 			//选择分类
@@ -408,14 +412,17 @@
 			 */
 			formSubmit: Debounce(function(e) {
 				let that = this;
-				// if (that.image.length == 0) return that.$util.Tips({
-				// 	title: '请添加内容图片'
-				// });
-				// if (that.formData.type == 2 && !that.formData.video) {
-				// 	return that.$util.Tips({
-				// 		title: '请添加内容视频'
-				// 	});
-				// }
+				console.log(this.fair)
+				if (this.fair) {
+					if (that.image.length == 0) return that.$util.Tips({
+						title: '请添加内容图片'
+					});
+					if (that.formData.type == 2 && !that.formData.video) {
+						return that.$util.Tips({
+							title: '请添加内容视频'
+						});
+					}
+				}
 				if (!that.formData.categoryId) return that.$util.Tips({
 					title: '请选择内容分类'
 				});
@@ -447,6 +454,7 @@
 
 				this.formData.topicIds = this.discoverTopicList.map(val => val.id).join(',');
 
+				this.formData.city = uni.getStorageSync('cityName')
 
 				// if (!that.formData.cover) return that.$util.Tips({
 				// 	title: '请上传封面图'
@@ -457,15 +465,19 @@
 					title: '保存中',
 					mask: true
 				})
-				that.noteId ? noteUpdateApi(that.formData).then(res => {
+				let addApi = this.fair ? secondHandAddApi : noteAddApi
+				let editApi = this.fair ? secondHandUpdateApi : noteUpdateApi
+				console.log(that.noteId)
+				that.noteId ? editApi(that.formData).then(res => {
 					uni.hideLoading()
 					that.$util.Tips({
 						title: '提交成功',
 						icon: 'success'
 					});
 					setTimeout(function() {
+						let url = that.fair ? '/pages/trade_fair/trade_fair_user/index' : '/pages/discover/discover_user/index'
 						uni.redirectTo({
-							url: '/pages/discover/discover_user/index'
+							url: url
 						})
 					}, 500);
 				}).catch(err => {
@@ -473,15 +485,16 @@
 					return that.$util.Tips({
 						title: err
 					});
-				}) : noteAddApi(that.formData).then(res => {
+				}) : addApi(that.formData).then(res => {
 					that.$util.Tips({
 						title: '提交成功',
 						icon: 'success'
 					});
 					uni.hideLoading()
 					setTimeout(function() {
+						let url = that.fair ? '/pages/trade_fair/trade_fair_user/index' : '/pages/discover/discover_user/index'
 						uni.redirectTo({
-							url: '/pages/discover/discover_user/index'
+							url: url
 						})
 					}, 500);
 				}).catch(err => {

+ 139 - 12
mer_uniapp/pages/goods/goods_details/index.vue

@@ -46,9 +46,32 @@
 						<!-- #ifdef MP || APP-PLUS -->
 						<view class="" :style="'width:100%;' + 'height:' + sysHeight + 'px'"></view>
 						<!-- #endif -->
-						<productConSwiper class="tui-skeleton-rect" :isGroup="marketingType" :imgUrls="sliderImage" :videoline="videoLink"
+						<productConSwiper v-if="!dataItem" class="tui-skeleton-rect" :isGroup="marketingType" :imgUrls="sliderImage" :videoline="videoLink"
 						 :productType="productType" @videoPause="videoPause">
 						</productConSwiper>
+						<view v-if="dataItem">
+							<view class="imageBox">
+								<swiper v-if="dataItem.type ===1 && dataItem.image && dataItem.image.split(',').length>1"
+									:indicator-dots="true" indicator-active-color="#e93323" :circular="true"
+									:interval="interval" :duration="duration" style="height:430px">
+									<block v-for="(item,index) in dataItem.image.split(',')" :key='index'>
+										<swiper-item class="cover">
+											<easy-loadimage mode="heightFix" :image-src="item"
+												style="height:430px"></easy-loadimage>
+										</swiper-item>
+									</block>
+								</swiper>
+								<view
+									v-if="dataItem.type ===2 || (dataItem.type ===1 &&dataItem.image && dataItem.image.split(',').length===1)">
+									<view class="cover" @click="goVideoDetail(dataItem)" style="height:430px">
+										<easy-loadimage mode="heightFix" :image-src="dataItem.cover" style="height:430px"></easy-loadimage>
+										<view v-if="dataItem.type ===2" class="circle">
+											<text class="iconfont icon-24gf-play"></text>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
 						<!-- 秒杀card -->
 						<seckill-card v-if="marketingType === ProductMarketingTypeEnum.Seckill" :seckillStatus="seckillStatus"
 						 :seckillTime="seckillTime" :productInfo="productInfo" :productPrice="productPrice"></seckill-card>
@@ -106,9 +129,8 @@
 										<view class="coupon_more" @click="couponTap">领券<text class="iconfont icon-you"></text>
 										</view>
 									</view>
-									<view class="introduce tui-skeleton-rect line2 mt30">{{
-                    productInfo.name
-                  }}</view>
+									<view class="introduce tui-skeleton-rect line2 mt30" v-if="!dataItem">{{productInfo.name}}</view>
+									<view class="introduce tui-skeleton-rect line2 mt30" v-else>{{dataItem.content}}</view>
 								</view>
 								<view v-if="marketingType !== ProductMarketingTypeEnum.Normal" class="share acea-row row-between row-middle">
 									<view class="introduce tui-skeleton-rect line2 lineWidth">{{ productInfo.name }}
@@ -156,7 +178,7 @@
 										<!-- <view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view> -->
 									</view>
 								</view>
-								<view class="label acea-row row-between-wrapper">
+								<view class="label acea-row row-between-wrapper" v-if="!dataItem">
 									<view class="tui-skeleton-rect" v-if="
                       marketingType === ProductMarketingTypeEnum.Groupbuying
                     ">
@@ -237,7 +259,7 @@
 								</view>
 							</view>
 							<!-- 规格、保障服务 -->
-							<view class="attribute mb20 borRadius14 tui-skeleton-rect">
+							<view class="attribute mb20 borRadius14 tui-skeleton-rect" v-if="!dataItem">
 								<view class="acea-row row-between-wrapper" @click="selecAttr">
 									<view class="line1 text-666">{{ attrTxt }}:
 										<text class="atterTxt text-333">{{ attrValue }}</text>
@@ -321,7 +343,7 @@
 						</view>
 					</block>
 					<!-- 产品详情 -->
-					<view class="product-intro detailText" id="past2">
+					<view class="product-intro detailText" id="past2" v-if="!dataItem">
 						<view class="title">
 							<image src="../static/images/xzuo.png"></image>
 							<span class="sp">产品详情</span>
@@ -914,6 +936,8 @@
 				skuImage: [], //规格小图
 
 				iSshop: 0, //判断是否显示店铺
+				cart: null,
+				dataItem: null
 			};
 		},
 		computed: {
@@ -983,7 +1007,13 @@
 		onLoad(options) {
 			//获取浏览器传来的对象
 			this.options = options;
-			console.log(this.options)
+			if (options.cart) {
+				this.cart = JSON.parse(options.cart) || []
+			}
+			if (options.dataItem) {
+				this.dataItem = JSON.parse(options.dataItem) || null
+				this.productPrice.price = this.dataItem.price;
+			}
 			this.iSshop = this.options.iSshop //判断显示店铺
 			//获取浏览器秒杀状态、秒杀时间
 			if (options.status) this.seckillStatus = Number(options.status); //秒杀状态
@@ -1020,13 +1050,13 @@
 			this.$store.commit("PRODUCT_TYPE", this.marketingType);
 
 			//商品详情
-			this.getGoodsDetails();
+			!this.dataItem ? this.getGoodsDetails() : this.showSkeleton = false;
 			this.indicatorBg = setThemeColor();
 		},
 		onShow() {
 			//校验token是否有效,true为有效,false为无效
 			this.getTokenIsExist();
-			this.getGoodsDetails();
+			!this.dataItem ? this.getGoodsDetails() : this.showSkeleton = false;
 		},
 		onReady() {
 			this.isNodes++;
@@ -1884,13 +1914,36 @@
 							types = "group";
 							break;
 					}
-					onGetPreOrder(types, [{
+					let obj = {
 						attrValueId: parseFloat(this.attr.productSelect.unique),
 						productId: parseFloat(this.id),
 						productNum: parseFloat(this.attr.productSelect.cart_num),
 						groupBuyActivityId: parseFloat(this.groupActivityId),
 						groupBuyRecordId: this.groupRecordId,
-					}, ]);
+					};
+					console.log(this.attr, this.id, this.cart)
+					let arr = []
+					let isProductid = false // 是否同一规格
+					if (this.cart.length) {
+						// const indexOf = this.cart.find(val => val.productid == this.attr.productSelect.unique)
+						this.cart.forEach((item) => {
+							if (this.attr.productSelect.unique == item.productid) {
+								isProductid = true
+								item.number += parseFloat(this.attr.productSelect.cart_num)
+							}
+							arr.push({
+								attrValueId: item.productid, //商品规格属性id(立即购买、活动购买必填)
+								groupBuyActivityId: null, //拼团活动id(拼团下单时必填)
+								groupBuyRecordId: 0, // 拼团记录id,营销类型2=拼团 时必填 0=开团 实际
+								productId: item.id, //商品id
+								productNum: item.number //商品数量
+							})
+						})
+						!isProductid ? arr.push(obj) : ''
+					} else {
+						arr = [obj]
+					}
+					onGetPreOrder(types, arr);
 				}
 				this.isOpen = false;
 			},
@@ -2330,6 +2383,19 @@
 				goProductDetail(this.productInfo.id, 0, "");
 			},
 			videoPause() {},
+			goVideoDetail(noteDetails) {
+				if (noteDetails.type === 2) {
+					uni.navigateTo({
+						//#ifdef APP
+						url: '/pages/discover/discover_video/appVideo/index?noteId=' + noteDetails.id+`&sd=${this.uid}`,
+						//#endif
+						//#ifndef APP
+						url: '/pages/discover/discover_video/routineVideo/index?noteId=' + noteDetails.id+`&sd=${this.uid}`,
+						//#endif
+			
+					});
+				}
+			},
 		},
 	};
 </script>
@@ -3449,4 +3515,65 @@
 	.groupColor {
 		color: #e93323;
 	}
+	
+	.imageBox {
+		width: 702rpx;
+		// height: 702rpx;
+		position: relative;
+	
+		swiper {
+			width: 100%;
+			height: 100%;
+			position: relative;
+		}
+	
+		.cover {
+			width: 702rpx;
+			position: relative;
+			border-radius: 10px 10px 10px 10px;
+	
+			/deep/image,
+			/deep/.easy-loadimage,
+			uni-image {
+				width: 702rpx;
+				border-radius: 10px 10px 10px 10px;
+				overflow: hidden;
+			}
+	
+			.circle {
+				width: 100rpx;
+				height: 100rpx;
+				border-radius: 50%;
+				background: rgba(0, 0, 0, .5);
+				position: absolute;
+				top: 50%;
+				left: 50%;
+				margin-left: -50rpx;
+				margin-top: -50rpx;
+				z-index: 10;
+				line-height: 50px;
+				text-align: center;
+				color: #fff;
+			}
+		}
+	
+		.slide-image {
+			width: 100%;
+			height: 100%;
+			border-radius: 16rpx;
+		}
+	
+		.pages {
+			position: absolute;
+			background-color: #fff;
+			height: 34rpx;
+			padding: 0 10rpx;
+			border-radius: 3rpx;
+			right: 30rpx;
+			bottom: 30rpx;
+			line-height: 34rpx;
+			font-size: 24rpx;
+			color: #050505;
+		}
+	}
 </style>

+ 11 - 2
mer_uniapp/pages/goods/goods_list/index.vue

@@ -251,15 +251,24 @@
 			this.upPng = `${this.urlDomain}crmebimage/presets/up_red.png`;
 			this.merId = options.merId ? Number(options.merId) : 0;
 			this.cateId = options.cateId ? Number(options.cateId) : '';
+			this.fairCateId = Number(options.fairCateId) || ''
 			if (this.cateId) {
 				uni.setNavigationBarTitle({
 					title: '精选商品'
 				});
 			}
+			if (this.fairCateId) {
+				this.merId = 9999999999
+				uni.setNavigationBarTitle({
+					title: '二手交易'
+				});
+			}
 			this.$set(this, 'cid', Number(options.cid) || 0);
 			this.title = options.title || '';
 			this.$set(this, 'keyword', options.searchValue || '');
-			if (this.tabIndex === 1) this.get_product_list();
+			if (this.tabIndex === 1 && !fairCateId) {
+				this.get_product_list();	
+			}
 			switch (this.theme) {
 				case 'theme2':
 					this.upPng = `${this.urlDomain}crmebimage/presets/up_orange.png`;
@@ -490,7 +499,7 @@
 			if (this.tabIndex === 2) {
 				this.getMerStreet();
 			}
-			if (this.productList.length > 0) {
+			if (this.productList.length > 0 && !fairCateId) {
 				this.get_product_list();
 			}
 			if ((this.productList.length == 0 && this.isShow && this.tabIndex === 1 && !this.loading) || (this.merchantList

+ 1 - 2
mer_uniapp/pages/goods/order_confirm/index.vue

@@ -52,8 +52,7 @@
 					<image src='../static/images/line.png'></image>
 				</view>
 			</view>
-			<view v-if="Number(orderInfoVo.secondType)<5 && Number(orderInfoVo.secondType)!==2&&Number(orderInfoVo.type)!=2"
-			 class="allAddress">
+			<view v-if="Number(orderInfoVo.secondType)<5 && Number(orderInfoVo.secondType)!==2&&Number(orderInfoVo.type)!=2" class="allAddress">
 				<view class='address acea-row row-between-wrapper' @tap='onAddress'>
 					<view class='addressCon' v-if="addressInfo.realName">
 						<view class='name'>{{addressInfo.realName}}

+ 1 - 0
mer_uniapp/pages/index/index.vue

@@ -250,6 +250,7 @@
 							const address = res2.result.address; // 完整地址(如北京市海淀区中关村)
 							const province = res2.result.ad_info.province; // 省份
 							const city = res2.result.ad_info.city; // 城市
+							uni.setStorageSync('cityName', city);
 							const recommend = res2.result.address_reference.landmark_l2.title;; // 推荐使用的地址描述,描述精确性较高
 							console.log('地址信息1:', res2);
 							that.userAddress = recommend;

+ 36 - 23
mer_uniapp/pages/merchant/home/index.vue

@@ -96,7 +96,7 @@
 									<!-- 商品 begin -->
 									<!-- <view v-if="!item.goodsList">无商品</view> -->
 									<view class="good" v-for="(good, key) in item.childList" :key="key">
-										<image :src="good.icon" class="image" @tap="getOrderdetils(good)"></image>
+										<image :src="good.icon" class="image" @tap="getOrderdetils(good, item)"></image>
 										<view class="right">
 											<text class="name">{{ good.name }}</text>
 											<view class="tips">
@@ -188,13 +188,13 @@
 							<text style="padding: 10rpx; 20rpx">x</text>
 						</view>
 						<view class="sel-2">
-							<image class="neximg" :src="specifications.icon" />
+							<image class="neximg" :src="good.icon" />
 							<view class="nexbox1">
-								<view class="name" style="font-size: 28rpx;margin-bottom: 19rpx;color: #000000;">{{specifications.name}}</view>
+								<view class="name" style="font-size: 28rpx;margin-bottom: 19rpx;color: #000000;">{{good.name}}</view>
 								<view>
-									<text>销量 {{specifications.sales}}</text>
-									<text style="margin-left: 39rpx;">好评率 {{ specifications.replyChance*100}}%</text>
-									<text style="margin-left: 39rpx;" class="nexbox-txt3">¥ {{specifications.price}}</text>
+									<text>销量 {{good.sales}}</text>
+									<text style="margin-left: 39rpx;">好评率 {{ good.replyChance*100}}%</text>
+									<text style="margin-left: 39rpx;" class="nexbox-txt3">¥ {{good.price}}</text>
 								</view>
 							</view>
 						</view>
@@ -222,17 +222,17 @@
 							<text>数量</text>
 							<!-- 加入购物车 -->
 							<view class="btn-group">
-								<button v-if="!goodCartNum(specifications.props_text)" type="primary" class="btn property_btn bg-color" size="min"
-								 hover-class="none" @tap="handleAddToCart(specificationsList, specifications, 1)">
+								<button v-if="!goodCartNum(good.props_text)" type="primary" class="btn property_btn bg-color" size="min"
+								 hover-class="none" @tap="handleAddToCart(good.category, good, 1)">
 									加入购物车
 								</button>
 								<template v-else>
-									<button type="default" v-show="goodCartNum(specifications.props_text)" plain class="btn reduce_btn" size="mini"
-									 hover-class="none" @tap="handleReduceFromCart(specificationsList, specifications)">
+									<button type="default" v-show="goodCartNum(good.props_text)" plain class="btn reduce_btn" size="mini"
+									 hover-class="none" @tap="handleReduceFromCart(good.category, good)">
 										<view class="iconfont iconsami-select">-</view>
 									</button>
-									<view class="number" v-show="goodCartNum(specifications.props_text)">{{ goodCartNum(specifications.props_text) }}</view>
-									<button type="primary" class="btn add_btn bg-color" size="min" hover-class="none" @tap="handleAddToCart(specificationsList, specifications, 1)">
+									<view class="number" v-show="goodCartNum(good.props_text)">{{ goodCartNum(good.props_text) }}</view>
+									<button type="primary" class="btn add_btn bg-color" size="min" hover-class="none" @tap="handleAddToCart(good.category, good, 1)">
 										<view class="iconfont iconadd-select">+</view>
 									</button>
 								</template>
@@ -360,8 +360,15 @@
 				loadTitle: '加载更多',
 				page: 1,
 				limit: 20,
+				orderdetilsOjb: {}
 			}
 		},
+		onShow() {
+			console.log(this.cart)
+			console.log(this.orderdetilsOjb)
+			uni.getStorageSync()
+			// this.handleAddToCart()
+		},
 		onLoad(options) {
 			let that = this;
 			uni.getSystemInfo({
@@ -407,7 +414,7 @@
 				// this.good
 				return (text) => this.cart.reduce((acc, cur) => {
 					!text ? text = this.getGoodSelectedProps(this.good) : ''
-					if (cur.props_text === text) {
+					if ((cur.props_text + cur.id) === (text + this.good.id)) {
 						return acc += cur.number
 					}
 					return acc
@@ -443,10 +450,14 @@
 				});
 			},
 			// 跳转详情
-			getOrderdetils(item) {
-				console.log(item)
+			getOrderdetils(item, val) {
+				this.orderdetilsOjb = {
+					good: item,
+					category: val
+				}
+				console.log(this.orderdetilsOjb)
 				uni.navigateTo({
-					url: `/pages/goods/goods_details/index?id=${item.id}&mt=0`
+					url: `/pages/goods/goods_details/index?id=${item.id}&mt=0&cart=${JSON.stringify(this.cart)}`
 				})
 
 			},
@@ -603,7 +614,7 @@
 						price: good.price,
 						number: num,
 						icon: good.icon,
-						use_property: good.use_property,
+						use_property: good.use_property || goodText,
 						props_text: this.getGoodSelectedProps(this.good),
 						props: this.getGoodSelectedProps(this.good, 'id'),
 						productid: this.productObj[goodText].id,
@@ -641,7 +652,6 @@
 				}).then(res => {
 					console.log('预下单接口', res)
 					if (res.code == 200) {
-						let cartList = JSON.stringify(this.cart)
 						// uni.setStorageSync('cart', JSON.parse(JSON.stringify(this.cart)))
 						uni.navigateTo({
 							// url: `/pages/goods/order_confirm/index?cartList=${cartList}`
@@ -662,24 +672,26 @@
 			Selectpox(item, itemInfo) {
 				this.specifications = itemInfo //这一项信息
 				this.specificationsList = item //这一项信息
-				// this.good = Object.assign({}, this.good, itemInfo)
+				this.good = {...itemInfo}
+				this.good.category = item
+				let that = this
 				getProductDetail(
 					itemInfo.id,
 					0, 0, ''
 				).then((res) => {
 					console.log('规格', res)
 					if (res.code == 200) {
-						this.good.property = res.data.productAttr.map(item => {
+						that.good.property = res.data.productAttr.map(item => {
 							item.optionList.forEach((items, index) => {
 								index === 0 ? items.is_default = true : '' // 规格默认选中
 							})
 							return { ...item
 							}
 						})
-						console.log(this.good)
+						console.log(that.good)
 						// this.productValue = res.data.productAttr //规格数组
-						this.productObj = res.data.productValue //默认选择的id
-						this.selectble = true
+						that.productObj = res.data.productValue //默认选择的id
+						that.selectble = true
 					}
 				})
 			},
@@ -687,6 +699,7 @@
 			Close() {
 				this.specifications = '' //这一项信息
 				this.specificationsList = [] //这一项信息
+				this.good = {}
 				this.selectble = false
 			},
 			onTabChang(id) {

+ 39 - 6
mer_uniapp/pages/trade_fair/home/index.vue

@@ -48,7 +48,7 @@
 					</swiper>
 				</view>
 				<!-- 话题分类 -->
-				<view class="mb-10 longTab">
+				<view class="mb-10 longTab" v-if="categoryList.length">
 					<swiper :indicator-dots="true" :interval="interval" indicator-active-color="rgba(255, 103, 2, 1)" :current="swperId"
 					 @change="swiperIdChange">
 						<block v-for="item in swperIndex" :key="item">
@@ -57,8 +57,8 @@
 									<block>
 										<view class="flex-wrap flex-y-center pt-30">
 											<view class="flex-col flex-center longTab-item mb-20" style="width: 20%;" v-for="(val, valIndex) in categoryList"
-											 :key="valIndex" v-if="val.swperIndex == item">
-												<image class="w-44 h-44 mb-10" :src="val.icon" mode=""></image>
+											 :key="valIndex" v-if="val.swperIndex == item" @tap="onCategoryClick(val)">
+												<image class="w-44 h-44 mb-10" :src="val.imageUrl" mode=""></image>
 												<view class="wall-font f-s-24 f-w-500">{{val.name}}</view>
 											</view>
 										</view>
@@ -73,7 +73,13 @@
 				<view class='noCommodity h-full'>
 					<!-- <scroll-view scroll-y="true" :show-scrollbar="false" class="scroll-view h-full" refresher-enabled="true"
 					 :refresher-threshold="100" @scrolltolower="onScrollBottom"> -->
-					<recommend ref="recommendIndex" class="mt-40"></recommend>
+					 <view v-if="recommendIndexL == 0">
+						 <view class='pictrue'>
+							<image :src="urlDomain+'crmebimage/presets/noSearch.png'"></image>
+						 </view>
+						 <text class="text-ccc">{{'暂无商品~'}}</text>
+					 </view>
+					<recommend v-show="recommendIndexL" ref="recommendIndex" :tabActive="tabActive" :dynamics="true" class="mt-40" @getRecommendLength="getRecommendLength"></recommend>
 					<!-- </scroll-view> -->
 				</view>
 			</view>
@@ -208,7 +214,7 @@
 				}
 			})
 			// this.getDiscoverList();
-			this.getCommunityCategoryList();
+			// this.getCommunityCategoryList();
 
 			this._freshing = false;
 		},
@@ -295,6 +301,7 @@
 					name: '有图'
 				}],
 				active: 0,
+				recommendIndexL: 0
 			}
 		},
 		// 滚动监听
@@ -379,6 +386,23 @@
 				getSecondHandInfo().then(res => {
 					this.bannerList = res.data.banner
 					this.wallHeadline = res.data.headline
+					let arr = res.data.navigatList
+					let arrs = []
+					let swperIndex = 1;
+					let swperArr = [0];
+					arr.forEach((item, index) => {
+						if ((index + 1) > (swperIndex * 10)) {
+							swperIndex++
+							swperArr.push(swperIndex - 1)
+							item.swperIndex = (swperIndex - 1)
+						} else {
+							item.swperIndex = (swperIndex - 1)
+						}
+						arrs.push({...item})
+					})
+					this.swperIndex = swperArr
+					this.categoryList = arrs
+
 					console.log(res.data, 111111111111111)
 					if (!res.data.school) {
 						this.$refs.schoolRef.open('top')
@@ -770,6 +794,15 @@
 			},
 			onReachBottom() {
 				this.$refs.recommendIndex.get_host_product();
+			},
+			getRecommendLength(val) {
+				this.recommendIndexL = val
+			},
+			onCategoryClick(item) {
+				console.log(item)
+				uni.navigateTo({
+					url: `/pages/goods/goods_list/index?fairCateId=${item.id}&title=${item.name}`
+				})
 			}
 		}
 	}
@@ -817,7 +850,7 @@
 		right: 0;
 		margin-top: -1px;
 	}
-	
+
 	.sys-head {
 		width: 100%;
 		position: fixed;

+ 23 - 18
mer_uniapp/pages/trade_fair/trade_fair_user/index.vue

@@ -79,7 +79,12 @@
 			<view class="tab-conts">
 				<view v-if="list.length > 0" class="goods-wrap flex-1">
 					<view class="goods">
-						<WaterfallsFlow v-if="list.length" :wfList="list" :fromType="1" fromTo="home">
+						<!-- <WaterfallsFlow v-if="list.length" :wfList="list" :fromType="1" fromTo="home">
+						</WaterfallsFlow> -->
+						<WaterfallsFlow :wfList='list' :type="1" :isDynamics="true" :userFair="true">
+							<template slot-scope="{item}">
+								<WaterfallsFlowItem :item="item" :type="1" :isStore="1" />
+							</template>
 						</WaterfallsFlow>
 					</view>
 				</view>
@@ -136,7 +141,7 @@
 		userHomeApi,
 		myHomeApi,
 		authorNoteApi,
-		myNoteApi,
+		mySecondHandListApi,
 		myLikeListApi,
 		editSignatureApi,
 		editSchoolApi
@@ -194,15 +199,15 @@
 			this.id = options.id ? options.id : '';
 		},
 		onShow() {
-			if (this.id) {
-				this.isShow = false
-				this.getUserHome(this.id);
-				this.authorNoteList();
-			} else {
+			// if (this.id) {
+			// 	this.isShow = false
+			// 	this.getUserHome(this.id);
+			// 	this.authorNoteList();
+			// } else {
 				this.isShow = true
 				this.getMyHome();
 				this.myNoteList();
-			}
+			// }
 		},
 		onReady() {},
 		mounted: function() {},
@@ -253,13 +258,13 @@
 					limit: 10
 				}
 				this.list = []
-				if (this.id) {
-					this.getUserHome(this.id);
-					this.authorNoteList();
-				} else {
+				// if (this.id) {
+				// 	this.getUserHome(this.id);
+				// 	this.authorNoteList();
+				// } else {
 					this.getMyHome();
 					this.myNoteList();
-				}
+				// }
 			},
 			//获取我的用户信息
 			getMyHome() {
@@ -336,7 +341,7 @@
 				if (that.loaded || that.loading) return;
 				that.loading = true;
 				that.loadTitle = '';
-				myNoteApi(that.where).then(res => {
+				mySecondHandListApi(that.where).then(res => {
 					let list = res.data.list;
 					let goods = that.$util.SplitArray(list, that.list);
 					that.loaded = list.length < that.where.limit;
@@ -377,15 +382,15 @@
 			}
 		},
 		onReachBottom() {
-			if (this.id) {
-				this.authorNoteList();
-			} else {
+			// if (this.id) {
+			// 	this.authorNoteList();
+			// } else {
 				if (this.tab === 0) {
 					this.myNoteList();
 				} else {
 					this.myLikeList();
 				}
-			}
+			// }
 		},
 		onPullDownRefresh() {},
 		// 滚动监听