WIN-2CJ8FMUT9OF\Administrator преди 7 месеца
родител
ревизия
3e3006ab9a
променени са 6 файла, в които са добавени 99 реда и са изтрити 790 реда
  1. 33 95
      pages-order/takeout-info.vue
  2. 43 4
      pages-takeout/goods-order.vue
  3. 0 18
      pages-takeout/new-shop.vue
  4. 2 2
      pages.json
  5. 1 15
      pages/login/index.vue
  6. 20 656
      pages/order/index.vue

+ 33 - 95
pages-order/takeout-info.vue

@@ -2,16 +2,16 @@
 	<view class="flex-common-css iPhone-bottom box-border-box bgc-F5F4F9">
 		<image class="order-bg" src="@/static/img/order-food/ss-bg.png" mode=""></image>
 		<newNav :textType="false" class="mb-20" leftIconColor='#333'></newNav>
-		<view class="p-24-24-0 box-border-box mb-32">
-			<!-- 			<view class="mb-24" v-if="infoData.order_status == 1">
-				<view class="fs-40 fc-3 mb-8">
+		<view class="p-24-24-0 box-border-box mb-32 z-3">
+			<view class="" v-if="infoData.order_status == 1">
+				<view class="fs-40 fc-3 fw-600 mb-8">
 					{{infoData.order_status_str}},剩余{{time.m}}:{{time.s}}
 				</view>
 				<view class="fs-24 fc-FB3D03">
-					10分钟内未支付,订单将自动取消
+					30分钟内未支付,订单将自动取消
 				</view>
-			</view> -->
-			<view class="z-3">
+			</view>
+			<view class="" v-else>
 				<view class="fs-48 fc-3 fw-600">
 					{{infoData.order_status_str}}
 				</view>
@@ -19,24 +19,25 @@
 		</view>
 		<view class="plr-24 box-border-box">
 			<view class="bgc-f b-rad-20 p-32-24 box-border-box fs-36 fw-600 fc-3">
-				取单号:80
+				取餐号:{{infoData.number?infoData.number:'无'}}
 			</view>
 		</view>
-		<scroll-view :scroll-y="true" class="scroll-view-css box-border-box p-24-24-136-24" @scrolltolower="scrolltolower">
+		<scroll-view :scroll-y="true" class="scroll-view-css box-border-box p-24-24-136-24"
+			@scrolltolower="scrolltolower">
 			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
 				<view class="w-420 fc-3 fs-32 fw-600 text-overflow-ellipsis-one mb-24">
 					{{infoData.shop.shop_name}}
 				</view>
 				<view class="goods-box" :class="infoData.item.length >= 4 && goodsShow?'goodsShowOne':'goodsShowTwo'">
 					<view class="align-items-center flex-justify-space mb-20" v-for="(item,index) in infoData.item">
-						<image class="goods-img mr-16 flex-shrink0" :src="item.goods_img" mode="aspectFit"></image>
+						<image class="goods-img mr-16 flex-shrink0" :src="item.goods_img" mode="aspectFill"></image>
 						<view class="">
 							<view class="align-items-center flex-justify-space mb-2">
 								<view class="fs-28 fc-3 w-376 text-overflow-ellipsis-one mr-36">
 									{{item.goods_name}}
 								</view>
 								<view class="fs-32 fc-3 fw-600">
-									¥{{ (Number(item.goods_number) * Number(item.goods_price)).toFixed(2) }}
+									¥{{ (Number(item.goods_money)).toFixed(2) }}
 								</view>
 							</view>
 							<view class="mb-2 fs-24 fc-9">
@@ -56,7 +57,7 @@
 					<image v-if="goodsShow" class="icon-right" src="@/static/img/order/top.png" mode=""></image>
 					<image v-else class="icon-right" src="@/static/img/order/bottom.png" mode=""></image>
 				</view>
-				<view class="align-items-center flex-justify-space mb-24">
+				<view class="align-items-center flex-justify-space mb-24" v-if="infoData.order_type === 2">
 					<view class="fs-28 fc-3">
 						打包费
 					</view>
@@ -64,15 +65,7 @@
 						¥{{infoData.pack_price}}
 					</view>
 				</view>
-				<view class="align-items-center flex-justify-space mb-24">
-					<view class="fs-28 fc-3">
-						配送费
-					</view>
-					<view class="fs-32 fc-3">
-						¥{{infoData.delivery_money}}
-					</view>
-				</view>
-				<view class="align-items-center flex-justify-space pb-36 b-b-F9F9F9 mb-22">
+				<!-- 				<view class="align-items-center flex-justify-space pb-36 b-b-F9F9F9 mb-22">
 					<view class="align-items-center">
 						<image class="mr-6 icon-right" src="@/static/img/order/yhq.png" mode=""></image>
 						<view class="fs-28 fc-3">
