py 2 éve
szülő
commit
f8a0f06132

+ 0 - 1
api/express.js

@@ -9,6 +9,5 @@ export const getExpressServe = (data) => request(newsUrl + 'serve', 'post', { ..
 export const getExpressCoupon = (data) => request(newsUrl + 'coupon', 'post', { ...data },false)
 // 创建订单
 export const getExpressCreate = (data) => request(newsUrl + 'create', 'post', { ...data },false)
-
 // 创建支付
 export const getExpressPay = (data) => request('/api/expressOrder/' + 'pay', 'post', { ...data },false)

+ 4 - 3
pages-buy/dry-clean.vue

@@ -93,7 +93,7 @@
 										class="right-only-right-2 text-align-center fs-28 fw-400">{{item.number}}</view>
 									<image class="wh-44" src="@/static/img/takeout/add.png" @click="addred(2,item)"
 										mode=""></image>
-<!-- 									<view class="right-only-right-add fw-500 text-align-center fs-36 fc-f"
+									<!-- 									<view class="right-only-right-add fw-500 text-align-center fs-36 fc-f"
 										@click="addred(2,item)">+</view> -->
 								</view>
 							</view>
@@ -288,9 +288,9 @@
 				if (!this.siteData.id) {
 					return tools.error('请选择站点')
 				}
+				console.log(this.siteData, '$$$$$$$$$$$');
 				uni.navigateTo({
-					url: '/pages-buy/save-dry?id=' + this.siteData.id + '&siteData_logo=' + this.siteData.logo +
-						'&siteData_name=' + this.siteData.name
+					url: '/pages-buy/save-dry?id=' + this.siteData.id + '&siteData_name=' + this.siteData.name + '&siteData_logo=' + this.siteData.logo 
 				})
 			},
 		},
@@ -302,6 +302,7 @@
 		width: 44rpx;
 		height: 44rpx;
 	}
+
 	.use-box {
 		width: 100%;
 		height: 70vh;

+ 2 - 1
pages-buy/group-det.vue

@@ -72,6 +72,7 @@
 		<view class="bottom-box box-border-box p-24">
 			<view class="flex-justify-space">
 				<view class="align-items-flex-end box-1">
+					<span class="fs-28 fc-FB3D03 fw-600">定金 </span>
 					<span class="fs-28 fc-FB3D03 fw-600">¥</span>
 					<span class="fs-44 fc-FB3D03 fw-600">{{obj.deposit||''}}</span>
 				</view>
@@ -175,8 +176,8 @@
 						cover_img:this.obj.cover_img,
 						deposit:this.obj.deposit,
 						id:this.obj.id,
+						price: this.obj.price
 					}
-					
 					uni.navigateTo({
 						url:'/pages-buy/save-order?goodsData=' + encodeURIComponent(JSON.stringify(goodsData))
 					})

+ 14 - 2
pages-buy/save-dry.vue

