ZZ 1 月之前
父節點
當前提交
0acb0a33d3

+ 16 - 0
mer_uniapp/api/fastMail.js

@@ -30,6 +30,14 @@ export function preExpressApi(data) {
 }
 }
 
 
 /**
 /**
+ * 订单列表
+ * @param object preExpressNo
+ */
+export function getExpressOrderList(data) {
+	return request.get(`express/order/list`, data);
+}
+
+/**
  * 加载预下单
  * 加载预下单
  * @param object preExpressNo
  * @param object preExpressNo
  */
  */
@@ -38,6 +46,14 @@ export function loadPreExpressApi(preExpressNo) {
 }
 }
 
 
 /**
 /**
+ * 预下单删除
+ * @param object preOrderNo
+ */
+export function loadPreExpressDelApi(preOrderNo, data) {
+	return request.post(`express/order/pre/del/${preOrderNo}`, data);
+}
+
+/**
  * 获取规格列表
  * 获取规格列表
  */
  */
 export function getExpressSpce() {
 export function getExpressSpce() {

+ 24 - 0
mer_uniapp/api/order.js

@@ -91,6 +91,14 @@ export function orderPayApi(data) {
 }
 }
 
 
 /**
 /**
+ * 订单支付-快递
+ * @param object data
+ */
+export function orderExpressPayApi(data) {
+	return request.post('pay/express/payment', data);
+}
+
+/**
  * 订单头部数量
  * 订单头部数量
  */
  */
 export function orderNum() {
 export function orderNum() {
@@ -124,6 +132,14 @@ export function getOrderDetail(uni) {
 }
 }
 
 
 /**
 /**
+ * 订单详情-快递
+ * @param string uni
+ */
+export function getExpressOrderDetail(uni) {
+	return request.get('express/order/detail/' + uni);
+}
+
+/**
  * 再次下单
  * 再次下单
  * @param string uni
  * @param string uni
  *
  *
@@ -228,6 +244,14 @@ export function wechatQueryPayResult(data) {
 }
 }
 
 
 /**
 /**
+ * 微信查询支付结果-快递
+ * @param object data
+ */
+export function wechatExpressQueryPayResult(data) {
+	return request.get(`pay/express/query/wechat/payment/result`,data);
+}
+
+/**
  * 支付宝查询支付结果
  * 支付宝查询支付结果
  * @param object data
  * @param object data
  */
  */

+ 36 - 4
mer_uniapp/mixins/OrderPay.js

@@ -11,7 +11,8 @@ import {
 	svipOrderCreateApi
 	svipOrderCreateApi
 } from '@/api/activity.js';
 } from '@/api/activity.js';
 import {
 import {
-		orderPayApi
+		orderPayApi,
+		orderExpressPayApi
 	} from '@/api/order.js';
 	} from '@/api/order.js';
 import {
 import {
 		ProductTypeEnum,
 		ProductTypeEnum,
@@ -39,7 +40,11 @@ export default {
 			if(fromType==='svip'){
 			if(fromType==='svip'){
 				goPages = `/pages/goods/order_pay_status/index?order_id=${orderNo}&payType=${payType}&payPrice=${payPrice}&fromType=${fromType}`;
 				goPages = `/pages/goods/order_pay_status/index?order_id=${orderNo}&payType=${payType}&payPrice=${payPrice}&fromType=${fromType}`;
 			}else{
 			}else{
-				goPages = '/pages/goods/order_pay_status/index?order_id=' + orderNo;
+				if (fromType=='fast') {
+					goPages = `/pages/goods/order_pay_status/index?order_id=${orderNo}&apiType=${fromType}`;
+				} else {
+					goPages = '/pages/goods/order_pay_status/index?order_id=' + orderNo;
+				}
 			}
 			}
 			switch (res.data.payType) {
 			switch (res.data.payType) {
 				
 				
@@ -292,8 +297,8 @@ export default {
 		 * @param {Object} secondType 二级订单类型
 		 * @param {Object} secondType 二级订单类型
 		 * @param {data} res 订单对象
 		 * @param {data} res 订单对象
 		 */
 		 */
-		getToPayment(secondType,data) {
-			let url = `/pages/goods/order_payment/index?orderNo=${data.orderNo}&payPrice=${data.payPrice}`
+		getToPayment(secondType,data,fromType) {
+			let url = `/pages/goods/order_payment/index?orderNo=${data.orderNo}&payPrice=${data.payPrice}&fromType=${fromType}`
 			// let url = ''
 			// let url = ''
 			// if(secondType === this.ProductTypeEnum.Integral){
 			// if(secondType === this.ProductTypeEnum.Integral){
 			// 	url = `/pages/goods/order_payment/index?orderNo=${data.orderNo}&payPrice=${data.payPrice}&fromType=integral`
 			// 	url = `/pages/goods/order_payment/index?orderNo=${data.orderNo}&payPrice=${data.payPrice}&fromType=integral`
@@ -330,6 +335,33 @@ export default {
 					title: err
 					title: err
 				});
 				});
 			});
 			});
+		},
+		
+		/**
+		 * 订单支付
+		 * @param {Object} orderNo 订单号
+		 * @param {Object} payChannel  支付渠道
+		 * @param {Object} payType 支付方式
+		 * @param {Object} productType 商品类型
+		 * @param {Object} fromType  页面来源
+		 * @param {Object} payPrice  支付金额
+		 */
+		changeOrderExpressPay(orderNo, payChannel, payType ,productType, fromType, payPrice) {
+			orderExpressPayApi({
+				orderNo: orderNo,
+				payChannel: payChannel,
+				payType: payType,
+				scene: productType === 'normal' ? 0 : 1177
+			
+			}).then(res => {
+				this.handleOrderPay(res, orderNo, productType, fromType, payType, payPrice)
+			}).catch(err => {
+				uni.hideLoading();
+				this.isBuy = false;
+				return this.$util.Tips({
+					title: err
+				});
+			});
 		}
 		}
 	}
 	}
 };
 };

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