@@ -82,7 +75,7 @@
 					<view class="fs-32 fc-FB3D03">
 						-¥{{infoData.coupon_money}}
 					</view>
-				</view>
+				</view> -->
 				<view class="align-items-center flex-justify-end">
 					<view class="fs-28 fc-9">
 						共{{infoData.goods_number}}件,
@@ -140,15 +133,15 @@
 						桌号
 					</view>
 					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.pay_type_str}}
+						{{infoData.table_number}}
 					</view>
 				</view>
 				<view class="display-flex flex-justify-space">
 					<view class="fs-28 fc-9">
-						取单号
+						取餐号
 					</view>
 					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.pay_type_str}}
+						{{infoData.number?infoData.number:'无'}}
 					</view>
 				</view>
 			</view>
@@ -175,14 +168,9 @@
 		components: {},
 		data() {
 			return {
-				goodsData: [{
-					name: '1'
-				}, {
-					name: '2'
-				}],
 				goodsShow: true,
 				infoData: {
-					order_status_str: '商家已接单'
+					item: [],
 				},
 				time: {
 					day: '',
@@ -190,13 +178,14 @@
 					m: '',
 					s: '',
 				},
-				isAJAX: false,
-				address_id: '',
-				refund_msg: '', // 退款理由
-				refundReason: [] //退款原因
+				isAJAX: false
 			};
 		},
-		onLoad(data) {},
+		onLoad(data) {
+			if (data.orderId) {
+				this.orderInfo(data.orderId)
+			}
+		},
 		mounted() {},
 		onUnload() {},
 		methods: {
@@ -237,23 +226,6 @@
 			setAddress() {
 				this.$refs.selectAddress.getList();
 			},
-			giveAddress(e) {
-				this.address_id = e;
-				this.expressOrderAddress()
-			},
-			expressOrderAddress() {
-				expressOrderAddress({
-					order_id: this.infoData.id,
-					address_id: this.address_id
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.orderInfo(this.infoData.id)
-					} else {
-						tools.error(res.msg)
-					}
-				})
-			},
 			pay() {
 				this.orderPay(this.infoData.id)
 			},
@@ -263,43 +235,6 @@
 					url: `/pages-takeout/pay-page?orderId=${id}`
 				});
 			},
-			cancelOrder() {
-				// 外卖取消订单
-				commonRefundReason().then((res) => {
-					if (res.code === 1) {
-						this.refundReason = res.data
-						this.refund_msg = res.data[0].refund_msg
-					}
-				})
-				this.$refs.popupReason.open()
-			},
-			popCancel() {
-				// 退款取消
-				this.$refs.popupReason.close()
-			},
-			popSure() {
-				// 退款确认
-				if (this.isAJAX) {
-					return
-				}
-				this.isAJAX = true;
-				orderCancel({
-					order_id: this.infoData.id,
-					refund_msg: this.refund_msg
-				}).then((res) => {
-					if (res.code == 1) {
-						tools.success(res.msg)
-						this.$refs.popupReason.close()
-						setTimeout(() => {
-							this.orderInfo(this.infoData.id)
-						}, 1500)
-						this.isAJAX = false;
-					} else {
-						tools.error(res.msg)
-						this.isAJAX = false;
-					}
-				})
-			},
 			openGoods() {
 				this.goodsShow = !this.goodsShow
 			},
@@ -313,8 +248,10 @@
 					if (res.code == 1) {
 						this.infoData = res.data
 						if (this.infoData.order_status == 1) {
-							let createDate = new Date(res.data.created_at); //格式化订单创建时候的时间
-							createDate.setMinutes(createDate.getMinutes() + 10)
+							// 替换“-”为“/”,转换为 iOS 支持的格式
+							let compatibleDateString = (res.data.created_at).replace(/-/g, '/');
+							let createDate = new Date(compatibleDateString); //格式化订单创建时候的时间
+							createDate.setMinutes(createDate.getMinutes() + 30)
 							this.setCountDown(createDate)
 						}
 					}
