ZZ 3 tygodni temu
rodzic
commit
bceb838a69

+ 24 - 0
mer_uniapp/api/order.js

@@ -99,6 +99,14 @@ export function orderExpressPayApi(data) {
 }
 
 /**
+ * 订单支付-二手交易
+ * @param object data
+ */
+export function orderSecondHandPayApi(data) {
+	return request.post('pay/secondHand/payment', data);
+}
+
+/**
  * 订单头部数量
  */
 export function orderNum() {
@@ -140,6 +148,14 @@ export function getExpressOrderDetail(uni) {
 }
 
 /**
+ * 订单详情-快递
+ * @param string uni
+ */
+export function getSecondHandOrderDetail(uni) {
+	return request.get('secondHand/order/detail/' + uni);
+}
+
+/**
  * 再次下单
  * @param string uni
  *
@@ -252,6 +268,14 @@ export function wechatExpressQueryPayResult(data) {
 }
 
 /**
+ * 微信查询支付结果-二手交易
+ * @param object data
+ */
+export function wechatSecondHandQueryPayResult(data) {
+	return request.get(`pay/secondHand/query/wechat/payment/result`,data);
+}
+
+/**
  * 支付宝查询支付结果
  * @param object data
  */

+ 63 - 0
mer_uniapp/api/secondHand.js

@@ -0,0 +1,63 @@
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +----------------------------------------------------------------------
+
+
+import request from "@/utils/request.js";
+
+/**
+ * 订单创建
+ * @param string key
+ * @param object data
+ *
+ */
+export function secondHandOrderCreate(data) {
+	return request.post('secondHand/order/create', data);
+}
+
+/**
+ * 删除已完成订单
+ * @param string orderNo
+ *
+ */
+export function secondHandOrderDel(orderNo) {
+	return request.post(`secondHand/order/delete/${orderNo}`);
+}
+
+/**
+ * 订单列表
+ * @param object data
+ */
+export function getSecondHandOrderList(data) {
+	return request.get('secondHand/order/list', data);
+}
+
+/**
+ * 加载预下单
+ * @param object preOrderNo
+ */
+export function loadPreSecondHandOrderApi(preOrderNo) {
+	return request.get(`secondHand/order/load/pre/${preOrderNo}`);
+}
+
+/**
+ * 获取商户自提信息
+ * @param object preOrderNo
+ */
+export function secondHandTakeTheirApi(secid) {
+	return request.get(`secondHand/get/take/their/${secid}`);
+}
+
+/**
+ * 预下单
+ * @param object data
+ */
+export function preSecondHandOrderApi(data) {
+	return request.post(`secondHand/order/pre/order`, data);
+}

+ 37 - 0
mer_uniapp/components/WaterfallsFlowItem/WaterfallsFlowItem.vue

@@ -6,6 +6,14 @@
 				<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>
+			<!-- 审核状态:0-待审核,1-审核通过,2-审核失败,3-平台关闭 -->
+			<view class="approval_status mt-20" v-if="item.auditStatus != 1 && uid == item.authorId && userFair">
+				<view v-if="item.auditStatus == 2" class="approval_title">审核未通过</view>
+				<view v-if="item.auditStatus == 3" class="approval_title">平台关闭</view>
+				<view v-if="item.auditStatus == 0" class="approval_title">正在审核</view>
+				<text v-if="item.auditStatus == 2 || item.auditStatus == 3" class="approval_info">查看未通过原因</text>
+				<text v-if="item.auditStatus == 0" class="approval_info">通过后将展示在列表</text>
+			</view>
 			<view class='texts'>
 				<view class='names box-line2 flex-between-center'>
 					<text v-if="item.productTags && item.productTags.locationLeftTitle.length" class="font-bg-red mr10 bg-color merType">{{item.productTags.locationLeftTitle[0].tagName}}</text>
@@ -50,12 +58,18 @@
 	} from '@/libs/order.js'
 	import easyLoadimage from '@/components/base/easy-loadimage.vue';
 	import svipPrice from '@/components/svipPrice.vue';