@@ -251,6 +251,7 @@
 					uni.navigateBack({
 					uni.navigateBack({
 						delta: 1,
 						delta: 1,
 						success (res) {
 						success (res) {
+							console.log(item)
 							uni.$emit('addressExpressItem', item)
 							uni.$emit('addressExpressItem', item)
 						}
 						}
 					})
 					})

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

@@ -58,7 +58,9 @@
 	// +----------------------------------------------------------------------
 	// +----------------------------------------------------------------------
 	import {
 	import {
 		getOrderDetail,
 		getOrderDetail,
-		wechatQueryPayResult
+		getExpressOrderDetail,
+		wechatQueryPayResult,
+		wechatExpressQueryPayResult
 	} from '@/api/order.js';
 	} from '@/api/order.js';
 	import {
 	import {
 		openOrderSubscribe
 		openOrderSubscribe
@@ -88,6 +90,7 @@
 				payResult: '订单查询中...',
 				payResult: '订单查询中...',
 				theme:app.globalData.theme,
 				theme:app.globalData.theme,
 				fromType: '', // 支付页面来源,会员支付,商品支付,积分支付 
 				fromType: '', // 支付页面来源,会员支付,商品支付,积分支付 
+				apiType: '',
 				type:'',
 				type:'',
 			};
 			};
 		},
 		},
@@ -105,6 +108,8 @@
 		onLoad: function(options) {
 		onLoad: function(options) {
 			this.fromType = options.fromType
 			this.fromType = options.fromType
 			this.orderNo = options.order_id;
 			this.orderNo = options.order_id;
+			this.apiType = options.apiType
+			console.log(options)
 			if(!this.fromType || this.fromType==='integral'){
 			if(!this.fromType || this.fromType==='integral'){
 				this.status = options.status || 0;
 				this.status = options.status || 0;
 				if (this.isLogin) {
 				if (this.isLogin) {
@@ -135,7 +140,8 @@
 			},
 			},
 			//微信支付查明结果
 			//微信支付查明结果
 			wechatQueryPay(orderType) {
 			wechatQueryPay(orderType) {
-				wechatQueryPayResult({
+				const api = this.apiType == 'fast' ? wechatExpressQueryPayResult : wechatQueryPayResult;
+				api({
 					orderType: orderType,
 					orderType: orderType,
 					orderNo:this.orderNo
 					orderNo:this.orderNo
 				}).then(res => {
 				}).then(res => {
@@ -173,7 +179,8 @@
 				uni.showLoading({
 				uni.showLoading({
 					title: '正在加载中'
 					title: '正在加载中'
 				});
 				});
-				getOrderDetail(that.orderNo).then(res => {
+				const api = that.apiType == 'fast' ? getExpressOrderDetail(that.orderNo) : getOrderDetail(that.orderNo);
+				api.then(res => {
 					this.type=res.data.type
 					this.type=res.data.type
 					that.$set(that, 'order_pay_info', res.data);
 					that.$set(that, 'order_pay_info', res.data);
 					if (res.data.payType === 'weixin') {
 					if (res.data.payType === 'weixin') {
@@ -208,9 +215,15 @@
 			 * 去订单详情页面
 			 * 去订单详情页面
 			 */
 			 */
 			goOrderDetails: function(e) {
 			goOrderDetails: function(e) {
-				uni.navigateTo({
-					url: this.fromType =='svip'?'/pages/activity/vip_paid/index':this.type==2?`/pages/activity/status/index?orderNo=${this.orderNo}`:'/pages/goods/order_list/index'
-				});
+				if (this.apiType == 'fast') {
+					uni.navigateTo({
+						url: '/pages/substitute_fast_mail/my_fast_mail/index'
+					});
+				} else {
+					uni.navigateTo({
+						url: this.fromType =='svip'?'/pages/activity/vip_paid/index':this.type==2?`/pages/activity/status/index?orderNo=${this.orderNo}`:'/pages/goods/order_list/index'
+					});
+				}
 			}
 			}
 		}
 		}
 	}
 	}

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

@@ -196,7 +196,11 @@
 					});
 					});
 				} else {
 				} 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({
 					// orderPayApi({
 					// 	orderNo: this.orderNo,
 					// 	orderNo: this.orderNo,
 					// 	payChannel: this.payChannel,
 					// 	payChannel: this.payChannel,

+ 23 - 4
mer_uniapp/pages/index/index.vue

@@ -166,9 +166,19 @@
 		getMerchantList,
 		getMerchantList,
 		getHomeInfo
 		getHomeInfo
 	} from '@/api/home.js';
 	} from '@/api/home.js';
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		BACK_URL
+	} from '@/config/cache';
 	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
 	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
 	let app = getApp();
 	let app = getApp();
 	export default {
 	export default {
+		computed: mapGetters(['isLogin']),
 		data() {
 		data() {
 			return {
 			return {
 				statusBarHeight: app.globalData.statusBarHeight,
 				statusBarHeight: app.globalData.statusBarHeight,
@@ -319,10 +329,14 @@
 				})
 				})
 			},
 			},
 			onCateListClick(item) {
 			onCateListClick(item) {
-				if (item.link) {
-					uni.navigateTo({
-						url: item.link + `?id=${item.id}&navTitle=${item.name}`
-					})
+				if (!this.isLogin) {
+					this.openAuto();
+				} else {
+					if (item.link) {
+						uni.navigateTo({
+							url: item.link + `?id=${item.id}&navTitle=${item.name}`
+						})
+					}
 				}
 				}
 			},
 			},
 			goGoodList(item) {
 			goGoodList(item) {
@@ -350,6 +364,11 @@
 					})
 					})
 				})
 				})
 			},
 			},