@@ -129,6 +129,7 @@
 			}
 		},
 		onLoad(e) {
+			console.log(e, '//////////////////////');
 			this.fromData.site_id = e.id;
 			this.siteData_logo = e.siteData_logo
 			this.siteData_name = e.siteData_name
@@ -198,16 +199,26 @@
 											uni.switchTab({
 												url: "/pages/order/index"
 											})
-										}, 1500)
+										}, 1000)
 									},
 									fail: (err) => {
 										this.isAJAX = false;
 										tools.error("支付失败");
+										setTimeout(() => {
+											uni.switchTab({
+												url: "/pages/order/index"
+											})
+										}, 1000)
 									},
 								});
 							} else {
 								this.isAJAX = false;
 								tools.error("支付失败");
+								setTimeout(() => {
+									uni.switchTab({
+										url: "/pages/order/index"
+									})
+								}, 1000)
 							}
 						})
 					} else {
@@ -267,11 +278,12 @@
 </script>
 
 <style scoped lang="scss">
-	.wh48{
+	.wh48 {
 		width: 48rpx;
 		height: 48rpx;
 		border-radius: 50%;
 	}
+
 	.save-order-box {
 		position: relative;
 

+ 135 - 94
pages-buy/save-order.vue

@@ -2,7 +2,7 @@
 	<view class="save-order-box iPhone-bottom flex-common-css box-border-box">
 		<view class="bg-box"></view>
 		<Nav title='提交订单' bgckgroundBox='transparent'></Nav>
-		
+
 		<view class="scroll-view-css box-border-box p-24">
 			<view class="box-card box-border-box mb-20 bgc-f">
 				<view class="box-input align-items-center box-border-box p-b-20 mb-20">
@@ -12,7 +12,7 @@
 				<view class="box-input align-items-center box-border-box p-b-20 mb-20">
 					<view class="fs-28 fw-600 w158">手机号</view>
 					<input v-model="fromData.phone" type="number" placeholder="请输入手机号">
-					
+
 				</view>
 				<view class="box-input align-items-center box-border-box p-b-20 mb-20">
 					<view class="fs-28 fw-600 w158">验证码</view>
@@ -24,28 +24,33 @@
 					<input v-model="fromData.address" type="text" placeholder="请输入联系地址(选填)">
 				</view>
 			</view>
-			
+
 			<view class="box-card box-border-box mb-20 bgc-f">
 				<view class="box-top box-border-box flex-justify-space">
 					<view class="box-left display-flex">
 						<image :src="goodsData.cover_img" mode="aspectFill"></image>
-						<view class="w336 fs-28 fw-400">{{goodsData.title||''}}</view>
+						<view class="">
+							<view class="w336 fs-28 fw-400 mb-4">{{goodsData.title||''}}</view>
+							<view class="fs-28 fc-9">
+								x 1
+							</view>
+						</view>
 					</view>
 					<view class="box-right">
-						<view class="fs-32 fw-600 text-align-right mb-12">¥19.5</view>
+						<view class="fs-32 fw-600 text-align-right mb-12">¥{{goodsData.price || '0'}}</view>
 					</view>
 				</view>
 				<view class="box-buttom text-align-right">
-					<span class="fs-28 fc-0 fw-400">合计¥</span>
-					<span class="fs-44 fc-0 fw-b">{{goodsData.deposit||''}}</span>
+					<span class="fs-28 fc-0 fw-400">定金¥</span>
+					<span class="fs-44 fc-0 fw-b">{{goodsData.deposit||'0'}}</span>
 				</view>
 			</view>
-			
+
 			<view class="box-card box-border-box mb-20 bgc-f flex-justify-space">
 				<view class="fs-28 fw-600 w158">备注</view>
 				<input v-model="fromData.note" class="text-align-right" type="text" placeholder="请填写你的备注">
 			</view>
-			
+
 			<view class="box-card box-border-box mb-20 bgc-f flex-justify-space">
 				<view class="fs-28 fw-600 w158">支付方式</view>
 				<view class="wx-box display-flex">
@@ -54,7 +59,7 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="bottom-box box-border-box p-24">
 			<view class="flex-justify-space">
 				<view class="align-items-flex-end box-1">
@@ -68,102 +73,123 @@
 </template>
 
 <script>
-	import {getCode} from '@/api/common.js';
-	import {groupPay,groupCreate} from '@/api/groupOrder.js';
+	import {
+		getCode
+	} from '@/api/common.js';
+	import {
+		groupPay,
+		groupCreate
+	} from '@/api/groupOrder.js';
 	import tools from "@/service/tools";
-	
+
 	export default {
-		data(){
-			return{
-				isCode:false,
-				codeText:'获取验证码',
-				
-				fromData:{
-					name:'',
-					id:'',
-					phone:'',
-					school_id:'',
-					code:'',
-					note:'',
-					address:'',
+		data() {
+			return {
+				isCode: false,
+				codeText: '获取验证码',
+
+				fromData: {
+					name: '',
+					id: '',
+					phone: '',
+					school_id: '',
+					code: '',
+					note: '',
+					address: '',
 				},
-				isAJAX:false,
-				
-				goodsData:{},
+				isAJAX: false,
+
+				goodsData: {},
 			}
 		},
 		onLoad(e) {
-			if(e.goodsData){
+			if (e.goodsData) {
 				let obj = JSON.parse(decodeURIComponent(e.goodsData));
 				this.goodsData = obj;
 				this.fromData.id = obj.id;
+				console.log(this.goodsData, '*********');
 			}
 		},
-		methods:{
-			getCode(){
-				if(!this.fromData.phone){
+		methods: {
+			getCode() {
+				if (!this.fromData.phone) {
 					return tools.error('请输入手机号')
 				}
-				
+
 				if (this.isCode) {
 					return
 				}
 				this.isCode = true;
-				getCode({phone:this.fromData.phone,send_type:'group_order'}).then((res)=>{
-					if(res.code === 1){
+				getCode({
+					phone: this.fromData.phone,
+					send_type: 'group_order'
+				}).then((res) => {
+					if (res.code === 1) {
 						this.codeText = 60;
 						let timer = setInterval(() => {
-						  this.codeText -= 1;
-						  if (this.codeText <= 0) {
-						    clearInterval(timer);
-							this.isCode = false;
-							this.codeText = '获取验证码'
-						  }
+							this.codeText -= 1;
+							if (this.codeText <= 0) {
+								clearInterval(timer);
+								this.isCode = false;
+								this.codeText = '获取验证码'
+							}
 						}, 1000);
-					}else{
+					} else {
 						this.isCode = false;
 						tools.error('获取验证码失败,请稍后重试')
 					}
 				})
-				
+
 			},
-			toSave(){
+			toSave() {
 				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
 				this.fromData.school_id = uni.getStorageSync('school_id');
-				groupCreate(this.fromData).then((res)=>{
-					if(res.code === 1){
-						groupPay({order_id:res.data.order_id}).then((ret)=>{
-							if(ret.code === 1){
+				groupCreate(this.fromData).then((res) => {
+					if (res.code === 1) {
+						groupPay({
+							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.switchTab({
-											url:"/pages/order/index"
-										})
-									},1500)
-								  },
-								  fail: (err) =>{
-									this.isAJAX = false;
-								    tools.error("支付失败");
-								  },
+									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.switchTab({
+												url: "/pages/order/index"
+											})
+										}, 1000)
+									},
+									fail: (err) => {
+										this.isAJAX = false;
+										tools.error("支付失败");
+										setTimeout(() => {
+											uni.switchTab({
+												url: "/pages/order/index"
+											})
+										}, 1000)
+									},
 								});
-							}else{
+							} else {
 								this.isAJAX = false;
 								tools.error("支付失败");
+								setTimeout(() => {
+									uni.switchTab({
+										url: "/pages/order/index"
+									})
+								}, 1000)
 							}
 						})
-					}else{
+					} else {
 						this.isAJAX = false;
 						tools.error(res.msg);
 					}
@@ -174,10 +200,10 @@
 </script>
 
 <style scoped lang="scss">
-	.save-order-box{
+	.save-order-box {
 		position: relative;
-		
-		.right-only-right-red{
+
+		.right-only-right-red {
 			width: 44rpx;
 			height: 44rpx;
 			line-height: 40rpx;
@@ -185,30 +211,34 @@
 			border: 1rpx solid #41ABF5;
 			color: #41ABF5;
 		}
-		.right-only-right-add{
+
+		.right-only-right-add {
 			width: 44rpx;
 			height: 44rpx;
 			line-height: 40rpx;
-			background: linear-gradient( 117deg, #57CAFF 0%, #41ABF5 100%);
+			background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
 			border-radius: 12rpx;
 		}
-		.right-only-right-2{
+
+		.right-only-right-2 {
 			min-width: 50rpx;
 		}
-		
-		.bg-box{
+
+		.bg-box {
 			width: 100%;
 			height: 448rpx;
 			filter: blur(80rpx);
-			background: linear-gradient(to right,rgba(176, 252, 250, 0.6),rgba(249,246,224,0.87),rgba(249,246,224,0.87));
+			background: linear-gradient(to right, rgba(176, 252, 250, 0.6), rgba(249, 246, 224, 0.87), rgba(249, 246, 224, 0.87));
 			position: absolute;
 			top: 0;
 			left: 0;
 			z-index: -1;
 		}
-		.bottom-box{
+
+		.bottom-box {
 			background-color: #fff;
-			.box-1{
+
+			.box-1 {
 				flex: 1;
 				height: 100rpx;
 				background: #333;
@@ -217,7 +247,8 @@
 				padding-left: 32rpx;
 				padding-bottom: 20rpx;
 			}
-			.box-2{
+
+			.box-2 {
 				width: 200rpx;
 				height: 100rpx;
 				line-height: 100rpx;
@@ -226,48 +257,58 @@
 				text-align: center;
 			}
 		}
-		.box-card{
+
+		.box-card {
 			width: 100%;
 			min-height: 88rpx;
 			border-radius: 20rpx;
 			padding: 24rpx 24rpx 0 24rpx;
-			.box-top{
+
+			.box-top {
 				padding-bottom: 24rpx;
 				border-bottom: 2rpx solid #F9F9F9;
 				margin-bottom: 24rpx;
-				.box-left{
-					image{
+
+				.box-left {
+					image {
 						width: 108rpx;
 						height: 108rpx;
 						border-radius: 8rpx;
 						margin-right: 16rpx;
 					}
-					.w336{
+
+					.w336 {
 						width: 336rpx;
 					}
 				}
 			}
-			.box-buttom{
+
+			.box-buttom {
 				padding-bottom: 24rpx;
 			}
 		}
-		.box-input{
+
+		.box-input {
 			border-bottom: 2rpx solid #F9F9F9;
 			position: relative;
-			.w158{
+
+			.w158 {
 				width: 158rpx;
 			}
-			input{
+
+			input {
 				font-size: 28rpx;
 			}
-			.code-box{
+
+			.code-box {
 				position: absolute;
 				right: 0;
 				top: 0;
 			}
 		}
-		.wx-box{
-			image{
+
+		.wx-box {
+			image {
 				width: 40rpx;
 				height: 40rpx;
 			}

+ 142 - 97
pages-buy/save-ticket.vue

@@ -2,7 +2,7 @@
 	<view class="save-order-box iPhone-bottom flex-common-css box-border-box">
 		<view class="bg-box"></view>
 		<Nav title='提交订单' bgckgroundBox='transparent'></Nav>
-		
+
 		<view class="scroll-view-css box-border-box p-24">
 			<view class="box-card box-border-box mb-20 bgc-f">
 				<view class="box-input align-items-center box-border-box p-b-20 mb-20">
@@ -17,14 +17,14 @@
 				<view class="box-input align-items-center box-border-box p-b-20 mb-20">
 					<view class="fs-28 fw-600 w158">验证码</view>
 					<input v-model="fromData.code" type="number" placeholder="请输入验证码">
-					
+
 				</view>
 				<view class="box-input align-items-center box-border-box p-b-20 mb-20">
 					<view class="fs-28 fw-600 w158">联系地址</view>
 					<input v-model="fromData.address" type="text" placeholder="请输入联系地址(选填)">
 				</view>
 			</view>
-			
+
 			<view class="box-card box-border-box mb-20 bgc-f">
 				<view class="box-top box-border-box flex-justify-space">
 					<view class="box-left display-flex">
@@ -34,9 +34,13 @@
 					<view class="box-right">
 						<view class="fs-32 fw-600 text-align-right mb-12">¥{{goodsData.price||''}}</view>
 						<view class="display-flex align-items-center">
-							<view class="right-only-right-red fw-500 text-align-center fs-36 fc-f" @click="setNum(1)">-</view>
+							<!-- 							<view class="right-only-right-red fw-500 text-align-center fs-36 fc-f" @click="setNum(1)">-
+							</view> -->
+							<image class="wh-44" @click="setNum(1)" src="@/static/img/takeout/j.png" mode=""></image>
 							<view class="right-only-right-2 text-align-center fs-28 fw-400">{{fromData.number}}</view>
-							<view class="right-only-right-add fw-500 text-align-center fs-36 fc-f" @click="setNum(2)">+</view>
+							<image class="wh-44" src="@/static/img/takeout/add.png" @click="setNum(2)" mode=""></image>
+							<!-- <view class="right-only-right-add fw-500 text-align-center fs-36 fc-f" @click="setNum(2)">+
+							</view> -->
 						</view>
 					</view>
 				</view>
@@ -46,12 +50,12 @@
 					<span class="fs-44 fc-0 fw-b">{{goodsData.price?Number(goodsData.price)*fromData.number:''}}</span>
 				</view>
 			</view>
-			
+
 			<view class="box-card box-border-box mb-20 bgc-f flex-justify-space">
 				<view class="fs-28 fw-600 w158">备注</view>
 				<input v-model="fromData.note" class="text-align-right" type="text" placeholder="请填写你的备注">
 			</view>
-			
+
 			<view class="box-card box-border-box mb-20 bgc-f flex-justify-space">
 				<view class="fs-28 fw-600 w158">支付方式</view>
 				<view class="wx-box display-flex">
@@ -60,12 +64,13 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="bottom-box box-border-box p-24">
 			<view class="flex-justify-space">
 				<view class="align-items-flex-end box-1">
 					<span class="fs-28 fc-f fw-600">¥</span>
-					<span class="fs-44 fc-f fw-600">{{goodsData.price?Number(goodsData.price)*fromData.number:''}}</span>
+					<span
+						class="fs-44 fc-f fw-600">{{goodsData.price?Number(goodsData.price)*fromData.number:''}}</span>
 				</view>
 				<view class="text-align-center box-2 fs-32 fc-f fw-600" @click="toSave()">立即支付</view>
 			</view>
@@ -74,110 +79,130 @@
 </template>
 
 <script>
-	import {getCode} from '@/api/common.js'
-	import {ticketCreate,ticketPay} from '@/api/ticket.js';
+	import {
+		getCode
+	} from '@/api/common.js'
+	import {
+		ticketCreate,
+		ticketPay
+	} from '@/api/ticket.js';
 	import tools from "@/service/tools";
-	
+
 	export default {
-		data(){
-			return{
-				isCode:false,
-				codeText:'获取验证码',
-				
-				fromData:{
-					name:'',
-					id:'',
-					phone:'',
-					school_id:'',
-					code:'',
-					note:'',
-					address:'',
-					number:1,
+		data() {
+			return {
+				isCode: false,
+				codeText: '获取验证码',
+
+				fromData: {
+					name: '',
+					id: '',
+					phone: '',
+					school_id: '',
+					code: '',
+					note: '',
+					address: '',
+					number: 1,
 				},
-				isAJAX:false,
-				
-				goodsData:{},
+				isAJAX: false,
+
+				goodsData: {},
 			}
 		},
 		onLoad(e) {
-			if(e.goodsData){
+			if (e.goodsData) {
 				let obj = JSON.parse(decodeURIComponent(e.goodsData));
 				this.goodsData = obj;
 				this.fromData.id = obj.id;
 			}
 		},
-		methods:{
-			getCode(){
+		methods: {
+			getCode() {
 				if (this.isCode) {
 					return
 				}
 				this.isCode = true;
-				getCode({phone:this.fromData.phone,send_type:'ticket_order'}).then((res)=>{
-					if(res.code === 1){
+				getCode({
+					phone: this.fromData.phone,
+					send_type: 'ticket_order'
+				}).then((res) => {
+					if (res.code === 1) {
 						this.codeText = 60;
 						let timer = setInterval(() => {
-						  this.codeText -= 1;
-						  if (this.codeText <= 0) {
-						    clearInterval(timer);
-							this.isCode = false;
-							this.codeText = '获取验证码'
-						  }
+							this.codeText -= 1;
+							if (this.codeText <= 0) {
+								clearInterval(timer);
+								this.isCode = false;
+								this.codeText = '获取验证码'
+							}
 						}, 1000);
-					}else{
+					} else {
 						this.isCode = false;
 						tools.error('获取验证码失败,请稍后重试')
 					}
 				})
-				
+
 			},
-			setNum(type){
-				if(type == 1){
-					if(this.fromData.number <= 1){
+			setNum(type) {
+				if (type == 1) {
+					if (this.fromData.number <= 1) {
 						return
-					}else{
+					} else {
 						this.fromData.number -= 1;
 					}
-				}else{
+				} else {
 					this.fromData.number += 1;
 				}
 			},
-			toSave(){
+			toSave() {
 				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
 				this.fromData.school_id = uni.getStorageSync('school_id');
-				ticketCreate(this.fromData).then((res)=>{
-					if(res.code === 1){
-						ticketPay({order_id:res.data.order_id}).then((ret)=>{
-							if(ret.code === 1){
+				ticketCreate(this.fromData).then((res) => {
+					if (res.code === 1) {
+						ticketPay({
+							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.switchTab({
-											url:"/pages/order/index"
-										})
-									},1500)
-								  },
-								  fail: (err) =>{
-									this.isAJAX = false;
-								    tools.error("支付失败");
-								  },
+									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.switchTab({
+												url: "/pages/order/index"
+											})
+										}, 1000)
+									},
+									fail: (err) => {
+										this.isAJAX = false;
+										tools.error("支付失败");
+										setTimeout(() => {
+											uni.switchTab({
+												url: "/pages/order/index"
+											})
+										}, 1000)
+									},
 								});
-							}else{
+							} else {
 								this.isAJAX = false;
 								tools.error("支付失败");
+								setTimeout(() => {
+									uni.switchTab({
+										url: "/pages/order/index"
+									})
+								}, 1000)
 							}
 						})
-					}else{
+					} else {
 						this.isAJAX = false;
 						tools.error(res.msg);
 					}
@@ -188,10 +213,15 @@
 </script>
 
 <style scoped lang="scss">
-	.save-order-box{
+	.wh-44 {
+		width: 44rpx;
+		height: 44rpx;
+	}
+
+	.save-order-box {
 		position: relative;
-		
-		.right-only-right-red{
+
+		.right-only-right-red {
 			width: 44rpx;
 			height: 44rpx;
 			line-height: 40rpx;
@@ -199,30 +229,34 @@
 			border: 1rpx solid #41ABF5;
 			color: #41ABF5;
 		}
-		.right-only-right-add{
+
+		.right-only-right-add {
 			width: 44rpx;
 			height: 44rpx;
 			line-height: 40rpx;
-			background: linear-gradient( 117deg, #57CAFF 0%, #41ABF5 100%);
+			background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
 			border-radius: 12rpx;
 		}
-		.right-only-right-2{
+
+		.right-only-right-2 {
 			min-width: 50rpx;
 		}
-		
-		.bg-box{
+
+		.bg-box {
 			width: 100%;
 			height: 448rpx;
 			filter: blur(80rpx);
-			background: linear-gradient(to right,rgba(176, 252, 250, 0.6),rgba(249,246,224,0.87),rgba(249,246,224,0.87));
+			background: linear-gradient(to right, rgba(176, 252, 250, 0.6), rgba(249, 246, 224, 0.87), rgba(249, 246, 224, 0.87));
 			position: absolute;
 			top: 0;
 			left: 0;
 			z-index: -1;
 		}
-		.bottom-box{
+
+		.bottom-box {
 			background-color: #fff;
-			.box-1{
+
+			.box-1 {
 				flex: 1;
 				height: 100rpx;
 				background: #333;
@@ -231,7 +265,8 @@
 				padding-left: 32rpx;
 				padding-bottom: 20rpx;
 			}
-			.box-2{
+
+			.box-2 {
 				width: 200rpx;
 				height: 100rpx;
 				line-height: 100rpx;
@@ -240,48 +275,58 @@
 				text-align: center;
 			}
 		}
-		.box-card{
+
+		.box-card {
 			width: 100%;
 			min-height: 88rpx;
 			border-radius: 20rpx;
 			padding: 24rpx 24rpx 0 24rpx;
-			.box-top{
+
+			.box-top {
 				padding-bottom: 24rpx;
 				border-bottom: 2rpx solid #F9F9F9;
 				margin-bottom: 24rpx;
-				.box-left{
-					image{
+
+				.box-left {
+					image {
 						width: 108rpx;
 						height: 108rpx;
 						border-radius: 8rpx;
 						margin-right: 16rpx;
 					}
-					.w336{
+
+					.w336 {
 						width: 336rpx;
 					}
 				}
 			}
-			.box-buttom{
+
+			.box-buttom {
 				padding-bottom: 24rpx;
 			}
 		}
-		.box-input{
+
+		.box-input {
 			border-bottom: 2rpx solid #F9F9F9;
 			position: relative;
-			.w158{
+
+			.w158 {
 				width: 158rpx;
 			}
-			input{
+
+			input {
 				font-size: 28rpx;
 			}
-			.code-box{
+
+			.code-box {
 				position: absolute;
 				right: 0;
 				top: 0;
 			}
 		}
-		.wx-box{
-			image{
+
+		.wx-box {
+			image {
 				width: 40rpx;
 				height: 40rpx;
 			}

+ 6 - 3
pages-my/ticket-centre.vue

@@ -18,8 +18,11 @@
 						<view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fc-3 fw-600">
 							{{item.name}}
 						</view>
-						<view class="fs-24 fc-6">
-							有效时间:{{item.start_time}} - {{item.end_time}}
+						<view class="fs-24 fc-6 mb-12">
+							有效时间:{{item.time_type_str}}
+						</view>
+						<view class="fs-22 fc-6">
+							券类型:{{item.scene == 1?'外卖卷':'代取卷'}}
 						</view>
 					</view>
 					<view class="item-hr"></view>
@@ -29,7 +32,7 @@
 							<view class="fs-48 fw-600 fc-FB3D03">{{item.money}}</view>
 						</view>
 						<view class="fs-24 mb-18 fc-6">
-							{{item.desc}}
+							需满{{item.full_money}}元
 						</view>
 						<view class="but-box fs-28 fc-f" @click="receive(item)">立即领取</view>
 						<view class="ball"></view>

+ 3 - 3
pages-order/group-info.vue

@@ -32,7 +32,7 @@
 						</view>
 					</view>
 					<view @click="goToUrl" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 4 || infoData.order_status == 6">
+						v-show="infoData.order_status == 2 || infoData.order_status == 3 || infoData.order_status == 4">
 						<image class="mb-4 icon" src="@/static/img/order/zlyd.png" mode=""></image>
 						<view class="fs-24 fc-41ABF5">
 							再来一单
@@ -119,10 +119,10 @@
 			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
 				<view class="display-flex flex-justify-space mb-26">
 					<view class="fs-28 fc-9">
-						配送地址
+						联系地址
 					</view>
 					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.address}}
+						{{infoData.address?infoData.address:'无'}}
 					</view>
 				</view>
 				<!-- 				<view class="display-flex flex-justify-space mb-26">

+ 14 - 23
pages-order/ticket-info.vue

@@ -32,7 +32,7 @@
 						</view>
 					</view>
 					<view @click="goToUrl" class="w-33 flex-direction align-items-center"
-						v-show="infoData.order_status == 4 || infoData.order_status == 6">
+						v-show="infoData.order_status == 3 || infoData.order_status == 2 || infoData.order_status == 4">
 						<image class="mb-4 icon" src="@/static/img/order/zlyd.png" mode=""></image>
 						<view class="fs-24 fc-41ABF5">
 							再来一单
@@ -54,23 +54,20 @@
 					{{infoData.site_name}}
 				</view> -->
 				<view class="goods-box">
-					<view class="align-items-center flex-justify-space mb-20">
-						<image class="goods-img mr-16 flex-shrink0" :src="infoData.goods_img" mode=""></image>
-						<view class="">
-							<view class="align-items-center flex-justify-space mb-2">
-								<view class="fs-28 fc-3 w-300 text-overflow-ellipsis-one mr-36">
+					<view class="display-flex flex-justify-space mb-20">
+						<view class="align-items-center">
+							<image class="goods-img mr-16 flex-shrink0" :src="infoData.goods_img" mode=""></image>
+							<view class="">
+								<view class="fs-28 fc-3 w-300 text-overflow-ellipsis-one mr-36 mb-8">
 									{{infoData.goods_name}}
 								</view>
 								<view class="fs-32 fc-3 fw-600">
-									¥{{infoData.goods_price}}
+									x{{infoData.goods_number}}
 								</view>
 							</view>
-							<!-- 				<view class="mb-2 fs-24 fc-9">
-								{{item.goods_name}}
-							</view> -->
-							<view class="fs-24 fc-9">
-								x{{infoData.goods_number}}
-							</view>
+						</view>
+						<view class="fs-24 fc-9 p-t-10">
+							¥{{infoData.goods_price}}
 						</view>
 					</view>
 				</view>
@@ -119,10 +116,10 @@
 			<view class="bgc-f b-rad-20 p-24 box-border-box mb-20">
 				<view class="display-flex flex-justify-space mb-26">
 					<view class="fs-28 fc-9">
-						配送地址
+						联系地址
 					</view>
 					<view class="fs-28 fc-3 w-480 text-align-right">
-						{{infoData.address}}
+						{{infoData.address?infoData.address:'无'}}
 					</view>
 				</view>
 				<!-- 				<view class="display-flex flex-justify-space mb-26">
@@ -261,22 +258,16 @@
 					if (res.code == 1) {
 						this.infoData = res.data
 						if (this.infoData.order_status == 1) {
-							// setInterval(() => {
 							let currentDate = new Date(); //获取当前时间
 							let createDate = new Date(res.data.created_at); //格式化订单创建时候的时间
 							createDate.setMinutes(createDate.getMinutes() + 10)
-							console.log(createDate, '----------------');
-							let disDate = (currentDate - createDate) / 1000; //计算相隔分钟
-							let m = parseInt(disDate / 60 % 60, 10); //计算剩余的分钟数
-							let s = parseInt(disDate % 60, 10); //计算剩余的秒数
-							this.time = m + ":" + s
-							// }, 1000)
+							this.setCountDown(createDate)
 						}
 					}
 				})
 			},
 			setCountDown(sTime) {
-				let end = new Date(sTime.replace(/-/g, "/")).getTime();
+				let end = new Date(sTime).getTime();
 				let now = new Date().getTime();
 				let msec = end - now;
 				this.time.day = parseInt(msec / 1000 / 60 / 60 / 24);

+ 21 - 50
pages-takeout/confirm-mod/coupon.vue

@@ -9,14 +9,14 @@
 
 				<view class="flex-justify-around">
 					<view @click="setType(1)" class="fs-28 fw-600 mb-24" :class="type == 1?'fc-41ABF5':''">
-						可用优惠券({{expressCouponData.coupon.length}})</view>
+						可用优惠券({{shopCouponData.coupon.length}})</view>
 					<view @click="setType(2)" class="fs-28 fw-600 mb-24" :class="type == 2?'fc-41ABF5':''">
-						可领优惠券({{expressCouponData.receive.length}})</view>
+						可领优惠券({{shopCouponData.receive.length}})</view>
 				</view>
 
 
 				<view class="scroll-view-css" v-if="type == 1">
-					<view v-if="expressCouponData.coupon.length === 0" class="scroll-view-css">
+					<view v-if="shopCouponData.coupon.length === 0" class="scroll-view-css">
 						<EnBlank :customSrc='true'>
 							<template v-slot:blankImg>
 								<image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
@@ -24,7 +24,7 @@
 						</EnBlank>
 					</view>
 					<scroll-view v-else :scroll-y="true" class="scroll-view-css">
-						<view class="item-box display-flex mb-20" v-for="(item,i) in expressCouponData.coupon" :key="i"
+						<view class="item-box display-flex mb-20" v-for="(item,i) in shopCouponData.coupon" :key="i"
 							@click="setFun(item)">
 							<view class="item-left flex-direction align-items-center flex-justify-center bgc-FCE7E2">
 								<view class="align-items-center">
@@ -32,7 +32,7 @@
 									<view class="fs-48 fw-600 fc-FB3D03">{{item.money}}</view>
 								</view>
 								<view class="fs-24" :class="item.type == 0?'fc-6':'fc-9'">
-									{{item.desc}}
+									需满{{item.full_money}}元
 								</view>
 								<view class="ball"></view>
 								<view class="ball-two"></view>
@@ -43,19 +43,20 @@
 									{{item.name}}
 								</view>
 								<view class="fs-24 mb-12 fc-FB3D03">
-									{{item.start_time}} - {{item.end_time}}
+									有效时间:{{item.time_type_str}}
+								</view>
+								<view class="fs-24 fc-6">
+									券类型:{{item.scene == 1?'外卖券':'代取券'}}
 								</view>
 							</view>
-
 							<image v-if="coupon_id==item.id" class="s-icon" src="@/static/img/common/y-select.png"
 								mode=""></image>
 							<image v-else class="s-icon" src="@/static/img/common/n-select.png" mode=""></image>
 						</view>
 					</scroll-view>
 				</view>
-
 				<view class="scroll-view-css" v-else>
-					<view v-if="expressCouponData.receive.length === 0" class="scroll-view-css">
+					<view v-if="shopCouponData.receive.length === 0" class="scroll-view-css">
 						<EnBlank :customSrc='true'>
 							<template v-slot:blankImg>
 								<image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
@@ -63,13 +64,13 @@
 						</EnBlank>
 					</view>
 					<view v-else class="scroll-view-css">
-						<view class=" display-flex mb-20" v-for="(item,i) in expressCouponData.receive" :key="i">
+						<view class=" display-flex mb-20" v-for="(item,i) in shopCouponData.receive" :key="i">
 							<view class="item-right flex-direction flex-justify-center flex-1 bgc-f">
 								<view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fc-3 fw-600">
 									{{item.name}}
 								</view>
 								<view class="fs-24 fc-6 mb-12">
-									有效时间:{{item.start_time}} - {{item.end_time}}
+									有效时间:{{item.time_type_str}}
 								</view>
 								<view class="flex-justify-space">
 									<view class="fs-24 fc-6">
@@ -84,7 +85,7 @@
 									<view class="fs-48 fw-600 fc-FB3D03">{{item.money}}</view>
 								</view>
 								<view class="fs-24 mb-18 fc-6">
-									{{item.desc}}
+									需满{{item.full_money}}元
 								</view>
 								<view class="but-box fs-28 fc-f" @click="getFun(item)">立即领取</view>
 								<view class="ball"></view>
@@ -100,9 +101,6 @@
 
 <script>
 	import EnBlank from "@/components/en-utils/en-blank/en-blank";
-	import {
-		getExpressCoupon
-	} from '@/api/express.js';
 	import {
 		receiveCoupon
 	} from '@/api/coupon.js';
@@ -118,14 +116,13 @@
 			return {
 				type: 1, //1可用类型 2可领类型
 				coupon_id: 1,
-				dataType: '', //1外卖 2代取 3干洗
 				isAJAX: false,
-
 				// 代取优惠券
-				expressCouponData: {
+				shopCouponData: {
 					coupon: [], //可用
 					receive: [], //可领
 				},
+				shop_id: ''
 			}
 		},
 		methods: {
@@ -136,25 +133,8 @@
 				} else {
 					this.coupon_id = '';
 				}
-				this.dataType = Number(e)
-				if (e == 1) {
-					this.shopOrderCoupon(shop_id)
-				} else if (e == 2) {
-					this.getExpressCoupon()
-				}
-			},
-
-			// 代取 获取优惠券
-			getExpressCoupon() {
-				let operate_id = uni.getStorageSync('operate_id');
-				getExpressCoupon({
-					operate_id: operate_id
-				}).then((res) => {
-					if (res.code === 1) {
-						this.expressCouponData = res.data;
-						this.openPop();
-					}
-				})
+				this.shop_id = shop_id
+				this.shopOrderCoupon(shop_id)
 			},
 			shopOrderCoupon(shop_id) {
 				// 下单是获取优惠卷
@@ -164,12 +144,11 @@
 					shop_id: shop_id
 				}).then((res) => {
 					if (res.code === 1) {
-						this.expressCouponData = res.data;
+						this.shopCouponData = res.data;
 						this.openPop();
 					}
 				})
 			},
-
 			setType(type) {
 				if (type != this.type) {
 					this.type = type
@@ -181,7 +160,6 @@
 			closeCoupon() {
 				this.$refs.popupCoupon.close();
 			},
-
 			setFun(item) {
 				this.$emit('giveCouPon', item);
 				this.closeCoupon();
@@ -199,21 +177,14 @@
 					if (res.code === 1) {
 						this.isAJAX = false;
 						tools.success('领取成功');
-						this.resetList();
+						this.shopCouponData = []
+						this.shopOrderCoupon(this.shop_id)
 					} else {
 						this.isAJAX = false;
 						tools.success('领取失败');
 					}
 				})
-			},
-
-			resetList() {
-				if (this.dataType == 1) {
-
-				} else if (this.dataType == 2) {
-					this.getExpressCoupon()
-				}
-			},
+			}
 		},
 	}
 </script>

+ 281 - 0
pages-takeout/confirm-mod/dryClean-coupon.vue

@@ -0,0 +1,281 @@
+<template>
+	<view>
+		<uni-popup ref="popupCoupon" type="bottom">
+			<view class="pop-coupon box-border-box p-24">
+				<view class="text-align-center fs-36 fw-600 box-title mb-32">
+					选择优惠券
+					<uni-icons @click="closeCoupon" class="box-close" type="closeempty" size="20"></uni-icons>
+				</view>
+				<view class="flex-justify-around">
+					<view @click="setType(1)" class="fs-28 fw-600 mb-24" :class="type == 1?'fc-41ABF5':''">
+						可用优惠券({{expressCouponData.coupon.length}})</view>
+					<view @click="setType(2)" class="fs-28 fw-600 mb-24" :class="type == 2?'fc-41ABF5':''">
+						可领优惠券({{expressCouponData.receive.length}})</view>
+				</view>
+				<view class="scroll-view-css" v-if="type == 1">
+					<view v-if="expressCouponData.coupon.length === 0" class="scroll-view-css">
+						<EnBlank :customSrc='true'>
+							<template v-slot:blankImg>
+								<image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
+							</template>
+						</EnBlank>
+					</view>
+					<scroll-view v-else :scroll-y="true" class="scroll-view-css">
+						<view class="item-box display-flex mb-20" v-for="(item,i) in expressCouponData.coupon" :key="i"
+							@click="setFun(item)">
+							<view class="item-left flex-direction align-items-center flex-justify-center bgc-FCE7E2">
+								<view class="align-items-center">
+									<view class="fs-30 fw-600 fc-FB3D03">¥</view>
+									<view class="fs-48 fw-600 fc-FB3D03">{{item.money}}</view>
+								</view>
+								<view class="fs-24" :class="item.type == 0?'fc-6':'fc-9'">
+									需满{{item.full_money}}元
+								</view>
+								<view class="ball"></view>
+								<view class="ball-two"></view>
+							</view>
+							<view class="item-hr"></view>
+							<view class="item-right flex-1 bgc-f">
+								<view class="fs-28 fw-600 mb-12 ticket-name text-overflow-ellipsis w382">
+									{{item.name}}
+								</view>
+								<view class="fs-24 mb-12 fc-FB3D03">
+									有效时间:{{item.time_type_str}}
+								</view>
+								<view class="fs-24 fc-6">
+									券类型:{{item.scene == 1?'外卖券':'代取券'}}
+								</view>
+							</view>
+							<image v-if="coupon_id==item.id" class="s-icon" src="@/static/img/common/y-select.png"
+								mode=""></image>
+							<image v-else class="s-icon" src="@/static/img/common/n-select.png" mode=""></image>
+						</view>
+					</scroll-view>
+				</view>
+				<view class="scroll-view-css" v-else>
+					<view v-if="expressCouponData.receive.length === 0" class="scroll-view-css">
+						<EnBlank :customSrc='true'>
+							<template v-slot:blankImg>
+								<image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
+							</template>
+						</EnBlank>
+					</view>
+					<view v-else class="scroll-view-css">
+						<view class=" display-flex mb-20" v-for="(item,i) in expressCouponData.receive" :key="i">
+							<view class="item-right flex-direction flex-justify-center flex-1 bgc-f">
+								<view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fc-3 fw-600">
+									{{item.name}}
+								</view>
+								<view class="fs-24 fc-6 mb-12">
+									有效时间:{{item.time_type_str}}
+								</view>
+								<view class="flex-justify-space">
+									<view class="fs-24 fc-6">
+										券类型:{{item.scene == 1?'外卖券':'代取券'}}
+									</view>
+								</view>
+							</view>
+							<view class="item-hr"></view>
+							<view class="item-left flex-direction align-items-center flex-justify-center bgc-FCE7E2">
+								<view class="align-items-center">
+									<view class="fs-30 fw-600 fc-FB3D03">¥</view>
+									<view class="fs-48 fw-600 fc-FB3D03">{{item.money}}</view>
+								</view>
+								<view class="fs-24 mb-18 fc-6">
+									需满{{item.full_money}}元
+								</view>
+								<view class="but-box fs-28 fc-f" @click="getFun(item)">立即领取</view>
+								<view class="ball"></view>
+								<view class="ball-two"></view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import EnBlank from "@/components/en-utils/en-blank/en-blank";
+	import {
+		getExpressCoupon
+	} from '@/api/express.js';
+	import {
+		receiveCoupon
+	} from '@/api/coupon.js';
+	import tools from "@/service/tools";
+	export default {
+		components: {
+			EnBlank
+		},
+		data() {
+			return {
+				type: 1, //1可用类型 2可领类型
+				coupon_id: 1,
+				isAJAX: false,
+				// 代取优惠券
+				expressCouponData: {
+					coupon: [], //可用
+					receive: [], //可领
+				}
+			}
+		},
+		methods: {
+			getList(e, id, shop_id) {
+				console.log(e, id);
+				if (id) {
+					this.coupon_id = id;
+				} else {
+					this.coupon_id = '';
+				}
+				this.getExpressCoupon()
+			},
+			// 代取 获取优惠券 
+			getExpressCoupon() {
+				let operate_id = uni.getStorageSync('operate_id');
+				getExpressCoupon({
+					operate_id: operate_id
+				}).then((res) => {
+					if (res.code === 1) {
+						this.expressCouponData = res.data;
+						this.openPop();
+					}
+				})
+			},
+			setType(type) {
+				if (type != this.type) {
+					this.type = type
+				}
+			},
+			openPop() {
+				this.$refs.popupCoupon.open();
+			},
+			closeCoupon() {
+				this.$refs.popupCoupon.close();
+			},
+			setFun(item) {
+				this.$emit('giveCouPon', item);
+				this.closeCoupon();
+			},
+
+			getFun(item) {
+				if (this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
+				receiveCoupon({
+					grant_id: item.grant_id,
+					coupon_id: item.coupon_id
+				}).then((res) => {
+					if (res.code === 1) {
+						this.isAJAX = false;
+						tools.success('领取成功');
+						this.expressCouponData = []
+						this.getExpressCoupon()
+					} else {
+						this.isAJAX = false;
+						tools.success('领取失败');
+					}
+				})
+			}
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.w382 {
+		width: 382rpx;
+	}
+
+	.item-box {
+		position: relative;
+
+		.s-icon {
+			width: 32rpx;
+			height: 32rpx;
+			position: absolute;
+			top: 45%;
+			right: 24rpx;
+		}
+	}
+
+
+	.pop-coupon {
+		width: 100%;
+		height: 70vh;
+		background-color: #F5F4F9;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+		padding-top: 32rpx !important;
+		display: flex;
+		flex-direction: column;
+
+		.box-title {
+			position: relative;
+
+			.box-close {
+				position: absolute;
+				right: 22rpx;
+			}
+		}
+
+		.item-right {
+			padding: 24rpx;
+			box-sizing: border-box;
+			border-radius: 20rpx 0 0 20rpx;
+			position: relative;
+		}
+
+		.item-hr {
+			width: 0px;
+			height: auto;
+			border-right: 1rpx dashed #FB7850;
+		}
+
+		.item-hr-two {
+			width: 0px;
+			height: auto;
+			border-right: 1rpx dashed #999;
+		}
+
+		.item-left {
+			width: 200rpx;
+			height: auto;
+			padding: 20rpx 24rpx;
+			box-sizing: border-box;
+			position: relative;
+			border-radius: 0 20rpx 20rpx 0;
+		}
+
+		.but-box {
+			width: 152rpx;
+			height: 52rpx;
+			line-height: 52rpx;
+			text-align: center;
+			background: linear-gradient(225deg, #FB3D03 0%, #FF6901 100%);
+			border-radius: 200rpx;
+		}
+
+		.ball {
+			width: 24rpx;
+			height: 24rpx;
+			border-radius: 50%;
+			position: absolute;
+			top: -12rpx;
+			left: -12rpx;
+			background: #F5F5F5;
+			z-index: 2;
+		}
+
+		.ball-two {
+			width: 24rpx;
+			height: 24rpx;
+			border-radius: 50%;
+			position: absolute;
+			background: #F5F5F5;
+			z-index: 10;
+			bottom: -12rpx;
+			left: -12rpx;
+		}
+	}
+</style>

+ 189 - 134
pages-takeout/confirm-order.vue

@@ -2,20 +2,23 @@
 	<view class="confirm-order-box iPhone-bottom flex-common-css box-border-box">
 		<view class="bg-box"></view>
 		<Nav title='提交订单' bgckgroundBox='transparent'></Nav>
-		
+
 		<view class="scroll-view-css box-border-box p-24">
 			<view class="box-card box-border-box mb-20 bgc-f">
 				<view class="box-input box-border-box p-b-20 mb-20" @click="selectFun(2)">
 					<view class="flex-justify-space mb-12">
-						<view v-if="addressData.id" class="fs-36 fw-600 text-overflow-ellipsis w570">{{addressData.address||''}}{{addressData.school_name||''}}{{addressData.dorm_name||''}}</view>
+						<view v-if="addressData.id" class="fs-36 fw-600 text-overflow-ellipsis w570">
+							{{addressData.address||''}}{{addressData.school_name||''}}{{addressData.dorm_name||''}}
+						</view>
 						<view v-else class="fs-36 fw-600 text-overflow-ellipsis w570">请选择地址</view>
 						<image class="right-icon" src="@/static/img/toRight.png" mode=""></image>
 					</view>
 					<view class="" v-if="addressData.id">
-						<span class="mr-24 fs-28 fc-9">{{addressData.consignee||''}}</span><span class="fs-28 fc-9">{{addressData.phone||''}}</span>
+						<span class="mr-24 fs-28 fc-9">{{addressData.consignee||''}}</span><span
+							class="fs-28 fc-9">{{addressData.phone||''}}</span>
 					</view>
 				</view>
-				
+
 				<!-- <view class="box-input flex-justify-space align-items-center box-border-box p-b-20 mb-20" @click="selectFun(3)">
 					<view class="fs-28 fw-600">预计送达</view>
 					<view class="align-items-center">
@@ -23,12 +26,12 @@
 						<image class="right-icon" src="@/static/img/toRight.png" mode=""></image>
 					</view>
 				</view> -->
-				
+
 				<!-- <view  class="box-input flex-justify-space box-border-box p-b-20 mb-20">
 					<view class="fs-28 fw-600">配送方式</view>
 					<view class="fs-24 fw-400 sd-box fc-FB3D03">送达宿舍</view>
 				</view> -->
-				
+
 				<view class="p-b-20">
 					<view class=" flex-justify-space box-border-box p-b-20">
 						<view class="fs-28 fw-600">取件码</view>
@@ -38,13 +41,14 @@
 						</view>
 					</view>
 					<view class="code-box box-border-box flex-wrap-wrap">
-						<view class="code-item fs-28 text-overflow-ellipsis-one" v-for="(item,i) in fromData.pickup_code" :key="i">{{item}}</view>
+						<view class="code-item fs-28 text-overflow-ellipsis-one"
+							v-for="(item,i) in fromData.pickup_code" :key="i">{{item}}</view>
 					</view>
 				</view>
-				
+
 			</view>
-			
-			
+
+
 			<view class="box-card box-border-box bgc-f mb-20">
 				<view class="mb-32 b-b-F9F9F9">
 					<!-- <view class="fs-28 fw-600 mb-24">宋氏重庆鸡公煲(重工业店)宋氏重庆鸡公煲(重工业店)宋氏重庆鸡公煲(重工业店)</view> -->
@@ -71,18 +75,20 @@
 				<view class="flex-justify-space mb-24 p-b-20 b-b-F9F9F9" @click="selectFun(1)">
 					<view class="fs-28 fw-400">优惠券</view>
 					<view class="align-items-center">
-						<view :class="fromData.coupon_id?'fc-FB3D03 fw-600 fs-32':'fw-400 fs-28'">{{fromData.coupon_id?'-¥'+ quanMoney:'请选择优惠券'}}</view>
+						<view :class="fromData.coupon_id?'fc-FB3D03 fw-600 fs-32':'fw-400 fs-28'">
+							{{fromData.coupon_id?'-¥'+ quanMoney:'请选择优惠券'}}</view>
 						<image class="right-icon" src="@/static/img/toRight.png" mode=""></image>
 					</view>
 				</view>
 				<view class="text-align-right p-b-20">
 					<span class="fc-9 fs-28">共{{cardData.total_num||0}}件,</span>
 					<span class="fw-400 fc-0 fs-28">合计¥</span>
-					<span class="fw-600 fc-0 fs-44">{{((cardData.total_price - quanMoney) < 0?'0':(cardData.total_price - quanMoney)||0).toFixed(2)}}</span>
+					<span
+						class="fw-600 fc-0 fs-44">{{((cardData.total_price - quanMoney) < 0?'0':(cardData.total_price - quanMoney)||0).toFixed(2)}}</span>
 				</view>
 			</view>
-			
-			
+
+
 			<view class="box-card box-border-box bgc-f mb-20">
 				<view class="flex-justify-space b-b-F9F9F9  mb-24">
 					<view class="fs-28 fw-600 w158 mr-12">备注</view>
@@ -101,9 +107,9 @@
 				</view> -->
 				<view class="p-b-20"></view>
 			</view>
-			
-			
-			
+
+
+
 			<view class="box-card box-border-box mb-20 bgc-f flex-justify-space">
 				<view class="fs-28 fw-600 w158">支付方式</view>
 				<view class="wx-box display-flex">
@@ -112,18 +118,19 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="bottom-box box-border-box p-24">
 			<view class="flex-justify-space">
 				<view class="align-items-flex-end box-1">
 					<span class="fs-28 fc-f fw-600">¥</span>
-					<span class="fs-44 fc-f fw-600">{{((cardData.total_price - quanMoney) < 0?'0':(cardData.total_price - quanMoney)||0).toFixed(2)}}</span>
+					<span
+						class="fs-44 fc-f fw-600">{{((cardData.total_price - quanMoney) < 0?'0':(cardData.total_price - quanMoney)||0).toFixed(2)}}</span>
 				</view>
 				<view class="text-align-center box-2 fs-32 fc-f fw-600" @click="toSave()">立即支付</view>
 			</view>
 		</view>
-		
-		
+
+
 		<Coupon ref="coupon" @giveCouPon='giveCouPon'></Coupon>
 		<SelectAddress ref="selectAddress" @giveAddress='giveAddress'></SelectAddress>
 		<Time ref="selectTime" @giveTime='giveTime'></Time>
@@ -132,46 +139,59 @@
 </template>
 
 <script>
-	import {getExpressCoupon,getExpressCreate,getExpressPay} from '@/api/express.js';
-	import {getAddressDefault} from '@/api/member.js'
-	import {getShopIngList} from '@/api/shopping.js'
-	
-	
+	import {
+		getExpressCoupon,
+		getExpressCreate,
+		getExpressPay
+	} from '@/api/express.js';
+	import {
+		getAddressDefault
+	} from '@/api/member.js'
+	import {
+		getShopIngList
+	} from '@/api/shopping.js'
+
+
 	import tools from "@/service/tools";
-	import Coupon from './confirm-mod/coupon.vue';
+	import Coupon from './confirm-mod/dryClean-coupon.vue';
 	import SelectAddress from './confirm-mod/select-address.vue';
 	import Time from './confirm-mod/time.vue';
 	import EditCode from './confirm-mod/edit-code.vue';
-	
+
 	export default {
-		components:{Coupon,SelectAddress,Time,EditCode},
-		data(){
-			return{
-				type:2,//1外卖 2代取 3干洗
-				fromData:{
-					school_id:'',
-					site_id:'',
-					
-					address_id:'',
-					coupon_id:'',
-					note:'',
+		components: {
+			Coupon,
+			SelectAddress,
+			Time,
+			EditCode
+		},
+		data() {
+			return {
+				type: 2, //1外卖 2代取 3干洗
+				fromData: {
+					school_id: '',
+					site_id: '',
+
+					address_id: '',
+					coupon_id: '',
+					note: '',
 					// is_default:0,
-					pickup_code:[],
+					pickup_code: [],
 				},
-				addressData:{},
-				
-				cardData:{
-					goods_list:[],
+				addressData: {},
+
+				cardData: {
+					goods_list: [],
 				},
-				
-				quanMoney:"",
-				
-				isAJAX:false,
+
+				quanMoney: "",
+
+				isAJAX: false,
 			}
 		},
 		onLoad(e) {
 			this.type = Number(e.type)
-			if(this.type == 2){
+			if (this.type == 2) {
 				this.fromData.pickup_code = e.pickup_code.split(',').map(String)
 				this.getCard();
 			}
@@ -179,104 +199,118 @@
 		},
 		onShow() {
 			let isConfirmAddressFlag = uni.getStorageSync('isConfirmAddressFlag');
-			if(isConfirmAddressFlag){
+			if (isConfirmAddressFlag) {
 				this.selectFun(2);
 			}
 		},
-		methods:{
+		methods: {
 			// 获取购物车
-			getCard(){
-				getShopIngList({type:this.type}).then((res)=>{
-					if(res.code === 1){
+			getCard() {
+				getShopIngList({
+					type: this.type
+				}).then((res) => {
+					if (res.code === 1) {
 						this.cardData = res.data;
 					}
 				})
 			},
-			
+
 			// 获取默认地址
-			getAddressDefault(){
-				getAddressDefault().then((res)=>{
-					if(res.code === 1){
+			getAddressDefault() {
+				getAddressDefault().then((res) => {
+					if (res.code === 1) {
 						this.addressData = res.data
-						if(this.addressData.id){
+						if (this.addressData.id) {
 							this.fromData.address_id = this.addressData.id;
 						}
 					}
 				})
 			},
-			
-			selectFun(type){
-				if(type === 1){
+
+			selectFun(type) {
+				if (type === 1) {
 					// 选择优惠券
-					this.$refs.coupon.getList(this.type,this.fromData.coupon_id);
-				}else if(type === 2){
+					this.$refs.coupon.getList(this.type, this.fromData.coupon_id);
+				} else if (type === 2) {
 					// 选择地址
-					if(this.addressData.id){
+					if (this.addressData.id) {
 						this.$refs.selectAddress.id = this.addressData.id;
 					}
 					this.$refs.selectAddress.getList();
-				}else if(type === 3){
+				} else if (type === 3) {
 					// 选择时间
 					this.$refs.selectTime.getList();
-				}else if(type === 4){
+				} else if (type === 4) {
 					// 编辑code
 					this.$refs.editCode.getList();
 				}
 			},
-			giveCouPon(e){
+			giveCouPon(e) {
 				this.quanMoney = Number(e.money);
 				this.fromData.coupon_id = e.id;
 			},
-			giveAddress(e){
+			giveAddress(e) {
 				this.addressData = e;
 				this.fromData.address_id = this.addressData.id;
 			},
-			giveTime(e){
+			giveTime(e) {
 				console.log(e);
 			},
-			toSave(){
-				if(!this.fromData.address_id){
+			toSave() {
+				if (!this.fromData.address_id) {
 					return tools.error('请先选择地址')
 				}
-				
-				if(this.isAJAX){
+
+				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
 				this.fromData.school_id = uni.getStorageSync('school_id');
 				this.fromData.site_id = uni.getStorageSync('site_id');
-				
-				getExpressCreate(this.fromData).then((res)=>{
-					if(res.code === 1){
-						getExpressPay({order_id:res.data.order_id}).then((ret)=>{
-							if(ret.code === 1){
+
+				getExpressCreate(this.fromData).then((res) => {
+					if (res.code === 1) {
+						getExpressPay({
+							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.switchTab({
-											url:"/pages/order/index"
-										})
-									},1500)
-								  },
-								  fail: (err) =>{
-									this.isAJAX = false;
-								    tools.error("支付失败");
-								  },
+									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.switchTab({
+												url: "/pages/order/index"
+											})
+										}, 1000)
+									},
+									fail: (err) => {
+										this.isAJAX = false;
+										tools.error("支付失败");
+										setTimeout(() => {
+											uni.switchTab({
+												url: "/pages/order/index"
+											})
+										}, 1000)
+									},
 								});
-							}else{
+							} else {
 								this.isAJAX = false;
 								tools.error("支付失败");
+								setTimeout(() => {
+									uni.switchTab({
+										url: "/pages/order/index"
+									})
+								}, 1000)
 							}
 						})
-					}else{
+					} else {
 						this.isAJAX = false;
 						tools.error(res.msg);
 					}
@@ -287,35 +321,41 @@
 </script>
 
 <style scoped lang="scss">
-	.code-box{
+	.code-box {
 		min-height: 100rpx;
 		background-color: #F3F4F6;
 		border-radius: 12rpx;
 		padding: 24rpx 24rpx 0 24rpx;
-		.code-item{
+
+		.code-item {
 			width: 156rpx;
 			margin-right: 52rpx;
 			margin-bottom: 16rpx;
 		}
-		.code-item:nth-child(3n){
+
+		.code-item:nth-child(3n) {
 			margin-right: 0 !important;
 		}
 	}
-	.tz-an-f{
+
+	.tz-an-f {
 		position: relative;
-		.tz-an{
+
+		.tz-an {
 			position: absolute;
 			right: 16rpx;
 			top: 0;
 		}
 	}
-	.r-right{
+
+	.r-right {
 		margin-top: 24rpx;
 		width: 88rpx;
 		height: 52rpx;
 		border-radius: 200rpx;
 		position: relative;
-		.r-y{
+
+		.r-y {
 			width: 44rpx;
 			height: 44rpx;
 			background: #FFFFFF;
@@ -324,61 +364,73 @@
 			top: 4rpx;
 		}
 	}
-	.s-r{
+
+	.s-r {
 		background-color: #41ABF5;
-		transition:  all 1s; 
-		.r-y{
+		transition: all 1s;
+
+		.r-y {
 			right: 4rpx !important;
-			transition:  all 1s; 
+			transition: all 1s;
 		}
 	}
-	.n-r{
+
+	.n-r {
 		background-color: #ccc;
-		transition:  all 1s; 
-		.r-y{
+		transition: all 1s;
+
+		.r-y {
 			left: 4rpx !important;
-			transition:  all 1s; 
+			transition: all 1s;
 		}
 	}
-	.goods-img{
+
+	.goods-img {
 		width: 108rpx;
 		height: 108rpx;
 		border-radius: 8rpx;
 		margin-right: 16rpx;
 	}
-	.right-icon{
+
+	.right-icon {
 		width: 32rpx;
 		height: 32rpx;
 	}
-	.w376{
+
+	.w376 {
 		width: 376rpx;
 	}
-	.w570{
+
+	.w570 {
 		width: 570rpx;
 	}
-	.sd-box{
+
+	.sd-box {
 		padding: 3rpx 16rpx;
 		height: 40rpx;
 		line-height: 40rpx;
-		background: rgba(251,61,3,0.1);
+		background: rgba(251, 61, 3, 0.1);
 		border-radius: 8rpx 8rpx 8rpx 8rpx;
 	}
-	
-	.confirm-order-box{
+
+	.confirm-order-box {
 		position: relative;
-		.bg-box{
+
+		.bg-box {
 			width: 100%;
 			height: 448rpx;
 			filter: blur(80rpx);
-			background: linear-gradient(to right,rgba(176, 252, 250, 0.6),rgba(249,246,224,0.87),rgba(249,246,224,0.87));
+			background: linear-gradient(to right, rgba(176, 252, 250, 0.6), rgba(249, 246, 224, 0.87), rgba(249, 246, 224, 0.87));
 			position: absolute;
 			top: 0;
 			left: 0;
 			z-index: -1;
 		}
-		.bottom-box{
+
+		.bottom-box {
 			background-color: #fff;
-			.box-1{
+
+			.box-1 {
 				flex: 1;
 				height: 100rpx;
 				background: #333;
@@ -387,7 +439,8 @@
 				padding-left: 32rpx;
 				padding-bottom: 20rpx;
 			}
-			.box-2{
+
+			.box-2 {
 				width: 200rpx;
 				height: 100rpx;
 				line-height: 100rpx;
@@ -396,22 +449,24 @@
 				text-align: center;
 			}
 		}
-		
-		.box-card{
+
+		.box-card {
 			width: 100%;
 			min-height: 88rpx;
 			border-radius: 20rpx;
 			padding: 24rpx 24rpx 0 24rpx;
 		}
-		.wx-box{
-			image{
+
+		.wx-box {
+			image {
 				width: 40rpx;
 				height: 40rpx;
 			}
 		}
-		.box-input{
+
+		.box-input {
 			border-bottom: 2rpx solid #F9F9F9;
-			
+
 		}
 	}
 </style>

+ 1 - 0
pages/order/index.vue

@@ -258,6 +258,7 @@
 				this.$refs.popup.open('center')
 			},
 			maskClick() {
+				this.$refs.popup.close()
 				this.qrcodeData = ''
 				uni.showTabBar()
 			},