@@ -342,8 +279,6 @@
 						this.setCountDown(sTime);
 					}, 1000);
 				} else {
-					this.isTimeEnd = true;
-					this.bText = '活动结束';
 					this.time.h = '--';
 					this.time.m = '--';
 					this.time.s = '--';
@@ -354,15 +289,17 @@
 </script>
 
 <style lang="scss" scoped>
-	.p-24-24-136-24{
+	.p-24-24-136-24 {
 		padding: 24rpx 24rpx 136rpx;
 	}
+
 	.item-but {
 		width: 200rpx;
 		height: 80rpx;
 		line-height: 80rpx;
 		background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
 	}
+
 	.z-3 {
 		position: relative;
 		z-index: 3;
@@ -454,7 +391,8 @@
 		padding: 24rpx 0 0;
 		box-sizing: border-box;
 	}
-	.bot-box{
+
+	.bot-box {
 		width: 100%;
 		position: fixed;
 		padding: 16rpx 32rpx calc(env(safe-area-inset-bottom) + 16rpx);

+ 43 - 4
pages-takeout/goods-order.vue

@@ -277,10 +277,49 @@
 				this.isAJAX = true;
 				orderCreateVtwo(this.cartData).then((res) => {
 					if (res.code === 1) {
-						// uni.redirectTo({
-						// 	url: `/pages-takeout/pay-page?orderId=${res.data.order_id}`
-						// });
-
+						orderPay({
+							order_id: res.data.order_id
+						}).then((ret) => {
+							if (ret.code === 1) {
+								uni.requestPayment({
+									provider: "wxpay", //支付类型-固定值
+									timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
+									nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
+									package: ret.data.wx_pay.package, // 固定值
+									signType: ret.data.wx_pay.signType, //固定值
+									paySign: ret.data.wx_pay.paySign, //签名
+									success: (ren) => {
+										tools.success("支付成功");
+										this.isAJAX = false;
+										setTimeout(() => {
+											uni.redirectTo({
+												url: `/pages-order/takeout-info?orderId=` + res.data.order_id
+											})
+											cartStore.clearCurrentShopCart();
+										}, 1000)
+									},
+									fail: (err) => {
+										this.isAJAX = false;
+										tools.error("支付失败");
+										setTimeout(() => {
+											uni.redirectTo({
+												url: `/pages/order/index`
+											})
+											cartStore.clearCurrentShopCart();
+										}, 1000)
+									},
+								});
+							} else {
+								this.isAJAX = false;
+								tools.error("支付失败");
+								setTimeout(() => {
+									uni.redirectTo({
+										url: `/pages/order/index`
+									})
+									cartStore.clearCurrentShopCart();
+								}, 1000)
+							}
+						})
 					} else {
 						this.isAJAX = false;
 						tools.error(res.msg);

+ 0 - 18
pages-takeout/new-shop.vue

@@ -545,13 +545,6 @@
 			navHeight(e) {
 				this.newNavHeight = e
 			},
-			mustBut() {
-				// 未点必选品
-				const item = {
-					type: this.cartData.must_category
-				}
-				this.$refs.goodsMenu.selectType(item)
-			},
 			setShopIngDel() {
 				uni.showModal({
 					title: '提示',
@@ -620,9 +613,6 @@
 						}
 					}).exec()
 				})
-				// setTimeout(() => {
-
-				// }, 500)
 			},
 			seletShopType(item) {
 				if (this.shopType != item.id) {
@@ -642,15 +632,7 @@
 			createOrder() {
 				this.$refs.popupBuy.close()
 			},
-			openCoupon() {
-				this.$refs.popupCoupon.open()
-			},
-			closeCoupon() {
-				this.$refs.popupCoupon.close()
-			},
 			toConfirmOrder() {
-				// console.log(this.cartData, '11111111111');
-				// return
 				uni.navigateTo({
 					url: '/pages-takeout/goods-order'
 				})

+ 2 - 2
pages.json

@@ -496,12 +496,12 @@
 		"current": 0,
 		"list": [{
 				"name": "列表调试",
-				"path": "pages-takeout/goods-order",
+				"path": "pages-takeout/new-shop",
 				"query": ""
 			},
 			{
 				"name": "dd",
-				"path": "pages-order/takeout-info",
+				"path": "pages/order/index",
 				"query": ""
 			}
 		]

+ 1 - 15
pages/login/index.vue

@@ -31,21 +31,7 @@
 	export default {
 		data() {
 			return {
-				isFlag: false,
-				isAjax: false,
-				from: {
-					code: "",
-					system_type: '',
-					phone: '',
-					sms_code: '',
-					invite_code: ''
-				},
-				isCode: false,
-				codeText: '获取验证码',
-				codeNUm: 0,
-				isPop: false,
-				html: '',
-				agreementData: []
+				isAjax: false
 			};
 		},
 		onLoad(data) {

+ 20 - 656
pages/order/index.vue

@@ -65,7 +65,10 @@
 						</view>
 					</view>
 					<view class="align-items-center flex-justify-end">
-						<view @click.stop="goToUrl('takeOut', item)" class="item-but but-class-one fs-28">
+						<view v-if="item.order_status === 1" @click.stop="orderPay(item)" class="item-but but-class-one fs-28">
+							立即支付
+						</view>
+						<view v-else @click.stop="goToUrl(item)" class="item-but but-class-one fs-28">
 							再来一单
 						</view>
 					</view>
@@ -83,35 +86,17 @@
 		commonRefundReason
 	} from "@/api/common.js"
 	import {
-		orderStatus,
 		orderList,
 		orderCancel,
 		orderPay
 	} from "@/api/order.js"
 	import {
-		getExpressPay
-	} from "@/api/express.js"
-	import {
-		expressOrderStatus,
-		expressOrderList,
 		expressOrderCancel
 	} from "@/api/expressOrder.js"
 	import {
-		groupPay
-	} from '@/api/groupOrder.js';
-	import {
-		errandsOrderStatus,
-		errandsOrderPay,
-		errandsOrderList,
 		errandsOrderCancel
 	} from "@/api/errandsOrder.js"
 	import {
-		groupOrderStatus,
-		groupOrderList
-	} from "@/api/groupOrder.js"
-	import {
-		laundryOrderStatus,
-		laundryOrderList,
 		laundryOrderCancel,
 		laundryPay
 	} from "@/api/laundryOrder.js"
@@ -123,38 +108,7 @@
 			return {
 				type: 1,
 				page: 1,
-				list: [{
-						shop_name: '古茗(回兴店)古茗(回兴店)古茗1...',
-						order_status_str: '商家已接单',
-						goods_number: 1,
-						created_at: '2024.12.05 12:30:09',
-						pay_money: '20',
-						item: [{
-							goods_img: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg',
-							goods_name: '茉莉花茶茉莉花茶茉莉1111花 茉莉花茶茉莉花茶茉1111...'
-						}]
-					},
-					{
-						shop_name: '古茗(回兴店)古茗(回兴店)古茗1...',
-						order_status_str: '商家已接单',
-						goods_number: 1,
-						created_at: '2024.12.05 12:30:09',
-						pay_money: '20',
-						item: [{
-							goods_img: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg',
-							goods_name: '茉莉花茶茉莉花茶茉莉1111花 茉莉花茶茉莉花茶茉1111...'
-						}, {
-							goods_img: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg',
-							goods_name: '茉莉花茶茉莉花茶茉莉1111花 茉莉花茶茉莉花茶茉1111...'
-						}, {
-							goods_img: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg',
-							goods_name: '茉莉花茶茉莉花茶茉莉1111花 茉莉花茶茉莉花茶茉1111...'
-						}, {
-							goods_img: 'https://qcloud.dpfile.com/pc/JvY4fMzO0Km80S9Sn-tNxYin28jkvrNMJV-pUo8YwCctS4AHLKPXFhGyuI2dCwk8.jpg',
-							goods_name: '茉莉花茶茉莉花茶茉莉1111花 茉莉花茶茉莉花茶茉1111...'
-						}]
-					}
-				],
+				list: [],
 				total: 0,
 				navTypeData: [],
 				navTypeKey: 0,
@@ -169,64 +123,18 @@
 			};
 		},
 		onShow() {},
-		onLoad() {},
+		onLoad() {
+			this.orderList()
+		},
 		onHide() {},
 		onUnload() {},
 		mounted() {},
 		methods: {
-			goCode(item) {
-				uni.navigateTo({
-					url: '/pages-buy/group-code?order_id=' + item.id
-				})
-			},
-			openCode(item) {
-				this.onlyCode = item.only_code
-				let m_id = uni.getStorageSync('m_id');
-				this.qrcodeData = m_id + "_" + item.order_sn
-				this.options2 = {
-					size: 300,
-					margin: 10
-				}
-				uni.hideTabBar()
-				this.$refs.popup.open('center')
-			},
-			maskClick() {
-				this.$refs.popup.close()
-				this.qrcodeData = ''
-				uni.showTabBar()
-			},
-			goToShop(item) {
-				// 进入店铺
-				uni.navigateTo({
-					url: '/pages-takeout/shop?shop_id=' + item.shop_id
-				})
-			},
-			goToUrl(type, item) {
+			goToUrl(item) {
 				// 再来一单
-				if (type == 'takeOut') {
-					// uni.navigateTo({
-					// 	url: '/pages-takeout/takeout'
-					// })
-					uni.navigateTo({
-						url: '/pages-takeout/shop?shop_id=' + item.shop_id
-					})
-				} else if (type == 'express') {
-					uni.navigateTo({
-						url: '/pages-takeout/replace-take'
-					})
-				} else if (type == 'group') {
-					uni.navigateTo({
-						url: '/pages-buy/group-shop?shop_id=' + item.shop_id
-					})
-				} else if (type == 'errands') {
-					uni.navigateTo({
-						url: '/pages-takeout/run-errands'
-					})
-				} else if (type == 'laundry') {
-					uni.navigateTo({
-						url: '/pages-buy/dry-clean'
-					})
-				}
+				// uni.navigateTo({
+				// 	url: '/pages-takeout/shop?shop_id=' + item.shop_id
+				// })
 			},
 			goToInfo(item) {
 				uni.navigateTo({
@@ -235,575 +143,31 @@
 			},
 			orderPay(item) {
 				// 立即支付
-				if (this.type === 1) {
-					this.takeawayPay(item.id)
-				} else if (this.type === 2) {
-					this.getExpressPay(item.id)
-				} else if (this.type === 3) {
-					this.groupPay(item.id)
-				} else if (this.type === 4) {
-					this.errandsOrderPay(item.id)
-				} else if (this.type === 5) {
-					this.laundryPay(item.id)
-				}
-			},
-			navTypeClick(key) {
-				if (this.navTypeKey != key) {
-					this.navTypeKey = key
-					this.page = 1
-					this.list = []
-					if (this.type === 1) {
-						this.orderList()
-					} else if (this.type === 2) {
-						this.expressOrderList()
-					} else if (this.type === 3) {
-						this.groupOrderList()
-					} else if (this.type === 4) {
-						this.errandsOrderList()
-					} else if (this.type === 5) {
-						this.laundryOrderList()
-					}
-				}
-			},
-			resetList() {
-				this.page = 1;
-				this.list = [];
-				this.getList();
-				uni.removeStorageSync('orderPayType')
-			},
-			selectType(type) {
-				let orderPayType = uni.getStorageSync('orderPayType')
-				if (type != this.type || orderPayType) {
-					this.type = type;
-					this.navTypeKey = 0
-					this.resetList();
-				}
-			},
-			assess(item) {
-				// 外卖评价
-				uni.navigateTo({
-					url: `/pages-my/appraise?orderId=` + item.id + '&shopName=' + item.shop_name + '&shopLogo=' +
-						item.shop_logo
-				})
-			},
-			popCancel() {
-				// 退款取消
-				this.$refs.popupReason.close()
-				uni.showTabBar()
-			},
-			popSure() {
-				// 退款确认
-				if (this.sureType === 1) {
-					// 外卖退款
-					if (this.isAJAX) {
-						return
-					}
-					this.isAJAX = true;
-					orderCancel({
-						order_id: this.order_id,
-						refund_msg: this.refund_msg
-					}).then((res) => {
-						if (res.code == 1) {
-							tools.success(res.msg)
-							this.$refs.popupReason.close()
-							uni.showTabBar()
-							setTimeout(() => {
-								this.page = 1;
-								this.list = [];
-								this.orderList()
-							}, 1500)
-							this.isAJAX = false;
-						} else {
-							tools.error(res.msg)
-							this.isAJAX = false;
-						}
-					})
-				} else if (this.sureType === 2) {
-					// 代取退款
-					if (this.isAJAX) {
-						return
-					}
-					this.isAJAX = true;
-					expressOrderCancel({
-						order_id: this.order_id,
-						refund_msg: this.refund_msg
-					}).then((res) => {
-						if (res.code == 1) {
-							tools.success(res.msg)
-							this.$refs.popupReason.close()
-							uni.showTabBar()
-							setTimeout(() => {
-								this.page = 1;
-								this.list = [];
-								this.expressOrderList()
-							}, 1500)
-							this.isAJAX = false;
-						} else {
-							tools.error(res.msg)
-							this.isAJAX = false;
-						}
-					})
-				} else if (this.sureType === 3) {
-					//跑腿退款
-					if (this.isAJAX) {
-						return
-					}
-					this.isAJAX = true;
-					errandsOrderCancel({
-						order_id: this.order_id,
-						refund_msg: this.refund_msg
-					}).then((res) => {
-						if (res.code == 1) {
-							tools.success(res.msg)
-							this.$refs.popupReason.close()
-							uni.showTabBar()
-							setTimeout(() => {
-								this.page = 1;
-								this.list = [];
-								this.errandsOrderList()
-							}, 1500)
-							this.isAJAX = false;
-						} else {
-							tools.error(res.msg)
-							this.isAJAX = false;
-						}
-					})
-				}
-			},
-			bindChange(e) {
-				let num = e.detail.value[0]
-				this.refund_msg = this.refundReason[num].refund_msg
-			},
-			tackOut(item) {
-				// 外卖取消订单
-				uni.hideTabBar()
-				this.sureType = 1
-				this.order_id = item.id
-				commonRefundReason().then((res) => {
-					if (res.code === 1) {
-						this.refundReason = res.data
-						this.refund_msg = this.refundReason[0].refund_msg
-					}
-				})
-				this.$refs.popupReason.open()
-				// uni.showModal({
-				// 	title: '提示',
-				// 	content: '是否取消订单?',
-				// 	confirmText: '确定',
-				// 	confirmColor: '#FB3D03',
-				// 	success: (res) => {
-				// 		if (res.confirm === true) {
-				// 			if (this.isAJAX) {
-				// 				return
-				// 			}
-				// 			this.isAJAX = true;
-				// 			orderCancel({
-				// 				order_id: item.id
-				// 			}).then((res) => {
-				// 				if (res.code == 1) {
-				// 					tools.success(res.msg)
-				// 					setTimeout(() => {
-				// 						this.page = 1;
-				// 						this.list = [];
-				// 						this.orderList()
-				// 					}, 1500)
-				// 					this.isAJAX = false;
-				// 				} else {
-				// 					tools.error(res.msg)
-				// 					this.isAJAX = false;
-				// 				}
-				// 			})
-				// 		}
-				// 	}
-				// });
-			},
-			expressCancel(item) {
-				// 代取取消订单
-				uni.hideTabBar()
-				this.sureType = 2
-				this.order_id = item.id
-				commonRefundReason().then((res) => {
-					if (res.code === 1) {
-						this.refundReason = res.data
-						this.refund_msg = this.refundReason[0].refund_msg
-					}
-				})
-				this.$refs.popupReason.open()
-				// uni.showModal({
-				// 	title: '提示',
-				// 	content: '是否取消订单?',
-				// 	confirmText: '确定',
-				// 	confirmColor: '#FB3D03',
-				// 	success: (res) => {
-				// 		if (res.confirm === true) {
-				// 			if (this.isAJAX) {
-				// 				return
-				// 			}
-				// 			this.isAJAX = true;
-				// 			expressOrderCancel({
-				// 				order_id: item.id
-				// 			}).then((res) => {
-				// 				if (res.code == 1) {
-				// 					tools.success(res.msg)
-				// 					setTimeout(() => {
-				// 						this.page = 1;
-				// 						this.list = [];
-				// 						this.expressOrderList()
-				// 					}, 1500)
-				// 					this.isAJAX = false;
-				// 				} else {
-				// 					tools.error(res.msg)
-				// 					this.isAJAX = false;
-				// 				}
-				// 			})
-				// 		}
-				// 	}
-				// });
-			},
-			cancel(item) {
-				// 跑腿取消订单
-				uni.hideTabBar()
-				this.sureType = 3
-				this.order_id = item.id
-				commonRefundReason().then((res) => {
-					if (res.code === 1) {
-						this.refundReason = res.data
-						this.refund_msg = this.refundReason[0].refund_msg
-					}
-				})
-				this.$refs.popupReason.open()
-				// uni.showModal({
-				// 	title: '提示',
-				// 	content: '是否取消订单?',
-				// 	confirmText: '确定',
-				// 	confirmColor: '#FB3D03',
-				// 	success: (res) => {
-				// 		if (res.confirm === true) {
-				// 			if (this.isAJAX) {
-				// 				return
-				// 			}
-				// 			this.isAJAX = true;
-				// 			laundryOrderCancel({
-				// 				order_id: item.id
-				// 			}).then((res) => {
-				// 				if (res.code == 1) {
-				// 					tools.success(res.msg)
-				// 					setTimeout(() => {
-				// 						this.page = 1;
-				// 						this.list = [];
-				// 						this.laundryOrderList()
-				// 					}, 1500)
-				// 					this.isAJAX = false;
-				// 				} else {
-				// 					tools.error(res.msg)
-				// 					this.isAJAX = false;
-				// 				}
-				// 			})
-				// 		}
-				// 	}
-				// });
+				this.takeawayPay(item.id)
 			},
 			scrolltolower() {
 				++this.page
-				if (this.type === 1) {
-					this.orderList()
-				} else if (this.type === 2) {
-					this.expressOrderList()
-				} else if (this.type === 3) {
-					this.groupOrderList()
-				} else if (this.type === 4) {
-					this.errandsOrderList()
-				} else if (this.type === 5) {
-					this.laundryOrderList()
-				}
+				this.orderList()
 				// console.log('触底');
 			},
-			getList() {
-				if (this.type === 1) {
-					this.orderStatus()
-					this.orderList()
-				} else if (this.type === 2) {
-					this.expressOrderStatus()
-					this.expressOrderList()
-				} else if (this.type === 3) {
-					this.groupOrderStatus()
-					this.groupOrderList()
-				} else if (this.type === 4) {
-					this.errandsOrderStatus()
-					this.errandsOrderList()
-				} else if (this.type === 5) {
-					this.laundryOrderStatus()
-					this.laundryOrderList()
-				}
-			},
-			expressOrderStatus() {
-				// 代取订单状态
-				expressOrderStatus().then((res) => {
-					if (res.code == 1) {
-						this.navTypeData = res.data
-					}
-				})
-			},
-			orderStatus() {
-				// 外卖订单状态
-				orderStatus().then((res) => {
-					if (res.code == 1) {
-						this.navTypeData = res.data
-					}
-				})
-			},
-			groupOrderStatus() {
-				// 团购订单状态
-				groupOrderStatus().then((res) => {
-					if (res.code == 1) {
-						this.navTypeData = res.data
-					}
-				})
-			},
-			errandsOrderStatus() {
-				// 跑腿订单状态
-				errandsOrderStatus().then((res) => {
-					if (res.code == 1) {
-						this.navTypeData = res.data
-					}
-				})
-			},
-			laundryOrderStatus() {
-				// 干洗订单状态
-				laundryOrderStatus().then((res) => {
-					if (res.code == 1) {
-						this.navTypeData = res.data
-					}
-				})
-			},
 			orderList() {
-				// 外卖订单列表
+				// 订单列表
 				orderList({
-					status: this.navTypeKey,
-					page: this.page
-				}).then((res) => {
-					if (res.code == 1) {
-						if (res.data.items.length > 0) {
-							this.list.push(...res.data.items)
-						}
-					}
-				})
-			},
-			expressOrderList() {
-				// 代取订单列表
-				expressOrderList({
-					status: this.navTypeKey,
-					page: this.page
-				}).then((res) => {
-					if (res.code == 1) {
-						if (res.data.items.length > 0) {
-							this.list.push(...res.data.items)
-						}
-					}
-				})
-			},
-			groupOrderList() {
-				// 团购订单列表
-				groupOrderList({
-					status: this.navTypeKey,
-					page: this.page
-				}).then((res) => {
-					if (res.code == 1) {
-						if (res.data.items.length > 0) {
-							this.list.push(...res.data.items)
-						}
-					}
-				})
-			},
-			errandsOrderList() {
-				// 票务订单列表
-				errandsOrderList({
-					status: this.navTypeKey,
 					page: this.page
 				}).then((res) => {
 					if (res.code == 1) {
-						if (res.data.items.length > 0) {
-							this.list.push(...res.data.items)
-						}
-					}
-				})
-			},
-			laundryOrderList() {
-				// 干洗订单列表
-				laundryOrderList({
-					status: this.navTypeKey,
-					page: this.page
-				}).then((res) => {
-					if (res.code == 1) {
-						if (res.data.items.length > 0) {
-							this.list.push(...res.data.items)
-						}
+						this.total = res.data.total
+						this.list = [...this.list, ...res.data.items]
 					}
 				})
 			},
 			takeawayPay(id) {
 				// 外卖支付
-				uni.redirectTo({
-					url: `/pages-takeout/pay-page?orderId=${id}`
-				});
-				return
-				// if (this.isAJAX) {
-				// 	return
-				// }
-				// this.isAJAX = true;
-				// orderPay({
-				// 	order_id: id
-				// }).then((ret) => {
-				// 	if (ret.code === 1) {
-				// 		uni.requestPayment({
-				// 			provider: "wxpay", //支付类型-固定值
-				// 			timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
-				// 			nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
-				// 			package: ret.data.wx_pay.package, // 固定值
-				// 			signType: ret.data.wx_pay.signType, //固定值
-				// 			paySign: ret.data.wx_pay.paySign, //签名
-				// 			success: (ren) => {
-				// 				tools.success("支付成功");
-				// 				this.isAJAX = false;
-				// 				this.page = 1;
-				// 				this.list = [];
-				// 				this.orderList()
-				// 			},
-				// 			fail: (err) => {
-				// 				this.isAJAX = false;
-				// 				tools.error("支付失败");
-				// 			},
-				// 		});
-				// 	} else {
-				// 		this.isAJAX = false;
-				// 		tools.error("支付失败");
-				// 	}
-				// })
-			},
-			getExpressPay(id) {
-				// 代取支付
-				uni.redirectTo({
-					url: `/pages-takeout/pick-up-pay?orderId=${id}`
-				});
-				return
-				// if (this.isAJAX) {
-				// 	return
-				// }
-				// this.isAJAX = true;
-				// getExpressPay({
-				// 	order_id: id
-				// }).then((ret) => {
-				// 	if (ret.code === 1) {
-				// 		uni.requestPayment({
-				// 			provider: "wxpay", //支付类型-固定值
-				// 			timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
-				// 			nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
-				// 			package: ret.data.wx_pay.package, // 固定值
-				// 			signType: ret.data.wx_pay.signType, //固定值
-				// 			paySign: ret.data.wx_pay.paySign, //签名
-				// 			success: (ren) => {
-				// 				tools.success("支付成功");
-				// 				this.isAJAX = false;
-				// 				this.page = 1;
-				// 				this.list = [];
-				// 				this.expressOrderList()
-				// 			},
-				// 			fail: (err) => {
-				// 				this.isAJAX = false;
-				// 				tools.error("支付失败");
-				// 			},
-				// 		});
-				// 	} else {
-				// 		this.isAJAX = false;
-				// 		tools.error("支付失败");
-				// 	}
-				// })
-			},
-			groupPay(id) {
-				// 团购支付
-				uni.redirectTo({
-					url: `/pages-buy/group-pay-page?orderId=${id}`
-				});
-				return
-				// if (this.isAJAX) {
-				// 	return
-				// }
-				// this.isAJAX = true;
-				// groupPay({
-				// 	order_id: id
-				// }).then((ret) => {
-				// 	if (ret.code === 1) {
-				// 		uni.requestPayment({
-				// 			provider: "wxpay", //支付类型-固定值
-				// 			timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
-				// 			nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
-				// 			package: ret.data.wx_pay.package, // 固定值
-				// 			signType: ret.data.wx_pay.signType, //固定值
-				// 			paySign: ret.data.wx_pay.paySign, //签名
-				// 			success: (ren) => {
-				// 				tools.success("支付成功");
-				// 				this.isAJAX = false;
-				// 				this.page = 1;
-				// 				this.list = [];
-				// 				this.groupOrderList()
-				// 			},
-				// 			fail: (err) => {
-				// 				this.isAJAX = false;
-				// 				tools.error("支付失败");
-				// 			},
-				// 		});
-				// 	} else {
-				// 		this.isAJAX = false;
-				// 		tools.error("支付失败");
-				// 	}
-				// })
-			},
-			errandsOrderPay(id) {
-				// 跑腿支付
-				uni.redirectTo({
-					url: `/pages-takeout/run-errands-mod/pay-page?orderId=${id}`
-				});
-				return
-				// if (this.isAJAX) {
-				// 	return
-				// }
-				// this.isAJAX = true;
-				// errandsOrderPay({
-				// 	order_id: id
-				// }).then((ret) => {
-				// 	if (ret.code === 1) {
-				// 		uni.requestPayment({
-				// 			provider: "wxpay", //支付类型-固定值
-				// 			timeStamp: ret.data.wx_pay.timeStamp + "", // 时间戳(单位:秒)
-				// 			nonceStr: ret.data.wx_pay.nonceStr, // 随机字符串
-				// 			package: ret.data.wx_pay.package, // 固定值
-				// 			signType: ret.data.wx_pay.signType, //固定值
-				// 			paySign: ret.data.wx_pay.paySign, //签名
-				// 			success: (ren) => {
-				// 				tools.success("支付成功");
-				// 				this.isAJAX = false;
-				// 				this.page = 1;
-				// 				this.list = [];
-				// 				this.errandsOrderList()
-				// 			},
-				// 			fail: (err) => {
-				// 				this.isAJAX = false;
-				// 				tools.error("支付失败");
-				// 			},
-				// 		});
-				// 	} else {
-				// 		this.isAJAX = false;
-				// 		tools.error("支付失败");
-				// 	}
-				// })
-			},
-			laundryPay(id) {
-				// 干洗支付
 				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
-				laundryPay({
+				orderPay({
 					order_id: id
 				}).then((ret) => {
 					if (ret.code === 1) {
@@ -819,7 +183,7 @@
 								this.isAJAX = false;
 								this.page = 1;
 								this.list = [];
-								this.laundryOrderList()
+								this.orderList()
 							},
 							fail: (err) => {
 								this.isAJAX = false;
@@ -831,7 +195,7 @@
 						tools.error("支付失败");
 					}
 				})
-			}
+			},
 		},
 	}
 </script>