+			// 打开授权
+			openAuto() {
+				Cache.set(BACK_URL, '')
+				toLogin();
+			},
 		},
 		},
 	}
 	}
 </script>
 </script>

+ 138 - 43
mer_uniapp/pages/substitute_fast_mail/home/index.vue

@@ -18,12 +18,15 @@
 				</scroll-view>
 				</scroll-view>
 			</view> -->
 			</view> -->
 		<navigator url="/pages/address/user_address_list/index">
 		<navigator url="/pages/address/user_address_list/index">
-			<view class="fast-top">
+			<view class="fast-top flex-between-center">
 				<view>
 				<view>
-					送至:{{addressItem.province}}{{addressItem.city}}{{addressItem.district}}{{addressItem.street}}{{addressItem.detail}}
+					<view>送至:{{addressItem.province}}{{addressItem.city}}{{addressItem.district}}{{addressItem.street}}{{addressItem.detail}}</view>
+					<view style="margin-top: 10rpx;">
+						<text>{{addressItem.realName}}</text> 收 {{addressItem.phone}}
+					</view>
 				</view>
 				</view>
-				<view style="margin-top: 10rpx;">
-					<text>{{addressItem.realName}}</text> 收 {{addressItem.phone}}<text class="iconfont icon-jiantou"></text>
+				<view>
+					<text class="iconfont icon-jiantou"></text>
 				</view>
 				</view>
 			</view>
 			</view>
 		</navigator>
 		</navigator>
@@ -36,8 +39,8 @@
 		</view>
 		</view>
 		<!-- </navigator> -->
 		<!-- </navigator> -->
 		<scroll-view scroll-y scroll-with-animation style="flex: 1;overflow: hidden;">
 		<scroll-view scroll-y scroll-with-animation style="flex: 1;overflow: hidden;">
-			<view class="fast-box" v-for="(item, index) in fastMailData.postOrderList || []" :key="index">
-				<view class="flex-between-center">
+			<view class="fast-box" v-for="(item, index) in fastMailData" :key="index">
+				<view class="flex-between-center mb-20">
 					<view>
 					<view>
 						<view class="fast-yz">{{item.postName}}</view>
 						<view class="fast-yz">{{item.postName}}</view>
 						<view class="fast-xx">{{item.addressDetail}}</view>
 						<view class="fast-xx">{{item.addressDetail}}</view>
@@ -46,14 +49,16 @@
 						<image src="/static/img/phone.png" class="image2" /><text>联系驿站</text>
 						<image src="/static/img/phone.png" class="image2" /><text>联系驿站</text>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="fast-item" v-for="(value, index) in item.orderInfoList">