+	import {
+		mapGetters
+	} from "vuex";
 	let app = getApp();
 	export default {
 		components: {
 			easyLoadimage,
 			svipPrice
 		},
+		computed: {
+			...mapGetters(['uid'])
+		},
 		props: {
 			item: {
 				type: Object,
@@ -269,4 +283,27 @@
 		border-radius: 16rpx;
 		position: relative;
 	}
+	.approval_status {
+		// width: 100%;
+		// height: 100%;
+		background: rgba(0, 0, 0, .4);
+		// position: absolute;
+		// top: 0;
+		// left: 0;
+		border-radius: 16rpx;
+		color: #fff;
+		text-align: center;
+		z-index: 5;
+	
+		.approval_title {
+			font-size: 28rpx;
+			// margin-top: 135rpx;
+			font-weight: bold;
+		}
+	
+		.approval_info {
+			font-size: 24rpx;
+			margin-top: 24rpx;
+		}
+	}
 </style>

+ 14 - 2
mer_uniapp/components/base/recommend.vue

@@ -82,7 +82,7 @@
 			},
 			tabActive: {
 				type: Number,
-				default: 1
+				default: 0
 			}
 		},
 		data() {
@@ -127,7 +127,7 @@
 				if (this.goodScroll) return;
 				this.loading = true
 				this.params.cid = this.categoryId;
-				console.log(this.params, '推荐')
+				console.log(this.tabActive, '子组件响应0000000000000000000000')
 				if (this.tabActive == 0 && this.dynamics) {
 					this.params.range = 'school'
 				} else if (this.tabActive == 1 && this.dynamics) {
@@ -137,6 +137,7 @@
 					this.params.range = 'all'
 				}
 				let api = this.dynamics ? getSecondHandHot : getProductHot;
+				console.log(this.params, '推荐')
 				api(this.params).then((res) => {
 					this.$set(this.params, 'page', this.params.page + 1);
 					this.goodScroll = this.params.page > res.data.totalPage;
@@ -146,6 +147,17 @@
 				}).catch(err => {
 					this.loading = false
 				});
+			},
+			initParams(text) {
+				this.params = { //精品推荐分页
+					page: 1,
+					limit: 10,
+					cid: 0,
+					keywords: text || ''
+				};
+				this.tempArr = [];
+				this.goodScroll = false;
+				this.get_host_product()
 			}
 		},
 		onReachBottom() {

+ 22 - 0
mer_uniapp/libs/order.js

@@ -11,6 +11,9 @@
 import {
 	preOrderApi,refundOrderRevokeApi
 } from '@/api/order.js';
+import {
+	preSecondHandOrderApi
+} from '@/api/secondHand.js';
 import util from '@/utils/util'
 import animationType from '@/utils/animationType.js'
 import { ProductMarketingTypeEnum, ProductTypeEnum } from "@/enums/productEnums";
@@ -79,6 +82,25 @@ export function onGetPreOrder(preOrderType, orderDetails) {
 }
 
 /**
+ * 二手交易预下单
+ */
+export function onGetPreSecondHandOrder(orderDetails) {
+	return new Promise((resolve, reject) => {
+		preSecondHandOrderApi({
+			"orderDetails": orderDetails
+		}).then(res => {
+			uni.navigateTo({
+				url: '/pages/goods/order_confirm/index?orderNo=' + res.data.orderNo + '&orderType=secondHand'
+			});
+		}).catch(err => {
+			return util.Tips({
+				title: err
+			});
+		})
+	});
+}
+
+/**
  * 售后,撤销售后申请
  */
 export function onRevokeRefund(refundOrderNo) {

+ 5 - 3
mer_uniapp/mixins/OrderPay.js

@@ -12,7 +12,8 @@ import {
 } from '@/api/activity.js';
 import {
 		orderPayApi,
-		orderExpressPayApi
+		orderExpressPayApi,
+		orderSecondHandPayApi
 	} from '@/api/order.js';
 import {
 		ProductTypeEnum,
@@ -40,7 +41,7 @@ export default {
 			if(fromType==='svip'){
 				goPages = `/pages/goods/order_pay_status/index?order_id=${orderNo}&payType=${payType}&payPrice=${payPrice}&fromType=${fromType}`;
 			}else{
-				if (fromType=='fast') {
+				if (fromType) {
 					goPages = `/pages/goods/order_pay_status/index?order_id=${orderNo}&apiType=${fromType}`;
 				} else {
 					goPages = '/pages/goods/order_pay_status/index?order_id=' + orderNo;
@@ -320,7 +321,8 @@ export default {
 		 * @param {Object} payPrice  支付金额
 		 */
 		changeOrderPay(orderNo, payChannel, payType ,productType, fromType, payPrice) {
-			orderPayApi({
+			let api = fromType == 'fast' ? orderExpressPayApi : fromType == 'secondHand' ? orderSecondHandPayApi : orderPayApi;
+			api({
 				orderNo: orderNo,
 				payChannel: payChannel,
 				payType: payType,

+ 44 - 9
mer_uniapp/pages/confession_wall/home/index.vue

@@ -91,7 +91,7 @@
 				<scroll-view scroll-y="true" @scroll="followScroll" class="main h-full">
 					<view class="tab-cont h-full" id="main">
 						<!-- 发现 -->
-						<view class="h-full" v-if="tabActive === 1">
+						<view class="h-full">
 							<swiper class="h-full" :interval="interval" indicator-color="rgba(255,255,255,0.6)" :current="swiperCurrent"
 							 @change="swiperChange">
 								<block v-for="(item,index) in categoryList" :key="index">
@@ -116,6 +116,46 @@
 													<emptyPage title="暂无内容~" mTop="13%" :imgSrc="urlDomain+'crmebimage/presets/noguanzhu.png'">
 													</emptyPage>
 												</view>
+
+												<view v-if="authorList.length>0 && !loadingfollow" class="author-list mt-24">
+													<title-box title="为你推荐"></title-box>
+													<view v-for="(val, authorIndex) in authorList" :key="authorIndex" class="author-item" @click="goAuthor(val)">
+														<view class="acea-row row-between row-middle mb30">
+															<view class="acea-row row-middle">
+																<view class="author-head">
+																	<image :src="val.authorAvatar"></image>
+																</view>
+																<view class="author-info">
+																	<view class="author-name">{{val.authorName}}</view>
+																	<view v-show="val.authorSignature" class="author-sign line1">
+																		{{val.authorSignature}}
+																	</view>
+																	<view class="author-fans">
+																		粉丝<text class="text-333 ml-8">{{ val.fansNum < 10000 ? val.fansNum : (val.fansNum / 10000).toFixed(2) }}</text>
+																	</view>
+																</view>
+															</view>
+															<view @click.stop="followAuthor(val, authorIndex)" class="author-follow acea-row" :class="val.isConcerned ? 'focusBtn' : ''">
+																<text v-if="!val.isConcerned" class="iconfont icon-shangpinshuliang-jia"></text>
+																{{!val.isConcerned ? '关注' : '已关注'}}
+															</view>
+														</view>
+														<scroll-view scroll-x="true" class="white-nowrap vertical-middle w-full" show-scrollbar="false">
+															<view class="inline-block mr-20" v-for="(items, noteIndex) in val.noteList" :key="noteIndex">
+																<view class="relative">
+																	<easy-loadimage :image-src="items.cover" width="184rpx" height="254rpx" :radius="8"></easy-loadimage>
+																	<view class="discover_video_icon" v-show="items.type == 2">
+																		<text class="iconfont icon-24gf-play"></text>
+																	</view>
+																</view>
+															</view>
+														</scroll-view>
+													</view>
+													<view class='loadingicon acea-row row-center-wrapper'>
+														<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{authorList.length>0?loadTitle:''}}
+													</view>
+												</view>
+
 												<view class="footerBottoms"></view>
 											</view>
 										</scroll-view>
@@ -125,7 +165,7 @@
 						</view>
 
 						<!-- 关注 登录后 -->
-						<view id="goods" v-if="isLogin&&tabActive == 0" class="discover-detail h-full">
+						<!-- <view id="goods" v-if="isLogin&&tabActive == 0" class="discover-detail h-full">
 							<scroll-view scroll-y="true" :show-scrollbar="false" class="scroll-view recommendList h-full" id="recommendList"
 							 @scrolltolower="onTouchmoveRecommend" :refresher-threshold="100" @scroll="followScroll" refresher-enabled="true"
 							 :refresher-triggered="triggered" @refresherrefresh="onRefresh" @refresherpulling="onPulling" @refresherrestore="onRestore"
@@ -145,11 +185,6 @@
 									</view>
 								</view>
 
-								<!-- <discover-details v-if="noteRecommendList.length>0" type="follow"
-									:noteRecommendList="noteRecommendList" @getComment="getComment"
-									@getPro="getPro"></discover-details> -->
-
-								<!-- 为你推荐 -->
 								<view v-if="authorList.length>0 && !loadingfollow" class="author-list mt-24">
 									<title-box title="为你推荐"></title-box>
 									<view v-for="(item, index) in authorList" :key="item.authorId" class="author-item" @click="goAuthor(item)">
@@ -190,7 +225,7 @@
 								</view>
 								<view class="footerBottoms"></view>
 							</scroll-view>
-						</view>
+						</view> -->
 						<!-- 关注未登录 -->
 						<view class="empty-boxs" v-if="!isLogin&&tabActive == 0">
 							<emptyPage title="登录后可查看关注用户的内容哦~" mTop="30%" :imgSrc="urlDomain+'crmebimage/presets/nodenglu.png'"></emptyPage>
@@ -1345,4 +1380,4 @@
 		width: 100%;
 		flex: 1;
 	}
-</style>
+</style>

+ 110 - 2
mer_uniapp/pages/discover/discover_release/index.vue

@@ -2,6 +2,28 @@
 	<view :data-theme="theme" class="discover borderPad">
 		<!-- 表单 -->
 		<form v-if="!topicShow" @submit="formSubmit" report-submit='true'>
+			<navigator url="/pages/address/user_address_list/index" v-if="fair">
+				<view class="allAddress">
+					<view class='address row-between-wrapper flex-between-center'>
+						<view class='addressCon' v-if="addressInfo.realName">
+							<view class='name'>{{addressInfo.realName}}
+								<text class='phone'>{{addressInfo.phone}}</text>
+							</view>
+							<view class="acea-row line2">
+								<text class='default font_color' v-if="addressInfo.isDefault">[默认]</text>
+								<text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{ addressInfo.street}}{{addressInfo.detail}}</text>
+							</view>
+						</view>
+						<view class='addressCon' v-else>
+							<view class='setaddress'>设置收货地址</view>
+						</view>
+						<view class='iconfont icon-jiantou'></view>
+					</view>
+					<view class='line'>
+						<image src='../../goods/static/images/line.png'></image>
+					</view>
+				</view>
+			</navigator>
 			<view class="release_content">
 				<view class="release_item">
 					<view class="title mb30">
@@ -174,6 +196,9 @@
 	import {
 		HTTP_REQUEST_URL
 	} from '@/config/app.js';
+	import {
+		getAddressDefault
+	} from '@/api/user.js';
 	import tuiBottomPopup from "../components/tui-bottom-popup.vue"
 	import associatedProduct from "../components/associatedProduct.vue"
 	import easyLoadimage from '@/components/base/easy-loadimage.vue';
@@ -228,11 +253,15 @@
 				showVideo: false, //预览视频弹窗
 				replyPlatformSwitch: false, //评论总开关状态,true开启,false关闭
 				videoContext: '',
-				fair: false
+				fair: false,
+				addressInfo: {},
 			}
 		},
 		onShow() {
 			this.getReplyPlatformSwitch();
+			uni.$on('addressInfo', function(res) {
+				that.$set(that, 'addressInfo', res);
+			})
 		},
 		mounted() {
 			// #ifndef APP-PLUS
@@ -249,6 +278,12 @@
 			if (this.noteId > 0) this.getDetail();
 			this.getCommunityCategoryList();
 			this.videoContext = uni.createVideoContext("myvideo", this);
+			if (this.fair) {
+				getAddressDefault().then(res => {
+					console.log('地址', res)
+					this.addressInfo = res.data || {}
+				})
+			}
 		},
 		// 滚动监听
 		onPageScroll(e) {
@@ -428,6 +463,7 @@
 			formSubmit: Debounce(function(e) {
 				let that = this;
 				if (this.fair) {
+					this.formData.addressId = this.addressInfo.id
 					if (that.image.length == 0) return that.$util.Tips({
 						title: '请添加内容图片'
 					});
@@ -473,7 +509,8 @@
 				// if (!that.formData.cover) return that.$util.Tips({
 				// 	title: '请上传封面图'
 				// });
-
+				this.formData.latitude = uni.getStorageSync('user_latitude');
+				this.formData.longitude = uni.getStorageSync('user_longitude');
 
 				uni.showLoading({
 					title: '保存中',
@@ -914,4 +951,75 @@
 			height: 500rpx;
 		}
 	}
+	
+	.address {
+		padding: 40rpx 24rpx;
+		background-color: #fff;
+		box-sizing: border-box;
+	}
+
+	.address .addressCon {
+		width: 596rpx;
+		font-size: 26rpx;
+		color: #666;
+	}
+
+	.address .addressCon .name {
+		font-size: 30rpx;
+		color: #282828;
+		font-weight: bold;
+		// margin-bottom: 10rpx;
+	}
+
+	.address .addressCon .name .phone {
+		margin-left: 50rpx;
+	}
+
+	.address .addressCon .default {
+		margin-right: 12rpx;
+	}
+
+	.address .addressCon .setaddress {
+		color: #333;
+		font-size: 28rpx;
+	}
+
+	.address .iconfont {
+		color: #707070;
+	}
+
+	.allAddress {
+		width: 100%;
+		@include index-gradient(theme);
+		padding: 30rpx 24rpx 0 24rpx;
+	}
+
+	.allAddress .address.group {
+		border-radius: 0;
+	}
+
+	.allAddress .address {
+		max-height: 180rpx;
+		margin: -2rpx auto 0 auto;
+		border-radius: 14rpx 14rpx 0 0;
+	}
+
+	.allAddress .line {
+		width: 100%;
+		margin: 0 auto;
+	}
+	
+	.line {
+		width: 100%;
+		height: 3rpx;
+	}
+	
+	.line image {
+		width: 100%;
+		height: 100%;
+		display: block;
+	}
+	.font_color {
+		@include main_color(theme);
+	}
 </style>

+ 2 - 2
mer_uniapp/pages/goods/components/orderGoods/index.vue

@@ -34,9 +34,9 @@
 							</view>
 							<view
 								v-if="(item.deliveryMethod == 1 || !orderInfo.takeTheirSwitch) && !jump && Number(item.productType)==0"
-								class="font-color">不支持到店自提</view>
+								class="font-color">不支持自提</view>
 							<view v-if="item.deliveryMethod == 2 && !jump && Number(item.productType)==0"
-								class="font-color">不支持商家配送</view>
+								class="font-color">不支持配送</view>
 						</view>
 					</view>
 				</view>

+ 114 - 30
mer_uniapp/pages/goods/goods_details/index.vue

@@ -46,23 +46,37 @@
 						<!-- #ifdef MP || APP-PLUS -->
 						<view class="" :style="'width:100%;' + 'height:' + sysHeight + 'px'"></view>
 						<!-- #endif -->
-						<productConSwiper v-if="!dataItem" class="tui-skeleton-rect" :isGroup="marketingType" :imgUrls="sliderImage" :videoline="videoLink"
-						 :productType="productType" @videoPause="videoPause">
+						<productConSwiper v-if="!dataItem" class="tui-skeleton-rect" :isGroup="marketingType" :imgUrls="sliderImage"
+						 :videoline="videoLink" :productType="productType" @videoPause="videoPause">
 						</productConSwiper>
 						<view v-if="dataItem">
+							<!-- 0-待审核,1-审核通过,2-审核失败,3-平台关闭 -->
+							<view v-if="dataItem.auditStatus == 0 || dataItem.auditStatus == 2 || dataItem.auditStatus == 3" class="approval_status">
+								<view class="status_count" :class="dataItem.auditStatus == 0 ? 'status1' : 'status0'">
+									<view class="status_title">
+										<text class="iconfont" :class="(dataItem.auditStatus == 2 || dataItem.auditStatus == 3) ? 'icon-tishi' : 'icon-shijian'"></text>
+										<text v-if="dataItem.auditStatus == 2" class="title">审核未通过,内容仅自己可见</text>
+										<text v-if="dataItem.auditStatus == 3" class="title">平台关闭,内容仅自己可见</text>
+										<text v-if="dataItem.auditStatus == 0" class="title">正在审核,内容仅自己可见</text>
+									</view>
+									<view v-if="dataItem.auditStatus == 2 || dataItem.auditStatus == 3" class="status_info">
+										{{dataItem.refusal}}
+									</view>
+									<view v-if="dataItem.auditStatus == 0" class="status_info">
+										发布的内容审核通过后,将展示在首页!
+									</view>
+								</view>
+							</view>
 							<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">
+								<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>
+											<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 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">
@@ -432,7 +446,13 @@
 									加入购物车
 								</button> -->
 							</form>
-							<form @submit="goBuy" report-submit="true" v-if="isManage == 0">
+							<form @submit="goBuy" report-submit="true" v-if="isManage == 0 && !dataItem">
+								<button style="border-radius: 0;" :class="productInfo.systemFormId == 0 ? 'bnts' : 'longBnts'" class="buy"
+								 form-type="submit">
+									立即购买
+								</button>
+							</form>
+							<form @submit="goSecondHand" report-submit="true" v-if="isManage == 0 && dataItem">
 								<button style="border-radius: 0;" :class="productInfo.systemFormId == 0 ? 'bnts' : 'longBnts'" class="buy"
 								 form-type="submit">
 									立即购买
@@ -649,7 +669,7 @@
 			<view class="manage">
 				<popup-header title="内容管理" @close="closeManage"></popup-header>
 				<navigator hover-class="none" :url="`/pages/discover/discover_release/index?fair=${true}&noteId=${dataItem.id}`"
-					class="items">
+				 class="items">
 					<text>编辑</text>
 				</navigator>
 				<view class="items" @click.stop="deleteTopic(dataItem)">
@@ -750,7 +770,8 @@
 	import activityStyle from "./components/activityStyle.vue";
 	import navBar from '@/components/navBar';
 	import {
-		onGetPreOrder
+		onGetPreOrder,
+		onGetPreSecondHandOrder
 	} from "@/libs/order";
 	import * as filters from "@/filters";
 	import {
@@ -970,7 +991,7 @@
 				skuImage: [], //规格小图
 
 				iSshop: 0, //判断是否显示店铺
-				cart: null,
+				cart: [],
 				dataItem: null,
 				isManage: false
 			};
@@ -1980,6 +2001,20 @@
 				}
 			}),
 			/**
+			 * 二手交易立即购买
+			 */
+			goSecondHand: Debounce(function(e) {
+				if (this.isLogin === false) {
+					toLogin();
+				} else {
+					onGetPreSecondHandOrder([{
+						orderNo: "",
+						productId: this.dataItem.id,
+						productNum: 1
+					}])
+				}
+			}),
+			/**
 			 * 预下单
 			 */
 			getPreOrder: function() {
@@ -2038,7 +2073,7 @@
 								productId: item.id, //商品id
 								productNum: item.number //商品数量
 							})
-						})
+						});
 						!isProductid ? arr.push(obj) : ''
 					} else {
 						arr = [obj]
@@ -2487,12 +2522,12 @@
 				if (noteDetails.type === 2) {
 					uni.navigateTo({
 						//#ifdef APP
-						url: '/pages/discover/discover_video/appVideo/index?noteId=' + noteDetails.id+`&sd=${this.uid}`,
+						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}`,
+						url: '/pages/discover/discover_video/routineVideo/index?noteId=' + noteDetails.id + `&sd=${this.uid}`,
 						//#endif
-			
+
 					});
 				}
 			},
@@ -3615,23 +3650,23 @@
 	.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 {
@@ -3639,7 +3674,7 @@
 				border-radius: 10px 10px 10px 10px;
 				overflow: hidden;
 			}
-	
+
 			.circle {
 				width: 100rpx;
 				height: 100rpx;
@@ -3656,13 +3691,13 @@
 				color: #fff;
 			}
 		}
-	
+
 		.slide-image {
 			width: 100%;
 			height: 100%;
 			border-radius: 16rpx;
 		}
-	
+
 		.pages {
 			position: absolute;
 			background-color: #fff;
@@ -3676,13 +3711,13 @@
 			color: #050505;
 		}
 	}
-	
+
 	.follow_btn {
 		color: #282828 !important;
 		border: 1px solid #282828 !important;
 		line-height: 76rpx;
 	}
-	
+
 	.manage {
 		width: 100%;
 		background: #ffffff;
@@ -3690,7 +3725,7 @@
 		padding: 30rpx 24rpx;
 		z-index: 10;
 		border-radius: 40rpx 40rpx 0 0;
-	
+
 		.items {
 			// border-bottom: 1px solid #EEEEEE;
 			color: #333333;
@@ -3698,18 +3733,67 @@
 			display: flex;
 			justify-content: center;
 			margin-bottom: 64rpx;
-	
+
 			&:last-child {
 				border-bottom: none;
 			}
-	
+
 			.iconfont {
 				margin: 0 16rpx 0;
 			}
 		}
 	}
-	
+
 	.flex-between-center-sc {
 		justify-content: space-between !important;
 	}
+
+	.approval_status {
+		padding: 24rpx 24rpx 0 24rpx;
+
+		.status_count {
+			padding: 26rpx 30rpx 20rpx;
+			border-radius: 10rpx;
+
+			.title {
+				margin-left: 10rpx;
+				font-size: 28rpx;
+				font-weight: bold;
+			}
+
+			&.status0 {
+				background: #FDF3F2;
+
+				.title {
+					color: #E93323;
+				}
+			}
+
+			&.status1 {
+				background: #FFF4EB;
+
+				.title {
+					color: #FC8327;
+				}
+			}
+
+			.iconfont {
+				font-size: 30rpx;
+			}
+
+			.icon-shijian {
+				color: #FC8327;
+			}
+
+			.icon-tishi {
+				color: #E93323;
+			}
+
+			.status_info {
+				font-size: 22rpx;
+				color: #666666;
+				margin: 10rpx 0 0 36rpx;
+			}
+		}
+	}
 </style>

+ 203 - 107
mer_uniapp/pages/goods/order_confirm/index.vue

@@ -52,7 +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="isAddress" class="allAddress">
 				<view class='address acea-row row-between-wrapper' @tap='onAddress'>
 					<view class='addressCon' v-if="addressInfo.realName">
 						<view class='name'>{{addressInfo.realName}}
@@ -99,17 +99,17 @@
 						<view class='item acea-row row-between-wrapper'>
 							<view>配送方式</view>
 							<view v-if="item.deliveryMethodMer.length===3 && item.takeTheirSwitch" class='discount acea-row row-middle'>
-								<text @tap="openShowBox(item,index)">{{item.shippingType === 1 ? '商家配送' : item.shippingType === 2 ? '到店自提' : '骑手配送'}}</text>
+								<text @tap="openShowBox(item,index)">{{item.shippingType === 1 ? '配送' : item.shippingType === 2 ? '自提' : '骑手配送'}}</text>
 
 								<text @tap="openShowBox(item,index)" class='iconfont icon-jiantou'></text>
 							</view>
 							<view v-else class='discount'>
-								{{item.shippingType === 1 ? '商家配送' : item.shippingType === 2 ? '到店自提' : '骑手配送'}}
+								{{item.shippingType === 1 ? '配送' : item.shippingType === 2 ? '自提' : '骑手配送'}}
 							</view>
 						</view>
 						<view v-if="item.shippingType == 2 && item.takeTheirSwitch" class="store-address acea-row">
 							<view>
-								<view class="name phone">{{item.phone}}</view>
+								<view class="name phone">{{orderType == 'secondHand' ? item.sellerName : ''}}{{item.phone}}</view>
 								<view class="name w-480px">{{item.addressDetail}}</view>
 							</view>
 							<view class="map" @click="goMap(item)">
@@ -133,7 +133,7 @@
 						<view v-if='!item.freightFee || item.freightFee == 0' class="noCoupon">免运费</view>
 						<view v-else class='money'>¥{{item.freightFee}}</view>
 					</view>
-					<view v-show="item.svipDiscountPrice != 0&&orderInfoVo.type!=2" class='item acea-row row-between-wrapper'>
+					<view v-show="item.svipDiscountPrice != 0&&orderInfoVo.type!=2 && !orderType" class='item acea-row row-between-wrapper'>
 						<view>会员优惠</view>
 						<view class='money'>-¥{{item.svipDiscountPrice}}</view>
 					</view>
@@ -167,7 +167,7 @@
 						<view>运费:</view>
 						<view class='money'>+¥{{orderInfoVo.freightFee}}</view>
 					</view>
-					<view v-show="orderInfoVo.svipDiscountPrice != 0 &&orderInfoVo.type!=2" class='item acea-row row-between-wrapper'>
+					<view v-show="orderInfoVo.svipDiscountPrice != 0 &&orderInfoVo.type!=2 && !orderType" class='item acea-row row-between-wrapper'>
 						<view>会员优惠</view>
 						<view class='money'>-¥{{orderInfoVo.svipDiscountPrice}}</view>
 					</view>
@@ -210,7 +210,7 @@
 					<PointsPrice v-if="orderInfoVo.secondType === ProductTypeEnum.Integral" :pointsPrice="orderInfoVo"
 					 :pointsGoodsStyle="hotPointsStyle"></PointsPrice>
 					<!-- 其他价格 -->
-					<text v-else class='price_color'>¥{{orderInfoVo.payFee || 0}}</text>
+					<text v-else class='price_color'>¥{{orderInfoVo.payFee || orderInfoVo.proTotalFee || 0}}</text>
 				</view>
 				<view class='settlement' style='z-index:100' @tap="SubOrder">
 					{{secondType === ProductTypeEnum.Integral?"确认兑换":"立即下单"}}
@@ -291,6 +291,11 @@
 		loadPreOrderApi
 	} from '@/api/order.js';
 	import {
+		loadPreSecondHandOrderApi,
+		secondHandTakeTheirApi,
+		secondHandOrderCreate
+	} from '@/api/secondHand.js';
+	import {
 		getAddressDetail,
 		getAddressDefault
 	} from '@/api/user.js';
@@ -355,7 +360,7 @@
 			// 是否可以使用优惠券、积分抵扣。 基础订单/云盘订单,卡密,虚拟,可以使用优惠券、积分抵扣
 			isProductType() {
 				return this.type === ProductMarketingTypeEnum.Normal && this.secondType !== this.ProductTypeEnum
-					.Integral && this.secondType !== this.ProductTypeEnum.Video
+					.Integral && this.secondType !== this.ProductTypeEnum.Video && this.orderType !== 'secondHand'
 			},
 			...mapGetters(['productType', 'isLogin'])
 		},
@@ -463,6 +468,7 @@
 				addressList: [], //地址列表数据
 				orderProNum: 0,
 				orderNo: '', //预下单订单号
+				orderType: '',
 				theme: app.globalData.theme,
 				addressChangeId: 0,
 				isShowBox: false,
@@ -482,7 +488,8 @@
 				orderForm: [], //系统表单配置的数据
 				orderExtend: {}, //提交接口表单的数据
 				productId: '',
-				groupActivityId: ''
+				groupActivityId: '',
+				isAddress: false
 			};
 		},
 		watch: {
@@ -497,10 +504,12 @@
 		},
 		onLoad(options) {
 			this.orderNo = options.orderNo || 0;
+			this.orderType = options.orderType || '';
+			console.log(options)
 			this.addressChangeId = parseInt(options.addressId) || 0;
 			this.is_address = options.is_address ? true : false;
 			if (this.isLogin) {
-				this.getloadPreOrder();
+				this.orderType == 'secondHand' ? this.getSecondHandPreOrder() : this.getloadPreOrder()
 			} else {
 				toLogin();
 			}
@@ -599,12 +608,14 @@
 				this.isShowBox = false;
 			},
 			getTakeTheir(id) {
-				takeTheirApi(id).then(res => {
+				let api = this.orderType == 'secondHand' ? secondHandTakeTheirApi : takeTheirApi
+				api(id).then(res => {
 					this.merchangtInfo = res.data; //商户信息
 					this.$set(this.merchantOrderVoList[this.activeIndex], 'addressDetail', res.data.addressDetail);
 					this.$set(this.merchantOrderVoList[this.activeIndex], 'phone', res.data.phone);
 					this.$set(this.merchantOrderVoList[this.activeIndex], 'latitude', res.data.latitude);
 					this.$set(this.merchantOrderVoList[this.activeIndex], 'longitude', res.data.longitude);
+					console.log(this.merchantOrderVoList[this.activeIndex])
 				}).catch(err => {
 					return this.$util.Tips({
 						title: err
@@ -649,6 +660,55 @@
 			boxClose() {
 				this.isShowBox = false
 			},
+			// 二手交易订单详情
+			getSecondHandPreOrder() {
+				loadPreSecondHandOrderApi(this.orderNo).then(res => {
+					let orderInfoVo = res.data;
+					orderInfoVo.secondType = 0;
+					orderInfoVo.type = 0;
+					this.orderInfoVo = {
+						...orderInfoVo,
+						systemFormValue: orderInfoVo.systemFormValue ? this.$util.objToArr(JSON.parse(
+							orderInfoVo.systemFormValue)) : []
+					};
+
+					console.log(this.orderInfoVo, '11111111111111111111111')
+					this.isAddress = Number(this.orderInfoVo.secondType) < 5 && Number(this.orderInfoVo.secondType) !== 2 && Number(
+						this.orderInfoVo.type) != 2;
+
+					orderInfoVo.merchantInfoList.map(item => {
+						if (item.shippingType == 2) this.isAddress = false;
+						this.orderMerchantRequestList.push({
+							shippingType: item.shippingType,
+							merId: item.merId,
+							remark: '',
+							userCouponId: item.userCouponId
+						})
+						if (item.shippingType === 2) this.getTakeTheir(item.orderInfoList[0].productId)
+						item.addressDetail = this.merchangtInfo.addressDetail;
+						item.phone = this.merchangtInfo.phone;
+						item.latitude = this.merchangtInfo.latitude;
+						item.longitude = this.merchangtInfo.longitude;
+					});
+					this.merchantOrderVoList = orderInfoVo.merchantInfoList; //商户端数据
+					this.type = orderInfoVo.type; //订单类型
+					this.secondType = orderInfoVo.secondType; //订单二级类型:0-普通订单,1-积分订单,2-虚拟订单,4-视频号订单,5-云盘订单,6-卡密订单
+					this.orderProNum = orderInfoVo.orderProNum;
+					// if (orderInfoVo.addressId && this.addressChangeId === 0) {
+					// 	this.addressId = orderInfoVo.addressId;
+					// } else {
+					// 	this.addressId = this.addressChangeId;
+					// 	if (orderInfoVo.addressId != this.addressChangeId && this.addressChangeId > 0)
+					// 		this.computedPrice();
+					// }
+					this.getaddressInfo();
+				}).catch(err => {
+					// console.log(err)
+					uni.navigateTo({
+						url: '/pages/goods/order_list/index'
+					});
+				})
+			},
 			// 订单详情
 			getloadPreOrder: function() {
 				loadPreOrderApi(this.orderNo).then(res => {
@@ -667,11 +727,14 @@
 					};
 
 					console.log(this.orderInfoVo, '0000000000000000000000000000000')
+					this.isAddress = Number(this.orderInfoVo.secondType) < 5 && Number(this.orderInfoVo.secondType) !== 2 && Number(
+						this.orderInfoVo.type) != 2;
 					this.merchantOrderVoList = orderInfoVo.merchantInfoList; //商户端数据
 					this.platCouponFee = orderInfoVo.platCouponFee; //平台优惠券总金额
 					this.platUserCouponId = orderInfoVo.platUserCouponId;
 					this.merCouponFee = orderInfoVo.merCouponFee; //店铺优惠券总金额
 					orderInfoVo.merchantInfoList.map(item => {
+						if (item.shippingType == 2) this.isAddress = false;
 						this.orderMerchantRequestList.push({
 							shippingType: item.shippingType,
 							merId: item.merId,
@@ -697,6 +760,7 @@
 					}
 					this.getaddressInfo();
 				}).catch(err => {
+					// console.log(err)
 					uni.navigateTo({
 						url: '/pages/goods/order_list/index'
 					});
@@ -847,7 +911,8 @@
 				// #endif
 			},
 			onCreate(data) {
-				orderCreate(data).then(res => {
+				const api = this.orderType == 'secondHand' ? secondHandOrderCreate : orderCreate;
+				api(data).then(res => {
 					if (res.data.groupBuyIsFull == 1) {
 						uni.hideLoading();
 						return this.$refs.sh_popup.open('center')
@@ -857,7 +922,7 @@
 						this.changeOrderPay(res.data.orderNo, 'yue', 'yue', 'integral', 'integral', '0')
 					} else {
 						// 其他商品走正常流程,去支付收银台页面
-						this.getToPayment(this.secondType, res.data)
+						this.getToPayment(this.secondType, res.data, this.orderType)
 					}
 
 					uni.hideLoading();
@@ -873,114 +938,145 @@
 				let that = this,
 					data = {};
 				let flag = false;
-				that.orderMerchantRequestList.map(function(v) {
-					if (v.shippingType === 1 && !that.addressId && that.orderInfoVo.secondType !== 2) {
-						flag = true;
-					}
-				});
-				if (flag) {
-					that.$util.Tips({
-						title: '请选择收货地址'
+				if (this.orderType == 'secondHand') {
+					console.log(this.addressInfo)
+					that.orderMerchantRequestList.map(function(v) {
+						if (v.shippingType === 1 && !that.addressInfo.id) {
+							flag = true;
+						}
 					});
-					return;
-				}
+					if (flag) {
+						that.$util.Tips({
+							title: '请选择收货地址'
+						});
+						return;
+					}
 
-				let systemFormValue = Array.from(this.orderInfoVo.systemFormValue)
-				let systemFormData = []
-				for (var i = 0; i < systemFormValue.length; i++) {
-					let curdata = systemFormValue[i]
-					if (['radios'].indexOf(curdata.name) == -1 && (curdata.titleShow.val || (['uploadPicture',
-							'dateranges'
-						].indexOf(curdata.name) == -1 && curdata.value && curdata.value.trim()))) {
-						if ((curdata.name === 'texts' && curdata.valConfig.tabVal == 0) || ['dates', 'times',
-								'selects', 'citys', 'checkboxs'
-							].indexOf(curdata.name) != -1) {
-							if (!curdata.value || (curdata.value && !curdata.value.trim())) {
-								return that.$util.Tips({
-									title: `请填写${curdata.titleConfig.val}`
-								});
+					data = {
+						addressId: this.merchantOrderVoList[this.activeIndex].shippingType == 1 ? this.addressInfo.id : null,
+						orderMerchantRequestList: [
+							{
+								remark: "",
+								sellerId: this.merchantOrderVoList[this.activeIndex].sellerId,
+								shippingType: this.merchantOrderVoList[this.activeIndex].shippingType
 							}
+						],
+						preOrderNo: this.orderNo
+					}
+					uni.showLoading({
+						title: '订单提交中'
+					});
+					that.payment(data);
+				} else {
+					that.orderMerchantRequestList.map(function(v) {
+						if (v.shippingType === 1 && !that.addressId && that.orderInfoVo.secondType !== 2) {
+							flag = true;
 						}
-						if (curdata.name === 'timeranges') {
-							if (!curdata.value) {
-								return that.$util.Tips({
-									title: `请选择${curdata.titleConfig.val}`
-								});
+					});
+					if (flag) {
+						that.$util.Tips({
+							title: '请选择收货地址'
+						});
+						return;
+					}
+
+					let systemFormValue = Array.from(this.orderInfoVo.systemFormValue)
+					let systemFormData = []
+					for (var i = 0; i < systemFormValue.length; i++) {
+						let curdata = systemFormValue[i]
+						if (['radios'].indexOf(curdata.name) == -1 && (curdata.titleShow.val || (['uploadPicture',
+								'dateranges'
+							].indexOf(curdata.name) == -1 && curdata.value && curdata.value.trim()))) {
+							if ((curdata.name === 'texts' && curdata.valConfig.tabVal == 0) || ['dates', 'times',
+									'selects', 'citys', 'checkboxs'
+								].indexOf(curdata.name) != -1) {
+								if (!curdata.value || (curdata.value && !curdata.value.trim())) {
+									return that.$util.Tips({
+										title: `请填写${curdata.titleConfig.val}`
+									});
+								}
 							}
-						}
-						if (curdata.name === 'dateranges') {
-							if (!curdata.value.length) {
-								return that.$util.Tips({
-									title: `请选择${curdata.titleConfig.val}`
-								});
+							if (curdata.name === 'timeranges') {
+								if (!curdata.value) {
+									return that.$util.Tips({
+										title: `请选择${curdata.titleConfig.val}`
+									});
+								}
 							}
-						}
-						if (curdata.name === 'texts' && curdata.valConfig.tabVal == 4) {
-							if (curdata.value <= 0) {
-								return that.$util.Tips({
-									title: `请填写大于0的${curdata.titleConfig.val}`
-								});
+							if (curdata.name === 'dateranges') {
+								if (!curdata.value.length) {
+									return that.$util.Tips({
+										title: `请选择${curdata.titleConfig.val}`
+									});
+								}
 							}
-						}
-						if (curdata.name === 'texts' && curdata.valConfig.tabVal == 3) {
-							if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(curdata.value)) {
-								return that.$util.Tips({
-									title: `请填写正确的${curdata.titleConfig.val}`
-								});
+							if (curdata.name === 'texts' && curdata.valConfig.tabVal == 4) {
+								if (curdata.value <= 0) {
+									return that.$util.Tips({
+										title: `请填写大于0的${curdata.titleConfig.val}`
+									});
+								}
 							}
-						}
-						if (curdata.name === 'texts' && curdata.valConfig.tabVal == 1) {
-							if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(curdata.value)) {
-								return that.$util.Tips({
-									title: `请填写正确的${curdata.titleConfig.val}`
-								});
+							if (curdata.name === 'texts' && curdata.valConfig.tabVal == 3) {
+								if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(curdata.value)) {
+									return that.$util.Tips({
+										title: `请填写正确的${curdata.titleConfig.val}`
+									});
+								}
 							}
-						}
-						if (curdata.name === 'texts' && curdata.valConfig.tabVal == 2) {
-							if (!
-								/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/i
-								.test(curdata.value)) {
-								return that.$util.Tips({
-									title: `请填写正确的${curdata.titleConfig.val}`
-								});
+							if (curdata.name === 'texts' && curdata.valConfig.tabVal == 1) {
+								if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(curdata.value)) {
+									return that.$util.Tips({
+										title: `请填写正确的${curdata.titleConfig.val}`
+									});
+								}
 							}
-						}
-						if (curdata.name === 'uploadPicture') {
-							if (!curdata.value.length) {
-								return that.$util.Tips({
-									title: `请上传${curdata.titleConfig.val}`
-								});
+							if (curdata.name === 'texts' && curdata.valConfig.tabVal == 2) {
+								if (!
+									/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/i
+									.test(curdata.value)) {
+									return that.$util.Tips({
+										title: `请填写正确的${curdata.titleConfig.val}`
+									});
+								}
+							}
+							if (curdata.name === 'uploadPicture') {
+								if (!curdata.value.length) {
+									return that.$util.Tips({
+										title: `请上传${curdata.titleConfig.val}`
+									});
+								}
 							}
 						}
+						this.orderExtend[curdata.key] = curdata.value
+						systemFormData.push({
+							title: curdata.titleConfig.val,
+							value: curdata.value,
+						})
 					}
-					this.orderExtend[curdata.key] = curdata.value
-					systemFormData.push({
-						title: curdata.titleConfig.val,
-						value: curdata.value,
-					})
+					data = {
+						addressId: that.addressId,
+						orderMerchantRequestList: that.orderMerchantRequestList,
+						isUseIntegral: that.isUseIntegral,
+						preOrderNo: that.orderNo,
+						platUserCouponId: this.platUserCouponId,
+						systemFormId: this.orderInfoVo.systemFormId,
+						orderExtend: JSON.stringify(systemFormData)
+
+					};
+					uni.showLoading({
+						title: '订单提交中'
+					});
+					that.payment(data);
+					//// #ifdef MP
+					// openPaySubscribe().then(() => {
+					// 	that.payment(data);
+					// });
+					// // #endif
+					// // #ifndef MP
+					// that.payment(data);
+					// // #endif
 				}
-				data = {
-					addressId: that.addressId,
-					orderMerchantRequestList: that.orderMerchantRequestList,
-					isUseIntegral: that.isUseIntegral,
-					preOrderNo: that.orderNo,
-					platUserCouponId: this.platUserCouponId,
-					systemFormId: this.orderInfoVo.systemFormId,
-					orderExtend: JSON.stringify(systemFormData)
-
-				};
-				uni.showLoading({
-					title: '订单提交中'
-				});
-				that.payment(data);
-				//// #ifdef MP
-				// openPaySubscribe().then(() => {
-				// 	that.payment(data);
-				// });
-				// // #endif
-				// // #ifndef MP
-				// that.payment(data);
-				// // #endif
 			})
 		}
 	}

+ 6 - 4
mer_uniapp/pages/goods/order_pay_status/index.vue

@@ -59,8 +59,10 @@
 	import {
 		getOrderDetail,
 		getExpressOrderDetail,
+		getSecondHandOrderDetail,
 		wechatQueryPayResult,
-		wechatExpressQueryPayResult
+		wechatExpressQueryPayResult,
+		wechatSecondHandQueryPayResult
 	} from '@/api/order.js';
 	import {
 		openOrderSubscribe
@@ -140,7 +142,7 @@
 			},
 			//微信支付查明结果
 			wechatQueryPay(orderType) {
-				const api = this.apiType == 'fast' ? wechatExpressQueryPayResult : wechatQueryPayResult;
+				const api = this.apiType == 'fast' ? wechatExpressQueryPayResult : this.apiType == 'secondHand' ? wechatSecondHandQueryPayResult : wechatQueryPayResult;
 				api({
 					orderType: orderType,
 					orderNo:this.orderNo
@@ -179,8 +181,8 @@
 				uni.showLoading({
 					title: '正在加载中'
 				});
-				const api = that.apiType == 'fast' ? getExpressOrderDetail(that.orderNo) : getOrderDetail(that.orderNo);
-				api.then(res => {
+				const api = that.apiType == 'fast' ? getExpressOrderDetail : that.apiType == 'secondHand' ? getSecondHandOrderDetail : getOrderDetail;
+				api(that.orderNo).then(res => {
 					this.type=res.data.type
 					that.$set(that, 'order_pay_info', res.data);
 					if (res.data.payType === 'weixin') {

+ 5 - 5
mer_uniapp/pages/goods/order_payment/index.vue

@@ -196,11 +196,11 @@
 					});
 				} else {
 					// 订单支付
-					if (this.fromType == 'fast') {
-						this.changeOrderExpressPay(this.orderNo, this.payChannel, this.payType ,this.productType, this.fromType, this.payPrice)
-					} else {
-						this.changeOrderPay(this.orderNo, this.payChannel, this.payType ,this.productType, this.fromType, this.payPrice)
-					}
+					// if (this.fromType == 'fast') {
+						// this.changeOrderExpressPay(this.orderNo, this.payChannel, this.payType ,this.productType, this.fromType, this.payPrice)
+					// } else {
+					this.changeOrderPay(this.orderNo, this.payChannel, this.payType ,this.productType, this.fromType, this.payPrice)
+					// }
 					// orderPayApi({
 					// 	orderNo: this.orderNo,
 					// 	payChannel: this.payChannel,

+ 13 - 8
mer_uniapp/pages/trade_fair/home/index.vue

@@ -19,9 +19,9 @@
 				<!--  #endif -->
 				<view class="discover-navTab acea-row row-middle bg--w111-fff mt-4">
 					<view class="acea-row row-center-wrapper" :style="[textBoxStyle]">
-						<view style="margin-right: 52rpx;" :class="tabActive == 0 ? 'on' : ''" class="nav-item" @click="tabActive=0;rangeStr='school';showCateDrawer = false">本校</view>
-						<view style="margin-right: 52rpx;" :class="tabActive == 1 ? 'on' : ''" class="nav-item pb-10" @click="tabActive=1;rangeStr='city';">同城</view>
-						<view :class="tabActive == 2 ? 'on' : ''" class="nav-item pb-10" @click="tabActive=2;rangeStr='all';">全国</view>
+						<view style="margin-right: 52rpx;" :class="tabActive == 0 ? 'on' : ''" class="nav-item" @click="onTabActiveClick(0, 'school')">本校</view>
+						<view style="margin-right: 52rpx;" :class="tabActive == 1 ? 'on' : ''" class="nav-item pb-10" @click="onTabActiveClick(1, 'city')">同城</view>
+						<view :class="tabActive == 2 ? 'on' : ''" class="nav-item pb-10" @click="onTabActiveClick(2, 'all')">全国</view>
 					</view>
 					<!-- #ifndef MP -->
 					<view style="width: 32rpx;"></view>
@@ -376,11 +376,9 @@
 		},
 		methods: {
 			searchBut () {
-				console.log(this.searchValue)
-				console.log(this.$refs.recommendIndex)
-				this.$refs.recommendIndex.where.page = 1;
-				this.$refs.recommendIndex.tempArr = []
-				this.$refs.recommendIndex.get_host_product();
+				this.$nextTick(() => {
+					this.$refs.recommendIndex.initParams(this.searchValue);
+				})
 			},
 			returns: function() {
 				if (this.returnShow) {
@@ -812,6 +810,13 @@
 				uni.navigateTo({
 					url: `/pages/goods/goods_list/index?fairCateId=${item.id}&title=${item.name}&rangeStr=${this.rangeStr}&tabActive=${this.tabActive}`
 				})
+			},
+			onTabActiveClick(index, text) {
+				if (this.tabActive == index) return
+				this.tabActive = index
+				console.log(this.tabActive, '父组件改变变变变')
+				this.rangeStr = text
+				this.searchBut()
 			}
 		}
 	}