-					<view class="flex-between-center">
-						<radio class="radios" :checked="value.radio" color="#FF6702" @tap="value.radio = !value.radio" />
-						<image style="width: 135rpx; height: 135rpx;border-radius: 30rpx;" src="/static/img/ic-qu-chengse.png"></image>
-						<view>
-							<view class="fast-yz">取件码 <text>{{value.pickUpCode}}</text></view>
-							<view class="fast-xx">{{value.expressCompany}} {{value.expressNo}}</view>
-							<view class="fast-yz">规格:{{value.spec}}</view>
+				<view class="fast-item" v-for="(value, key) in item.orderInfoList" :key="key">
+					<view class="flex-between-center mb-20" @click="onValRadio(value)">
+						<radio class="radios" :checked="value.radio" color="#FF6702" />
+						<view class="flex-y-center">
+							<image style="width: 135rpx; height: 135rpx;border-radius: 30rpx;margin-right: 23rpx;" src="/static/img/ic-qu-chengse.png"></image>
+							<view>
+								<view class="fast-yz">取件码 <text>{{value.pickUpCode}}</text></view>
+								<view class="fast-xx">{{value.expressCompany}} {{value.expressNo}}</view>
+								<view class="fast-yz">规格:{{value.spec}}</view>
+							</view>
 						</view>
 						</view>
 						<view>
 						<view>
 							<!-- <view class="fast-yz">134m</view> -->
 							<!-- <view class="fast-yz">134m</view> -->
@@ -62,7 +67,7 @@
 					</view>
 					</view>
 					<view class="fast-remark">
 					<view class="fast-remark">
 						<view v-if="value.remark">备注:{{value.remark}}</view>
 						<view v-if="value.remark">备注:{{value.remark}}</view>
-						<view class="flex-y-center" v-if="value.image" @tap="lookImg(value.image)">
+						<view class="flex-y-center" v-if="value.image" @click="lookImg(value.image)">
 							<text>附图:</text>
 							<text>附图:</text>
 							<image style="width: 38rpx; height: 38rpx;" src="/static/img/ic-figure.png"></image>
 							<image style="width: 38rpx; height: 38rpx;" src="/static/img/ic-figure.png"></image>
 						</view>
 						</view>
@@ -78,8 +83,8 @@
 				</template>
 				</template>
 			</view> -->
 			</view> -->
 		<view class="fast-tip flex-y-center">
 		<view class="fast-tip flex-y-center">
-			<radio :checked="radioArr" color="#FF6702" @tap="onRadioChang()" />全选
-			<view style="margin-left: 30rpx;">删除</view>
+			<!-- <radio :checked="radioArr" color="#FF6702" @tap="onRadioChang()" />全选 -->
+			<view @tap="onRadioDel()">删除</view>
 		</view>
 		</view>
 		<view class="flex-between-center fast-tip" @tap="isTip = true">
 		<view class="flex-between-center fast-tip" @tap="isTip = true">
 			<view class="remark-name">小费</view>
 			<view class="remark-name">小费</view>
@@ -124,14 +129,21 @@
 	import fastMailTip from '../components/fast_mail_tip/index.vue'
 	import fastMailTip from '../components/fast_mail_tip/index.vue'
 	import {
 	import {
 		preExpressApi,
 		preExpressApi,
-		loadPreExpressApi
+		loadPreExpressApi,
+		loadPreExpressDelApi,
+		expressCreate
 	} from '@/api/fastMail.js';
 	} from '@/api/fastMail.js';
 	import {
 	import {
 		getAddressDefault,
 		getAddressDefault,
 		getAddressExpressDefault
 		getAddressExpressDefault
 	} from '@/api/user.js';
 	} from '@/api/user.js';
+	import orderPay from "@/mixins/OrderPay.js";
+	import {
+		Debounce
+	} from '@/utils/validate.js'
 	let app = getApp();
 	let app = getApp();
 	export default {
 	export default {
+		mixins: [orderPay],
 		components: {
 		components: {
 			tuiSkeleton,
 			tuiSkeleton,
 			navBar,
 			navBar,
@@ -145,7 +157,7 @@
 				isOrder: false, // 提交快递订单弹窗
 				isOrder: false, // 提交快递订单弹窗
 				isTake: false, // 新增快递弹窗
 				isTake: false, // 新增快递弹窗
 				isTip: false, // 小费弹窗
 				isTip: false, // 小费弹窗
-				giveTips: '',
+				giveTips: 0,
 				winHeight: 0,
 				winHeight: 0,
 				isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
 				isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
 				autoplay: true,
 				autoplay: true,
@@ -161,7 +173,7 @@
 					name: '寄快递',
 					name: '寄快递',
 					preOrderType: 'send'
 					preOrderType: 'send'
 				}],
 				}],
-				fastMailData: {},
+				fastMailData: [],
 				navListIndex: 0,
 				navListIndex: 0,
 				active: 0,
 				active: 0,
 				scrollLeft: 0,
 				scrollLeft: 0,
@@ -186,23 +198,32 @@
 		 * 生命周期函数--监听页面显示
 		 * 生命周期函数--监听页面显示
 		 */
 		 */
 		onShow: function() {
 		onShow: function() {
+			let that = this
 			uni.$on('addressItem', function(res) {
 			uni.$on('addressItem', function(res) {
-				that.$set(this, 'addressItem', res);
-				this.preOrderNo = ''
-				this.fastMailData = {}
-				this.orderPrice = 0
+				that.$set(that, 'addressItem', res);
+				that.preOrderNo = ''
+				that.fastMailData = []
+				that.orderPrice = 0
 			})
 			})
 		},
 		},
 		methods: {
 		methods: {
 			lookImg(url) {
 			lookImg(url) {
 				uni.previewImage({
 				uni.previewImage({
-					urls: url
+					current: url, //  传 Number H5端出现不兼容
+					urls: [url]
 				});
 				});
 			},
 			},
 			getPreExpressApi(orderNo) {
 			getPreExpressApi(orderNo) {
 				loadPreExpressApi(orderNo).then(res => {
 				loadPreExpressApi(orderNo).then(res => {
-					this.fastMailData = res.data
-					this.orderPrice = res.data.payFee
+					this.fastMailData = res.data.postOrderList.map(item => {
+						item.orderInfoList.forEach(val => {
+							val.radio = false
+						})
+						return { ...item
+						}
+					}) || []
+					console.log(this.fastMailData)
+					this.orderPrice = +res.data.payFee
 				})
 				})
 			},
 			},
 			onAddFastMail() {
 			onAddFastMail() {
@@ -216,18 +237,39 @@
 				this.navListIndex = e;
 				this.navListIndex = e;
 				this.scrollLeft = e * 60;
 				this.scrollLeft = e * 60;
 			},
 			},
-			toPay() {
-				console.log(this.fastMailData)
-				console.log('提交订单')
-			},
-			pay(item) {
-				uni.showLoading({
+			async toPay() {
+				await uni.showLoading({
 					title: '加载中...'
 					title: '加载中...'
 				});
 				});
-				this.getToPayment(item.secondType, item)
+				// let tip = true;
+				// this.fastMailData.forEach(item => {
+				// 	item.orderInfoList.forEach(val => {
+				// 		val.radio ? tip = false : ''
+				// 	})
+				// })
+				// if (tip) {
+				// 	return this.$util.Tips({
+				// 		title: '请选择快件'
+				// 	})
+				// }
+				await expressCreate({
+					preOrderNo: this.preOrderNo,
+					giveTips: this.giveTips
+				}).then(res => {
+					uni.hideLoading()
+					console.log(res)
+					let data = {
+						payPrice: +res.data.payPrice,
+						orderNo: res.data.orderNo
+					}
+					this.getToPayment('', data, 'fast')
+				}).catch(err => {
+					uni.hideLoading()
+					console.log('提交快递')
+				})
 			},
 			},
 			onTipValue(value) {
 			onTipValue(value) {
-				this.giveTips = value
+				this.giveTips = +value
 				this.isTip = false;
 				this.isTip = false;
 				console.log(value)
 				console.log(value)
 			},
 			},
@@ -241,13 +283,56 @@
 				this.isTake = val
 				this.isTake = val
 				this.isTip = val
 				this.isTip = val
 			},
 			},
+			onValRadio(val) {
+				val.radio = !val.radio
+			},
 			onRadioChang() {
 			onRadioChang() {
+				// let price = 0;
 				this.radioArr = !this.radioArr
 				this.radioArr = !this.radioArr
-				if (!this.fastMailData.postOrderList) return
-				this.fastMailData.postOrderList.forEach(item => {
+				if (this.fastMailData.length === 0) return
+				this.fastMailData = this.fastMailData.map((item, index) => {
+					item.orderInfoList.forEach(val => {
+						val.radio = this.radioArr
+						// val.radio ? price += +val.price : ''
+					})
+					return item
+				})
+				// this.orderPrice = price
+			},
+			onRadioDel() {
+				if (this.fastMailData.length === 0) return
+				const arr = []
+				this.fastMailData.map((item, index) => {
 					item.orderInfoList.forEach(val => {
 					item.orderInfoList.forEach(val => {
-						val.radar = this.radioArr
+						val.radio ? arr.push(val.expressId) : ''
 					})
 					})
+					return item
+				})
+				console.log(arr)
+				let that = this
+				uni.showModal({
+					content: '确定删除?',
+					cancelText: "取消",
+					confirmText: "确定",
+					showCancel: true,
+					confirmColor: '#f55850',
+					success: (res) => {
+						if (res.confirm) {
+							uni.showLoading({
+								title: '正在删除中'
+							});
+							loadPreExpressDelApi(that.preOrderNo, arr).then(res => {
+								if (res.data) {
+									uni.hideLoading();
+									that.getPreExpressApi(that.preOrderNo)
+								}
+							}).catch(err => {
+								console.log(err)
+								uni.hideLoading();
+							})
+							console.log(that.fastMailData)
+						}
+					},
 				})
 				})
 			}
 			}
 		}
 		}
@@ -269,6 +354,15 @@
 		}
 		}
 	}
 	}
 
 
+	.noCheck {
+		width: 32rpx;
+		height: 32rpx;
+		border-radius: 50%;
+		overflow: hidden;
+		border: 1px solid #999999;
+		background-color: #eee;
+	}
+
 	.fast-top {
 	.fast-top {
 		width: 100%;
 		width: 100%;
 		padding: 28rpx 30rpx;
 		padding: 28rpx 30rpx;
@@ -289,7 +383,7 @@
 	.fast-tip {
 	.fast-tip {
 		background-color: #fff;
 		background-color: #fff;
 		margin-top: 20rpx;
 		margin-top: 20rpx;
-		padding: 20rpx;
+		padding: 20rpx 30rpx;
 	}
 	}
 
 
 	.image2 {
 	.image2 {
@@ -315,7 +409,8 @@
 		background-color: #fff;
 		background-color: #fff;
 
 
 		.fast-item {
 		.fast-item {
-			padding: 20rpx 20rpx 20rpx 84rpx;
+			position: relative;
+			padding: 20rpx 20rpx 20rpx 86rpx;
 			background-color: #F8F9FB;
 			background-color: #F8F9FB;
 			margin-bottom: 10rpx;
 			margin-bottom: 10rpx;
 		}
 		}
@@ -329,10 +424,10 @@
 			font-weight: 400;
 			font-weight: 400;
 			font-size: 21rpx;
 			font-size: 21rpx;
 			color: #999999;
 			color: #999999;
-		}
 
 
-		.flex-between-center {
-			margin-bottom: 20rpx;
+			view {
+				margin-bottom: 10rpx;
+			}
 		}
 		}
 
 
 		.fast-yz {
 		.fast-yz {

+ 219 - 35
mer_uniapp/pages/substitute_fast_mail/my_fast_mail/index.vue

@@ -1,23 +1,73 @@
 <template>
 <template>
-	<view class="flex-col" :style="{height: winHeight + 'px'}">
-		<!-- #ifdef MP -->
+	<view class="flex-col container" :style="{height: winHeight + 'px'}">
 		<view class="cart_nav">
 		<view class="cart_nav">
 			<nav-bar iconColor='#fff' ref="navBarRef" navTitle="我的快递" backgroundColor="#FF6702" :isBackgroundColor="false">
 			<nav-bar iconColor='#fff' ref="navBarRef" navTitle="我的快递" backgroundColor="#FF6702" :isBackgroundColor="false">
 			</nav-bar>
 			</nav-bar>
 		</view>
 		</view>
-		<!-- #endif -->
-		<view class='newsList tui-skeleton flex-col' style="background-color: #fff;flex: 1;">
+		<view class='newsList tui-skeleton flex-col' style="flex: 1;overflow: hidden;">
 			<view class='nav flex-center'>
 			<view class='nav flex-center'>
 				<view class='item flex-center' v-for="(item,index) in navList" :key="index" @click='tabSelect(item.id, index)'>
 				<view class='item flex-center' v-for="(item,index) in navList" :key="index" @click='tabSelect(item.id, index)'>
 					<text class="line1" :class='active==item.id?"on":""'>{{item.name}}</text>
 					<text class="line1" :class='active==item.id?"on":""'>{{item.name}}</text>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class='list' style="flex: 1;">
-				<template v-if="active == 1">
-				</template>
-				<template v-if="active == 2">
-				</template>
+			<view class="flex-center flex-col noCommodity" v-if="noDataTip">
+				<view class='pictrue'>
+					<image :src="urlDomain+'crmebimage/presets/noSearch.png'"></image>
+				</view>
+				<text class="text-ccc">{{noDataTip}}</text>
 			</view>
 			</view>
+			<scroll-view scroll-y scroll-with-animation @scrolltolower="onScrollBottom" style="flex: 1;overflow: hidden;">
+				<view class="fast-box" v-for="(item, index) in fastMailData || []" :key="index">
+					<view class="flex-between-center mb-20">
+						<view>
+							<view class="fast-yz">{{item.postName}}</view>
+							<view class="fast-xx">{{item.userAddress}}</view>
+						</view>
+						<view class="flex-y-center">
+							<image src="/static/img/phone.png" class="image2" /><text>联系驿站</text>
+						</view>
+					</view>
+					<view class="fast-item" v-for="(value, key) in item.orderInfoList" :key="key" @tap="onTap(value)">
+						<view class="flex-between-center mb-20">
+							<view class="flex-y-center">
+								<image style="width: 135rpx; height: 135rpx;border-radius: 30rpx;margin-right: 23rpx;" src="/static/img/ic-qu-chengse.png"></image>
+								<view>
+									<view class="fast-yz">取件码 <text>{{value.pickUpCode}}</text></view>
+									<view class="fast-xx">{{value.expressCompany}} {{value.expressNo}}</view>
+									<view class="fast-yz">规格:{{value.spec}}</view>
+								</view>
+							</view>
+							<view>
+								<!-- <view class="fast-yz">134m</view> -->
+								<view class="bg-color-cash">¥<text class="fast-cash">{{value.price}}</text></view>
+							</view>
+						</view>
+						<view class="fast-remark">
+							<view v-if="value.remark">备注:{{value.remark}}</view>
+							<view class="flex-y-center" v-if="value.image" @tap="lookImg(index, indexs)">
+								<text>附图:</text>
+								<image style="width: 38rpx; height: 38rpx;" src="/static/img/ic-figure.png"></image>
+							</view>
+						</view>
+					</view>
+					<view class="fast-item">
+						<view class="flex-between-center">
+							<view>
+								快递员姓名:XX
+							</view>
+							<view class="flex-y-center lx-ly">
+								<image src="/static/img/ic-iphone1.png" class="image2" />联系
+								<view style="display: inline-block; width: 2rpx; height: 42rpx;border: 2rpx solid #D5D6DC;margin: 0 18rpx;"></view>
+								<image src="/static/img/ic-message1.png" class="image2" />留言
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class='loadingicon flex-center' :hidden='!loading'>
+					<text class='loading iconfont icon-jiazai' style="width: auto;"></text>加载更多
+				</view>
+				<view class="flex-center no-data-tip" v-if="loadTitle">{{loadTitle}}</view>
+			</scroll-view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -38,8 +88,13 @@
 	import {
 	import {
 		getAddressList
 		getAddressList
 	} from '@/api/user.js';
 	} from '@/api/user.js';
+	import {
+		getExpressOrderList
+	} from '@/api/fastMail.js';
+	import orderPay from "@/mixins/OrderPay.js";
 	let app = getApp();
 	let app = getApp();
 	export default {
 	export default {
+		mixins: [orderPay],
 		components: {
 		components: {
 			tuiSkeleton,
 			tuiSkeleton,
 			navBar
 			navBar
@@ -50,14 +105,23 @@
 				isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
 				isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
 				autoplay: true,
 				autoplay: true,
 				navList: [{
 				navList: [{
+					id: 0,
+					name: '代付款'
+				}, {
 					id: 1,
 					id: 1,
-					name: '进行中'
+					name: '代收件'
 				}, {
 				}, {
-					id: 2,
+					id: 5,
 					name: '历史快递'
 					name: '历史快递'
 				}],
 				}],
-				active: 1,
+				active: 0,
+				page: 1,
+				limit: 10,
 				scrollLeft: 0,
 				scrollLeft: 0,
+				fastMailData: [],
+				loadTitle: '',
+				loading: false,
+				noDataTip: '',
 				addressItem: {}
 				addressItem: {}
 			};
 			};
 		},
 		},
@@ -68,7 +132,7 @@
 					that.winHeight = res.windowHeight
 					that.winHeight = res.windowHeight
 				},
 				},
 			});
 			});
-			this.getaddressInfo()
+			this.getPreExpressApi()
 		},
 		},
 		/**
 		/**
 		 * 生命周期函数--监听页面显示
 		 * 生命周期函数--监听页面显示
@@ -80,40 +144,101 @@
 			})
 			})
 		},
 		},
 		methods: {
 		methods: {
+			onTap(val) {
+				console.log(val)
+			},
+			async toPay() {
+				await uni.showLoading({
+					title: '加载中...'
+				});
+				await expressCreate({
+					preOrderNo: this.preOrderNo,
+					giveTips: this.giveTips
+				}).then(res => {
+					uni.hideLoading()
+					console.log(res)
+					let data = {
+						payPrice: +res.data.payPrice,
+						orderNo: res.data.orderNo
+					}
+					this.getToPayment('', data, 'fast')
+				}).catch(err => {
+					uni.hideLoading()
+					console.log('提交快递')
+				})
+			},
 			tabSelect(active, e) {
 			tabSelect(active, e) {
+				if (this.active == active) return
+				this.page = 1;
+				this.fastMailData = [];
 				this.active = active;
 				this.active = active;
+				this.getPreExpressApi()
 			},
 			},
-			/*
-			 * 获取默认收货地址或者获取某条地址信息
-			 */
-			getaddressInfo: function() {
-				getAddressList().then(res => {
-					console.log('地址', res)
-					if (res.code = 200) {
-						if (res.data.length !== 0) {
-							this.addressItem = res.data.find(item => item.isDefault === true) || {} // this.addressItem = res.data[0];
-						} else {
-							this.addressItem = {}
-						}
-						console.log('默认地址', this.addressItem)
+			getPreExpressApi() {
+				const params = {
+					keywords: '',
+					limit: this.limit,
+					page: this.page,
+					status: this.active
+				}
+				getExpressOrderList(params).then(res => {
+					let list = res.data.list || [];
+					this.fastMailData = this.$util.SplitArray(list, this.fastMailData);
+					if (this.fastMailData.length == 0) {
+						this.loadTitle = ''
+						this.noDataTip = ' 暂无快递信息 ';
+					} else {
+						this.noDataTip = ''
+						this.loadTitle = list.length < this.limit ? "我也是有底线的~" : '';
 					}
 					}
-				})
-			}
+					this.loading = false
+					this.page += 1;
+				}).catch(err => {
+					this.loading = false
+					console.log(err)
+				});
+			},
+			onScrollBottom() {
+				if (!this.loadTitle) {
+					this.getPreExpressApi()
+				}
+			},
+			lookImg(itemIndex, valIndex) {
+				const url = this.fastMailData[itemIndex].orderInfoList[valIndex].image
+				uni.previewImage({
+					urls: url
+				});
+			},
 		}
 		}
 	}
 	}
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
+	.container {
+		position: relative;
+		overflow: hidden;
+	}
+
+	.no-data-tip {
+		color: #CCC;
+	}
+
+	.image2 {
+		width: 42rpx;
+		height: 42rpx;
+		margin-right: 20rpx;
+	}
 
 
-	// #endif
 	.newsList .nav {
 	.newsList .nav {
 		width: 100%;
 		width: 100%;
 		height: 96rpx;
 		height: 96rpx;
+		margin-top: 10rpx;
 		white-space: nowrap;
 		white-space: nowrap;
 		box-sizing: border-box;
 		box-sizing: border-box;
-		padding-top: 43rpx;
+		padding: 20rpx 0 49rpx 0;
 		border-top-right-radius: 23rpx;
 		border-top-right-radius: 23rpx;
 		background-color: #fff;
 		background-color: #fff;
+		border-radius: 23rpx 23rpx 0rpx 0rpx;
 	}
 	}
 
 
 	.newsList .nav .item {
 	.newsList .nav .item {
@@ -121,7 +246,7 @@
 		display: inline-block;
 		display: inline-block;
 		font-size: 32rpx;
 		font-size: 32rpx;
 		color: #999;
 		color: #999;
-		margin-left: 75rpx;
+		margin-right: 50rpx;
 	}
 	}
 
 
 	.on {
 	.on {
@@ -132,14 +257,73 @@
 		border-radius: 6rpx;
 		border-radius: 6rpx;
 	}
 	}
 
 
-	.newsList .nav .item~.item {
-		margin-left: 46rpx;
-	}
-	
 	.newsList .nav .item .line1 {
 	.newsList .nav .item .line1 {
 		padding-bottom: 10rpx;
 		padding-bottom: 10rpx;
 		font-weight: 500;
 		font-weight: 500;
 		font-size: 31rpx;
 		font-size: 31rpx;
 		color: $bg-color-primary;
 		color: $bg-color-primary;
 	}
 	}
+
+	.fast-box {
+		padding: 30rpx;
+		background-color: #fff;
+		border: 2rpx solid #D6D7DC;
+
+		.fast-item {
+			position: relative;
+			padding: 20rpx;
+			background-color: #F8F9FB;
+			margin-bottom: 20rpx;
+
+			.lx-ly {
+				font-weight: 500;
+				font-size: 23rpx;
+				color: #141414;
+			}
+		}
+
+		.radios {
+			position: absolute;
+			left: 38rpx;
+		}
+
+		.fast-remark {
+			font-weight: 400;
+			font-size: 21rpx;
+			color: #999999;
+
+			view {
+				margin-bottom: 10rpx;
+			}
+		}
+
+		.fast-yz {
+			font-weight: 500;
+			font-size: 21rpx;
+			color: #141414;
+
+			text {
+				color: #FF0202;
+				margin-left: 20rpx;
+			}
+		}
+
+		.fast-xx {
+			font-weight: 400;
+			font-size: 21rpx;
+			color: #646464;
+			margin: 10rpx 0;
+		}
+
+		.bg-color-cash {
+			margin-top: 30rpx;
+			color: $bg-color-primary;
+
+			.fast-cash {
+				font-weight: 600;
+				font-size: 27rpx;
+				color: #FF6702;
+			}
+		}
+	}
 </style>
 </style>

+ 6 - 8
mer_uniapp/pages/substitute_fast_mail/take_fast_mail/index.vue

@@ -222,8 +222,9 @@
 			// #endif
 			// #endif
 			this.initTime()
 			this.initTime()
 			this.getaddressInfo()
 			this.getaddressInfo()
+			let that = this
 			uni.$on('addressExpressItem', function(res) {
 			uni.$on('addressExpressItem', function(res) {
-				that.$set(this, 'addressExpressObj', res);
+				that.$set(that, 'addressExpressObj', res);
 			})
 			})
 		},
 		},
 		methods: {
 		methods: {
@@ -342,8 +343,8 @@
 				this.visible = false
 				this.visible = false
 				console.log(this.fastMailObj)
 				console.log(this.fastMailObj)
 			},
 			},
-			onSure() {
-				uni.showLoading({
+			async onSure() {
+				await uni.showLoading({
 					title: '保存中',
 					title: '保存中',
 					mask: true
 					mask: true
 				})
 				})
@@ -372,16 +373,13 @@
 						title: tips
 						title: tips
 					});
 					});
 				}
 				}
-				preExpressApi(value).then(res => {
+				uni.hideLoading();
+				await preExpressApi(value).then(res => {
 					this.isOrder = true;
 					this.isOrder = true;
 					console.log(res)
 					console.log(res)
 					uni.hideLoading();
 					uni.hideLoading();
 					this.$emit('onTakeFastOk', res.data)
 					this.$emit('onTakeFastOk', res.data)
 				}).catch(err => {
 				}).catch(err => {
-					uni.showToast({
-						title: err,
-						icon: 'none'
-					})
 					uni.hideLoading();
 					uni.hideLoading();
 				})
 				})
 			},
 			},